@odoo/o-spreadsheet 18.4.17 → 18.4.18
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 +49 -37
- package/dist/o-spreadsheet.d.ts +10 -7
- package/dist/o-spreadsheet.esm.js +49 -37
- package/dist/o-spreadsheet.iife.js +49 -37
- package/dist/o-spreadsheet.iife.min.js +12 -12
- 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.4.
|
|
6
|
-
* @date 2025-11-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.4.18
|
|
6
|
+
* @date 2025-11-24T07:42:07.821Z
|
|
7
|
+
* @hash 4f83667
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -18543,7 +18543,7 @@ function getTokenNextReferenceType(xc) {
|
|
|
18543
18543
|
function setXcToFixedReferenceType(xc, referenceType) {
|
|
18544
18544
|
let sheetName;
|
|
18545
18545
|
({ sheetName, xc } = splitReference(xc));
|
|
18546
|
-
sheetName = sheetName ? sheetName + "!" : "";
|
|
18546
|
+
sheetName = sheetName ? getCanonicalSymbolName(sheetName) + "!" : "";
|
|
18547
18547
|
xc = xc.replace(/\$/g, "");
|
|
18548
18548
|
const splitIndex = xc.indexOf(":");
|
|
18549
18549
|
if (splitIndex >= 0) {
|
|
@@ -32644,6 +32644,7 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
32644
32644
|
}
|
|
32645
32645
|
this.selectionStart = start;
|
|
32646
32646
|
this.selectionEnd = end;
|
|
32647
|
+
this.editionMode = "editing";
|
|
32647
32648
|
this.computeFormulaCursorContext();
|
|
32648
32649
|
this.computeParenthesisRelatedToCursor();
|
|
32649
32650
|
this.updateAutoCompleteProvider();
|
|
@@ -33319,10 +33320,13 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
33319
33320
|
hideHelp() {
|
|
33320
33321
|
this.autoComplete.hide();
|
|
33321
33322
|
}
|
|
33322
|
-
autoCompleteOrStop(direction) {
|
|
33323
|
+
autoCompleteOrStop(direction, assistantForcedClosed = false) {
|
|
33323
33324
|
if (this.editionMode !== "inactive") {
|
|
33324
33325
|
const autoComplete = this.autoComplete;
|
|
33325
|
-
|
|
33326
|
+
const suppressAutocomplete = assistantForcedClosed && this.canBeToggled;
|
|
33327
|
+
if (!suppressAutocomplete &&
|
|
33328
|
+
autoComplete.provider &&
|
|
33329
|
+
autoComplete.selectedIndex !== undefined) {
|
|
33326
33330
|
const autoCompleteValue = autoComplete.provider.proposals[autoComplete.selectedIndex]?.text;
|
|
33327
33331
|
if (autoCompleteValue) {
|
|
33328
33332
|
this.autoComplete.provider?.selectProposal(autoCompleteValue);
|
|
@@ -33665,16 +33669,12 @@ class Composer extends owl.Component {
|
|
|
33665
33669
|
processTabKey(ev, direction) {
|
|
33666
33670
|
ev.preventDefault();
|
|
33667
33671
|
ev.stopPropagation();
|
|
33668
|
-
|
|
33669
|
-
this.props.composerStore.autoCompleteOrStop(direction);
|
|
33670
|
-
}
|
|
33672
|
+
this.props.composerStore.autoCompleteOrStop(direction, this.assistant.forcedClosed);
|
|
33671
33673
|
}
|
|
33672
33674
|
processEnterKey(ev, direction) {
|
|
33673
33675
|
ev.preventDefault();
|
|
33674
33676
|
ev.stopPropagation();
|
|
33675
|
-
|
|
33676
|
-
this.props.composerStore.autoCompleteOrStop(direction);
|
|
33677
|
-
}
|
|
33677
|
+
this.props.composerStore.autoCompleteOrStop(direction, this.assistant.forcedClosed);
|
|
33678
33678
|
}
|
|
33679
33679
|
processNewLineEvent(ev) {
|
|
33680
33680
|
ev.preventDefault();
|
|
@@ -33850,7 +33850,6 @@ class Composer extends owl.Component {
|
|
|
33850
33850
|
return;
|
|
33851
33851
|
}
|
|
33852
33852
|
const newSelection = this.contentHelper.getCurrentSelection();
|
|
33853
|
-
this.props.composerStore.stopComposerRangeSelection();
|
|
33854
33853
|
this.props.onComposerContentFocused();
|
|
33855
33854
|
this.props.composerStore.changeComposerCursorSelection(newSelection.start, newSelection.end);
|
|
33856
33855
|
this.processTokenAtCursor();
|
|
@@ -47371,10 +47370,11 @@ class AbstractResizer extends owl.Component {
|
|
|
47371
47370
|
this.state.waitingForMove = false;
|
|
47372
47371
|
}
|
|
47373
47372
|
onMouseMove(ev) {
|
|
47374
|
-
if (this.env.isMobile()
|
|
47375
|
-
|
|
47376
|
-
|
|
47377
|
-
|
|
47373
|
+
if (this.env.isMobile() ||
|
|
47374
|
+
this.env.model.getters.isReadonly() ||
|
|
47375
|
+
this.state.isResizing ||
|
|
47376
|
+
this.state.isMoving ||
|
|
47377
|
+
this.state.isSelecting) {
|
|
47378
47378
|
return;
|
|
47379
47379
|
}
|
|
47380
47380
|
this._computeHandleDisplay(ev);
|
|
@@ -47441,6 +47441,10 @@ class AbstractResizer extends owl.Component {
|
|
|
47441
47441
|
if (index < 0) {
|
|
47442
47442
|
return;
|
|
47443
47443
|
}
|
|
47444
|
+
if (this.env.model.getters.isReadonly()) {
|
|
47445
|
+
this._selectElement(index, false);
|
|
47446
|
+
return;
|
|
47447
|
+
}
|
|
47444
47448
|
if (this.state.waitingForMove) {
|
|
47445
47449
|
if (!this.env.model.getters.isGridSelectionActive()) {
|
|
47446
47450
|
this._selectElement(index, false);
|
|
@@ -48801,7 +48805,7 @@ const friction = 0.95;
|
|
|
48801
48805
|
const verticalScrollFactor = 1;
|
|
48802
48806
|
const horizontalScrollFactor = 1;
|
|
48803
48807
|
const resetTimeoutDuration = 100;
|
|
48804
|
-
function useTouchScroll(ref, updateScroll, canMoveUp) {
|
|
48808
|
+
function useTouchScroll(ref, updateScroll, canMoveUp, canMoveDown) {
|
|
48805
48809
|
let lastX = 0;
|
|
48806
48810
|
let lastY = 0;
|
|
48807
48811
|
let velocityX = 0;
|
|
@@ -48838,7 +48842,7 @@ function useTouchScroll(ref, updateScroll, canMoveUp) {
|
|
|
48838
48842
|
lastX = clientX;
|
|
48839
48843
|
lastY = clientY;
|
|
48840
48844
|
lastTime = currentTime;
|
|
48841
|
-
if (canMoveUp()) {
|
|
48845
|
+
if ((deltaY < 0 && canMoveUp()) || (deltaY > 0 && canMoveDown())) {
|
|
48842
48846
|
if (event.cancelable) {
|
|
48843
48847
|
event.preventDefault();
|
|
48844
48848
|
}
|
|
@@ -54738,7 +54742,6 @@ function insertTokenAfterArgSeparator(tokenAtCursor, value) {
|
|
|
54738
54742
|
// replace the whole token
|
|
54739
54743
|
start = tokenAtCursor.start;
|
|
54740
54744
|
}
|
|
54741
|
-
this.composer.stopComposerRangeSelection();
|
|
54742
54745
|
this.composer.changeComposerCursorSelection(start, end);
|
|
54743
54746
|
this.composer.replaceComposerCursorSelection(value);
|
|
54744
54747
|
}
|
|
@@ -54756,7 +54759,6 @@ function insertTokenAfterLeftParenthesis(tokenAtCursor, value) {
|
|
|
54756
54759
|
// replace the whole token
|
|
54757
54760
|
start = tokenAtCursor.start;
|
|
54758
54761
|
}
|
|
54759
|
-
this.composer.stopComposerRangeSelection();
|
|
54760
54762
|
this.composer.changeComposerCursorSelection(start, end);
|
|
54761
54763
|
this.composer.replaceComposerCursorSelection(value);
|
|
54762
54764
|
}
|
|
@@ -57455,6 +57457,7 @@ class SidePanelStore extends SpreadsheetStore {
|
|
|
57455
57457
|
getPanelProps(panelInfo) {
|
|
57456
57458
|
const state = this.computeState(panelInfo);
|
|
57457
57459
|
if (state.isOpen) {
|
|
57460
|
+
panelInfo.currentPanelProps = state.props ?? panelInfo.currentPanelProps;
|
|
57458
57461
|
return state.props ?? {};
|
|
57459
57462
|
}
|
|
57460
57463
|
return {};
|
|
@@ -57466,11 +57469,11 @@ class SidePanelStore extends SpreadsheetStore {
|
|
|
57466
57469
|
}
|
|
57467
57470
|
return undefined;
|
|
57468
57471
|
}
|
|
57469
|
-
open(componentTag,
|
|
57472
|
+
open(componentTag, currentPanelProps = {}) {
|
|
57470
57473
|
if (this.screenWidthStore.isSmall) {
|
|
57471
57474
|
return;
|
|
57472
57475
|
}
|
|
57473
|
-
const newPanelInfo = {
|
|
57476
|
+
const newPanelInfo = { currentPanelProps, componentTag, size: DEFAULT_SIDE_PANEL_SIZE };
|
|
57474
57477
|
const state = this.computeState(newPanelInfo);
|
|
57475
57478
|
if (!state.isOpen) {
|
|
57476
57479
|
return;
|
|
@@ -57494,8 +57497,8 @@ class SidePanelStore extends SpreadsheetStore {
|
|
|
57494
57497
|
}
|
|
57495
57498
|
this._openPanel("secondaryPanel", newPanelInfo, state);
|
|
57496
57499
|
}
|
|
57497
|
-
replace(componentTag, currentPanelKey,
|
|
57498
|
-
const newPanelInfo = {
|
|
57500
|
+
replace(componentTag, currentPanelKey, currentPanelProps = {}) {
|
|
57501
|
+
const newPanelInfo = { currentPanelProps, componentTag, size: DEFAULT_SIDE_PANEL_SIZE };
|
|
57499
57502
|
const state = this.computeState(newPanelInfo);
|
|
57500
57503
|
if (!state.isOpen) {
|
|
57501
57504
|
return;
|
|
@@ -57525,10 +57528,10 @@ class SidePanelStore extends SpreadsheetStore {
|
|
|
57525
57528
|
_openPanel(panel, newPanel, state) {
|
|
57526
57529
|
const currentPanel = this[panel];
|
|
57527
57530
|
if (currentPanel && newPanel.componentTag !== currentPanel.componentTag) {
|
|
57528
|
-
currentPanel.
|
|
57531
|
+
currentPanel.currentPanelProps?.onCloseSidePanel?.();
|
|
57529
57532
|
}
|
|
57530
57533
|
this[panel] = {
|
|
57531
|
-
|
|
57534
|
+
currentPanelProps: state.props ?? {},
|
|
57532
57535
|
componentTag: newPanel.componentTag,
|
|
57533
57536
|
size: currentPanel?.size || DEFAULT_SIDE_PANEL_SIZE,
|
|
57534
57537
|
isCollapsed: currentPanel?.isCollapsed || false,
|
|
@@ -57550,16 +57553,16 @@ class SidePanelStore extends SpreadsheetStore {
|
|
|
57550
57553
|
close() {
|
|
57551
57554
|
if (this.mainPanel?.isPinned) {
|
|
57552
57555
|
if (this.secondaryPanel) {
|
|
57553
|
-
this.secondaryPanel.
|
|
57556
|
+
this.secondaryPanel.currentPanelProps.onCloseSidePanel?.();
|
|
57554
57557
|
this.secondaryPanel = undefined;
|
|
57555
57558
|
}
|
|
57556
57559
|
return;
|
|
57557
57560
|
}
|
|
57558
|
-
this.mainPanel?.
|
|
57561
|
+
this.mainPanel?.currentPanelProps.onCloseSidePanel?.();
|
|
57559
57562
|
this.mainPanel = undefined;
|
|
57560
57563
|
}
|
|
57561
57564
|
closeMainPanel() {
|
|
57562
|
-
this.mainPanel?.
|
|
57565
|
+
this.mainPanel?.currentPanelProps.onCloseSidePanel?.();
|
|
57563
57566
|
this.mainPanel = this.secondaryPanel || undefined;
|
|
57564
57567
|
this.secondaryPanel = undefined;
|
|
57565
57568
|
}
|
|
@@ -57591,7 +57594,7 @@ class SidePanelStore extends SpreadsheetStore {
|
|
|
57591
57594
|
}
|
|
57592
57595
|
this.mainPanel.isPinned = !this.mainPanel.isPinned;
|
|
57593
57596
|
if (!this.mainPanel.isPinned && this.secondaryPanel) {
|
|
57594
|
-
this.secondaryPanel?.
|
|
57597
|
+
this.secondaryPanel?.currentPanelProps.onCloseSidePanel?.();
|
|
57595
57598
|
this.mainPanel = this.secondaryPanel;
|
|
57596
57599
|
this.secondaryPanel = undefined;
|
|
57597
57600
|
}
|
|
@@ -57610,7 +57613,7 @@ class SidePanelStore extends SpreadsheetStore {
|
|
|
57610
57613
|
panelInfo.size = COLLAPSED_SIDE_PANEL_SIZE;
|
|
57611
57614
|
}
|
|
57612
57615
|
}
|
|
57613
|
-
computeState({ componentTag, initialPanelProps }) {
|
|
57616
|
+
computeState({ componentTag, currentPanelProps: initialPanelProps, }) {
|
|
57614
57617
|
const customComputeState = sidePanelRegistry.get(componentTag).computeState;
|
|
57615
57618
|
const state = customComputeState
|
|
57616
57619
|
? customComputeState(this.getters, initialPanelProps)
|
|
@@ -57620,7 +57623,7 @@ class SidePanelStore extends SpreadsheetStore {
|
|
|
57620
57623
|
changeSpreadsheetWidth(width) {
|
|
57621
57624
|
this.availableWidth = width - MIN_SHEET_VIEW_WIDTH;
|
|
57622
57625
|
if (this.secondaryPanel && width - this.totalPanelSize < MIN_SHEET_VIEW_WIDTH) {
|
|
57623
|
-
this.secondaryPanel?.
|
|
57626
|
+
this.secondaryPanel?.currentPanelProps.onCloseSidePanel?.();
|
|
57624
57627
|
this.secondaryPanel = undefined;
|
|
57625
57628
|
}
|
|
57626
57629
|
if (this.mainPanel && width - this.totalPanelSize < MIN_SHEET_VIEW_WIDTH) {
|
|
@@ -57780,6 +57783,10 @@ class Grid extends owl.Component {
|
|
|
57780
57783
|
useTouchScroll(this.gridRef, this.moveCanvas.bind(this), () => {
|
|
57781
57784
|
const { scrollY } = this.env.model.getters.getActiveSheetScrollInfo();
|
|
57782
57785
|
return scrollY > 0;
|
|
57786
|
+
}, () => {
|
|
57787
|
+
const { maxOffsetY } = this.env.model.getters.getMaximumSheetOffset();
|
|
57788
|
+
const { scrollY } = this.env.model.getters.getActiveSheetScrollInfo();
|
|
57789
|
+
return scrollY < maxOffsetY;
|
|
57783
57790
|
});
|
|
57784
57791
|
}
|
|
57785
57792
|
get highlights() {
|
|
@@ -75001,6 +75008,7 @@ class SheetViewPlugin extends UIPlugin {
|
|
|
75001
75008
|
"getFigureUI",
|
|
75002
75009
|
"getPositionAnchorOffset",
|
|
75003
75010
|
"getGridOffset",
|
|
75011
|
+
"getMaximumSheetOffset",
|
|
75004
75012
|
];
|
|
75005
75013
|
viewports = {};
|
|
75006
75014
|
/**
|
|
@@ -78091,6 +78099,10 @@ class SpreadsheetDashboard extends owl.Component {
|
|
|
78091
78099
|
useTouchScroll(this.gridRef, this.moveCanvas.bind(this), () => {
|
|
78092
78100
|
const { scrollY } = this.env.model.getters.getActiveSheetScrollInfo();
|
|
78093
78101
|
return scrollY > 0;
|
|
78102
|
+
}, () => {
|
|
78103
|
+
const { maxOffsetY } = this.env.model.getters.getMaximumSheetOffset();
|
|
78104
|
+
const { scrollY } = this.env.model.getters.getActiveSheetScrollInfo();
|
|
78105
|
+
return scrollY < maxOffsetY;
|
|
78094
78106
|
});
|
|
78095
78107
|
}
|
|
78096
78108
|
get gridContainer() {
|
|
@@ -80134,7 +80146,7 @@ css /* scss */ `
|
|
|
80134
80146
|
border-radius: 4px;
|
|
80135
80147
|
font-weight: 500;
|
|
80136
80148
|
font-size: 14px;
|
|
80137
|
-
height: 32px;
|
|
80149
|
+
min-height: 32px;
|
|
80138
80150
|
line-height: 16px;
|
|
80139
80151
|
flex-grow: 1;
|
|
80140
80152
|
background-color: ${BUTTON_BG};
|
|
@@ -84938,6 +84950,6 @@ exports.tokenColors = tokenColors;
|
|
|
84938
84950
|
exports.tokenize = tokenize;
|
|
84939
84951
|
|
|
84940
84952
|
|
|
84941
|
-
__info__.version = "18.4.
|
|
84942
|
-
__info__.date = "2025-11-
|
|
84943
|
-
__info__.hash = "
|
|
84953
|
+
__info__.version = "18.4.18";
|
|
84954
|
+
__info__.date = "2025-11-24T07:42:07.821Z";
|
|
84955
|
+
__info__.hash = "4f83667";
|
package/dist/o-spreadsheet.d.ts
CHANGED
|
@@ -2500,7 +2500,7 @@ declare class InternalViewport {
|
|
|
2500
2500
|
*
|
|
2501
2501
|
*/
|
|
2502
2502
|
declare class SheetViewPlugin extends UIPlugin {
|
|
2503
|
-
static getters: readonly ["getColIndex", "getRowIndex", "getActiveMainViewport", "getSheetViewDimension", "getSheetViewDimensionWithHeaders", "getMainViewportRect", "isVisibleInViewport", "getEdgeScrollCol", "getEdgeScrollRow", "getVisibleFigures", "getVisibleRect", "getVisibleRectWithoutHeaders", "getVisibleCellPositions", "getColRowOffsetInViewport", "getMainViewportCoordinates", "getActiveSheetScrollInfo", "getSheetViewVisibleCols", "getSheetViewVisibleRows", "getFrozenSheetViewRatio", "isPixelPositionVisible", "getColDimensionsInViewport", "getRowDimensionsInViewport", "getAllActiveViewportsZonesAndRect", "getRect", "getFigureUI", "getPositionAnchorOffset", "getGridOffset"];
|
|
2503
|
+
static getters: readonly ["getColIndex", "getRowIndex", "getActiveMainViewport", "getSheetViewDimension", "getSheetViewDimensionWithHeaders", "getMainViewportRect", "isVisibleInViewport", "getEdgeScrollCol", "getEdgeScrollRow", "getVisibleFigures", "getVisibleRect", "getVisibleRectWithoutHeaders", "getVisibleCellPositions", "getColRowOffsetInViewport", "getMainViewportCoordinates", "getActiveSheetScrollInfo", "getSheetViewVisibleCols", "getSheetViewVisibleRows", "getFrozenSheetViewRatio", "isPixelPositionVisible", "getColDimensionsInViewport", "getRowDimensionsInViewport", "getAllActiveViewportsZonesAndRect", "getRect", "getFigureUI", "getPositionAnchorOffset", "getGridOffset", "getMaximumSheetOffset"];
|
|
2504
2504
|
private viewports;
|
|
2505
2505
|
/**
|
|
2506
2506
|
* The viewport dimensions are usually set by one of the components
|
|
@@ -2551,7 +2551,10 @@ declare class SheetViewPlugin extends UIPlugin {
|
|
|
2551
2551
|
* Return the main viewport maximum size relative to the client size.
|
|
2552
2552
|
*/
|
|
2553
2553
|
getMainViewportRect(): Rect;
|
|
2554
|
-
|
|
2554
|
+
getMaximumSheetOffset(): {
|
|
2555
|
+
maxOffsetX: Pixel;
|
|
2556
|
+
maxOffsetY: Pixel;
|
|
2557
|
+
};
|
|
2555
2558
|
getColRowOffsetInViewport(dimension: Dimension, referenceHeaderIndex: HeaderIndex, targetHeaderIndex: HeaderIndex): Pixel;
|
|
2556
2559
|
/**
|
|
2557
2560
|
* Check if a given position is visible in the viewport.
|
|
@@ -8641,7 +8644,7 @@ declare abstract class AbstractComposerStore extends SpreadsheetStore {
|
|
|
8641
8644
|
private updateAutoCompleteProvider;
|
|
8642
8645
|
private findAutocompleteProvider;
|
|
8643
8646
|
hideHelp(): void;
|
|
8644
|
-
autoCompleteOrStop(direction: Direction$1): void;
|
|
8647
|
+
autoCompleteOrStop(direction: Direction$1, assistantForcedClosed?: boolean): void;
|
|
8645
8648
|
insertAutoCompleteValue(value: string): void;
|
|
8646
8649
|
selectAutoCompleteIndex(index: number): void;
|
|
8647
8650
|
moveAutoCompleteSelection(direction: "previous" | "next"): void;
|
|
@@ -9142,7 +9145,7 @@ interface ClosedSidePanel {
|
|
|
9142
9145
|
}
|
|
9143
9146
|
type SidePanelState = OpenSidePanel | ClosedSidePanel;
|
|
9144
9147
|
interface PanelInfo {
|
|
9145
|
-
|
|
9148
|
+
currentPanelProps: SidePanelComponentProps;
|
|
9146
9149
|
componentTag: string;
|
|
9147
9150
|
size: number;
|
|
9148
9151
|
isCollapsed?: boolean;
|
|
@@ -9169,8 +9172,8 @@ declare class SidePanelStore extends SpreadsheetStore {
|
|
|
9169
9172
|
get totalPanelSize(): number;
|
|
9170
9173
|
private getPanelProps;
|
|
9171
9174
|
private getPanelKey;
|
|
9172
|
-
open(componentTag: string,
|
|
9173
|
-
replace(componentTag: string, currentPanelKey: string,
|
|
9175
|
+
open(componentTag: string, currentPanelProps?: SidePanelComponentProps): void;
|
|
9176
|
+
replace(componentTag: string, currentPanelKey: string, currentPanelProps?: SidePanelComponentProps): void;
|
|
9174
9177
|
private _openPanel;
|
|
9175
9178
|
toggle(componentTag: string, panelProps: SidePanelComponentProps): void;
|
|
9176
9179
|
close(): void;
|
|
@@ -10023,7 +10026,7 @@ declare abstract class AbstractResizer extends Component<ResizerProps, Spreadshe
|
|
|
10023
10026
|
setup(): void;
|
|
10024
10027
|
_computeHandleDisplay(ev: MouseEvent): void;
|
|
10025
10028
|
_computeGrabDisplay(ev: MouseEvent): void;
|
|
10026
|
-
onMouseMove(ev:
|
|
10029
|
+
onMouseMove(ev: MouseEvent): void;
|
|
10027
10030
|
onMouseLeave(): void;
|
|
10028
10031
|
onDblClick(ev: MouseEvent): void;
|
|
10029
10032
|
onMouseDown(ev: MouseEvent): void;
|
|
@@ -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-11-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.4.18
|
|
6
|
+
* @date 2025-11-24T07:42:07.821Z
|
|
7
|
+
* @hash 4f83667
|
|
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';
|
|
@@ -18541,7 +18541,7 @@ function getTokenNextReferenceType(xc) {
|
|
|
18541
18541
|
function setXcToFixedReferenceType(xc, referenceType) {
|
|
18542
18542
|
let sheetName;
|
|
18543
18543
|
({ sheetName, xc } = splitReference(xc));
|
|
18544
|
-
sheetName = sheetName ? sheetName + "!" : "";
|
|
18544
|
+
sheetName = sheetName ? getCanonicalSymbolName(sheetName) + "!" : "";
|
|
18545
18545
|
xc = xc.replace(/\$/g, "");
|
|
18546
18546
|
const splitIndex = xc.indexOf(":");
|
|
18547
18547
|
if (splitIndex >= 0) {
|
|
@@ -32642,6 +32642,7 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
32642
32642
|
}
|
|
32643
32643
|
this.selectionStart = start;
|
|
32644
32644
|
this.selectionEnd = end;
|
|
32645
|
+
this.editionMode = "editing";
|
|
32645
32646
|
this.computeFormulaCursorContext();
|
|
32646
32647
|
this.computeParenthesisRelatedToCursor();
|
|
32647
32648
|
this.updateAutoCompleteProvider();
|
|
@@ -33317,10 +33318,13 @@ class AbstractComposerStore extends SpreadsheetStore {
|
|
|
33317
33318
|
hideHelp() {
|
|
33318
33319
|
this.autoComplete.hide();
|
|
33319
33320
|
}
|
|
33320
|
-
autoCompleteOrStop(direction) {
|
|
33321
|
+
autoCompleteOrStop(direction, assistantForcedClosed = false) {
|
|
33321
33322
|
if (this.editionMode !== "inactive") {
|
|
33322
33323
|
const autoComplete = this.autoComplete;
|
|
33323
|
-
|
|
33324
|
+
const suppressAutocomplete = assistantForcedClosed && this.canBeToggled;
|
|
33325
|
+
if (!suppressAutocomplete &&
|
|
33326
|
+
autoComplete.provider &&
|
|
33327
|
+
autoComplete.selectedIndex !== undefined) {
|
|
33324
33328
|
const autoCompleteValue = autoComplete.provider.proposals[autoComplete.selectedIndex]?.text;
|
|
33325
33329
|
if (autoCompleteValue) {
|
|
33326
33330
|
this.autoComplete.provider?.selectProposal(autoCompleteValue);
|
|
@@ -33663,16 +33667,12 @@ class Composer extends Component {
|
|
|
33663
33667
|
processTabKey(ev, direction) {
|
|
33664
33668
|
ev.preventDefault();
|
|
33665
33669
|
ev.stopPropagation();
|
|
33666
|
-
|
|
33667
|
-
this.props.composerStore.autoCompleteOrStop(direction);
|
|
33668
|
-
}
|
|
33670
|
+
this.props.composerStore.autoCompleteOrStop(direction, this.assistant.forcedClosed);
|
|
33669
33671
|
}
|
|
33670
33672
|
processEnterKey(ev, direction) {
|
|
33671
33673
|
ev.preventDefault();
|
|
33672
33674
|
ev.stopPropagation();
|
|
33673
|
-
|
|
33674
|
-
this.props.composerStore.autoCompleteOrStop(direction);
|
|
33675
|
-
}
|
|
33675
|
+
this.props.composerStore.autoCompleteOrStop(direction, this.assistant.forcedClosed);
|
|
33676
33676
|
}
|
|
33677
33677
|
processNewLineEvent(ev) {
|
|
33678
33678
|
ev.preventDefault();
|
|
@@ -33848,7 +33848,6 @@ class Composer extends Component {
|
|
|
33848
33848
|
return;
|
|
33849
33849
|
}
|
|
33850
33850
|
const newSelection = this.contentHelper.getCurrentSelection();
|
|
33851
|
-
this.props.composerStore.stopComposerRangeSelection();
|
|
33852
33851
|
this.props.onComposerContentFocused();
|
|
33853
33852
|
this.props.composerStore.changeComposerCursorSelection(newSelection.start, newSelection.end);
|
|
33854
33853
|
this.processTokenAtCursor();
|
|
@@ -47369,10 +47368,11 @@ class AbstractResizer extends Component {
|
|
|
47369
47368
|
this.state.waitingForMove = false;
|
|
47370
47369
|
}
|
|
47371
47370
|
onMouseMove(ev) {
|
|
47372
|
-
if (this.env.isMobile()
|
|
47373
|
-
|
|
47374
|
-
|
|
47375
|
-
|
|
47371
|
+
if (this.env.isMobile() ||
|
|
47372
|
+
this.env.model.getters.isReadonly() ||
|
|
47373
|
+
this.state.isResizing ||
|
|
47374
|
+
this.state.isMoving ||
|
|
47375
|
+
this.state.isSelecting) {
|
|
47376
47376
|
return;
|
|
47377
47377
|
}
|
|
47378
47378
|
this._computeHandleDisplay(ev);
|
|
@@ -47439,6 +47439,10 @@ class AbstractResizer extends Component {
|
|
|
47439
47439
|
if (index < 0) {
|
|
47440
47440
|
return;
|
|
47441
47441
|
}
|
|
47442
|
+
if (this.env.model.getters.isReadonly()) {
|
|
47443
|
+
this._selectElement(index, false);
|
|
47444
|
+
return;
|
|
47445
|
+
}
|
|
47442
47446
|
if (this.state.waitingForMove) {
|
|
47443
47447
|
if (!this.env.model.getters.isGridSelectionActive()) {
|
|
47444
47448
|
this._selectElement(index, false);
|
|
@@ -48799,7 +48803,7 @@ const friction = 0.95;
|
|
|
48799
48803
|
const verticalScrollFactor = 1;
|
|
48800
48804
|
const horizontalScrollFactor = 1;
|
|
48801
48805
|
const resetTimeoutDuration = 100;
|
|
48802
|
-
function useTouchScroll(ref, updateScroll, canMoveUp) {
|
|
48806
|
+
function useTouchScroll(ref, updateScroll, canMoveUp, canMoveDown) {
|
|
48803
48807
|
let lastX = 0;
|
|
48804
48808
|
let lastY = 0;
|
|
48805
48809
|
let velocityX = 0;
|
|
@@ -48836,7 +48840,7 @@ function useTouchScroll(ref, updateScroll, canMoveUp) {
|
|
|
48836
48840
|
lastX = clientX;
|
|
48837
48841
|
lastY = clientY;
|
|
48838
48842
|
lastTime = currentTime;
|
|
48839
|
-
if (canMoveUp()) {
|
|
48843
|
+
if ((deltaY < 0 && canMoveUp()) || (deltaY > 0 && canMoveDown())) {
|
|
48840
48844
|
if (event.cancelable) {
|
|
48841
48845
|
event.preventDefault();
|
|
48842
48846
|
}
|
|
@@ -54736,7 +54740,6 @@ function insertTokenAfterArgSeparator(tokenAtCursor, value) {
|
|
|
54736
54740
|
// replace the whole token
|
|
54737
54741
|
start = tokenAtCursor.start;
|
|
54738
54742
|
}
|
|
54739
|
-
this.composer.stopComposerRangeSelection();
|
|
54740
54743
|
this.composer.changeComposerCursorSelection(start, end);
|
|
54741
54744
|
this.composer.replaceComposerCursorSelection(value);
|
|
54742
54745
|
}
|
|
@@ -54754,7 +54757,6 @@ function insertTokenAfterLeftParenthesis(tokenAtCursor, value) {
|
|
|
54754
54757
|
// replace the whole token
|
|
54755
54758
|
start = tokenAtCursor.start;
|
|
54756
54759
|
}
|
|
54757
|
-
this.composer.stopComposerRangeSelection();
|
|
54758
54760
|
this.composer.changeComposerCursorSelection(start, end);
|
|
54759
54761
|
this.composer.replaceComposerCursorSelection(value);
|
|
54760
54762
|
}
|
|
@@ -57453,6 +57455,7 @@ class SidePanelStore extends SpreadsheetStore {
|
|
|
57453
57455
|
getPanelProps(panelInfo) {
|
|
57454
57456
|
const state = this.computeState(panelInfo);
|
|
57455
57457
|
if (state.isOpen) {
|
|
57458
|
+
panelInfo.currentPanelProps = state.props ?? panelInfo.currentPanelProps;
|
|
57456
57459
|
return state.props ?? {};
|
|
57457
57460
|
}
|
|
57458
57461
|
return {};
|
|
@@ -57464,11 +57467,11 @@ class SidePanelStore extends SpreadsheetStore {
|
|
|
57464
57467
|
}
|
|
57465
57468
|
return undefined;
|
|
57466
57469
|
}
|
|
57467
|
-
open(componentTag,
|
|
57470
|
+
open(componentTag, currentPanelProps = {}) {
|
|
57468
57471
|
if (this.screenWidthStore.isSmall) {
|
|
57469
57472
|
return;
|
|
57470
57473
|
}
|
|
57471
|
-
const newPanelInfo = {
|
|
57474
|
+
const newPanelInfo = { currentPanelProps, componentTag, size: DEFAULT_SIDE_PANEL_SIZE };
|
|
57472
57475
|
const state = this.computeState(newPanelInfo);
|
|
57473
57476
|
if (!state.isOpen) {
|
|
57474
57477
|
return;
|
|
@@ -57492,8 +57495,8 @@ class SidePanelStore extends SpreadsheetStore {
|
|
|
57492
57495
|
}
|
|
57493
57496
|
this._openPanel("secondaryPanel", newPanelInfo, state);
|
|
57494
57497
|
}
|
|
57495
|
-
replace(componentTag, currentPanelKey,
|
|
57496
|
-
const newPanelInfo = {
|
|
57498
|
+
replace(componentTag, currentPanelKey, currentPanelProps = {}) {
|
|
57499
|
+
const newPanelInfo = { currentPanelProps, componentTag, size: DEFAULT_SIDE_PANEL_SIZE };
|
|
57497
57500
|
const state = this.computeState(newPanelInfo);
|
|
57498
57501
|
if (!state.isOpen) {
|
|
57499
57502
|
return;
|
|
@@ -57523,10 +57526,10 @@ class SidePanelStore extends SpreadsheetStore {
|
|
|
57523
57526
|
_openPanel(panel, newPanel, state) {
|
|
57524
57527
|
const currentPanel = this[panel];
|
|
57525
57528
|
if (currentPanel && newPanel.componentTag !== currentPanel.componentTag) {
|
|
57526
|
-
currentPanel.
|
|
57529
|
+
currentPanel.currentPanelProps?.onCloseSidePanel?.();
|
|
57527
57530
|
}
|
|
57528
57531
|
this[panel] = {
|
|
57529
|
-
|
|
57532
|
+
currentPanelProps: state.props ?? {},
|
|
57530
57533
|
componentTag: newPanel.componentTag,
|
|
57531
57534
|
size: currentPanel?.size || DEFAULT_SIDE_PANEL_SIZE,
|
|
57532
57535
|
isCollapsed: currentPanel?.isCollapsed || false,
|
|
@@ -57548,16 +57551,16 @@ class SidePanelStore extends SpreadsheetStore {
|
|
|
57548
57551
|
close() {
|
|
57549
57552
|
if (this.mainPanel?.isPinned) {
|
|
57550
57553
|
if (this.secondaryPanel) {
|
|
57551
|
-
this.secondaryPanel.
|
|
57554
|
+
this.secondaryPanel.currentPanelProps.onCloseSidePanel?.();
|
|
57552
57555
|
this.secondaryPanel = undefined;
|
|
57553
57556
|
}
|
|
57554
57557
|
return;
|
|
57555
57558
|
}
|
|
57556
|
-
this.mainPanel?.
|
|
57559
|
+
this.mainPanel?.currentPanelProps.onCloseSidePanel?.();
|
|
57557
57560
|
this.mainPanel = undefined;
|
|
57558
57561
|
}
|
|
57559
57562
|
closeMainPanel() {
|
|
57560
|
-
this.mainPanel?.
|
|
57563
|
+
this.mainPanel?.currentPanelProps.onCloseSidePanel?.();
|
|
57561
57564
|
this.mainPanel = this.secondaryPanel || undefined;
|
|
57562
57565
|
this.secondaryPanel = undefined;
|
|
57563
57566
|
}
|
|
@@ -57589,7 +57592,7 @@ class SidePanelStore extends SpreadsheetStore {
|
|
|
57589
57592
|
}
|
|
57590
57593
|
this.mainPanel.isPinned = !this.mainPanel.isPinned;
|
|
57591
57594
|
if (!this.mainPanel.isPinned && this.secondaryPanel) {
|
|
57592
|
-
this.secondaryPanel?.
|
|
57595
|
+
this.secondaryPanel?.currentPanelProps.onCloseSidePanel?.();
|
|
57593
57596
|
this.mainPanel = this.secondaryPanel;
|
|
57594
57597
|
this.secondaryPanel = undefined;
|
|
57595
57598
|
}
|
|
@@ -57608,7 +57611,7 @@ class SidePanelStore extends SpreadsheetStore {
|
|
|
57608
57611
|
panelInfo.size = COLLAPSED_SIDE_PANEL_SIZE;
|
|
57609
57612
|
}
|
|
57610
57613
|
}
|
|
57611
|
-
computeState({ componentTag, initialPanelProps }) {
|
|
57614
|
+
computeState({ componentTag, currentPanelProps: initialPanelProps, }) {
|
|
57612
57615
|
const customComputeState = sidePanelRegistry.get(componentTag).computeState;
|
|
57613
57616
|
const state = customComputeState
|
|
57614
57617
|
? customComputeState(this.getters, initialPanelProps)
|
|
@@ -57618,7 +57621,7 @@ class SidePanelStore extends SpreadsheetStore {
|
|
|
57618
57621
|
changeSpreadsheetWidth(width) {
|
|
57619
57622
|
this.availableWidth = width - MIN_SHEET_VIEW_WIDTH;
|
|
57620
57623
|
if (this.secondaryPanel && width - this.totalPanelSize < MIN_SHEET_VIEW_WIDTH) {
|
|
57621
|
-
this.secondaryPanel?.
|
|
57624
|
+
this.secondaryPanel?.currentPanelProps.onCloseSidePanel?.();
|
|
57622
57625
|
this.secondaryPanel = undefined;
|
|
57623
57626
|
}
|
|
57624
57627
|
if (this.mainPanel && width - this.totalPanelSize < MIN_SHEET_VIEW_WIDTH) {
|
|
@@ -57778,6 +57781,10 @@ class Grid extends Component {
|
|
|
57778
57781
|
useTouchScroll(this.gridRef, this.moveCanvas.bind(this), () => {
|
|
57779
57782
|
const { scrollY } = this.env.model.getters.getActiveSheetScrollInfo();
|
|
57780
57783
|
return scrollY > 0;
|
|
57784
|
+
}, () => {
|
|
57785
|
+
const { maxOffsetY } = this.env.model.getters.getMaximumSheetOffset();
|
|
57786
|
+
const { scrollY } = this.env.model.getters.getActiveSheetScrollInfo();
|
|
57787
|
+
return scrollY < maxOffsetY;
|
|
57781
57788
|
});
|
|
57782
57789
|
}
|
|
57783
57790
|
get highlights() {
|
|
@@ -74999,6 +75006,7 @@ class SheetViewPlugin extends UIPlugin {
|
|
|
74999
75006
|
"getFigureUI",
|
|
75000
75007
|
"getPositionAnchorOffset",
|
|
75001
75008
|
"getGridOffset",
|
|
75009
|
+
"getMaximumSheetOffset",
|
|
75002
75010
|
];
|
|
75003
75011
|
viewports = {};
|
|
75004
75012
|
/**
|
|
@@ -78089,6 +78097,10 @@ class SpreadsheetDashboard extends Component {
|
|
|
78089
78097
|
useTouchScroll(this.gridRef, this.moveCanvas.bind(this), () => {
|
|
78090
78098
|
const { scrollY } = this.env.model.getters.getActiveSheetScrollInfo();
|
|
78091
78099
|
return scrollY > 0;
|
|
78100
|
+
}, () => {
|
|
78101
|
+
const { maxOffsetY } = this.env.model.getters.getMaximumSheetOffset();
|
|
78102
|
+
const { scrollY } = this.env.model.getters.getActiveSheetScrollInfo();
|
|
78103
|
+
return scrollY < maxOffsetY;
|
|
78092
78104
|
});
|
|
78093
78105
|
}
|
|
78094
78106
|
get gridContainer() {
|
|
@@ -80132,7 +80144,7 @@ css /* scss */ `
|
|
|
80132
80144
|
border-radius: 4px;
|
|
80133
80145
|
font-weight: 500;
|
|
80134
80146
|
font-size: 14px;
|
|
80135
|
-
height: 32px;
|
|
80147
|
+
min-height: 32px;
|
|
80136
80148
|
line-height: 16px;
|
|
80137
80149
|
flex-grow: 1;
|
|
80138
80150
|
background-color: ${BUTTON_BG};
|
|
@@ -84888,6 +84900,6 @@ const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
|
|
|
84888
84900
|
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 };
|
|
84889
84901
|
|
|
84890
84902
|
|
|
84891
|
-
__info__.version = "18.4.
|
|
84892
|
-
__info__.date = "2025-11-
|
|
84893
|
-
__info__.hash = "
|
|
84903
|
+
__info__.version = "18.4.18";
|
|
84904
|
+
__info__.date = "2025-11-24T07:42:07.821Z";
|
|
84905
|
+
__info__.hash = "4f83667";
|