@odoo/o-spreadsheet 18.2.53 → 18.2.55
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 +164 -29
- package/dist/o_spreadsheet.css +3 -3
- package/dist/o_spreadsheet.esm.js +164 -29
- package/dist/o_spreadsheet.iife.js +164 -29
- package/dist/o_spreadsheet.iife.min.js +296 -296
- package/dist/o_spreadsheet.xml +5 -4
- 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.2.
|
|
6
|
-
* @date 2026-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.2.55
|
|
6
|
+
* @date 2026-06-06T06:20:23.893Z
|
|
7
|
+
* @hash 57b568a
|
|
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";
|
|
@@ -1345,6 +1345,7 @@ function getAlternatingColorsPalette(quantity) {
|
|
|
1345
1345
|
else return ALTERNATING_COLORS_XL;
|
|
1346
1346
|
}
|
|
1347
1347
|
var ColorGenerator = class {
|
|
1348
|
+
preferredColors;
|
|
1348
1349
|
currentColorIndex = 0;
|
|
1349
1350
|
palette;
|
|
1350
1351
|
constructor(paletteSize, preferredColors = []) {
|
|
@@ -1811,6 +1812,7 @@ const _t = function(s, ...values) {
|
|
|
1811
1812
|
return sprintf(_translate(s), ...values);
|
|
1812
1813
|
};
|
|
1813
1814
|
var LazyTranslatedString = class extends String {
|
|
1815
|
+
values;
|
|
1814
1816
|
constructor(str, values) {
|
|
1815
1817
|
super(str);
|
|
1816
1818
|
this.values = values;
|
|
@@ -3307,6 +3309,8 @@ const CellErrorType = {
|
|
|
3307
3309
|
};
|
|
3308
3310
|
const errorTypes = new Set(Object.values(CellErrorType));
|
|
3309
3311
|
var EvaluationError = class {
|
|
3312
|
+
message;
|
|
3313
|
+
value;
|
|
3310
3314
|
constructor(message = _t("Error"), value = CellErrorType.GenericError) {
|
|
3311
3315
|
this.message = message;
|
|
3312
3316
|
this.value = value;
|
|
@@ -3339,6 +3343,7 @@ var UnknownFunctionError = class extends EvaluationError {
|
|
|
3339
3343
|
}
|
|
3340
3344
|
};
|
|
3341
3345
|
var SplillBlockedError = class extends EvaluationError {
|
|
3346
|
+
errorOriginPosition;
|
|
3342
3347
|
constructor(message = _t("Spill range is not empty"), errorOriginPosition) {
|
|
3343
3348
|
super(message, CellErrorType.SpilledBlocked);
|
|
3344
3349
|
this.errorOriginPosition = errorOriginPosition;
|
|
@@ -4041,6 +4046,7 @@ function detectLink(value) {
|
|
|
4041
4046
|
//#endregion
|
|
4042
4047
|
//#region src/helpers/format/format_tokenizer.ts
|
|
4043
4048
|
function tokenizeFormat(str) {
|
|
4049
|
+
str = str.replace(/\s/g, " ");
|
|
4044
4050
|
const chars = new TokenizingChars(str);
|
|
4045
4051
|
const result = [];
|
|
4046
4052
|
let currentFormatPart = [];
|
|
@@ -5172,6 +5178,7 @@ function getFullReference(sheetName, xc) {
|
|
|
5172
5178
|
//#endregion
|
|
5173
5179
|
//#region src/helpers/range.ts
|
|
5174
5180
|
var RangeImpl = class RangeImpl {
|
|
5181
|
+
getSheetSize;
|
|
5175
5182
|
_zone;
|
|
5176
5183
|
parts;
|
|
5177
5184
|
invalidXc;
|
|
@@ -5859,6 +5866,8 @@ const selectPastedZone = (selection, sourceZones, pastedZones) => {
|
|
|
5859
5866
|
//#endregion
|
|
5860
5867
|
//#region src/clipboard_handlers/abstract_clipboard_handler.ts
|
|
5861
5868
|
var ClipboardHandler = class {
|
|
5869
|
+
getters;
|
|
5870
|
+
dispatch;
|
|
5862
5871
|
constructor(getters, dispatch) {
|
|
5863
5872
|
this.getters = getters;
|
|
5864
5873
|
this.dispatch = dispatch;
|
|
@@ -8266,6 +8275,7 @@ var DependencyContainer = class extends EventBus {
|
|
|
8266
8275
|
}
|
|
8267
8276
|
};
|
|
8268
8277
|
var StoreFactory = class {
|
|
8278
|
+
get;
|
|
8269
8279
|
pendingBuilds = /* @__PURE__ */ new Set();
|
|
8270
8280
|
constructor(get) {
|
|
8271
8281
|
this.get = get;
|
|
@@ -8310,6 +8320,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
8310
8320
|
return MetaStore;
|
|
8311
8321
|
}
|
|
8312
8322
|
var DisposableStore = class {
|
|
8323
|
+
get;
|
|
8313
8324
|
disposeCallbacks = [];
|
|
8314
8325
|
constructor(get) {
|
|
8315
8326
|
this.get = get;
|
|
@@ -9453,6 +9464,7 @@ function getScorecardConfiguration({ width, height }, runtime) {
|
|
|
9453
9464
|
}, runtime).computeDesign();
|
|
9454
9465
|
}
|
|
9455
9466
|
var ScorecardChartConfigBuilder = class {
|
|
9467
|
+
runtime;
|
|
9456
9468
|
context;
|
|
9457
9469
|
width;
|
|
9458
9470
|
height;
|
|
@@ -18107,6 +18119,7 @@ var AbstractComposerStore = class extends SpreadsheetStore {
|
|
|
18107
18119
|
//#endregion
|
|
18108
18120
|
//#region src/formulas/code_builder.ts
|
|
18109
18121
|
var FunctionCodeBuilder = class {
|
|
18122
|
+
scope;
|
|
18110
18123
|
code = "";
|
|
18111
18124
|
constructor(scope = new Scope()) {
|
|
18112
18125
|
this.scope = scope;
|
|
@@ -18122,6 +18135,8 @@ var FunctionCodeBuilder = class {
|
|
|
18122
18135
|
}
|
|
18123
18136
|
};
|
|
18124
18137
|
var FunctionCodeImpl = class {
|
|
18138
|
+
scope;
|
|
18139
|
+
returnExpression;
|
|
18125
18140
|
code;
|
|
18126
18141
|
constructor(scope, code, returnExpression) {
|
|
18127
18142
|
this.scope = scope;
|
|
@@ -18502,6 +18517,9 @@ function extractFormulaIdFromToken(tokenAtCursor) {
|
|
|
18502
18517
|
function getFirstPivotFunction(tokens) {
|
|
18503
18518
|
return getFunctionsFromTokens(tokens, PIVOT_FUNCTIONS)[0];
|
|
18504
18519
|
}
|
|
18520
|
+
function getPivotFunctions(tokens) {
|
|
18521
|
+
return getFunctionsFromTokens(tokens, PIVOT_FUNCTIONS);
|
|
18522
|
+
}
|
|
18505
18523
|
/**
|
|
18506
18524
|
* Parse a spreadsheet formula and detect the number of PIVOT functions that are
|
|
18507
18525
|
* present in the given formula.
|
|
@@ -19552,6 +19570,7 @@ const backgroundColorChartJSPlugin = {
|
|
|
19552
19570
|
* Represent a raw XML string
|
|
19553
19571
|
*/
|
|
19554
19572
|
var XMLString = class {
|
|
19573
|
+
xmlString;
|
|
19555
19574
|
/**
|
|
19556
19575
|
* @param xmlString should be a well formed, properly escaped XML string
|
|
19557
19576
|
*/
|
|
@@ -19670,6 +19689,10 @@ const FORCE_DEFAULT_ARGS_FUNCTIONS = {
|
|
|
19670
19689
|
ROUNDDOWN: [{
|
|
19671
19690
|
type: "NUMBER",
|
|
19672
19691
|
value: 0
|
|
19692
|
+
}],
|
|
19693
|
+
IFERROR: [{
|
|
19694
|
+
type: "NUMBER",
|
|
19695
|
+
value: 0
|
|
19673
19696
|
}]
|
|
19674
19697
|
};
|
|
19675
19698
|
/**
|
|
@@ -29585,6 +29608,10 @@ var Popover = class extends Component {
|
|
|
29585
29608
|
}
|
|
29586
29609
|
};
|
|
29587
29610
|
var PopoverPositionContext = class {
|
|
29611
|
+
anchorRect;
|
|
29612
|
+
containerRect;
|
|
29613
|
+
propsMaxSize;
|
|
29614
|
+
spreadsheetOffset;
|
|
29588
29615
|
constructor(anchorRect, containerRect, propsMaxSize, spreadsheetOffset) {
|
|
29589
29616
|
this.anchorRect = anchorRect;
|
|
29590
29617
|
this.containerRect = containerRect;
|
|
@@ -30683,11 +30710,10 @@ const INSERT_TABLE = (env) => {
|
|
|
30683
30710
|
if (interactiveCreateTable(env, env.model.getters.getActiveSheetId()).isSuccessful) env.openSidePanel("TableSidePanel", {});
|
|
30684
30711
|
};
|
|
30685
30712
|
const DELETE_SELECTED_TABLE = (env) => {
|
|
30686
|
-
const
|
|
30687
|
-
const table = env.model.getters.getTable(position);
|
|
30713
|
+
const table = env.model.getters.getFirstTableInSelection();
|
|
30688
30714
|
if (!table) return;
|
|
30689
30715
|
env.model.dispatch("REMOVE_TABLE", {
|
|
30690
|
-
sheetId:
|
|
30716
|
+
sheetId: env.model.getters.getActiveSheetId(),
|
|
30691
30717
|
target: [table.range.zone]
|
|
30692
30718
|
});
|
|
30693
30719
|
};
|
|
@@ -32623,7 +32649,7 @@ function getVisiblePivotCellPositions(getters, pivotId) {
|
|
|
32623
32649
|
col,
|
|
32624
32650
|
row
|
|
32625
32651
|
};
|
|
32626
|
-
if (
|
|
32652
|
+
if (getters.getPivotIdsFromPosition(position).includes(pivotId)) positions.push(position);
|
|
32627
32653
|
}
|
|
32628
32654
|
return positions;
|
|
32629
32655
|
}
|
|
@@ -33401,6 +33427,7 @@ var DOMDndHelper = class {
|
|
|
33401
33427
|
}
|
|
33402
33428
|
};
|
|
33403
33429
|
var ContainerWrapper = class {
|
|
33430
|
+
el;
|
|
33404
33431
|
constructor(el) {
|
|
33405
33432
|
this.el = el;
|
|
33406
33433
|
}
|
|
@@ -33486,6 +33513,9 @@ var FocusStore = class {
|
|
|
33486
33513
|
* This plugin handles this internal state.
|
|
33487
33514
|
*/
|
|
33488
33515
|
var SelectionInputStore = class extends SpreadsheetStore {
|
|
33516
|
+
initialRanges;
|
|
33517
|
+
inputHasSingleRange;
|
|
33518
|
+
colors;
|
|
33489
33519
|
mutators = [
|
|
33490
33520
|
"resetWithRanges",
|
|
33491
33521
|
"focusById",
|
|
@@ -36398,6 +36428,7 @@ var Composer = class extends Component {
|
|
|
36398
36428
|
//#endregion
|
|
36399
36429
|
//#region src/components/composer/standalone_composer/standalone_composer_store.ts
|
|
36400
36430
|
var StandaloneComposerStore = class extends AbstractComposerStore {
|
|
36431
|
+
args;
|
|
36401
36432
|
constructor(get, args) {
|
|
36402
36433
|
super(get);
|
|
36403
36434
|
this.args = args;
|
|
@@ -39972,6 +40003,8 @@ var MoreFormatsPanel = class extends Component {
|
|
|
39972
40003
|
//#endregion
|
|
39973
40004
|
//#region src/components/side_panel/pivot/pivot_measure_display_panel/pivot_measure_display_panel_store.ts
|
|
39974
40005
|
var PivotMeasureDisplayPanelStore = class extends SpreadsheetStore {
|
|
40006
|
+
pivotId;
|
|
40007
|
+
initialMeasure;
|
|
39975
40008
|
mutators = [
|
|
39976
40009
|
"cancelMeasureDisplayEdition",
|
|
39977
40010
|
"updateMeasureDisplayType",
|
|
@@ -41010,13 +41043,30 @@ function createMeasure(fields, measure) {
|
|
|
41010
41043
|
} : fields[fieldName];
|
|
41011
41044
|
const aggregator = measure.aggregator;
|
|
41012
41045
|
return {
|
|
41046
|
+
/**
|
|
41047
|
+
* Get the id of the measure, as it is stored in the pivot formula
|
|
41048
|
+
*/
|
|
41013
41049
|
id: measure.id,
|
|
41050
|
+
/**
|
|
41051
|
+
* Display name of the measure
|
|
41052
|
+
* e.g. "__count" -> "Count", "amount_total" -> "Total Amount"
|
|
41053
|
+
*/
|
|
41014
41054
|
get displayName() {
|
|
41015
41055
|
return measure.userDefinedName ?? field?.string ?? measure.fieldName;
|
|
41016
41056
|
},
|
|
41017
41057
|
userDefinedName: measure.userDefinedName,
|
|
41058
|
+
/**
|
|
41059
|
+
* Get the name of the field of the measure
|
|
41060
|
+
*/
|
|
41018
41061
|
fieldName,
|
|
41062
|
+
/**
|
|
41063
|
+
* Get the aggregator of the measure
|
|
41064
|
+
*/
|
|
41019
41065
|
aggregator,
|
|
41066
|
+
/**
|
|
41067
|
+
* Get the type of the measure field
|
|
41068
|
+
* e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
|
|
41069
|
+
*/
|
|
41020
41070
|
type: fieldName === "__count" ? "integer" : field?.type ?? "integer",
|
|
41021
41071
|
isValid: !!(field || measure.computedBy),
|
|
41022
41072
|
isHidden: measure.isHidden,
|
|
@@ -41030,10 +41080,30 @@ function createPivotDimension(fields, dimension) {
|
|
|
41030
41080
|
const type = field?.type ?? "integer";
|
|
41031
41081
|
const granularity = field && isDateOrDatetimeField(field) ? dimension.granularity : void 0;
|
|
41032
41082
|
return {
|
|
41083
|
+
/**
|
|
41084
|
+
* Get the display name of the dimension
|
|
41085
|
+
* e.g. "stage_id" -> "Stage", "create_date:month" -> "Create Date"
|
|
41086
|
+
*/
|
|
41033
41087
|
displayName: field?.string ?? dimension.fieldName,
|
|
41088
|
+
/**
|
|
41089
|
+
* Get the name of the dimension, as it is stored in the pivot formula
|
|
41090
|
+
* e.g. "stage_id", "create_date:month"
|
|
41091
|
+
*/
|
|
41034
41092
|
nameWithGranularity: dimension.fieldName + (granularity ? `:${granularity}` : ""),
|
|
41093
|
+
/**
|
|
41094
|
+
* Get the name of the field of the dimension
|
|
41095
|
+
* e.g. "stage_id" -> "stage_id", "create_date:month" -> "create_date"
|
|
41096
|
+
*/
|
|
41035
41097
|
fieldName: dimension.fieldName,
|
|
41098
|
+
/**
|
|
41099
|
+
* Get the aggregate operator of the dimension
|
|
41100
|
+
* e.g. "stage_id" -> undefined, "create_date:month" -> "month"
|
|
41101
|
+
*/
|
|
41036
41102
|
granularity,
|
|
41103
|
+
/**
|
|
41104
|
+
* Get the type of the field of the dimension
|
|
41105
|
+
* e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
|
|
41106
|
+
*/
|
|
41037
41107
|
type,
|
|
41038
41108
|
order: dimension.order,
|
|
41039
41109
|
isValid: !!field
|
|
@@ -42073,6 +42143,7 @@ function adaptPivotRange(range, applyChange) {
|
|
|
42073
42143
|
//#endregion
|
|
42074
42144
|
//#region src/components/side_panel/pivot/pivot_side_panel/pivot_side_panel_store.ts
|
|
42075
42145
|
var PivotSidePanelStore = class extends SpreadsheetStore {
|
|
42146
|
+
pivotId;
|
|
42076
42147
|
mutators = [
|
|
42077
42148
|
"reset",
|
|
42078
42149
|
"deferUpdates",
|
|
@@ -49574,6 +49645,11 @@ var CellPlugin = class extends CorePlugin {
|
|
|
49574
49645
|
}
|
|
49575
49646
|
};
|
|
49576
49647
|
var FormulaCellWithDependencies = class {
|
|
49648
|
+
id;
|
|
49649
|
+
format;
|
|
49650
|
+
style;
|
|
49651
|
+
sheetId;
|
|
49652
|
+
getRangeString;
|
|
49577
49653
|
isFormula = true;
|
|
49578
49654
|
compiledFormula;
|
|
49579
49655
|
constructor(id, compiledFormula, format, style, dependencies, sheetId, getRangeString) {
|
|
@@ -49608,6 +49684,10 @@ var FormulaCellWithDependencies = class {
|
|
|
49608
49684
|
}
|
|
49609
49685
|
};
|
|
49610
49686
|
var RangeReferenceToken = class {
|
|
49687
|
+
ranges;
|
|
49688
|
+
rangeIndex;
|
|
49689
|
+
sheetId;
|
|
49690
|
+
getRangeString;
|
|
49611
49691
|
type = "REFERENCE";
|
|
49612
49692
|
constructor(ranges, rangeIndex, sheetId, getRangeString) {
|
|
49613
49693
|
this.ranges = ranges;
|
|
@@ -53504,6 +53584,8 @@ function buildCompilationParameters(context, getters, computeCell) {
|
|
|
53504
53584
|
return new CompilationParametersBuilder(context, getters, computeCell).getParameters();
|
|
53505
53585
|
}
|
|
53506
53586
|
var CompilationParametersBuilder = class {
|
|
53587
|
+
getters;
|
|
53588
|
+
computeCell;
|
|
53507
53589
|
evalContext;
|
|
53508
53590
|
rangeCache = {};
|
|
53509
53591
|
constructor(context, getters, computeCell) {
|
|
@@ -53957,6 +54039,7 @@ var ZoneRBush = class extends import_rbush_min.default {
|
|
|
53957
54039
|
* It uses an R-Tree data structure to efficiently find dependent cells.
|
|
53958
54040
|
*/
|
|
53959
54041
|
var FormulaDependencyGraph = class {
|
|
54042
|
+
createEmptyPositionSet;
|
|
53960
54043
|
dependencies = new PositionMap();
|
|
53961
54044
|
rTree;
|
|
53962
54045
|
constructor(createEmptyPositionSet, data = []) {
|
|
@@ -54258,6 +54341,7 @@ const MAX_ITERATION = 30;
|
|
|
54258
54341
|
const ERROR_CYCLE_CELL = Object.freeze(createEvaluatedCell(new CircularDependencyError()));
|
|
54259
54342
|
const EMPTY_CELL = Object.freeze(createEvaluatedCell({ value: null }));
|
|
54260
54343
|
var Evaluator = class {
|
|
54344
|
+
context;
|
|
54261
54345
|
getters;
|
|
54262
54346
|
compilationParams;
|
|
54263
54347
|
evaluatedCells = new PositionMap();
|
|
@@ -56240,6 +56324,7 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
56240
56324
|
"getPivot",
|
|
56241
56325
|
"getFirstPivotFunction",
|
|
56242
56326
|
"getPivotIdFromPosition",
|
|
56327
|
+
"getPivotIdsFromPosition",
|
|
56243
56328
|
"getPivotCellFromPosition",
|
|
56244
56329
|
"generateNewCalculatedMeasureName",
|
|
56245
56330
|
"isPivotUnused",
|
|
@@ -56264,9 +56349,11 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
56264
56349
|
this.refreshPivot(cmd.id);
|
|
56265
56350
|
break;
|
|
56266
56351
|
case "ADD_PIVOT":
|
|
56352
|
+
this.unusedPivots?.push(cmd.pivotId);
|
|
56267
56353
|
this.setupPivot(cmd.pivotId);
|
|
56268
56354
|
break;
|
|
56269
56355
|
case "DUPLICATE_PIVOT":
|
|
56356
|
+
this.unusedPivots?.push(cmd.newPivotId);
|
|
56270
56357
|
this.setupPivot(cmd.newPivotId);
|
|
56271
56358
|
break;
|
|
56272
56359
|
case "UPDATE_PIVOT":
|
|
@@ -56297,37 +56384,52 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
56297
56384
|
}
|
|
56298
56385
|
}
|
|
56299
56386
|
/**
|
|
56300
|
-
* Get the id of the pivot at the given position. Returns undefined if there
|
|
56387
|
+
* Get the id of the first pivot in the formula at the given position. Returns undefined if there
|
|
56301
56388
|
* is no pivot at this position
|
|
56302
56389
|
*/
|
|
56303
56390
|
getPivotIdFromPosition(position) {
|
|
56391
|
+
return this.getPivotIdsFromPosition(position)[0];
|
|
56392
|
+
}
|
|
56393
|
+
/**
|
|
56394
|
+
* Get all of the ids of the pivot present in the formula at the given position.
|
|
56395
|
+
*/
|
|
56396
|
+
getPivotIdsFromPosition(position) {
|
|
56304
56397
|
const cell = this.getters.getCorrespondingFormulaCell(position);
|
|
56305
|
-
if (cell && cell.isFormula)
|
|
56306
|
-
|
|
56307
|
-
|
|
56308
|
-
|
|
56309
|
-
|
|
56310
|
-
|
|
56311
|
-
|
|
56398
|
+
if (cell && cell.isFormula) return this.getPivotIdsFromFormula(position.sheetId, cell.compiledFormula);
|
|
56399
|
+
return [];
|
|
56400
|
+
}
|
|
56401
|
+
getPivotIdsFromFormula(sheetId, formula) {
|
|
56402
|
+
return this.getPivotFunctions(sheetId, formula.tokens).map((pivotFunction) => {
|
|
56403
|
+
const pivotId = pivotFunction.args[0]?.toString();
|
|
56404
|
+
return pivotId && this.getters.getPivotId(pivotId);
|
|
56405
|
+
}).filter(isDefined);
|
|
56312
56406
|
}
|
|
56313
56407
|
isSpillPivotFormula(position) {
|
|
56314
56408
|
const cell = this.getters.getCorrespondingFormulaCell(position);
|
|
56315
56409
|
if (cell && cell.isFormula) return this.getFirstPivotFunction(position.sheetId, cell.compiledFormula.tokens)?.functionName === "PIVOT";
|
|
56316
56410
|
return false;
|
|
56317
56411
|
}
|
|
56318
|
-
|
|
56319
|
-
const
|
|
56320
|
-
if (!
|
|
56321
|
-
const
|
|
56322
|
-
|
|
56323
|
-
functionName,
|
|
56324
|
-
|
|
56412
|
+
getPivotFunctions(sheetId, tokens) {
|
|
56413
|
+
const pivotFunctions = getPivotFunctions(tokens);
|
|
56414
|
+
if (!pivotFunctions.length) return [];
|
|
56415
|
+
const evaluatedPivotFunctions = [];
|
|
56416
|
+
for (const pivotFunction of pivotFunctions) {
|
|
56417
|
+
const { functionName, args } = pivotFunction;
|
|
56418
|
+
const evaluatedArgs = args.map((argAst) => {
|
|
56325
56419
|
if (argAst.type === "EMPTY") return;
|
|
56326
56420
|
else if (argAst.type === "STRING" || argAst.type === "BOOLEAN" || argAst.type === "NUMBER") return argAst.value;
|
|
56327
56421
|
const argsString = astToFormula(argAst);
|
|
56328
56422
|
return this.getters.evaluateFormula(sheetId, argsString);
|
|
56329
|
-
})
|
|
56330
|
-
|
|
56423
|
+
});
|
|
56424
|
+
evaluatedPivotFunctions.push({
|
|
56425
|
+
functionName,
|
|
56426
|
+
args: evaluatedArgs
|
|
56427
|
+
});
|
|
56428
|
+
}
|
|
56429
|
+
return evaluatedPivotFunctions;
|
|
56430
|
+
}
|
|
56431
|
+
getFirstPivotFunction(sheetId, tokens) {
|
|
56432
|
+
return this.getPivotFunctions(sheetId, tokens)[0];
|
|
56331
56433
|
}
|
|
56332
56434
|
/**
|
|
56333
56435
|
* Returns the domain args of a pivot formula from a position.
|
|
@@ -56421,8 +56523,8 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
56421
56523
|
const unusedPivots = new Set(this.getters.getPivotIds());
|
|
56422
56524
|
for (const sheetId of this.getters.getSheetIds()) for (const cellId in this.getters.getCells(sheetId)) {
|
|
56423
56525
|
const position = this.getters.getCellPosition(cellId);
|
|
56424
|
-
const
|
|
56425
|
-
|
|
56526
|
+
const pivotIds = this.getPivotIdsFromPosition(position);
|
|
56527
|
+
for (const pivotId of pivotIds) {
|
|
56426
56528
|
unusedPivots.delete(pivotId);
|
|
56427
56529
|
if (!unusedPivots.size) {
|
|
56428
56530
|
this.unusedPivots = [];
|
|
@@ -56430,6 +56532,21 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
56430
56532
|
}
|
|
56431
56533
|
}
|
|
56432
56534
|
}
|
|
56535
|
+
for (const pivotId of this.getters.getPivotIds()) {
|
|
56536
|
+
const pivot = this.getters.getPivotCoreDefinition(pivotId);
|
|
56537
|
+
for (const measure of pivot.measures) if (measure.computedBy) {
|
|
56538
|
+
const { sheetId } = measure.computedBy;
|
|
56539
|
+
const formula = this.getters.getMeasureCompiledFormula(pivotId, measure);
|
|
56540
|
+
const relatedPivotIds = this.getPivotIdsFromFormula(sheetId, formula);
|
|
56541
|
+
for (const relatedPivotId of relatedPivotIds) {
|
|
56542
|
+
unusedPivots.delete(relatedPivotId);
|
|
56543
|
+
if (!unusedPivots.size) {
|
|
56544
|
+
this.unusedPivots = [];
|
|
56545
|
+
return [];
|
|
56546
|
+
}
|
|
56547
|
+
}
|
|
56548
|
+
}
|
|
56549
|
+
}
|
|
56433
56550
|
this.unusedPivots = [...unusedPivots];
|
|
56434
56551
|
return this.unusedPivots;
|
|
56435
56552
|
}
|
|
@@ -57582,6 +57699,8 @@ function transformPositionWithMerge(toTransform, executed) {
|
|
|
57582
57699
|
//#endregion
|
|
57583
57700
|
//#region src/collaborative/revisions.ts
|
|
57584
57701
|
var Revision = class {
|
|
57702
|
+
rootCommand;
|
|
57703
|
+
timestamp;
|
|
57585
57704
|
id;
|
|
57586
57705
|
clientId;
|
|
57587
57706
|
_commands = [];
|
|
@@ -57618,6 +57737,9 @@ var Revision = class {
|
|
|
57618
57737
|
//#region src/collaborative/session.ts
|
|
57619
57738
|
var ClientDisconnectedError = class extends Error {};
|
|
57620
57739
|
var Session = class extends EventBus {
|
|
57740
|
+
revisions;
|
|
57741
|
+
transportService;
|
|
57742
|
+
serverRevisionId;
|
|
57621
57743
|
/**
|
|
57622
57744
|
* Positions of the others client.
|
|
57623
57745
|
*/
|
|
@@ -61057,6 +61179,9 @@ var GridSelectionPlugin = class extends UIPlugin {
|
|
|
61057
61179
|
//#endregion
|
|
61058
61180
|
//#region src/helpers/internal_viewport.ts
|
|
61059
61181
|
var InternalViewport = class {
|
|
61182
|
+
getters;
|
|
61183
|
+
sheetId;
|
|
61184
|
+
boundaries;
|
|
61060
61185
|
top;
|
|
61061
61186
|
bottom;
|
|
61062
61187
|
left;
|
|
@@ -64270,6 +64395,7 @@ function instantiateClipboard() {
|
|
|
64270
64395
|
return new WebClipboardWrapper(navigator.clipboard);
|
|
64271
64396
|
}
|
|
64272
64397
|
var WebClipboardWrapper = class {
|
|
64398
|
+
clipboard;
|
|
64273
64399
|
constructor(clipboard) {
|
|
64274
64400
|
this.clipboard = clipboard;
|
|
64275
64401
|
}
|
|
@@ -64748,6 +64874,8 @@ function inverseCommand(cmd) {
|
|
|
64748
64874
|
* @param operations initial operations
|
|
64749
64875
|
*/
|
|
64750
64876
|
var Branch = class Branch {
|
|
64877
|
+
buildTransformation;
|
|
64878
|
+
operations;
|
|
64751
64879
|
constructor(buildTransformation, operations = []) {
|
|
64752
64880
|
this.buildTransformation = buildTransformation;
|
|
64753
64881
|
this.operations = operations;
|
|
@@ -64864,6 +64992,8 @@ var Branch = class Branch {
|
|
|
64864
64992
|
* to revert it).
|
|
64865
64993
|
*/
|
|
64866
64994
|
var Operation = class {
|
|
64995
|
+
id;
|
|
64996
|
+
data;
|
|
64867
64997
|
constructor(id, data) {
|
|
64868
64998
|
this.id = id;
|
|
64869
64999
|
this.data = data;
|
|
@@ -64873,6 +65003,8 @@ var Operation = class {
|
|
|
64873
65003
|
}
|
|
64874
65004
|
};
|
|
64875
65005
|
var LazyOperation = class LazyOperation {
|
|
65006
|
+
id;
|
|
65007
|
+
lazyData;
|
|
64876
65008
|
constructor(id, lazyData) {
|
|
64877
65009
|
this.id = id;
|
|
64878
65010
|
this.lazyData = lazyData;
|
|
@@ -64898,6 +65030,7 @@ var LazyOperation = class LazyOperation {
|
|
|
64898
65030
|
* ```
|
|
64899
65031
|
*/
|
|
64900
65032
|
var OperationSequence = class OperationSequence {
|
|
65033
|
+
operations;
|
|
64901
65034
|
constructor(operations) {
|
|
64902
65035
|
this.operations = operations;
|
|
64903
65036
|
}
|
|
@@ -64973,6 +65106,7 @@ var OperationSequence = class OperationSequence {
|
|
|
64973
65106
|
*
|
|
64974
65107
|
*/
|
|
64975
65108
|
var Tree = class {
|
|
65109
|
+
buildTransformation;
|
|
64976
65110
|
branches;
|
|
64977
65111
|
branchingOperationIds = /* @__PURE__ */ new Map();
|
|
64978
65112
|
constructor(buildTransformation, initialBranch) {
|
|
@@ -65555,6 +65689,7 @@ var EventStream = class {
|
|
|
65555
65689
|
* with the new selected anchor
|
|
65556
65690
|
*/
|
|
65557
65691
|
var SelectionStreamProcessorImpl = class {
|
|
65692
|
+
getters;
|
|
65558
65693
|
stream;
|
|
65559
65694
|
/**
|
|
65560
65695
|
* "Active" anchor used as a reference to compute new anchors
|
|
@@ -68802,6 +68937,6 @@ const chartHelpers = {
|
|
|
68802
68937
|
//#endregion
|
|
68803
68938
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, 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, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
68804
68939
|
|
|
68805
|
-
__info__.version = "18.2.
|
|
68806
|
-
__info__.date = "2026-
|
|
68807
|
-
__info__.hash = "
|
|
68940
|
+
__info__.version = "18.2.55";
|
|
68941
|
+
__info__.date = "2026-06-06T06:20:23.893Z";
|
|
68942
|
+
__info__.hash = "57b568a";
|