@odoo/o-spreadsheet 19.3.4 → 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 +150 -124
- package/dist/o_spreadsheet.css +3 -3
- package/dist/o_spreadsheet.esm.js +150 -124
- package/dist/o_spreadsheet.iife.js +150 -124
- package/dist/o_spreadsheet.min.iife.js +94 -94
- 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_composer_helpers.d.ts +4 -0
- 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_core_views/pivot_ui.d.ts +17 -8
- 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
package/dist/o_spreadsheet.cjs
CHANGED
|
@@ -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
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
@@ -3240,31 +3240,78 @@ function validateArguments(descr) {
|
|
|
3240
3240
|
}
|
|
3241
3241
|
|
|
3242
3242
|
//#endregion
|
|
3243
|
-
//#region src/registry.ts
|
|
3244
|
-
|
|
3243
|
+
//#region src/registries/registry.ts
|
|
3244
|
+
/**
|
|
3245
|
+
* Registry
|
|
3246
|
+
*
|
|
3247
|
+
* The Registry class is basically just a mapping from a string key to an object.
|
|
3248
|
+
* It is really not much more than an object. It is however useful for the
|
|
3249
|
+
* following reasons:
|
|
3250
|
+
*
|
|
3251
|
+
* 1. it let us react and execute code when someone add something to the registry
|
|
3252
|
+
* (for example, the FunctionRegistry subclass this for this purpose)
|
|
3253
|
+
* 2. it throws an error when the get operation fails
|
|
3254
|
+
* 3. it provides a chained API to add items to the registry.
|
|
3255
|
+
*/
|
|
3256
|
+
var Registry = class {
|
|
3245
3257
|
content = {};
|
|
3258
|
+
/**
|
|
3259
|
+
* Add an item to the registry, you can only add if there is no item
|
|
3260
|
+
* already present in the registery with the given key
|
|
3261
|
+
*
|
|
3262
|
+
* Note that this also returns the registry, so another add method call can
|
|
3263
|
+
* be chained
|
|
3264
|
+
*/
|
|
3246
3265
|
add(key, value) {
|
|
3247
3266
|
if (key in this.content) throw new Error(`${key} is already present in this registry!`);
|
|
3248
3267
|
return this.replace(key, value);
|
|
3249
3268
|
}
|
|
3269
|
+
/**
|
|
3270
|
+
* Replace (or add) an item to the registry
|
|
3271
|
+
*
|
|
3272
|
+
* Note that this also returns the registry, so another add method call can
|
|
3273
|
+
* be chained
|
|
3274
|
+
*/
|
|
3250
3275
|
replace(key, value) {
|
|
3251
3276
|
this.content[key] = value;
|
|
3252
3277
|
return this;
|
|
3253
3278
|
}
|
|
3279
|
+
/**
|
|
3280
|
+
* Get an item from the registry
|
|
3281
|
+
*/
|
|
3254
3282
|
get(key) {
|
|
3283
|
+
/**
|
|
3284
|
+
* Note: key in {} is ~12 times slower than {}[key].
|
|
3285
|
+
* So, we check the absence of key only when the direct access returns
|
|
3286
|
+
* a falsy value. It's done to ensure that the registry can contains falsy values
|
|
3287
|
+
*/
|
|
3255
3288
|
const content = this.content[key];
|
|
3256
|
-
if (!content
|
|
3289
|
+
if (!content) {
|
|
3290
|
+
if (!(key in this.content)) throw new Error(`Cannot find ${key} in this registry!`);
|
|
3291
|
+
}
|
|
3257
3292
|
return content;
|
|
3258
3293
|
}
|
|
3294
|
+
/**
|
|
3295
|
+
* Check if the key is already in the registry
|
|
3296
|
+
*/
|
|
3259
3297
|
contains(key) {
|
|
3260
3298
|
return key in this.content;
|
|
3261
3299
|
}
|
|
3300
|
+
/**
|
|
3301
|
+
* Get a list of all elements in the registry
|
|
3302
|
+
*/
|
|
3262
3303
|
getAll() {
|
|
3263
3304
|
return Object.values(this.content);
|
|
3264
3305
|
}
|
|
3306
|
+
/**
|
|
3307
|
+
* Get a list of all keys in the registry
|
|
3308
|
+
*/
|
|
3265
3309
|
getKeys() {
|
|
3266
3310
|
return Object.keys(this.content);
|
|
3267
3311
|
}
|
|
3312
|
+
/**
|
|
3313
|
+
* Remove an item from the registry
|
|
3314
|
+
*/
|
|
3268
3315
|
remove(key) {
|
|
3269
3316
|
delete this.content[key];
|
|
3270
3317
|
}
|
|
@@ -4643,7 +4690,7 @@ function hasStringMessage(obj) {
|
|
|
4643
4690
|
//#endregion
|
|
4644
4691
|
//#region src/functions/function_registry.ts
|
|
4645
4692
|
const functionNameRegex = /^[A-Z0-9\_\.]+$/;
|
|
4646
|
-
var FunctionRegistry = class extends Registry
|
|
4693
|
+
var FunctionRegistry = class extends Registry {
|
|
4647
4694
|
mapping = {};
|
|
4648
4695
|
add(name, addDescr) {
|
|
4649
4696
|
name = name.toUpperCase();
|
|
@@ -5457,84 +5504,6 @@ function isFuncallToken(currentToken, nextToken) {
|
|
|
5457
5504
|
return nextToken?.type === "LEFT_PAREN" && functionRegex.test(currentToken.value) && currentToken.value === unquote(currentToken.value, "'");
|
|
5458
5505
|
}
|
|
5459
5506
|
|
|
5460
|
-
//#endregion
|
|
5461
|
-
//#region src/registries/registry.ts
|
|
5462
|
-
/**
|
|
5463
|
-
* Registry
|
|
5464
|
-
*
|
|
5465
|
-
* The Registry class is basically just a mapping from a string key to an object.
|
|
5466
|
-
* It is really not much more than an object. It is however useful for the
|
|
5467
|
-
* following reasons:
|
|
5468
|
-
*
|
|
5469
|
-
* 1. it let us react and execute code when someone add something to the registry
|
|
5470
|
-
* (for example, the FunctionRegistry subclass this for this purpose)
|
|
5471
|
-
* 2. it throws an error when the get operation fails
|
|
5472
|
-
* 3. it provides a chained API to add items to the registry.
|
|
5473
|
-
*/
|
|
5474
|
-
var Registry = class {
|
|
5475
|
-
content = {};
|
|
5476
|
-
/**
|
|
5477
|
-
* Add an item to the registry, you can only add if there is no item
|
|
5478
|
-
* already present in the registery with the given key
|
|
5479
|
-
*
|
|
5480
|
-
* Note that this also returns the registry, so another add method call can
|
|
5481
|
-
* be chained
|
|
5482
|
-
*/
|
|
5483
|
-
add(key, value) {
|
|
5484
|
-
if (key in this.content) throw new Error(`${key} is already present in this registry!`);
|
|
5485
|
-
return this.replace(key, value);
|
|
5486
|
-
}
|
|
5487
|
-
/**
|
|
5488
|
-
* Replace (or add) an item to the registry
|
|
5489
|
-
*
|
|
5490
|
-
* Note that this also returns the registry, so another add method call can
|
|
5491
|
-
* be chained
|
|
5492
|
-
*/
|
|
5493
|
-
replace(key, value) {
|
|
5494
|
-
this.content[key] = value;
|
|
5495
|
-
return this;
|
|
5496
|
-
}
|
|
5497
|
-
/**
|
|
5498
|
-
* Get an item from the registry
|
|
5499
|
-
*/
|
|
5500
|
-
get(key) {
|
|
5501
|
-
/**
|
|
5502
|
-
* Note: key in {} is ~12 times slower than {}[key].
|
|
5503
|
-
* So, we check the absence of key only when the direct access returns
|
|
5504
|
-
* a falsy value. It's done to ensure that the registry can contains falsy values
|
|
5505
|
-
*/
|
|
5506
|
-
const content = this.content[key];
|
|
5507
|
-
if (!content) {
|
|
5508
|
-
if (!(key in this.content)) throw new Error(`Cannot find ${key} in this registry!`);
|
|
5509
|
-
}
|
|
5510
|
-
return content;
|
|
5511
|
-
}
|
|
5512
|
-
/**
|
|
5513
|
-
* Check if the key is already in the registry
|
|
5514
|
-
*/
|
|
5515
|
-
contains(key) {
|
|
5516
|
-
return key in this.content;
|
|
5517
|
-
}
|
|
5518
|
-
/**
|
|
5519
|
-
* Get a list of all elements in the registry
|
|
5520
|
-
*/
|
|
5521
|
-
getAll() {
|
|
5522
|
-
return Object.values(this.content);
|
|
5523
|
-
}
|
|
5524
|
-
/**
|
|
5525
|
-
* Get a list of all keys in the registry
|
|
5526
|
-
*/
|
|
5527
|
-
getKeys() {
|
|
5528
|
-
return Object.keys(this.content);
|
|
5529
|
-
}
|
|
5530
|
-
/**
|
|
5531
|
-
* Remove an item from the registry
|
|
5532
|
-
*/
|
|
5533
|
-
remove(key) {
|
|
5534
|
-
delete this.content[key];
|
|
5535
|
-
}
|
|
5536
|
-
};
|
|
5537
|
-
|
|
5538
5507
|
//#endregion
|
|
5539
5508
|
//#region src/helpers/range.ts
|
|
5540
5509
|
function createRange(args, getSheetSize) {
|
|
@@ -5816,8 +5785,13 @@ function getApplyRangeChangeAddColRow(cmd) {
|
|
|
5816
5785
|
changeType: "NONE",
|
|
5817
5786
|
range
|
|
5818
5787
|
};
|
|
5788
|
+
const isUnboundedAtEnd = range.unboundedZone[end] === void 0;
|
|
5789
|
+
if (isUnboundedAtEnd && !range.unboundedZone.hasHeader) return {
|
|
5790
|
+
changeType: "RESIZE",
|
|
5791
|
+
range: createAdaptedRange(range, dimension, "RESIZE", cmd.quantity)
|
|
5792
|
+
};
|
|
5819
5793
|
if (cmd.position === "after") {
|
|
5820
|
-
if (range.zone[start] <= cmd.base && cmd.base < range.zone[end]) return {
|
|
5794
|
+
if (range.zone[start] <= cmd.base && (cmd.base < range.zone[end] || isUnboundedAtEnd)) return {
|
|
5821
5795
|
changeType: "RESIZE",
|
|
5822
5796
|
range: createAdaptedRange(range, dimension, "RESIZE", cmd.quantity)
|
|
5823
5797
|
};
|
|
@@ -6555,6 +6529,7 @@ let CellValueType = /* @__PURE__ */ function(CellValueType) {
|
|
|
6555
6529
|
//#endregion
|
|
6556
6530
|
//#region src/helpers/format/format_tokenizer.ts
|
|
6557
6531
|
function tokenizeFormat(str) {
|
|
6532
|
+
str = str.replace(/\s/g, " ");
|
|
6558
6533
|
const chars = new TokenizingChars(str);
|
|
6559
6534
|
const result = [];
|
|
6560
6535
|
let currentFormatPart = [];
|
|
@@ -7685,7 +7660,12 @@ const lockedSheetAllowedCommands = new Set([
|
|
|
7685
7660
|
"SET_ZOOM",
|
|
7686
7661
|
"UPDATE_CAROUSEL_ACTIVE_ITEM",
|
|
7687
7662
|
"DUPLICATE_PIVOT_IN_NEW_SHEET",
|
|
7688
|
-
"UPDATE_FILTER"
|
|
7663
|
+
"UPDATE_FILTER",
|
|
7664
|
+
"ACTIVATE_NEXT_SHEET",
|
|
7665
|
+
"ACTIVATE_PREVIOUS_SHEET",
|
|
7666
|
+
"SCROLL_TO_CELL",
|
|
7667
|
+
"SHIFT_VIEWPORT_DOWN",
|
|
7668
|
+
"SHIFT_VIEWPORT_UP"
|
|
7689
7669
|
]);
|
|
7690
7670
|
const coreTypes = new Set([
|
|
7691
7671
|
"UPDATE_CELL",
|
|
@@ -8758,7 +8738,7 @@ var UuidGenerator = class {
|
|
|
8758
8738
|
|
|
8759
8739
|
//#endregion
|
|
8760
8740
|
//#region src/helpers/figures/charts/chart_js_extension.ts
|
|
8761
|
-
const chartJsExtensionRegistry = new Registry
|
|
8741
|
+
const chartJsExtensionRegistry = new Registry();
|
|
8762
8742
|
function areChartJSExtensionsLoaded() {
|
|
8763
8743
|
return globalThis.Chart ? !!globalThis.Chart.registry.plugins.get("chartShowValuesPlugin") : true;
|
|
8764
8744
|
}
|
|
@@ -9118,6 +9098,10 @@ const FORCE_DEFAULT_ARGS_FUNCTIONS = {
|
|
|
9118
9098
|
ROUNDDOWN: [{
|
|
9119
9099
|
type: "NUMBER",
|
|
9120
9100
|
value: 0
|
|
9101
|
+
}],
|
|
9102
|
+
IFERROR: [{
|
|
9103
|
+
type: "NUMBER",
|
|
9104
|
+
value: 0
|
|
9121
9105
|
}]
|
|
9122
9106
|
};
|
|
9123
9107
|
/**
|
|
@@ -23265,7 +23249,7 @@ const WEEK_START = {
|
|
|
23265
23249
|
|
|
23266
23250
|
//#endregion
|
|
23267
23251
|
//#region src/migrations/migration_steps.ts
|
|
23268
|
-
const migrationStepRegistry = new Registry
|
|
23252
|
+
const migrationStepRegistry = new Registry();
|
|
23269
23253
|
migrationStepRegistry.add("0.1", { migrate(data) {
|
|
23270
23254
|
if (data.sheets && data.sheets[0]) data.activeSheet = data.sheets[0].name;
|
|
23271
23255
|
return data;
|
|
@@ -30277,11 +30261,10 @@ const INSERT_TABLE = (env) => {
|
|
|
30277
30261
|
if (interactiveCreateTable(env, env.model.getters.getActiveSheetId()).isSuccessful) env.openSidePanel("TableSidePanel", {});
|
|
30278
30262
|
};
|
|
30279
30263
|
const DELETE_SELECTED_TABLE = (env) => {
|
|
30280
|
-
const
|
|
30281
|
-
const table = env.model.getters.getTable(position);
|
|
30264
|
+
const table = env.model.getters.getFirstTableInSelection();
|
|
30282
30265
|
if (!table) return;
|
|
30283
30266
|
env.model.dispatch("REMOVE_TABLE", {
|
|
30284
|
-
sheetId:
|
|
30267
|
+
sheetId: env.model.getters.getActiveSheetId(),
|
|
30285
30268
|
target: [table.range.zone]
|
|
30286
30269
|
});
|
|
30287
30270
|
};
|
|
@@ -32874,11 +32857,12 @@ const ChartRangeDataSourceHandler = {
|
|
|
32874
32857
|
type: "range",
|
|
32875
32858
|
dataSets: [],
|
|
32876
32859
|
dataSetsHaveTitle: false,
|
|
32860
|
+
labelRange: context.auxiliaryRange,
|
|
32877
32861
|
...context.dataSource
|
|
32878
32862
|
};
|
|
32879
32863
|
},
|
|
32880
32864
|
fromHierarchicalContextCreation(context) {
|
|
32881
|
-
if (context.dataSource?.type !== "range" || context.hierarchicalDataSource
|
|
32865
|
+
if (context.dataSource?.type !== "range" || context.hierarchicalDataSource !== void 0 && context.hierarchicalDataSource.type !== "range") return {
|
|
32882
32866
|
type: "range",
|
|
32883
32867
|
dataSets: [],
|
|
32884
32868
|
dataSetsHaveTitle: false
|
|
@@ -37545,7 +37529,7 @@ function getVisiblePivotCellPositions(getters, pivotId) {
|
|
|
37545
37529
|
col,
|
|
37546
37530
|
row
|
|
37547
37531
|
};
|
|
37548
|
-
if (
|
|
37532
|
+
if (getters.getPivotIdsFromPosition(position).includes(pivotId)) positions.push(position);
|
|
37549
37533
|
}
|
|
37550
37534
|
return positions;
|
|
37551
37535
|
}
|
|
@@ -39555,7 +39539,7 @@ var SpreadsheetPivot = class {
|
|
|
39555
39539
|
|
|
39556
39540
|
//#endregion
|
|
39557
39541
|
//#region src/helpers/pivot/pivot_registry.ts
|
|
39558
|
-
const pivotRegistry = new Registry
|
|
39542
|
+
const pivotRegistry = new Registry();
|
|
39559
39543
|
const dateGranularities = [
|
|
39560
39544
|
"year",
|
|
39561
39545
|
"quarter_number",
|
|
@@ -39619,6 +39603,9 @@ const PIVOT_FUNCTIONS = [
|
|
|
39619
39603
|
function getFirstPivotFunction(compiledFormula, getters) {
|
|
39620
39604
|
return compiledFormula.getFunctionsFromTokens(PIVOT_FUNCTIONS, getters)[0];
|
|
39621
39605
|
}
|
|
39606
|
+
function getPivotFunctions(compiledFormula, getters) {
|
|
39607
|
+
return compiledFormula.getFunctionsFromTokens(PIVOT_FUNCTIONS, getters);
|
|
39608
|
+
}
|
|
39622
39609
|
/**
|
|
39623
39610
|
* Parse a spreadsheet formula and detect the number of PIVOT functions that are
|
|
39624
39611
|
* present in the given formula.
|
|
@@ -58017,6 +58004,7 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
58017
58004
|
"getFirstPivotFunction",
|
|
58018
58005
|
"getPivotCellSortDirection",
|
|
58019
58006
|
"getPivotIdFromPosition",
|
|
58007
|
+
"getPivotIdsFromPosition",
|
|
58020
58008
|
"getPivotCellFromPosition",
|
|
58021
58009
|
"generateNewCalculatedMeasureName",
|
|
58022
58010
|
"isPivotUnused",
|
|
@@ -58043,9 +58031,11 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
58043
58031
|
this.refreshPivot(cmd.id);
|
|
58044
58032
|
break;
|
|
58045
58033
|
case "ADD_PIVOT":
|
|
58034
|
+
this.unusedPivotsInFormulas?.push(cmd.pivotId);
|
|
58046
58035
|
this.setupPivot(cmd.pivotId);
|
|
58047
58036
|
break;
|
|
58048
58037
|
case "DUPLICATE_PIVOT":
|
|
58038
|
+
this.unusedPivotsInFormulas?.push(cmd.newPivotId);
|
|
58049
58039
|
this.setupPivot(cmd.newPivotId);
|
|
58050
58040
|
break;
|
|
58051
58041
|
case "UPDATE_PIVOT":
|
|
@@ -58076,37 +58066,52 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
58076
58066
|
}
|
|
58077
58067
|
}
|
|
58078
58068
|
/**
|
|
58079
|
-
* Get the id of the pivot at the given position. Returns undefined if there
|
|
58069
|
+
* Get the id of the first pivot in the formula at the given position. Returns undefined if there
|
|
58080
58070
|
* is no pivot at this position
|
|
58081
58071
|
*/
|
|
58082
58072
|
getPivotIdFromPosition(position) {
|
|
58073
|
+
return this.getPivotIdsFromPosition(position)[0];
|
|
58074
|
+
}
|
|
58075
|
+
/**
|
|
58076
|
+
* Get all of the ids of the pivot present in the formula at the given position.
|
|
58077
|
+
*/
|
|
58078
|
+
getPivotIdsFromPosition(position) {
|
|
58083
58079
|
const cell = this.getters.getCorrespondingFormulaCell(position);
|
|
58084
|
-
if (cell && cell.isFormula)
|
|
58085
|
-
|
|
58086
|
-
|
|
58087
|
-
|
|
58088
|
-
|
|
58089
|
-
|
|
58090
|
-
|
|
58080
|
+
if (cell && cell.isFormula) return this.getPivotIdsFromFormula(position.sheetId, cell.compiledFormula);
|
|
58081
|
+
return [];
|
|
58082
|
+
}
|
|
58083
|
+
getPivotIdsFromFormula(sheetId, formula) {
|
|
58084
|
+
return this.getPivotFunctions(sheetId, formula).map((pivotFunction) => {
|
|
58085
|
+
const pivotId = pivotFunction.args[0]?.toString();
|
|
58086
|
+
return pivotId && this.getters.getPivotId(pivotId);
|
|
58087
|
+
}).filter(isDefined);
|
|
58091
58088
|
}
|
|
58092
58089
|
isSpillPivotFormula(position) {
|
|
58093
58090
|
const cell = this.getters.getCorrespondingFormulaCell(position);
|
|
58094
58091
|
if (cell && cell.isFormula) return this.getFirstPivotFunction(position.sheetId, cell.compiledFormula)?.functionName === "PIVOT";
|
|
58095
58092
|
return false;
|
|
58096
58093
|
}
|
|
58097
|
-
|
|
58098
|
-
const
|
|
58099
|
-
if (!
|
|
58100
|
-
const
|
|
58101
|
-
|
|
58102
|
-
functionName,
|
|
58103
|
-
|
|
58094
|
+
getPivotFunctions(sheetId, formula) {
|
|
58095
|
+
const pivotFunctions = getPivotFunctions(formula, this.getters);
|
|
58096
|
+
if (!pivotFunctions.length) return [];
|
|
58097
|
+
const evaluatedPivotFunctions = [];
|
|
58098
|
+
for (const pivotFunction of pivotFunctions) {
|
|
58099
|
+
const { functionName, args } = pivotFunction;
|
|
58100
|
+
const evaluatedArgs = args.map((argAst) => {
|
|
58104
58101
|
if (argAst.type === "EMPTY") return;
|
|
58105
58102
|
else if (argAst.type === "STRING" || argAst.type === "BOOLEAN" || argAst.type === "NUMBER") return argAst.value;
|
|
58106
58103
|
const argsString = astToFormula(argAst);
|
|
58107
58104
|
return this.getters.evaluateFormula(sheetId, argsString);
|
|
58108
|
-
})
|
|
58109
|
-
|
|
58105
|
+
});
|
|
58106
|
+
evaluatedPivotFunctions.push({
|
|
58107
|
+
functionName,
|
|
58108
|
+
args: evaluatedArgs
|
|
58109
|
+
});
|
|
58110
|
+
}
|
|
58111
|
+
return evaluatedPivotFunctions;
|
|
58112
|
+
}
|
|
58113
|
+
getFirstPivotFunction(sheetId, formula) {
|
|
58114
|
+
return this.getPivotFunctions(sheetId, formula)[0];
|
|
58110
58115
|
}
|
|
58111
58116
|
/**
|
|
58112
58117
|
* Returns the domain args of a pivot formula from a position.
|
|
@@ -58212,8 +58217,8 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
58212
58217
|
const unusedPivots = new Set(this.getters.getPivotIds());
|
|
58213
58218
|
for (const sheetId of this.getters.getSheetIds()) for (const cell of this.getters.getCells(sheetId)) {
|
|
58214
58219
|
const position = this.getters.getCellPosition(cell.id);
|
|
58215
|
-
const
|
|
58216
|
-
|
|
58220
|
+
const pivotIds = this.getPivotIdsFromPosition(position);
|
|
58221
|
+
for (const pivotId of pivotIds) {
|
|
58217
58222
|
unusedPivots.delete(pivotId);
|
|
58218
58223
|
if (!unusedPivots.size) {
|
|
58219
58224
|
this.unusedPivotsInFormulas = [];
|
|
@@ -58221,6 +58226,21 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
58221
58226
|
}
|
|
58222
58227
|
}
|
|
58223
58228
|
}
|
|
58229
|
+
for (const pivotId of this.getters.getPivotIds()) {
|
|
58230
|
+
const pivot = this.getters.getPivotCoreDefinition(pivotId);
|
|
58231
|
+
for (const measure of pivot.measures) if (measure.computedBy) {
|
|
58232
|
+
const { sheetId } = measure.computedBy;
|
|
58233
|
+
const formula = this.getters.getMeasureCompiledFormula(pivotId, measure);
|
|
58234
|
+
const relatedPivotIds = this.getPivotIdsFromFormula(sheetId, formula);
|
|
58235
|
+
for (const relatedPivotId of relatedPivotIds) {
|
|
58236
|
+
unusedPivots.delete(relatedPivotId);
|
|
58237
|
+
if (!unusedPivots.size) {
|
|
58238
|
+
this.unusedPivotsInFormulas = [];
|
|
58239
|
+
return [];
|
|
58240
|
+
}
|
|
58241
|
+
}
|
|
58242
|
+
}
|
|
58243
|
+
}
|
|
58224
58244
|
this.unusedPivotsInFormulas = [...unusedPivots];
|
|
58225
58245
|
return this.unusedPivotsInFormulas;
|
|
58226
58246
|
}
|
|
@@ -59970,7 +59990,8 @@ const invalidateTableStyleCommandsSet = new Set([
|
|
|
59970
59990
|
"REMOVE_TABLE",
|
|
59971
59991
|
"RESIZE_TABLE",
|
|
59972
59992
|
"CREATE_TABLE_STYLE",
|
|
59973
|
-
"REMOVE_TABLE_STYLE"
|
|
59993
|
+
"REMOVE_TABLE_STYLE",
|
|
59994
|
+
"DELETE_CONTENT"
|
|
59974
59995
|
]);
|
|
59975
59996
|
function doesCommandInvalidatesTableStyle(cmd) {
|
|
59976
59997
|
return invalidateTableStyleCommandsSet.has(cmd.type);
|
|
@@ -65665,10 +65686,10 @@ var SheetViewPlugin = class extends UIPlugin {
|
|
|
65665
65686
|
|
|
65666
65687
|
//#endregion
|
|
65667
65688
|
//#region src/plugins/index.ts
|
|
65668
|
-
const corePluginRegistry = new Registry
|
|
65669
|
-
const featurePluginRegistry = new Registry
|
|
65670
|
-
const statefulUIPluginRegistry = new Registry
|
|
65671
|
-
const coreViewsPluginRegistry = new Registry
|
|
65689
|
+
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);
|
|
65690
|
+
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);
|
|
65691
|
+
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);
|
|
65692
|
+
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);
|
|
65672
65693
|
|
|
65673
65694
|
//#endregion
|
|
65674
65695
|
//#region src/registries/auto_completes/data_validation_auto_complete.ts
|
|
@@ -72466,6 +72487,11 @@ function lineAttributes(params) {
|
|
|
72466
72487
|
`;
|
|
72467
72488
|
}
|
|
72468
72489
|
function insertText(text, fontColor = "000000", fontsize = 16, style = {}) {
|
|
72490
|
+
const textProperties = [
|
|
72491
|
+
["b", style.bold ? "1" : "0"],
|
|
72492
|
+
["i", style.italic ? "1" : "0"],
|
|
72493
|
+
["sz", fontsize * 100]
|
|
72494
|
+
];
|
|
72469
72495
|
return escapeXml`
|
|
72470
72496
|
<c:tx>
|
|
72471
72497
|
<c:rich>
|
|
@@ -72473,13 +72499,13 @@ function insertText(text, fontColor = "000000", fontsize = 16, style = {}) {
|
|
|
72473
72499
|
<a:lstStyle />
|
|
72474
72500
|
<a:p>
|
|
72475
72501
|
<a:pPr lvl="0">
|
|
72476
|
-
<a:defRPr
|
|
72502
|
+
<a:defRPr ${formatAttributes(textProperties)}>
|
|
72477
72503
|
${solidFill(fontColor)}
|
|
72478
72504
|
<a:latin typeface="+mn-lt"/>
|
|
72479
72505
|
</a:defRPr>
|
|
72480
72506
|
</a:pPr>
|
|
72481
72507
|
<a:r> <!-- Runs -->
|
|
72482
|
-
<a:rPr
|
|
72508
|
+
<a:rPr ${formatAttributes(textProperties)}/>
|
|
72483
72509
|
<a:t>${text}</a:t>
|
|
72484
72510
|
</a:r>
|
|
72485
72511
|
</a:p>
|
|
@@ -84687,6 +84713,6 @@ exports.stores = stores;
|
|
|
84687
84713
|
exports.tokenColors = tokenColors;
|
|
84688
84714
|
exports.tokenize = tokenize;
|
|
84689
84715
|
|
|
84690
|
-
__info__.version = "19.3.
|
|
84691
|
-
__info__.date = "2026-
|
|
84692
|
-
__info__.hash = "
|
|
84716
|
+
__info__.version = "19.3.6";
|
|
84717
|
+
__info__.date = "2026-06-06T06:24:22.727Z";
|
|
84718
|
+
__info__.hash = "0fe939b";
|
package/dist/o_spreadsheet.css
CHANGED
|
@@ -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:24.503Z
|
|
7
|
+
* @hash 0fe939b
|
|
8
8
|
*/
|
|
9
9
|
:root {
|
|
10
10
|
--os-gray-100: light-dark(#f9fafb, #1b1d26);
|