@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
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
@@ -1383,6 +1383,7 @@ function getAlternatingColorsPalette(quantity) {
|
|
|
1383
1383
|
else return ALTERNATING_COLORS_XL;
|
|
1384
1384
|
}
|
|
1385
1385
|
var ColorGenerator = class {
|
|
1386
|
+
preferredColors;
|
|
1386
1387
|
currentColorIndex = 0;
|
|
1387
1388
|
palette;
|
|
1388
1389
|
constructor(paletteSize, preferredColors = []) {
|
|
@@ -1590,6 +1591,7 @@ const _t = function(s, ...values) {
|
|
|
1590
1591
|
return sprintf(_translate(s), ...values);
|
|
1591
1592
|
};
|
|
1592
1593
|
var LazyTranslatedString = class extends String {
|
|
1594
|
+
values;
|
|
1593
1595
|
constructor(str, values) {
|
|
1594
1596
|
super(str);
|
|
1595
1597
|
this.values = values;
|
|
@@ -2725,6 +2727,8 @@ const CellErrorType = {
|
|
|
2725
2727
|
};
|
|
2726
2728
|
const errorTypes = new Set(Object.values(CellErrorType));
|
|
2727
2729
|
var EvaluationError = class {
|
|
2730
|
+
message;
|
|
2731
|
+
value;
|
|
2728
2732
|
constructor(message = _t("Error"), value = CellErrorType.GenericError) {
|
|
2729
2733
|
this.message = message;
|
|
2730
2734
|
this.value = value;
|
|
@@ -2757,6 +2761,7 @@ var UnknownFunctionError = class extends EvaluationError {
|
|
|
2757
2761
|
}
|
|
2758
2762
|
};
|
|
2759
2763
|
var SplillBlockedError = class extends EvaluationError {
|
|
2764
|
+
errorOriginPosition;
|
|
2760
2765
|
constructor(message = _t("Spill range is not empty"), errorOriginPosition) {
|
|
2761
2766
|
super(message, CellErrorType.SpilledBlocked);
|
|
2762
2767
|
this.errorOriginPosition = errorOriginPosition;
|
|
@@ -3396,6 +3401,7 @@ function emptyDataErrorMessage(argName) {
|
|
|
3396
3401
|
//#endregion
|
|
3397
3402
|
//#region src/helpers/format/format_tokenizer.ts
|
|
3398
3403
|
function tokenizeFormat(str) {
|
|
3404
|
+
str = str.replace(/\s/g, " ");
|
|
3399
3405
|
const chars = new TokenizingChars(str);
|
|
3400
3406
|
const result = [];
|
|
3401
3407
|
let currentFormatPart = [];
|
|
@@ -5658,8 +5664,13 @@ function getApplyRangeChangeAddColRow(cmd) {
|
|
|
5658
5664
|
changeType: "NONE",
|
|
5659
5665
|
range
|
|
5660
5666
|
};
|
|
5667
|
+
const isUnboundedAtEnd = range.unboundedZone[end] === void 0;
|
|
5668
|
+
if (isUnboundedAtEnd && !range.unboundedZone.hasHeader) return {
|
|
5669
|
+
changeType: "RESIZE",
|
|
5670
|
+
range: createAdaptedRange(range, dimension, "RESIZE", cmd.quantity)
|
|
5671
|
+
};
|
|
5661
5672
|
if (cmd.position === "after") {
|
|
5662
|
-
if (range.zone[start] <= cmd.base && cmd.base < range.zone[end]) return {
|
|
5673
|
+
if (range.zone[start] <= cmd.base && (cmd.base < range.zone[end] || isUnboundedAtEnd)) return {
|
|
5663
5674
|
changeType: "RESIZE",
|
|
5664
5675
|
range: createAdaptedRange(range, dimension, "RESIZE", cmd.quantity)
|
|
5665
5676
|
};
|
|
@@ -6299,6 +6310,8 @@ const selectPastedZone = (selection, sourceZones, pastedZones) => {
|
|
|
6299
6310
|
//#endregion
|
|
6300
6311
|
//#region src/clipboard_handlers/abstract_clipboard_handler.ts
|
|
6301
6312
|
var ClipboardHandler = class {
|
|
6313
|
+
getters;
|
|
6314
|
+
dispatch;
|
|
6302
6315
|
constructor(getters, dispatch) {
|
|
6303
6316
|
this.getters = getters;
|
|
6304
6317
|
this.dispatch = dispatch;
|
|
@@ -8572,6 +8585,7 @@ var DependencyContainer = class extends EventBus {
|
|
|
8572
8585
|
}
|
|
8573
8586
|
};
|
|
8574
8587
|
var StoreFactory = class {
|
|
8588
|
+
get;
|
|
8575
8589
|
pendingBuilds = /* @__PURE__ */ new Set();
|
|
8576
8590
|
constructor(get) {
|
|
8577
8591
|
this.get = get;
|
|
@@ -8616,6 +8630,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
8616
8630
|
return MetaStore;
|
|
8617
8631
|
}
|
|
8618
8632
|
var DisposableStore = class {
|
|
8633
|
+
get;
|
|
8619
8634
|
disposeCallbacks = [];
|
|
8620
8635
|
constructor(get) {
|
|
8621
8636
|
this.get = get;
|
|
@@ -9189,6 +9204,10 @@ const FORCE_DEFAULT_ARGS_FUNCTIONS = {
|
|
|
9189
9204
|
ROUNDDOWN: [{
|
|
9190
9205
|
type: "NUMBER",
|
|
9191
9206
|
value: 0
|
|
9207
|
+
}],
|
|
9208
|
+
IFERROR: [{
|
|
9209
|
+
type: "NUMBER",
|
|
9210
|
+
value: 0
|
|
9192
9211
|
}]
|
|
9193
9212
|
};
|
|
9194
9213
|
/**
|
|
@@ -17231,6 +17250,7 @@ function hasStringMessage(obj) {
|
|
|
17231
17250
|
//#endregion
|
|
17232
17251
|
//#region src/formulas/code_builder.ts
|
|
17233
17252
|
var FunctionCodeBuilder = class {
|
|
17253
|
+
scope;
|
|
17234
17254
|
code = "";
|
|
17235
17255
|
constructor(scope = new Scope()) {
|
|
17236
17256
|
this.scope = scope;
|
|
@@ -17246,6 +17266,8 @@ var FunctionCodeBuilder = class {
|
|
|
17246
17266
|
}
|
|
17247
17267
|
};
|
|
17248
17268
|
var FunctionCodeImpl = class {
|
|
17269
|
+
scope;
|
|
17270
|
+
returnExpression;
|
|
17249
17271
|
code;
|
|
17250
17272
|
constructor(scope, code, returnExpression) {
|
|
17251
17273
|
this.scope = scope;
|
|
@@ -19197,6 +19219,7 @@ function getScorecardConfiguration({ width, height }, runtime) {
|
|
|
19197
19219
|
}, runtime).computeDesign();
|
|
19198
19220
|
}
|
|
19199
19221
|
var ScorecardChartConfigBuilder = class {
|
|
19222
|
+
runtime;
|
|
19200
19223
|
context;
|
|
19201
19224
|
width;
|
|
19202
19225
|
height;
|
|
@@ -22545,6 +22568,10 @@ var GaugeChartComponent = class extends _odoo_owl.Component {
|
|
|
22545
22568
|
* Animation interpolating values using the ease-out quartic curve function (chartJS default easing)
|
|
22546
22569
|
*/
|
|
22547
22570
|
var Animation = class {
|
|
22571
|
+
startValue;
|
|
22572
|
+
endValue;
|
|
22573
|
+
duration;
|
|
22574
|
+
callback;
|
|
22548
22575
|
startTime = void 0;
|
|
22549
22576
|
animationFrameId = null;
|
|
22550
22577
|
constructor(startValue, endValue, duration, callback) {
|
|
@@ -24904,6 +24931,7 @@ function getMaxFigureSize(getters, figureSize) {
|
|
|
24904
24931
|
* Represent a raw XML string
|
|
24905
24932
|
*/
|
|
24906
24933
|
var XMLString = class {
|
|
24934
|
+
xmlString;
|
|
24907
24935
|
/**
|
|
24908
24936
|
* @param xmlString should be a well formed, properly escaped XML string
|
|
24909
24937
|
*/
|
|
@@ -25625,6 +25653,11 @@ var Popover = class extends _odoo_owl.Component {
|
|
|
25625
25653
|
}
|
|
25626
25654
|
};
|
|
25627
25655
|
var PopoverPositionContext = class {
|
|
25656
|
+
anchorRect;
|
|
25657
|
+
containerRect;
|
|
25658
|
+
propsMaxSize;
|
|
25659
|
+
spreadsheetOffset;
|
|
25660
|
+
lastPosition;
|
|
25628
25661
|
constructor(anchorRect, containerRect, propsMaxSize, spreadsheetOffset, lastPosition) {
|
|
25629
25662
|
this.anchorRect = anchorRect;
|
|
25630
25663
|
this.containerRect = containerRect;
|
|
@@ -28840,6 +28873,7 @@ var Composer = class extends _odoo_owl.Component {
|
|
|
28840
28873
|
//#endregion
|
|
28841
28874
|
//#region src/components/composer/standalone_composer/standalone_composer_store.ts
|
|
28842
28875
|
var StandaloneComposerStore = class extends AbstractComposerStore {
|
|
28876
|
+
args;
|
|
28843
28877
|
constructor(get, args) {
|
|
28844
28878
|
super(get);
|
|
28845
28879
|
this.args = args;
|
|
@@ -29895,6 +29929,7 @@ var DOMDndHelper = class {
|
|
|
29895
29929
|
}
|
|
29896
29930
|
};
|
|
29897
29931
|
var ContainerWrapper = class {
|
|
29932
|
+
el;
|
|
29898
29933
|
constructor(el) {
|
|
29899
29934
|
this.el = el;
|
|
29900
29935
|
}
|
|
@@ -29966,6 +30001,10 @@ var FocusStore = class {
|
|
|
29966
30001
|
* This plugin handles this internal state.
|
|
29967
30002
|
*/
|
|
29968
30003
|
var SelectionInputStore = class extends SpreadsheetStore {
|
|
30004
|
+
initialRanges;
|
|
30005
|
+
inputHasSingleRange;
|
|
30006
|
+
colors;
|
|
30007
|
+
disabledRanges;
|
|
29969
30008
|
mutators = [
|
|
29970
30009
|
"resetWithRanges",
|
|
29971
30010
|
"focusById",
|
|
@@ -37022,11 +37061,10 @@ const INSERT_TABLE = (env) => {
|
|
|
37022
37061
|
if (interactiveCreateTable(env, env.model.getters.getActiveSheetId()).isSuccessful) env.openSidePanel("TableSidePanel", {});
|
|
37023
37062
|
};
|
|
37024
37063
|
const DELETE_SELECTED_TABLE = (env) => {
|
|
37025
|
-
const
|
|
37026
|
-
const table = env.model.getters.getTable(position);
|
|
37064
|
+
const table = env.model.getters.getFirstTableInSelection();
|
|
37027
37065
|
if (!table) return;
|
|
37028
37066
|
env.model.dispatch("REMOVE_TABLE", {
|
|
37029
|
-
sheetId:
|
|
37067
|
+
sheetId: env.model.getters.getActiveSheetId(),
|
|
37030
37068
|
target: [table.range.zone]
|
|
37031
37069
|
});
|
|
37032
37070
|
};
|
|
@@ -47501,6 +47539,8 @@ var MoreFormatsPanel = class extends _odoo_owl.Component {
|
|
|
47501
47539
|
//#endregion
|
|
47502
47540
|
//#region src/components/side_panel/pivot/pivot_measure_display_panel/pivot_measure_display_panel_store.ts
|
|
47503
47541
|
var PivotMeasureDisplayPanelStore = class extends SpreadsheetStore {
|
|
47542
|
+
pivotId;
|
|
47543
|
+
initialMeasure;
|
|
47504
47544
|
mutators = [
|
|
47505
47545
|
"cancelMeasureDisplayEdition",
|
|
47506
47546
|
"updateMeasureDisplayType",
|
|
@@ -47700,7 +47740,7 @@ function getVisiblePivotCellPositions(getters, pivotId) {
|
|
|
47700
47740
|
col,
|
|
47701
47741
|
row
|
|
47702
47742
|
};
|
|
47703
|
-
if (
|
|
47743
|
+
if (getters.getPivotIdsFromPosition(position).includes(pivotId)) positions.push(position);
|
|
47704
47744
|
}
|
|
47705
47745
|
return positions;
|
|
47706
47746
|
}
|
|
@@ -48625,6 +48665,9 @@ function extractFormulaIdFromToken(tokenAtCursor) {
|
|
|
48625
48665
|
function getFirstPivotFunction(tokens) {
|
|
48626
48666
|
return getFunctionsFromTokens(tokens, PIVOT_FUNCTIONS)[0];
|
|
48627
48667
|
}
|
|
48668
|
+
function getPivotFunctions(tokens) {
|
|
48669
|
+
return getFunctionsFromTokens(tokens, PIVOT_FUNCTIONS);
|
|
48670
|
+
}
|
|
48628
48671
|
/**
|
|
48629
48672
|
* Parse a spreadsheet formula and detect the number of PIVOT functions that are
|
|
48630
48673
|
* present in the given formula.
|
|
@@ -48674,13 +48717,30 @@ function createMeasure(fields, measure) {
|
|
|
48674
48717
|
} : fields[fieldName];
|
|
48675
48718
|
const aggregator = measure.aggregator;
|
|
48676
48719
|
return {
|
|
48720
|
+
/**
|
|
48721
|
+
* Get the id of the measure, as it is stored in the pivot formula
|
|
48722
|
+
*/
|
|
48677
48723
|
id: measure.id,
|
|
48724
|
+
/**
|
|
48725
|
+
* Display name of the measure
|
|
48726
|
+
* e.g. "__count" -> "Count", "amount_total" -> "Total Amount"
|
|
48727
|
+
*/
|
|
48678
48728
|
get displayName() {
|
|
48679
48729
|
return measure.userDefinedName ?? field?.string ?? measure.fieldName;
|
|
48680
48730
|
},
|
|
48681
48731
|
userDefinedName: measure.userDefinedName,
|
|
48732
|
+
/**
|
|
48733
|
+
* Get the name of the field of the measure
|
|
48734
|
+
*/
|
|
48682
48735
|
fieldName,
|
|
48736
|
+
/**
|
|
48737
|
+
* Get the aggregator of the measure
|
|
48738
|
+
*/
|
|
48683
48739
|
aggregator,
|
|
48740
|
+
/**
|
|
48741
|
+
* Get the type of the measure field
|
|
48742
|
+
* e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
|
|
48743
|
+
*/
|
|
48684
48744
|
type: fieldName === "__count" ? "integer" : field?.type ?? "integer",
|
|
48685
48745
|
isValid: !!(field || measure.computedBy),
|
|
48686
48746
|
isHidden: measure.isHidden,
|
|
@@ -48694,10 +48754,30 @@ function createPivotDimension(fields, dimension) {
|
|
|
48694
48754
|
const type = field?.type ?? "integer";
|
|
48695
48755
|
const granularity = field && isDateOrDatetimeField(field) ? dimension.granularity : void 0;
|
|
48696
48756
|
return {
|
|
48757
|
+
/**
|
|
48758
|
+
* Get the display name of the dimension
|
|
48759
|
+
* e.g. "stage_id" -> "Stage", "create_date:month" -> "Create Date"
|
|
48760
|
+
*/
|
|
48697
48761
|
displayName: field?.string ?? dimension.fieldName,
|
|
48762
|
+
/**
|
|
48763
|
+
* Get the name of the dimension, as it is stored in the pivot formula
|
|
48764
|
+
* e.g. "stage_id", "create_date:month"
|
|
48765
|
+
*/
|
|
48698
48766
|
nameWithGranularity: dimension.fieldName + (granularity ? `:${granularity}` : ""),
|
|
48767
|
+
/**
|
|
48768
|
+
* Get the name of the field of the dimension
|
|
48769
|
+
* e.g. "stage_id" -> "stage_id", "create_date:month" -> "create_date"
|
|
48770
|
+
*/
|
|
48699
48771
|
fieldName: dimension.fieldName,
|
|
48772
|
+
/**
|
|
48773
|
+
* Get the aggregate operator of the dimension
|
|
48774
|
+
* e.g. "stage_id" -> undefined, "create_date:month" -> "month"
|
|
48775
|
+
*/
|
|
48700
48776
|
granularity,
|
|
48777
|
+
/**
|
|
48778
|
+
* Get the type of the field of the dimension
|
|
48779
|
+
* e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
|
|
48780
|
+
*/
|
|
48701
48781
|
type,
|
|
48702
48782
|
order: dimension.order,
|
|
48703
48783
|
isValid: !!field
|
|
@@ -49774,6 +49854,7 @@ function adaptPivotRange(range, applyChange) {
|
|
|
49774
49854
|
//#endregion
|
|
49775
49855
|
//#region src/components/side_panel/pivot/pivot_side_panel/pivot_side_panel_store.ts
|
|
49776
49856
|
var PivotSidePanelStore = class extends SpreadsheetStore {
|
|
49857
|
+
pivotId;
|
|
49777
49858
|
mutators = [
|
|
49778
49859
|
"reset",
|
|
49779
49860
|
"deferUpdates",
|
|
@@ -53330,6 +53411,11 @@ var CellPlugin = class extends CorePlugin {
|
|
|
53330
53411
|
}
|
|
53331
53412
|
};
|
|
53332
53413
|
var FormulaCellWithDependencies = class {
|
|
53414
|
+
id;
|
|
53415
|
+
format;
|
|
53416
|
+
style;
|
|
53417
|
+
sheetId;
|
|
53418
|
+
getRangeString;
|
|
53333
53419
|
isFormula = true;
|
|
53334
53420
|
compiledFormula;
|
|
53335
53421
|
constructor(id, compiledFormula, format, style, dependencies, sheetId, getRangeString) {
|
|
@@ -53364,6 +53450,10 @@ var FormulaCellWithDependencies = class {
|
|
|
53364
53450
|
}
|
|
53365
53451
|
};
|
|
53366
53452
|
var RangeReferenceToken = class {
|
|
53453
|
+
ranges;
|
|
53454
|
+
rangeIndex;
|
|
53455
|
+
sheetId;
|
|
53456
|
+
getRangeString;
|
|
53367
53457
|
type = "REFERENCE";
|
|
53368
53458
|
constructor(ranges, rangeIndex, sheetId, getRangeString) {
|
|
53369
53459
|
this.ranges = ranges;
|
|
@@ -57149,6 +57239,8 @@ function buildCompilationParameters(context, getters, computeCell) {
|
|
|
57149
57239
|
return new CompilationParametersBuilder(context, getters, computeCell).getParameters();
|
|
57150
57240
|
}
|
|
57151
57241
|
var CompilationParametersBuilder = class {
|
|
57242
|
+
getters;
|
|
57243
|
+
computeCell;
|
|
57152
57244
|
evalContext;
|
|
57153
57245
|
rangeCache = {};
|
|
57154
57246
|
constructor(context, getters, computeCell) {
|
|
@@ -57786,6 +57878,7 @@ var ZoneRBush = class extends import_rbush.default {
|
|
|
57786
57878
|
* It uses an R-Tree data structure to efficiently find dependent cells.
|
|
57787
57879
|
*/
|
|
57788
57880
|
var FormulaDependencyGraph = class {
|
|
57881
|
+
createEmptyPositionSet;
|
|
57789
57882
|
dependencies = new PositionMap();
|
|
57790
57883
|
rTree;
|
|
57791
57884
|
constructor(createEmptyPositionSet, data = []) {
|
|
@@ -58087,6 +58180,7 @@ const MAX_ITERATION = 30;
|
|
|
58087
58180
|
const ERROR_CYCLE_CELL = Object.freeze(createEvaluatedCell(new CircularDependencyError()));
|
|
58088
58181
|
const EMPTY_CELL = Object.freeze(createEvaluatedCell({ value: null }));
|
|
58089
58182
|
var Evaluator = class {
|
|
58183
|
+
context;
|
|
58090
58184
|
getters;
|
|
58091
58185
|
compilationParams;
|
|
58092
58186
|
evaluatedCells = new PositionMap();
|
|
@@ -60342,6 +60436,7 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
60342
60436
|
"getPivot",
|
|
60343
60437
|
"getFirstPivotFunction",
|
|
60344
60438
|
"getPivotIdFromPosition",
|
|
60439
|
+
"getPivotIdsFromPosition",
|
|
60345
60440
|
"getPivotCellFromPosition",
|
|
60346
60441
|
"generateNewCalculatedMeasureName",
|
|
60347
60442
|
"isPivotUnused",
|
|
@@ -60366,9 +60461,11 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
60366
60461
|
this.refreshPivot(cmd.id);
|
|
60367
60462
|
break;
|
|
60368
60463
|
case "ADD_PIVOT":
|
|
60464
|
+
this.unusedPivots?.push(cmd.pivotId);
|
|
60369
60465
|
this.setupPivot(cmd.pivotId);
|
|
60370
60466
|
break;
|
|
60371
60467
|
case "DUPLICATE_PIVOT":
|
|
60468
|
+
this.unusedPivots?.push(cmd.newPivotId);
|
|
60372
60469
|
this.setupPivot(cmd.newPivotId);
|
|
60373
60470
|
break;
|
|
60374
60471
|
case "UPDATE_PIVOT":
|
|
@@ -60399,37 +60496,52 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
60399
60496
|
}
|
|
60400
60497
|
}
|
|
60401
60498
|
/**
|
|
60402
|
-
* Get the id of the pivot at the given position. Returns undefined if there
|
|
60499
|
+
* Get the id of the first pivot in the formula at the given position. Returns undefined if there
|
|
60403
60500
|
* is no pivot at this position
|
|
60404
60501
|
*/
|
|
60405
60502
|
getPivotIdFromPosition(position) {
|
|
60503
|
+
return this.getPivotIdsFromPosition(position)[0];
|
|
60504
|
+
}
|
|
60505
|
+
/**
|
|
60506
|
+
* Get all of the ids of the pivot present in the formula at the given position.
|
|
60507
|
+
*/
|
|
60508
|
+
getPivotIdsFromPosition(position) {
|
|
60406
60509
|
const cell = this.getters.getCorrespondingFormulaCell(position);
|
|
60407
|
-
if (cell && cell.isFormula)
|
|
60408
|
-
|
|
60409
|
-
|
|
60410
|
-
|
|
60411
|
-
|
|
60412
|
-
|
|
60413
|
-
|
|
60510
|
+
if (cell && cell.isFormula) return this.getPivotIdsFromFormula(position.sheetId, cell.compiledFormula);
|
|
60511
|
+
return [];
|
|
60512
|
+
}
|
|
60513
|
+
getPivotIdsFromFormula(sheetId, formula) {
|
|
60514
|
+
return this.getPivotFunctions(sheetId, formula.tokens).map((pivotFunction) => {
|
|
60515
|
+
const pivotId = pivotFunction.args[0]?.toString();
|
|
60516
|
+
return pivotId && this.getters.getPivotId(pivotId);
|
|
60517
|
+
}).filter(isDefined);
|
|
60414
60518
|
}
|
|
60415
60519
|
isSpillPivotFormula(position) {
|
|
60416
60520
|
const cell = this.getters.getCorrespondingFormulaCell(position);
|
|
60417
60521
|
if (cell && cell.isFormula) return this.getFirstPivotFunction(position.sheetId, cell.compiledFormula.tokens)?.functionName === "PIVOT";
|
|
60418
60522
|
return false;
|
|
60419
60523
|
}
|
|
60420
|
-
|
|
60421
|
-
const
|
|
60422
|
-
if (!
|
|
60423
|
-
const
|
|
60424
|
-
|
|
60425
|
-
functionName,
|
|
60426
|
-
|
|
60524
|
+
getPivotFunctions(sheetId, tokens) {
|
|
60525
|
+
const pivotFunctions = getPivotFunctions(tokens);
|
|
60526
|
+
if (!pivotFunctions.length) return [];
|
|
60527
|
+
const evaluatedPivotFunctions = [];
|
|
60528
|
+
for (const pivotFunction of pivotFunctions) {
|
|
60529
|
+
const { functionName, args } = pivotFunction;
|
|
60530
|
+
const evaluatedArgs = args.map((argAst) => {
|
|
60427
60531
|
if (argAst.type === "EMPTY") return;
|
|
60428
60532
|
else if (argAst.type === "STRING" || argAst.type === "BOOLEAN" || argAst.type === "NUMBER") return argAst.value;
|
|
60429
60533
|
const argsString = astToFormula(argAst);
|
|
60430
60534
|
return this.getters.evaluateFormula(sheetId, argsString);
|
|
60431
|
-
})
|
|
60432
|
-
|
|
60535
|
+
});
|
|
60536
|
+
evaluatedPivotFunctions.push({
|
|
60537
|
+
functionName,
|
|
60538
|
+
args: evaluatedArgs
|
|
60539
|
+
});
|
|
60540
|
+
}
|
|
60541
|
+
return evaluatedPivotFunctions;
|
|
60542
|
+
}
|
|
60543
|
+
getFirstPivotFunction(sheetId, tokens) {
|
|
60544
|
+
return this.getPivotFunctions(sheetId, tokens)[0];
|
|
60433
60545
|
}
|
|
60434
60546
|
/**
|
|
60435
60547
|
* Returns the domain args of a pivot formula from a position.
|
|
@@ -60533,8 +60645,8 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
60533
60645
|
const unusedPivots = new Set(this.getters.getPivotIds());
|
|
60534
60646
|
for (const sheetId of this.getters.getSheetIds()) for (const cellId in this.getters.getCells(sheetId)) {
|
|
60535
60647
|
const position = this.getters.getCellPosition(cellId);
|
|
60536
|
-
const
|
|
60537
|
-
|
|
60648
|
+
const pivotIds = this.getPivotIdsFromPosition(position);
|
|
60649
|
+
for (const pivotId of pivotIds) {
|
|
60538
60650
|
unusedPivots.delete(pivotId);
|
|
60539
60651
|
if (!unusedPivots.size) {
|
|
60540
60652
|
this.unusedPivots = [];
|
|
@@ -60542,6 +60654,21 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
60542
60654
|
}
|
|
60543
60655
|
}
|
|
60544
60656
|
}
|
|
60657
|
+
for (const pivotId of this.getters.getPivotIds()) {
|
|
60658
|
+
const pivot = this.getters.getPivotCoreDefinition(pivotId);
|
|
60659
|
+
for (const measure of pivot.measures) if (measure.computedBy) {
|
|
60660
|
+
const { sheetId } = measure.computedBy;
|
|
60661
|
+
const formula = this.getters.getMeasureCompiledFormula(pivotId, measure);
|
|
60662
|
+
const relatedPivotIds = this.getPivotIdsFromFormula(sheetId, formula);
|
|
60663
|
+
for (const relatedPivotId of relatedPivotIds) {
|
|
60664
|
+
unusedPivots.delete(relatedPivotId);
|
|
60665
|
+
if (!unusedPivots.size) {
|
|
60666
|
+
this.unusedPivots = [];
|
|
60667
|
+
return [];
|
|
60668
|
+
}
|
|
60669
|
+
}
|
|
60670
|
+
}
|
|
60671
|
+
}
|
|
60545
60672
|
this.unusedPivots = [...unusedPivots];
|
|
60546
60673
|
return this.unusedPivots;
|
|
60547
60674
|
}
|
|
@@ -62142,6 +62269,8 @@ function transformPositionWithMerge(toTransform, executed) {
|
|
|
62142
62269
|
//#endregion
|
|
62143
62270
|
//#region src/collaborative/revisions.ts
|
|
62144
62271
|
var Revision = class {
|
|
62272
|
+
rootCommand;
|
|
62273
|
+
timestamp;
|
|
62145
62274
|
id;
|
|
62146
62275
|
clientId;
|
|
62147
62276
|
_commands = [];
|
|
@@ -62178,6 +62307,9 @@ var Revision = class {
|
|
|
62178
62307
|
//#region src/collaborative/session.ts
|
|
62179
62308
|
var ClientDisconnectedError = class extends Error {};
|
|
62180
62309
|
var Session = class extends EventBus {
|
|
62310
|
+
revisions;
|
|
62311
|
+
transportService;
|
|
62312
|
+
serverRevisionId;
|
|
62181
62313
|
/**
|
|
62182
62314
|
* Positions of the others client.
|
|
62183
62315
|
*/
|
|
@@ -65864,6 +65996,9 @@ var GridSelectionPlugin = class extends UIPlugin {
|
|
|
65864
65996
|
//#endregion
|
|
65865
65997
|
//#region src/helpers/internal_viewport.ts
|
|
65866
65998
|
var InternalViewport = class {
|
|
65999
|
+
getters;
|
|
66000
|
+
sheetId;
|
|
66001
|
+
boundaries;
|
|
65867
66002
|
top;
|
|
65868
66003
|
bottom;
|
|
65869
66004
|
left;
|
|
@@ -70793,6 +70928,7 @@ function instantiateClipboard() {
|
|
|
70793
70928
|
return new WebClipboardWrapper(navigator.clipboard);
|
|
70794
70929
|
}
|
|
70795
70930
|
var WebClipboardWrapper = class {
|
|
70931
|
+
clipboard;
|
|
70796
70932
|
constructor(clipboard) {
|
|
70797
70933
|
this.clipboard = clipboard;
|
|
70798
70934
|
}
|
|
@@ -71293,6 +71429,8 @@ function inverseCommand(cmd) {
|
|
|
71293
71429
|
* @param operations initial operations
|
|
71294
71430
|
*/
|
|
71295
71431
|
var Branch = class Branch {
|
|
71432
|
+
buildTransformation;
|
|
71433
|
+
operations;
|
|
71296
71434
|
constructor(buildTransformation, operations = []) {
|
|
71297
71435
|
this.buildTransformation = buildTransformation;
|
|
71298
71436
|
this.operations = operations;
|
|
@@ -71409,6 +71547,8 @@ var Branch = class Branch {
|
|
|
71409
71547
|
* to revert it).
|
|
71410
71548
|
*/
|
|
71411
71549
|
var Operation = class {
|
|
71550
|
+
id;
|
|
71551
|
+
data;
|
|
71412
71552
|
constructor(id, data) {
|
|
71413
71553
|
this.id = id;
|
|
71414
71554
|
this.data = data;
|
|
@@ -71418,6 +71558,8 @@ var Operation = class {
|
|
|
71418
71558
|
}
|
|
71419
71559
|
};
|
|
71420
71560
|
var LazyOperation = class LazyOperation {
|
|
71561
|
+
id;
|
|
71562
|
+
lazyData;
|
|
71421
71563
|
constructor(id, lazyData) {
|
|
71422
71564
|
this.id = id;
|
|
71423
71565
|
this.lazyData = lazyData;
|
|
@@ -71443,6 +71585,7 @@ var LazyOperation = class LazyOperation {
|
|
|
71443
71585
|
* ```
|
|
71444
71586
|
*/
|
|
71445
71587
|
var OperationSequence = class OperationSequence {
|
|
71588
|
+
operations;
|
|
71446
71589
|
constructor(operations) {
|
|
71447
71590
|
this.operations = operations;
|
|
71448
71591
|
}
|
|
@@ -71518,6 +71661,7 @@ var OperationSequence = class OperationSequence {
|
|
|
71518
71661
|
*
|
|
71519
71662
|
*/
|
|
71520
71663
|
var Tree = class {
|
|
71664
|
+
buildTransformation;
|
|
71521
71665
|
branches;
|
|
71522
71666
|
branchingOperationIds = /* @__PURE__ */ new Map();
|
|
71523
71667
|
constructor(buildTransformation, initialBranch) {
|
|
@@ -72097,6 +72241,7 @@ var EventStream = class {
|
|
|
72097
72241
|
* with the new selected anchor
|
|
72098
72242
|
*/
|
|
72099
72243
|
var SelectionStreamProcessorImpl = class {
|
|
72244
|
+
getters;
|
|
72100
72245
|
stream;
|
|
72101
72246
|
/**
|
|
72102
72247
|
* "Active" anchor used as a reference to compute new anchors
|
|
@@ -75453,6 +75598,6 @@ exports.stores = stores;
|
|
|
75453
75598
|
exports.tokenColors = tokenColors;
|
|
75454
75599
|
exports.tokenize = tokenize;
|
|
75455
75600
|
|
|
75456
|
-
__info__.version = "18.4.
|
|
75457
|
-
__info__.date = "2026-
|
|
75458
|
-
__info__.hash = "
|
|
75601
|
+
__info__.version = "18.4.42";
|
|
75602
|
+
__info__.date = "2026-06-06T06:21:28.088Z";
|
|
75603
|
+
__info__.hash = "bae6e25";
|
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 18.4.
|
|
6
|
-
* @date 2026-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.4.42
|
|
6
|
+
* @date 2026-06-06T06:21:29.595Z
|
|
7
|
+
* @hash bae6e25
|
|
8
8
|
*/
|
|
9
9
|
/* Originates from src/components/top_bar/top_bar.scss */
|
|
10
10
|
@media (max-width: 1200px) {
|