@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
package/dist/o_spreadsheet.cjs
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 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
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
@@ -5568,7 +5568,7 @@ function getRangeString(range, forSheetId, getSheetName, options = {
|
|
|
5568
5568
|
if (prefixSheet && !sheetName) return CellErrorType.InvalidReference;
|
|
5569
5569
|
let rangeString = getRangePartString(range, 0, options);
|
|
5570
5570
|
if (range.parts && range.parts.length === 2) {
|
|
5571
|
-
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) {
|
|
5571
|
+
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) {
|
|
5572
5572
|
rangeString += ":";
|
|
5573
5573
|
rangeString += getRangePartString(range, 1, options);
|
|
5574
5574
|
}
|
|
@@ -6290,6 +6290,11 @@ var CompiledFormula = class CompiledFormula {
|
|
|
6290
6290
|
const params = compileTokens(rangeTokenize(formula));
|
|
6291
6291
|
return new CompiledFormula(sheetId, params.tokens, params.literalValues, params.symbols, params.dependencies.map((xc) => getters.getRangeFromSheetXC(sheetId, xc)), params.isBadExpression, params.normalizedFormula, params.execute);
|
|
6292
6292
|
}
|
|
6293
|
+
areRangeShapesInLineWithNormalizedFormula() {
|
|
6294
|
+
return Array.from(this.normalizedFormula.matchAll(/\|C\||\|R\|/g)).every((value, index) => {
|
|
6295
|
+
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;
|
|
6296
|
+
});
|
|
6297
|
+
}
|
|
6293
6298
|
};
|
|
6294
6299
|
function compileTokens(tokens) {
|
|
6295
6300
|
try {
|
|
@@ -14141,7 +14146,7 @@ function filterInvalidCalendarDataPoints(labels, datasets) {
|
|
|
14141
14146
|
*/
|
|
14142
14147
|
function filterInvalidHierarchicalPoints(values, hierarchy) {
|
|
14143
14148
|
const numberOfDataPoints = Math.max(values.length, ...hierarchy.map((dataset) => dataset.data?.length || 0));
|
|
14144
|
-
const isEmpty = (value) => value === null || value === "";
|
|
14149
|
+
const isEmpty = (value) => value === void 0 || value === null || value === "";
|
|
14145
14150
|
const dataPointsIndexes = range(0, numberOfDataPoints).filter((dataPointIndex) => {
|
|
14146
14151
|
const groups = hierarchy.map((dataset) => dataset.data?.[dataPointIndex]);
|
|
14147
14152
|
if (isEmpty(groups[0]?.value)) return false;
|
|
@@ -33915,7 +33920,7 @@ var ScorecardChartConfigPanel = class extends _odoo_owl.Component {
|
|
|
33915
33920
|
return !!this.state.keyValueDispatchResult?.isCancelledBecause("InvalidScorecardKeyValue");
|
|
33916
33921
|
}
|
|
33917
33922
|
get isBaselineInvalid() {
|
|
33918
|
-
return !!this.state.
|
|
33923
|
+
return !!this.state.baselineDispatchResult?.isCancelledBecause("InvalidScorecardBaseline");
|
|
33919
33924
|
}
|
|
33920
33925
|
onKeyValueRangeChanged(ranges) {
|
|
33921
33926
|
this.keyValue = ranges[0];
|
|
@@ -49718,6 +49723,7 @@ var Squisher = class {
|
|
|
49718
49723
|
alreadyAppliedNumberOffsets = [];
|
|
49719
49724
|
previousStrings = [];
|
|
49720
49725
|
baseFormulaWasTransformed = false;
|
|
49726
|
+
rangeToStringOptions = { doNotSimplifyRange: true };
|
|
49721
49727
|
baseNumber = void 0;
|
|
49722
49728
|
constructor(getters) {
|
|
49723
49729
|
this.getters = getters;
|
|
@@ -49773,9 +49779,9 @@ var Squisher = class {
|
|
|
49773
49779
|
let references = [];
|
|
49774
49780
|
if (!this.baseFormula || this.baseFormula.normalizedFormula !== cell.compiledFormula.normalizedFormula) {
|
|
49775
49781
|
this.resetBaseTo(cell.compiledFormula);
|
|
49776
|
-
return cell.compiledFormula.toFormulaString(this.getters);
|
|
49782
|
+
return cell.compiledFormula.toFormulaString(this.getters, this.rangeToStringOptions);
|
|
49777
49783
|
} else {
|
|
49778
|
-
if (!this.baseFormulaWasTransformed && deepEquals(cell.compiledFormula.literalValues, this.baseFormula.literalValues) && deepEquals(cell.compiledFormula.rangeDependencies, this.baseFormula.rangeDependencies)) return cell.compiledFormula.toFormulaString(this.getters);
|
|
49784
|
+
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);
|
|
49779
49785
|
numbers = this.squishNumbers(cell.compiledFormula.literalValues.numbers);
|
|
49780
49786
|
strings = this.squishStrings(cell.compiledFormula.literalValues.strings);
|
|
49781
49787
|
references = this.squishReferences(cell.compiledFormula.rangeDependencies, forSheetId);
|
|
@@ -49852,23 +49858,23 @@ var Squisher = class {
|
|
|
49852
49858
|
squishOneReference(reference, previousReferences, index, forSheetId) {
|
|
49853
49859
|
const previousReference = previousReferences[index];
|
|
49854
49860
|
if (deepEquals(previousReference, reference)) return "=";
|
|
49855
|
-
if (previousReference.sheetId !== reference.sheetId || previousReference.prefixSheet !== reference.prefixSheet || previousReference.invalidSheetName !== reference.invalidSheetName || previousReference.invalidXc !== reference.invalidXc) {
|
|
49861
|
+
if (previousReference.sheetId !== reference.sheetId || previousReference.prefixSheet !== reference.prefixSheet || previousReference.invalidSheetName !== reference.invalidSheetName || previousReference.invalidXc !== reference.invalidXc || previousReference.parts.length !== reference.parts.length) {
|
|
49856
49862
|
previousReferences[index] = deepCopy(reference);
|
|
49857
|
-
return getRangeString(reference, forSheetId, this.getters.getSheetName);
|
|
49863
|
+
return getRangeString(reference, forSheetId, this.getters.getSheetName, this.rangeToStringOptions);
|
|
49858
49864
|
}
|
|
49859
49865
|
if (previousReference.unboundedZone.bottom === void 0 || previousReference.unboundedZone.right === void 0 || reference.unboundedZone.bottom === void 0 || reference.unboundedZone.right === void 0) {
|
|
49860
49866
|
previousReferences[index] = deepCopy(reference);
|
|
49861
|
-
return getRangeString(reference, forSheetId, this.getters.getSheetName);
|
|
49867
|
+
return getRangeString(reference, forSheetId, this.getters.getSheetName, this.rangeToStringOptions);
|
|
49862
49868
|
}
|
|
49863
49869
|
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) {
|
|
49864
49870
|
previousReferences[index] = deepCopy(reference);
|
|
49865
|
-
return getRangeString(reference, forSheetId, this.getters.getSheetName);
|
|
49871
|
+
return getRangeString(reference, forSheetId, this.getters.getSheetName, this.rangeToStringOptions);
|
|
49866
49872
|
}
|
|
49867
49873
|
const currentZone = reference.zone;
|
|
49868
49874
|
const previousZone = previousReference.zone;
|
|
49869
49875
|
if (currentZone.top !== currentZone.bottom || currentZone.left !== currentZone.right || previousZone.top !== previousZone.bottom || previousZone.left !== previousZone.right) {
|
|
49870
49876
|
previousReferences[index] = deepCopy(reference);
|
|
49871
|
-
return getRangeString(reference, forSheetId, this.getters.getSheetName);
|
|
49877
|
+
return getRangeString(reference, forSheetId, this.getters.getSheetName, this.rangeToStringOptions);
|
|
49872
49878
|
}
|
|
49873
49879
|
const diffCol = reference.zone.left - previousReference.zone.left;
|
|
49874
49880
|
const diffRow = reference.zone.top - previousReference.zone.top;
|
|
@@ -49876,7 +49882,7 @@ var Squisher = class {
|
|
|
49876
49882
|
previousReference.unboundedZone = deepCopy(reference.unboundedZone);
|
|
49877
49883
|
if (diffCol !== 0 && diffRow === 0) return `${diffCol > 0 ? "+" : "-"}C${Math.abs(diffCol)}`;
|
|
49878
49884
|
else if (diffRow !== 0 && diffCol === 0) return `${diffRow > 0 ? "+" : "-"}R${Math.abs(diffRow)}`;
|
|
49879
|
-
return getRangeString(reference, forSheetId, this.getters.getSheetName);
|
|
49885
|
+
return getRangeString(reference, forSheetId, this.getters.getSheetName, this.rangeToStringOptions);
|
|
49880
49886
|
}
|
|
49881
49887
|
/**
|
|
49882
49888
|
* Squish the number parameters. Result for each parameter should be compared the previous formula.
|
|
@@ -50085,10 +50091,19 @@ var Unsquisher = class {
|
|
|
50085
50091
|
case "FIRST_OFFSET": {
|
|
50086
50092
|
const currentOffset = current;
|
|
50087
50093
|
this.previousOffset = currentOffset;
|
|
50088
|
-
for (const position of targetPositions)
|
|
50089
|
-
|
|
50090
|
-
|
|
50091
|
-
|
|
50094
|
+
for (const position of targetPositions) {
|
|
50095
|
+
const result = this.unsquishFormula(currentOffset, sheetId, getters);
|
|
50096
|
+
if (!result.areRangeShapesInLineWithNormalizedFormula()) {
|
|
50097
|
+
const formulaString = result.toFormulaString(getters);
|
|
50098
|
+
yield {
|
|
50099
|
+
position,
|
|
50100
|
+
compiled: CompiledFormula.Compile(formulaString, sheetId, getters)
|
|
50101
|
+
};
|
|
50102
|
+
} else yield {
|
|
50103
|
+
position,
|
|
50104
|
+
compiled: result
|
|
50105
|
+
};
|
|
50106
|
+
}
|
|
50092
50107
|
break;
|
|
50093
50108
|
}
|
|
50094
50109
|
case "COMBINE_OFFSET": {
|
|
@@ -50097,10 +50112,19 @@ var Unsquisher = class {
|
|
|
50097
50112
|
this.previousOffset.N = currentOffset.N ?? this.previousOffset.N;
|
|
50098
50113
|
this.previousOffset.S = currentOffset.S ?? this.previousOffset.S;
|
|
50099
50114
|
this.previousOffset.R = currentOffset.R ?? this.previousOffset.R;
|
|
50100
|
-
for (const position of targetPositions)
|
|
50101
|
-
|
|
50102
|
-
|
|
50103
|
-
|
|
50115
|
+
for (const position of targetPositions) {
|
|
50116
|
+
const result = this.unsquishFormula(this.previousOffset, sheetId, getters);
|
|
50117
|
+
if (!result.areRangeShapesInLineWithNormalizedFormula()) {
|
|
50118
|
+
const formulaString = result.toFormulaString(getters);
|
|
50119
|
+
yield {
|
|
50120
|
+
position,
|
|
50121
|
+
compiled: CompiledFormula.Compile(formulaString, sheetId, getters)
|
|
50122
|
+
};
|
|
50123
|
+
} else yield {
|
|
50124
|
+
position,
|
|
50125
|
+
compiled: result
|
|
50126
|
+
};
|
|
50127
|
+
}
|
|
50104
50128
|
break;
|
|
50105
50129
|
}
|
|
50106
50130
|
case "NEW_NUMBER":
|
|
@@ -57126,13 +57150,13 @@ var EvaluationConditionalFormatPlugin = class extends CoreViewPlugin {
|
|
|
57126
57150
|
const minValue = this.parsePoint(sheetId, range, rule.minimum, "min");
|
|
57127
57151
|
const midValue = rule.midpoint ? this.parsePoint(sheetId, range, rule.midpoint) : null;
|
|
57128
57152
|
const maxValue = this.parsePoint(sheetId, range, rule.maximum, "max");
|
|
57129
|
-
if (minValue === null || maxValue === null || minValue >= maxValue || midValue && (minValue >= midValue || midValue >= maxValue)) return;
|
|
57153
|
+
if (minValue === null || maxValue === null || minValue >= maxValue || midValue !== null && (minValue >= midValue || midValue >= maxValue)) return;
|
|
57130
57154
|
const zone = this.getters.getRangeFromSheetXC(sheetId, range).zone;
|
|
57131
57155
|
const colorThresholds = [{
|
|
57132
57156
|
value: minValue,
|
|
57133
57157
|
color: rule.minimum.color
|
|
57134
57158
|
}];
|
|
57135
|
-
if (rule.midpoint && midValue) colorThresholds.push({
|
|
57159
|
+
if (rule.midpoint && midValue !== null) colorThresholds.push({
|
|
57136
57160
|
value: midValue,
|
|
57137
57161
|
color: rule.midpoint.color
|
|
57138
57162
|
});
|
|
@@ -58045,6 +58069,8 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
58045
58069
|
pivots = {};
|
|
58046
58070
|
unusedPivotsInFormulas;
|
|
58047
58071
|
custom;
|
|
58072
|
+
pivotPositionCache = new PositionMap();
|
|
58073
|
+
shouldInvalidateCache = false;
|
|
58048
58074
|
constructor(config) {
|
|
58049
58075
|
super(config);
|
|
58050
58076
|
this.custom = config.custom;
|
|
@@ -58055,7 +58081,11 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
58055
58081
|
}
|
|
58056
58082
|
}
|
|
58057
58083
|
handle(cmd) {
|
|
58058
|
-
if (invalidateEvaluationCommands.has(cmd.type))
|
|
58084
|
+
if (invalidateEvaluationCommands.has(cmd.type)) {
|
|
58085
|
+
this.shouldInvalidateCache = true;
|
|
58086
|
+
for (const pivotId of this.getters.getPivotIds()) this.setupPivot(pivotId, { recreate: true });
|
|
58087
|
+
}
|
|
58088
|
+
if (cmd.type === "UPDATE_CELL") this.shouldInvalidateCache = true;
|
|
58059
58089
|
switch (cmd.type) {
|
|
58060
58090
|
case "REFRESH_PIVOT":
|
|
58061
58091
|
this.refreshPivot(cmd.id);
|
|
@@ -58095,6 +58125,12 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
58095
58125
|
break;
|
|
58096
58126
|
}
|
|
58097
58127
|
}
|
|
58128
|
+
finalize() {
|
|
58129
|
+
if (this.shouldInvalidateCache) {
|
|
58130
|
+
this.pivotPositionCache = new PositionMap();
|
|
58131
|
+
this.shouldInvalidateCache = false;
|
|
58132
|
+
}
|
|
58133
|
+
}
|
|
58098
58134
|
/**
|
|
58099
58135
|
* Get the id of the first pivot in the formula at the given position. Returns undefined if there
|
|
58100
58136
|
* is no pivot at this position
|
|
@@ -58106,9 +58142,14 @@ var PivotUIPlugin = class extends CoreViewPlugin {
|
|
|
58106
58142
|
* Get all of the ids of the pivot present in the formula at the given position.
|
|
58107
58143
|
*/
|
|
58108
58144
|
getPivotIdsFromPosition(position) {
|
|
58109
|
-
|
|
58110
|
-
|
|
58111
|
-
|
|
58145
|
+
if (!this.pivotPositionCache.has(position)) {
|
|
58146
|
+
const cell = this.getters.getCorrespondingFormulaCell(position);
|
|
58147
|
+
if (cell && cell.isFormula) {
|
|
58148
|
+
const pivotIds = this.getPivotIdsFromFormula(position.sheetId, cell.compiledFormula);
|
|
58149
|
+
this.pivotPositionCache.set(position, pivotIds);
|
|
58150
|
+
}
|
|
58151
|
+
}
|
|
58152
|
+
return this.pivotPositionCache.get(position) || [];
|
|
58112
58153
|
}
|
|
58113
58154
|
getPivotIdsFromFormula(sheetId, formula) {
|
|
58114
58155
|
return this.getPivotFunctions(sheetId, formula).map((pivotFunction) => {
|
|
@@ -59863,7 +59904,12 @@ var TableComputedStylePlugin = class extends UIPlugin {
|
|
|
59863
59904
|
computeTableStyle(sheetId, table) {
|
|
59864
59905
|
return lazy(() => {
|
|
59865
59906
|
const style = this.getters.getTableStyle(table.config.styleId);
|
|
59866
|
-
const
|
|
59907
|
+
const tableMetaDataAndConfig = this.getTableMetaData(sheetId, table);
|
|
59908
|
+
if (!tableMetaDataAndConfig) return {
|
|
59909
|
+
borders: {},
|
|
59910
|
+
styles: {}
|
|
59911
|
+
};
|
|
59912
|
+
const { tableMetaData, config } = tableMetaDataAndConfig;
|
|
59867
59913
|
const relativeTableStyle = getComputedTableStyle(config, style, tableMetaData);
|
|
59868
59914
|
const mapping = this.getTableMapping(sheetId, table);
|
|
59869
59915
|
const absoluteTableStyle = {
|
|
@@ -59901,6 +59947,7 @@ var TableComputedStylePlugin = class extends UIPlugin {
|
|
|
59901
59947
|
const pivotInfo = this.getters.getPivotStyleAtPosition(mainPosition);
|
|
59902
59948
|
if (!pivotInfo) throw new Error("No dynamic pivot info found at pivot table position");
|
|
59903
59949
|
const pivot = this.getters.getPivot(pivotInfo.pivotId);
|
|
59950
|
+
if (!pivot.isValid()) return;
|
|
59904
59951
|
const pivotStyle = pivotInfo.pivotStyle;
|
|
59905
59952
|
const maxRowDepth = pivot.getExpandedTableStructure().getNumberOfRowGroupBys();
|
|
59906
59953
|
const pivotTable = pivot.getCollapsedTableStructure();
|
|
@@ -64445,11 +64492,23 @@ var GridSelectionPlugin = class extends UIPlugin {
|
|
|
64445
64492
|
ctx.strokeStyle = SELECTION_BORDER_COLOR;
|
|
64446
64493
|
ctx.lineWidth = 1.5 * thinLineWidth;
|
|
64447
64494
|
for (const zone of zones) {
|
|
64495
|
+
if (!viewports.isZoneVisibleInViewport(sheetId, zone)) continue;
|
|
64448
64496
|
const { x, y, width, height } = viewports.getVisibleRect(sheetId, zone);
|
|
64449
64497
|
ctx.globalCompositeOperation = "multiply";
|
|
64450
|
-
|
|
64451
|
-
ctx.
|
|
64452
|
-
|
|
64498
|
+
const currentLineWidth = ctx.lineWidth;
|
|
64499
|
+
if (height === 0 || width === 0) ctx.lineWidth = 3 * thinLineWidth;
|
|
64500
|
+
if (height === 0 && width === 0) {
|
|
64501
|
+
ctx.beginPath();
|
|
64502
|
+
ctx.arc(x, y, 3, 0, 2 * Math.PI);
|
|
64503
|
+
ctx.fill();
|
|
64504
|
+
ctx.globalCompositeOperation = "source-over";
|
|
64505
|
+
ctx.stroke();
|
|
64506
|
+
} else {
|
|
64507
|
+
ctx.fillRect(x, y, width, height);
|
|
64508
|
+
ctx.globalCompositeOperation = "source-over";
|
|
64509
|
+
ctx.strokeRect(x, y, width, height);
|
|
64510
|
+
}
|
|
64511
|
+
ctx.lineWidth = currentLineWidth;
|
|
64453
64512
|
}
|
|
64454
64513
|
ctx.globalCompositeOperation = "source-over";
|
|
64455
64514
|
const position = renderingContext.activePosition;
|
|
@@ -64596,6 +64655,9 @@ var InternalViewport = class {
|
|
|
64596
64655
|
this.adjustViewportZoneX();
|
|
64597
64656
|
this.adjustViewportZoneY();
|
|
64598
64657
|
}
|
|
64658
|
+
isZoneVisible(zone) {
|
|
64659
|
+
return intersection(zone, this) !== void 0;
|
|
64660
|
+
}
|
|
64599
64661
|
/**
|
|
64600
64662
|
*
|
|
64601
64663
|
* Computes the visible coordinates & dimensions of a given zone inside the viewport
|
|
@@ -64876,6 +64938,9 @@ var ViewportCollection = class {
|
|
|
64876
64938
|
isVisibleInViewport({ sheetId, col, row }) {
|
|
64877
64939
|
return this.getSubViewports(sheetId).some((pane) => pane.isVisible(col, row));
|
|
64878
64940
|
}
|
|
64941
|
+
isZoneVisibleInViewport(sheetId, zone) {
|
|
64942
|
+
return this.getSubViewports(sheetId).some((pane) => pane.isZoneVisible(zone));
|
|
64943
|
+
}
|
|
64879
64944
|
getScrollBarWidth() {
|
|
64880
64945
|
return 15 / this.zoomLevel;
|
|
64881
64946
|
}
|
|
@@ -69407,18 +69472,28 @@ var NamedRangeSelector = class extends _odoo_owl.Component {
|
|
|
69407
69472
|
return;
|
|
69408
69473
|
}
|
|
69409
69474
|
const activeSheetId = this.env.model.getters.getActiveSheetId();
|
|
69410
|
-
if (activeSheetId !== sheetId)
|
|
69411
|
-
|
|
69412
|
-
|
|
69413
|
-
|
|
69414
|
-
|
|
69475
|
+
if (activeSheetId !== sheetId) {
|
|
69476
|
+
if (!this.env.model.getters.getSheet(sheetId).isVisible) {
|
|
69477
|
+
this.env.notifyUser({
|
|
69478
|
+
text: _t("The sheet on which the range is defined is hidden."),
|
|
69479
|
+
type: "info",
|
|
69480
|
+
sticky: false
|
|
69481
|
+
});
|
|
69482
|
+
return;
|
|
69483
|
+
}
|
|
69484
|
+
this.env.model.dispatch("ACTIVATE_SHEET", {
|
|
69485
|
+
sheetIdFrom: activeSheetId,
|
|
69486
|
+
sheetIdTo: sheetId
|
|
69487
|
+
});
|
|
69488
|
+
}
|
|
69489
|
+
this.env.model.selection.selectCell(zone.right, zone.bottom, { allowsHiddenSelection: true });
|
|
69415
69490
|
this.env.model.selection.selectZone({
|
|
69416
69491
|
cell: {
|
|
69417
69492
|
col: zone.left,
|
|
69418
69493
|
row: zone.top
|
|
69419
69494
|
},
|
|
69420
69495
|
zone
|
|
69421
|
-
});
|
|
69496
|
+
}, { allowsHiddenSelection: true });
|
|
69422
69497
|
}
|
|
69423
69498
|
get selectionKey() {
|
|
69424
69499
|
return `${this.env.model.getters.getActiveSheetId()}-${zoneToXc(this.selectedZone)}`;
|
|
@@ -71827,7 +71902,7 @@ var SelectionStreamProcessorImpl = class {
|
|
|
71827
71902
|
/**
|
|
71828
71903
|
* Select a single cell as the new anchor.
|
|
71829
71904
|
*/
|
|
71830
|
-
selectCell(col, row) {
|
|
71905
|
+
selectCell(col, row, options) {
|
|
71831
71906
|
const zone = positionToZone({
|
|
71832
71907
|
col,
|
|
71833
71908
|
row
|
|
@@ -71838,7 +71913,10 @@ var SelectionStreamProcessorImpl = class {
|
|
|
71838
71913
|
col,
|
|
71839
71914
|
row
|
|
71840
71915
|
}
|
|
71841
|
-
}, {
|
|
71916
|
+
}, {
|
|
71917
|
+
scrollIntoView: true,
|
|
71918
|
+
...options
|
|
71919
|
+
});
|
|
71842
71920
|
}
|
|
71843
71921
|
/**
|
|
71844
71922
|
* Set the selection to one of the cells adjacent to the current anchor cell.
|
|
@@ -72193,15 +72271,21 @@ var SelectionStreamProcessorImpl = class {
|
|
|
72193
72271
|
return DispatchResult.Success;
|
|
72194
72272
|
}
|
|
72195
72273
|
checkEventAnchorZone(event) {
|
|
72196
|
-
return this.checkAnchorZone(event.anchor);
|
|
72274
|
+
return this.checkAnchorZone(event.anchor, event.options);
|
|
72197
72275
|
}
|
|
72198
|
-
checkAnchorZone(anchor) {
|
|
72276
|
+
checkAnchorZone(anchor, options) {
|
|
72199
72277
|
const { cell, zone } = anchor;
|
|
72200
72278
|
if (!isInside(cell.col, cell.row, zone)) return "InvalidAnchorZone";
|
|
72201
72279
|
const { left, right, top, bottom } = zone;
|
|
72202
72280
|
const sheetId = this.getters.getActiveSheetId();
|
|
72203
|
-
|
|
72204
|
-
|
|
72281
|
+
if (!options?.allowsHiddenSelection) {
|
|
72282
|
+
const refCol = this.getters.findVisibleHeader(sheetId, "COL", left, right);
|
|
72283
|
+
if (this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) === void 0 || refCol === void 0) return "SelectionOutOfBound";
|
|
72284
|
+
} else {
|
|
72285
|
+
const numberCols = this.getters.getNumberCols(sheetId);
|
|
72286
|
+
const numberRows = this.getters.getNumberRows(sheetId);
|
|
72287
|
+
if (left < 0 || right > numberCols - 1 || top < 0 || bottom > numberRows - 1) return "SelectionOutOfBound";
|
|
72288
|
+
}
|
|
72205
72289
|
return "Success";
|
|
72206
72290
|
}
|
|
72207
72291
|
checkAnchorZoneOrThrow(anchor) {
|
|
@@ -84572,7 +84656,8 @@ const helpers = {
|
|
|
84572
84656
|
parseFormat,
|
|
84573
84657
|
isFormula,
|
|
84574
84658
|
domainToColRowDomain,
|
|
84575
|
-
collapseHierarchicalDisplayName
|
|
84659
|
+
collapseHierarchicalDisplayName,
|
|
84660
|
+
PositionMap
|
|
84576
84661
|
};
|
|
84577
84662
|
const links = {
|
|
84578
84663
|
isMarkdownLink,
|
|
@@ -84752,6 +84837,6 @@ exports.stores = stores;
|
|
|
84752
84837
|
exports.tokenColors = tokenColors;
|
|
84753
84838
|
exports.tokenize = tokenize;
|
|
84754
84839
|
|
|
84755
|
-
__info__.version = "19.3.
|
|
84756
|
-
__info__.date = "2026-07-
|
|
84757
|
-
__info__.hash = "
|
|
84840
|
+
__info__.version = "19.3.12";
|
|
84841
|
+
__info__.date = "2026-07-20T11:02:44.416Z";
|
|
84842
|
+
__info__.hash = "2b42707";
|
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 19.3.
|
|
6
|
-
* @date 2026-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.3.12
|
|
6
|
+
* @date 2026-07-20T11:02:46.174Z
|
|
7
|
+
* @hash 2b42707
|
|
8
8
|
*/
|
|
9
9
|
:root {
|
|
10
10
|
--os-gray-100: light-dark(#f9fafb, #1b1d26);
|