@odoo/o-spreadsheet 18.2.24 → 18.2.26
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 +44 -17
- package/dist/o-spreadsheet.d.ts +2 -0
- package/dist/o-spreadsheet.esm.js +44 -17
- package/dist/o-spreadsheet.iife.js +44 -17
- package/dist/o-spreadsheet.iife.min.js +227 -227
- 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.2.
|
|
6
|
-
* @date 2025-08-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.2.26
|
|
6
|
+
* @date 2025-08-21T06:39:39.007Z
|
|
7
|
+
* @hash d23c340
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -3613,6 +3613,7 @@ exports.CommandResult = void 0;
|
|
|
3613
3613
|
CommandResult["Success"] = "Success";
|
|
3614
3614
|
CommandResult["CancelledForUnknownReason"] = "CancelledForUnknownReason";
|
|
3615
3615
|
CommandResult["WillRemoveExistingMerge"] = "WillRemoveExistingMerge";
|
|
3616
|
+
CommandResult["CannotMoveTableHeader"] = "CannotMoveTableHeader";
|
|
3616
3617
|
CommandResult["MergeIsDestructive"] = "MergeIsDestructive";
|
|
3617
3618
|
CommandResult["CellIsMerged"] = "CellIsMerged";
|
|
3618
3619
|
CommandResult["InvalidTarget"] = "InvalidTarget";
|
|
@@ -19671,7 +19672,7 @@ const OFFSET = {
|
|
|
19671
19672
|
right: startingCol + offsetWidth - 1,
|
|
19672
19673
|
bottom: startingRow + offsetHeight - 1,
|
|
19673
19674
|
};
|
|
19674
|
-
const range = this.getters.getRangeFromZone(
|
|
19675
|
+
const range = this.getters.getRangeFromZone(sheetId, dependencyZone);
|
|
19675
19676
|
if (range.invalidXc || range.invalidSheetName) {
|
|
19676
19677
|
return new InvalidReferenceError();
|
|
19677
19678
|
}
|
|
@@ -28682,6 +28683,7 @@ const CustomCurrencyTerms = {
|
|
|
28682
28683
|
Custom: _t("Custom"),
|
|
28683
28684
|
};
|
|
28684
28685
|
const MergeErrorMessage = _t("Merged cells are preventing this operation. Unmerge those cells and try again.");
|
|
28686
|
+
const TableHeaderMoveErrorMessage = _t("The header row of a table can't be moved.");
|
|
28685
28687
|
const SplitToColumnsTerms = {
|
|
28686
28688
|
Errors: {
|
|
28687
28689
|
Unexpected: _t("Cannot split the selection for an unknown reason"),
|
|
@@ -31905,9 +31907,6 @@ class RadarChart extends AbstractChart {
|
|
|
31905
31907
|
};
|
|
31906
31908
|
}
|
|
31907
31909
|
getDefinitionForExcel() {
|
|
31908
|
-
if (this.aggregated) {
|
|
31909
|
-
return undefined;
|
|
31910
|
-
}
|
|
31911
31910
|
const dataSets = this.dataSets
|
|
31912
31911
|
.map((ds) => toExcelDataset(this.getters, ds))
|
|
31913
31912
|
.filter((ds) => ds.range !== "" && ds.range !== CellErrorType.InvalidReference);
|
|
@@ -46072,7 +46071,7 @@ class PivotLayoutConfigurator extends owl.Component {
|
|
|
46072
46071
|
this.props.onDimensionsUpdated(update);
|
|
46073
46072
|
}
|
|
46074
46073
|
getMeasureId(fieldName, aggregator) {
|
|
46075
|
-
const baseId = fieldName + (aggregator ? `:${aggregator}` : "");
|
|
46074
|
+
const baseId = fieldName.replaceAll("'", "") + (aggregator ? `:${aggregator}` : "");
|
|
46076
46075
|
let id = baseId;
|
|
46077
46076
|
let i = 2;
|
|
46078
46077
|
while (this.props.definition.measures.some((m) => m.id === id)) {
|
|
@@ -51750,8 +51749,13 @@ class RowResizer extends AbstractResizer {
|
|
|
51750
51749
|
elements,
|
|
51751
51750
|
position: this.state.position,
|
|
51752
51751
|
});
|
|
51753
|
-
if (!result.isSuccessful
|
|
51754
|
-
|
|
51752
|
+
if (!result.isSuccessful) {
|
|
51753
|
+
if (result.reasons.includes("WillRemoveExistingMerge" /* CommandResult.WillRemoveExistingMerge */)) {
|
|
51754
|
+
this.env.raiseError(MergeErrorMessage);
|
|
51755
|
+
}
|
|
51756
|
+
else if (result.reasons.includes("CannotMoveTableHeader" /* CommandResult.CannotMoveTableHeader */)) {
|
|
51757
|
+
this.env.raiseError(TableHeaderMoveErrorMessage);
|
|
51758
|
+
}
|
|
51755
51759
|
}
|
|
51756
51760
|
}
|
|
51757
51761
|
_selectElement(index, addDistinctHeader) {
|
|
@@ -63747,7 +63751,7 @@ function withPivotPresentationLayer (PivotClass) {
|
|
|
63747
63751
|
return PivotPresentationLayer;
|
|
63748
63752
|
}
|
|
63749
63753
|
|
|
63750
|
-
const UNDO_REDO_PIVOT_COMMANDS = ["ADD_PIVOT", "UPDATE_PIVOT"];
|
|
63754
|
+
const UNDO_REDO_PIVOT_COMMANDS = ["ADD_PIVOT", "UPDATE_PIVOT", "REMOVE_PIVOT"];
|
|
63751
63755
|
function isPivotCommand(cmd) {
|
|
63752
63756
|
return UNDO_REDO_PIVOT_COMMANDS.includes(cmd.type);
|
|
63753
63757
|
}
|
|
@@ -68911,8 +68915,33 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
68911
68915
|
if (headers.some((h) => h < 0 || h >= maxHeaderValue)) {
|
|
68912
68916
|
return "InvalidHeaderIndex" /* CommandResult.InvalidHeaderIndex */;
|
|
68913
68917
|
}
|
|
68918
|
+
if (!isCol && !this.isTableRowMoveAllowed(id, cmd.elements)) {
|
|
68919
|
+
return "CannotMoveTableHeader" /* CommandResult.CannotMoveTableHeader */;
|
|
68920
|
+
}
|
|
68914
68921
|
return "Success" /* CommandResult.Success */;
|
|
68915
68922
|
}
|
|
68923
|
+
isTableRowMoveAllowed(sheetId, selectedRows) {
|
|
68924
|
+
const tables = this.getters.getCoreTables(sheetId);
|
|
68925
|
+
if (tables.length === 0) {
|
|
68926
|
+
return true;
|
|
68927
|
+
}
|
|
68928
|
+
const selectedRowSet = new Set(selectedRows);
|
|
68929
|
+
return tables.every(({ range: { zone }, config }) => {
|
|
68930
|
+
const { top, bottom } = zone;
|
|
68931
|
+
if (config.numberOfHeaders === 0) {
|
|
68932
|
+
return true;
|
|
68933
|
+
}
|
|
68934
|
+
const headerRowEnd = top + config.numberOfHeaders - 1;
|
|
68935
|
+
// Moving the table is allowed if table header rows are not part of the selection
|
|
68936
|
+
// Or if the entire table (including header) is selected
|
|
68937
|
+
const isHeaderSelected = selectedRows.some((row) => row >= top && row <= headerRowEnd);
|
|
68938
|
+
if (!isHeaderSelected) {
|
|
68939
|
+
return true;
|
|
68940
|
+
}
|
|
68941
|
+
const isWholeTableSelected = range(top, bottom + 1).every((r) => selectedRowSet.has(r));
|
|
68942
|
+
return isWholeTableSelected;
|
|
68943
|
+
});
|
|
68944
|
+
}
|
|
68916
68945
|
fallbackToVisibleSheet() {
|
|
68917
68946
|
if (!this.getters.tryGetSheet(this.getters.getActiveSheetId())) {
|
|
68918
68947
|
const currentSheetIds = this.getters.getVisibleSheetIds();
|
|
@@ -71077,9 +71106,7 @@ class ClickableCellsStore extends SpreadsheetStore {
|
|
|
71077
71106
|
}
|
|
71078
71107
|
if (!(xc in clickableCells[sheetId])) {
|
|
71079
71108
|
const clickableCell = this.findClickableItem(position);
|
|
71080
|
-
|
|
71081
|
-
clickableCells[sheetId][xc] = clickableCell;
|
|
71082
|
-
}
|
|
71109
|
+
clickableCells[sheetId][xc] = clickableCell;
|
|
71083
71110
|
}
|
|
71084
71111
|
return clickableCells[sheetId][xc];
|
|
71085
71112
|
}
|
|
@@ -77259,6 +77286,6 @@ exports.tokenColors = tokenColors;
|
|
|
77259
77286
|
exports.tokenize = tokenize;
|
|
77260
77287
|
|
|
77261
77288
|
|
|
77262
|
-
__info__.version = "18.2.
|
|
77263
|
-
__info__.date = "2025-08-
|
|
77264
|
-
__info__.hash = "
|
|
77289
|
+
__info__.version = "18.2.26";
|
|
77290
|
+
__info__.date = "2025-08-21T06:39:39.007Z";
|
|
77291
|
+
__info__.hash = "d23c340";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -2061,6 +2061,7 @@ declare class GridSelectionPlugin extends UIPlugin {
|
|
|
2061
2061
|
private onAddElements;
|
|
2062
2062
|
private onMoveElements;
|
|
2063
2063
|
private isMoveElementAllowed;
|
|
2064
|
+
private isTableRowMoveAllowed;
|
|
2064
2065
|
private fallbackToVisibleSheet;
|
|
2065
2066
|
/**
|
|
2066
2067
|
* Clip the selection if it spans outside the sheet
|
|
@@ -3039,6 +3040,7 @@ declare const enum CommandResult {
|
|
|
3039
3040
|
Success = "Success",
|
|
3040
3041
|
CancelledForUnknownReason = "CancelledForUnknownReason",
|
|
3041
3042
|
WillRemoveExistingMerge = "WillRemoveExistingMerge",
|
|
3043
|
+
CannotMoveTableHeader = "CannotMoveTableHeader",
|
|
3042
3044
|
MergeIsDestructive = "MergeIsDestructive",
|
|
3043
3045
|
CellIsMerged = "CellIsMerged",
|
|
3044
3046
|
InvalidTarget = "InvalidTarget",
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 18.2.
|
|
6
|
-
* @date 2025-08-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.2.26
|
|
6
|
+
* @date 2025-08-21T06:39:39.007Z
|
|
7
|
+
* @hash d23c340
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, App, blockDom, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
|
|
@@ -3611,6 +3611,7 @@ var CommandResult;
|
|
|
3611
3611
|
CommandResult["Success"] = "Success";
|
|
3612
3612
|
CommandResult["CancelledForUnknownReason"] = "CancelledForUnknownReason";
|
|
3613
3613
|
CommandResult["WillRemoveExistingMerge"] = "WillRemoveExistingMerge";
|
|
3614
|
+
CommandResult["CannotMoveTableHeader"] = "CannotMoveTableHeader";
|
|
3614
3615
|
CommandResult["MergeIsDestructive"] = "MergeIsDestructive";
|
|
3615
3616
|
CommandResult["CellIsMerged"] = "CellIsMerged";
|
|
3616
3617
|
CommandResult["InvalidTarget"] = "InvalidTarget";
|
|
@@ -19669,7 +19670,7 @@ const OFFSET = {
|
|
|
19669
19670
|
right: startingCol + offsetWidth - 1,
|
|
19670
19671
|
bottom: startingRow + offsetHeight - 1,
|
|
19671
19672
|
};
|
|
19672
|
-
const range = this.getters.getRangeFromZone(
|
|
19673
|
+
const range = this.getters.getRangeFromZone(sheetId, dependencyZone);
|
|
19673
19674
|
if (range.invalidXc || range.invalidSheetName) {
|
|
19674
19675
|
return new InvalidReferenceError();
|
|
19675
19676
|
}
|
|
@@ -28680,6 +28681,7 @@ const CustomCurrencyTerms = {
|
|
|
28680
28681
|
Custom: _t("Custom"),
|
|
28681
28682
|
};
|
|
28682
28683
|
const MergeErrorMessage = _t("Merged cells are preventing this operation. Unmerge those cells and try again.");
|
|
28684
|
+
const TableHeaderMoveErrorMessage = _t("The header row of a table can't be moved.");
|
|
28683
28685
|
const SplitToColumnsTerms = {
|
|
28684
28686
|
Errors: {
|
|
28685
28687
|
Unexpected: _t("Cannot split the selection for an unknown reason"),
|
|
@@ -31903,9 +31905,6 @@ class RadarChart extends AbstractChart {
|
|
|
31903
31905
|
};
|
|
31904
31906
|
}
|
|
31905
31907
|
getDefinitionForExcel() {
|
|
31906
|
-
if (this.aggregated) {
|
|
31907
|
-
return undefined;
|
|
31908
|
-
}
|
|
31909
31908
|
const dataSets = this.dataSets
|
|
31910
31909
|
.map((ds) => toExcelDataset(this.getters, ds))
|
|
31911
31910
|
.filter((ds) => ds.range !== "" && ds.range !== CellErrorType.InvalidReference);
|
|
@@ -46070,7 +46069,7 @@ class PivotLayoutConfigurator extends Component {
|
|
|
46070
46069
|
this.props.onDimensionsUpdated(update);
|
|
46071
46070
|
}
|
|
46072
46071
|
getMeasureId(fieldName, aggregator) {
|
|
46073
|
-
const baseId = fieldName + (aggregator ? `:${aggregator}` : "");
|
|
46072
|
+
const baseId = fieldName.replaceAll("'", "") + (aggregator ? `:${aggregator}` : "");
|
|
46074
46073
|
let id = baseId;
|
|
46075
46074
|
let i = 2;
|
|
46076
46075
|
while (this.props.definition.measures.some((m) => m.id === id)) {
|
|
@@ -51748,8 +51747,13 @@ class RowResizer extends AbstractResizer {
|
|
|
51748
51747
|
elements,
|
|
51749
51748
|
position: this.state.position,
|
|
51750
51749
|
});
|
|
51751
|
-
if (!result.isSuccessful
|
|
51752
|
-
|
|
51750
|
+
if (!result.isSuccessful) {
|
|
51751
|
+
if (result.reasons.includes("WillRemoveExistingMerge" /* CommandResult.WillRemoveExistingMerge */)) {
|
|
51752
|
+
this.env.raiseError(MergeErrorMessage);
|
|
51753
|
+
}
|
|
51754
|
+
else if (result.reasons.includes("CannotMoveTableHeader" /* CommandResult.CannotMoveTableHeader */)) {
|
|
51755
|
+
this.env.raiseError(TableHeaderMoveErrorMessage);
|
|
51756
|
+
}
|
|
51753
51757
|
}
|
|
51754
51758
|
}
|
|
51755
51759
|
_selectElement(index, addDistinctHeader) {
|
|
@@ -63745,7 +63749,7 @@ function withPivotPresentationLayer (PivotClass) {
|
|
|
63745
63749
|
return PivotPresentationLayer;
|
|
63746
63750
|
}
|
|
63747
63751
|
|
|
63748
|
-
const UNDO_REDO_PIVOT_COMMANDS = ["ADD_PIVOT", "UPDATE_PIVOT"];
|
|
63752
|
+
const UNDO_REDO_PIVOT_COMMANDS = ["ADD_PIVOT", "UPDATE_PIVOT", "REMOVE_PIVOT"];
|
|
63749
63753
|
function isPivotCommand(cmd) {
|
|
63750
63754
|
return UNDO_REDO_PIVOT_COMMANDS.includes(cmd.type);
|
|
63751
63755
|
}
|
|
@@ -68909,8 +68913,33 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
68909
68913
|
if (headers.some((h) => h < 0 || h >= maxHeaderValue)) {
|
|
68910
68914
|
return "InvalidHeaderIndex" /* CommandResult.InvalidHeaderIndex */;
|
|
68911
68915
|
}
|
|
68916
|
+
if (!isCol && !this.isTableRowMoveAllowed(id, cmd.elements)) {
|
|
68917
|
+
return "CannotMoveTableHeader" /* CommandResult.CannotMoveTableHeader */;
|
|
68918
|
+
}
|
|
68912
68919
|
return "Success" /* CommandResult.Success */;
|
|
68913
68920
|
}
|
|
68921
|
+
isTableRowMoveAllowed(sheetId, selectedRows) {
|
|
68922
|
+
const tables = this.getters.getCoreTables(sheetId);
|
|
68923
|
+
if (tables.length === 0) {
|
|
68924
|
+
return true;
|
|
68925
|
+
}
|
|
68926
|
+
const selectedRowSet = new Set(selectedRows);
|
|
68927
|
+
return tables.every(({ range: { zone }, config }) => {
|
|
68928
|
+
const { top, bottom } = zone;
|
|
68929
|
+
if (config.numberOfHeaders === 0) {
|
|
68930
|
+
return true;
|
|
68931
|
+
}
|
|
68932
|
+
const headerRowEnd = top + config.numberOfHeaders - 1;
|
|
68933
|
+
// Moving the table is allowed if table header rows are not part of the selection
|
|
68934
|
+
// Or if the entire table (including header) is selected
|
|
68935
|
+
const isHeaderSelected = selectedRows.some((row) => row >= top && row <= headerRowEnd);
|
|
68936
|
+
if (!isHeaderSelected) {
|
|
68937
|
+
return true;
|
|
68938
|
+
}
|
|
68939
|
+
const isWholeTableSelected = range(top, bottom + 1).every((r) => selectedRowSet.has(r));
|
|
68940
|
+
return isWholeTableSelected;
|
|
68941
|
+
});
|
|
68942
|
+
}
|
|
68914
68943
|
fallbackToVisibleSheet() {
|
|
68915
68944
|
if (!this.getters.tryGetSheet(this.getters.getActiveSheetId())) {
|
|
68916
68945
|
const currentSheetIds = this.getters.getVisibleSheetIds();
|
|
@@ -71075,9 +71104,7 @@ class ClickableCellsStore extends SpreadsheetStore {
|
|
|
71075
71104
|
}
|
|
71076
71105
|
if (!(xc in clickableCells[sheetId])) {
|
|
71077
71106
|
const clickableCell = this.findClickableItem(position);
|
|
71078
|
-
|
|
71079
|
-
clickableCells[sheetId][xc] = clickableCell;
|
|
71080
|
-
}
|
|
71107
|
+
clickableCells[sheetId][xc] = clickableCell;
|
|
71081
71108
|
}
|
|
71082
71109
|
return clickableCells[sheetId][xc];
|
|
71083
71110
|
}
|
|
@@ -77212,6 +77239,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
|
|
|
77212
77239
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, chartHelpers, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
77213
77240
|
|
|
77214
77241
|
|
|
77215
|
-
__info__.version = "18.2.
|
|
77216
|
-
__info__.date = "2025-08-
|
|
77217
|
-
__info__.hash = "
|
|
77242
|
+
__info__.version = "18.2.26";
|
|
77243
|
+
__info__.date = "2025-08-21T06:39:39.007Z";
|
|
77244
|
+
__info__.hash = "d23c340";
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 18.2.
|
|
6
|
-
* @date 2025-08-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.2.26
|
|
6
|
+
* @date 2025-08-21T06:39:39.007Z
|
|
7
|
+
* @hash d23c340
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -3612,6 +3612,7 @@
|
|
|
3612
3612
|
CommandResult["Success"] = "Success";
|
|
3613
3613
|
CommandResult["CancelledForUnknownReason"] = "CancelledForUnknownReason";
|
|
3614
3614
|
CommandResult["WillRemoveExistingMerge"] = "WillRemoveExistingMerge";
|
|
3615
|
+
CommandResult["CannotMoveTableHeader"] = "CannotMoveTableHeader";
|
|
3615
3616
|
CommandResult["MergeIsDestructive"] = "MergeIsDestructive";
|
|
3616
3617
|
CommandResult["CellIsMerged"] = "CellIsMerged";
|
|
3617
3618
|
CommandResult["InvalidTarget"] = "InvalidTarget";
|
|
@@ -19670,7 +19671,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
19670
19671
|
right: startingCol + offsetWidth - 1,
|
|
19671
19672
|
bottom: startingRow + offsetHeight - 1,
|
|
19672
19673
|
};
|
|
19673
|
-
const range = this.getters.getRangeFromZone(
|
|
19674
|
+
const range = this.getters.getRangeFromZone(sheetId, dependencyZone);
|
|
19674
19675
|
if (range.invalidXc || range.invalidSheetName) {
|
|
19675
19676
|
return new InvalidReferenceError();
|
|
19676
19677
|
}
|
|
@@ -28681,6 +28682,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
28681
28682
|
Custom: _t("Custom"),
|
|
28682
28683
|
};
|
|
28683
28684
|
const MergeErrorMessage = _t("Merged cells are preventing this operation. Unmerge those cells and try again.");
|
|
28685
|
+
const TableHeaderMoveErrorMessage = _t("The header row of a table can't be moved.");
|
|
28684
28686
|
const SplitToColumnsTerms = {
|
|
28685
28687
|
Errors: {
|
|
28686
28688
|
Unexpected: _t("Cannot split the selection for an unknown reason"),
|
|
@@ -31904,9 +31906,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
31904
31906
|
};
|
|
31905
31907
|
}
|
|
31906
31908
|
getDefinitionForExcel() {
|
|
31907
|
-
if (this.aggregated) {
|
|
31908
|
-
return undefined;
|
|
31909
|
-
}
|
|
31910
31909
|
const dataSets = this.dataSets
|
|
31911
31910
|
.map((ds) => toExcelDataset(this.getters, ds))
|
|
31912
31911
|
.filter((ds) => ds.range !== "" && ds.range !== CellErrorType.InvalidReference);
|
|
@@ -46071,7 +46070,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
46071
46070
|
this.props.onDimensionsUpdated(update);
|
|
46072
46071
|
}
|
|
46073
46072
|
getMeasureId(fieldName, aggregator) {
|
|
46074
|
-
const baseId = fieldName + (aggregator ? `:${aggregator}` : "");
|
|
46073
|
+
const baseId = fieldName.replaceAll("'", "") + (aggregator ? `:${aggregator}` : "");
|
|
46075
46074
|
let id = baseId;
|
|
46076
46075
|
let i = 2;
|
|
46077
46076
|
while (this.props.definition.measures.some((m) => m.id === id)) {
|
|
@@ -51749,8 +51748,13 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
51749
51748
|
elements,
|
|
51750
51749
|
position: this.state.position,
|
|
51751
51750
|
});
|
|
51752
|
-
if (!result.isSuccessful
|
|
51753
|
-
|
|
51751
|
+
if (!result.isSuccessful) {
|
|
51752
|
+
if (result.reasons.includes("WillRemoveExistingMerge" /* CommandResult.WillRemoveExistingMerge */)) {
|
|
51753
|
+
this.env.raiseError(MergeErrorMessage);
|
|
51754
|
+
}
|
|
51755
|
+
else if (result.reasons.includes("CannotMoveTableHeader" /* CommandResult.CannotMoveTableHeader */)) {
|
|
51756
|
+
this.env.raiseError(TableHeaderMoveErrorMessage);
|
|
51757
|
+
}
|
|
51754
51758
|
}
|
|
51755
51759
|
}
|
|
51756
51760
|
_selectElement(index, addDistinctHeader) {
|
|
@@ -63746,7 +63750,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
63746
63750
|
return PivotPresentationLayer;
|
|
63747
63751
|
}
|
|
63748
63752
|
|
|
63749
|
-
const UNDO_REDO_PIVOT_COMMANDS = ["ADD_PIVOT", "UPDATE_PIVOT"];
|
|
63753
|
+
const UNDO_REDO_PIVOT_COMMANDS = ["ADD_PIVOT", "UPDATE_PIVOT", "REMOVE_PIVOT"];
|
|
63750
63754
|
function isPivotCommand(cmd) {
|
|
63751
63755
|
return UNDO_REDO_PIVOT_COMMANDS.includes(cmd.type);
|
|
63752
63756
|
}
|
|
@@ -68910,8 +68914,33 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
68910
68914
|
if (headers.some((h) => h < 0 || h >= maxHeaderValue)) {
|
|
68911
68915
|
return "InvalidHeaderIndex" /* CommandResult.InvalidHeaderIndex */;
|
|
68912
68916
|
}
|
|
68917
|
+
if (!isCol && !this.isTableRowMoveAllowed(id, cmd.elements)) {
|
|
68918
|
+
return "CannotMoveTableHeader" /* CommandResult.CannotMoveTableHeader */;
|
|
68919
|
+
}
|
|
68913
68920
|
return "Success" /* CommandResult.Success */;
|
|
68914
68921
|
}
|
|
68922
|
+
isTableRowMoveAllowed(sheetId, selectedRows) {
|
|
68923
|
+
const tables = this.getters.getCoreTables(sheetId);
|
|
68924
|
+
if (tables.length === 0) {
|
|
68925
|
+
return true;
|
|
68926
|
+
}
|
|
68927
|
+
const selectedRowSet = new Set(selectedRows);
|
|
68928
|
+
return tables.every(({ range: { zone }, config }) => {
|
|
68929
|
+
const { top, bottom } = zone;
|
|
68930
|
+
if (config.numberOfHeaders === 0) {
|
|
68931
|
+
return true;
|
|
68932
|
+
}
|
|
68933
|
+
const headerRowEnd = top + config.numberOfHeaders - 1;
|
|
68934
|
+
// Moving the table is allowed if table header rows are not part of the selection
|
|
68935
|
+
// Or if the entire table (including header) is selected
|
|
68936
|
+
const isHeaderSelected = selectedRows.some((row) => row >= top && row <= headerRowEnd);
|
|
68937
|
+
if (!isHeaderSelected) {
|
|
68938
|
+
return true;
|
|
68939
|
+
}
|
|
68940
|
+
const isWholeTableSelected = range(top, bottom + 1).every((r) => selectedRowSet.has(r));
|
|
68941
|
+
return isWholeTableSelected;
|
|
68942
|
+
});
|
|
68943
|
+
}
|
|
68915
68944
|
fallbackToVisibleSheet() {
|
|
68916
68945
|
if (!this.getters.tryGetSheet(this.getters.getActiveSheetId())) {
|
|
68917
68946
|
const currentSheetIds = this.getters.getVisibleSheetIds();
|
|
@@ -71076,9 +71105,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
71076
71105
|
}
|
|
71077
71106
|
if (!(xc in clickableCells[sheetId])) {
|
|
71078
71107
|
const clickableCell = this.findClickableItem(position);
|
|
71079
|
-
|
|
71080
|
-
clickableCells[sheetId][xc] = clickableCell;
|
|
71081
|
-
}
|
|
71108
|
+
clickableCells[sheetId][xc] = clickableCell;
|
|
71082
71109
|
}
|
|
71083
71110
|
return clickableCells[sheetId][xc];
|
|
71084
71111
|
}
|
|
@@ -77258,9 +77285,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
77258
77285
|
exports.tokenize = tokenize;
|
|
77259
77286
|
|
|
77260
77287
|
|
|
77261
|
-
__info__.version = "18.2.
|
|
77262
|
-
__info__.date = "2025-08-
|
|
77263
|
-
__info__.hash = "
|
|
77288
|
+
__info__.version = "18.2.26";
|
|
77289
|
+
__info__.date = "2025-08-21T06:39:39.007Z";
|
|
77290
|
+
__info__.hash = "d23c340";
|
|
77264
77291
|
|
|
77265
77292
|
|
|
77266
77293
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|