@odoo/o-spreadsheet 18.3.25 → 18.3.27
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 +56 -35
- package/dist/o-spreadsheet.d.ts +1 -1
- package/dist/o-spreadsheet.esm.js +56 -35
- package/dist/o-spreadsheet.iife.js +56 -35
- package/dist/o-spreadsheet.iife.min.js +379 -379
- package/dist/o_spreadsheet.xml +7 -6
- package/package.json +2 -2
|
@@ -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-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.3.27
|
|
6
|
+
* @date 2025-11-24T07:40:29.469Z
|
|
7
|
+
* @hash 57b11b8
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -6285,7 +6285,7 @@
|
|
|
6285
6285
|
let sheetName = "";
|
|
6286
6286
|
if (prefixSheet) {
|
|
6287
6287
|
if (range.invalidSheetName) {
|
|
6288
|
-
sheetName = range.invalidSheetName;
|
|
6288
|
+
sheetName = getCanonicalSymbolName(range.invalidSheetName);
|
|
6289
6289
|
}
|
|
6290
6290
|
else {
|
|
6291
6291
|
sheetName = getCanonicalSymbolName(getSheetName(range.sheetId));
|
|
@@ -17852,28 +17852,38 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
17852
17852
|
return xc;
|
|
17853
17853
|
}
|
|
17854
17854
|
/**
|
|
17855
|
-
* Returns the given XC with the given reference type.
|
|
17855
|
+
* Returns the given XC with the given reference type.
|
|
17856
17856
|
*/
|
|
17857
17857
|
function setXcToFixedReferenceType(xc, referenceType) {
|
|
17858
|
-
|
|
17859
|
-
|
|
17860
|
-
|
|
17858
|
+
let sheetName;
|
|
17859
|
+
({ sheetName, xc } = splitReference(xc));
|
|
17860
|
+
sheetName = sheetName ? sheetName + "!" : "";
|
|
17861
17861
|
xc = xc.replace(/\$/g, "");
|
|
17862
|
-
|
|
17862
|
+
const splitIndex = xc.indexOf(":");
|
|
17863
|
+
if (splitIndex >= 0) {
|
|
17864
|
+
return `${sheetName}${_setXcToFixedReferenceType(xc.slice(0, splitIndex), referenceType)}:${_setXcToFixedReferenceType(xc.slice(splitIndex + 1), referenceType)}`;
|
|
17865
|
+
}
|
|
17866
|
+
else {
|
|
17867
|
+
return sheetName + _setXcToFixedReferenceType(xc, referenceType);
|
|
17868
|
+
}
|
|
17869
|
+
}
|
|
17870
|
+
function _setXcToFixedReferenceType(xc, referenceType) {
|
|
17871
|
+
const indexOfNumber = xc.search(/[0-9]/);
|
|
17872
|
+
const hasCol = indexOfNumber !== 0;
|
|
17873
|
+
const hasRow = indexOfNumber >= 0;
|
|
17863
17874
|
switch (referenceType) {
|
|
17864
17875
|
case "col":
|
|
17876
|
+
if (!hasCol)
|
|
17877
|
+
return xc;
|
|
17865
17878
|
return "$" + xc;
|
|
17866
17879
|
case "row":
|
|
17867
|
-
|
|
17880
|
+
if (!hasRow)
|
|
17881
|
+
return xc;
|
|
17868
17882
|
return xc.slice(0, indexOfNumber) + "$" + xc.slice(indexOfNumber);
|
|
17869
17883
|
case "colrow":
|
|
17870
|
-
|
|
17871
|
-
if (indexOfNumber === -1 || indexOfNumber === 0) {
|
|
17872
|
-
// no row number (eg. A) or no column (eg. 1)
|
|
17884
|
+
if (!hasRow || !hasCol)
|
|
17873
17885
|
return "$" + xc;
|
|
17874
|
-
|
|
17875
|
-
xc = xc.slice(0, indexOfNumber) + "$" + xc.slice(indexOfNumber);
|
|
17876
|
-
return "$" + xc;
|
|
17886
|
+
return "$" + xc.slice(0, indexOfNumber) + "$" + xc.slice(indexOfNumber);
|
|
17877
17887
|
case "none":
|
|
17878
17888
|
return xc;
|
|
17879
17889
|
}
|
|
@@ -22226,7 +22236,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
22226
22236
|
return {
|
|
22227
22237
|
background: context.background,
|
|
22228
22238
|
type: "scorecard",
|
|
22229
|
-
keyValue: context.range
|
|
22239
|
+
keyValue: context.range?.[0]?.dataRange,
|
|
22230
22240
|
title: context.title || { text: "" },
|
|
22231
22241
|
baselineMode: DEFAULT_SCORECARD_BASELINE_MODE,
|
|
22232
22242
|
baselineColorUp: DEFAULT_SCORECARD_BASELINE_COLOR_UP,
|
|
@@ -22946,6 +22956,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
22946
22956
|
this.highlightStore.register(this);
|
|
22947
22957
|
this.onDispose(() => {
|
|
22948
22958
|
this.highlightStore.unRegister(this);
|
|
22959
|
+
this._cancelEdition();
|
|
22949
22960
|
});
|
|
22950
22961
|
}
|
|
22951
22962
|
handleEvent(event) {
|
|
@@ -22979,6 +22990,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
22979
22990
|
}
|
|
22980
22991
|
this.selectionStart = start;
|
|
22981
22992
|
this.selectionEnd = end;
|
|
22993
|
+
this.editionMode = "editing";
|
|
22982
22994
|
this.computeFormulaCursorContext();
|
|
22983
22995
|
this.computeParenthesisRelatedToCursor();
|
|
22984
22996
|
}
|
|
@@ -23716,7 +23728,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
23716
23728
|
// replace the whole token
|
|
23717
23729
|
start = tokenAtCursor.start;
|
|
23718
23730
|
}
|
|
23719
|
-
this.composer.stopComposerRangeSelection();
|
|
23720
23731
|
this.composer.changeComposerCursorSelection(start, end);
|
|
23721
23732
|
this.composer.replaceComposerCursorSelection(value);
|
|
23722
23733
|
}
|
|
@@ -23734,7 +23745,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
23734
23745
|
// replace the whole token
|
|
23735
23746
|
start = tokenAtCursor.start;
|
|
23736
23747
|
}
|
|
23737
|
-
this.composer.stopComposerRangeSelection();
|
|
23738
23748
|
this.composer.changeComposerCursorSelection(start, end);
|
|
23739
23749
|
this.composer.replaceComposerCursorSelection(value);
|
|
23740
23750
|
}
|
|
@@ -27577,7 +27587,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
27577
27587
|
background: context.background,
|
|
27578
27588
|
title: context.title || { text: "" },
|
|
27579
27589
|
type: "gauge",
|
|
27580
|
-
dataRange: context.range
|
|
27590
|
+
dataRange: context.range?.[0]?.dataRange,
|
|
27581
27591
|
sectionRule: {
|
|
27582
27592
|
colors: {
|
|
27583
27593
|
lowerColor: DEFAULT_GAUGE_LOWER_COLOR,
|
|
@@ -43875,7 +43885,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
43875
43885
|
return;
|
|
43876
43886
|
}
|
|
43877
43887
|
const newSelection = this.contentHelper.getCurrentSelection();
|
|
43878
|
-
this.props.composerStore.stopComposerRangeSelection();
|
|
43879
43888
|
this.props.onComposerContentFocused();
|
|
43880
43889
|
this.props.composerStore.changeComposerCursorSelection(newSelection.start, newSelection.end);
|
|
43881
43890
|
this.processTokenAtCursor();
|
|
@@ -46969,6 +46978,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
46969
46978
|
placeholder: this.placeholder,
|
|
46970
46979
|
class: "o-sidePanel-composer",
|
|
46971
46980
|
defaultRangeSheetId: this.env.model.getters.getActiveSheetId(),
|
|
46981
|
+
defaultStatic: true,
|
|
46972
46982
|
};
|
|
46973
46983
|
}
|
|
46974
46984
|
get errorMessage() {
|
|
@@ -54334,7 +54344,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
54334
54344
|
this.state.waitingForMove = false;
|
|
54335
54345
|
}
|
|
54336
54346
|
onMouseMove(ev) {
|
|
54337
|
-
if (this.
|
|
54347
|
+
if (this.env.model.getters.isReadonly() ||
|
|
54348
|
+
this.state.isResizing ||
|
|
54349
|
+
this.state.isMoving ||
|
|
54350
|
+
this.state.isSelecting) {
|
|
54338
54351
|
return;
|
|
54339
54352
|
}
|
|
54340
54353
|
this._computeHandleDisplay(ev);
|
|
@@ -54387,6 +54400,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
54387
54400
|
if (index < 0) {
|
|
54388
54401
|
return;
|
|
54389
54402
|
}
|
|
54403
|
+
if (this.env.model.getters.isReadonly()) {
|
|
54404
|
+
this._selectElement(index, false);
|
|
54405
|
+
return;
|
|
54406
|
+
}
|
|
54390
54407
|
if (this.state.waitingForMove) {
|
|
54391
54408
|
if (!this.env.model.getters.isGridSelectionActive()) {
|
|
54392
54409
|
this._selectElement(index, false);
|
|
@@ -56093,24 +56110,24 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
56093
56110
|
const MIN_SHEET_VIEW_WIDTH = 150;
|
|
56094
56111
|
class SidePanelStore extends SpreadsheetStore {
|
|
56095
56112
|
mutators = ["open", "toggle", "close", "changePanelSize", "resetPanelSize"];
|
|
56096
|
-
|
|
56113
|
+
currentPanelProps = {};
|
|
56097
56114
|
componentTag = "";
|
|
56098
56115
|
panelSize = DEFAULT_SIDE_PANEL_SIZE;
|
|
56099
56116
|
get isOpen() {
|
|
56100
56117
|
if (!this.componentTag) {
|
|
56101
56118
|
return false;
|
|
56102
56119
|
}
|
|
56103
|
-
return this.computeState(this.componentTag, this.
|
|
56120
|
+
return this.computeState(this.componentTag, this.currentPanelProps).isOpen;
|
|
56104
56121
|
}
|
|
56105
56122
|
get panelProps() {
|
|
56106
|
-
const state = this.computeState(this.componentTag, this.
|
|
56123
|
+
const state = this.computeState(this.componentTag, this.currentPanelProps);
|
|
56107
56124
|
if (state.isOpen) {
|
|
56108
56125
|
return state.props ?? {};
|
|
56109
56126
|
}
|
|
56110
56127
|
return {};
|
|
56111
56128
|
}
|
|
56112
56129
|
get panelKey() {
|
|
56113
|
-
const state = this.computeState(this.componentTag, this.
|
|
56130
|
+
const state = this.computeState(this.componentTag, this.currentPanelProps);
|
|
56114
56131
|
if (state.isOpen) {
|
|
56115
56132
|
return state.key;
|
|
56116
56133
|
}
|
|
@@ -56122,10 +56139,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
56122
56139
|
return;
|
|
56123
56140
|
}
|
|
56124
56141
|
if (this.isOpen && componentTag !== this.componentTag) {
|
|
56125
|
-
this.
|
|
56142
|
+
this.currentPanelProps?.onCloseSidePanel?.();
|
|
56126
56143
|
}
|
|
56127
56144
|
this.componentTag = componentTag;
|
|
56128
|
-
this.
|
|
56145
|
+
this.currentPanelProps = state.props ?? {};
|
|
56129
56146
|
}
|
|
56130
56147
|
toggle(componentTag, panelProps) {
|
|
56131
56148
|
if (this.isOpen && componentTag === this.componentTag) {
|
|
@@ -56136,8 +56153,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
56136
56153
|
}
|
|
56137
56154
|
}
|
|
56138
56155
|
close() {
|
|
56139
|
-
this.
|
|
56140
|
-
this.
|
|
56156
|
+
this.currentPanelProps.onCloseSidePanel?.();
|
|
56157
|
+
this.currentPanelProps = {};
|
|
56141
56158
|
this.componentTag = "";
|
|
56142
56159
|
}
|
|
56143
56160
|
changePanelSize(size, spreadsheetElWidth) {
|
|
@@ -56163,7 +56180,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
56163
56180
|
};
|
|
56164
56181
|
}
|
|
56165
56182
|
else {
|
|
56166
|
-
|
|
56183
|
+
const state = customComputeState(this.getters, panelProps);
|
|
56184
|
+
if (state.isOpen) {
|
|
56185
|
+
this.currentPanelProps = state.props ?? this.currentPanelProps;
|
|
56186
|
+
}
|
|
56187
|
+
return state;
|
|
56167
56188
|
}
|
|
56168
56189
|
}
|
|
56169
56190
|
}
|
|
@@ -76331,7 +76352,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
76331
76352
|
border-radius: 4px;
|
|
76332
76353
|
font-weight: 500;
|
|
76333
76354
|
font-size: 14px;
|
|
76334
|
-
height: 32px;
|
|
76355
|
+
min-height: 32px;
|
|
76335
76356
|
line-height: 16px;
|
|
76336
76357
|
flex-grow: 1;
|
|
76337
76358
|
background-color: ${BUTTON_BG};
|
|
@@ -81056,9 +81077,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
81056
81077
|
exports.tokenize = tokenize;
|
|
81057
81078
|
|
|
81058
81079
|
|
|
81059
|
-
__info__.version = "18.3.
|
|
81060
|
-
__info__.date = "2025-
|
|
81061
|
-
__info__.hash = "
|
|
81080
|
+
__info__.version = "18.3.27";
|
|
81081
|
+
__info__.date = "2025-11-24T07:40:29.469Z";
|
|
81082
|
+
__info__.hash = "57b11b8";
|
|
81062
81083
|
|
|
81063
81084
|
|
|
81064
81085
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|