@odoo/o-spreadsheet 19.3.10 → 19.3.12
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 +133 -48
- package/dist/o_spreadsheet.css +3 -3
- package/dist/o_spreadsheet.esm.js +133 -48
- package/dist/o_spreadsheet.iife.js +133 -48
- package/dist/o_spreadsheet.min.iife.js +9 -9
- package/dist/o_spreadsheet.xml +3 -3
- package/dist/types/formulas/compiler.d.ts +1 -0
- package/dist/types/helpers/internal_viewport.d.ts +1 -0
- package/dist/types/helpers/viewport_collection.d.ts +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/plugins/core/squisher.d.ts +1 -0
- package/dist/types/plugins/ui_core_views/pivot_ui.d.ts +3 -0
- package/dist/types/selection_stream/selection_stream_processor.d.ts +1 -1
- package/dist/types/types/event_stream/selection_events.d.ts +1 -0
- package/dist/types/types/range.d.ts +1 -0
- package/dist/types/types/selection_stream_processor.d.ts +1 -1
- 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 19.3.
|
|
6
|
-
* @date 2026-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.3.12
|
|
6
|
+
* @date 2026-07-20T11:02:44.416Z
|
|
7
|
+
* @hash 2b42707
|
|
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, whenReady, xml } from "@odoo/owl";
|
|
@@ -5567,7 +5567,7 @@ function getRangeString(range, forSheetId, getSheetName, options = {
|
|
|
5567
5567
|
if (prefixSheet && !sheetName) return CellErrorType.InvalidReference;
|
|
5568
5568
|
let rangeString = getRangePartString(range, 0, options);
|
|
5569
5569
|
if (range.parts && range.parts.length === 2) {
|
|
5570
|
-
if (range.zone.top !== range.zone.bottom || range.zone.left !== range.zone.right || range.parts[0].rowFixed || range.parts[0].colFixed || range.parts[1].rowFixed || range.parts[1].colFixed) {
|
|
5570
|
+
if (range.zone.top !== range.zone.bottom || range.zone.left !== range.zone.right || range.parts[0].rowFixed || range.parts[0].colFixed || range.parts[1].rowFixed || range.parts[1].colFixed || options.doNotSimplifyRange) {
|
|
5571
5571
|
rangeString += ":";
|
|
5572
5572
|
rangeString += getRangePartString(range, 1, options);
|
|
5573
5573
|
}
|
|
@@ -6289,6 +6289,11 @@ var CompiledFormula = class CompiledFormula {
|
|
|
6289
6289
|
const params = compileTokens(rangeTokenize(formula));
|
|
6290
6290
|
return new CompiledFormula(sheetId, params.tokens, params.literalValues, params.symbols, params.dependencies.map((xc) => getters.getRangeFromSheetXC(sheetId, xc)), params.isBadExpression, params.normalizedFormula, params.execute);
|
|
6291
6291
|
}
|
|
6292
|
+
areRangeShapesInLineWithNormalizedFormula() {
|
|
6293
|
+
return Array.from(this.normalizedFormula.matchAll(/\|C\||\|R\|/g)).every((value, index) => {
|
|
6294
|
+
return this.rangeDependencies[index].parts.length === 1 && value[0] === "|C|" || this.rangeDependencies[index].parts.length === 2 && value[0] === "|R|" || this.rangeDependencies[index].invalidXc || this.rangeDependencies[index].invalidSheetName;
|
|
6295
|
+
});
|
|
6296
|
+
}
|
|
6292
6297
|
};
|
|
6293
6298
|
function compileTokens(tokens) {
|
|
6294
6299
|
try {
|
|
@@ -14140,7 +14145,7 @@ function filterInvalidCalendarDataPoints(labels, datasets) {
|
|
|
14140
14145
|
*/
|
|
14141
14146
|
function filterInvalidHierarchicalPoints(values, hierarchy) {
|
|
14142
14147
|
const numberOfDataPoints = Math.max(values.length, ...hierarchy.map((dataset) => dataset.data?.length || 0));
|
|
14143
|
-
const isEmpty = (value) => value === null || value === "";
|
|
14148
|
+
const isEmpty = (value) => value === void 0 || value === null || value === "";
|
|
14144
14149
|
const dataPointsIndexes = range(0, numberOfDataPoints).filter((dataPointIndex) => {
|
|
14145
14150
|
const groups = hierarchy.map((dataset) => dataset.data?.[dataPointIndex]);
|
|
14146
14151
|
if (isEmpty(groups[0]?.value)) return false;
|
|
@@ -33914,7 +33919,7 @@ var ScorecardChartConfigPanel = class extends Component {
|
|
|
33914
33919
|
return !!this.state.keyValueDispatchResult?.isCancelledBecause("InvalidScorecardKeyValue");
|
|
33915
33920
|
}
|
|
33916
33921
|
get isBaselineInvalid() {
|
|
33917
|
-
return !!this.state.
|
|
33922
|
+
return !!this.state.baselineDispatchResult?.isCancelledBecause("InvalidScorecardBaseline");
|
|
33918
33923
|
}
|
|
33919
33924
|
onKeyValueRangeChanged(ranges) {
|
|
33920
33925
|
this.keyValue = ranges[0];
|
|
@@ -49717,6 +49722,7 @@ var Squisher = class {
|
|
|
49717
49722
|
alreadyAppliedNumberOffsets = [];
|
|
49718
49723
|
previousStrings = [];
|
|
49719
49724
|
baseFormulaWasTransformed = false;
|
|
49725
|
+
rangeToStringOptions = { doNotSimplifyRange: true };
|
|
49720
49726
|
baseNumber = void 0;
|
|
49721
49727
|
constructor(getters) {
|
|
49722
49728
|
this.getters = getters;
|
|
@@ -49772,9 +49778,9 @@ var Squisher = class {
|
|
|
49772
49778
|
let references = [];
|
|
49773
49779
|
if (!this.baseFormula || this.baseFormula.normalizedFormula !== cell.compiledFormula.normalizedFormula) {
|
|
49774
49780
|
this.resetBaseTo(cell.compiledFormula);
|
|
49775
|
-
return cell.compiledFormula.toFormulaString(this.getters);
|
|
49781
|
+
return cell.compiledFormula.toFormulaString(this.getters, this.rangeToStringOptions);
|
|
49776
49782
|
} else {
|
|
49777
|
-
if (!this.baseFormulaWasTransformed && deepEquals(cell.compiledFormula.literalValues, this.baseFormula.literalValues) && deepEquals(cell.compiledFormula.rangeDependencies, this.baseFormula.rangeDependencies)) return cell.compiledFormula.toFormulaString(this.getters);
|
|
49783
|
+
if (!this.baseFormulaWasTransformed && deepEquals(cell.compiledFormula.literalValues, this.baseFormula.literalValues) && deepEquals(cell.compiledFormula.rangeDependencies, this.baseFormula.rangeDependencies)) return cell.compiledFormula.toFormulaString(this.getters, this.rangeToStringOptions);
|
|
49778
49784
|
numbers = this.squishNumbers(cell.compiledFormula.literalValues.numbers);
|
|
49779
49785
|
strings = this.squishStrings(cell.compiledFormula.literalValues.strings);
|
|
49780
49786
|
references = this.squishReferences(cell.compiledFormula.rangeDependencies, forSheetId);
|
|
@@ -49851,23 +49857,23 @@ var Squisher = class {
|
|
|
49851
49857
|
squishOneReference(reference, previousReferences, index, forSheetId) {
|
|
49852
49858
|
const previousReference = previousReferences[index];
|
|
49853
49859
|
if (deepEquals(previousReference, reference)) return "=";
|
|
49854
|
-
if (previousReference.sheetId !== reference.sheetId || previousReference.prefixSheet !== reference.prefixSheet || previousReference.invalidSheetName !== reference.invalidSheetName || previousReference.invalidXc !== reference.invalidXc) {
|
|
49860
|
+
if (previousReference.sheetId !== reference.sheetId || previousReference.prefixSheet !== reference.prefixSheet || previousReference.invalidSheetName !== reference.invalidSheetName || previousReference.invalidXc !== reference.invalidXc || previousReference.parts.length !== reference.parts.length) {
|
|
49855
49861
|
previousReferences[index] = deepCopy(reference);
|
|
49856
|
-
return getRangeString(reference, forSheetId, this.getters.getSheetName);
|
|
49862
|
+
return getRangeString(reference, forSheetId, this.getters.getSheetName, this.rangeToStringOptions);
|
|
49857
49863
|
}
|
|
49858
49864
|
if (previousReference.unboundedZone.bottom === void 0 || previousReference.unboundedZone.right === void 0 || reference.unboundedZone.bottom === void 0 || reference.unboundedZone.right === void 0) {
|
|
49859
49865
|
previousReferences[index] = deepCopy(reference);
|
|
49860
|
-
return getRangeString(reference, forSheetId, this.getters.getSheetName);
|
|
49866
|
+
return getRangeString(reference, forSheetId, this.getters.getSheetName, this.rangeToStringOptions);
|
|
49861
49867
|
}
|
|
49862
49868
|
for (let i = 0; i < reference.parts.length; i++) if (previousReference.parts[i].colFixed !== reference.parts[i].colFixed || previousReference.parts[i].rowFixed !== reference.parts[i].rowFixed) {
|
|
49863
49869
|
previousReferences[index] = deepCopy(reference);
|
|
49864
|
-
return getRangeString(reference, forSheetId, this.getters.getSheetName);
|
|
49870
|
+
return getRangeString(reference, forSheetId, this.getters.getSheetName, this.rangeToStringOptions);
|
|
49865
49871
|
}
|
|
49866
49872
|
const currentZone = reference.zone;
|
|
49867
49873
|
const previousZone = previousReference.zone;
|
|
49868
49874
|
if (currentZone.top !== currentZone.bottom || currentZone.left !== currentZone.right || previousZone.top !== previousZone.bottom || previousZone.left !== previousZone.right) {
|
|
49869
49875
|
previousReferences[index] = deepCopy(reference);
|
|
49870
|
-
return getRangeString(reference, forSheetId, this.getters.getSheetName);
|
|
49876
|
+
return getRangeString(reference, forSheetId, this.getters.getSheetName, this.rangeToStringOptions);
|
|
49871
49877
|
}
|
|
49872
49878
|
const diffCol = reference.zone.left - previousReference.zone.left;
|
|
49873
49879
|
const diffRow = reference.zone.top - previousReference.zone.top;
|
|
@@ -49875,7 +49881,7 @@ var Squisher = class {
|
|
|
49875
49881
|
previousReference.unboundedZone = deepCopy(reference.unboundedZone);
|
|
49876
49882
|
if (diffCol !== 0 && diffRow === 0) return `${diffCol > 0 ? "+" : "-"}C${Math.abs(diffCol)}`;
|
|
49877
49883
|
else if (diffRow !== 0 && diffCol === 0) return `${diffRow > 0 ? "+" : "-"}R${Math.abs(diffRow)}`;
|
|
49878
|
-
return getRangeString(reference, forSheetId, this.getters.getSheetName);
|
|
49884
|
+
return getRangeString(reference, forSheetId, this.getters.getSheetName, this.rangeToStringOptions);
|
|
49879
49885
|
}
|
|
49880
49886
|
/**
|
|
49881
49887
|
* Squish the number parameters. Result for each parameter should be compared the previous formula.
|
|
@@ -50084,10 +50090,19 @@ var Unsquisher = class {
|
|
|
50084
50090
|
case "FIRST_OFFSET": {
|
|
50085
50091
|
const currentOffset = current;
|
|
50086
50092
|
this.previousOffset = currentOffset;
|
|
50087
|
-
for (const position of targetPositions)
|
|
50088
|
-
|
|
50089
|
-
|
|
50090
|
-
|
|
50093
|
+
for (const position of targetPositions) {
|
|
50094
|
+
const result = this.unsquishFormula(currentOffset, sheetId, getters);
|
|
50095
|
+
if (!result.areRangeShapesInLineWithNormalizedFormula()) {
|
|
50096
|
+
const formulaString = result.toFormulaString(getters);
|
|
50097
|
+
yield {
|
|
50098
|
+
position,
|
|
50099
|
+
compiled: CompiledFormula.Compile(formulaString, sheetId, getters)
|
|
50100
|
+
};
|
|
50101
|
+
} else yield {
|
|
50102
|
+
position,
|
|
50103
|
+
compiled: result
|
|
50104
|
+
};
|
|
50105
|
+
}
|
|
50091
50106
|
break;
|
|
50092
50107
|
}
|
|
50093
50108
|
case "COMBINE_OFFSET": {
|
|
@@ -50096,10 +50111,19 @@ var Unsquisher = class {
|
|
|
50096
50111
|
this.previousOffset.N = currentOffset.N ?? this.previousOffset.N;
|
|
50097
50112
|
this.previousOffset.S = currentOffset.S ?? this.previousOffset.S;
|
|
50098
50113
|
this.previousOffset.R = currentOffset.R ?? this.previousOffset.R;
|
|
50099
|
-
for (const position of targetPositions)
|
|
50100
|
-
|
|
50101
|
-
|
|
50102
|
-
|
|
50114
|
+
for (const position of targetPositions) {
|
|
50115
|
+
const result = this.unsquishFormula(this.previousOffset, sheetId, getters);
|
|
50116
|
+
if (!result.areRangeShapesInLineWithNormalizedFormula()) {
|
|
50117
|
+
const formulaString = result.toFormulaString(getters);
|
|
50118
|
+
yield {
|
|
50119
|
+
position,
|
|
50120
|
+
compiled: CompiledFormula.Compile(formulaString, sheetId, getters)
|
|
50121
|
+
};
|
|
50122
|
+
} else yield {
|
|
50123
|
+
position,
|
|
50124
|
+
compiled: result
|
|
50125
|
+
};
|
|
50126
|
+
}
|
|
50103
50127
|
break;
|
|
50104
50128
|
}
|
|
50105
50129
|
case "NEW_NUMBER":
|
|
@@ -56941,13 +56965,13 @@ var EvaluationConditionalFormatPlugin = class extends CoreViewPlugin {
|
|
|
56941
56965
|
const minValue = this.parsePoint(sheetId, range, rule.minimum, "min");
|
|
56942
56966
|
const midValue = rule.midpoint ? this.parsePoint(sheetId, range, rule.midpoint) : null;
|
|
56943
56967
|
const maxValue = this.parsePoint(sheetId, range, rule.maximum, "max");
|
|
56944
|
-
if (minValue === null || maxValue === null || minValue >= maxValue || midValue && (minValue >= midValue || midValue >= maxValue)) return;
|
|
56968
|
+
if (minValue === null || maxValue === null || minValue >= maxValue || midValue !== null && (minValue >= midValue || midValue >= maxValue)) return;
|
|
56945
56969
|
const zone = this.getters.getRangeFromSheetXC(sheetId, range).zone;
|
|
56946
56970
|
const colorThresholds = [{
|
|
56947
56971
|
value: minValue,
|
|
56948
56972
|
color: rule.minimum.color
|
|
56949
56973
|
}];
|
|
56950
|
-
if (rule.midpoint && midValue) colorThresholds.push({
|
|
56974
|
+
if (rule.midpoint && midValue !== null) colorThresholds.push({
|
|
56951
56975
|
value: midValue,
|
|
56952
56976
|
color: rule.midpoint.color
|
|
56953
56977
|
});
|
|
@@ -57860,6 +57884,8 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
57860
57884
|
pivots = {};
|
|
57861
57885
|
unusedPivotsInFormulas;
|
|
57862
57886
|
custom;
|
|
57887
|
+
pivotPositionCache = new PositionMap();
|
|
57888
|
+
shouldInvalidateCache = false;
|
|
57863
57889
|
constructor(config) {
|
|
57864
57890
|
super(config);
|
|
57865
57891
|
this.custom = config.custom;
|
|
@@ -57870,7 +57896,11 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
57870
57896
|
}
|
|
57871
57897
|
}
|
|
57872
57898
|
handle(cmd) {
|
|
57873
|
-
if (invalidateEvaluationCommands.has(cmd.type))
|
|
57899
|
+
if (invalidateEvaluationCommands.has(cmd.type)) {
|
|
57900
|
+
this.shouldInvalidateCache = true;
|
|
57901
|
+
for (const pivotId of this.getters.getPivotIds()) this.setupPivot(pivotId, { recreate: true });
|
|
57902
|
+
}
|
|
57903
|
+
if (cmd.type === "UPDATE_CELL") this.shouldInvalidateCache = true;
|
|
57874
57904
|
switch (cmd.type) {
|
|
57875
57905
|
case "REFRESH_PIVOT":
|
|
57876
57906
|
this.refreshPivot(cmd.id);
|
|
@@ -57910,6 +57940,12 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
57910
57940
|
break;
|
|
57911
57941
|
}
|
|
57912
57942
|
}
|
|
57943
|
+
finalize() {
|
|
57944
|
+
if (this.shouldInvalidateCache) {
|
|
57945
|
+
this.pivotPositionCache = new PositionMap();
|
|
57946
|
+
this.shouldInvalidateCache = false;
|
|
57947
|
+
}
|
|
57948
|
+
}
|
|
57913
57949
|
/**
|
|
57914
57950
|
* Get the id of the first pivot in the formula at the given position. Returns undefined if there
|
|
57915
57951
|
* is no pivot at this position
|
|
@@ -57921,9 +57957,14 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
57921
57957
|
* Get all of the ids of the pivot present in the formula at the given position.
|
|
57922
57958
|
*/
|
|
57923
57959
|
getPivotIdsFromPosition(position) {
|
|
57924
|
-
|
|
57925
|
-
|
|
57926
|
-
|
|
57960
|
+
if (!this.pivotPositionCache.has(position)) {
|
|
57961
|
+
const cell = this.getters.getCorrespondingFormulaCell(position);
|
|
57962
|
+
if (cell && cell.isFormula) {
|
|
57963
|
+
const pivotIds = this.getPivotIdsFromFormula(position.sheetId, cell.compiledFormula);
|
|
57964
|
+
this.pivotPositionCache.set(position, pivotIds);
|
|
57965
|
+
}
|
|
57966
|
+
}
|
|
57967
|
+
return this.pivotPositionCache.get(position) || [];
|
|
57927
57968
|
}
|
|
57928
57969
|
getPivotIdsFromFormula(sheetId, formula) {
|
|
57929
57970
|
return this.getPivotFunctions(sheetId, formula).map((pivotFunction) => {
|
|
@@ -59678,7 +59719,12 @@ var TableComputedStylePlugin = class extends UIPlugin {
|
|
|
59678
59719
|
computeTableStyle(sheetId, table) {
|
|
59679
59720
|
return lazy(() => {
|
|
59680
59721
|
const style = this.getters.getTableStyle(table.config.styleId);
|
|
59681
|
-
const
|
|
59722
|
+
const tableMetaDataAndConfig = this.getTableMetaData(sheetId, table);
|
|
59723
|
+
if (!tableMetaDataAndConfig) return {
|
|
59724
|
+
borders: {},
|
|
59725
|
+
styles: {}
|
|
59726
|
+
};
|
|
59727
|
+
const { tableMetaData, config } = tableMetaDataAndConfig;
|
|
59682
59728
|
const relativeTableStyle = getComputedTableStyle(config, style, tableMetaData);
|
|
59683
59729
|
const mapping = this.getTableMapping(sheetId, table);
|
|
59684
59730
|
const absoluteTableStyle = {
|
|
@@ -59716,6 +59762,7 @@ var TableComputedStylePlugin = class extends UIPlugin {
|
|
|
59716
59762
|
const pivotInfo = this.getters.getPivotStyleAtPosition(mainPosition);
|
|
59717
59763
|
if (!pivotInfo) throw new Error("No dynamic pivot info found at pivot table position");
|
|
59718
59764
|
const pivot = this.getters.getPivot(pivotInfo.pivotId);
|
|
59765
|
+
if (!pivot.isValid()) return;
|
|
59719
59766
|
const pivotStyle = pivotInfo.pivotStyle;
|
|
59720
59767
|
const maxRowDepth = pivot.getExpandedTableStructure().getNumberOfRowGroupBys();
|
|
59721
59768
|
const pivotTable = pivot.getCollapsedTableStructure();
|
|
@@ -64260,11 +64307,23 @@ var GridSelectionPlugin = class extends UIPlugin {
|
|
|
64260
64307
|
ctx.strokeStyle = SELECTION_BORDER_COLOR;
|
|
64261
64308
|
ctx.lineWidth = 1.5 * thinLineWidth;
|
|
64262
64309
|
for (const zone of zones) {
|
|
64310
|
+
if (!viewports.isZoneVisibleInViewport(sheetId, zone)) continue;
|
|
64263
64311
|
const { x, y, width, height } = viewports.getVisibleRect(sheetId, zone);
|
|
64264
64312
|
ctx.globalCompositeOperation = "multiply";
|
|
64265
|
-
|
|
64266
|
-
ctx.
|
|
64267
|
-
|
|
64313
|
+
const currentLineWidth = ctx.lineWidth;
|
|
64314
|
+
if (height === 0 || width === 0) ctx.lineWidth = 3 * thinLineWidth;
|
|
64315
|
+
if (height === 0 && width === 0) {
|
|
64316
|
+
ctx.beginPath();
|
|
64317
|
+
ctx.arc(x, y, 3, 0, 2 * Math.PI);
|
|
64318
|
+
ctx.fill();
|
|
64319
|
+
ctx.globalCompositeOperation = "source-over";
|
|
64320
|
+
ctx.stroke();
|
|
64321
|
+
} else {
|
|
64322
|
+
ctx.fillRect(x, y, width, height);
|
|
64323
|
+
ctx.globalCompositeOperation = "source-over";
|
|
64324
|
+
ctx.strokeRect(x, y, width, height);
|
|
64325
|
+
}
|
|
64326
|
+
ctx.lineWidth = currentLineWidth;
|
|
64268
64327
|
}
|
|
64269
64328
|
ctx.globalCompositeOperation = "source-over";
|
|
64270
64329
|
const position = renderingContext.activePosition;
|
|
@@ -64411,6 +64470,9 @@ var InternalViewport = class {
|
|
|
64411
64470
|
this.adjustViewportZoneX();
|
|
64412
64471
|
this.adjustViewportZoneY();
|
|
64413
64472
|
}
|
|
64473
|
+
isZoneVisible(zone) {
|
|
64474
|
+
return intersection(zone, this) !== void 0;
|
|
64475
|
+
}
|
|
64414
64476
|
/**
|
|
64415
64477
|
*
|
|
64416
64478
|
* Computes the visible coordinates & dimensions of a given zone inside the viewport
|
|
@@ -64691,6 +64753,9 @@ var ViewportCollection = class {
|
|
|
64691
64753
|
isVisibleInViewport({ sheetId, col, row }) {
|
|
64692
64754
|
return this.getSubViewports(sheetId).some((pane) => pane.isVisible(col, row));
|
|
64693
64755
|
}
|
|
64756
|
+
isZoneVisibleInViewport(sheetId, zone) {
|
|
64757
|
+
return this.getSubViewports(sheetId).some((pane) => pane.isZoneVisible(zone));
|
|
64758
|
+
}
|
|
64694
64759
|
getScrollBarWidth() {
|
|
64695
64760
|
return 15 / this.zoomLevel;
|
|
64696
64761
|
}
|
|
@@ -69222,18 +69287,28 @@ var NamedRangeSelector = class extends Component {
|
|
|
69222
69287
|
return;
|
|
69223
69288
|
}
|
|
69224
69289
|
const activeSheetId = this.env.model.getters.getActiveSheetId();
|
|
69225
|
-
if (activeSheetId !== sheetId)
|
|
69226
|
-
|
|
69227
|
-
|
|
69228
|
-
|
|
69229
|
-
|
|
69290
|
+
if (activeSheetId !== sheetId) {
|
|
69291
|
+
if (!this.env.model.getters.getSheet(sheetId).isVisible) {
|
|
69292
|
+
this.env.notifyUser({
|
|
69293
|
+
text: _t("The sheet on which the range is defined is hidden."),
|
|
69294
|
+
type: "info",
|
|
69295
|
+
sticky: false
|
|
69296
|
+
});
|
|
69297
|
+
return;
|
|
69298
|
+
}
|
|
69299
|
+
this.env.model.dispatch("ACTIVATE_SHEET", {
|
|
69300
|
+
sheetIdFrom: activeSheetId,
|
|
69301
|
+
sheetIdTo: sheetId
|
|
69302
|
+
});
|
|
69303
|
+
}
|
|
69304
|
+
this.env.model.selection.selectCell(zone.right, zone.bottom, { allowsHiddenSelection: true });
|
|
69230
69305
|
this.env.model.selection.selectZone({
|
|
69231
69306
|
cell: {
|
|
69232
69307
|
col: zone.left,
|
|
69233
69308
|
row: zone.top
|
|
69234
69309
|
},
|
|
69235
69310
|
zone
|
|
69236
|
-
});
|
|
69311
|
+
}, { allowsHiddenSelection: true });
|
|
69237
69312
|
}
|
|
69238
69313
|
get selectionKey() {
|
|
69239
69314
|
return `${this.env.model.getters.getActiveSheetId()}-${zoneToXc(this.selectedZone)}`;
|
|
@@ -71642,7 +71717,7 @@ var SelectionStreamProcessorImpl = class {
|
|
|
71642
71717
|
/**
|
|
71643
71718
|
* Select a single cell as the new anchor.
|
|
71644
71719
|
*/
|
|
71645
|
-
selectCell(col, row) {
|
|
71720
|
+
selectCell(col, row, options) {
|
|
71646
71721
|
const zone = positionToZone({
|
|
71647
71722
|
col,
|
|
71648
71723
|
row
|
|
@@ -71653,7 +71728,10 @@ var SelectionStreamProcessorImpl = class {
|
|
|
71653
71728
|
col,
|
|
71654
71729
|
row
|
|
71655
71730
|
}
|
|
71656
|
-
}, {
|
|
71731
|
+
}, {
|
|
71732
|
+
scrollIntoView: true,
|
|
71733
|
+
...options
|
|
71734
|
+
});
|
|
71657
71735
|
}
|
|
71658
71736
|
/**
|
|
71659
71737
|
* Set the selection to one of the cells adjacent to the current anchor cell.
|
|
@@ -72008,15 +72086,21 @@ var SelectionStreamProcessorImpl = class {
|
|
|
72008
72086
|
return DispatchResult.Success;
|
|
72009
72087
|
}
|
|
72010
72088
|
checkEventAnchorZone(event) {
|
|
72011
|
-
return this.checkAnchorZone(event.anchor);
|
|
72089
|
+
return this.checkAnchorZone(event.anchor, event.options);
|
|
72012
72090
|
}
|
|
72013
|
-
checkAnchorZone(anchor) {
|
|
72091
|
+
checkAnchorZone(anchor, options) {
|
|
72014
72092
|
const { cell, zone } = anchor;
|
|
72015
72093
|
if (!isInside(cell.col, cell.row, zone)) return "InvalidAnchorZone";
|
|
72016
72094
|
const { left, right, top, bottom } = zone;
|
|
72017
72095
|
const sheetId = this.getters.getActiveSheetId();
|
|
72018
|
-
|
|
72019
|
-
|
|
72096
|
+
if (!options?.allowsHiddenSelection) {
|
|
72097
|
+
const refCol = this.getters.findVisibleHeader(sheetId, "COL", left, right);
|
|
72098
|
+
if (this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) === void 0 || refCol === void 0) return "SelectionOutOfBound";
|
|
72099
|
+
} else {
|
|
72100
|
+
const numberCols = this.getters.getNumberCols(sheetId);
|
|
72101
|
+
const numberRows = this.getters.getNumberRows(sheetId);
|
|
72102
|
+
if (left < 0 || right > numberCols - 1 || top < 0 || bottom > numberRows - 1) return "SelectionOutOfBound";
|
|
72103
|
+
}
|
|
72020
72104
|
return "Success";
|
|
72021
72105
|
}
|
|
72022
72106
|
checkAnchorZoneOrThrow(anchor) {
|
|
@@ -84387,7 +84471,8 @@ const helpers = {
|
|
|
84387
84471
|
parseFormat,
|
|
84388
84472
|
isFormula,
|
|
84389
84473
|
domainToColRowDomain,
|
|
84390
|
-
collapseHierarchicalDisplayName
|
|
84474
|
+
collapseHierarchicalDisplayName,
|
|
84475
|
+
PositionMap
|
|
84391
84476
|
};
|
|
84392
84477
|
const links = {
|
|
84393
84478
|
isMarkdownLink,
|
|
@@ -84509,6 +84594,6 @@ const chartHelpers = {
|
|
|
84509
84594
|
//#endregion
|
|
84510
84595
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CompiledFormula, CorePlugin, CoreViewPlugin, DEFAULT_LOCALE, DEFAULT_LOCALES, DispatchResult, EvaluationError, LocalTransportService, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, canExecuteInReadonly, categories, chartHelpers, components, constants, convertAstNodes, coreTypes, createAutocompleteArgumentsProvider, findCellInNewZone, functionCache, getCaretDownSvg, getCaretUpSvg, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isSheetDependent, iterateAstNodes, links, load, lockedSheetAllowedCommands, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
84511
84596
|
|
|
84512
|
-
__info__.version = "19.3.
|
|
84513
|
-
__info__.date = "2026-07-
|
|
84514
|
-
__info__.hash = "
|
|
84597
|
+
__info__.version = "19.3.12";
|
|
84598
|
+
__info__.date = "2026-07-20T11:02:44.416Z";
|
|
84599
|
+
__info__.hash = "2b42707";
|