@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
|
(function (exports, owl) {
|
|
@@ -18542,7 +18542,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
18542
18542
|
function setXcToFixedReferenceType(xc, referenceType) {
|
|
18543
18543
|
let sheetName;
|
|
18544
18544
|
({ sheetName, xc } = splitReference(xc));
|
|
18545
|
-
sheetName = sheetName ? sheetName + "!" : "";
|
|
18545
|
+
sheetName = sheetName ? getCanonicalSymbolName(sheetName) + "!" : "";
|
|
18546
18546
|
xc = xc.replace(/\$/g, "");
|
|
18547
18547
|
const splitIndex = xc.indexOf(":");
|
|
18548
18548
|
if (splitIndex >= 0) {
|
|
@@ -32643,6 +32643,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
32643
32643
|
}
|
|
32644
32644
|
this.selectionStart = start;
|
|
32645
32645
|
this.selectionEnd = end;
|
|
32646
|
+
this.editionMode = "editing";
|
|
32646
32647
|
this.computeFormulaCursorContext();
|
|
32647
32648
|
this.computeParenthesisRelatedToCursor();
|
|
32648
32649
|
this.updateAutoCompleteProvider();
|
|
@@ -33318,10 +33319,13 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
33318
33319
|
hideHelp() {
|
|
33319
33320
|
this.autoComplete.hide();
|
|
33320
33321
|
}
|
|
33321
|
-
autoCompleteOrStop(direction) {
|
|
33322
|
+
autoCompleteOrStop(direction, assistantForcedClosed = false) {
|
|
33322
33323
|
if (this.editionMode !== "inactive") {
|
|
33323
33324
|
const autoComplete = this.autoComplete;
|
|
33324
|
-
|
|
33325
|
+
const suppressAutocomplete = assistantForcedClosed && this.canBeToggled;
|
|
33326
|
+
if (!suppressAutocomplete &&
|
|
33327
|
+
autoComplete.provider &&
|
|
33328
|
+
autoComplete.selectedIndex !== undefined) {
|
|
33325
33329
|
const autoCompleteValue = autoComplete.provider.proposals[autoComplete.selectedIndex]?.text;
|
|
33326
33330
|
if (autoCompleteValue) {
|
|
33327
33331
|
this.autoComplete.provider?.selectProposal(autoCompleteValue);
|
|
@@ -33664,16 +33668,12 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
33664
33668
|
processTabKey(ev, direction) {
|
|
33665
33669
|
ev.preventDefault();
|
|
33666
33670
|
ev.stopPropagation();
|
|
33667
|
-
|
|
33668
|
-
this.props.composerStore.autoCompleteOrStop(direction);
|
|
33669
|
-
}
|
|
33671
|
+
this.props.composerStore.autoCompleteOrStop(direction, this.assistant.forcedClosed);
|
|
33670
33672
|
}
|
|
33671
33673
|
processEnterKey(ev, direction) {
|
|
33672
33674
|
ev.preventDefault();
|
|
33673
33675
|
ev.stopPropagation();
|
|
33674
|
-
|
|
33675
|
-
this.props.composerStore.autoCompleteOrStop(direction);
|
|
33676
|
-
}
|
|
33676
|
+
this.props.composerStore.autoCompleteOrStop(direction, this.assistant.forcedClosed);
|
|
33677
33677
|
}
|
|
33678
33678
|
processNewLineEvent(ev) {
|
|
33679
33679
|
ev.preventDefault();
|
|
@@ -33849,7 +33849,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
33849
33849
|
return;
|
|
33850
33850
|
}
|
|
33851
33851
|
const newSelection = this.contentHelper.getCurrentSelection();
|
|
33852
|
-
this.props.composerStore.stopComposerRangeSelection();
|
|
33853
33852
|
this.props.onComposerContentFocused();
|
|
33854
33853
|
this.props.composerStore.changeComposerCursorSelection(newSelection.start, newSelection.end);
|
|
33855
33854
|
this.processTokenAtCursor();
|
|
@@ -47370,10 +47369,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
47370
47369
|
this.state.waitingForMove = false;
|
|
47371
47370
|
}
|
|
47372
47371
|
onMouseMove(ev) {
|
|
47373
|
-
if (this.env.isMobile()
|
|
47374
|
-
|
|
47375
|
-
|
|
47376
|
-
|
|
47372
|
+
if (this.env.isMobile() ||
|
|
47373
|
+
this.env.model.getters.isReadonly() ||
|
|
47374
|
+
this.state.isResizing ||
|
|
47375
|
+
this.state.isMoving ||
|
|
47376
|
+
this.state.isSelecting) {
|
|
47377
47377
|
return;
|
|
47378
47378
|
}
|
|
47379
47379
|
this._computeHandleDisplay(ev);
|
|
@@ -47440,6 +47440,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
47440
47440
|
if (index < 0) {
|
|
47441
47441
|
return;
|
|
47442
47442
|
}
|
|
47443
|
+
if (this.env.model.getters.isReadonly()) {
|
|
47444
|
+
this._selectElement(index, false);
|
|
47445
|
+
return;
|
|
47446
|
+
}
|
|
47443
47447
|
if (this.state.waitingForMove) {
|
|
47444
47448
|
if (!this.env.model.getters.isGridSelectionActive()) {
|
|
47445
47449
|
this._selectElement(index, false);
|
|
@@ -48800,7 +48804,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
48800
48804
|
const verticalScrollFactor = 1;
|
|
48801
48805
|
const horizontalScrollFactor = 1;
|
|
48802
48806
|
const resetTimeoutDuration = 100;
|
|
48803
|
-
function useTouchScroll(ref, updateScroll, canMoveUp) {
|
|
48807
|
+
function useTouchScroll(ref, updateScroll, canMoveUp, canMoveDown) {
|
|
48804
48808
|
let lastX = 0;
|
|
48805
48809
|
let lastY = 0;
|
|
48806
48810
|
let velocityX = 0;
|
|
@@ -48837,7 +48841,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
48837
48841
|
lastX = clientX;
|
|
48838
48842
|
lastY = clientY;
|
|
48839
48843
|
lastTime = currentTime;
|
|
48840
|
-
if (canMoveUp()) {
|
|
48844
|
+
if ((deltaY < 0 && canMoveUp()) || (deltaY > 0 && canMoveDown())) {
|
|
48841
48845
|
if (event.cancelable) {
|
|
48842
48846
|
event.preventDefault();
|
|
48843
48847
|
}
|
|
@@ -54737,7 +54741,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
54737
54741
|
// replace the whole token
|
|
54738
54742
|
start = tokenAtCursor.start;
|
|
54739
54743
|
}
|
|
54740
|
-
this.composer.stopComposerRangeSelection();
|
|
54741
54744
|
this.composer.changeComposerCursorSelection(start, end);
|
|
54742
54745
|
this.composer.replaceComposerCursorSelection(value);
|
|
54743
54746
|
}
|
|
@@ -54755,7 +54758,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
54755
54758
|
// replace the whole token
|
|
54756
54759
|
start = tokenAtCursor.start;
|
|
54757
54760
|
}
|
|
54758
|
-
this.composer.stopComposerRangeSelection();
|
|
54759
54761
|
this.composer.changeComposerCursorSelection(start, end);
|
|
54760
54762
|
this.composer.replaceComposerCursorSelection(value);
|
|
54761
54763
|
}
|
|
@@ -57454,6 +57456,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57454
57456
|
getPanelProps(panelInfo) {
|
|
57455
57457
|
const state = this.computeState(panelInfo);
|
|
57456
57458
|
if (state.isOpen) {
|
|
57459
|
+
panelInfo.currentPanelProps = state.props ?? panelInfo.currentPanelProps;
|
|
57457
57460
|
return state.props ?? {};
|
|
57458
57461
|
}
|
|
57459
57462
|
return {};
|
|
@@ -57465,11 +57468,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57465
57468
|
}
|
|
57466
57469
|
return undefined;
|
|
57467
57470
|
}
|
|
57468
|
-
open(componentTag,
|
|
57471
|
+
open(componentTag, currentPanelProps = {}) {
|
|
57469
57472
|
if (this.screenWidthStore.isSmall) {
|
|
57470
57473
|
return;
|
|
57471
57474
|
}
|
|
57472
|
-
const newPanelInfo = {
|
|
57475
|
+
const newPanelInfo = { currentPanelProps, componentTag, size: DEFAULT_SIDE_PANEL_SIZE };
|
|
57473
57476
|
const state = this.computeState(newPanelInfo);
|
|
57474
57477
|
if (!state.isOpen) {
|
|
57475
57478
|
return;
|
|
@@ -57493,8 +57496,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57493
57496
|
}
|
|
57494
57497
|
this._openPanel("secondaryPanel", newPanelInfo, state);
|
|
57495
57498
|
}
|
|
57496
|
-
replace(componentTag, currentPanelKey,
|
|
57497
|
-
const newPanelInfo = {
|
|
57499
|
+
replace(componentTag, currentPanelKey, currentPanelProps = {}) {
|
|
57500
|
+
const newPanelInfo = { currentPanelProps, componentTag, size: DEFAULT_SIDE_PANEL_SIZE };
|
|
57498
57501
|
const state = this.computeState(newPanelInfo);
|
|
57499
57502
|
if (!state.isOpen) {
|
|
57500
57503
|
return;
|
|
@@ -57524,10 +57527,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57524
57527
|
_openPanel(panel, newPanel, state) {
|
|
57525
57528
|
const currentPanel = this[panel];
|
|
57526
57529
|
if (currentPanel && newPanel.componentTag !== currentPanel.componentTag) {
|
|
57527
|
-
currentPanel.
|
|
57530
|
+
currentPanel.currentPanelProps?.onCloseSidePanel?.();
|
|
57528
57531
|
}
|
|
57529
57532
|
this[panel] = {
|
|
57530
|
-
|
|
57533
|
+
currentPanelProps: state.props ?? {},
|
|
57531
57534
|
componentTag: newPanel.componentTag,
|
|
57532
57535
|
size: currentPanel?.size || DEFAULT_SIDE_PANEL_SIZE,
|
|
57533
57536
|
isCollapsed: currentPanel?.isCollapsed || false,
|
|
@@ -57549,16 +57552,16 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57549
57552
|
close() {
|
|
57550
57553
|
if (this.mainPanel?.isPinned) {
|
|
57551
57554
|
if (this.secondaryPanel) {
|
|
57552
|
-
this.secondaryPanel.
|
|
57555
|
+
this.secondaryPanel.currentPanelProps.onCloseSidePanel?.();
|
|
57553
57556
|
this.secondaryPanel = undefined;
|
|
57554
57557
|
}
|
|
57555
57558
|
return;
|
|
57556
57559
|
}
|
|
57557
|
-
this.mainPanel?.
|
|
57560
|
+
this.mainPanel?.currentPanelProps.onCloseSidePanel?.();
|
|
57558
57561
|
this.mainPanel = undefined;
|
|
57559
57562
|
}
|
|
57560
57563
|
closeMainPanel() {
|
|
57561
|
-
this.mainPanel?.
|
|
57564
|
+
this.mainPanel?.currentPanelProps.onCloseSidePanel?.();
|
|
57562
57565
|
this.mainPanel = this.secondaryPanel || undefined;
|
|
57563
57566
|
this.secondaryPanel = undefined;
|
|
57564
57567
|
}
|
|
@@ -57590,7 +57593,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57590
57593
|
}
|
|
57591
57594
|
this.mainPanel.isPinned = !this.mainPanel.isPinned;
|
|
57592
57595
|
if (!this.mainPanel.isPinned && this.secondaryPanel) {
|
|
57593
|
-
this.secondaryPanel?.
|
|
57596
|
+
this.secondaryPanel?.currentPanelProps.onCloseSidePanel?.();
|
|
57594
57597
|
this.mainPanel = this.secondaryPanel;
|
|
57595
57598
|
this.secondaryPanel = undefined;
|
|
57596
57599
|
}
|
|
@@ -57609,7 +57612,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57609
57612
|
panelInfo.size = COLLAPSED_SIDE_PANEL_SIZE;
|
|
57610
57613
|
}
|
|
57611
57614
|
}
|
|
57612
|
-
computeState({ componentTag, initialPanelProps }) {
|
|
57615
|
+
computeState({ componentTag, currentPanelProps: initialPanelProps, }) {
|
|
57613
57616
|
const customComputeState = sidePanelRegistry.get(componentTag).computeState;
|
|
57614
57617
|
const state = customComputeState
|
|
57615
57618
|
? customComputeState(this.getters, initialPanelProps)
|
|
@@ -57619,7 +57622,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57619
57622
|
changeSpreadsheetWidth(width) {
|
|
57620
57623
|
this.availableWidth = width - MIN_SHEET_VIEW_WIDTH;
|
|
57621
57624
|
if (this.secondaryPanel && width - this.totalPanelSize < MIN_SHEET_VIEW_WIDTH) {
|
|
57622
|
-
this.secondaryPanel?.
|
|
57625
|
+
this.secondaryPanel?.currentPanelProps.onCloseSidePanel?.();
|
|
57623
57626
|
this.secondaryPanel = undefined;
|
|
57624
57627
|
}
|
|
57625
57628
|
if (this.mainPanel && width - this.totalPanelSize < MIN_SHEET_VIEW_WIDTH) {
|
|
@@ -57779,6 +57782,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57779
57782
|
useTouchScroll(this.gridRef, this.moveCanvas.bind(this), () => {
|
|
57780
57783
|
const { scrollY } = this.env.model.getters.getActiveSheetScrollInfo();
|
|
57781
57784
|
return scrollY > 0;
|
|
57785
|
+
}, () => {
|
|
57786
|
+
const { maxOffsetY } = this.env.model.getters.getMaximumSheetOffset();
|
|
57787
|
+
const { scrollY } = this.env.model.getters.getActiveSheetScrollInfo();
|
|
57788
|
+
return scrollY < maxOffsetY;
|
|
57782
57789
|
});
|
|
57783
57790
|
}
|
|
57784
57791
|
get highlights() {
|
|
@@ -75000,6 +75007,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
75000
75007
|
"getFigureUI",
|
|
75001
75008
|
"getPositionAnchorOffset",
|
|
75002
75009
|
"getGridOffset",
|
|
75010
|
+
"getMaximumSheetOffset",
|
|
75003
75011
|
];
|
|
75004
75012
|
viewports = {};
|
|
75005
75013
|
/**
|
|
@@ -78090,6 +78098,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
78090
78098
|
useTouchScroll(this.gridRef, this.moveCanvas.bind(this), () => {
|
|
78091
78099
|
const { scrollY } = this.env.model.getters.getActiveSheetScrollInfo();
|
|
78092
78100
|
return scrollY > 0;
|
|
78101
|
+
}, () => {
|
|
78102
|
+
const { maxOffsetY } = this.env.model.getters.getMaximumSheetOffset();
|
|
78103
|
+
const { scrollY } = this.env.model.getters.getActiveSheetScrollInfo();
|
|
78104
|
+
return scrollY < maxOffsetY;
|
|
78093
78105
|
});
|
|
78094
78106
|
}
|
|
78095
78107
|
get gridContainer() {
|
|
@@ -80133,7 +80145,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
80133
80145
|
border-radius: 4px;
|
|
80134
80146
|
font-weight: 500;
|
|
80135
80147
|
font-size: 14px;
|
|
80136
|
-
height: 32px;
|
|
80148
|
+
min-height: 32px;
|
|
80137
80149
|
line-height: 16px;
|
|
80138
80150
|
flex-grow: 1;
|
|
80139
80151
|
background-color: ${BUTTON_BG};
|
|
@@ -84937,9 +84949,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
84937
84949
|
exports.tokenize = tokenize;
|
|
84938
84950
|
|
|
84939
84951
|
|
|
84940
|
-
__info__.version = "18.4.
|
|
84941
|
-
__info__.date = "2025-11-
|
|
84942
|
-
__info__.hash = "
|
|
84952
|
+
__info__.version = "18.4.18";
|
|
84953
|
+
__info__.date = "2025-11-24T07:42:07.821Z";
|
|
84954
|
+
__info__.hash = "4f83667";
|
|
84943
84955
|
|
|
84944
84956
|
|
|
84945
84957
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|