@odoo/o-spreadsheet 19.3.5 → 19.3.6
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 +86 -104
- package/dist/o_spreadsheet.css +3 -3
- package/dist/o_spreadsheet.esm.js +86 -104
- package/dist/o_spreadsheet.iife.js +86 -104
- package/dist/o_spreadsheet.min.iife.js +275 -275
- package/dist/o_spreadsheet.xml +5 -4
- package/dist/types/functions/function_registry.d.ts +1 -1
- package/dist/types/helpers/figures/charts/chart_js_extension.d.ts +1 -1
- package/dist/types/helpers/pivot/pivot_registry.d.ts +1 -1
- package/dist/types/index.d.ts +7 -7
- package/dist/types/migrations/migration_steps.d.ts +1 -1
- package/dist/types/plugins/index.d.ts +1 -1
- package/dist/types/plugins/ui_feature/table_computed_style.d.ts +1 -1
- package/package.json +1 -1
- package/dist/types/registry.d.ts +0 -10
|
@@ -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.3.
|
|
6
|
-
* @date 2026-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.3.6
|
|
6
|
+
* @date 2026-06-06T06:24:22.727Z
|
|
7
|
+
* @hash 0fe939b
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { App, Component, blockDom, markRaw, onMounted, onPatched, onWillPatch, onWillStart, onWillUnmount, onWillUpdateProps, status, toRaw, useChildSubEnv, useComponent, useEffect, useEnv, useExternalListener, useRef, useState, useSubEnv, whenReady, xml } from "@odoo/owl";
|
|
@@ -3239,31 +3239,78 @@ function validateArguments(descr) {
|
|
|
3239
3239
|
}
|
|
3240
3240
|
|
|
3241
3241
|
//#endregion
|
|
3242
|
-
//#region src/registry.ts
|
|
3243
|
-
|
|
3242
|
+
//#region src/registries/registry.ts
|
|
3243
|
+
/**
|
|
3244
|
+
* Registry
|
|
3245
|
+
*
|
|
3246
|
+
* The Registry class is basically just a mapping from a string key to an object.
|
|
3247
|
+
* It is really not much more than an object. It is however useful for the
|
|
3248
|
+
* following reasons:
|
|
3249
|
+
*
|
|
3250
|
+
* 1. it let us react and execute code when someone add something to the registry
|
|
3251
|
+
* (for example, the FunctionRegistry subclass this for this purpose)
|
|
3252
|
+
* 2. it throws an error when the get operation fails
|
|
3253
|
+
* 3. it provides a chained API to add items to the registry.
|
|
3254
|
+
*/
|
|
3255
|
+
var Registry = class {
|
|
3244
3256
|
content = {};
|
|
3257
|
+
/**
|
|
3258
|
+
* Add an item to the registry, you can only add if there is no item
|
|
3259
|
+
* already present in the registery with the given key
|
|
3260
|
+
*
|
|
3261
|
+
* Note that this also returns the registry, so another add method call can
|
|
3262
|
+
* be chained
|
|
3263
|
+
*/
|
|
3245
3264
|
add(key, value) {
|
|
3246
3265
|
if (key in this.content) throw new Error(`${key} is already present in this registry!`);
|
|
3247
3266
|
return this.replace(key, value);
|
|
3248
3267
|
}
|
|
3268
|
+
/**
|
|
3269
|
+
* Replace (or add) an item to the registry
|
|
3270
|
+
*
|
|
3271
|
+
* Note that this also returns the registry, so another add method call can
|
|
3272
|
+
* be chained
|
|
3273
|
+
*/
|
|
3249
3274
|
replace(key, value) {
|
|
3250
3275
|
this.content[key] = value;
|
|
3251
3276
|
return this;
|
|
3252
3277
|
}
|
|
3278
|
+
/**
|
|
3279
|
+
* Get an item from the registry
|
|
3280
|
+
*/
|
|
3253
3281
|
get(key) {
|
|
3282
|
+
/**
|
|
3283
|
+
* Note: key in {} is ~12 times slower than {}[key].
|
|
3284
|
+
* So, we check the absence of key only when the direct access returns
|
|
3285
|
+
* a falsy value. It's done to ensure that the registry can contains falsy values
|
|
3286
|
+
*/
|
|
3254
3287
|
const content = this.content[key];
|
|
3255
|
-
if (!content
|
|
3288
|
+
if (!content) {
|
|
3289
|
+
if (!(key in this.content)) throw new Error(`Cannot find ${key} in this registry!`);
|
|
3290
|
+
}
|
|
3256
3291
|
return content;
|
|
3257
3292
|
}
|
|
3293
|
+
/**
|
|
3294
|
+
* Check if the key is already in the registry
|
|
3295
|
+
*/
|
|
3258
3296
|
contains(key) {
|
|
3259
3297
|
return key in this.content;
|
|
3260
3298
|
}
|
|
3299
|
+
/**
|
|
3300
|
+
* Get a list of all elements in the registry
|
|
3301
|
+
*/
|
|
3261
3302
|
getAll() {
|
|
3262
3303
|
return Object.values(this.content);
|
|
3263
3304
|
}
|
|
3305
|
+
/**
|
|
3306
|
+
* Get a list of all keys in the registry
|
|
3307
|
+
*/
|
|
3264
3308
|
getKeys() {
|
|
3265
3309
|
return Object.keys(this.content);
|
|
3266
3310
|
}
|
|
3311
|
+
/**
|
|
3312
|
+
* Remove an item from the registry
|
|
3313
|
+
*/
|
|
3267
3314
|
remove(key) {
|
|
3268
3315
|
delete this.content[key];
|
|
3269
3316
|
}
|
|
@@ -4642,7 +4689,7 @@ function hasStringMessage(obj) {
|
|
|
4642
4689
|
//#endregion
|
|
4643
4690
|
//#region src/functions/function_registry.ts
|
|
4644
4691
|
const functionNameRegex = /^[A-Z0-9\_\.]+$/;
|
|
4645
|
-
var FunctionRegistry = class extends Registry
|
|
4692
|
+
var FunctionRegistry = class extends Registry {
|
|
4646
4693
|
mapping = {};
|
|
4647
4694
|
add(name, addDescr) {
|
|
4648
4695
|
name = name.toUpperCase();
|
|
@@ -5456,84 +5503,6 @@ function isFuncallToken(currentToken, nextToken) {
|
|
|
5456
5503
|
return nextToken?.type === "LEFT_PAREN" && functionRegex.test(currentToken.value) && currentToken.value === unquote(currentToken.value, "'");
|
|
5457
5504
|
}
|
|
5458
5505
|
|
|
5459
|
-
//#endregion
|
|
5460
|
-
//#region src/registries/registry.ts
|
|
5461
|
-
/**
|
|
5462
|
-
* Registry
|
|
5463
|
-
*
|
|
5464
|
-
* The Registry class is basically just a mapping from a string key to an object.
|
|
5465
|
-
* It is really not much more than an object. It is however useful for the
|
|
5466
|
-
* following reasons:
|
|
5467
|
-
*
|
|
5468
|
-
* 1. it let us react and execute code when someone add something to the registry
|
|
5469
|
-
* (for example, the FunctionRegistry subclass this for this purpose)
|
|
5470
|
-
* 2. it throws an error when the get operation fails
|
|
5471
|
-
* 3. it provides a chained API to add items to the registry.
|
|
5472
|
-
*/
|
|
5473
|
-
var Registry = class {
|
|
5474
|
-
content = {};
|
|
5475
|
-
/**
|
|
5476
|
-
* Add an item to the registry, you can only add if there is no item
|
|
5477
|
-
* already present in the registery with the given key
|
|
5478
|
-
*
|
|
5479
|
-
* Note that this also returns the registry, so another add method call can
|
|
5480
|
-
* be chained
|
|
5481
|
-
*/
|
|
5482
|
-
add(key, value) {
|
|
5483
|
-
if (key in this.content) throw new Error(`${key} is already present in this registry!`);
|
|
5484
|
-
return this.replace(key, value);
|
|
5485
|
-
}
|
|
5486
|
-
/**
|
|
5487
|
-
* Replace (or add) an item to the registry
|
|
5488
|
-
*
|
|
5489
|
-
* Note that this also returns the registry, so another add method call can
|
|
5490
|
-
* be chained
|
|
5491
|
-
*/
|
|
5492
|
-
replace(key, value) {
|
|
5493
|
-
this.content[key] = value;
|
|
5494
|
-
return this;
|
|
5495
|
-
}
|
|
5496
|
-
/**
|
|
5497
|
-
* Get an item from the registry
|
|
5498
|
-
*/
|
|
5499
|
-
get(key) {
|
|
5500
|
-
/**
|
|
5501
|
-
* Note: key in {} is ~12 times slower than {}[key].
|
|
5502
|
-
* So, we check the absence of key only when the direct access returns
|
|
5503
|
-
* a falsy value. It's done to ensure that the registry can contains falsy values
|
|
5504
|
-
*/
|
|
5505
|
-
const content = this.content[key];
|
|
5506
|
-
if (!content) {
|
|
5507
|
-
if (!(key in this.content)) throw new Error(`Cannot find ${key} in this registry!`);
|
|
5508
|
-
}
|
|
5509
|
-
return content;
|
|
5510
|
-
}
|
|
5511
|
-
/**
|
|
5512
|
-
* Check if the key is already in the registry
|
|
5513
|
-
*/
|
|
5514
|
-
contains(key) {
|
|
5515
|
-
return key in this.content;
|
|
5516
|
-
}
|
|
5517
|
-
/**
|
|
5518
|
-
* Get a list of all elements in the registry
|
|
5519
|
-
*/
|
|
5520
|
-
getAll() {
|
|
5521
|
-
return Object.values(this.content);
|
|
5522
|
-
}
|
|
5523
|
-
/**
|
|
5524
|
-
* Get a list of all keys in the registry
|
|
5525
|
-
*/
|
|
5526
|
-
getKeys() {
|
|
5527
|
-
return Object.keys(this.content);
|
|
5528
|
-
}
|
|
5529
|
-
/**
|
|
5530
|
-
* Remove an item from the registry
|
|
5531
|
-
*/
|
|
5532
|
-
remove(key) {
|
|
5533
|
-
delete this.content[key];
|
|
5534
|
-
}
|
|
5535
|
-
};
|
|
5536
|
-
|
|
5537
5506
|
//#endregion
|
|
5538
5507
|
//#region src/helpers/range.ts
|
|
5539
5508
|
function createRange(args, getSheetSize) {
|
|
@@ -6559,6 +6528,7 @@ let CellValueType = /* @__PURE__ */ function(CellValueType) {
|
|
|
6559
6528
|
//#endregion
|
|
6560
6529
|
//#region src/helpers/format/format_tokenizer.ts
|
|
6561
6530
|
function tokenizeFormat(str) {
|
|
6531
|
+
str = str.replace(/\s/g, " ");
|
|
6562
6532
|
const chars = new TokenizingChars(str);
|
|
6563
6533
|
const result = [];
|
|
6564
6534
|
let currentFormatPart = [];
|
|
@@ -7689,7 +7659,12 @@ const lockedSheetAllowedCommands = new Set([
|
|
|
7689
7659
|
"SET_ZOOM",
|
|
7690
7660
|
"UPDATE_CAROUSEL_ACTIVE_ITEM",
|
|
7691
7661
|
"DUPLICATE_PIVOT_IN_NEW_SHEET",
|
|
7692
|
-
"UPDATE_FILTER"
|
|
7662
|
+
"UPDATE_FILTER",
|
|
7663
|
+
"ACTIVATE_NEXT_SHEET",
|
|
7664
|
+
"ACTIVATE_PREVIOUS_SHEET",
|
|
7665
|
+
"SCROLL_TO_CELL",
|
|
7666
|
+
"SHIFT_VIEWPORT_DOWN",
|
|
7667
|
+
"SHIFT_VIEWPORT_UP"
|
|
7693
7668
|
]);
|
|
7694
7669
|
const coreTypes = new Set([
|
|
7695
7670
|
"UPDATE_CELL",
|
|
@@ -8762,7 +8737,7 @@ var UuidGenerator = class {
|
|
|
8762
8737
|
|
|
8763
8738
|
//#endregion
|
|
8764
8739
|
//#region src/helpers/figures/charts/chart_js_extension.ts
|
|
8765
|
-
const chartJsExtensionRegistry = new Registry
|
|
8740
|
+
const chartJsExtensionRegistry = new Registry();
|
|
8766
8741
|
function areChartJSExtensionsLoaded() {
|
|
8767
8742
|
return globalThis.Chart ? !!globalThis.Chart.registry.plugins.get("chartShowValuesPlugin") : true;
|
|
8768
8743
|
}
|
|
@@ -23273,7 +23248,7 @@ const WEEK_START = {
|
|
|
23273
23248
|
|
|
23274
23249
|
//#endregion
|
|
23275
23250
|
//#region src/migrations/migration_steps.ts
|
|
23276
|
-
const migrationStepRegistry = new Registry
|
|
23251
|
+
const migrationStepRegistry = new Registry();
|
|
23277
23252
|
migrationStepRegistry.add("0.1", { migrate(data) {
|
|
23278
23253
|
if (data.sheets && data.sheets[0]) data.activeSheet = data.sheets[0].name;
|
|
23279
23254
|
return data;
|
|
@@ -30285,11 +30260,10 @@ const INSERT_TABLE = (env) => {
|
|
|
30285
30260
|
if (interactiveCreateTable(env, env.model.getters.getActiveSheetId()).isSuccessful) env.openSidePanel("TableSidePanel", {});
|
|
30286
30261
|
};
|
|
30287
30262
|
const DELETE_SELECTED_TABLE = (env) => {
|
|
30288
|
-
const
|
|
30289
|
-
const table = env.model.getters.getTable(position);
|
|
30263
|
+
const table = env.model.getters.getFirstTableInSelection();
|
|
30290
30264
|
if (!table) return;
|
|
30291
30265
|
env.model.dispatch("REMOVE_TABLE", {
|
|
30292
|
-
sheetId:
|
|
30266
|
+
sheetId: env.model.getters.getActiveSheetId(),
|
|
30293
30267
|
target: [table.range.zone]
|
|
30294
30268
|
});
|
|
30295
30269
|
};
|
|
@@ -39564,7 +39538,7 @@ var SpreadsheetPivot = class {
|
|
|
39564
39538
|
|
|
39565
39539
|
//#endregion
|
|
39566
39540
|
//#region src/helpers/pivot/pivot_registry.ts
|
|
39567
|
-
const pivotRegistry = new Registry
|
|
39541
|
+
const pivotRegistry = new Registry();
|
|
39568
39542
|
const dateGranularities = [
|
|
39569
39543
|
"year",
|
|
39570
39544
|
"quarter_number",
|
|
@@ -57872,9 +57846,11 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
57872
57846
|
this.refreshPivot(cmd.id);
|
|
57873
57847
|
break;
|
|
57874
57848
|
case "ADD_PIVOT":
|
|
57849
|
+
this.unusedPivotsInFormulas?.push(cmd.pivotId);
|
|
57875
57850
|
this.setupPivot(cmd.pivotId);
|
|
57876
57851
|
break;
|
|
57877
57852
|
case "DUPLICATE_PIVOT":
|
|
57853
|
+
this.unusedPivotsInFormulas?.push(cmd.newPivotId);
|
|
57878
57854
|
this.setupPivot(cmd.newPivotId);
|
|
57879
57855
|
break;
|
|
57880
57856
|
case "UPDATE_PIVOT":
|
|
@@ -58066,8 +58042,8 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
58066
58042
|
}
|
|
58067
58043
|
}
|
|
58068
58044
|
for (const pivotId of this.getters.getPivotIds()) {
|
|
58069
|
-
const pivot = this.getters.
|
|
58070
|
-
for (const measure of pivot.
|
|
58045
|
+
const pivot = this.getters.getPivotCoreDefinition(pivotId);
|
|
58046
|
+
for (const measure of pivot.measures) if (measure.computedBy) {
|
|
58071
58047
|
const { sheetId } = measure.computedBy;
|
|
58072
58048
|
const formula = this.getters.getMeasureCompiledFormula(pivotId, measure);
|
|
58073
58049
|
const relatedPivotIds = this.getPivotIdsFromFormula(sheetId, formula);
|
|
@@ -59829,7 +59805,8 @@ const invalidateTableStyleCommandsSet = new Set([
|
|
|
59829
59805
|
"REMOVE_TABLE",
|
|
59830
59806
|
"RESIZE_TABLE",
|
|
59831
59807
|
"CREATE_TABLE_STYLE",
|
|
59832
|
-
"REMOVE_TABLE_STYLE"
|
|
59808
|
+
"REMOVE_TABLE_STYLE",
|
|
59809
|
+
"DELETE_CONTENT"
|
|
59833
59810
|
]);
|
|
59834
59811
|
function doesCommandInvalidatesTableStyle(cmd) {
|
|
59835
59812
|
return invalidateTableStyleCommandsSet.has(cmd.type);
|
|
@@ -65524,10 +65501,10 @@ var SheetViewPlugin = class extends UIPlugin {
|
|
|
65524
65501
|
|
|
65525
65502
|
//#endregion
|
|
65526
65503
|
//#region src/plugins/index.ts
|
|
65527
|
-
const corePluginRegistry = new Registry
|
|
65528
|
-
const featurePluginRegistry = new Registry
|
|
65529
|
-
const statefulUIPluginRegistry = new Registry
|
|
65530
|
-
const coreViewsPluginRegistry = new Registry
|
|
65504
|
+
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("headerSize", HeaderSizePlugin).add("borders", BordersPlugin).add("conditional formatting", ConditionalFormatPlugin).add("figures", FigurePlugin).add("chart", ChartPlugin).add("carousel", CarouselPlugin).add("image", ImagePlugin).add("named_ranges", NamedRangesPlugin).add("pivot_core", PivotCorePlugin).add("spreadsheet_pivot_core", SpreadsheetPivotCorePlugin).add("tableStyle", TableStylePlugin);
|
|
65505
|
+
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);
|
|
65506
|
+
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).add("lock_sheet", LockSheetPlugin);
|
|
65507
|
+
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).add("formula_tracker", FormulaTrackerPlugin);
|
|
65531
65508
|
|
|
65532
65509
|
//#endregion
|
|
65533
65510
|
//#region src/registries/auto_completes/data_validation_auto_complete.ts
|
|
@@ -72325,6 +72302,11 @@ function lineAttributes(params) {
|
|
|
72325
72302
|
`;
|
|
72326
72303
|
}
|
|
72327
72304
|
function insertText(text, fontColor = "000000", fontsize = 16, style = {}) {
|
|
72305
|
+
const textProperties = [
|
|
72306
|
+
["b", style.bold ? "1" : "0"],
|
|
72307
|
+
["i", style.italic ? "1" : "0"],
|
|
72308
|
+
["sz", fontsize * 100]
|
|
72309
|
+
];
|
|
72328
72310
|
return escapeXml`
|
|
72329
72311
|
<c:tx>
|
|
72330
72312
|
<c:rich>
|
|
@@ -72332,13 +72314,13 @@ function insertText(text, fontColor = "000000", fontsize = 16, style = {}) {
|
|
|
72332
72314
|
<a:lstStyle />
|
|
72333
72315
|
<a:p>
|
|
72334
72316
|
<a:pPr lvl="0">
|
|
72335
|
-
<a:defRPr
|
|
72317
|
+
<a:defRPr ${formatAttributes(textProperties)}>
|
|
72336
72318
|
${solidFill(fontColor)}
|
|
72337
72319
|
<a:latin typeface="+mn-lt"/>
|
|
72338
72320
|
</a:defRPr>
|
|
72339
72321
|
</a:pPr>
|
|
72340
72322
|
<a:r> <!-- Runs -->
|
|
72341
|
-
<a:rPr
|
|
72323
|
+
<a:rPr ${formatAttributes(textProperties)}/>
|
|
72342
72324
|
<a:t>${text}</a:t>
|
|
72343
72325
|
</a:r>
|
|
72344
72326
|
</a:p>
|
|
@@ -84488,6 +84470,6 @@ const chartHelpers = {
|
|
|
84488
84470
|
//#endregion
|
|
84489
84471
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CompiledFormula, CorePlugin, CoreViewPlugin, DEFAULT_LOCALE, DEFAULT_LOCALES, DispatchResult, EvaluationError, LocalTransportService, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, canExecuteInReadonly, categories, chartHelpers, components, constants, convertAstNodes, coreTypes, createAutocompleteArgumentsProvider, findCellInNewZone, functionCache, getCaretDownSvg, getCaretUpSvg, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isSheetDependent, iterateAstNodes, links, load, lockedSheetAllowedCommands, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
84490
84472
|
|
|
84491
|
-
__info__.version = "19.3.
|
|
84492
|
-
__info__.date = "2026-
|
|
84493
|
-
__info__.hash = "
|
|
84473
|
+
__info__.version = "19.3.6";
|
|
84474
|
+
__info__.date = "2026-06-06T06:24:22.727Z";
|
|
84475
|
+
__info__.hash = "0fe939b";
|
|
@@ -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.3.
|
|
6
|
-
* @date 2026-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.3.6
|
|
6
|
+
* @date 2026-06-06T06:24:22.727Z
|
|
7
|
+
* @hash 0fe939b
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function(exports, _odoo_owl) {
|
|
@@ -3241,31 +3241,78 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
3241
3241
|
}
|
|
3242
3242
|
|
|
3243
3243
|
//#endregion
|
|
3244
|
-
//#region src/registry.ts
|
|
3245
|
-
|
|
3244
|
+
//#region src/registries/registry.ts
|
|
3245
|
+
/**
|
|
3246
|
+
* Registry
|
|
3247
|
+
*
|
|
3248
|
+
* The Registry class is basically just a mapping from a string key to an object.
|
|
3249
|
+
* It is really not much more than an object. It is however useful for the
|
|
3250
|
+
* following reasons:
|
|
3251
|
+
*
|
|
3252
|
+
* 1. it let us react and execute code when someone add something to the registry
|
|
3253
|
+
* (for example, the FunctionRegistry subclass this for this purpose)
|
|
3254
|
+
* 2. it throws an error when the get operation fails
|
|
3255
|
+
* 3. it provides a chained API to add items to the registry.
|
|
3256
|
+
*/
|
|
3257
|
+
var Registry = class {
|
|
3246
3258
|
content = {};
|
|
3259
|
+
/**
|
|
3260
|
+
* Add an item to the registry, you can only add if there is no item
|
|
3261
|
+
* already present in the registery with the given key
|
|
3262
|
+
*
|
|
3263
|
+
* Note that this also returns the registry, so another add method call can
|
|
3264
|
+
* be chained
|
|
3265
|
+
*/
|
|
3247
3266
|
add(key, value) {
|
|
3248
3267
|
if (key in this.content) throw new Error(`${key} is already present in this registry!`);
|
|
3249
3268
|
return this.replace(key, value);
|
|
3250
3269
|
}
|
|
3270
|
+
/**
|
|
3271
|
+
* Replace (or add) an item to the registry
|
|
3272
|
+
*
|
|
3273
|
+
* Note that this also returns the registry, so another add method call can
|
|
3274
|
+
* be chained
|
|
3275
|
+
*/
|
|
3251
3276
|
replace(key, value) {
|
|
3252
3277
|
this.content[key] = value;
|
|
3253
3278
|
return this;
|
|
3254
3279
|
}
|
|
3280
|
+
/**
|
|
3281
|
+
* Get an item from the registry
|
|
3282
|
+
*/
|
|
3255
3283
|
get(key) {
|
|
3284
|
+
/**
|
|
3285
|
+
* Note: key in {} is ~12 times slower than {}[key].
|
|
3286
|
+
* So, we check the absence of key only when the direct access returns
|
|
3287
|
+
* a falsy value. It's done to ensure that the registry can contains falsy values
|
|
3288
|
+
*/
|
|
3256
3289
|
const content = this.content[key];
|
|
3257
|
-
if (!content
|
|
3290
|
+
if (!content) {
|
|
3291
|
+
if (!(key in this.content)) throw new Error(`Cannot find ${key} in this registry!`);
|
|
3292
|
+
}
|
|
3258
3293
|
return content;
|
|
3259
3294
|
}
|
|
3295
|
+
/**
|
|
3296
|
+
* Check if the key is already in the registry
|
|
3297
|
+
*/
|
|
3260
3298
|
contains(key) {
|
|
3261
3299
|
return key in this.content;
|
|
3262
3300
|
}
|
|
3301
|
+
/**
|
|
3302
|
+
* Get a list of all elements in the registry
|
|
3303
|
+
*/
|
|
3263
3304
|
getAll() {
|
|
3264
3305
|
return Object.values(this.content);
|
|
3265
3306
|
}
|
|
3307
|
+
/**
|
|
3308
|
+
* Get a list of all keys in the registry
|
|
3309
|
+
*/
|
|
3266
3310
|
getKeys() {
|
|
3267
3311
|
return Object.keys(this.content);
|
|
3268
3312
|
}
|
|
3313
|
+
/**
|
|
3314
|
+
* Remove an item from the registry
|
|
3315
|
+
*/
|
|
3269
3316
|
remove(key) {
|
|
3270
3317
|
delete this.content[key];
|
|
3271
3318
|
}
|
|
@@ -4644,7 +4691,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
4644
4691
|
//#endregion
|
|
4645
4692
|
//#region src/functions/function_registry.ts
|
|
4646
4693
|
const functionNameRegex = /^[A-Z0-9\_\.]+$/;
|
|
4647
|
-
var FunctionRegistry = class extends Registry
|
|
4694
|
+
var FunctionRegistry = class extends Registry {
|
|
4648
4695
|
mapping = {};
|
|
4649
4696
|
add(name, addDescr) {
|
|
4650
4697
|
name = name.toUpperCase();
|
|
@@ -5458,84 +5505,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
5458
5505
|
return nextToken?.type === "LEFT_PAREN" && functionRegex.test(currentToken.value) && currentToken.value === unquote(currentToken.value, "'");
|
|
5459
5506
|
}
|
|
5460
5507
|
|
|
5461
|
-
//#endregion
|
|
5462
|
-
//#region src/registries/registry.ts
|
|
5463
|
-
/**
|
|
5464
|
-
* Registry
|
|
5465
|
-
*
|
|
5466
|
-
* The Registry class is basically just a mapping from a string key to an object.
|
|
5467
|
-
* It is really not much more than an object. It is however useful for the
|
|
5468
|
-
* following reasons:
|
|
5469
|
-
*
|
|
5470
|
-
* 1. it let us react and execute code when someone add something to the registry
|
|
5471
|
-
* (for example, the FunctionRegistry subclass this for this purpose)
|
|
5472
|
-
* 2. it throws an error when the get operation fails
|
|
5473
|
-
* 3. it provides a chained API to add items to the registry.
|
|
5474
|
-
*/
|
|
5475
|
-
var Registry = class {
|
|
5476
|
-
content = {};
|
|
5477
|
-
/**
|
|
5478
|
-
* Add an item to the registry, you can only add if there is no item
|
|
5479
|
-
* already present in the registery with the given key
|
|
5480
|
-
*
|
|
5481
|
-
* Note that this also returns the registry, so another add method call can
|
|
5482
|
-
* be chained
|
|
5483
|
-
*/
|
|
5484
|
-
add(key, value) {
|
|
5485
|
-
if (key in this.content) throw new Error(`${key} is already present in this registry!`);
|
|
5486
|
-
return this.replace(key, value);
|
|
5487
|
-
}
|
|
5488
|
-
/**
|
|
5489
|
-
* Replace (or add) an item to the registry
|
|
5490
|
-
*
|
|
5491
|
-
* Note that this also returns the registry, so another add method call can
|
|
5492
|
-
* be chained
|
|
5493
|
-
*/
|
|
5494
|
-
replace(key, value) {
|
|
5495
|
-
this.content[key] = value;
|
|
5496
|
-
return this;
|
|
5497
|
-
}
|
|
5498
|
-
/**
|
|
5499
|
-
* Get an item from the registry
|
|
5500
|
-
*/
|
|
5501
|
-
get(key) {
|
|
5502
|
-
/**
|
|
5503
|
-
* Note: key in {} is ~12 times slower than {}[key].
|
|
5504
|
-
* So, we check the absence of key only when the direct access returns
|
|
5505
|
-
* a falsy value. It's done to ensure that the registry can contains falsy values
|
|
5506
|
-
*/
|
|
5507
|
-
const content = this.content[key];
|
|
5508
|
-
if (!content) {
|
|
5509
|
-
if (!(key in this.content)) throw new Error(`Cannot find ${key} in this registry!`);
|
|
5510
|
-
}
|
|
5511
|
-
return content;
|
|
5512
|
-
}
|
|
5513
|
-
/**
|
|
5514
|
-
* Check if the key is already in the registry
|
|
5515
|
-
*/
|
|
5516
|
-
contains(key) {
|
|
5517
|
-
return key in this.content;
|
|
5518
|
-
}
|
|
5519
|
-
/**
|
|
5520
|
-
* Get a list of all elements in the registry
|
|
5521
|
-
*/
|
|
5522
|
-
getAll() {
|
|
5523
|
-
return Object.values(this.content);
|
|
5524
|
-
}
|
|
5525
|
-
/**
|
|
5526
|
-
* Get a list of all keys in the registry
|
|
5527
|
-
*/
|
|
5528
|
-
getKeys() {
|
|
5529
|
-
return Object.keys(this.content);
|
|
5530
|
-
}
|
|
5531
|
-
/**
|
|
5532
|
-
* Remove an item from the registry
|
|
5533
|
-
*/
|
|
5534
|
-
remove(key) {
|
|
5535
|
-
delete this.content[key];
|
|
5536
|
-
}
|
|
5537
|
-
};
|
|
5538
|
-
|
|
5539
5508
|
//#endregion
|
|
5540
5509
|
//#region src/helpers/range.ts
|
|
5541
5510
|
function createRange(args, getSheetSize) {
|
|
@@ -6561,6 +6530,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
6561
6530
|
//#endregion
|
|
6562
6531
|
//#region src/helpers/format/format_tokenizer.ts
|
|
6563
6532
|
function tokenizeFormat(str) {
|
|
6533
|
+
str = str.replace(/\s/g, " ");
|
|
6564
6534
|
const chars = new TokenizingChars(str);
|
|
6565
6535
|
const result = [];
|
|
6566
6536
|
let currentFormatPart = [];
|
|
@@ -7691,7 +7661,12 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
7691
7661
|
"SET_ZOOM",
|
|
7692
7662
|
"UPDATE_CAROUSEL_ACTIVE_ITEM",
|
|
7693
7663
|
"DUPLICATE_PIVOT_IN_NEW_SHEET",
|
|
7694
|
-
"UPDATE_FILTER"
|
|
7664
|
+
"UPDATE_FILTER",
|
|
7665
|
+
"ACTIVATE_NEXT_SHEET",
|
|
7666
|
+
"ACTIVATE_PREVIOUS_SHEET",
|
|
7667
|
+
"SCROLL_TO_CELL",
|
|
7668
|
+
"SHIFT_VIEWPORT_DOWN",
|
|
7669
|
+
"SHIFT_VIEWPORT_UP"
|
|
7695
7670
|
]);
|
|
7696
7671
|
const coreTypes = new Set([
|
|
7697
7672
|
"UPDATE_CELL",
|
|
@@ -8764,7 +8739,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
8764
8739
|
|
|
8765
8740
|
//#endregion
|
|
8766
8741
|
//#region src/helpers/figures/charts/chart_js_extension.ts
|
|
8767
|
-
const chartJsExtensionRegistry = new Registry
|
|
8742
|
+
const chartJsExtensionRegistry = new Registry();
|
|
8768
8743
|
function areChartJSExtensionsLoaded() {
|
|
8769
8744
|
return globalThis.Chart ? !!globalThis.Chart.registry.plugins.get("chartShowValuesPlugin") : true;
|
|
8770
8745
|
}
|
|
@@ -23275,7 +23250,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
23275
23250
|
|
|
23276
23251
|
//#endregion
|
|
23277
23252
|
//#region src/migrations/migration_steps.ts
|
|
23278
|
-
const migrationStepRegistry = new Registry
|
|
23253
|
+
const migrationStepRegistry = new Registry();
|
|
23279
23254
|
migrationStepRegistry.add("0.1", { migrate(data) {
|
|
23280
23255
|
if (data.sheets && data.sheets[0]) data.activeSheet = data.sheets[0].name;
|
|
23281
23256
|
return data;
|
|
@@ -30287,11 +30262,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
30287
30262
|
if (interactiveCreateTable(env, env.model.getters.getActiveSheetId()).isSuccessful) env.openSidePanel("TableSidePanel", {});
|
|
30288
30263
|
};
|
|
30289
30264
|
const DELETE_SELECTED_TABLE = (env) => {
|
|
30290
|
-
const
|
|
30291
|
-
const table = env.model.getters.getTable(position);
|
|
30265
|
+
const table = env.model.getters.getFirstTableInSelection();
|
|
30292
30266
|
if (!table) return;
|
|
30293
30267
|
env.model.dispatch("REMOVE_TABLE", {
|
|
30294
|
-
sheetId:
|
|
30268
|
+
sheetId: env.model.getters.getActiveSheetId(),
|
|
30295
30269
|
target: [table.range.zone]
|
|
30296
30270
|
});
|
|
30297
30271
|
};
|
|
@@ -39566,7 +39540,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
39566
39540
|
|
|
39567
39541
|
//#endregion
|
|
39568
39542
|
//#region src/helpers/pivot/pivot_registry.ts
|
|
39569
|
-
const pivotRegistry = new Registry
|
|
39543
|
+
const pivotRegistry = new Registry();
|
|
39570
39544
|
const dateGranularities = [
|
|
39571
39545
|
"year",
|
|
39572
39546
|
"quarter_number",
|
|
@@ -57874,9 +57848,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57874
57848
|
this.refreshPivot(cmd.id);
|
|
57875
57849
|
break;
|
|
57876
57850
|
case "ADD_PIVOT":
|
|
57851
|
+
this.unusedPivotsInFormulas?.push(cmd.pivotId);
|
|
57877
57852
|
this.setupPivot(cmd.pivotId);
|
|
57878
57853
|
break;
|
|
57879
57854
|
case "DUPLICATE_PIVOT":
|
|
57855
|
+
this.unusedPivotsInFormulas?.push(cmd.newPivotId);
|
|
57880
57856
|
this.setupPivot(cmd.newPivotId);
|
|
57881
57857
|
break;
|
|
57882
57858
|
case "UPDATE_PIVOT":
|
|
@@ -58068,8 +58044,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
58068
58044
|
}
|
|
58069
58045
|
}
|
|
58070
58046
|
for (const pivotId of this.getters.getPivotIds()) {
|
|
58071
|
-
const pivot = this.getters.
|
|
58072
|
-
for (const measure of pivot.
|
|
58047
|
+
const pivot = this.getters.getPivotCoreDefinition(pivotId);
|
|
58048
|
+
for (const measure of pivot.measures) if (measure.computedBy) {
|
|
58073
58049
|
const { sheetId } = measure.computedBy;
|
|
58074
58050
|
const formula = this.getters.getMeasureCompiledFormula(pivotId, measure);
|
|
58075
58051
|
const relatedPivotIds = this.getPivotIdsFromFormula(sheetId, formula);
|
|
@@ -59831,7 +59807,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
59831
59807
|
"REMOVE_TABLE",
|
|
59832
59808
|
"RESIZE_TABLE",
|
|
59833
59809
|
"CREATE_TABLE_STYLE",
|
|
59834
|
-
"REMOVE_TABLE_STYLE"
|
|
59810
|
+
"REMOVE_TABLE_STYLE",
|
|
59811
|
+
"DELETE_CONTENT"
|
|
59835
59812
|
]);
|
|
59836
59813
|
function doesCommandInvalidatesTableStyle(cmd) {
|
|
59837
59814
|
return invalidateTableStyleCommandsSet.has(cmd.type);
|
|
@@ -65526,10 +65503,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
65526
65503
|
|
|
65527
65504
|
//#endregion
|
|
65528
65505
|
//#region src/plugins/index.ts
|
|
65529
|
-
const corePluginRegistry = new Registry
|
|
65530
|
-
const featurePluginRegistry = new Registry
|
|
65531
|
-
const statefulUIPluginRegistry = new Registry
|
|
65532
|
-
const coreViewsPluginRegistry = new Registry
|
|
65506
|
+
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("headerSize", HeaderSizePlugin).add("borders", BordersPlugin).add("conditional formatting", ConditionalFormatPlugin).add("figures", FigurePlugin).add("chart", ChartPlugin).add("carousel", CarouselPlugin).add("image", ImagePlugin).add("named_ranges", NamedRangesPlugin).add("pivot_core", PivotCorePlugin).add("spreadsheet_pivot_core", SpreadsheetPivotCorePlugin).add("tableStyle", TableStylePlugin);
|
|
65507
|
+
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);
|
|
65508
|
+
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).add("lock_sheet", LockSheetPlugin);
|
|
65509
|
+
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).add("formula_tracker", FormulaTrackerPlugin);
|
|
65533
65510
|
|
|
65534
65511
|
//#endregion
|
|
65535
65512
|
//#region src/registries/auto_completes/data_validation_auto_complete.ts
|
|
@@ -72327,6 +72304,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
72327
72304
|
`;
|
|
72328
72305
|
}
|
|
72329
72306
|
function insertText(text, fontColor = "000000", fontsize = 16, style = {}) {
|
|
72307
|
+
const textProperties = [
|
|
72308
|
+
["b", style.bold ? "1" : "0"],
|
|
72309
|
+
["i", style.italic ? "1" : "0"],
|
|
72310
|
+
["sz", fontsize * 100]
|
|
72311
|
+
];
|
|
72330
72312
|
return escapeXml`
|
|
72331
72313
|
<c:tx>
|
|
72332
72314
|
<c:rich>
|
|
@@ -72334,13 +72316,13 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
72334
72316
|
<a:lstStyle />
|
|
72335
72317
|
<a:p>
|
|
72336
72318
|
<a:pPr lvl="0">
|
|
72337
|
-
<a:defRPr
|
|
72319
|
+
<a:defRPr ${formatAttributes(textProperties)}>
|
|
72338
72320
|
${solidFill(fontColor)}
|
|
72339
72321
|
<a:latin typeface="+mn-lt"/>
|
|
72340
72322
|
</a:defRPr>
|
|
72341
72323
|
</a:pPr>
|
|
72342
72324
|
<a:r> <!-- Runs -->
|
|
72343
|
-
<a:rPr
|
|
72325
|
+
<a:rPr ${formatAttributes(textProperties)}/>
|
|
72344
72326
|
<a:t>${text}</a:t>
|
|
72345
72327
|
</a:r>
|
|
72346
72328
|
</a:p>
|
|
@@ -84548,8 +84530,8 @@ exports.stores = stores;
|
|
|
84548
84530
|
exports.tokenColors = tokenColors;
|
|
84549
84531
|
exports.tokenize = tokenize;
|
|
84550
84532
|
|
|
84551
|
-
__info__.version = "19.3.
|
|
84552
|
-
__info__.date = "2026-
|
|
84553
|
-
__info__.hash = "
|
|
84533
|
+
__info__.version = "19.3.6";
|
|
84534
|
+
__info__.date = "2026-06-06T06:24:22.727Z";
|
|
84535
|
+
__info__.hash = "0fe939b";
|
|
84554
84536
|
|
|
84555
84537
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|