[REF] spreadsheet: rename plugins
Before this revision, it was quite confusing to know which plugin was
the Core one and the UI one.
Having {Pivot|List}CorePlugin and {Pivot|List}UIPlugin is self explanatory.
Part-of: odoo/odoo#100198
This commit is contained in:
@@ -6,8 +6,8 @@ import spreadsheet from "@spreadsheet/o_spreadsheet/o_spreadsheet_extended";
|
||||
|
||||
import "./list_functions";
|
||||
|
||||
import ListPlugin from "@spreadsheet/list/plugins/list_plugin";
|
||||
import ListStructurePlugin from "@spreadsheet/list/plugins/list_structure_plugin";
|
||||
import ListCorePlugin from "@spreadsheet/list/plugins/list_core_plugin";
|
||||
import ListUIPlugin from "@spreadsheet/list/plugins/list_ui_plugin";
|
||||
|
||||
import { SEE_RECORD_LIST, SEE_RECORD_LIST_VISIBLE } from "./list_actions";
|
||||
const { inverseCommandRegistry } = spreadsheet.registries;
|
||||
@@ -19,9 +19,9 @@ function identity(cmd) {
|
||||
const { coreTypes, readonlyAllowedCommands, invalidateEvaluationCommands } = spreadsheet;
|
||||
const { corePluginRegistry, uiPluginRegistry, cellMenuRegistry } = spreadsheet.registries;
|
||||
|
||||
corePluginRegistry.add("odooListPlugin", ListPlugin);
|
||||
corePluginRegistry.add("OdooListCorePlugin", ListCorePlugin);
|
||||
|
||||
uiPluginRegistry.add("odooListStructurePlugin", ListStructurePlugin);
|
||||
uiPluginRegistry.add("OdooListUIPlugin", ListUIPlugin);
|
||||
|
||||
coreTypes.add("INSERT_ODOO_LIST");
|
||||
coreTypes.add("RENAME_ODOO_LIST");
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@ import { TOP_LEVEL_STYLE } from "../../helpers/constants";
|
||||
* @property {Array<string>} orderBy
|
||||
*
|
||||
*/
|
||||
export default class ListPlugin extends spreadsheet.CorePlugin {
|
||||
export default class ListCorePlugin extends spreadsheet.CorePlugin {
|
||||
constructor(getters, history, range, dispatch, config, uuidGenerator) {
|
||||
super(getters, history, range, dispatch, config, uuidGenerator);
|
||||
this.dataSources = config.dataSources;
|
||||
@@ -357,7 +357,7 @@ export default class ListPlugin extends spreadsheet.CorePlugin {
|
||||
}
|
||||
}
|
||||
|
||||
ListPlugin.getters = [
|
||||
ListCorePlugin.getters = [
|
||||
"getListDataSource",
|
||||
"getListDisplayName",
|
||||
"getAsyncListDataSource",
|
||||
+3
-3
@@ -6,10 +6,10 @@ import { getFirstListFunction } from "../list_helpers";
|
||||
const { astToFormula } = spreadsheet;
|
||||
|
||||
/**
|
||||
* @typedef {import("./list_plugin").SpreadsheetList} SpreadsheetList
|
||||
* @typedef {import("./list_core_plugin").SpreadsheetList} SpreadsheetList
|
||||
*/
|
||||
|
||||
export default class ListStructurePlugin extends spreadsheet.UIPlugin {
|
||||
export default class ListUIPlugin extends spreadsheet.UIPlugin {
|
||||
constructor(getters, history, dispatch, config, selection) {
|
||||
super(getters, history, dispatch, config, selection);
|
||||
/** @type {string} */
|
||||
@@ -185,7 +185,7 @@ export default class ListStructurePlugin extends spreadsheet.UIPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
ListStructurePlugin.getters = [
|
||||
ListUIPlugin.getters = [
|
||||
"getListComputedDomain",
|
||||
"getListHeaderValue",
|
||||
"getListIdFromPosition",
|
||||
@@ -4,16 +4,12 @@ import { _lt } from "@web/core/l10n/translation";
|
||||
|
||||
import spreadsheet from "@spreadsheet/o_spreadsheet/o_spreadsheet_extended";
|
||||
|
||||
import PivotPlugin from "./plugins/pivot_plugin";
|
||||
import PivotStructurePlugin from "./plugins/pivot_structure_plugin";
|
||||
import PivotCorePlugin from "./plugins/pivot_core_plugin";
|
||||
import PivotUIPlugin from "./plugins/pivot_ui_plugin";
|
||||
|
||||
import { SEE_RECORDS_PIVOT, SEE_RECORDS_PIVOT_VISIBLE } from "./pivot_actions";
|
||||
|
||||
const {
|
||||
coreTypes,
|
||||
readonlyAllowedCommands,
|
||||
invalidateEvaluationCommands,
|
||||
} = spreadsheet;
|
||||
const { coreTypes, readonlyAllowedCommands, invalidateEvaluationCommands } = spreadsheet;
|
||||
const { corePluginRegistry, uiPluginRegistry, cellMenuRegistry } = spreadsheet.registries;
|
||||
|
||||
const { inverseCommandRegistry } = spreadsheet.registries;
|
||||
@@ -22,9 +18,9 @@ function identity(cmd) {
|
||||
return [cmd];
|
||||
}
|
||||
|
||||
corePluginRegistry.add("odooPivotPlugin", PivotPlugin);
|
||||
corePluginRegistry.add("OdooPivotCorePlugin", PivotCorePlugin);
|
||||
|
||||
uiPluginRegistry.add("odooPivotStructurePlugin", PivotStructurePlugin);
|
||||
uiPluginRegistry.add("OdooPivotUIPlugin", PivotUIPlugin);
|
||||
|
||||
coreTypes.add("INSERT_PIVOT");
|
||||
coreTypes.add("RENAME_ODOO_PIVOT");
|
||||
|
||||
+2
-2
@@ -27,7 +27,7 @@ import CommandResult from "../../o_spreadsheet/cancelled_reason";
|
||||
|
||||
const { CorePlugin } = spreadsheet;
|
||||
|
||||
export default class PivotPlugin extends CorePlugin {
|
||||
export default class PivotCorePlugin extends CorePlugin {
|
||||
constructor(getters, history, range, dispatch, config, uuidGenerator) {
|
||||
super(getters, history, range, dispatch, config, uuidGenerator);
|
||||
this.dataSources = config.dataSources;
|
||||
@@ -469,7 +469,7 @@ export default class PivotPlugin extends CorePlugin {
|
||||
}
|
||||
}
|
||||
|
||||
PivotPlugin.getters = [
|
||||
PivotCorePlugin.getters = [
|
||||
"getNextPivotId",
|
||||
"getPivotDefinition",
|
||||
"getPivotDisplayName",
|
||||
+2
-2
@@ -40,7 +40,7 @@ function pivotPeriodToFilterValue(timeRange, value) {
|
||||
}
|
||||
}
|
||||
|
||||
export default class PivotStructurePlugin extends spreadsheet.UIPlugin {
|
||||
export default class PivotUIPlugin extends spreadsheet.UIPlugin {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
/** @type {string} */
|
||||
@@ -275,7 +275,7 @@ export default class PivotStructurePlugin extends spreadsheet.UIPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
PivotStructurePlugin.getters = [
|
||||
PivotUIPlugin.getters = [
|
||||
"getSelectedPivotId",
|
||||
"getPivotComputedDomain",
|
||||
"getDisplayedPivotHeaderValue",
|
||||
Reference in New Issue
Block a user