@odoo/o-spreadsheet 19.1.21 → 19.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/o_spreadsheet.cjs.js +50 -62
- package/dist/o_spreadsheet.css +19 -11
- package/dist/o_spreadsheet.esm.js +50 -62
- package/dist/o_spreadsheet.iife.js +50 -62
- package/dist/o_spreadsheet.iife.min.js +240 -240
- package/dist/o_spreadsheet.xml +5 -4
- package/package.json +1 -1
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 19.1.
|
|
6
|
-
* @date 2026-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.1.23
|
|
6
|
+
* @date 2026-06-17T08:50:59.790Z
|
|
7
|
+
* @hash 53aa85b
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function(exports, _odoo_owl) {
|
|
@@ -4304,6 +4304,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
4304
4304
|
//#endregion
|
|
4305
4305
|
//#region src/helpers/format/format_tokenizer.ts
|
|
4306
4306
|
function tokenizeFormat(str) {
|
|
4307
|
+
str = str.replace(/\s/g, " ");
|
|
4307
4308
|
const chars = new TokenizingChars(str);
|
|
4308
4309
|
const result = [];
|
|
4309
4310
|
let currentFormatPart = [];
|
|
@@ -7028,40 +7029,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
7028
7029
|
}
|
|
7029
7030
|
};
|
|
7030
7031
|
|
|
7031
|
-
//#endregion
|
|
7032
|
-
//#region src/registry.ts
|
|
7033
|
-
var Registry$1 = class {
|
|
7034
|
-
content = {};
|
|
7035
|
-
add(key, value) {
|
|
7036
|
-
if (key in this.content) throw new Error(`${key} is already present in this registry!`);
|
|
7037
|
-
return this.replace(key, value);
|
|
7038
|
-
}
|
|
7039
|
-
replace(key, value) {
|
|
7040
|
-
this.content[key] = value;
|
|
7041
|
-
return this;
|
|
7042
|
-
}
|
|
7043
|
-
get(key) {
|
|
7044
|
-
const content = this.content[key];
|
|
7045
|
-
if (!content && !(key in this.content)) throw new Error(`Cannot find ${key} in this registry!`);
|
|
7046
|
-
return content;
|
|
7047
|
-
}
|
|
7048
|
-
contains(key) {
|
|
7049
|
-
return key in this.content;
|
|
7050
|
-
}
|
|
7051
|
-
getAll() {
|
|
7052
|
-
return Object.values(this.content);
|
|
7053
|
-
}
|
|
7054
|
-
getKeys() {
|
|
7055
|
-
return Object.keys(this.content);
|
|
7056
|
-
}
|
|
7057
|
-
remove(key) {
|
|
7058
|
-
delete this.content[key];
|
|
7059
|
-
}
|
|
7060
|
-
};
|
|
7061
|
-
|
|
7062
7032
|
//#endregion
|
|
7063
7033
|
//#region src/helpers/figures/charts/chart_js_extension.ts
|
|
7064
|
-
const chartJsExtensionRegistry = new Registry
|
|
7034
|
+
const chartJsExtensionRegistry = new Registry();
|
|
7065
7035
|
function areChartJSExtensionsLoaded() {
|
|
7066
7036
|
return globalThis.Chart ? !!globalThis.Chart.registry.plugins.get("chartShowValuesPlugin") : true;
|
|
7067
7037
|
}
|
|
@@ -26309,7 +26279,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
26309
26279
|
//#endregion
|
|
26310
26280
|
//#region src/functions/function_registry.ts
|
|
26311
26281
|
const functionNameRegex = /^[A-Z0-9\_\.]+$/;
|
|
26312
|
-
var FunctionRegistry = class extends Registry
|
|
26282
|
+
var FunctionRegistry = class extends Registry {
|
|
26313
26283
|
mapping = {};
|
|
26314
26284
|
add(name, addDescr) {
|
|
26315
26285
|
name = name.toUpperCase();
|
|
@@ -35799,7 +35769,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
35799
35769
|
|
|
35800
35770
|
//#endregion
|
|
35801
35771
|
//#region src/migrations/migration_steps.ts
|
|
35802
|
-
const migrationStepRegistry = new Registry
|
|
35772
|
+
const migrationStepRegistry = new Registry();
|
|
35803
35773
|
migrationStepRegistry.add("0.1", { migrate(data) {
|
|
35804
35774
|
if (data.sheets && data.sheets[0]) data.activeSheet = data.sheets[0].name;
|
|
35805
35775
|
return data;
|
|
@@ -36961,11 +36931,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
36961
36931
|
if (interactiveCreateTable(env, env.model.getters.getActiveSheetId()).isSuccessful) env.openSidePanel("TableSidePanel", {});
|
|
36962
36932
|
};
|
|
36963
36933
|
const DELETE_SELECTED_TABLE = (env) => {
|
|
36964
|
-
const
|
|
36965
|
-
const table = env.model.getters.getTable(position);
|
|
36934
|
+
const table = env.model.getters.getFirstTableInSelection();
|
|
36966
36935
|
if (!table) return;
|
|
36967
36936
|
env.model.dispatch("REMOVE_TABLE", {
|
|
36968
|
-
sheetId:
|
|
36937
|
+
sheetId: env.model.getters.getActiveSheetId(),
|
|
36969
36938
|
target: [table.range.zone]
|
|
36970
36939
|
});
|
|
36971
36940
|
};
|
|
@@ -39334,7 +39303,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
39334
39303
|
|
|
39335
39304
|
//#endregion
|
|
39336
39305
|
//#region src/helpers/pivot/pivot_registry.ts
|
|
39337
|
-
const pivotRegistry = new Registry
|
|
39306
|
+
const pivotRegistry = new Registry();
|
|
39338
39307
|
const dateGranularities = [
|
|
39339
39308
|
"year",
|
|
39340
39309
|
"quarter_number",
|
|
@@ -41226,8 +41195,12 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
41226
41195
|
}
|
|
41227
41196
|
stopEdition(direction) {
|
|
41228
41197
|
if (this.canStopEdition()) {
|
|
41198
|
+
const { col, row } = this.currentEditedCell;
|
|
41229
41199
|
this._stopEdition();
|
|
41230
|
-
if (direction)
|
|
41200
|
+
if (direction) {
|
|
41201
|
+
this.model.selection.selectCell(col, row);
|
|
41202
|
+
this.model.selection.moveAnchorCell(direction, 1);
|
|
41203
|
+
}
|
|
41231
41204
|
return;
|
|
41232
41205
|
}
|
|
41233
41206
|
const editedCell = this.currentEditedCell;
|
|
@@ -48494,9 +48467,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
48494
48467
|
allSheetsMatches = [];
|
|
48495
48468
|
activeSheetMatches = [];
|
|
48496
48469
|
specificRangeMatches = [];
|
|
48470
|
+
selectedMatchPosition = null;
|
|
48497
48471
|
currentSearchRegex = null;
|
|
48498
48472
|
initialShowFormulaState;
|
|
48499
|
-
preserveSelectedMatchIndex = false;
|
|
48500
48473
|
irreplaceableMatchCount = 0;
|
|
48501
48474
|
isSearchDirty = false;
|
|
48502
48475
|
shouldFinalizeUpdateSelection = false;
|
|
@@ -48618,7 +48591,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
48618
48591
|
*/
|
|
48619
48592
|
_updateSearch(toSearch, searchOptions) {
|
|
48620
48593
|
this.searchOptions = searchOptions;
|
|
48621
|
-
if (toSearch !== this.toSearch)
|
|
48594
|
+
if (toSearch !== this.toSearch) {
|
|
48595
|
+
this.selectedMatchIndex = null;
|
|
48596
|
+
this.selectedMatchPosition = null;
|
|
48597
|
+
}
|
|
48622
48598
|
this.toSearch = toSearch;
|
|
48623
48599
|
this.currentSearchRegex = getSearchRegex(this.toSearch, this.searchOptions);
|
|
48624
48600
|
this.refreshSearch({
|
|
@@ -48630,8 +48606,14 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
48630
48606
|
* refresh the matches according to the current search options
|
|
48631
48607
|
*/
|
|
48632
48608
|
refreshSearch(options) {
|
|
48633
|
-
if (!this.preserveSelectedMatchIndex) this.selectedMatchIndex = null;
|
|
48634
48609
|
this.findMatches();
|
|
48610
|
+
if (this.selectedMatchPosition) if (this.selectedMatchPosition.sheetId !== this.getters.getActiveSheetId()) {
|
|
48611
|
+
this.selectedMatchIndex = null;
|
|
48612
|
+
this.selectedMatchPosition = null;
|
|
48613
|
+
} else {
|
|
48614
|
+
const index = this.searchMatches.findIndex((match) => match.sheetId === this.selectedMatchPosition?.sheetId && match.col === this.selectedMatchPosition?.col && match.row === this.selectedMatchPosition?.row);
|
|
48615
|
+
if (index !== -1) this.selectedMatchIndex = index;
|
|
48616
|
+
}
|
|
48635
48617
|
this.selectNextCell(0, options);
|
|
48636
48618
|
}
|
|
48637
48619
|
getSheetsInSearchOrder() {
|
|
@@ -48699,6 +48681,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
48699
48681
|
const matches = this.searchMatches;
|
|
48700
48682
|
if (!matches.length) {
|
|
48701
48683
|
this.selectedMatchIndex = null;
|
|
48684
|
+
this.selectedMatchPosition = null;
|
|
48702
48685
|
return;
|
|
48703
48686
|
}
|
|
48704
48687
|
let nextIndex;
|
|
@@ -48712,14 +48695,13 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
48712
48695
|
} else nextIndex = this.selectedMatchIndex + indexChange;
|
|
48713
48696
|
nextIndex = (nextIndex + matches.length) % matches.length;
|
|
48714
48697
|
this.selectedMatchIndex = nextIndex;
|
|
48698
|
+
this.selectedMatchPosition = matches[this.selectedMatchIndex];
|
|
48715
48699
|
const selectedMatch = matches[nextIndex];
|
|
48716
48700
|
if (options.jumpToMatchSheet && this.getters.getActiveSheetId() !== selectedMatch.sheetId) {
|
|
48717
|
-
this.preserveSelectedMatchIndex = true;
|
|
48718
48701
|
this.model.dispatch("ACTIVATE_SHEET", {
|
|
48719
48702
|
sheetIdFrom: this.getters.getActiveSheetId(),
|
|
48720
48703
|
sheetIdTo: selectedMatch.sheetId
|
|
48721
48704
|
});
|
|
48722
|
-
this.preserveSelectedMatchIndex = false;
|
|
48723
48705
|
this.isSearchDirty = false;
|
|
48724
48706
|
}
|
|
48725
48707
|
this.model.selection.getBackToDefault();
|
|
@@ -48730,7 +48712,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
48730
48712
|
*/
|
|
48731
48713
|
replace() {
|
|
48732
48714
|
if (this.selectedMatchIndex === null) return;
|
|
48733
|
-
this.preserveSelectedMatchIndex = true;
|
|
48734
48715
|
this.shouldFinalizeUpdateSelection = true;
|
|
48735
48716
|
this.model.dispatch("REPLACE_SEARCH", {
|
|
48736
48717
|
searchString: this.toSearch,
|
|
@@ -48738,7 +48719,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
48738
48719
|
matches: [this.searchMatches[this.selectedMatchIndex]],
|
|
48739
48720
|
searchOptions: this.searchOptions
|
|
48740
48721
|
});
|
|
48741
|
-
this.preserveSelectedMatchIndex = false;
|
|
48742
48722
|
}
|
|
48743
48723
|
/**
|
|
48744
48724
|
* Apply the replace function to all the matches one time.
|
|
@@ -59661,7 +59641,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
59661
59641
|
const definition = getters.getPivotCoreDefinition(pivotId);
|
|
59662
59642
|
const isDashboard = getters.isDashboard();
|
|
59663
59643
|
const fields = pivotCell.dimension === "COL" ? definition.columns : definition.rows;
|
|
59664
|
-
const hasIcon = !isDashboard && pivotCell.domain.length !== fields.length;
|
|
59644
|
+
const hasIcon = !isDashboard && !getters.shouldShowFormulas() && pivotCell.domain.length !== fields.length;
|
|
59665
59645
|
const isCollapsed = (definition.collapsedDomains?.[pivotCell.dimension] ?? []).some((domain) => deepEquals(domain, pivotCell.domain));
|
|
59666
59646
|
const indent = pivotCell.dimension === "ROW" ? (pivotCell.domain.length - 1) * 15 : 0;
|
|
59667
59647
|
return {
|
|
@@ -61263,9 +61243,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
61263
61243
|
this.refreshPivot(cmd.id);
|
|
61264
61244
|
break;
|
|
61265
61245
|
case "ADD_PIVOT":
|
|
61246
|
+
this.unusedPivotsInFormulas?.push(cmd.pivotId);
|
|
61266
61247
|
this.setupPivot(cmd.pivotId);
|
|
61267
61248
|
break;
|
|
61268
61249
|
case "DUPLICATE_PIVOT":
|
|
61250
|
+
this.unusedPivotsInFormulas?.push(cmd.newPivotId);
|
|
61269
61251
|
this.setupPivot(cmd.newPivotId);
|
|
61270
61252
|
break;
|
|
61271
61253
|
case "UPDATE_PIVOT":
|
|
@@ -61457,8 +61439,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
61457
61439
|
}
|
|
61458
61440
|
}
|
|
61459
61441
|
for (const pivotId of this.getters.getPivotIds()) {
|
|
61460
|
-
const pivot = this.getters.
|
|
61461
|
-
for (const measure of pivot.
|
|
61442
|
+
const pivot = this.getters.getPivotCoreDefinition(pivotId);
|
|
61443
|
+
for (const measure of pivot.measures) if (measure.computedBy) {
|
|
61462
61444
|
const { sheetId } = measure.computedBy;
|
|
61463
61445
|
const formula = this.getters.getMeasureCompiledFormula(pivotId, measure);
|
|
61464
61446
|
const relatedPivotIds = this.getPivotIdsFromFormula(sheetId, formula);
|
|
@@ -63138,7 +63120,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
63138
63120
|
"REMOVE_TABLE",
|
|
63139
63121
|
"RESIZE_TABLE",
|
|
63140
63122
|
"CREATE_TABLE_STYLE",
|
|
63141
|
-
"REMOVE_TABLE_STYLE"
|
|
63123
|
+
"REMOVE_TABLE_STYLE",
|
|
63124
|
+
"DELETE_CONTENT"
|
|
63142
63125
|
]);
|
|
63143
63126
|
function doesCommandInvalidatesTableStyle(cmd) {
|
|
63144
63127
|
return invalidateTableStyleCommandsSet.has(cmd.type);
|
|
@@ -68346,10 +68329,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
68346
68329
|
|
|
68347
68330
|
//#endregion
|
|
68348
68331
|
//#region src/plugins/index.ts
|
|
68349
|
-
const corePluginRegistry = new Registry
|
|
68350
|
-
const featurePluginRegistry = new Registry
|
|
68351
|
-
const statefulUIPluginRegistry = new Registry
|
|
68352
|
-
const coreViewsPluginRegistry = new Registry
|
|
68332
|
+
const corePluginRegistry = new Registry().add("settings", SettingsPlugin).add("sheet", SheetPlugin).add("header grouping", HeaderGroupingPlugin).add("header visibility", HeaderVisibilityPlugin).add("tables", TablePlugin).add("dataValidation", DataValidationPlugin).add("cell", CellPlugin).add("merge", MergePlugin).add("style", StylePlugin).add("headerSize", HeaderSizePlugin).add("borders", BordersPlugin).add("conditional formatting", ConditionalFormatPlugin).add("figures", FigurePlugin).add("chart", ChartPlugin).add("carousel", CarouselPlugin).add("image", ImagePlugin).add("pivot_core", PivotCorePlugin).add("spreadsheet_pivot_core", SpreadsheetPivotCorePlugin).add("tableStyle", TableStylePlugin);
|
|
68333
|
+
const featurePluginRegistry = new Registry().add("ui_sheet", SheetUIPlugin).add("ui_options", UIOptionsPlugin).add("autofill", AutofillPlugin).add("sort", SortPlugin).add("automatic_sum", AutomaticSumPlugin).add("format", FormatPlugin).add("insert_pivot", InsertPivotPlugin).add("pivot_presence", PivotPresencePlugin).add("split_to_columns", SplitToColumnsPlugin).add("subtotal_evaluation", SubtotalEvaluationPlugin).add("collaborative", CollaborativePlugin).add("history", HistoryPlugin).add("table_autofill", TableAutofillPlugin).add("table_ui_resize", TableResizeUI).add("datavalidation_insert", DataValidationInsertionPlugin).add("checkbox_toggle", CheckboxTogglePlugin).add("dynamic_translate", DynamicTranslate).add("geo_features", GeoFeaturePlugin).add("data_cleanup", DataCleanupPlugin);
|
|
68334
|
+
const statefulUIPluginRegistry = new Registry().add("selection", GridSelectionPlugin).add("evaluation_filter", FilterEvaluationPlugin).add("header_visibility_ui", HeaderVisibilityUIPlugin).add("cell_computed_style", CellComputedStylePlugin).add("table_computed_style", TableComputedStylePlugin).add("header_positions", HeaderPositionsUIPlugin).add("viewport", SheetViewPlugin).add("clipboard", ClipboardPlugin).add("carousel_ui", CarouselUIPlugin);
|
|
68335
|
+
const coreViewsPluginRegistry = new Registry().add("evaluation", EvaluationPlugin).add("evaluation_chart", EvaluationChartPlugin).add("evaluation_cf", EvaluationConditionalFormatPlugin).add("row_size", HeaderSizeUIPlugin).add("data_validation_ui", EvaluationDataValidationPlugin).add("dynamic_tables", DynamicTablesPlugin).add("custom_colors", CustomColorsPlugin).add("pivot_ui", PivotUIPlugin).add("cell_icon", CellIconPlugin);
|
|
68353
68336
|
|
|
68354
68337
|
//#endregion
|
|
68355
68338
|
//#region src/registries/auto_completes/data_validation_auto_complete.ts
|
|
@@ -74118,6 +74101,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
74118
74101
|
`;
|
|
74119
74102
|
}
|
|
74120
74103
|
function insertText(text, fontColor = "000000", fontsize = 16, style = {}) {
|
|
74104
|
+
const textProperties = [
|
|
74105
|
+
["b", style.bold ? "1" : "0"],
|
|
74106
|
+
["i", style.italic ? "1" : "0"],
|
|
74107
|
+
["sz", fontsize * 100]
|
|
74108
|
+
];
|
|
74121
74109
|
return escapeXml`
|
|
74122
74110
|
<c:tx>
|
|
74123
74111
|
<c:rich>
|
|
@@ -74125,13 +74113,13 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
74125
74113
|
<a:lstStyle />
|
|
74126
74114
|
<a:p>
|
|
74127
74115
|
<a:pPr lvl="0">
|
|
74128
|
-
<a:defRPr
|
|
74116
|
+
<a:defRPr ${formatAttributes(textProperties)}>
|
|
74129
74117
|
${solidFill(fontColor)}
|
|
74130
74118
|
<a:latin typeface="+mn-lt"/>
|
|
74131
74119
|
</a:defRPr>
|
|
74132
74120
|
</a:pPr>
|
|
74133
74121
|
<a:r> <!-- Runs -->
|
|
74134
|
-
<a:rPr
|
|
74122
|
+
<a:rPr ${formatAttributes(textProperties)}/>
|
|
74135
74123
|
<a:t>${text}</a:t>
|
|
74136
74124
|
</a:r>
|
|
74137
74125
|
</a:p>
|
|
@@ -79144,8 +79132,8 @@ exports.stores = stores;
|
|
|
79144
79132
|
exports.tokenColors = tokenColors;
|
|
79145
79133
|
exports.tokenize = tokenize;
|
|
79146
79134
|
|
|
79147
|
-
__info__.version = "19.1.
|
|
79148
|
-
__info__.date = "2026-
|
|
79149
|
-
__info__.hash = "
|
|
79135
|
+
__info__.version = "19.1.23";
|
|
79136
|
+
__info__.date = "2026-06-17T08:50:59.790Z";
|
|
79137
|
+
__info__.hash = "53aa85b";
|
|
79150
79138
|
|
|
79151
79139
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|