@odoo/o-spreadsheet 17.0.4 → 17.0.5
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 +102 -62
- package/dist/o-spreadsheet.d.ts +7 -4
- package/dist/o-spreadsheet.esm.js +102 -62
- package/dist/o-spreadsheet.iife.js +102 -62
- package/dist/o-spreadsheet.iife.min.js +264 -266
- package/dist/o_spreadsheet.xml +4 -4
- 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 17.0.
|
|
6
|
-
* @date 2023-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.0.5
|
|
6
|
+
* @date 2023-12-05T09:51:44.657Z
|
|
7
|
+
* @hash 2480a5d
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { Component, useRef, onMounted, useEffect, onWillPatch, useState, onWillUpdateProps, onPatched, useComponent, useExternalListener, onWillUnmount, onWillStart, xml, useChildSubEnv, useSubEnv, markRaw } from '@odoo/owl';
|
|
@@ -3387,8 +3387,10 @@ function convertInternalFormatToFormat(internalFormat) {
|
|
|
3387
3387
|
const cellReference = new RegExp(/\$?([A-Z]{1,3})\$?([0-9]{1,7})/, "i");
|
|
3388
3388
|
// Same as above, but matches the exact string (nothing before or after)
|
|
3389
3389
|
const singleCellReference = new RegExp(/^\$?([A-Z]{1,3})\$?([0-9]{1,7})$/, "i");
|
|
3390
|
-
/** Reference of a column header (eg. A, AB) */
|
|
3391
|
-
const colHeader = new RegExp(
|
|
3390
|
+
/** Reference of a column header (eg. A, AB, $A) */
|
|
3391
|
+
const colHeader = new RegExp(/^\$?([A-Z]{1,3})+$/, "i");
|
|
3392
|
+
/** Reference of a row header (eg. 1, $1) */
|
|
3393
|
+
const rowHeader = new RegExp(/^\$?([0-9]{1,7})+$/, "i");
|
|
3392
3394
|
/** Reference of a column (eg. A, $CA, Sheet1!B) */
|
|
3393
3395
|
const colReference = new RegExp(/^\s*('.+'!|[^']+!)?\$?([A-Z]{1,3})$/, "i");
|
|
3394
3396
|
/** Reference of a row (eg. 1, 59, Sheet1!9) */
|
|
@@ -3418,6 +3420,9 @@ function isRowReference(xc) {
|
|
|
3418
3420
|
function isColHeader(str) {
|
|
3419
3421
|
return colHeader.test(str);
|
|
3420
3422
|
}
|
|
3423
|
+
function isRowHeader(str) {
|
|
3424
|
+
return rowHeader.test(str);
|
|
3425
|
+
}
|
|
3421
3426
|
/**
|
|
3422
3427
|
* Return true if the given xc is the reference of a single cell,
|
|
3423
3428
|
* without any specified sheet (e.g. A1)
|
|
@@ -4101,18 +4106,10 @@ class RangeImpl {
|
|
|
4101
4106
|
if (isFullCol) {
|
|
4102
4107
|
parts[0].rowFixed = parts[0].rowFixed || parts[1].rowFixed;
|
|
4103
4108
|
parts[1].rowFixed = parts[0].rowFixed || parts[1].rowFixed;
|
|
4104
|
-
if (zone.left === zone.right) {
|
|
4105
|
-
parts[0].colFixed = parts[0].colFixed || parts[1].colFixed;
|
|
4106
|
-
parts[1].colFixed = parts[0].colFixed || parts[1].colFixed;
|
|
4107
|
-
}
|
|
4108
4109
|
}
|
|
4109
4110
|
if (isFullRow) {
|
|
4110
4111
|
parts[0].colFixed = parts[0].colFixed || parts[1].colFixed;
|
|
4111
4112
|
parts[1].colFixed = parts[0].colFixed || parts[1].colFixed;
|
|
4112
|
-
if (zone.top === zone.bottom) {
|
|
4113
|
-
parts[0].rowFixed = parts[0].rowFixed || parts[1].rowFixed;
|
|
4114
|
-
parts[1].rowFixed = parts[0].rowFixed || parts[1].rowFixed;
|
|
4115
|
-
}
|
|
4116
4113
|
}
|
|
4117
4114
|
return parts;
|
|
4118
4115
|
}
|
|
@@ -4354,7 +4351,7 @@ function computeTextLinesHeight(textLineHeight, numberOfLines = 1) {
|
|
|
4354
4351
|
function getDefaultCellHeight(ctx, cell, colSize) {
|
|
4355
4352
|
if (!cell || !cell.content)
|
|
4356
4353
|
return DEFAULT_CELL_HEIGHT;
|
|
4357
|
-
const maxWidth = cell.style?.wrapping ? colSize - 2 * MIN_CELL_TEXT_MARGIN : undefined;
|
|
4354
|
+
const maxWidth = cell.style?.wrapping === "wrap" ? colSize - 2 * MIN_CELL_TEXT_MARGIN : undefined;
|
|
4358
4355
|
const numberOfLines = cell.isFormula
|
|
4359
4356
|
? 1
|
|
4360
4357
|
: splitTextToWidth(ctx, cell.content, cell.style, maxWidth).length;
|
|
@@ -6249,10 +6246,6 @@ css /* scss */ `
|
|
|
6249
6246
|
|
|
6250
6247
|
.o-error-tooltip-message {
|
|
6251
6248
|
overflow: hidden;
|
|
6252
|
-
display: -webkit-box; /* Limit to 3 lines */
|
|
6253
|
-
-webkit-line-clamp: 3;
|
|
6254
|
-
line-clamp: 3;
|
|
6255
|
-
-webkit-box-orient: vertical;
|
|
6256
6249
|
}
|
|
6257
6250
|
}
|
|
6258
6251
|
`;
|
|
@@ -6635,6 +6628,9 @@ function* iterateChildren(el) {
|
|
|
6635
6628
|
function getOpenedMenus() {
|
|
6636
6629
|
return Array.from(document.querySelectorAll(".o-spreadsheet .o-menu"));
|
|
6637
6630
|
}
|
|
6631
|
+
function isMacOS() {
|
|
6632
|
+
return navigator.userAgent.toUpperCase().indexOf("MAC") >= 0;
|
|
6633
|
+
}
|
|
6638
6634
|
|
|
6639
6635
|
/**
|
|
6640
6636
|
* Return the o-spreadsheet element position relative
|
|
@@ -28279,6 +28275,7 @@ class AbstractResizer extends Component {
|
|
|
28279
28275
|
draggerShadowThickness: 0,
|
|
28280
28276
|
delta: 0,
|
|
28281
28277
|
base: 0,
|
|
28278
|
+
position: "before",
|
|
28282
28279
|
});
|
|
28283
28280
|
_computeHandleDisplay(ev) {
|
|
28284
28281
|
const position = this._getEvOffset(ev);
|
|
@@ -28403,11 +28400,13 @@ class AbstractResizer extends Component {
|
|
|
28403
28400
|
this.state.draggerLinePosition = dimensions.start;
|
|
28404
28401
|
this.state.draggerShadowPosition = dimensions.start;
|
|
28405
28402
|
this.state.base = elementIndex;
|
|
28403
|
+
this.state.position = "before";
|
|
28406
28404
|
}
|
|
28407
28405
|
else if (this._getSelectedZoneEnd() < elementIndex) {
|
|
28408
28406
|
this.state.draggerLinePosition = dimensions.end;
|
|
28409
28407
|
this.state.draggerShadowPosition = dimensions.end - this.state.draggerShadowThickness;
|
|
28410
|
-
this.state.base = elementIndex
|
|
28408
|
+
this.state.base = elementIndex;
|
|
28409
|
+
this.state.position = "after";
|
|
28411
28410
|
}
|
|
28412
28411
|
else {
|
|
28413
28412
|
this.state.draggerLinePosition = startDimensions.start;
|
|
@@ -28589,6 +28588,7 @@ class ColResizer extends AbstractResizer {
|
|
|
28589
28588
|
dimension: "COL",
|
|
28590
28589
|
base: this.state.base,
|
|
28591
28590
|
elements,
|
|
28591
|
+
position: this.state.position,
|
|
28592
28592
|
});
|
|
28593
28593
|
if (!result.isSuccessful && result.reasons.includes("WillRemoveExistingMerge" /* CommandResult.WillRemoveExistingMerge */)) {
|
|
28594
28594
|
this.env.raiseError(MergeErrorMessage);
|
|
@@ -28762,6 +28762,7 @@ class RowResizer extends AbstractResizer {
|
|
|
28762
28762
|
dimension: "ROW",
|
|
28763
28763
|
base: this.state.base,
|
|
28764
28764
|
elements,
|
|
28765
|
+
position: this.state.position,
|
|
28765
28766
|
});
|
|
28766
28767
|
if (!result.isSuccessful && result.reasons.includes("WillRemoveExistingMerge" /* CommandResult.WillRemoveExistingMerge */)) {
|
|
28767
28768
|
this.env.raiseError(MergeErrorMessage);
|
|
@@ -28869,8 +28870,8 @@ function useWheelHandler(handler) {
|
|
|
28869
28870
|
return val * (deltaMode === 0 ? 1 : DEFAULT_CELL_HEIGHT);
|
|
28870
28871
|
}
|
|
28871
28872
|
const onMouseWheel = (ev) => {
|
|
28872
|
-
const deltaX = normalize(ev.shiftKey ? ev.deltaY : ev.deltaX, ev.deltaMode);
|
|
28873
|
-
const deltaY = normalize(ev.shiftKey ? ev.deltaX : ev.deltaY, ev.deltaMode);
|
|
28873
|
+
const deltaX = normalize(ev.shiftKey && !isMacOS() ? ev.deltaY : ev.deltaX, ev.deltaMode);
|
|
28874
|
+
const deltaY = normalize(ev.shiftKey && !isMacOS() ? ev.deltaX : ev.deltaY, ev.deltaMode);
|
|
28874
28875
|
handler(deltaX, deltaY);
|
|
28875
28876
|
};
|
|
28876
28877
|
return onMouseWheel;
|
|
@@ -33324,7 +33325,7 @@ const machine = {
|
|
|
33324
33325
|
SPACE: goTo(State.RightRef),
|
|
33325
33326
|
NUMBER: goTo(State.Found),
|
|
33326
33327
|
REFERENCE: goTo(State.Found, (token) => isSingleCellReference(token.value)),
|
|
33327
|
-
SYMBOL: goTo(State.Found, (token) => isColHeader(token.value)),
|
|
33328
|
+
SYMBOL: goTo(State.Found, (token) => isColHeader(token.value) || isRowHeader(token.value)),
|
|
33328
33329
|
},
|
|
33329
33330
|
[State.RightColumnRef]: {
|
|
33330
33331
|
SPACE: goTo(State.RightColumnRef),
|
|
@@ -33335,6 +33336,7 @@ const machine = {
|
|
|
33335
33336
|
SPACE: goTo(State.RightRowRef),
|
|
33336
33337
|
NUMBER: goTo(State.Found),
|
|
33337
33338
|
REFERENCE: goTo(State.Found, (token) => isSingleCellReference(token.value)),
|
|
33339
|
+
SYMBOL: goTo(State.Found, (token) => isRowHeader(token.value)),
|
|
33338
33340
|
},
|
|
33339
33341
|
[State.Found]: {},
|
|
33340
33342
|
};
|
|
@@ -37316,7 +37318,16 @@ class HeaderVisibilityPlugin extends CorePlugin {
|
|
|
37316
37318
|
return consecutiveIndexes;
|
|
37317
37319
|
}
|
|
37318
37320
|
getAllVisibleHeaders(sheetId, dimension) {
|
|
37319
|
-
|
|
37321
|
+
const headers = range(0, this.getters.getNumberHeaders(sheetId, dimension));
|
|
37322
|
+
const foldedHeaders = [];
|
|
37323
|
+
this.getters.getHeaderGroups(sheetId, dimension).forEach((group) => {
|
|
37324
|
+
if (group.isFolded) {
|
|
37325
|
+
foldedHeaders.push(...range(group.start, group.end + 1));
|
|
37326
|
+
}
|
|
37327
|
+
});
|
|
37328
|
+
return headers.filter((i) => {
|
|
37329
|
+
return !this.hiddenHeaders[sheetId][dimension][i] && !foldedHeaders.includes(i);
|
|
37330
|
+
});
|
|
37320
37331
|
}
|
|
37321
37332
|
import(data) {
|
|
37322
37333
|
for (let sheet of data.sheets) {
|
|
@@ -39776,10 +39787,13 @@ class CompilationParametersBuilder {
|
|
|
39776
39787
|
if (evaluatedCell === undefined) {
|
|
39777
39788
|
return { value: null, format: this.getters.getCell(position)?.format };
|
|
39778
39789
|
}
|
|
39790
|
+
if (evaluatedCell.type === CellValueType.error) {
|
|
39791
|
+
throw evaluatedCell.error;
|
|
39792
|
+
}
|
|
39779
39793
|
return evaluatedCell;
|
|
39780
39794
|
}
|
|
39781
39795
|
getEvaluatedCellIfNotEmpty(position) {
|
|
39782
|
-
const evaluatedCell = this.
|
|
39796
|
+
const evaluatedCell = this.computeCell(position);
|
|
39783
39797
|
if (evaluatedCell.type === CellValueType.empty) {
|
|
39784
39798
|
const cell = this.getters.getCell(position);
|
|
39785
39799
|
if (!cell || (!cell.isFormula && cell.content === "")) {
|
|
@@ -39788,13 +39802,6 @@ class CompilationParametersBuilder {
|
|
|
39788
39802
|
}
|
|
39789
39803
|
return evaluatedCell;
|
|
39790
39804
|
}
|
|
39791
|
-
getEvaluatedCell(position) {
|
|
39792
|
-
const evaluatedCell = this.computeCell(position);
|
|
39793
|
-
if (evaluatedCell.type === CellValueType.error) {
|
|
39794
|
-
throw evaluatedCell.error;
|
|
39795
|
-
}
|
|
39796
|
-
return evaluatedCell;
|
|
39797
|
-
}
|
|
39798
39805
|
/**
|
|
39799
39806
|
* Return the values of the cell(s) used in reference, but always in the format of a range even
|
|
39800
39807
|
* if a single cell is referenced. It is a list of col values. This is useful for the formulas that describe parameters as
|
|
@@ -39817,7 +39824,11 @@ class CompilationParametersBuilder {
|
|
|
39817
39824
|
const { top, left, bottom, right } = zone;
|
|
39818
39825
|
const cacheKey = `${sheetId}-${top}-${left}-${bottom}-${right}`;
|
|
39819
39826
|
if (cacheKey in this.rangeCache) {
|
|
39820
|
-
|
|
39827
|
+
const result = this.rangeCache[cacheKey];
|
|
39828
|
+
if (result instanceof EvaluationError) {
|
|
39829
|
+
throw result;
|
|
39830
|
+
}
|
|
39831
|
+
return result;
|
|
39821
39832
|
}
|
|
39822
39833
|
const height = _zone.bottom - _zone.top + 1;
|
|
39823
39834
|
const width = _zone.right - _zone.left + 1;
|
|
@@ -39827,6 +39838,11 @@ class CompilationParametersBuilder {
|
|
|
39827
39838
|
const colIndex = col - _zone.left;
|
|
39828
39839
|
matrix[colIndex] = new Array(height);
|
|
39829
39840
|
for (let row = _zone.top; row <= _zone.bottom; row++) {
|
|
39841
|
+
const evaluatedCell = this.getEvaluatedCellIfNotEmpty({ sheetId, col, row });
|
|
39842
|
+
if (evaluatedCell?.type === CellValueType.error) {
|
|
39843
|
+
this.rangeCache[cacheKey] = evaluatedCell.error;
|
|
39844
|
+
throw evaluatedCell.error;
|
|
39845
|
+
}
|
|
39830
39846
|
const rowIndex = row - _zone.top;
|
|
39831
39847
|
matrix[colIndex][rowIndex] = this.readCell({ sheetId, col, row });
|
|
39832
39848
|
}
|
|
@@ -41784,19 +41800,21 @@ class AutofillPlugin extends UIPlugin {
|
|
|
41784
41800
|
let col = zone.left;
|
|
41785
41801
|
let row = zone.bottom;
|
|
41786
41802
|
if (col > 0) {
|
|
41787
|
-
let
|
|
41788
|
-
while (
|
|
41803
|
+
let leftPosition = { sheetId, col: col - 1, row };
|
|
41804
|
+
while (this.getters.getEvaluatedCell(leftPosition).type !== CellValueType.empty ||
|
|
41805
|
+
this.getters.getCell(leftPosition)?.content) {
|
|
41789
41806
|
row += 1;
|
|
41790
|
-
|
|
41807
|
+
leftPosition = { sheetId, col: col - 1, row };
|
|
41791
41808
|
}
|
|
41792
41809
|
}
|
|
41793
41810
|
if (row === zone.bottom) {
|
|
41794
41811
|
col = zone.right;
|
|
41795
41812
|
if (col <= this.getters.getNumberCols(sheetId)) {
|
|
41796
|
-
let
|
|
41797
|
-
while (
|
|
41813
|
+
let rightPosition = { sheetId, col: col + 1, row };
|
|
41814
|
+
while (this.getters.getEvaluatedCell(rightPosition).type !== CellValueType.empty ||
|
|
41815
|
+
this.getters.getCell(rightPosition)?.content) {
|
|
41798
41816
|
row += 1;
|
|
41799
|
-
|
|
41817
|
+
rightPosition = { sheetId, col: col + 1, row };
|
|
41800
41818
|
}
|
|
41801
41819
|
}
|
|
41802
41820
|
}
|
|
@@ -42788,6 +42806,7 @@ class Session extends EventBus {
|
|
|
42788
42806
|
isReplayingInitialRevisions = false;
|
|
42789
42807
|
processedRevisions = new Set();
|
|
42790
42808
|
uuidGenerator = new UuidGenerator();
|
|
42809
|
+
lastLocalOperation;
|
|
42791
42810
|
/**
|
|
42792
42811
|
* Manages the collaboration between multiple users on the same spreadsheet.
|
|
42793
42812
|
* It can forward local state changes to other users to ensure they all eventually
|
|
@@ -42820,6 +42839,11 @@ class Session extends EventBus {
|
|
|
42820
42839
|
return;
|
|
42821
42840
|
const revision = new Revision(this.uuidGenerator.uuidv4(), this.clientId, commands, rootCommand, changes, Date.now());
|
|
42822
42841
|
this.revisions.append(revision.id, revision);
|
|
42842
|
+
// REQUEST_REDO just repeats the last operation, the
|
|
42843
|
+
// last operation is still the same and should not change.
|
|
42844
|
+
if (rootCommand.type !== "REQUEST_REDO") {
|
|
42845
|
+
this.lastLocalOperation = revision;
|
|
42846
|
+
}
|
|
42823
42847
|
this.trigger("new-local-state-update", { id: revision.id });
|
|
42824
42848
|
this.sendUpdateMessage({
|
|
42825
42849
|
type: "REMOTE_REVISION",
|
|
@@ -42916,19 +42940,10 @@ class Session extends EventBus {
|
|
|
42916
42940
|
return this.pendingMessages.length === 0;
|
|
42917
42941
|
}
|
|
42918
42942
|
/**
|
|
42919
|
-
* Get the last local revision
|
|
42943
|
+
* Get the last local revision
|
|
42920
42944
|
* */
|
|
42921
|
-
getLastLocalNonEmptyRevision(
|
|
42922
|
-
|
|
42923
|
-
for (const rev of revisions) {
|
|
42924
|
-
if (rev.rootCommand === "SNAPSHOT")
|
|
42925
|
-
return undefined;
|
|
42926
|
-
if (!rev.rootCommand || rev.rootCommand === "REMOTE")
|
|
42927
|
-
continue;
|
|
42928
|
-
if (!ignoredRootCommands.includes(rev.rootCommand?.type) && rev.commands.length)
|
|
42929
|
-
return rev;
|
|
42930
|
-
}
|
|
42931
|
-
return undefined;
|
|
42945
|
+
getLastLocalNonEmptyRevision() {
|
|
42946
|
+
return this.lastLocalOperation;
|
|
42932
42947
|
}
|
|
42933
42948
|
_move(position) {
|
|
42934
42949
|
// this method is debounced and might be called after the client
|
|
@@ -42988,7 +43003,7 @@ class Session extends EventBus {
|
|
|
42988
43003
|
break;
|
|
42989
43004
|
case "REMOTE_REVISION":
|
|
42990
43005
|
const { clientId, commands, timestamp } = message;
|
|
42991
|
-
const revision = new Revision(message.nextRevisionId, clientId, commands,
|
|
43006
|
+
const revision = new Revision(message.nextRevisionId, clientId, commands, undefined, undefined, timestamp);
|
|
42992
43007
|
if (revision.clientId !== this.clientId) {
|
|
42993
43008
|
this.revisions.insert(revision.id, revision, message.serverRevisionId);
|
|
42994
43009
|
const pendingCommands = this.pendingMessages
|
|
@@ -43001,10 +43016,11 @@ class Session extends EventBus {
|
|
|
43001
43016
|
}
|
|
43002
43017
|
break;
|
|
43003
43018
|
case "SNAPSHOT_CREATED": {
|
|
43004
|
-
const revision = new Revision(message.nextRevisionId, "server", [],
|
|
43019
|
+
const revision = new Revision(message.nextRevisionId, "server", [], undefined, undefined, Date.now());
|
|
43005
43020
|
this.revisions.insert(revision.id, revision, message.serverRevisionId);
|
|
43006
43021
|
this.dropPendingHistoryMessages();
|
|
43007
43022
|
this.trigger("snapshot");
|
|
43023
|
+
this.lastLocalOperation = undefined;
|
|
43008
43024
|
break;
|
|
43009
43025
|
}
|
|
43010
43026
|
}
|
|
@@ -45559,6 +45575,9 @@ class SelectionInputsManagerPlugin extends UIPlugin {
|
|
|
45559
45575
|
// Other
|
|
45560
45576
|
// ---------------------------------------------------------------------------
|
|
45561
45577
|
initInput(id, initialRanges, inputHasSingleRange = false) {
|
|
45578
|
+
if (this.inputs[id]) {
|
|
45579
|
+
this.unfocus();
|
|
45580
|
+
}
|
|
45562
45581
|
this.inputs[id] = new SelectionInputPlugin(this.config, initialRanges, inputHasSingleRange);
|
|
45563
45582
|
if (initialRanges.length === 0) {
|
|
45564
45583
|
const input = this.inputs[id];
|
|
@@ -46357,7 +46376,7 @@ class HistoryPlugin extends UIPlugin {
|
|
|
46357
46376
|
* Ignore standard undo/redo revisions (that are empty)
|
|
46358
46377
|
*/
|
|
46359
46378
|
getPossibleRevisionToRepeat() {
|
|
46360
|
-
return this.session.getLastLocalNonEmptyRevision(
|
|
46379
|
+
return this.session.getLastLocalNonEmptyRevision();
|
|
46361
46380
|
}
|
|
46362
46381
|
}
|
|
46363
46382
|
|
|
@@ -47142,6 +47161,10 @@ function setXcToReferenceType(xc, referenceType) {
|
|
|
47142
47161
|
return xc.slice(0, indexOfNumber) + "$" + xc.slice(indexOfNumber);
|
|
47143
47162
|
case "colrow":
|
|
47144
47163
|
indexOfNumber = xc.search(/[0-9]/);
|
|
47164
|
+
if (indexOfNumber === -1 || indexOfNumber === 0) {
|
|
47165
|
+
// no row number (eg. A) or no column (eg. 1)
|
|
47166
|
+
return "$" + xc;
|
|
47167
|
+
}
|
|
47145
47168
|
xc = xc.slice(0, indexOfNumber) + "$" + xc.slice(indexOfNumber);
|
|
47146
47169
|
return "$" + xc;
|
|
47147
47170
|
case "none":
|
|
@@ -47912,6 +47935,12 @@ class FilterEvaluationPlugin extends UIPlugin {
|
|
|
47912
47935
|
break;
|
|
47913
47936
|
case "HIDE_COLUMNS_ROWS":
|
|
47914
47937
|
case "UNHIDE_COLUMNS_ROWS":
|
|
47938
|
+
case "GROUP_HEADERS":
|
|
47939
|
+
case "UNGROUP_HEADERS":
|
|
47940
|
+
case "FOLD_HEADER_GROUP":
|
|
47941
|
+
case "UNFOLD_HEADER_GROUP":
|
|
47942
|
+
case "FOLD_ALL_HEADER_GROUPS":
|
|
47943
|
+
case "UNFOLD_ALL_HEADER_GROUPS":
|
|
47915
47944
|
this.updateHiddenRows();
|
|
47916
47945
|
break;
|
|
47917
47946
|
case "UPDATE_FILTER":
|
|
@@ -48613,7 +48642,7 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
48613
48642
|
sheetId: cmd.sheetId,
|
|
48614
48643
|
base: cmd.base,
|
|
48615
48644
|
quantity: thickness,
|
|
48616
|
-
position:
|
|
48645
|
+
position: cmd.position,
|
|
48617
48646
|
});
|
|
48618
48647
|
const isCol = cmd.dimension === "COL";
|
|
48619
48648
|
const start = cmd.elements[0];
|
|
@@ -48630,12 +48659,13 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
48630
48659
|
},
|
|
48631
48660
|
];
|
|
48632
48661
|
const state = new ClipboardCellsState(target, "CUT", this.getters, this.dispatch, this.selection);
|
|
48662
|
+
const base = isBasedBefore ? cmd.base : cmd.base + 1;
|
|
48633
48663
|
const pasteTarget = [
|
|
48634
48664
|
{
|
|
48635
|
-
left: isCol ?
|
|
48636
|
-
right: isCol ?
|
|
48637
|
-
top: !isCol ?
|
|
48638
|
-
bottom: !isCol ?
|
|
48665
|
+
left: isCol ? base : 0,
|
|
48666
|
+
right: isCol ? base + thickness - 1 : this.getters.getNumberCols(cmd.sheetId) - 1,
|
|
48667
|
+
top: !isCol ? base : 0,
|
|
48668
|
+
bottom: !isCol ? base + thickness - 1 : this.getters.getNumberRows(cmd.sheetId) - 1,
|
|
48639
48669
|
},
|
|
48640
48670
|
];
|
|
48641
48671
|
state.paste(pasteTarget, { selectTarget: true });
|
|
@@ -48670,6 +48700,11 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
48670
48700
|
doesElementsHaveCommonMerges(id, cmd.base - 1, cmd.base)) {
|
|
48671
48701
|
return "WillRemoveExistingMerge" /* CommandResult.WillRemoveExistingMerge */;
|
|
48672
48702
|
}
|
|
48703
|
+
const headers = [cmd.base, ...cmd.elements];
|
|
48704
|
+
const maxHeaderValue = isCol ? this.getters.getNumberCols(id) : this.getters.getNumberRows(id);
|
|
48705
|
+
if (headers.some((h) => h < 0 || h >= maxHeaderValue)) {
|
|
48706
|
+
return "InvalidHeaderIndex" /* CommandResult.InvalidHeaderIndex */;
|
|
48707
|
+
}
|
|
48673
48708
|
return "Success" /* CommandResult.Success */;
|
|
48674
48709
|
}
|
|
48675
48710
|
//-------------------------------------------
|
|
@@ -49715,10 +49750,13 @@ class HeaderPositionsUIPlugin extends UIPlugin {
|
|
|
49715
49750
|
}
|
|
49716
49751
|
break;
|
|
49717
49752
|
case "UPDATE_CELL":
|
|
49718
|
-
if ("content" in cmd || "format" in cmd
|
|
49753
|
+
if ("content" in cmd || "format" in cmd) {
|
|
49719
49754
|
this.headerPositions = {};
|
|
49720
49755
|
this.isDirty = true;
|
|
49721
49756
|
}
|
|
49757
|
+
else {
|
|
49758
|
+
this.headerPositions[cmd.sheetId] = this.computeHeaderPositionsOfSheet(cmd.sheetId);
|
|
49759
|
+
}
|
|
49722
49760
|
break;
|
|
49723
49761
|
case "UPDATE_FILTER":
|
|
49724
49762
|
case "REMOVE_FILTER_TABLE":
|
|
@@ -51875,6 +51913,8 @@ css /* scss */ `
|
|
|
51875
51913
|
*:before,
|
|
51876
51914
|
*:after {
|
|
51877
51915
|
box-sizing: content-box;
|
|
51916
|
+
/** rtl not supported ATM */
|
|
51917
|
+
direction: ltr;
|
|
51878
51918
|
}
|
|
51879
51919
|
.o-separator {
|
|
51880
51920
|
border-bottom: ${MENU_SEPARATOR_BORDER_WIDTH}px solid ${SEPARATOR_COLOR};
|
|
@@ -55912,6 +55952,6 @@ const constants = {
|
|
|
55912
55952
|
export { AbstractChart, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, tokenize };
|
|
55913
55953
|
|
|
55914
55954
|
|
|
55915
|
-
__info__.version = "17.0.
|
|
55916
|
-
__info__.date = "2023-
|
|
55917
|
-
__info__.hash = "
|
|
55955
|
+
__info__.version = "17.0.5";
|
|
55956
|
+
__info__.date = "2023-12-05T09:51:44.657Z";
|
|
55957
|
+
__info__.hash = "2480a5d";
|