@odoo/o-spreadsheet 18.0.11 → 18.0.13
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 +137 -58
- package/dist/o-spreadsheet.d.ts +28 -15
- package/dist/o-spreadsheet.esm.js +137 -58
- package/dist/o-spreadsheet.iife.js +137 -58
- package/dist/o-spreadsheet.iife.min.js +55 -55
- package/dist/o_spreadsheet.xml +3 -3
- package/package.json +1 -1
|
@@ -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.0.
|
|
6
|
-
* @date 2025-01-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.0.13
|
|
6
|
+
* @date 2025-01-31T07:59:17.481Z
|
|
7
|
+
* @hash f505971
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
|
|
@@ -3183,11 +3183,11 @@ const getInvaluableSymbolsRegexp = memoize(function getInvaluableSymbolsRegexp(l
|
|
|
3183
3183
|
* number from the point of view of the isNumber function.
|
|
3184
3184
|
*/
|
|
3185
3185
|
function parseNumber(str, locale) {
|
|
3186
|
+
// remove invaluable characters
|
|
3187
|
+
str = str.replace(getInvaluableSymbolsRegexp(locale), "");
|
|
3186
3188
|
if (locale.decimalSeparator !== ".") {
|
|
3187
3189
|
str = str.replace(locale.decimalSeparator, ".");
|
|
3188
3190
|
}
|
|
3189
|
-
// remove invaluable characters
|
|
3190
|
-
str = str.replace(getInvaluableSymbolsRegexp(locale), "");
|
|
3191
3191
|
let n = Number(str);
|
|
3192
3192
|
if (isNaN(n) && str.includes("%")) {
|
|
3193
3193
|
n = Number(str.split("%")[0]);
|
|
@@ -4282,7 +4282,7 @@ function dichotomicSearch(data, target, mode, sortOrder, rangeLength, getValueIn
|
|
|
4282
4282
|
* @param reverseSearch if true, search in the array starting from the end.
|
|
4283
4283
|
|
|
4284
4284
|
*/
|
|
4285
|
-
function linearSearch(data, target, mode, numberOfValues, getValueInData, reverseSearch = false) {
|
|
4285
|
+
function linearSearch(data, target, mode, numberOfValues, getValueInData, lookupCaches, reverseSearch = false) {
|
|
4286
4286
|
if (target === undefined || target.value === null) {
|
|
4287
4287
|
return -1;
|
|
4288
4288
|
}
|
|
@@ -4291,17 +4291,48 @@ function linearSearch(data, target, mode, numberOfValues, getValueInData, revers
|
|
|
4291
4291
|
}
|
|
4292
4292
|
const _target = normalizeValue(target.value);
|
|
4293
4293
|
const getValue = reverseSearch
|
|
4294
|
-
? (data, i) => getValueInData(data, numberOfValues - i - 1)
|
|
4295
|
-
: getValueInData;
|
|
4294
|
+
? (data, i) => normalizeValue(getValueInData(data, numberOfValues - i - 1))
|
|
4295
|
+
: (data, i) => normalizeValue(getValueInData(data, i));
|
|
4296
|
+
// first check if the target is in the cache
|
|
4297
|
+
const isNotWildcardTarget = mode !== "wildcard" ||
|
|
4298
|
+
typeof _target !== "string" ||
|
|
4299
|
+
!(_target.includes("*") || _target.includes("?"));
|
|
4300
|
+
if (lookupCaches && isNotWildcardTarget) {
|
|
4301
|
+
const searchMode = reverseSearch ? "reverseSearch" : "forwardSearch";
|
|
4302
|
+
let cache = lookupCaches[searchMode].get(data);
|
|
4303
|
+
if (cache === undefined) {
|
|
4304
|
+
// build the cache for all the values
|
|
4305
|
+
cache = new Map();
|
|
4306
|
+
for (let i = 0; i < numberOfValues; i++) {
|
|
4307
|
+
const value = getValue(data, i) ?? null;
|
|
4308
|
+
if (!cache.has(value)) {
|
|
4309
|
+
cache.set(value, i);
|
|
4310
|
+
}
|
|
4311
|
+
}
|
|
4312
|
+
lookupCaches[searchMode].set(data, cache);
|
|
4313
|
+
}
|
|
4314
|
+
if (cache.has(_target)) {
|
|
4315
|
+
const resultIndex = cache.get(_target);
|
|
4316
|
+
return reverseSearch ? numberOfValues - resultIndex - 1 : resultIndex;
|
|
4317
|
+
}
|
|
4318
|
+
if (mode === "strict") {
|
|
4319
|
+
return -1;
|
|
4320
|
+
}
|
|
4321
|
+
}
|
|
4322
|
+
// else perform the linear search
|
|
4323
|
+
const resultIndex = _linearSearch(data, _target, mode, numberOfValues, getValue);
|
|
4324
|
+
return reverseSearch && resultIndex !== -1 ? numberOfValues - resultIndex - 1 : resultIndex;
|
|
4325
|
+
}
|
|
4326
|
+
function _linearSearch(data, _target, mode, numberOfValues, getNormalizeValue) {
|
|
4296
4327
|
let indexMatchTarget = (i) => {
|
|
4297
|
-
return
|
|
4328
|
+
return getNormalizeValue(data, i) === _target;
|
|
4298
4329
|
};
|
|
4299
4330
|
if (mode === "wildcard" &&
|
|
4300
4331
|
typeof _target === "string" &&
|
|
4301
4332
|
(_target.includes("*") || _target.includes("?"))) {
|
|
4302
4333
|
const regExp = wildcardToRegExp(_target);
|
|
4303
4334
|
indexMatchTarget = (i) => {
|
|
4304
|
-
const value =
|
|
4335
|
+
const value = getNormalizeValue(data, i);
|
|
4305
4336
|
if (typeof value === "string") {
|
|
4306
4337
|
return regExp.test(value);
|
|
4307
4338
|
}
|
|
@@ -4312,7 +4343,7 @@ function linearSearch(data, target, mode, numberOfValues, getValueInData, revers
|
|
|
4312
4343
|
let closestMatchIndex = -1;
|
|
4313
4344
|
if (mode === "nextSmaller") {
|
|
4314
4345
|
indexMatchTarget = (i) => {
|
|
4315
|
-
const value =
|
|
4346
|
+
const value = getNormalizeValue(data, i);
|
|
4316
4347
|
if ((!closestMatch && compareCellValues(_target, value) >= 0) ||
|
|
4317
4348
|
(compareCellValues(_target, value) >= 0 && compareCellValues(value, closestMatch) > 0)) {
|
|
4318
4349
|
closestMatch = value;
|
|
@@ -4323,7 +4354,7 @@ function linearSearch(data, target, mode, numberOfValues, getValueInData, revers
|
|
|
4323
4354
|
}
|
|
4324
4355
|
if (mode === "nextGreater") {
|
|
4325
4356
|
indexMatchTarget = (i) => {
|
|
4326
|
-
const value =
|
|
4357
|
+
const value = getNormalizeValue(data, i);
|
|
4327
4358
|
if ((!closestMatch && compareCellValues(_target, value) <= 0) ||
|
|
4328
4359
|
(compareCellValues(_target, value) <= 0 && compareCellValues(value, closestMatch) < 0)) {
|
|
4329
4360
|
closestMatch = value;
|
|
@@ -4334,12 +4365,10 @@ function linearSearch(data, target, mode, numberOfValues, getValueInData, revers
|
|
|
4334
4365
|
}
|
|
4335
4366
|
for (let i = 0; i < numberOfValues; i++) {
|
|
4336
4367
|
if (indexMatchTarget(i)) {
|
|
4337
|
-
return
|
|
4368
|
+
return i;
|
|
4338
4369
|
}
|
|
4339
4370
|
}
|
|
4340
|
-
return
|
|
4341
|
-
? numberOfValues - closestMatchIndex - 1
|
|
4342
|
-
: closestMatchIndex;
|
|
4371
|
+
return closestMatchIndex;
|
|
4343
4372
|
}
|
|
4344
4373
|
/**
|
|
4345
4374
|
* Normalize a value.
|
|
@@ -9455,13 +9484,13 @@ function toExcelDataset(getters, ds) {
|
|
|
9455
9484
|
else if (ds.labelCell) {
|
|
9456
9485
|
label = {
|
|
9457
9486
|
reference: getters.getRangeString(ds.labelCell, "forceSheetReference", {
|
|
9458
|
-
|
|
9487
|
+
useBoundedReference: true,
|
|
9459
9488
|
}),
|
|
9460
9489
|
};
|
|
9461
9490
|
}
|
|
9462
9491
|
return {
|
|
9463
9492
|
label,
|
|
9464
|
-
range: getters.getRangeString(dataRange, "forceSheetReference", {
|
|
9493
|
+
range: getters.getRangeString(dataRange, "forceSheetReference", { useBoundedReference: true }),
|
|
9465
9494
|
backgroundColor: ds.backgroundColor,
|
|
9466
9495
|
rightYAxis: ds.rightYAxis,
|
|
9467
9496
|
};
|
|
@@ -9476,7 +9505,7 @@ function toExcelLabelRange(getters, labelRange, shouldRemoveFirstLabel) {
|
|
|
9476
9505
|
zone.top = zone.top + 1;
|
|
9477
9506
|
}
|
|
9478
9507
|
const range = labelRange.clone({ zone });
|
|
9479
|
-
return getters.getRangeString(range, "forceSheetReference", {
|
|
9508
|
+
return getters.getRangeString(range, "forceSheetReference", { useBoundedReference: true });
|
|
9480
9509
|
}
|
|
9481
9510
|
/**
|
|
9482
9511
|
* Transform a chart definition which supports dataSets (dataSets and LabelRange)
|
|
@@ -9640,11 +9669,7 @@ function interpolateData(config, values, labels, newLabels) {
|
|
|
9640
9669
|
if (values.length < 2 || labels.length < 2 || newLabels.length === 0) {
|
|
9641
9670
|
return [];
|
|
9642
9671
|
}
|
|
9643
|
-
const
|
|
9644
|
-
const labelMax = Math.max(...labels);
|
|
9645
|
-
const labelRange = labelMax - labelMin;
|
|
9646
|
-
const normalizedLabels = labels.map((v) => (v - labelMin) / labelRange);
|
|
9647
|
-
const normalizedNewLabels = newLabels.map((v) => (v - labelMin) / labelRange);
|
|
9672
|
+
const { normalizedLabels, normalizedNewLabels } = normalizeLabels(labels, newLabels, config);
|
|
9648
9673
|
try {
|
|
9649
9674
|
switch (config.type) {
|
|
9650
9675
|
case "polynomial": {
|
|
@@ -9683,6 +9708,30 @@ function interpolateData(config, values, labels, newLabels) {
|
|
|
9683
9708
|
return Array.from({ length: newLabels.length }, () => NaN);
|
|
9684
9709
|
}
|
|
9685
9710
|
}
|
|
9711
|
+
function normalizeLabels(labels, newLabels, config) {
|
|
9712
|
+
let normalizedLabels = [];
|
|
9713
|
+
let normalizedNewLabels = [];
|
|
9714
|
+
if (config.type === "logarithmic") {
|
|
9715
|
+
// Logarithmic trends in charts are used to visualize proportional growth or
|
|
9716
|
+
// relative changes. Therefore, we change the normalization technique for
|
|
9717
|
+
// logarithmic trend lines for a better fit. The method used here is Max Absolute
|
|
9718
|
+
// Scaling. This Technique is ideal for data spanning several orders of magnitude,
|
|
9719
|
+
// as it balances differences between small and large values by compressing larger
|
|
9720
|
+
// values while preserving proportionality and ensuring all values are scaled relative
|
|
9721
|
+
// to the largest magnitude.
|
|
9722
|
+
const labelMax = Math.max(...labels.map(Math.abs));
|
|
9723
|
+
normalizedLabels = labels.map((l) => l / labelMax);
|
|
9724
|
+
normalizedNewLabels = newLabels.map((l) => l / labelMax);
|
|
9725
|
+
}
|
|
9726
|
+
else {
|
|
9727
|
+
const labelMax = Math.max(...labels);
|
|
9728
|
+
const labelMin = Math.min(...labels);
|
|
9729
|
+
const labelRange = labelMax - labelMin;
|
|
9730
|
+
normalizedLabels = labels.map((l) => (l - labelMax) / labelRange);
|
|
9731
|
+
normalizedNewLabels = newLabels.map((l) => (l - labelMax) / labelRange);
|
|
9732
|
+
}
|
|
9733
|
+
return { normalizedLabels, normalizedNewLabels };
|
|
9734
|
+
}
|
|
9686
9735
|
function formatTickValue(localeFormat) {
|
|
9687
9736
|
return (value) => {
|
|
9688
9737
|
value = Number(value);
|
|
@@ -18344,7 +18393,7 @@ const HLOOKUP = {
|
|
|
18344
18393
|
const _isSorted = toBoolean(isSorted.value);
|
|
18345
18394
|
const colIndex = _isSorted
|
|
18346
18395
|
? dichotomicSearch(range, searchKey, "nextSmaller", "asc", range.length, getValueFromRange)
|
|
18347
|
-
: linearSearch(range, searchKey, "wildcard", range.length, getValueFromRange);
|
|
18396
|
+
: linearSearch(range, searchKey, "wildcard", range.length, getValueFromRange, this.lookupCaches);
|
|
18348
18397
|
const col = range[colIndex];
|
|
18349
18398
|
if (col === undefined) {
|
|
18350
18399
|
return valueNotAvailable(searchKey);
|
|
@@ -18496,7 +18545,7 @@ const MATCH = {
|
|
|
18496
18545
|
index = dichotomicSearch(range, searchKey, "nextSmaller", "asc", rangeLen, getElement);
|
|
18497
18546
|
break;
|
|
18498
18547
|
case 0:
|
|
18499
|
-
index = linearSearch(range, searchKey, "wildcard", rangeLen, getElement);
|
|
18548
|
+
index = linearSearch(range, searchKey, "wildcard", rangeLen, getElement, this.lookupCaches);
|
|
18500
18549
|
break;
|
|
18501
18550
|
case -1:
|
|
18502
18551
|
index = dichotomicSearch(range, searchKey, "nextGreater", "desc", rangeLen, getElement);
|
|
@@ -18563,7 +18612,7 @@ const VLOOKUP = {
|
|
|
18563
18612
|
const _isSorted = toBoolean(isSorted.value);
|
|
18564
18613
|
const rowIndex = _isSorted
|
|
18565
18614
|
? dichotomicSearch(range, searchKey, "nextSmaller", "asc", range[0].length, getValueFromRange)
|
|
18566
|
-
: linearSearch(range, searchKey, "wildcard", range[0].length, getValueFromRange);
|
|
18615
|
+
: linearSearch(range, searchKey, "wildcard", range[0].length, getValueFromRange, this.lookupCaches);
|
|
18567
18616
|
const value = range[_index - 1][rowIndex];
|
|
18568
18617
|
if (value === undefined) {
|
|
18569
18618
|
return valueNotAvailable(searchKey);
|
|
@@ -18617,7 +18666,7 @@ const XLOOKUP = {
|
|
|
18617
18666
|
const reverseSearch = _searchMode === -1;
|
|
18618
18667
|
const index = _searchMode === 2 || _searchMode === -2
|
|
18619
18668
|
? dichotomicSearch(lookupRange, searchKey, mode, _searchMode === 2 ? "asc" : "desc", rangeLen, getElement)
|
|
18620
|
-
: linearSearch(lookupRange, searchKey, mode, rangeLen, getElement, reverseSearch);
|
|
18669
|
+
: linearSearch(lookupRange, searchKey, mode, rangeLen, getElement, this.lookupCaches, reverseSearch);
|
|
18621
18670
|
if (index !== -1) {
|
|
18622
18671
|
return lookupDirection === "col"
|
|
18623
18672
|
? returnRange.map((col) => [col[index]])
|
|
@@ -21057,6 +21106,12 @@ class Composer extends Component {
|
|
|
21057
21106
|
}
|
|
21058
21107
|
this.contentHelper.updateEl(el);
|
|
21059
21108
|
});
|
|
21109
|
+
this.env.model.selection.observe(this, {
|
|
21110
|
+
handleEvent: () => this.autoCompleteState.hide(),
|
|
21111
|
+
});
|
|
21112
|
+
onWillUnmount(() => {
|
|
21113
|
+
this.env.model.selection.detachObserver(this);
|
|
21114
|
+
});
|
|
21060
21115
|
useEffect(() => {
|
|
21061
21116
|
this.processContent();
|
|
21062
21117
|
if (document.activeElement === this.contentHelper.el &&
|
|
@@ -51363,7 +51418,7 @@ class CellPlugin extends CorePlugin {
|
|
|
51363
51418
|
/*
|
|
51364
51419
|
* Reconstructs the original formula string based on new dependencies
|
|
51365
51420
|
*/
|
|
51366
|
-
getFormulaString(sheetId, tokens, dependencies,
|
|
51421
|
+
getFormulaString(sheetId, tokens, dependencies, useBoundedReference = false) {
|
|
51367
51422
|
if (!dependencies.length) {
|
|
51368
51423
|
return concat(tokens.map((token) => token.value));
|
|
51369
51424
|
}
|
|
@@ -51371,7 +51426,7 @@ class CellPlugin extends CorePlugin {
|
|
|
51371
51426
|
return concat(tokens.map((token) => {
|
|
51372
51427
|
if (token.type === "REFERENCE") {
|
|
51373
51428
|
const range = dependencies[rangeIndex++];
|
|
51374
|
-
return this.getters.getRangeString(range, sheetId, {
|
|
51429
|
+
return this.getters.getRangeString(range, sheetId, { useBoundedReference });
|
|
51375
51430
|
}
|
|
51376
51431
|
return token.value;
|
|
51377
51432
|
}));
|
|
@@ -51651,7 +51706,7 @@ class FormulaCellWithDependencies {
|
|
|
51651
51706
|
if (token.type === "REFERENCE") {
|
|
51652
51707
|
const index = rangeIndex++;
|
|
51653
51708
|
return this.getRangeString(this.compiledFormula.dependencies[index], this.sheetId, {
|
|
51654
|
-
|
|
51709
|
+
useBoundedReference: true,
|
|
51655
51710
|
});
|
|
51656
51711
|
}
|
|
51657
51712
|
return token.value;
|
|
@@ -51988,7 +52043,7 @@ class ConditionalFormatPlugin extends CorePlugin {
|
|
|
51988
52043
|
if (data.sheets) {
|
|
51989
52044
|
for (let sheet of data.sheets) {
|
|
51990
52045
|
if (this.cfRules[sheet.id]) {
|
|
51991
|
-
sheet.conditionalFormats = this.cfRules[sheet.id].map((rule) => this.mapToConditionalFormat(sheet.id, rule, {
|
|
52046
|
+
sheet.conditionalFormats = this.cfRules[sheet.id].map((rule) => this.mapToConditionalFormat(sheet.id, rule, { useBoundedReference: true }));
|
|
51992
52047
|
}
|
|
51993
52048
|
}
|
|
51994
52049
|
}
|
|
@@ -52057,9 +52112,9 @@ class ConditionalFormatPlugin extends CorePlugin {
|
|
|
52057
52112
|
// ---------------------------------------------------------------------------
|
|
52058
52113
|
// Private
|
|
52059
52114
|
// ---------------------------------------------------------------------------
|
|
52060
|
-
mapToConditionalFormat(sheetId, cf, {
|
|
52115
|
+
mapToConditionalFormat(sheetId, cf, { useBoundedReference } = { useBoundedReference: false }) {
|
|
52061
52116
|
const ranges = cf.ranges.map((range) => {
|
|
52062
|
-
return this.getters.getRangeString(range, sheetId, {
|
|
52117
|
+
return this.getters.getRangeString(range, sheetId, { useBoundedReference });
|
|
52063
52118
|
});
|
|
52064
52119
|
if (cf.rule.type !== "DataBarRule") {
|
|
52065
52120
|
return {
|
|
@@ -52074,7 +52129,7 @@ class ConditionalFormatPlugin extends CorePlugin {
|
|
|
52074
52129
|
...cf.rule,
|
|
52075
52130
|
rangeValues: cf.rule.rangeValues &&
|
|
52076
52131
|
this.getters.getRangeString(cf.rule.rangeValues, sheetId, {
|
|
52077
|
-
|
|
52132
|
+
useBoundedReference,
|
|
52078
52133
|
}),
|
|
52079
52134
|
},
|
|
52080
52135
|
ranges,
|
|
@@ -52504,10 +52559,20 @@ class DataValidationPlugin extends CorePlugin {
|
|
|
52504
52559
|
for (const sheet of data.sheets) {
|
|
52505
52560
|
sheet.dataValidationRules = [];
|
|
52506
52561
|
for (const rule of this.rules[sheet.id]) {
|
|
52507
|
-
|
|
52508
|
-
...rule,
|
|
52509
|
-
ranges: rule.ranges.map((range) => this.getters.getRangeString(range, sheet.id, {
|
|
52510
|
-
}
|
|
52562
|
+
const excelRule = {
|
|
52563
|
+
...deepCopy(rule),
|
|
52564
|
+
ranges: rule.ranges.map((range) => this.getters.getRangeString(range, sheet.id, { useBoundedReference: true })),
|
|
52565
|
+
};
|
|
52566
|
+
if (rule.criterion.type === "isValueInRange") {
|
|
52567
|
+
excelRule.criterion.values = rule.criterion.values.map((value) => {
|
|
52568
|
+
const range = this.getters.getRangeFromSheetXC(sheet.id, value);
|
|
52569
|
+
return this.getters.getRangeString(range, sheet.id, {
|
|
52570
|
+
useBoundedReference: true,
|
|
52571
|
+
useFixedReference: true,
|
|
52572
|
+
});
|
|
52573
|
+
});
|
|
52574
|
+
}
|
|
52575
|
+
sheet.dataValidationRules.push(excelRule);
|
|
52511
52576
|
}
|
|
52512
52577
|
}
|
|
52513
52578
|
}
|
|
@@ -53921,9 +53986,10 @@ class RangeAdapter {
|
|
|
53921
53986
|
* @param range the range (received from getRangeFromXC or getRangeFromZone)
|
|
53922
53987
|
* @param forSheetId the id of the sheet where the range string is supposed to be used.
|
|
53923
53988
|
* @param options
|
|
53989
|
+
* @param options.useBoundedReference if true, the range will be returned with bounded row and column
|
|
53924
53990
|
* @param options.useFixedReference if true, the range will be returned with fixed row and column
|
|
53925
53991
|
*/
|
|
53926
|
-
getRangeString(range, forSheetId, options = { useFixedReference: false }) {
|
|
53992
|
+
getRangeString(range, forSheetId, options = { useBoundedReference: false, useFixedReference: false }) {
|
|
53927
53993
|
if (!range) {
|
|
53928
53994
|
return CellErrorType.InvalidReference;
|
|
53929
53995
|
}
|
|
@@ -54026,13 +54092,13 @@ class RangeAdapter {
|
|
|
54026
54092
|
/**
|
|
54027
54093
|
* Get a Xc string that represent a part of a range
|
|
54028
54094
|
*/
|
|
54029
|
-
getRangePartString(range, part, options = { useFixedReference: false }) {
|
|
54030
|
-
const colFixed = range.parts
|
|
54095
|
+
getRangePartString(range, part, options = { useBoundedReference: false, useFixedReference: false }) {
|
|
54096
|
+
const colFixed = range.parts[part]?.colFixed || options.useFixedReference ? "$" : "";
|
|
54031
54097
|
const col = part === 0 ? numberToLetters(range.zone.left) : numberToLetters(range.zone.right);
|
|
54032
|
-
const rowFixed = range.parts
|
|
54098
|
+
const rowFixed = range.parts[part]?.rowFixed || options.useFixedReference ? "$" : "";
|
|
54033
54099
|
const row = part === 0 ? String(range.zone.top + 1) : String(range.zone.bottom + 1);
|
|
54034
54100
|
let str = "";
|
|
54035
|
-
if (range.isFullCol && !options.
|
|
54101
|
+
if (range.isFullCol && !options.useBoundedReference) {
|
|
54036
54102
|
if (part === 0 && range.unboundedZone.hasHeader) {
|
|
54037
54103
|
str = colFixed + col + rowFixed + row;
|
|
54038
54104
|
}
|
|
@@ -54040,7 +54106,7 @@ class RangeAdapter {
|
|
|
54040
54106
|
str = colFixed + col;
|
|
54041
54107
|
}
|
|
54042
54108
|
}
|
|
54043
|
-
else if (range.isFullRow && !options.
|
|
54109
|
+
else if (range.isFullRow && !options.useBoundedReference) {
|
|
54044
54110
|
if (part === 0 && range.unboundedZone.hasHeader) {
|
|
54045
54111
|
str = colFixed + col + rowFixed + row;
|
|
54046
54112
|
}
|
|
@@ -57527,6 +57593,10 @@ class Evaluator {
|
|
|
57527
57593
|
this.compilationParams = buildCompilationParameters(this.context, this.getters, this.computeAndSave.bind(this));
|
|
57528
57594
|
this.compilationParams.evalContext.updateDependencies = this.updateDependencies.bind(this);
|
|
57529
57595
|
this.compilationParams.evalContext.addDependencies = this.addDependencies.bind(this);
|
|
57596
|
+
this.compilationParams.evalContext.lookupCaches = {
|
|
57597
|
+
forwardSearch: new Map(),
|
|
57598
|
+
reverseSearch: new Map(),
|
|
57599
|
+
};
|
|
57530
57600
|
}
|
|
57531
57601
|
createEmptyPositionSet() {
|
|
57532
57602
|
const sheetSizes = {};
|
|
@@ -59376,7 +59446,7 @@ function withPivotPresentationLayer (PivotClass) {
|
|
|
59376
59446
|
const symbolIndex = rowDomain.findIndex((row) => row.field === symbolName);
|
|
59377
59447
|
return this.getPivotHeaderValueAndFormat(rowDomain.slice(0, symbolIndex + 1));
|
|
59378
59448
|
}
|
|
59379
|
-
return this.
|
|
59449
|
+
return this.getPivotCellValueAndFormat(symbolName, domain);
|
|
59380
59450
|
};
|
|
59381
59451
|
const result = this.getters.evaluateCompiledFormula(measure.computedBy.sheetId, formula, getSymbolValue);
|
|
59382
59452
|
if (isMatrix(result)) {
|
|
@@ -61240,6 +61310,7 @@ class Session extends EventBus {
|
|
|
61240
61310
|
waitingUndoRedoAck = false;
|
|
61241
61311
|
isReplayingInitialRevisions = false;
|
|
61242
61312
|
processedRevisions = new Set();
|
|
61313
|
+
lastRevisionMessage = undefined;
|
|
61243
61314
|
uuidGenerator = new UuidGenerator();
|
|
61244
61315
|
lastLocalOperation;
|
|
61245
61316
|
/**
|
|
@@ -61340,7 +61411,10 @@ class Session extends EventBus {
|
|
|
61340
61411
|
* Notify the server that the user client left the collaborative session
|
|
61341
61412
|
*/
|
|
61342
61413
|
async leave(data) {
|
|
61343
|
-
if (data &&
|
|
61414
|
+
if (data &&
|
|
61415
|
+
Object.keys(this.clients).length === 1 &&
|
|
61416
|
+
this.lastRevisionMessage &&
|
|
61417
|
+
this.lastRevisionMessage?.type !== "SNAPSHOT_CREATED") {
|
|
61344
61418
|
await this.snapshot(data());
|
|
61345
61419
|
}
|
|
61346
61420
|
delete this.clients[this.clientId];
|
|
@@ -61561,6 +61635,7 @@ class Session extends EventBus {
|
|
|
61561
61635
|
this.pendingMessages = this.pendingMessages.filter((msg) => msg.nextRevisionId !== message.nextRevisionId);
|
|
61562
61636
|
this.serverRevisionId = message.nextRevisionId;
|
|
61563
61637
|
this.processedRevisions.add(message.nextRevisionId);
|
|
61638
|
+
this.lastRevisionMessage = message;
|
|
61564
61639
|
this.sendPendingMessage();
|
|
61565
61640
|
break;
|
|
61566
61641
|
}
|
|
@@ -62488,14 +62563,12 @@ class SheetUIPlugin extends UIPlugin {
|
|
|
62488
62563
|
}
|
|
62489
62564
|
break;
|
|
62490
62565
|
case "AUTORESIZE_ROWS":
|
|
62491
|
-
|
|
62492
|
-
|
|
62493
|
-
|
|
62494
|
-
|
|
62495
|
-
|
|
62496
|
-
|
|
62497
|
-
});
|
|
62498
|
-
}
|
|
62566
|
+
this.dispatch("RESIZE_COLUMNS_ROWS", {
|
|
62567
|
+
elements: cmd.rows,
|
|
62568
|
+
dimension: "ROW",
|
|
62569
|
+
size: null,
|
|
62570
|
+
sheetId: cmd.sheetId,
|
|
62571
|
+
});
|
|
62499
62572
|
break;
|
|
62500
62573
|
}
|
|
62501
62574
|
}
|
|
@@ -69602,6 +69675,9 @@ class EventStream {
|
|
|
69602
69675
|
observe(owner, callbacks) {
|
|
69603
69676
|
this.observers.set(owner, { owner, callbacks });
|
|
69604
69677
|
}
|
|
69678
|
+
detachObserver(owner) {
|
|
69679
|
+
this.observers.delete(owner);
|
|
69680
|
+
}
|
|
69605
69681
|
/**
|
|
69606
69682
|
* Capture the stream for yourself
|
|
69607
69683
|
*/
|
|
@@ -69694,6 +69770,9 @@ class SelectionStreamProcessorImpl {
|
|
|
69694
69770
|
observe(owner, callbacks) {
|
|
69695
69771
|
this.stream.observe(owner, callbacks);
|
|
69696
69772
|
}
|
|
69773
|
+
detachObserver(owner) {
|
|
69774
|
+
this.stream.detachObserver(owner);
|
|
69775
|
+
}
|
|
69697
69776
|
release(owner) {
|
|
69698
69777
|
if (this.stream.isListening(owner)) {
|
|
69699
69778
|
this.stream.release(owner);
|
|
@@ -73009,6 +73088,6 @@ const constants = {
|
|
|
73009
73088
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, 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 };
|
|
73010
73089
|
|
|
73011
73090
|
|
|
73012
|
-
__info__.version = "18.0.
|
|
73013
|
-
__info__.date = "2025-01-
|
|
73014
|
-
__info__.hash = "
|
|
73091
|
+
__info__.version = "18.0.13";
|
|
73092
|
+
__info__.date = "2025-01-31T07:59:17.481Z";
|
|
73093
|
+
__info__.hash = "f505971";
|