@odoo/o-spreadsheet 18.4.2 → 18.4.3
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.
|
@@ -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.4.
|
|
6
|
-
* @date 2025-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.4.3
|
|
6
|
+
* @date 2025-07-28T13:39:06.036Z
|
|
7
|
+
* @hash 4b596d7
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -19035,13 +19035,19 @@ const COLUMN = {
|
|
|
19035
19035
|
if (isEvaluationError(cellReference?.value)) {
|
|
19036
19036
|
return cellReference;
|
|
19037
19037
|
}
|
|
19038
|
-
|
|
19039
|
-
|
|
19040
|
-
|
|
19041
|
-
|
|
19042
|
-
return
|
|
19038
|
+
if (cellReference === undefined) {
|
|
19039
|
+
if (this.__originCellPosition?.col === undefined) {
|
|
19040
|
+
return new EvaluationError(_t("In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter."));
|
|
19041
|
+
}
|
|
19042
|
+
return this.__originCellPosition.col + 1;
|
|
19043
|
+
}
|
|
19044
|
+
const zone = this.getters.getRangeFromSheetXC(this.getters.getActiveSheetId(), cellReference.value).zone;
|
|
19045
|
+
if (zone.left === zone.right) {
|
|
19046
|
+
return zone.left + 1;
|
|
19043
19047
|
}
|
|
19044
|
-
return
|
|
19048
|
+
return generateMatrix(zone.right - zone.left + 1, 1, (col, row) => ({
|
|
19049
|
+
value: zone.left + col + 1,
|
|
19050
|
+
}));
|
|
19045
19051
|
},
|
|
19046
19052
|
isExported: true,
|
|
19047
19053
|
};
|
|
@@ -19272,13 +19278,19 @@ const ROW = {
|
|
|
19272
19278
|
if (isEvaluationError(cellReference?.value)) {
|
|
19273
19279
|
return cellReference;
|
|
19274
19280
|
}
|
|
19275
|
-
|
|
19276
|
-
|
|
19277
|
-
|
|
19278
|
-
|
|
19279
|
-
return
|
|
19281
|
+
if (cellReference === undefined) {
|
|
19282
|
+
if (this.__originCellPosition?.row === undefined) {
|
|
19283
|
+
return new EvaluationError(_t("In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter."));
|
|
19284
|
+
}
|
|
19285
|
+
return this.__originCellPosition.row + 1;
|
|
19286
|
+
}
|
|
19287
|
+
const zone = this.getters.getRangeFromSheetXC(this.getters.getActiveSheetId(), cellReference.value).zone;
|
|
19288
|
+
if (zone.top === zone.bottom) {
|
|
19289
|
+
return zone.top + 1;
|
|
19280
19290
|
}
|
|
19281
|
-
return
|
|
19291
|
+
return generateMatrix(1, zone.bottom - zone.top + 1, (col, row) => ({
|
|
19292
|
+
value: zone.top + row + 1,
|
|
19293
|
+
}));
|
|
19282
19294
|
},
|
|
19283
19295
|
isExported: true,
|
|
19284
19296
|
};
|
|
@@ -32608,6 +32620,9 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
32608
32620
|
get isAutoCompleteDisplayed() {
|
|
32609
32621
|
return !!this.autoComplete.provider;
|
|
32610
32622
|
}
|
|
32623
|
+
get canBeToggled() {
|
|
32624
|
+
return this.autoComplete.provider?.canBeToggled ?? true;
|
|
32625
|
+
}
|
|
32611
32626
|
cycleReferences() {
|
|
32612
32627
|
const locale = this.getters.getLocale();
|
|
32613
32628
|
const updated = cycleFixedReference(this.composerSelection, this._currentContent, locale);
|
|
@@ -33137,6 +33152,7 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
33137
33152
|
proposals,
|
|
33138
33153
|
selectProposal: provider.selectProposal,
|
|
33139
33154
|
autoSelectFirstProposal: provider.autoSelectFirstProposal ?? false,
|
|
33155
|
+
canBeToggled: provider.canBeToggled,
|
|
33140
33156
|
};
|
|
33141
33157
|
}
|
|
33142
33158
|
if (exactMatch && this._currentContent !== this.initialContent) {
|
|
@@ -33159,6 +33175,7 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
33159
33175
|
proposals,
|
|
33160
33176
|
selectProposal: provider.selectProposal,
|
|
33161
33177
|
autoSelectFirstProposal: provider.autoSelectFirstProposal ?? false,
|
|
33178
|
+
canBeToggled: provider.canBeToggled,
|
|
33162
33179
|
};
|
|
33163
33180
|
}
|
|
33164
33181
|
}
|
|
@@ -33729,9 +33746,13 @@ class Composer extends owl.Component {
|
|
|
33729
33746
|
}
|
|
33730
33747
|
}
|
|
33731
33748
|
closeAssistant() {
|
|
33749
|
+
if (!this.props.composerStore.canBeToggled)
|
|
33750
|
+
return;
|
|
33732
33751
|
this.assistant.forcedClosed = true;
|
|
33733
33752
|
}
|
|
33734
33753
|
openAssistant() {
|
|
33754
|
+
if (!this.props.composerStore.canBeToggled)
|
|
33755
|
+
return;
|
|
33735
33756
|
this.assistant.forcedClosed = false;
|
|
33736
33757
|
}
|
|
33737
33758
|
onWheel(event) {
|
|
@@ -33921,7 +33942,7 @@ class Composer extends owl.Component {
|
|
|
33921
33942
|
return [...new Set(argsToFocus)];
|
|
33922
33943
|
}
|
|
33923
33944
|
autoComplete(value) {
|
|
33924
|
-
if (!value || this.assistant.forcedClosed) {
|
|
33945
|
+
if (!value || (this.assistant.forcedClosed && this.props.composerStore.canBeToggled)) {
|
|
33925
33946
|
return;
|
|
33926
33947
|
}
|
|
33927
33948
|
this.props.composerStore.insertAutoCompleteValue(value);
|
|
@@ -55682,9 +55703,15 @@ class SpreadsheetPivot {
|
|
|
55682
55703
|
return domain.reduce((current, acc) => this.filterDataEntriesFromDomainNode(current, acc), dataEntries);
|
|
55683
55704
|
}
|
|
55684
55705
|
filterDataEntriesFromDomainNode(dataEntries, domain) {
|
|
55685
|
-
const { field, value } = domain;
|
|
55706
|
+
const { field, value, type } = domain;
|
|
55686
55707
|
const { nameWithGranularity } = this.getDimension(field);
|
|
55687
|
-
return dataEntries.filter((entry) =>
|
|
55708
|
+
return dataEntries.filter((entry) => {
|
|
55709
|
+
const cellValue = entry[nameWithGranularity]?.value;
|
|
55710
|
+
if (type === "char") {
|
|
55711
|
+
return String(cellValue) === String(value);
|
|
55712
|
+
}
|
|
55713
|
+
return cellValue === value;
|
|
55714
|
+
});
|
|
55688
55715
|
}
|
|
55689
55716
|
getDimension(nameWithGranularity) {
|
|
55690
55717
|
return this.definition.getDimension(nameWithGranularity);
|
|
@@ -67553,6 +67580,23 @@ class HeaderSizeUIPlugin extends CoreViewPlugin {
|
|
|
67553
67580
|
static getters = ["getRowSize", "getHeaderSize", "getMaxAnchorOffset"];
|
|
67554
67581
|
tallestCellInRow = {};
|
|
67555
67582
|
ctx = document.createElement("canvas").getContext("2d");
|
|
67583
|
+
beforeHandle(cmd) {
|
|
67584
|
+
switch (cmd.type) {
|
|
67585
|
+
// Ensure rows are updated before "UPDATE_CELL" is dispatched from cell plugin.
|
|
67586
|
+
// "UPDATE_CELL" uses the Sheet core plugin to access row data.
|
|
67587
|
+
// If "ADD_COLUMNS_ROWS" has not been processed yet by header_sizes_ui,
|
|
67588
|
+
// size updates may apply to incorrect (pre-insert) rows.
|
|
67589
|
+
case "ADD_COLUMNS_ROWS":
|
|
67590
|
+
if (cmd.dimension === "COL") {
|
|
67591
|
+
return;
|
|
67592
|
+
}
|
|
67593
|
+
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
67594
|
+
const newCells = Array(cmd.quantity).fill(undefined);
|
|
67595
|
+
const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
|
|
67596
|
+
this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
|
|
67597
|
+
break;
|
|
67598
|
+
}
|
|
67599
|
+
}
|
|
67556
67600
|
handle(cmd) {
|
|
67557
67601
|
switch (cmd.type) {
|
|
67558
67602
|
case "START":
|
|
@@ -67582,16 +67626,6 @@ class HeaderSizeUIPlugin extends CoreViewPlugin {
|
|
|
67582
67626
|
this.history.update("tallestCellInRow", cmd.sheetId, tallestCells);
|
|
67583
67627
|
break;
|
|
67584
67628
|
}
|
|
67585
|
-
case "ADD_COLUMNS_ROWS": {
|
|
67586
|
-
if (cmd.dimension === "COL") {
|
|
67587
|
-
return;
|
|
67588
|
-
}
|
|
67589
|
-
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
67590
|
-
const newCells = Array(cmd.quantity).fill(undefined);
|
|
67591
|
-
const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
|
|
67592
|
-
this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
|
|
67593
|
-
break;
|
|
67594
|
-
}
|
|
67595
67629
|
case "RESIZE_COLUMNS_ROWS":
|
|
67596
67630
|
{
|
|
67597
67631
|
const sheetId = cmd.sheetId;
|
|
@@ -74133,6 +74167,14 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
74133
74167
|
const isBasedBefore = cmd.base < start;
|
|
74134
74168
|
const deltaCol = isBasedBefore && isCol ? thickness : 0;
|
|
74135
74169
|
const deltaRow = isBasedBefore && !isCol ? thickness : 0;
|
|
74170
|
+
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
74171
|
+
const originalSize = Object.fromEntries(toRemove.map((element) => {
|
|
74172
|
+
const size = isCol
|
|
74173
|
+
? this.getters.getColSize(cmd.sheetId, element)
|
|
74174
|
+
: this.getters.getUserRowSize(cmd.sheetId, element);
|
|
74175
|
+
const isDefaultCol = isCol && size === DEFAULT_CELL_WIDTH;
|
|
74176
|
+
return [element, isDefaultCol ? undefined : size];
|
|
74177
|
+
}));
|
|
74136
74178
|
const target = [
|
|
74137
74179
|
{
|
|
74138
74180
|
left: isCol ? start + deltaCol : 0,
|
|
@@ -74163,13 +74205,12 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
74163
74205
|
const col = selection.left;
|
|
74164
74206
|
const row = selection.top;
|
|
74165
74207
|
this.setSelectionMixin({ zone: selection, cell: { col, row } }, [selection]);
|
|
74166
|
-
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
74167
74208
|
let currentIndex = isBasedBefore ? cmd.base : cmd.base + 1;
|
|
74168
74209
|
const resizingGroups = {};
|
|
74169
74210
|
for (const element of toRemove) {
|
|
74170
|
-
const size =
|
|
74211
|
+
const size = originalSize[element];
|
|
74171
74212
|
const currentSize = this.getters.getHeaderSize(cmd.sheetId, cmd.dimension, currentIndex);
|
|
74172
|
-
if (size !== currentSize) {
|
|
74213
|
+
if (size && size !== currentSize) {
|
|
74173
74214
|
resizingGroups[size] ??= [];
|
|
74174
74215
|
resizingGroups[size].push(currentIndex);
|
|
74175
74216
|
currentIndex += 1;
|
|
@@ -75595,6 +75636,7 @@ const coreViewsPluginRegistry = new Registry()
|
|
|
75595
75636
|
|
|
75596
75637
|
autoCompleteProviders.add("dataValidation", {
|
|
75597
75638
|
displayAllOnInitialContent: true,
|
|
75639
|
+
canBeToggled: false,
|
|
75598
75640
|
getProposals(tokenAtCursor, content) {
|
|
75599
75641
|
if (isFormula(content)) {
|
|
75600
75642
|
return [];
|
|
@@ -77160,14 +77202,12 @@ class BottomBarSheet extends owl.Component {
|
|
|
77160
77202
|
this.editionState = "initializing";
|
|
77161
77203
|
}
|
|
77162
77204
|
stopEdition() {
|
|
77163
|
-
|
|
77164
|
-
if (!this.state.isEditing || !input)
|
|
77205
|
+
if (!this.state.isEditing || !this.sheetNameRef.el)
|
|
77165
77206
|
return;
|
|
77166
77207
|
this.state.isEditing = false;
|
|
77167
77208
|
this.editionState = "initializing";
|
|
77168
|
-
|
|
77209
|
+
this.sheetNameRef.el.blur();
|
|
77169
77210
|
const inputValue = this.getInputContent() || "";
|
|
77170
|
-
input.innerText = inputValue;
|
|
77171
77211
|
interactiveRenameSheet(this.env, this.props.sheetId, inputValue, () => this.startEdition());
|
|
77172
77212
|
}
|
|
77173
77213
|
cancelEdition() {
|
|
@@ -84606,6 +84646,6 @@ exports.tokenColors = tokenColors;
|
|
|
84606
84646
|
exports.tokenize = tokenize;
|
|
84607
84647
|
|
|
84608
84648
|
|
|
84609
|
-
__info__.version = "18.4.
|
|
84610
|
-
__info__.date = "2025-07-
|
|
84611
|
-
__info__.hash = "
|
|
84649
|
+
__info__.version = "18.4.3";
|
|
84650
|
+
__info__.date = "2025-07-28T13:39:06.036Z";
|
|
84651
|
+
__info__.hash = "4b596d7";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -5689,6 +5689,7 @@ declare class HeaderSizeUIPlugin extends CoreViewPlugin<HeaderSizeState> impleme
|
|
|
5689
5689
|
static getters: readonly ["getRowSize", "getHeaderSize", "getMaxAnchorOffset"];
|
|
5690
5690
|
readonly tallestCellInRow: Immutable<Record<UID, Array<CellWithSize | undefined>>>;
|
|
5691
5691
|
private ctx;
|
|
5692
|
+
beforeHandle(cmd: Command): void;
|
|
5692
5693
|
handle(cmd: Command): void;
|
|
5693
5694
|
getRowSize(sheetId: UID, row: HeaderIndex): Pixel;
|
|
5694
5695
|
getMaxAnchorOffset(sheetId: UID, height: Pixel, width: Pixel): AnchorOffset;
|
|
@@ -8551,6 +8552,7 @@ declare abstract class AbstractComposerStore extends SpreadsheetStore {
|
|
|
8551
8552
|
get autoCompleteProposals(): AutoCompleteProposal[];
|
|
8552
8553
|
get autoCompleteSelectedIndex(): number | undefined;
|
|
8553
8554
|
get isAutoCompleteDisplayed(): boolean;
|
|
8555
|
+
get canBeToggled(): boolean;
|
|
8554
8556
|
cycleReferences(): void;
|
|
8555
8557
|
toggleEditionMode(): void;
|
|
8556
8558
|
hoverToken(tokenIndex: number | undefined): void;
|
|
@@ -8857,6 +8859,7 @@ interface AutoCompleteProvider {
|
|
|
8857
8859
|
proposals: AutoCompleteProposal[];
|
|
8858
8860
|
selectProposal(text: string): void;
|
|
8859
8861
|
autoSelectFirstProposal: boolean;
|
|
8862
|
+
canBeToggled?: boolean;
|
|
8860
8863
|
}
|
|
8861
8864
|
interface ComposerStoreInterface {
|
|
8862
8865
|
currentEditedCell?: CellPosition;
|
|
@@ -8876,6 +8879,7 @@ interface ComposerStoreInterface {
|
|
|
8876
8879
|
interface AutoCompleteProviderDefinition {
|
|
8877
8880
|
sequence?: number;
|
|
8878
8881
|
autoSelectFirstProposal?: boolean;
|
|
8882
|
+
canBeToggled?: boolean;
|
|
8879
8883
|
displayAllOnInitialContent?: boolean;
|
|
8880
8884
|
maxDisplayedProposals?: number;
|
|
8881
8885
|
getProposals(this: {
|
|
@@ -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.4.
|
|
6
|
-
* @date 2025-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.4.3
|
|
6
|
+
* @date 2025-07-28T13:39:06.036Z
|
|
7
|
+
* @hash 4b596d7
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, App, blockDom, useState, onPatched, useExternalListener, onWillUpdateProps, onWillStart, onWillPatch, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
|
|
@@ -19033,13 +19033,19 @@ const COLUMN = {
|
|
|
19033
19033
|
if (isEvaluationError(cellReference?.value)) {
|
|
19034
19034
|
return cellReference;
|
|
19035
19035
|
}
|
|
19036
|
-
|
|
19037
|
-
|
|
19038
|
-
|
|
19039
|
-
|
|
19040
|
-
return
|
|
19036
|
+
if (cellReference === undefined) {
|
|
19037
|
+
if (this.__originCellPosition?.col === undefined) {
|
|
19038
|
+
return new EvaluationError(_t("In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter."));
|
|
19039
|
+
}
|
|
19040
|
+
return this.__originCellPosition.col + 1;
|
|
19041
|
+
}
|
|
19042
|
+
const zone = this.getters.getRangeFromSheetXC(this.getters.getActiveSheetId(), cellReference.value).zone;
|
|
19043
|
+
if (zone.left === zone.right) {
|
|
19044
|
+
return zone.left + 1;
|
|
19041
19045
|
}
|
|
19042
|
-
return
|
|
19046
|
+
return generateMatrix(zone.right - zone.left + 1, 1, (col, row) => ({
|
|
19047
|
+
value: zone.left + col + 1,
|
|
19048
|
+
}));
|
|
19043
19049
|
},
|
|
19044
19050
|
isExported: true,
|
|
19045
19051
|
};
|
|
@@ -19270,13 +19276,19 @@ const ROW = {
|
|
|
19270
19276
|
if (isEvaluationError(cellReference?.value)) {
|
|
19271
19277
|
return cellReference;
|
|
19272
19278
|
}
|
|
19273
|
-
|
|
19274
|
-
|
|
19275
|
-
|
|
19276
|
-
|
|
19277
|
-
return
|
|
19279
|
+
if (cellReference === undefined) {
|
|
19280
|
+
if (this.__originCellPosition?.row === undefined) {
|
|
19281
|
+
return new EvaluationError(_t("In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter."));
|
|
19282
|
+
}
|
|
19283
|
+
return this.__originCellPosition.row + 1;
|
|
19284
|
+
}
|
|
19285
|
+
const zone = this.getters.getRangeFromSheetXC(this.getters.getActiveSheetId(), cellReference.value).zone;
|
|
19286
|
+
if (zone.top === zone.bottom) {
|
|
19287
|
+
return zone.top + 1;
|
|
19278
19288
|
}
|
|
19279
|
-
return
|
|
19289
|
+
return generateMatrix(1, zone.bottom - zone.top + 1, (col, row) => ({
|
|
19290
|
+
value: zone.top + row + 1,
|
|
19291
|
+
}));
|
|
19280
19292
|
},
|
|
19281
19293
|
isExported: true,
|
|
19282
19294
|
};
|
|
@@ -32606,6 +32618,9 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
32606
32618
|
get isAutoCompleteDisplayed() {
|
|
32607
32619
|
return !!this.autoComplete.provider;
|
|
32608
32620
|
}
|
|
32621
|
+
get canBeToggled() {
|
|
32622
|
+
return this.autoComplete.provider?.canBeToggled ?? true;
|
|
32623
|
+
}
|
|
32609
32624
|
cycleReferences() {
|
|
32610
32625
|
const locale = this.getters.getLocale();
|
|
32611
32626
|
const updated = cycleFixedReference(this.composerSelection, this._currentContent, locale);
|
|
@@ -33135,6 +33150,7 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
33135
33150
|
proposals,
|
|
33136
33151
|
selectProposal: provider.selectProposal,
|
|
33137
33152
|
autoSelectFirstProposal: provider.autoSelectFirstProposal ?? false,
|
|
33153
|
+
canBeToggled: provider.canBeToggled,
|
|
33138
33154
|
};
|
|
33139
33155
|
}
|
|
33140
33156
|
if (exactMatch && this._currentContent !== this.initialContent) {
|
|
@@ -33157,6 +33173,7 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
33157
33173
|
proposals,
|
|
33158
33174
|
selectProposal: provider.selectProposal,
|
|
33159
33175
|
autoSelectFirstProposal: provider.autoSelectFirstProposal ?? false,
|
|
33176
|
+
canBeToggled: provider.canBeToggled,
|
|
33160
33177
|
};
|
|
33161
33178
|
}
|
|
33162
33179
|
}
|
|
@@ -33727,9 +33744,13 @@ class Composer extends Component {
|
|
|
33727
33744
|
}
|
|
33728
33745
|
}
|
|
33729
33746
|
closeAssistant() {
|
|
33747
|
+
if (!this.props.composerStore.canBeToggled)
|
|
33748
|
+
return;
|
|
33730
33749
|
this.assistant.forcedClosed = true;
|
|
33731
33750
|
}
|
|
33732
33751
|
openAssistant() {
|
|
33752
|
+
if (!this.props.composerStore.canBeToggled)
|
|
33753
|
+
return;
|
|
33733
33754
|
this.assistant.forcedClosed = false;
|
|
33734
33755
|
}
|
|
33735
33756
|
onWheel(event) {
|
|
@@ -33919,7 +33940,7 @@ class Composer extends Component {
|
|
|
33919
33940
|
return [...new Set(argsToFocus)];
|
|
33920
33941
|
}
|
|
33921
33942
|
autoComplete(value) {
|
|
33922
|
-
if (!value || this.assistant.forcedClosed) {
|
|
33943
|
+
if (!value || (this.assistant.forcedClosed && this.props.composerStore.canBeToggled)) {
|
|
33923
33944
|
return;
|
|
33924
33945
|
}
|
|
33925
33946
|
this.props.composerStore.insertAutoCompleteValue(value);
|
|
@@ -55680,9 +55701,15 @@ class SpreadsheetPivot {
|
|
|
55680
55701
|
return domain.reduce((current, acc) => this.filterDataEntriesFromDomainNode(current, acc), dataEntries);
|
|
55681
55702
|
}
|
|
55682
55703
|
filterDataEntriesFromDomainNode(dataEntries, domain) {
|
|
55683
|
-
const { field, value } = domain;
|
|
55704
|
+
const { field, value, type } = domain;
|
|
55684
55705
|
const { nameWithGranularity } = this.getDimension(field);
|
|
55685
|
-
return dataEntries.filter((entry) =>
|
|
55706
|
+
return dataEntries.filter((entry) => {
|
|
55707
|
+
const cellValue = entry[nameWithGranularity]?.value;
|
|
55708
|
+
if (type === "char") {
|
|
55709
|
+
return String(cellValue) === String(value);
|
|
55710
|
+
}
|
|
55711
|
+
return cellValue === value;
|
|
55712
|
+
});
|
|
55686
55713
|
}
|
|
55687
55714
|
getDimension(nameWithGranularity) {
|
|
55688
55715
|
return this.definition.getDimension(nameWithGranularity);
|
|
@@ -67551,6 +67578,23 @@ class HeaderSizeUIPlugin extends CoreViewPlugin {
|
|
|
67551
67578
|
static getters = ["getRowSize", "getHeaderSize", "getMaxAnchorOffset"];
|
|
67552
67579
|
tallestCellInRow = {};
|
|
67553
67580
|
ctx = document.createElement("canvas").getContext("2d");
|
|
67581
|
+
beforeHandle(cmd) {
|
|
67582
|
+
switch (cmd.type) {
|
|
67583
|
+
// Ensure rows are updated before "UPDATE_CELL" is dispatched from cell plugin.
|
|
67584
|
+
// "UPDATE_CELL" uses the Sheet core plugin to access row data.
|
|
67585
|
+
// If "ADD_COLUMNS_ROWS" has not been processed yet by header_sizes_ui,
|
|
67586
|
+
// size updates may apply to incorrect (pre-insert) rows.
|
|
67587
|
+
case "ADD_COLUMNS_ROWS":
|
|
67588
|
+
if (cmd.dimension === "COL") {
|
|
67589
|
+
return;
|
|
67590
|
+
}
|
|
67591
|
+
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
67592
|
+
const newCells = Array(cmd.quantity).fill(undefined);
|
|
67593
|
+
const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
|
|
67594
|
+
this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
|
|
67595
|
+
break;
|
|
67596
|
+
}
|
|
67597
|
+
}
|
|
67554
67598
|
handle(cmd) {
|
|
67555
67599
|
switch (cmd.type) {
|
|
67556
67600
|
case "START":
|
|
@@ -67580,16 +67624,6 @@ class HeaderSizeUIPlugin extends CoreViewPlugin {
|
|
|
67580
67624
|
this.history.update("tallestCellInRow", cmd.sheetId, tallestCells);
|
|
67581
67625
|
break;
|
|
67582
67626
|
}
|
|
67583
|
-
case "ADD_COLUMNS_ROWS": {
|
|
67584
|
-
if (cmd.dimension === "COL") {
|
|
67585
|
-
return;
|
|
67586
|
-
}
|
|
67587
|
-
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
67588
|
-
const newCells = Array(cmd.quantity).fill(undefined);
|
|
67589
|
-
const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
|
|
67590
|
-
this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
|
|
67591
|
-
break;
|
|
67592
|
-
}
|
|
67593
67627
|
case "RESIZE_COLUMNS_ROWS":
|
|
67594
67628
|
{
|
|
67595
67629
|
const sheetId = cmd.sheetId;
|
|
@@ -74131,6 +74165,14 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
74131
74165
|
const isBasedBefore = cmd.base < start;
|
|
74132
74166
|
const deltaCol = isBasedBefore && isCol ? thickness : 0;
|
|
74133
74167
|
const deltaRow = isBasedBefore && !isCol ? thickness : 0;
|
|
74168
|
+
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
74169
|
+
const originalSize = Object.fromEntries(toRemove.map((element) => {
|
|
74170
|
+
const size = isCol
|
|
74171
|
+
? this.getters.getColSize(cmd.sheetId, element)
|
|
74172
|
+
: this.getters.getUserRowSize(cmd.sheetId, element);
|
|
74173
|
+
const isDefaultCol = isCol && size === DEFAULT_CELL_WIDTH;
|
|
74174
|
+
return [element, isDefaultCol ? undefined : size];
|
|
74175
|
+
}));
|
|
74134
74176
|
const target = [
|
|
74135
74177
|
{
|
|
74136
74178
|
left: isCol ? start + deltaCol : 0,
|
|
@@ -74161,13 +74203,12 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
74161
74203
|
const col = selection.left;
|
|
74162
74204
|
const row = selection.top;
|
|
74163
74205
|
this.setSelectionMixin({ zone: selection, cell: { col, row } }, [selection]);
|
|
74164
|
-
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
74165
74206
|
let currentIndex = isBasedBefore ? cmd.base : cmd.base + 1;
|
|
74166
74207
|
const resizingGroups = {};
|
|
74167
74208
|
for (const element of toRemove) {
|
|
74168
|
-
const size =
|
|
74209
|
+
const size = originalSize[element];
|
|
74169
74210
|
const currentSize = this.getters.getHeaderSize(cmd.sheetId, cmd.dimension, currentIndex);
|
|
74170
|
-
if (size !== currentSize) {
|
|
74211
|
+
if (size && size !== currentSize) {
|
|
74171
74212
|
resizingGroups[size] ??= [];
|
|
74172
74213
|
resizingGroups[size].push(currentIndex);
|
|
74173
74214
|
currentIndex += 1;
|
|
@@ -75593,6 +75634,7 @@ const coreViewsPluginRegistry = new Registry()
|
|
|
75593
75634
|
|
|
75594
75635
|
autoCompleteProviders.add("dataValidation", {
|
|
75595
75636
|
displayAllOnInitialContent: true,
|
|
75637
|
+
canBeToggled: false,
|
|
75596
75638
|
getProposals(tokenAtCursor, content) {
|
|
75597
75639
|
if (isFormula(content)) {
|
|
75598
75640
|
return [];
|
|
@@ -77158,14 +77200,12 @@ class BottomBarSheet extends Component {
|
|
|
77158
77200
|
this.editionState = "initializing";
|
|
77159
77201
|
}
|
|
77160
77202
|
stopEdition() {
|
|
77161
|
-
|
|
77162
|
-
if (!this.state.isEditing || !input)
|
|
77203
|
+
if (!this.state.isEditing || !this.sheetNameRef.el)
|
|
77163
77204
|
return;
|
|
77164
77205
|
this.state.isEditing = false;
|
|
77165
77206
|
this.editionState = "initializing";
|
|
77166
|
-
|
|
77207
|
+
this.sheetNameRef.el.blur();
|
|
77167
77208
|
const inputValue = this.getInputContent() || "";
|
|
77168
|
-
input.innerText = inputValue;
|
|
77169
77209
|
interactiveRenameSheet(this.env, this.props.sheetId, inputValue, () => this.startEdition());
|
|
77170
77210
|
}
|
|
77171
77211
|
cancelEdition() {
|
|
@@ -84556,6 +84596,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
|
|
|
84556
84596
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, LocalTransportService, 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, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
84557
84597
|
|
|
84558
84598
|
|
|
84559
|
-
__info__.version = "18.4.
|
|
84560
|
-
__info__.date = "2025-07-
|
|
84561
|
-
__info__.hash = "
|
|
84599
|
+
__info__.version = "18.4.3";
|
|
84600
|
+
__info__.date = "2025-07-28T13:39:06.036Z";
|
|
84601
|
+
__info__.hash = "4b596d7";
|