@odoo/o-spreadsheet 18.4.39 → 18.4.42
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 +175 -30
- package/dist/o_spreadsheet.css +3 -3
- package/dist/o_spreadsheet.esm.js +175 -30
- package/dist/o_spreadsheet.iife.js +175 -30
- package/dist/o_spreadsheet.iife.min.js +220 -220
- package/dist/o_spreadsheet.xml +6 -5
- package/package.json +17 -17
|
@@ -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 18.4.
|
|
6
|
-
* @date 2026-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.4.42
|
|
6
|
+
* @date 2026-06-06T06:21:28.088Z
|
|
7
|
+
* @hash bae6e25
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function(exports, _odoo_owl) {
|
|
@@ -1384,6 +1384,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1384
1384
|
else return ALTERNATING_COLORS_XL;
|
|
1385
1385
|
}
|
|
1386
1386
|
var ColorGenerator = class {
|
|
1387
|
+
preferredColors;
|
|
1387
1388
|
currentColorIndex = 0;
|
|
1388
1389
|
palette;
|
|
1389
1390
|
constructor(paletteSize, preferredColors = []) {
|
|
@@ -1591,6 +1592,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1591
1592
|
return sprintf(_translate(s), ...values);
|
|
1592
1593
|
};
|
|
1593
1594
|
var LazyTranslatedString = class extends String {
|
|
1595
|
+
values;
|
|
1594
1596
|
constructor(str, values) {
|
|
1595
1597
|
super(str);
|
|
1596
1598
|
this.values = values;
|
|
@@ -2726,6 +2728,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2726
2728
|
};
|
|
2727
2729
|
const errorTypes = new Set(Object.values(CellErrorType));
|
|
2728
2730
|
var EvaluationError = class {
|
|
2731
|
+
message;
|
|
2732
|
+
value;
|
|
2729
2733
|
constructor(message = _t("Error"), value = CellErrorType.GenericError) {
|
|
2730
2734
|
this.message = message;
|
|
2731
2735
|
this.value = value;
|
|
@@ -2758,6 +2762,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2758
2762
|
}
|
|
2759
2763
|
};
|
|
2760
2764
|
var SplillBlockedError = class extends EvaluationError {
|
|
2765
|
+
errorOriginPosition;
|
|
2761
2766
|
constructor(message = _t("Spill range is not empty"), errorOriginPosition) {
|
|
2762
2767
|
super(message, CellErrorType.SpilledBlocked);
|
|
2763
2768
|
this.errorOriginPosition = errorOriginPosition;
|
|
@@ -3397,6 +3402,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
3397
3402
|
//#endregion
|
|
3398
3403
|
//#region src/helpers/format/format_tokenizer.ts
|
|
3399
3404
|
function tokenizeFormat(str) {
|
|
3405
|
+
str = str.replace(/\s/g, " ");
|
|
3400
3406
|
const chars = new TokenizingChars(str);
|
|
3401
3407
|
const result = [];
|
|
3402
3408
|
let currentFormatPart = [];
|
|
@@ -5659,8 +5665,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5659
5665
|
changeType: "NONE",
|
|
5660
5666
|
range
|
|
5661
5667
|
};
|
|
5668
|
+
const isUnboundedAtEnd = range.unboundedZone[end] === void 0;
|
|
5669
|
+
if (isUnboundedAtEnd && !range.unboundedZone.hasHeader) return {
|
|
5670
|
+
changeType: "RESIZE",
|
|
5671
|
+
range: createAdaptedRange(range, dimension, "RESIZE", cmd.quantity)
|
|
5672
|
+
};
|
|
5662
5673
|
if (cmd.position === "after") {
|
|
5663
|
-
if (range.zone[start] <= cmd.base && cmd.base < range.zone[end]) return {
|
|
5674
|
+
if (range.zone[start] <= cmd.base && (cmd.base < range.zone[end] || isUnboundedAtEnd)) return {
|
|
5664
5675
|
changeType: "RESIZE",
|
|
5665
5676
|
range: createAdaptedRange(range, dimension, "RESIZE", cmd.quantity)
|
|
5666
5677
|
};
|
|
@@ -6300,6 +6311,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
6300
6311
|
//#endregion
|
|
6301
6312
|
//#region src/clipboard_handlers/abstract_clipboard_handler.ts
|
|
6302
6313
|
var ClipboardHandler = class {
|
|
6314
|
+
getters;
|
|
6315
|
+
dispatch;
|
|
6303
6316
|
constructor(getters, dispatch) {
|
|
6304
6317
|
this.getters = getters;
|
|
6305
6318
|
this.dispatch = dispatch;
|
|
@@ -8573,6 +8586,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
8573
8586
|
}
|
|
8574
8587
|
};
|
|
8575
8588
|
var StoreFactory = class {
|
|
8589
|
+
get;
|
|
8576
8590
|
pendingBuilds = /* @__PURE__ */ new Set();
|
|
8577
8591
|
constructor(get) {
|
|
8578
8592
|
this.get = get;
|
|
@@ -8617,6 +8631,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
8617
8631
|
return MetaStore;
|
|
8618
8632
|
}
|
|
8619
8633
|
var DisposableStore = class {
|
|
8634
|
+
get;
|
|
8620
8635
|
disposeCallbacks = [];
|
|
8621
8636
|
constructor(get) {
|
|
8622
8637
|
this.get = get;
|
|
@@ -9190,6 +9205,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
9190
9205
|
ROUNDDOWN: [{
|
|
9191
9206
|
type: "NUMBER",
|
|
9192
9207
|
value: 0
|
|
9208
|
+
}],
|
|
9209
|
+
IFERROR: [{
|
|
9210
|
+
type: "NUMBER",
|
|
9211
|
+
value: 0
|
|
9193
9212
|
}]
|
|
9194
9213
|
};
|
|
9195
9214
|
/**
|
|
@@ -17232,6 +17251,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
17232
17251
|
//#endregion
|
|
17233
17252
|
//#region src/formulas/code_builder.ts
|
|
17234
17253
|
var FunctionCodeBuilder = class {
|
|
17254
|
+
scope;
|
|
17235
17255
|
code = "";
|
|
17236
17256
|
constructor(scope = new Scope()) {
|
|
17237
17257
|
this.scope = scope;
|
|
@@ -17247,6 +17267,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
17247
17267
|
}
|
|
17248
17268
|
};
|
|
17249
17269
|
var FunctionCodeImpl = class {
|
|
17270
|
+
scope;
|
|
17271
|
+
returnExpression;
|
|
17250
17272
|
code;
|
|
17251
17273
|
constructor(scope, code, returnExpression) {
|
|
17252
17274
|
this.scope = scope;
|
|
@@ -19198,6 +19220,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
19198
19220
|
}, runtime).computeDesign();
|
|
19199
19221
|
}
|
|
19200
19222
|
var ScorecardChartConfigBuilder = class {
|
|
19223
|
+
runtime;
|
|
19201
19224
|
context;
|
|
19202
19225
|
width;
|
|
19203
19226
|
height;
|
|
@@ -22546,6 +22569,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
22546
22569
|
* Animation interpolating values using the ease-out quartic curve function (chartJS default easing)
|
|
22547
22570
|
*/
|
|
22548
22571
|
var Animation = class {
|
|
22572
|
+
startValue;
|
|
22573
|
+
endValue;
|
|
22574
|
+
duration;
|
|
22575
|
+
callback;
|
|
22549
22576
|
startTime = void 0;
|
|
22550
22577
|
animationFrameId = null;
|
|
22551
22578
|
constructor(startValue, endValue, duration, callback) {
|
|
@@ -24905,6 +24932,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
24905
24932
|
* Represent a raw XML string
|
|
24906
24933
|
*/
|
|
24907
24934
|
var XMLString = class {
|
|
24935
|
+
xmlString;
|
|
24908
24936
|
/**
|
|
24909
24937
|
* @param xmlString should be a well formed, properly escaped XML string
|
|
24910
24938
|
*/
|
|
@@ -25626,6 +25654,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
25626
25654
|
}
|
|
25627
25655
|
};
|
|
25628
25656
|
var PopoverPositionContext = class {
|
|
25657
|
+
anchorRect;
|
|
25658
|
+
containerRect;
|
|
25659
|
+
propsMaxSize;
|
|
25660
|
+
spreadsheetOffset;
|
|
25661
|
+
lastPosition;
|
|
25629
25662
|
constructor(anchorRect, containerRect, propsMaxSize, spreadsheetOffset, lastPosition) {
|
|
25630
25663
|
this.anchorRect = anchorRect;
|
|
25631
25664
|
this.containerRect = containerRect;
|
|
@@ -28841,6 +28874,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
28841
28874
|
//#endregion
|
|
28842
28875
|
//#region src/components/composer/standalone_composer/standalone_composer_store.ts
|
|
28843
28876
|
var StandaloneComposerStore = class extends AbstractComposerStore {
|
|
28877
|
+
args;
|
|
28844
28878
|
constructor(get, args) {
|
|
28845
28879
|
super(get);
|
|
28846
28880
|
this.args = args;
|
|
@@ -29896,6 +29930,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29896
29930
|
}
|
|
29897
29931
|
};
|
|
29898
29932
|
var ContainerWrapper = class {
|
|
29933
|
+
el;
|
|
29899
29934
|
constructor(el) {
|
|
29900
29935
|
this.el = el;
|
|
29901
29936
|
}
|
|
@@ -29967,6 +30002,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29967
30002
|
* This plugin handles this internal state.
|
|
29968
30003
|
*/
|
|
29969
30004
|
var SelectionInputStore = class extends SpreadsheetStore {
|
|
30005
|
+
initialRanges;
|
|
30006
|
+
inputHasSingleRange;
|
|
30007
|
+
colors;
|
|
30008
|
+
disabledRanges;
|
|
29970
30009
|
mutators = [
|
|
29971
30010
|
"resetWithRanges",
|
|
29972
30011
|
"focusById",
|
|
@@ -37023,11 +37062,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
37023
37062
|
if (interactiveCreateTable(env, env.model.getters.getActiveSheetId()).isSuccessful) env.openSidePanel("TableSidePanel", {});
|
|
37024
37063
|
};
|
|
37025
37064
|
const DELETE_SELECTED_TABLE = (env) => {
|
|
37026
|
-
const
|
|
37027
|
-
const table = env.model.getters.getTable(position);
|
|
37065
|
+
const table = env.model.getters.getFirstTableInSelection();
|
|
37028
37066
|
if (!table) return;
|
|
37029
37067
|
env.model.dispatch("REMOVE_TABLE", {
|
|
37030
|
-
sheetId:
|
|
37068
|
+
sheetId: env.model.getters.getActiveSheetId(),
|
|
37031
37069
|
target: [table.range.zone]
|
|
37032
37070
|
});
|
|
37033
37071
|
};
|
|
@@ -47502,6 +47540,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
47502
47540
|
//#endregion
|
|
47503
47541
|
//#region src/components/side_panel/pivot/pivot_measure_display_panel/pivot_measure_display_panel_store.ts
|
|
47504
47542
|
var PivotMeasureDisplayPanelStore = class extends SpreadsheetStore {
|
|
47543
|
+
pivotId;
|
|
47544
|
+
initialMeasure;
|
|
47505
47545
|
mutators = [
|
|
47506
47546
|
"cancelMeasureDisplayEdition",
|
|
47507
47547
|
"updateMeasureDisplayType",
|
|
@@ -47701,7 +47741,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
47701
47741
|
col,
|
|
47702
47742
|
row
|
|
47703
47743
|
};
|
|
47704
|
-
if (
|
|
47744
|
+
if (getters.getPivotIdsFromPosition(position).includes(pivotId)) positions.push(position);
|
|
47705
47745
|
}
|
|
47706
47746
|
return positions;
|
|
47707
47747
|
}
|
|
@@ -48626,6 +48666,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
48626
48666
|
function getFirstPivotFunction(tokens) {
|
|
48627
48667
|
return getFunctionsFromTokens(tokens, PIVOT_FUNCTIONS)[0];
|
|
48628
48668
|
}
|
|
48669
|
+
function getPivotFunctions(tokens) {
|
|
48670
|
+
return getFunctionsFromTokens(tokens, PIVOT_FUNCTIONS);
|
|
48671
|
+
}
|
|
48629
48672
|
/**
|
|
48630
48673
|
* Parse a spreadsheet formula and detect the number of PIVOT functions that are
|
|
48631
48674
|
* present in the given formula.
|
|
@@ -48675,13 +48718,30 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
48675
48718
|
} : fields[fieldName];
|
|
48676
48719
|
const aggregator = measure.aggregator;
|
|
48677
48720
|
return {
|
|
48721
|
+
/**
|
|
48722
|
+
* Get the id of the measure, as it is stored in the pivot formula
|
|
48723
|
+
*/
|
|
48678
48724
|
id: measure.id,
|
|
48725
|
+
/**
|
|
48726
|
+
* Display name of the measure
|
|
48727
|
+
* e.g. "__count" -> "Count", "amount_total" -> "Total Amount"
|
|
48728
|
+
*/
|
|
48679
48729
|
get displayName() {
|
|
48680
48730
|
return measure.userDefinedName ?? field?.string ?? measure.fieldName;
|
|
48681
48731
|
},
|
|
48682
48732
|
userDefinedName: measure.userDefinedName,
|
|
48733
|
+
/**
|
|
48734
|
+
* Get the name of the field of the measure
|
|
48735
|
+
*/
|
|
48683
48736
|
fieldName,
|
|
48737
|
+
/**
|
|
48738
|
+
* Get the aggregator of the measure
|
|
48739
|
+
*/
|
|
48684
48740
|
aggregator,
|
|
48741
|
+
/**
|
|
48742
|
+
* Get the type of the measure field
|
|
48743
|
+
* e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
|
|
48744
|
+
*/
|
|
48685
48745
|
type: fieldName === "__count" ? "integer" : field?.type ?? "integer",
|
|
48686
48746
|
isValid: !!(field || measure.computedBy),
|
|
48687
48747
|
isHidden: measure.isHidden,
|
|
@@ -48695,10 +48755,30 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
48695
48755
|
const type = field?.type ?? "integer";
|
|
48696
48756
|
const granularity = field && isDateOrDatetimeField(field) ? dimension.granularity : void 0;
|
|
48697
48757
|
return {
|
|
48758
|
+
/**
|
|
48759
|
+
* Get the display name of the dimension
|
|
48760
|
+
* e.g. "stage_id" -> "Stage", "create_date:month" -> "Create Date"
|
|
48761
|
+
*/
|
|
48698
48762
|
displayName: field?.string ?? dimension.fieldName,
|
|
48763
|
+
/**
|
|
48764
|
+
* Get the name of the dimension, as it is stored in the pivot formula
|
|
48765
|
+
* e.g. "stage_id", "create_date:month"
|
|
48766
|
+
*/
|
|
48699
48767
|
nameWithGranularity: dimension.fieldName + (granularity ? `:${granularity}` : ""),
|
|
48768
|
+
/**
|
|
48769
|
+
* Get the name of the field of the dimension
|
|
48770
|
+
* e.g. "stage_id" -> "stage_id", "create_date:month" -> "create_date"
|
|
48771
|
+
*/
|
|
48700
48772
|
fieldName: dimension.fieldName,
|
|
48773
|
+
/**
|
|
48774
|
+
* Get the aggregate operator of the dimension
|
|
48775
|
+
* e.g. "stage_id" -> undefined, "create_date:month" -> "month"
|
|
48776
|
+
*/
|
|
48701
48777
|
granularity,
|
|
48778
|
+
/**
|
|
48779
|
+
* Get the type of the field of the dimension
|
|
48780
|
+
* e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
|
|
48781
|
+
*/
|
|
48702
48782
|
type,
|
|
48703
48783
|
order: dimension.order,
|
|
48704
48784
|
isValid: !!field
|
|
@@ -49775,6 +49855,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
49775
49855
|
//#endregion
|
|
49776
49856
|
//#region src/components/side_panel/pivot/pivot_side_panel/pivot_side_panel_store.ts
|
|
49777
49857
|
var PivotSidePanelStore = class extends SpreadsheetStore {
|
|
49858
|
+
pivotId;
|
|
49778
49859
|
mutators = [
|
|
49779
49860
|
"reset",
|
|
49780
49861
|
"deferUpdates",
|
|
@@ -53331,6 +53412,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
53331
53412
|
}
|
|
53332
53413
|
};
|
|
53333
53414
|
var FormulaCellWithDependencies = class {
|
|
53415
|
+
id;
|
|
53416
|
+
format;
|
|
53417
|
+
style;
|
|
53418
|
+
sheetId;
|
|
53419
|
+
getRangeString;
|
|
53334
53420
|
isFormula = true;
|
|
53335
53421
|
compiledFormula;
|
|
53336
53422
|
constructor(id, compiledFormula, format, style, dependencies, sheetId, getRangeString) {
|
|
@@ -53365,6 +53451,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
53365
53451
|
}
|
|
53366
53452
|
};
|
|
53367
53453
|
var RangeReferenceToken = class {
|
|
53454
|
+
ranges;
|
|
53455
|
+
rangeIndex;
|
|
53456
|
+
sheetId;
|
|
53457
|
+
getRangeString;
|
|
53368
53458
|
type = "REFERENCE";
|
|
53369
53459
|
constructor(ranges, rangeIndex, sheetId, getRangeString) {
|
|
53370
53460
|
this.ranges = ranges;
|
|
@@ -57150,6 +57240,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57150
57240
|
return new CompilationParametersBuilder(context, getters, computeCell).getParameters();
|
|
57151
57241
|
}
|
|
57152
57242
|
var CompilationParametersBuilder = class {
|
|
57243
|
+
getters;
|
|
57244
|
+
computeCell;
|
|
57153
57245
|
evalContext;
|
|
57154
57246
|
rangeCache = {};
|
|
57155
57247
|
constructor(context, getters, computeCell) {
|
|
@@ -57603,6 +57695,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57603
57695
|
* It uses an R-Tree data structure to efficiently find dependent cells.
|
|
57604
57696
|
*/
|
|
57605
57697
|
var FormulaDependencyGraph = class {
|
|
57698
|
+
createEmptyPositionSet;
|
|
57606
57699
|
dependencies = new PositionMap();
|
|
57607
57700
|
rTree;
|
|
57608
57701
|
constructor(createEmptyPositionSet, data = []) {
|
|
@@ -57904,6 +57997,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57904
57997
|
const ERROR_CYCLE_CELL = Object.freeze(createEvaluatedCell(new CircularDependencyError()));
|
|
57905
57998
|
const EMPTY_CELL = Object.freeze(createEvaluatedCell({ value: null }));
|
|
57906
57999
|
var Evaluator = class {
|
|
58000
|
+
context;
|
|
57907
58001
|
getters;
|
|
57908
58002
|
compilationParams;
|
|
57909
58003
|
evaluatedCells = new PositionMap();
|
|
@@ -60159,6 +60253,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
60159
60253
|
"getPivot",
|
|
60160
60254
|
"getFirstPivotFunction",
|
|
60161
60255
|
"getPivotIdFromPosition",
|
|
60256
|
+
"getPivotIdsFromPosition",
|
|
60162
60257
|
"getPivotCellFromPosition",
|
|
60163
60258
|
"generateNewCalculatedMeasureName",
|
|
60164
60259
|
"isPivotUnused",
|
|
@@ -60183,9 +60278,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
60183
60278
|
this.refreshPivot(cmd.id);
|
|
60184
60279
|
break;
|
|
60185
60280
|
case "ADD_PIVOT":
|
|
60281
|
+
this.unusedPivots?.push(cmd.pivotId);
|
|
60186
60282
|
this.setupPivot(cmd.pivotId);
|
|
60187
60283
|
break;
|
|
60188
60284
|
case "DUPLICATE_PIVOT":
|
|
60285
|
+
this.unusedPivots?.push(cmd.newPivotId);
|
|
60189
60286
|
this.setupPivot(cmd.newPivotId);
|
|
60190
60287
|
break;
|
|
60191
60288
|
case "UPDATE_PIVOT":
|
|
@@ -60216,37 +60313,52 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
60216
60313
|
}
|
|
60217
60314
|
}
|
|
60218
60315
|
/**
|
|
60219
|
-
* Get the id of the pivot at the given position. Returns undefined if there
|
|
60316
|
+
* Get the id of the first pivot in the formula at the given position. Returns undefined if there
|
|
60220
60317
|
* is no pivot at this position
|
|
60221
60318
|
*/
|
|
60222
60319
|
getPivotIdFromPosition(position) {
|
|
60320
|
+
return this.getPivotIdsFromPosition(position)[0];
|
|
60321
|
+
}
|
|
60322
|
+
/**
|
|
60323
|
+
* Get all of the ids of the pivot present in the formula at the given position.
|
|
60324
|
+
*/
|
|
60325
|
+
getPivotIdsFromPosition(position) {
|
|
60223
60326
|
const cell = this.getters.getCorrespondingFormulaCell(position);
|
|
60224
|
-
if (cell && cell.isFormula)
|
|
60225
|
-
|
|
60226
|
-
|
|
60227
|
-
|
|
60228
|
-
|
|
60229
|
-
|
|
60230
|
-
|
|
60327
|
+
if (cell && cell.isFormula) return this.getPivotIdsFromFormula(position.sheetId, cell.compiledFormula);
|
|
60328
|
+
return [];
|
|
60329
|
+
}
|
|
60330
|
+
getPivotIdsFromFormula(sheetId, formula) {
|
|
60331
|
+
return this.getPivotFunctions(sheetId, formula.tokens).map((pivotFunction) => {
|
|
60332
|
+
const pivotId = pivotFunction.args[0]?.toString();
|
|
60333
|
+
return pivotId && this.getters.getPivotId(pivotId);
|
|
60334
|
+
}).filter(isDefined);
|
|
60231
60335
|
}
|
|
60232
60336
|
isSpillPivotFormula(position) {
|
|
60233
60337
|
const cell = this.getters.getCorrespondingFormulaCell(position);
|
|
60234
60338
|
if (cell && cell.isFormula) return this.getFirstPivotFunction(position.sheetId, cell.compiledFormula.tokens)?.functionName === "PIVOT";
|
|
60235
60339
|
return false;
|
|
60236
60340
|
}
|
|
60237
|
-
|
|
60238
|
-
const
|
|
60239
|
-
if (!
|
|
60240
|
-
const
|
|
60241
|
-
|
|
60242
|
-
functionName,
|
|
60243
|
-
|
|
60341
|
+
getPivotFunctions(sheetId, tokens) {
|
|
60342
|
+
const pivotFunctions = getPivotFunctions(tokens);
|
|
60343
|
+
if (!pivotFunctions.length) return [];
|
|
60344
|
+
const evaluatedPivotFunctions = [];
|
|
60345
|
+
for (const pivotFunction of pivotFunctions) {
|
|
60346
|
+
const { functionName, args } = pivotFunction;
|
|
60347
|
+
const evaluatedArgs = args.map((argAst) => {
|
|
60244
60348
|
if (argAst.type === "EMPTY") return;
|
|
60245
60349
|
else if (argAst.type === "STRING" || argAst.type === "BOOLEAN" || argAst.type === "NUMBER") return argAst.value;
|
|
60246
60350
|
const argsString = astToFormula(argAst);
|
|
60247
60351
|
return this.getters.evaluateFormula(sheetId, argsString);
|
|
60248
|
-
})
|
|
60249
|
-
|
|
60352
|
+
});
|
|
60353
|
+
evaluatedPivotFunctions.push({
|
|
60354
|
+
functionName,
|
|
60355
|
+
args: evaluatedArgs
|
|
60356
|
+
});
|
|
60357
|
+
}
|
|
60358
|
+
return evaluatedPivotFunctions;
|
|
60359
|
+
}
|
|
60360
|
+
getFirstPivotFunction(sheetId, tokens) {
|
|
60361
|
+
return this.getPivotFunctions(sheetId, tokens)[0];
|
|
60250
60362
|
}
|
|
60251
60363
|
/**
|
|
60252
60364
|
* Returns the domain args of a pivot formula from a position.
|
|
@@ -60350,8 +60462,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
60350
60462
|
const unusedPivots = new Set(this.getters.getPivotIds());
|
|
60351
60463
|
for (const sheetId of this.getters.getSheetIds()) for (const cellId in this.getters.getCells(sheetId)) {
|
|
60352
60464
|
const position = this.getters.getCellPosition(cellId);
|
|
60353
|
-
const
|
|
60354
|
-
|
|
60465
|
+
const pivotIds = this.getPivotIdsFromPosition(position);
|
|
60466
|
+
for (const pivotId of pivotIds) {
|
|
60355
60467
|
unusedPivots.delete(pivotId);
|
|
60356
60468
|
if (!unusedPivots.size) {
|
|
60357
60469
|
this.unusedPivots = [];
|
|
@@ -60359,6 +60471,21 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
60359
60471
|
}
|
|
60360
60472
|
}
|
|
60361
60473
|
}
|
|
60474
|
+
for (const pivotId of this.getters.getPivotIds()) {
|
|
60475
|
+
const pivot = this.getters.getPivotCoreDefinition(pivotId);
|
|
60476
|
+
for (const measure of pivot.measures) if (measure.computedBy) {
|
|
60477
|
+
const { sheetId } = measure.computedBy;
|
|
60478
|
+
const formula = this.getters.getMeasureCompiledFormula(pivotId, measure);
|
|
60479
|
+
const relatedPivotIds = this.getPivotIdsFromFormula(sheetId, formula);
|
|
60480
|
+
for (const relatedPivotId of relatedPivotIds) {
|
|
60481
|
+
unusedPivots.delete(relatedPivotId);
|
|
60482
|
+
if (!unusedPivots.size) {
|
|
60483
|
+
this.unusedPivots = [];
|
|
60484
|
+
return [];
|
|
60485
|
+
}
|
|
60486
|
+
}
|
|
60487
|
+
}
|
|
60488
|
+
}
|
|
60362
60489
|
this.unusedPivots = [...unusedPivots];
|
|
60363
60490
|
return this.unusedPivots;
|
|
60364
60491
|
}
|
|
@@ -61959,6 +62086,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
61959
62086
|
//#endregion
|
|
61960
62087
|
//#region src/collaborative/revisions.ts
|
|
61961
62088
|
var Revision = class {
|
|
62089
|
+
rootCommand;
|
|
62090
|
+
timestamp;
|
|
61962
62091
|
id;
|
|
61963
62092
|
clientId;
|
|
61964
62093
|
_commands = [];
|
|
@@ -61995,6 +62124,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
61995
62124
|
//#region src/collaborative/session.ts
|
|
61996
62125
|
var ClientDisconnectedError = class extends Error {};
|
|
61997
62126
|
var Session = class extends EventBus {
|
|
62127
|
+
revisions;
|
|
62128
|
+
transportService;
|
|
62129
|
+
serverRevisionId;
|
|
61998
62130
|
/**
|
|
61999
62131
|
* Positions of the others client.
|
|
62000
62132
|
*/
|
|
@@ -65681,6 +65813,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
65681
65813
|
//#endregion
|
|
65682
65814
|
//#region src/helpers/internal_viewport.ts
|
|
65683
65815
|
var InternalViewport = class {
|
|
65816
|
+
getters;
|
|
65817
|
+
sheetId;
|
|
65818
|
+
boundaries;
|
|
65684
65819
|
top;
|
|
65685
65820
|
bottom;
|
|
65686
65821
|
left;
|
|
@@ -70610,6 +70745,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
70610
70745
|
return new WebClipboardWrapper(navigator.clipboard);
|
|
70611
70746
|
}
|
|
70612
70747
|
var WebClipboardWrapper = class {
|
|
70748
|
+
clipboard;
|
|
70613
70749
|
constructor(clipboard) {
|
|
70614
70750
|
this.clipboard = clipboard;
|
|
70615
70751
|
}
|
|
@@ -71110,6 +71246,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
71110
71246
|
* @param operations initial operations
|
|
71111
71247
|
*/
|
|
71112
71248
|
var Branch = class Branch {
|
|
71249
|
+
buildTransformation;
|
|
71250
|
+
operations;
|
|
71113
71251
|
constructor(buildTransformation, operations = []) {
|
|
71114
71252
|
this.buildTransformation = buildTransformation;
|
|
71115
71253
|
this.operations = operations;
|
|
@@ -71226,6 +71364,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
71226
71364
|
* to revert it).
|
|
71227
71365
|
*/
|
|
71228
71366
|
var Operation = class {
|
|
71367
|
+
id;
|
|
71368
|
+
data;
|
|
71229
71369
|
constructor(id, data) {
|
|
71230
71370
|
this.id = id;
|
|
71231
71371
|
this.data = data;
|
|
@@ -71235,6 +71375,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
71235
71375
|
}
|
|
71236
71376
|
};
|
|
71237
71377
|
var LazyOperation = class LazyOperation {
|
|
71378
|
+
id;
|
|
71379
|
+
lazyData;
|
|
71238
71380
|
constructor(id, lazyData) {
|
|
71239
71381
|
this.id = id;
|
|
71240
71382
|
this.lazyData = lazyData;
|
|
@@ -71260,6 +71402,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
71260
71402
|
* ```
|
|
71261
71403
|
*/
|
|
71262
71404
|
var OperationSequence = class OperationSequence {
|
|
71405
|
+
operations;
|
|
71263
71406
|
constructor(operations) {
|
|
71264
71407
|
this.operations = operations;
|
|
71265
71408
|
}
|
|
@@ -71335,6 +71478,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
71335
71478
|
*
|
|
71336
71479
|
*/
|
|
71337
71480
|
var Tree = class {
|
|
71481
|
+
buildTransformation;
|
|
71338
71482
|
branches;
|
|
71339
71483
|
branchingOperationIds = /* @__PURE__ */ new Map();
|
|
71340
71484
|
constructor(buildTransformation, initialBranch) {
|
|
@@ -71914,6 +72058,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
71914
72058
|
* with the new selected anchor
|
|
71915
72059
|
*/
|
|
71916
72060
|
var SelectionStreamProcessorImpl = class {
|
|
72061
|
+
getters;
|
|
71917
72062
|
stream;
|
|
71918
72063
|
/**
|
|
71919
72064
|
* "Active" anchor used as a reference to compute new anchors
|
|
@@ -75270,8 +75415,8 @@ exports.stores = stores;
|
|
|
75270
75415
|
exports.tokenColors = tokenColors;
|
|
75271
75416
|
exports.tokenize = tokenize;
|
|
75272
75417
|
|
|
75273
|
-
__info__.version = "18.4.
|
|
75274
|
-
__info__.date = "2026-
|
|
75275
|
-
__info__.hash = "
|
|
75418
|
+
__info__.version = "18.4.42";
|
|
75419
|
+
__info__.date = "2026-06-06T06:21:28.088Z";
|
|
75420
|
+
__info__.hash = "bae6e25";
|
|
75276
75421
|
|
|
75277
75422
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|