@odoo/o-spreadsheet 18.3.12 → 18.3.13
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.3.
|
|
6
|
-
* @date 2025-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.3.13
|
|
6
|
+
* @date 2025-07-28T13:39:23.645Z
|
|
7
|
+
* @hash d30327c
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -18408,11 +18408,17 @@ const COLUMN = {
|
|
|
18408
18408
|
if (isEvaluationError(cellReference?.value)) {
|
|
18409
18409
|
return cellReference;
|
|
18410
18410
|
}
|
|
18411
|
-
|
|
18412
|
-
|
|
18413
|
-
|
|
18414
|
-
|
|
18415
|
-
|
|
18411
|
+
if (cellReference === undefined) {
|
|
18412
|
+
assert(() => this.__originCellPosition?.col !== undefined, "In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter.");
|
|
18413
|
+
return this.__originCellPosition.col + 1;
|
|
18414
|
+
}
|
|
18415
|
+
const zone = this.getters.getRangeFromSheetXC(this.getters.getActiveSheetId(), cellReference.value).zone;
|
|
18416
|
+
if (zone.left === zone.right) {
|
|
18417
|
+
return zone.left + 1;
|
|
18418
|
+
}
|
|
18419
|
+
return generateMatrix(zone.right - zone.left + 1, 1, (col, row) => ({
|
|
18420
|
+
value: zone.left + col + 1,
|
|
18421
|
+
}));
|
|
18416
18422
|
},
|
|
18417
18423
|
isExported: true,
|
|
18418
18424
|
};
|
|
@@ -18631,11 +18637,17 @@ const ROW = {
|
|
|
18631
18637
|
if (isEvaluationError(cellReference?.value)) {
|
|
18632
18638
|
return cellReference;
|
|
18633
18639
|
}
|
|
18634
|
-
|
|
18635
|
-
|
|
18636
|
-
|
|
18637
|
-
|
|
18638
|
-
|
|
18640
|
+
if (cellReference === undefined) {
|
|
18641
|
+
assert(() => this.__originCellPosition?.row !== undefined, "In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter.");
|
|
18642
|
+
return this.__originCellPosition.row + 1;
|
|
18643
|
+
}
|
|
18644
|
+
const zone = this.getters.getRangeFromSheetXC(this.getters.getActiveSheetId(), cellReference.value).zone;
|
|
18645
|
+
if (zone.top === zone.bottom) {
|
|
18646
|
+
return zone.top + 1;
|
|
18647
|
+
}
|
|
18648
|
+
return generateMatrix(1, zone.bottom - zone.top + 1, (col, row) => ({
|
|
18649
|
+
value: zone.top + row + 1,
|
|
18650
|
+
}));
|
|
18639
18651
|
},
|
|
18640
18652
|
isExported: true,
|
|
18641
18653
|
};
|
|
@@ -22615,6 +22627,7 @@ const autoCompleteProviders = new Registry();
|
|
|
22615
22627
|
|
|
22616
22628
|
autoCompleteProviders.add("dataValidation", {
|
|
22617
22629
|
displayAllOnInitialContent: true,
|
|
22630
|
+
canBeToggled: false,
|
|
22618
22631
|
getProposals(tokenAtCursor, content) {
|
|
22619
22632
|
if (isFormula(content)) {
|
|
22620
22633
|
return [];
|
|
@@ -23511,6 +23524,7 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
23511
23524
|
proposals,
|
|
23512
23525
|
selectProposal: provider.selectProposal,
|
|
23513
23526
|
autoSelectFirstProposal: provider.autoSelectFirstProposal ?? false,
|
|
23527
|
+
canBeToggled: provider.canBeToggled,
|
|
23514
23528
|
};
|
|
23515
23529
|
}
|
|
23516
23530
|
if (exactMatch && this._currentContent !== this.initialContent) {
|
|
@@ -23533,6 +23547,7 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
23533
23547
|
proposals,
|
|
23534
23548
|
selectProposal: provider.selectProposal,
|
|
23535
23549
|
autoSelectFirstProposal: provider.autoSelectFirstProposal ?? false,
|
|
23550
|
+
canBeToggled: provider.canBeToggled,
|
|
23536
23551
|
};
|
|
23537
23552
|
}
|
|
23538
23553
|
}
|
|
@@ -43777,9 +43792,13 @@ class Composer extends owl.Component {
|
|
|
43777
43792
|
}
|
|
43778
43793
|
}
|
|
43779
43794
|
closeAssistant() {
|
|
43795
|
+
if (!this.canBeToggled)
|
|
43796
|
+
return;
|
|
43780
43797
|
this.assistant.forcedClosed = true;
|
|
43781
43798
|
}
|
|
43782
43799
|
openAssistant() {
|
|
43800
|
+
if (!this.canBeToggled)
|
|
43801
|
+
return;
|
|
43783
43802
|
this.assistant.forcedClosed = false;
|
|
43784
43803
|
}
|
|
43785
43804
|
onWheel(event) {
|
|
@@ -43789,6 +43808,9 @@ class Composer extends owl.Component {
|
|
|
43789
43808
|
event.stopPropagation();
|
|
43790
43809
|
}
|
|
43791
43810
|
}
|
|
43811
|
+
get canBeToggled() {
|
|
43812
|
+
return this.autoCompleteState.provider?.canBeToggled ?? true;
|
|
43813
|
+
}
|
|
43792
43814
|
// ---------------------------------------------------------------------------
|
|
43793
43815
|
// Private
|
|
43794
43816
|
// ---------------------------------------------------------------------------
|
|
@@ -43976,7 +43998,7 @@ class Composer extends owl.Component {
|
|
|
43976
43998
|
return [...new Set(argsToFocus)];
|
|
43977
43999
|
}
|
|
43978
44000
|
autoComplete(value) {
|
|
43979
|
-
if (!value || this.assistant.forcedClosed) {
|
|
44001
|
+
if (!value || (this.assistant.forcedClosed && this.canBeToggled)) {
|
|
43980
44002
|
return;
|
|
43981
44003
|
}
|
|
43982
44004
|
this.autoCompleteState.provider?.selectProposal(value);
|
|
@@ -49955,9 +49977,15 @@ class SpreadsheetPivot {
|
|
|
49955
49977
|
return domain.reduce((current, acc) => this.filterDataEntriesFromDomainNode(current, acc), dataEntries);
|
|
49956
49978
|
}
|
|
49957
49979
|
filterDataEntriesFromDomainNode(dataEntries, domain) {
|
|
49958
|
-
const { field, value } = domain;
|
|
49980
|
+
const { field, value, type } = domain;
|
|
49959
49981
|
const { nameWithGranularity } = this.getDimension(field);
|
|
49960
|
-
return dataEntries.filter((entry) =>
|
|
49982
|
+
return dataEntries.filter((entry) => {
|
|
49983
|
+
const cellValue = entry[nameWithGranularity]?.value;
|
|
49984
|
+
if (type === "char") {
|
|
49985
|
+
return String(cellValue) === String(value);
|
|
49986
|
+
}
|
|
49987
|
+
return cellValue === value;
|
|
49988
|
+
});
|
|
49961
49989
|
}
|
|
49962
49990
|
getDimension(nameWithGranularity) {
|
|
49963
49991
|
return this.definition.getDimension(nameWithGranularity);
|
|
@@ -52623,6 +52651,11 @@ class GridComposer extends owl.Component {
|
|
|
52623
52651
|
rect = this.defaultRect;
|
|
52624
52652
|
isEditing = false;
|
|
52625
52653
|
isCellReferenceVisible = false;
|
|
52654
|
+
currentEditedCell = {
|
|
52655
|
+
col: 0,
|
|
52656
|
+
row: 0,
|
|
52657
|
+
sheetId: this.env.model.getters.getActiveSheetId(),
|
|
52658
|
+
};
|
|
52626
52659
|
composerStore;
|
|
52627
52660
|
composerFocusStore;
|
|
52628
52661
|
composerInterface;
|
|
@@ -52652,7 +52685,7 @@ class GridComposer extends owl.Component {
|
|
|
52652
52685
|
return this.isCellReferenceVisible;
|
|
52653
52686
|
}
|
|
52654
52687
|
get cellReference() {
|
|
52655
|
-
const { col, row, sheetId } = this.
|
|
52688
|
+
const { col, row, sheetId } = this.currentEditedCell;
|
|
52656
52689
|
const prefixSheet = sheetId !== this.env.model.getters.getActiveSheetId();
|
|
52657
52690
|
return getFullReference(prefixSheet ? this.env.model.getters.getSheetName(sheetId) : undefined, toXC(col, row));
|
|
52658
52691
|
}
|
|
@@ -52744,12 +52777,17 @@ class GridComposer extends owl.Component {
|
|
|
52744
52777
|
if (!isEditing && this.composerFocusStore.activeComposer !== this.composerInterface) {
|
|
52745
52778
|
this.composerFocusStore.focusComposer(this.composerInterface, { focusMode: "inactive" });
|
|
52746
52779
|
}
|
|
52780
|
+
let shouldRecomputeRect = isEditing && !deepEquals(this.currentEditedCell, this.composerStore.currentEditedCell);
|
|
52747
52781
|
if (this.isEditing !== isEditing) {
|
|
52748
52782
|
this.isEditing = isEditing;
|
|
52749
52783
|
if (!isEditing) {
|
|
52750
52784
|
this.rect = this.defaultRect;
|
|
52751
52785
|
return;
|
|
52752
52786
|
}
|
|
52787
|
+
this.currentEditedCell = this.composerStore.currentEditedCell;
|
|
52788
|
+
shouldRecomputeRect = true;
|
|
52789
|
+
}
|
|
52790
|
+
if (shouldRecomputeRect) {
|
|
52753
52791
|
const position = this.env.model.getters.getActivePosition();
|
|
52754
52792
|
const zone = this.env.model.getters.expandZone(position.sheetId, positionToZone(position));
|
|
52755
52793
|
this.rect = this.env.model.getters.getVisibleRect(zone);
|
|
@@ -65876,6 +65914,23 @@ class HeaderSizeUIPlugin extends CoreViewPlugin {
|
|
|
65876
65914
|
static getters = ["getRowSize", "getHeaderSize", "getMaxAnchorOffset"];
|
|
65877
65915
|
tallestCellInRow = {};
|
|
65878
65916
|
ctx = document.createElement("canvas").getContext("2d");
|
|
65917
|
+
beforeHandle(cmd) {
|
|
65918
|
+
switch (cmd.type) {
|
|
65919
|
+
// Ensure rows are updated before "UPDATE_CELL" is dispatched from cell plugin.
|
|
65920
|
+
// "UPDATE_CELL" uses the Sheet core plugin to access row data.
|
|
65921
|
+
// If "ADD_COLUMNS_ROWS" has not been processed yet by header_sizes_ui,
|
|
65922
|
+
// size updates may apply to incorrect (pre-insert) rows.
|
|
65923
|
+
case "ADD_COLUMNS_ROWS":
|
|
65924
|
+
if (cmd.dimension === "COL") {
|
|
65925
|
+
return;
|
|
65926
|
+
}
|
|
65927
|
+
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
65928
|
+
const newCells = Array(cmd.quantity).fill(undefined);
|
|
65929
|
+
const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
|
|
65930
|
+
this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
|
|
65931
|
+
break;
|
|
65932
|
+
}
|
|
65933
|
+
}
|
|
65879
65934
|
handle(cmd) {
|
|
65880
65935
|
switch (cmd.type) {
|
|
65881
65936
|
case "START":
|
|
@@ -65905,16 +65960,6 @@ class HeaderSizeUIPlugin extends CoreViewPlugin {
|
|
|
65905
65960
|
this.history.update("tallestCellInRow", cmd.sheetId, tallestCells);
|
|
65906
65961
|
break;
|
|
65907
65962
|
}
|
|
65908
|
-
case "ADD_COLUMNS_ROWS": {
|
|
65909
|
-
if (cmd.dimension === "COL") {
|
|
65910
|
-
return;
|
|
65911
|
-
}
|
|
65912
|
-
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
65913
|
-
const newCells = Array(cmd.quantity).fill(undefined);
|
|
65914
|
-
const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
|
|
65915
|
-
this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
|
|
65916
|
-
break;
|
|
65917
|
-
}
|
|
65918
65963
|
case "RESIZE_COLUMNS_ROWS":
|
|
65919
65964
|
{
|
|
65920
65965
|
const sheetId = cmd.sheetId;
|
|
@@ -71915,6 +71960,14 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
71915
71960
|
const isBasedBefore = cmd.base < start;
|
|
71916
71961
|
const deltaCol = isBasedBefore && isCol ? thickness : 0;
|
|
71917
71962
|
const deltaRow = isBasedBefore && !isCol ? thickness : 0;
|
|
71963
|
+
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
71964
|
+
const originalSize = Object.fromEntries(toRemove.map((element) => {
|
|
71965
|
+
const size = isCol
|
|
71966
|
+
? this.getters.getColSize(cmd.sheetId, element)
|
|
71967
|
+
: this.getters.getUserRowSize(cmd.sheetId, element);
|
|
71968
|
+
const isDefaultCol = isCol && size === DEFAULT_CELL_WIDTH;
|
|
71969
|
+
return [element, isDefaultCol ? undefined : size];
|
|
71970
|
+
}));
|
|
71918
71971
|
const target = [
|
|
71919
71972
|
{
|
|
71920
71973
|
left: isCol ? start + deltaCol : 0,
|
|
@@ -71945,13 +71998,12 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
71945
71998
|
const col = selection.left;
|
|
71946
71999
|
const row = selection.top;
|
|
71947
72000
|
this.setSelectionMixin({ zone: selection, cell: { col, row } }, [selection]);
|
|
71948
|
-
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
71949
72001
|
let currentIndex = isBasedBefore ? cmd.base : cmd.base + 1;
|
|
71950
72002
|
const resizingGroups = {};
|
|
71951
72003
|
for (const element of toRemove) {
|
|
71952
|
-
const size =
|
|
72004
|
+
const size = originalSize[element];
|
|
71953
72005
|
const currentSize = this.getters.getHeaderSize(cmd.sheetId, cmd.dimension, currentIndex);
|
|
71954
|
-
if (size != currentSize) {
|
|
72006
|
+
if (size && size != currentSize) {
|
|
71955
72007
|
resizingGroups[size] ??= [];
|
|
71956
72008
|
resizingGroups[size].push(currentIndex);
|
|
71957
72009
|
currentIndex += 1;
|
|
@@ -73745,14 +73797,12 @@ class BottomBarSheet extends owl.Component {
|
|
|
73745
73797
|
this.editionState = "initializing";
|
|
73746
73798
|
}
|
|
73747
73799
|
stopEdition() {
|
|
73748
|
-
|
|
73749
|
-
if (!this.state.isEditing || !input)
|
|
73800
|
+
if (!this.state.isEditing || !this.sheetNameRef.el)
|
|
73750
73801
|
return;
|
|
73751
73802
|
this.state.isEditing = false;
|
|
73752
73803
|
this.editionState = "initializing";
|
|
73753
|
-
|
|
73804
|
+
this.sheetNameRef.el.blur();
|
|
73754
73805
|
const inputValue = this.getInputContent() || "";
|
|
73755
|
-
input.innerText = inputValue;
|
|
73756
73806
|
interactiveRenameSheet(this.env, this.props.sheetId, inputValue, () => this.startEdition());
|
|
73757
73807
|
}
|
|
73758
73808
|
cancelEdition() {
|
|
@@ -80850,6 +80900,6 @@ exports.tokenColors = tokenColors;
|
|
|
80850
80900
|
exports.tokenize = tokenize;
|
|
80851
80901
|
|
|
80852
80902
|
|
|
80853
|
-
__info__.version = "18.3.
|
|
80854
|
-
__info__.date = "2025-07-
|
|
80855
|
-
__info__.hash = "
|
|
80903
|
+
__info__.version = "18.3.13";
|
|
80904
|
+
__info__.date = "2025-07-28T13:39:23.645Z";
|
|
80905
|
+
__info__.hash = "d30327c";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -5546,6 +5546,7 @@ declare class HeaderSizeUIPlugin extends CoreViewPlugin<HeaderSizeState> impleme
|
|
|
5546
5546
|
static getters: readonly ["getRowSize", "getHeaderSize", "getMaxAnchorOffset"];
|
|
5547
5547
|
readonly tallestCellInRow: Immutable<Record<UID, Array<CellWithSize | undefined>>>;
|
|
5548
5548
|
private ctx;
|
|
5549
|
+
beforeHandle(cmd: Command): void;
|
|
5549
5550
|
handle(cmd: Command): void;
|
|
5550
5551
|
getRowSize(sheetId: UID, row: HeaderIndex): Pixel;
|
|
5551
5552
|
getMaxAnchorOffset(sheetId: UID, height: Pixel, width: Pixel): AnchorOffset;
|
|
@@ -8540,6 +8541,7 @@ declare class Composer extends Component<CellComposerProps, SpreadsheetChildEnv>
|
|
|
8540
8541
|
closeAssistant(): void;
|
|
8541
8542
|
openAssistant(): void;
|
|
8542
8543
|
onWheel(event: WheelEvent): void;
|
|
8544
|
+
get canBeToggled(): boolean;
|
|
8543
8545
|
private processContent;
|
|
8544
8546
|
/**
|
|
8545
8547
|
* Get the HTML content corresponding to the current composer token, divided by lines.
|
|
@@ -8592,6 +8594,7 @@ interface AutoCompleteProvider {
|
|
|
8592
8594
|
proposals: AutoCompleteProposal[];
|
|
8593
8595
|
selectProposal(text: string): void;
|
|
8594
8596
|
autoSelectFirstProposal: boolean;
|
|
8597
|
+
canBeToggled?: boolean;
|
|
8595
8598
|
}
|
|
8596
8599
|
interface ComposerStoreInterface {
|
|
8597
8600
|
currentEditedCell?: CellPosition;
|
|
@@ -8611,6 +8614,7 @@ interface ComposerStoreInterface {
|
|
|
8611
8614
|
interface AutoCompleteProviderDefinition {
|
|
8612
8615
|
sequence?: number;
|
|
8613
8616
|
autoSelectFirstProposal?: boolean;
|
|
8617
|
+
canBeToggled?: boolean;
|
|
8614
8618
|
displayAllOnInitialContent?: boolean;
|
|
8615
8619
|
maxDisplayedProposals?: number;
|
|
8616
8620
|
getProposals(this: {
|
|
@@ -9232,6 +9236,7 @@ declare class GridComposer extends Component<Props$I, SpreadsheetChildEnv> {
|
|
|
9232
9236
|
private rect;
|
|
9233
9237
|
private isEditing;
|
|
9234
9238
|
private isCellReferenceVisible;
|
|
9239
|
+
private currentEditedCell;
|
|
9235
9240
|
private composerStore;
|
|
9236
9241
|
composerFocusStore: Store<ComposerFocusStore>;
|
|
9237
9242
|
private composerInterface;
|
|
@@ -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.3.
|
|
6
|
-
* @date 2025-07-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.3.13
|
|
6
|
+
* @date 2025-07-28T13:39:23.645Z
|
|
7
|
+
* @hash d30327c
|
|
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';
|
|
@@ -18406,11 +18406,17 @@ const COLUMN = {
|
|
|
18406
18406
|
if (isEvaluationError(cellReference?.value)) {
|
|
18407
18407
|
return cellReference;
|
|
18408
18408
|
}
|
|
18409
|
-
|
|
18410
|
-
|
|
18411
|
-
|
|
18412
|
-
|
|
18413
|
-
|
|
18409
|
+
if (cellReference === undefined) {
|
|
18410
|
+
assert(() => this.__originCellPosition?.col !== undefined, "In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter.");
|
|
18411
|
+
return this.__originCellPosition.col + 1;
|
|
18412
|
+
}
|
|
18413
|
+
const zone = this.getters.getRangeFromSheetXC(this.getters.getActiveSheetId(), cellReference.value).zone;
|
|
18414
|
+
if (zone.left === zone.right) {
|
|
18415
|
+
return zone.left + 1;
|
|
18416
|
+
}
|
|
18417
|
+
return generateMatrix(zone.right - zone.left + 1, 1, (col, row) => ({
|
|
18418
|
+
value: zone.left + col + 1,
|
|
18419
|
+
}));
|
|
18414
18420
|
},
|
|
18415
18421
|
isExported: true,
|
|
18416
18422
|
};
|
|
@@ -18629,11 +18635,17 @@ const ROW = {
|
|
|
18629
18635
|
if (isEvaluationError(cellReference?.value)) {
|
|
18630
18636
|
return cellReference;
|
|
18631
18637
|
}
|
|
18632
|
-
|
|
18633
|
-
|
|
18634
|
-
|
|
18635
|
-
|
|
18636
|
-
|
|
18638
|
+
if (cellReference === undefined) {
|
|
18639
|
+
assert(() => this.__originCellPosition?.row !== undefined, "In this context, the function [[FUNCTION_NAME]] needs to have a cell or range in parameter.");
|
|
18640
|
+
return this.__originCellPosition.row + 1;
|
|
18641
|
+
}
|
|
18642
|
+
const zone = this.getters.getRangeFromSheetXC(this.getters.getActiveSheetId(), cellReference.value).zone;
|
|
18643
|
+
if (zone.top === zone.bottom) {
|
|
18644
|
+
return zone.top + 1;
|
|
18645
|
+
}
|
|
18646
|
+
return generateMatrix(1, zone.bottom - zone.top + 1, (col, row) => ({
|
|
18647
|
+
value: zone.top + row + 1,
|
|
18648
|
+
}));
|
|
18637
18649
|
},
|
|
18638
18650
|
isExported: true,
|
|
18639
18651
|
};
|
|
@@ -22613,6 +22625,7 @@ const autoCompleteProviders = new Registry();
|
|
|
22613
22625
|
|
|
22614
22626
|
autoCompleteProviders.add("dataValidation", {
|
|
22615
22627
|
displayAllOnInitialContent: true,
|
|
22628
|
+
canBeToggled: false,
|
|
22616
22629
|
getProposals(tokenAtCursor, content) {
|
|
22617
22630
|
if (isFormula(content)) {
|
|
22618
22631
|
return [];
|
|
@@ -23509,6 +23522,7 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
23509
23522
|
proposals,
|
|
23510
23523
|
selectProposal: provider.selectProposal,
|
|
23511
23524
|
autoSelectFirstProposal: provider.autoSelectFirstProposal ?? false,
|
|
23525
|
+
canBeToggled: provider.canBeToggled,
|
|
23512
23526
|
};
|
|
23513
23527
|
}
|
|
23514
23528
|
if (exactMatch && this._currentContent !== this.initialContent) {
|
|
@@ -23531,6 +23545,7 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
23531
23545
|
proposals,
|
|
23532
23546
|
selectProposal: provider.selectProposal,
|
|
23533
23547
|
autoSelectFirstProposal: provider.autoSelectFirstProposal ?? false,
|
|
23548
|
+
canBeToggled: provider.canBeToggled,
|
|
23534
23549
|
};
|
|
23535
23550
|
}
|
|
23536
23551
|
}
|
|
@@ -43775,9 +43790,13 @@ class Composer extends Component {
|
|
|
43775
43790
|
}
|
|
43776
43791
|
}
|
|
43777
43792
|
closeAssistant() {
|
|
43793
|
+
if (!this.canBeToggled)
|
|
43794
|
+
return;
|
|
43778
43795
|
this.assistant.forcedClosed = true;
|
|
43779
43796
|
}
|
|
43780
43797
|
openAssistant() {
|
|
43798
|
+
if (!this.canBeToggled)
|
|
43799
|
+
return;
|
|
43781
43800
|
this.assistant.forcedClosed = false;
|
|
43782
43801
|
}
|
|
43783
43802
|
onWheel(event) {
|
|
@@ -43787,6 +43806,9 @@ class Composer extends Component {
|
|
|
43787
43806
|
event.stopPropagation();
|
|
43788
43807
|
}
|
|
43789
43808
|
}
|
|
43809
|
+
get canBeToggled() {
|
|
43810
|
+
return this.autoCompleteState.provider?.canBeToggled ?? true;
|
|
43811
|
+
}
|
|
43790
43812
|
// ---------------------------------------------------------------------------
|
|
43791
43813
|
// Private
|
|
43792
43814
|
// ---------------------------------------------------------------------------
|
|
@@ -43974,7 +43996,7 @@ class Composer extends Component {
|
|
|
43974
43996
|
return [...new Set(argsToFocus)];
|
|
43975
43997
|
}
|
|
43976
43998
|
autoComplete(value) {
|
|
43977
|
-
if (!value || this.assistant.forcedClosed) {
|
|
43999
|
+
if (!value || (this.assistant.forcedClosed && this.canBeToggled)) {
|
|
43978
44000
|
return;
|
|
43979
44001
|
}
|
|
43980
44002
|
this.autoCompleteState.provider?.selectProposal(value);
|
|
@@ -49953,9 +49975,15 @@ class SpreadsheetPivot {
|
|
|
49953
49975
|
return domain.reduce((current, acc) => this.filterDataEntriesFromDomainNode(current, acc), dataEntries);
|
|
49954
49976
|
}
|
|
49955
49977
|
filterDataEntriesFromDomainNode(dataEntries, domain) {
|
|
49956
|
-
const { field, value } = domain;
|
|
49978
|
+
const { field, value, type } = domain;
|
|
49957
49979
|
const { nameWithGranularity } = this.getDimension(field);
|
|
49958
|
-
return dataEntries.filter((entry) =>
|
|
49980
|
+
return dataEntries.filter((entry) => {
|
|
49981
|
+
const cellValue = entry[nameWithGranularity]?.value;
|
|
49982
|
+
if (type === "char") {
|
|
49983
|
+
return String(cellValue) === String(value);
|
|
49984
|
+
}
|
|
49985
|
+
return cellValue === value;
|
|
49986
|
+
});
|
|
49959
49987
|
}
|
|
49960
49988
|
getDimension(nameWithGranularity) {
|
|
49961
49989
|
return this.definition.getDimension(nameWithGranularity);
|
|
@@ -52621,6 +52649,11 @@ class GridComposer extends Component {
|
|
|
52621
52649
|
rect = this.defaultRect;
|
|
52622
52650
|
isEditing = false;
|
|
52623
52651
|
isCellReferenceVisible = false;
|
|
52652
|
+
currentEditedCell = {
|
|
52653
|
+
col: 0,
|
|
52654
|
+
row: 0,
|
|
52655
|
+
sheetId: this.env.model.getters.getActiveSheetId(),
|
|
52656
|
+
};
|
|
52624
52657
|
composerStore;
|
|
52625
52658
|
composerFocusStore;
|
|
52626
52659
|
composerInterface;
|
|
@@ -52650,7 +52683,7 @@ class GridComposer extends Component {
|
|
|
52650
52683
|
return this.isCellReferenceVisible;
|
|
52651
52684
|
}
|
|
52652
52685
|
get cellReference() {
|
|
52653
|
-
const { col, row, sheetId } = this.
|
|
52686
|
+
const { col, row, sheetId } = this.currentEditedCell;
|
|
52654
52687
|
const prefixSheet = sheetId !== this.env.model.getters.getActiveSheetId();
|
|
52655
52688
|
return getFullReference(prefixSheet ? this.env.model.getters.getSheetName(sheetId) : undefined, toXC(col, row));
|
|
52656
52689
|
}
|
|
@@ -52742,12 +52775,17 @@ class GridComposer extends Component {
|
|
|
52742
52775
|
if (!isEditing && this.composerFocusStore.activeComposer !== this.composerInterface) {
|
|
52743
52776
|
this.composerFocusStore.focusComposer(this.composerInterface, { focusMode: "inactive" });
|
|
52744
52777
|
}
|
|
52778
|
+
let shouldRecomputeRect = isEditing && !deepEquals(this.currentEditedCell, this.composerStore.currentEditedCell);
|
|
52745
52779
|
if (this.isEditing !== isEditing) {
|
|
52746
52780
|
this.isEditing = isEditing;
|
|
52747
52781
|
if (!isEditing) {
|
|
52748
52782
|
this.rect = this.defaultRect;
|
|
52749
52783
|
return;
|
|
52750
52784
|
}
|
|
52785
|
+
this.currentEditedCell = this.composerStore.currentEditedCell;
|
|
52786
|
+
shouldRecomputeRect = true;
|
|
52787
|
+
}
|
|
52788
|
+
if (shouldRecomputeRect) {
|
|
52751
52789
|
const position = this.env.model.getters.getActivePosition();
|
|
52752
52790
|
const zone = this.env.model.getters.expandZone(position.sheetId, positionToZone(position));
|
|
52753
52791
|
this.rect = this.env.model.getters.getVisibleRect(zone);
|
|
@@ -65874,6 +65912,23 @@ class HeaderSizeUIPlugin extends CoreViewPlugin {
|
|
|
65874
65912
|
static getters = ["getRowSize", "getHeaderSize", "getMaxAnchorOffset"];
|
|
65875
65913
|
tallestCellInRow = {};
|
|
65876
65914
|
ctx = document.createElement("canvas").getContext("2d");
|
|
65915
|
+
beforeHandle(cmd) {
|
|
65916
|
+
switch (cmd.type) {
|
|
65917
|
+
// Ensure rows are updated before "UPDATE_CELL" is dispatched from cell plugin.
|
|
65918
|
+
// "UPDATE_CELL" uses the Sheet core plugin to access row data.
|
|
65919
|
+
// If "ADD_COLUMNS_ROWS" has not been processed yet by header_sizes_ui,
|
|
65920
|
+
// size updates may apply to incorrect (pre-insert) rows.
|
|
65921
|
+
case "ADD_COLUMNS_ROWS":
|
|
65922
|
+
if (cmd.dimension === "COL") {
|
|
65923
|
+
return;
|
|
65924
|
+
}
|
|
65925
|
+
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
65926
|
+
const newCells = Array(cmd.quantity).fill(undefined);
|
|
65927
|
+
const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
|
|
65928
|
+
this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
|
|
65929
|
+
break;
|
|
65930
|
+
}
|
|
65931
|
+
}
|
|
65877
65932
|
handle(cmd) {
|
|
65878
65933
|
switch (cmd.type) {
|
|
65879
65934
|
case "START":
|
|
@@ -65903,16 +65958,6 @@ class HeaderSizeUIPlugin extends CoreViewPlugin {
|
|
|
65903
65958
|
this.history.update("tallestCellInRow", cmd.sheetId, tallestCells);
|
|
65904
65959
|
break;
|
|
65905
65960
|
}
|
|
65906
|
-
case "ADD_COLUMNS_ROWS": {
|
|
65907
|
-
if (cmd.dimension === "COL") {
|
|
65908
|
-
return;
|
|
65909
|
-
}
|
|
65910
|
-
const addIndex = getAddHeaderStartIndex(cmd.position, cmd.base);
|
|
65911
|
-
const newCells = Array(cmd.quantity).fill(undefined);
|
|
65912
|
-
const newTallestCells = insertItemsAtIndex(this.tallestCellInRow[cmd.sheetId], newCells, addIndex);
|
|
65913
|
-
this.history.update("tallestCellInRow", cmd.sheetId, newTallestCells);
|
|
65914
|
-
break;
|
|
65915
|
-
}
|
|
65916
65961
|
case "RESIZE_COLUMNS_ROWS":
|
|
65917
65962
|
{
|
|
65918
65963
|
const sheetId = cmd.sheetId;
|
|
@@ -71913,6 +71958,14 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
71913
71958
|
const isBasedBefore = cmd.base < start;
|
|
71914
71959
|
const deltaCol = isBasedBefore && isCol ? thickness : 0;
|
|
71915
71960
|
const deltaRow = isBasedBefore && !isCol ? thickness : 0;
|
|
71961
|
+
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
71962
|
+
const originalSize = Object.fromEntries(toRemove.map((element) => {
|
|
71963
|
+
const size = isCol
|
|
71964
|
+
? this.getters.getColSize(cmd.sheetId, element)
|
|
71965
|
+
: this.getters.getUserRowSize(cmd.sheetId, element);
|
|
71966
|
+
const isDefaultCol = isCol && size === DEFAULT_CELL_WIDTH;
|
|
71967
|
+
return [element, isDefaultCol ? undefined : size];
|
|
71968
|
+
}));
|
|
71916
71969
|
const target = [
|
|
71917
71970
|
{
|
|
71918
71971
|
left: isCol ? start + deltaCol : 0,
|
|
@@ -71943,13 +71996,12 @@ class GridSelectionPlugin extends UIPlugin {
|
|
|
71943
71996
|
const col = selection.left;
|
|
71944
71997
|
const row = selection.top;
|
|
71945
71998
|
this.setSelectionMixin({ zone: selection, cell: { col, row } }, [selection]);
|
|
71946
|
-
const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
|
|
71947
71999
|
let currentIndex = isBasedBefore ? cmd.base : cmd.base + 1;
|
|
71948
72000
|
const resizingGroups = {};
|
|
71949
72001
|
for (const element of toRemove) {
|
|
71950
|
-
const size =
|
|
72002
|
+
const size = originalSize[element];
|
|
71951
72003
|
const currentSize = this.getters.getHeaderSize(cmd.sheetId, cmd.dimension, currentIndex);
|
|
71952
|
-
if (size != currentSize) {
|
|
72004
|
+
if (size && size != currentSize) {
|
|
71953
72005
|
resizingGroups[size] ??= [];
|
|
71954
72006
|
resizingGroups[size].push(currentIndex);
|
|
71955
72007
|
currentIndex += 1;
|
|
@@ -73743,14 +73795,12 @@ class BottomBarSheet extends Component {
|
|
|
73743
73795
|
this.editionState = "initializing";
|
|
73744
73796
|
}
|
|
73745
73797
|
stopEdition() {
|
|
73746
|
-
|
|
73747
|
-
if (!this.state.isEditing || !input)
|
|
73798
|
+
if (!this.state.isEditing || !this.sheetNameRef.el)
|
|
73748
73799
|
return;
|
|
73749
73800
|
this.state.isEditing = false;
|
|
73750
73801
|
this.editionState = "initializing";
|
|
73751
|
-
|
|
73802
|
+
this.sheetNameRef.el.blur();
|
|
73752
73803
|
const inputValue = this.getInputContent() || "";
|
|
73753
|
-
input.innerText = inputValue;
|
|
73754
73804
|
interactiveRenameSheet(this.env, this.props.sheetId, inputValue, () => this.startEdition());
|
|
73755
73805
|
}
|
|
73756
73806
|
cancelEdition() {
|
|
@@ -80802,6 +80852,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
|
|
|
80802
80852
|
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, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
80803
80853
|
|
|
80804
80854
|
|
|
80805
|
-
__info__.version = "18.3.
|
|
80806
|
-
__info__.date = "2025-07-
|
|
80807
|
-
__info__.hash = "
|
|
80855
|
+
__info__.version = "18.3.13";
|
|
80856
|
+
__info__.date = "2025-07-28T13:39:23.645Z";
|
|
80857
|
+
__info__.hash = "d30327c";
|