@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
|
import { App, Component, blockDom, markRaw, onMounted, onPatched, onWillPatch, onWillStart, onWillUnmount, onWillUpdateProps, status, toRaw, useChildSubEnv, useComponent, useEffect, useEnv, useExternalListener, useRef, useState, useSubEnv, xml } from "@odoo/owl";
|
|
@@ -1382,6 +1382,7 @@ function getAlternatingColorsPalette(quantity) {
|
|
|
1382
1382
|
else return ALTERNATING_COLORS_XL;
|
|
1383
1383
|
}
|
|
1384
1384
|
var ColorGenerator = class {
|
|
1385
|
+
preferredColors;
|
|
1385
1386
|
currentColorIndex = 0;
|
|
1386
1387
|
palette;
|
|
1387
1388
|
constructor(paletteSize, preferredColors = []) {
|
|
@@ -1589,6 +1590,7 @@ const _t = function(s, ...values) {
|
|
|
1589
1590
|
return sprintf(_translate(s), ...values);
|
|
1590
1591
|
};
|
|
1591
1592
|
var LazyTranslatedString = class extends String {
|
|
1593
|
+
values;
|
|
1592
1594
|
constructor(str, values) {
|
|
1593
1595
|
super(str);
|
|
1594
1596
|
this.values = values;
|
|
@@ -2724,6 +2726,8 @@ const CellErrorType = {
|
|
|
2724
2726
|
};
|
|
2725
2727
|
const errorTypes = new Set(Object.values(CellErrorType));
|
|
2726
2728
|
var EvaluationError = class {
|
|
2729
|
+
message;
|
|
2730
|
+
value;
|
|
2727
2731
|
constructor(message = _t("Error"), value = CellErrorType.GenericError) {
|
|
2728
2732
|
this.message = message;
|
|
2729
2733
|
this.value = value;
|
|
@@ -2756,6 +2760,7 @@ var UnknownFunctionError = class extends EvaluationError {
|
|
|
2756
2760
|
}
|
|
2757
2761
|
};
|
|
2758
2762
|
var SplillBlockedError = class extends EvaluationError {
|
|
2763
|
+
errorOriginPosition;
|
|
2759
2764
|
constructor(message = _t("Spill range is not empty"), errorOriginPosition) {
|
|
2760
2765
|
super(message, CellErrorType.SpilledBlocked);
|
|
2761
2766
|
this.errorOriginPosition = errorOriginPosition;
|
|
@@ -3395,6 +3400,7 @@ function emptyDataErrorMessage(argName) {
|
|
|
3395
3400
|
//#endregion
|
|
3396
3401
|
//#region src/helpers/format/format_tokenizer.ts
|
|
3397
3402
|
function tokenizeFormat(str) {
|
|
3403
|
+
str = str.replace(/\s/g, " ");
|
|
3398
3404
|
const chars = new TokenizingChars(str);
|
|
3399
3405
|
const result = [];
|
|
3400
3406
|
let currentFormatPart = [];
|
|
@@ -5657,8 +5663,13 @@ function getApplyRangeChangeAddColRow(cmd) {
|
|
|
5657
5663
|
changeType: "NONE",
|
|
5658
5664
|
range
|
|
5659
5665
|
};
|
|
5666
|
+
const isUnboundedAtEnd = range.unboundedZone[end] === void 0;
|
|
5667
|
+
if (isUnboundedAtEnd && !range.unboundedZone.hasHeader) return {
|
|
5668
|
+
changeType: "RESIZE",
|
|
5669
|
+
range: createAdaptedRange(range, dimension, "RESIZE", cmd.quantity)
|
|
5670
|
+
};
|
|
5660
5671
|
if (cmd.position === "after") {
|
|
5661
|
-
if (range.zone[start] <= cmd.base && cmd.base < range.zone[end]) return {
|
|
5672
|
+
if (range.zone[start] <= cmd.base && (cmd.base < range.zone[end] || isUnboundedAtEnd)) return {
|
|
5662
5673
|
changeType: "RESIZE",
|
|
5663
5674
|
range: createAdaptedRange(range, dimension, "RESIZE", cmd.quantity)
|
|
5664
5675
|
};
|
|
@@ -6298,6 +6309,8 @@ const selectPastedZone = (selection, sourceZones, pastedZones) => {
|
|
|
6298
6309
|
//#endregion
|
|
6299
6310
|
//#region src/clipboard_handlers/abstract_clipboard_handler.ts
|
|
6300
6311
|
var ClipboardHandler = class {
|
|
6312
|
+
getters;
|
|
6313
|
+
dispatch;
|
|
6301
6314
|
constructor(getters, dispatch) {
|
|
6302
6315
|
this.getters = getters;
|
|
6303
6316
|
this.dispatch = dispatch;
|
|
@@ -8571,6 +8584,7 @@ var DependencyContainer = class extends EventBus {
|
|
|
8571
8584
|
}
|
|
8572
8585
|
};
|
|
8573
8586
|
var StoreFactory = class {
|
|
8587
|
+
get;
|
|
8574
8588
|
pendingBuilds = /* @__PURE__ */ new Set();
|
|
8575
8589
|
constructor(get) {
|
|
8576
8590
|
this.get = get;
|
|
@@ -8615,6 +8629,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
8615
8629
|
return MetaStore;
|
|
8616
8630
|
}
|
|
8617
8631
|
var DisposableStore = class {
|
|
8632
|
+
get;
|
|
8618
8633
|
disposeCallbacks = [];
|
|
8619
8634
|
constructor(get) {
|
|
8620
8635
|
this.get = get;
|
|
@@ -9188,6 +9203,10 @@ const FORCE_DEFAULT_ARGS_FUNCTIONS = {
|
|
|
9188
9203
|
ROUNDDOWN: [{
|
|
9189
9204
|
type: "NUMBER",
|
|
9190
9205
|
value: 0
|
|
9206
|
+
}],
|
|
9207
|
+
IFERROR: [{
|
|
9208
|
+
type: "NUMBER",
|
|
9209
|
+
value: 0
|
|
9191
9210
|
}]
|
|
9192
9211
|
};
|
|
9193
9212
|
/**
|
|
@@ -17230,6 +17249,7 @@ function hasStringMessage(obj) {
|
|
|
17230
17249
|
//#endregion
|
|
17231
17250
|
//#region src/formulas/code_builder.ts
|
|
17232
17251
|
var FunctionCodeBuilder = class {
|
|
17252
|
+
scope;
|
|
17233
17253
|
code = "";
|
|
17234
17254
|
constructor(scope = new Scope()) {
|
|
17235
17255
|
this.scope = scope;
|
|
@@ -17245,6 +17265,8 @@ var FunctionCodeBuilder = class {
|
|
|
17245
17265
|
}
|
|
17246
17266
|
};
|
|
17247
17267
|
var FunctionCodeImpl = class {
|
|
17268
|
+
scope;
|
|
17269
|
+
returnExpression;
|
|
17248
17270
|
code;
|
|
17249
17271
|
constructor(scope, code, returnExpression) {
|
|
17250
17272
|
this.scope = scope;
|
|
@@ -19196,6 +19218,7 @@ function getScorecardConfiguration({ width, height }, runtime) {
|
|
|
19196
19218
|
}, runtime).computeDesign();
|
|
19197
19219
|
}
|
|
19198
19220
|
var ScorecardChartConfigBuilder = class {
|
|
19221
|
+
runtime;
|
|
19199
19222
|
context;
|
|
19200
19223
|
width;
|
|
19201
19224
|
height;
|
|
@@ -22544,6 +22567,10 @@ var GaugeChartComponent = class extends Component {
|
|
|
22544
22567
|
* Animation interpolating values using the ease-out quartic curve function (chartJS default easing)
|
|
22545
22568
|
*/
|
|
22546
22569
|
var Animation = class {
|
|
22570
|
+
startValue;
|
|
22571
|
+
endValue;
|
|
22572
|
+
duration;
|
|
22573
|
+
callback;
|
|
22547
22574
|
startTime = void 0;
|
|
22548
22575
|
animationFrameId = null;
|
|
22549
22576
|
constructor(startValue, endValue, duration, callback) {
|
|
@@ -24903,6 +24930,7 @@ function getMaxFigureSize(getters, figureSize) {
|
|
|
24903
24930
|
* Represent a raw XML string
|
|
24904
24931
|
*/
|
|
24905
24932
|
var XMLString = class {
|
|
24933
|
+
xmlString;
|
|
24906
24934
|
/**
|
|
24907
24935
|
* @param xmlString should be a well formed, properly escaped XML string
|
|
24908
24936
|
*/
|
|
@@ -25624,6 +25652,11 @@ var Popover = class extends Component {
|
|
|
25624
25652
|
}
|
|
25625
25653
|
};
|
|
25626
25654
|
var PopoverPositionContext = class {
|
|
25655
|
+
anchorRect;
|
|
25656
|
+
containerRect;
|
|
25657
|
+
propsMaxSize;
|
|
25658
|
+
spreadsheetOffset;
|
|
25659
|
+
lastPosition;
|
|
25627
25660
|
constructor(anchorRect, containerRect, propsMaxSize, spreadsheetOffset, lastPosition) {
|
|
25628
25661
|
this.anchorRect = anchorRect;
|
|
25629
25662
|
this.containerRect = containerRect;
|
|
@@ -28839,6 +28872,7 @@ var Composer = class extends Component {
|
|
|
28839
28872
|
//#endregion
|
|
28840
28873
|
//#region src/components/composer/standalone_composer/standalone_composer_store.ts
|
|
28841
28874
|
var StandaloneComposerStore = class extends AbstractComposerStore {
|
|
28875
|
+
args;
|
|
28842
28876
|
constructor(get, args) {
|
|
28843
28877
|
super(get);
|
|
28844
28878
|
this.args = args;
|
|
@@ -29894,6 +29928,7 @@ var DOMDndHelper = class {
|
|
|
29894
29928
|
}
|
|
29895
29929
|
};
|
|
29896
29930
|
var ContainerWrapper = class {
|
|
29931
|
+
el;
|
|
29897
29932
|
constructor(el) {
|
|
29898
29933
|
this.el = el;
|
|
29899
29934
|
}
|
|
@@ -29965,6 +30000,10 @@ var FocusStore = class {
|
|
|
29965
30000
|
* This plugin handles this internal state.
|
|
29966
30001
|
*/
|
|
29967
30002
|
var SelectionInputStore = class extends SpreadsheetStore {
|
|
30003
|
+
initialRanges;
|
|
30004
|
+
inputHasSingleRange;
|
|
30005
|
+
colors;
|
|
30006
|
+
disabledRanges;
|
|
29968
30007
|
mutators = [
|
|
29969
30008
|
"resetWithRanges",
|
|
29970
30009
|
"focusById",
|
|
@@ -37021,11 +37060,10 @@ const INSERT_TABLE = (env) => {
|
|
|
37021
37060
|
if (interactiveCreateTable(env, env.model.getters.getActiveSheetId()).isSuccessful) env.openSidePanel("TableSidePanel", {});
|
|
37022
37061
|
};
|
|
37023
37062
|
const DELETE_SELECTED_TABLE = (env) => {
|
|
37024
|
-
const
|
|
37025
|
-
const table = env.model.getters.getTable(position);
|
|
37063
|
+
const table = env.model.getters.getFirstTableInSelection();
|
|
37026
37064
|
if (!table) return;
|
|
37027
37065
|
env.model.dispatch("REMOVE_TABLE", {
|
|
37028
|
-
sheetId:
|
|
37066
|
+
sheetId: env.model.getters.getActiveSheetId(),
|
|
37029
37067
|
target: [table.range.zone]
|
|
37030
37068
|
});
|
|
37031
37069
|
};
|
|
@@ -47500,6 +47538,8 @@ var MoreFormatsPanel = class extends Component {
|
|
|
47500
47538
|
//#endregion
|
|
47501
47539
|
//#region src/components/side_panel/pivot/pivot_measure_display_panel/pivot_measure_display_panel_store.ts
|
|
47502
47540
|
var PivotMeasureDisplayPanelStore = class extends SpreadsheetStore {
|
|
47541
|
+
pivotId;
|
|
47542
|
+
initialMeasure;
|
|
47503
47543
|
mutators = [
|
|
47504
47544
|
"cancelMeasureDisplayEdition",
|
|
47505
47545
|
"updateMeasureDisplayType",
|
|
@@ -47699,7 +47739,7 @@ function getVisiblePivotCellPositions(getters, pivotId) {
|
|
|
47699
47739
|
col,
|
|
47700
47740
|
row
|
|
47701
47741
|
};
|
|
47702
|
-
if (
|
|
47742
|
+
if (getters.getPivotIdsFromPosition(position).includes(pivotId)) positions.push(position);
|
|
47703
47743
|
}
|
|
47704
47744
|
return positions;
|
|
47705
47745
|
}
|
|
@@ -48624,6 +48664,9 @@ function extractFormulaIdFromToken(tokenAtCursor) {
|
|
|
48624
48664
|
function getFirstPivotFunction(tokens) {
|
|
48625
48665
|
return getFunctionsFromTokens(tokens, PIVOT_FUNCTIONS)[0];
|
|
48626
48666
|
}
|
|
48667
|
+
function getPivotFunctions(tokens) {
|
|
48668
|
+
return getFunctionsFromTokens(tokens, PIVOT_FUNCTIONS);
|
|
48669
|
+
}
|
|
48627
48670
|
/**
|
|
48628
48671
|
* Parse a spreadsheet formula and detect the number of PIVOT functions that are
|
|
48629
48672
|
* present in the given formula.
|
|
@@ -48673,13 +48716,30 @@ function createMeasure(fields, measure) {
|
|
|
48673
48716
|
} : fields[fieldName];
|
|
48674
48717
|
const aggregator = measure.aggregator;
|
|
48675
48718
|
return {
|
|
48719
|
+
/**
|
|
48720
|
+
* Get the id of the measure, as it is stored in the pivot formula
|
|
48721
|
+
*/
|
|
48676
48722
|
id: measure.id,
|
|
48723
|
+
/**
|
|
48724
|
+
* Display name of the measure
|
|
48725
|
+
* e.g. "__count" -> "Count", "amount_total" -> "Total Amount"
|
|
48726
|
+
*/
|
|
48677
48727
|
get displayName() {
|
|
48678
48728
|
return measure.userDefinedName ?? field?.string ?? measure.fieldName;
|
|
48679
48729
|
},
|
|
48680
48730
|
userDefinedName: measure.userDefinedName,
|
|
48731
|
+
/**
|
|
48732
|
+
* Get the name of the field of the measure
|
|
48733
|
+
*/
|
|
48681
48734
|
fieldName,
|
|
48735
|
+
/**
|
|
48736
|
+
* Get the aggregator of the measure
|
|
48737
|
+
*/
|
|
48682
48738
|
aggregator,
|
|
48739
|
+
/**
|
|
48740
|
+
* Get the type of the measure field
|
|
48741
|
+
* e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
|
|
48742
|
+
*/
|
|
48683
48743
|
type: fieldName === "__count" ? "integer" : field?.type ?? "integer",
|
|
48684
48744
|
isValid: !!(field || measure.computedBy),
|
|
48685
48745
|
isHidden: measure.isHidden,
|
|
@@ -48693,10 +48753,30 @@ function createPivotDimension(fields, dimension) {
|
|
|
48693
48753
|
const type = field?.type ?? "integer";
|
|
48694
48754
|
const granularity = field && isDateOrDatetimeField(field) ? dimension.granularity : void 0;
|
|
48695
48755
|
return {
|
|
48756
|
+
/**
|
|
48757
|
+
* Get the display name of the dimension
|
|
48758
|
+
* e.g. "stage_id" -> "Stage", "create_date:month" -> "Create Date"
|
|
48759
|
+
*/
|
|
48696
48760
|
displayName: field?.string ?? dimension.fieldName,
|
|
48761
|
+
/**
|
|
48762
|
+
* Get the name of the dimension, as it is stored in the pivot formula
|
|
48763
|
+
* e.g. "stage_id", "create_date:month"
|
|
48764
|
+
*/
|
|
48697
48765
|
nameWithGranularity: dimension.fieldName + (granularity ? `:${granularity}` : ""),
|
|
48766
|
+
/**
|
|
48767
|
+
* Get the name of the field of the dimension
|
|
48768
|
+
* e.g. "stage_id" -> "stage_id", "create_date:month" -> "create_date"
|
|
48769
|
+
*/
|
|
48698
48770
|
fieldName: dimension.fieldName,
|
|
48771
|
+
/**
|
|
48772
|
+
* Get the aggregate operator of the dimension
|
|
48773
|
+
* e.g. "stage_id" -> undefined, "create_date:month" -> "month"
|
|
48774
|
+
*/
|
|
48699
48775
|
granularity,
|
|
48776
|
+
/**
|
|
48777
|
+
* Get the type of the field of the dimension
|
|
48778
|
+
* e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
|
|
48779
|
+
*/
|
|
48700
48780
|
type,
|
|
48701
48781
|
order: dimension.order,
|
|
48702
48782
|
isValid: !!field
|
|
@@ -49773,6 +49853,7 @@ function adaptPivotRange(range, applyChange) {
|
|
|
49773
49853
|
//#endregion
|
|
49774
49854
|
//#region src/components/side_panel/pivot/pivot_side_panel/pivot_side_panel_store.ts
|
|
49775
49855
|
var PivotSidePanelStore = class extends SpreadsheetStore {
|
|
49856
|
+
pivotId;
|
|
49776
49857
|
mutators = [
|
|
49777
49858
|
"reset",
|
|
49778
49859
|
"deferUpdates",
|
|
@@ -53329,6 +53410,11 @@ var CellPlugin = class extends CorePlugin {
|
|
|
53329
53410
|
}
|
|
53330
53411
|
};
|
|
53331
53412
|
var FormulaCellWithDependencies = class {
|
|
53413
|
+
id;
|
|
53414
|
+
format;
|
|
53415
|
+
style;
|
|
53416
|
+
sheetId;
|
|
53417
|
+
getRangeString;
|
|
53332
53418
|
isFormula = true;
|
|
53333
53419
|
compiledFormula;
|
|
53334
53420
|
constructor(id, compiledFormula, format, style, dependencies, sheetId, getRangeString) {
|
|
@@ -53363,6 +53449,10 @@ var FormulaCellWithDependencies = class {
|
|
|
53363
53449
|
}
|
|
53364
53450
|
};
|
|
53365
53451
|
var RangeReferenceToken = class {
|
|
53452
|
+
ranges;
|
|
53453
|
+
rangeIndex;
|
|
53454
|
+
sheetId;
|
|
53455
|
+
getRangeString;
|
|
53366
53456
|
type = "REFERENCE";
|
|
53367
53457
|
constructor(ranges, rangeIndex, sheetId, getRangeString) {
|
|
53368
53458
|
this.ranges = ranges;
|
|
@@ -57148,6 +57238,8 @@ function buildCompilationParameters(context, getters, computeCell) {
|
|
|
57148
57238
|
return new CompilationParametersBuilder(context, getters, computeCell).getParameters();
|
|
57149
57239
|
}
|
|
57150
57240
|
var CompilationParametersBuilder = class {
|
|
57241
|
+
getters;
|
|
57242
|
+
computeCell;
|
|
57151
57243
|
evalContext;
|
|
57152
57244
|
rangeCache = {};
|
|
57153
57245
|
constructor(context, getters, computeCell) {
|
|
@@ -57601,6 +57693,7 @@ var ZoneRBush = class extends import_rbush_min.default {
|
|
|
57601
57693
|
* It uses an R-Tree data structure to efficiently find dependent cells.
|
|
57602
57694
|
*/
|
|
57603
57695
|
var FormulaDependencyGraph = class {
|
|
57696
|
+
createEmptyPositionSet;
|
|
57604
57697
|
dependencies = new PositionMap();
|
|
57605
57698
|
rTree;
|
|
57606
57699
|
constructor(createEmptyPositionSet, data = []) {
|
|
@@ -57902,6 +57995,7 @@ const MAX_ITERATION = 30;
|
|
|
57902
57995
|
const ERROR_CYCLE_CELL = Object.freeze(createEvaluatedCell(new CircularDependencyError()));
|
|
57903
57996
|
const EMPTY_CELL = Object.freeze(createEvaluatedCell({ value: null }));
|
|
57904
57997
|
var Evaluator = class {
|
|
57998
|
+
context;
|
|
57905
57999
|
getters;
|
|
57906
58000
|
compilationParams;
|
|
57907
58001
|
evaluatedCells = new PositionMap();
|
|
@@ -60157,6 +60251,7 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
60157
60251
|
"getPivot",
|
|
60158
60252
|
"getFirstPivotFunction",
|
|
60159
60253
|
"getPivotIdFromPosition",
|
|
60254
|
+
"getPivotIdsFromPosition",
|
|
60160
60255
|
"getPivotCellFromPosition",
|
|
60161
60256
|
"generateNewCalculatedMeasureName",
|
|
60162
60257
|
"isPivotUnused",
|
|
@@ -60181,9 +60276,11 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
60181
60276
|
this.refreshPivot(cmd.id);
|
|
60182
60277
|
break;
|
|
60183
60278
|
case "ADD_PIVOT":
|
|
60279
|
+
this.unusedPivots?.push(cmd.pivotId);
|
|
60184
60280
|
this.setupPivot(cmd.pivotId);
|
|
60185
60281
|
break;
|
|
60186
60282
|
case "DUPLICATE_PIVOT":
|
|
60283
|
+
this.unusedPivots?.push(cmd.newPivotId);
|
|
60187
60284
|
this.setupPivot(cmd.newPivotId);
|
|
60188
60285
|
break;
|
|
60189
60286
|
case "UPDATE_PIVOT":
|
|
@@ -60214,37 +60311,52 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
60214
60311
|
}
|
|
60215
60312
|
}
|
|
60216
60313
|
/**
|
|
60217
|
-
* Get the id of the pivot at the given position. Returns undefined if there
|
|
60314
|
+
* Get the id of the first pivot in the formula at the given position. Returns undefined if there
|
|
60218
60315
|
* is no pivot at this position
|
|
60219
60316
|
*/
|
|
60220
60317
|
getPivotIdFromPosition(position) {
|
|
60318
|
+
return this.getPivotIdsFromPosition(position)[0];
|
|
60319
|
+
}
|
|
60320
|
+
/**
|
|
60321
|
+
* Get all of the ids of the pivot present in the formula at the given position.
|
|
60322
|
+
*/
|
|
60323
|
+
getPivotIdsFromPosition(position) {
|
|
60221
60324
|
const cell = this.getters.getCorrespondingFormulaCell(position);
|
|
60222
|
-
if (cell && cell.isFormula)
|
|
60223
|
-
|
|
60224
|
-
|
|
60225
|
-
|
|
60226
|
-
|
|
60227
|
-
|
|
60228
|
-
|
|
60325
|
+
if (cell && cell.isFormula) return this.getPivotIdsFromFormula(position.sheetId, cell.compiledFormula);
|
|
60326
|
+
return [];
|
|
60327
|
+
}
|
|
60328
|
+
getPivotIdsFromFormula(sheetId, formula) {
|
|
60329
|
+
return this.getPivotFunctions(sheetId, formula.tokens).map((pivotFunction) => {
|
|
60330
|
+
const pivotId = pivotFunction.args[0]?.toString();
|
|
60331
|
+
return pivotId && this.getters.getPivotId(pivotId);
|
|
60332
|
+
}).filter(isDefined);
|
|
60229
60333
|
}
|
|
60230
60334
|
isSpillPivotFormula(position) {
|
|
60231
60335
|
const cell = this.getters.getCorrespondingFormulaCell(position);
|
|
60232
60336
|
if (cell && cell.isFormula) return this.getFirstPivotFunction(position.sheetId, cell.compiledFormula.tokens)?.functionName === "PIVOT";
|
|
60233
60337
|
return false;
|
|
60234
60338
|
}
|
|
60235
|
-
|
|
60236
|
-
const
|
|
60237
|
-
if (!
|
|
60238
|
-
const
|
|
60239
|
-
|
|
60240
|
-
functionName,
|
|
60241
|
-
|
|
60339
|
+
getPivotFunctions(sheetId, tokens) {
|
|
60340
|
+
const pivotFunctions = getPivotFunctions(tokens);
|
|
60341
|
+
if (!pivotFunctions.length) return [];
|
|
60342
|
+
const evaluatedPivotFunctions = [];
|
|
60343
|
+
for (const pivotFunction of pivotFunctions) {
|
|
60344
|
+
const { functionName, args } = pivotFunction;
|
|
60345
|
+
const evaluatedArgs = args.map((argAst) => {
|
|
60242
60346
|
if (argAst.type === "EMPTY") return;
|
|
60243
60347
|
else if (argAst.type === "STRING" || argAst.type === "BOOLEAN" || argAst.type === "NUMBER") return argAst.value;
|
|
60244
60348
|
const argsString = astToFormula(argAst);
|
|
60245
60349
|
return this.getters.evaluateFormula(sheetId, argsString);
|
|
60246
|
-
})
|
|
60247
|
-
|
|
60350
|
+
});
|
|
60351
|
+
evaluatedPivotFunctions.push({
|
|
60352
|
+
functionName,
|
|
60353
|
+
args: evaluatedArgs
|
|
60354
|
+
});
|
|
60355
|
+
}
|
|
60356
|
+
return evaluatedPivotFunctions;
|
|
60357
|
+
}
|
|
60358
|
+
getFirstPivotFunction(sheetId, tokens) {
|
|
60359
|
+
return this.getPivotFunctions(sheetId, tokens)[0];
|
|
60248
60360
|
}
|
|
60249
60361
|
/**
|
|
60250
60362
|
* Returns the domain args of a pivot formula from a position.
|
|
@@ -60348,8 +60460,8 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
60348
60460
|
const unusedPivots = new Set(this.getters.getPivotIds());
|
|
60349
60461
|
for (const sheetId of this.getters.getSheetIds()) for (const cellId in this.getters.getCells(sheetId)) {
|
|
60350
60462
|
const position = this.getters.getCellPosition(cellId);
|
|
60351
|
-
const
|
|
60352
|
-
|
|
60463
|
+
const pivotIds = this.getPivotIdsFromPosition(position);
|
|
60464
|
+
for (const pivotId of pivotIds) {
|
|
60353
60465
|
unusedPivots.delete(pivotId);
|
|
60354
60466
|
if (!unusedPivots.size) {
|
|
60355
60467
|
this.unusedPivots = [];
|
|
@@ -60357,6 +60469,21 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
60357
60469
|
}
|
|
60358
60470
|
}
|
|
60359
60471
|
}
|
|
60472
|
+
for (const pivotId of this.getters.getPivotIds()) {
|
|
60473
|
+
const pivot = this.getters.getPivotCoreDefinition(pivotId);
|
|
60474
|
+
for (const measure of pivot.measures) if (measure.computedBy) {
|
|
60475
|
+
const { sheetId } = measure.computedBy;
|
|
60476
|
+
const formula = this.getters.getMeasureCompiledFormula(pivotId, measure);
|
|
60477
|
+
const relatedPivotIds = this.getPivotIdsFromFormula(sheetId, formula);
|
|
60478
|
+
for (const relatedPivotId of relatedPivotIds) {
|
|
60479
|
+
unusedPivots.delete(relatedPivotId);
|
|
60480
|
+
if (!unusedPivots.size) {
|
|
60481
|
+
this.unusedPivots = [];
|
|
60482
|
+
return [];
|
|
60483
|
+
}
|
|
60484
|
+
}
|
|
60485
|
+
}
|
|
60486
|
+
}
|
|
60360
60487
|
this.unusedPivots = [...unusedPivots];
|
|
60361
60488
|
return this.unusedPivots;
|
|
60362
60489
|
}
|
|
@@ -61957,6 +62084,8 @@ function transformPositionWithMerge(toTransform, executed) {
|
|
|
61957
62084
|
//#endregion
|
|
61958
62085
|
//#region src/collaborative/revisions.ts
|
|
61959
62086
|
var Revision = class {
|
|
62087
|
+
rootCommand;
|
|
62088
|
+
timestamp;
|
|
61960
62089
|
id;
|
|
61961
62090
|
clientId;
|
|
61962
62091
|
_commands = [];
|
|
@@ -61993,6 +62122,9 @@ var Revision = class {
|
|
|
61993
62122
|
//#region src/collaborative/session.ts
|
|
61994
62123
|
var ClientDisconnectedError = class extends Error {};
|
|
61995
62124
|
var Session = class extends EventBus {
|
|
62125
|
+
revisions;
|
|
62126
|
+
transportService;
|
|
62127
|
+
serverRevisionId;
|
|
61996
62128
|
/**
|
|
61997
62129
|
* Positions of the others client.
|
|
61998
62130
|
*/
|
|
@@ -65679,6 +65811,9 @@ var GridSelectionPlugin = class extends UIPlugin {
|
|
|
65679
65811
|
//#endregion
|
|
65680
65812
|
//#region src/helpers/internal_viewport.ts
|
|
65681
65813
|
var InternalViewport = class {
|
|
65814
|
+
getters;
|
|
65815
|
+
sheetId;
|
|
65816
|
+
boundaries;
|
|
65682
65817
|
top;
|
|
65683
65818
|
bottom;
|
|
65684
65819
|
left;
|
|
@@ -70608,6 +70743,7 @@ function instantiateClipboard() {
|
|
|
70608
70743
|
return new WebClipboardWrapper(navigator.clipboard);
|
|
70609
70744
|
}
|
|
70610
70745
|
var WebClipboardWrapper = class {
|
|
70746
|
+
clipboard;
|
|
70611
70747
|
constructor(clipboard) {
|
|
70612
70748
|
this.clipboard = clipboard;
|
|
70613
70749
|
}
|
|
@@ -71108,6 +71244,8 @@ function inverseCommand(cmd) {
|
|
|
71108
71244
|
* @param operations initial operations
|
|
71109
71245
|
*/
|
|
71110
71246
|
var Branch = class Branch {
|
|
71247
|
+
buildTransformation;
|
|
71248
|
+
operations;
|
|
71111
71249
|
constructor(buildTransformation, operations = []) {
|
|
71112
71250
|
this.buildTransformation = buildTransformation;
|
|
71113
71251
|
this.operations = operations;
|
|
@@ -71224,6 +71362,8 @@ var Branch = class Branch {
|
|
|
71224
71362
|
* to revert it).
|
|
71225
71363
|
*/
|
|
71226
71364
|
var Operation = class {
|
|
71365
|
+
id;
|
|
71366
|
+
data;
|
|
71227
71367
|
constructor(id, data) {
|
|
71228
71368
|
this.id = id;
|
|
71229
71369
|
this.data = data;
|
|
@@ -71233,6 +71373,8 @@ var Operation = class {
|
|
|
71233
71373
|
}
|
|
71234
71374
|
};
|
|
71235
71375
|
var LazyOperation = class LazyOperation {
|
|
71376
|
+
id;
|
|
71377
|
+
lazyData;
|
|
71236
71378
|
constructor(id, lazyData) {
|
|
71237
71379
|
this.id = id;
|
|
71238
71380
|
this.lazyData = lazyData;
|
|
@@ -71258,6 +71400,7 @@ var LazyOperation = class LazyOperation {
|
|
|
71258
71400
|
* ```
|
|
71259
71401
|
*/
|
|
71260
71402
|
var OperationSequence = class OperationSequence {
|
|
71403
|
+
operations;
|
|
71261
71404
|
constructor(operations) {
|
|
71262
71405
|
this.operations = operations;
|
|
71263
71406
|
}
|
|
@@ -71333,6 +71476,7 @@ var OperationSequence = class OperationSequence {
|
|
|
71333
71476
|
*
|
|
71334
71477
|
*/
|
|
71335
71478
|
var Tree = class {
|
|
71479
|
+
buildTransformation;
|
|
71336
71480
|
branches;
|
|
71337
71481
|
branchingOperationIds = /* @__PURE__ */ new Map();
|
|
71338
71482
|
constructor(buildTransformation, initialBranch) {
|
|
@@ -71912,6 +72056,7 @@ var EventStream = class {
|
|
|
71912
72056
|
* with the new selected anchor
|
|
71913
72057
|
*/
|
|
71914
72058
|
var SelectionStreamProcessorImpl = class {
|
|
72059
|
+
getters;
|
|
71915
72060
|
stream;
|
|
71916
72061
|
/**
|
|
71917
72062
|
* "Active" anchor used as a reference to compute new anchors
|
|
@@ -75219,6 +75364,6 @@ const chartHelpers = {
|
|
|
75219
75364
|
//#endregion
|
|
75220
75365
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, LocalTransportService, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, chartHelpers, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
75221
75366
|
|
|
75222
|
-
__info__.version = "18.4.
|
|
75223
|
-
__info__.date = "2026-
|
|
75224
|
-
__info__.hash = "
|
|
75367
|
+
__info__.version = "18.4.42";
|
|
75368
|
+
__info__.date = "2026-06-06T06:21:28.088Z";
|
|
75369
|
+
__info__.hash = "bae6e25";
|