@odoo/o-spreadsheet 18.3.50 → 18.3.54
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.css +3 -3
- package/dist/o_spreadsheet.esm.js +125 -110
- package/dist/o_spreadsheet.iife.js +125 -110
- package/dist/o_spreadsheet.iife.min.js +224 -224
- package/dist/o_spreadsheet.xml +4 -4
- package/package.json +7 -2
- package/dist/o_spreadsheet.cjs.js +0 -72459
|
@@ -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 2026-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.3.54
|
|
6
|
+
* @date 2026-07-01T05:01:44.424Z
|
|
7
|
+
* @hash d00e4b6
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function(exports, _odoo_owl) {
|
|
@@ -189,7 +189,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
189
189
|
const GRAY_200 = "#E7E9ED";
|
|
190
190
|
const GRAY_100 = "#F9FAFB";
|
|
191
191
|
const TEXT_BODY = "#374151";
|
|
192
|
-
const TEXT_BODY_MUTED =
|
|
192
|
+
const TEXT_BODY_MUTED = "#374151C2";
|
|
193
193
|
const TEXT_HEADING = "#111827";
|
|
194
194
|
const PRIMARY_BUTTON_BG = "#714B67";
|
|
195
195
|
const PRIMARY_BUTTON_HOVER_BG = "#624159";
|
|
@@ -296,9 +296,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
296
296
|
];
|
|
297
297
|
const DEFAULT_CELL_HEIGHT = 23;
|
|
298
298
|
const FOOTER_HEIGHT = 2 * 23;
|
|
299
|
-
const MENU_SEPARATOR_BORDER_WIDTH = 1;
|
|
300
|
-
const MENU_SEPARATOR_PADDING = 5;
|
|
301
|
-
const MENU_SEPARATOR_HEIGHT = 1 + 2 * 5;
|
|
302
299
|
const DEFAULT_STYLE = {
|
|
303
300
|
align: "left",
|
|
304
301
|
verticalAlign: "bottom",
|
|
@@ -318,7 +315,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
318
315
|
const DEFAULT_VERTICAL_ALIGN = DEFAULT_STYLE.verticalAlign;
|
|
319
316
|
const DEFAULT_WRAPPING_MODE = DEFAULT_STYLE.wrapping;
|
|
320
317
|
const DEFAULT_FONT_SIZE = DEFAULT_STYLE.fontSize;
|
|
321
|
-
const DEFAULT_FONT = "'Roboto', arial";
|
|
318
|
+
const DEFAULT_FONT = "'Roboto', arial, 'Liberation Sans'";
|
|
322
319
|
const DEFAULT_BORDER_DESC = {
|
|
323
320
|
style: "thin",
|
|
324
321
|
color: "#000000"
|
|
@@ -1638,7 +1635,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1638
1635
|
function recomputeZones(zones, zonesToRemove = []) {
|
|
1639
1636
|
if (zones.length <= 1 && zonesToRemove.length === 0) return zones;
|
|
1640
1637
|
const profilesStartingPosition = [0];
|
|
1641
|
-
const profiles = new Map([[0, []]]);
|
|
1638
|
+
const profiles = /* @__PURE__ */ new Map([[0, []]]);
|
|
1642
1639
|
modifyProfiles(profilesStartingPosition, profiles, zones, false);
|
|
1643
1640
|
modifyProfiles(profilesStartingPosition, profiles, zonesToRemove, true);
|
|
1644
1641
|
return constructZonesFromProfiles(profilesStartingPosition, profiles);
|
|
@@ -2848,12 +2845,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2848
2845
|
const pIntegerAndDecimals = `(?:\\d+(?:${escapeRegExp(locale.thousandsSeparator || "")}\\d{3,})*(?:${decimalSeparator}\\d*)?)`;
|
|
2849
2846
|
const pOnlyDecimals = `(?:${decimalSeparator}\\d+)`;
|
|
2850
2847
|
const pNumber = "(?:\\s*" + pIntegerAndDecimals + "|" + pOnlyDecimals + ")(?:e(?:\\+|-)?\\d+)?(?:\\s*%)?";
|
|
2851
|
-
const pMinus = "(?:\\s*-)?";
|
|
2852
|
-
const pCurrencyFormat = "(?:\\s*[\\$€])?";
|
|
2853
2848
|
const pNumberExp = "^(?:(?:" + [
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2849
|
+
"(?:\\s*-)?(?:\\s*[\\$€])?" + pNumber,
|
|
2850
|
+
"(?:\\s*-)?" + pNumber + "(?:\\s*[\\$€])?",
|
|
2851
|
+
"(?:\\s*[\\$€])?(?:\\s*-)?" + pNumber
|
|
2857
2852
|
].join(")|(?:") + "))$";
|
|
2858
2853
|
return new RegExp(pNumberExp, "i");
|
|
2859
2854
|
});
|
|
@@ -2968,7 +2963,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2968
2963
|
function isZoneDependent(cmd) {
|
|
2969
2964
|
return "sheetId" in cmd && "zone" in cmd;
|
|
2970
2965
|
}
|
|
2971
|
-
const invalidateEvaluationCommands = new Set([
|
|
2966
|
+
const invalidateEvaluationCommands = /* @__PURE__ */ new Set([
|
|
2972
2967
|
"RENAME_SHEET",
|
|
2973
2968
|
"DELETE_SHEET",
|
|
2974
2969
|
"CREATE_SHEET",
|
|
@@ -2987,7 +2982,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2987
2982
|
"REMOVE_PIVOT",
|
|
2988
2983
|
"DUPLICATE_PIVOT"
|
|
2989
2984
|
]);
|
|
2990
|
-
const invalidateChartEvaluationCommands = new Set([
|
|
2985
|
+
const invalidateChartEvaluationCommands = /* @__PURE__ */ new Set([
|
|
2991
2986
|
"EVALUATE_CELLS",
|
|
2992
2987
|
"EVALUATE_CHARTS",
|
|
2993
2988
|
"UPDATE_CELL",
|
|
@@ -3006,20 +3001,20 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
3006
3001
|
"UNDO",
|
|
3007
3002
|
"REDO"
|
|
3008
3003
|
]);
|
|
3009
|
-
const invalidateDependenciesCommands = new Set(["MOVE_RANGES"]);
|
|
3010
|
-
const invalidateCFEvaluationCommands = new Set([
|
|
3004
|
+
const invalidateDependenciesCommands = /* @__PURE__ */ new Set(["MOVE_RANGES"]);
|
|
3005
|
+
const invalidateCFEvaluationCommands = /* @__PURE__ */ new Set([
|
|
3011
3006
|
"EVALUATE_CELLS",
|
|
3012
3007
|
"ADD_CONDITIONAL_FORMAT",
|
|
3013
3008
|
"REMOVE_CONDITIONAL_FORMAT",
|
|
3014
3009
|
"CHANGE_CONDITIONAL_FORMAT_PRIORITY"
|
|
3015
3010
|
]);
|
|
3016
|
-
const invalidateBordersCommands = new Set([
|
|
3011
|
+
const invalidateBordersCommands = /* @__PURE__ */ new Set([
|
|
3017
3012
|
"AUTOFILL_CELL",
|
|
3018
3013
|
"SET_BORDER",
|
|
3019
3014
|
"SET_ZONE_BORDERS",
|
|
3020
3015
|
"SET_BORDERS_ON_TARGET"
|
|
3021
3016
|
]);
|
|
3022
|
-
const readonlyAllowedCommands = new Set([
|
|
3017
|
+
const readonlyAllowedCommands = /* @__PURE__ */ new Set([
|
|
3023
3018
|
"START",
|
|
3024
3019
|
"ACTIVATE_SHEET",
|
|
3025
3020
|
"COPY",
|
|
@@ -3030,7 +3025,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
3030
3025
|
"SET_FORMULA_VISIBILITY",
|
|
3031
3026
|
"UPDATE_FILTER"
|
|
3032
3027
|
]);
|
|
3033
|
-
const coreTypes = new Set([
|
|
3028
|
+
const coreTypes = /* @__PURE__ */ new Set([
|
|
3034
3029
|
"UPDATE_CELL",
|
|
3035
3030
|
"UPDATE_CELL_POSITION",
|
|
3036
3031
|
"CLEAR_CELL",
|
|
@@ -5132,7 +5127,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5132
5127
|
//#region src/helpers/edge_scrolling.ts
|
|
5133
5128
|
const MAX_DELAY = 140;
|
|
5134
5129
|
const MIN_DELAY = 20;
|
|
5135
|
-
const ACCELERATION = .035;
|
|
5136
5130
|
/**
|
|
5137
5131
|
* Decreasing exponential function used to determine the "speed" of edge-scrolling
|
|
5138
5132
|
* as the timeout delay.
|
|
@@ -5140,7 +5134,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5140
5134
|
* Returns a timeout delay in milliseconds.
|
|
5141
5135
|
*/
|
|
5142
5136
|
function scrollDelay(value) {
|
|
5143
|
-
return 20 + (140 - 20) * Math.exp(
|
|
5137
|
+
return 20 + (140 - 20) * Math.exp(-.035 * (value - 1));
|
|
5144
5138
|
}
|
|
5145
5139
|
|
|
5146
5140
|
//#endregion
|
|
@@ -6013,7 +6007,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
6013
6007
|
smallUuid() {
|
|
6014
6008
|
if (window.crypto) return "10000000-1000".replace(/[01]/g, (c) => {
|
|
6015
6009
|
const n = Number(c);
|
|
6016
|
-
return (n ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
6010
|
+
return (n ^ crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
6017
6011
|
});
|
|
6018
6012
|
else return "xxxxxxxx-xxxx".replace(/[xy]/g, function(c) {
|
|
6019
6013
|
const r = Math.random() * 16 | 0;
|
|
@@ -6027,7 +6021,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
6027
6021
|
uuidv4() {
|
|
6028
6022
|
if (window.crypto) return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => {
|
|
6029
6023
|
const n = Number(c);
|
|
6030
|
-
return (n ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
6024
|
+
return (n ^ crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
6031
6025
|
});
|
|
6032
6026
|
else return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
|
|
6033
6027
|
const r = Math.random() * 16 | 0;
|
|
@@ -7619,10 +7613,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
7619
7613
|
type: dimension.type
|
|
7620
7614
|
}));
|
|
7621
7615
|
if (groupValueString.toLowerCase() === "false") return false;
|
|
7622
|
-
return pivotNormalizationValueRegistry.get(dimension.type)(groupValueString, dimension
|
|
7616
|
+
return pivotNormalizationValueRegistry.get(dimension.type)(groupValueString, dimension);
|
|
7623
7617
|
}
|
|
7624
|
-
function normalizeDateTime(value,
|
|
7625
|
-
return pivotTimeAdapter(granularity ?? "month").normalizeFunctionValue(value);
|
|
7618
|
+
function normalizeDateTime(value, dimension) {
|
|
7619
|
+
return pivotTimeAdapter(dimension.granularity ?? "month").normalizeFunctionValue(value);
|
|
7626
7620
|
}
|
|
7627
7621
|
function toFunctionPivotValue(value, dimension) {
|
|
7628
7622
|
if (value === null) return `"null"`;
|
|
@@ -32262,17 +32256,16 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
32262
32256
|
|
|
32263
32257
|
//#endregion
|
|
32264
32258
|
//#region src/components/link/link_editor/link_editor.ts
|
|
32265
|
-
const PADDING = 12;
|
|
32266
32259
|
css`
|
|
32267
32260
|
.o-link-editor {
|
|
32268
32261
|
font-size: 13px;
|
|
32269
32262
|
background-color: white;
|
|
32270
32263
|
box-shadow: 0 1px 4px 3px rgba(60, 64, 67, 0.15);
|
|
32271
|
-
padding: ${
|
|
32264
|
+
padding: ${12}px;
|
|
32272
32265
|
display: flex;
|
|
32273
32266
|
flex-direction: column;
|
|
32274
32267
|
border-radius: 4px;
|
|
32275
|
-
width: ${
|
|
32268
|
+
width: ${364}px;
|
|
32276
32269
|
|
|
32277
32270
|
.o-section {
|
|
32278
32271
|
.o-section-title {
|
|
@@ -36426,11 +36419,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
36426
36419
|
const LINE_VERTICAL_PADDING = 1;
|
|
36427
36420
|
const PICKER_PADDING = 8;
|
|
36428
36421
|
const ITEM_BORDER_WIDTH = 1;
|
|
36429
|
-
const ITEM_EDGE_LENGTH = 18;
|
|
36430
36422
|
const ITEMS_PER_LINE = 10;
|
|
36431
36423
|
const MAGNIFIER_EDGE = 16;
|
|
36432
36424
|
const ITEM_GAP = 2;
|
|
36433
|
-
const CONTENT_WIDTH =
|
|
36425
|
+
const CONTENT_WIDTH = 218;
|
|
36434
36426
|
const INNER_GRADIENT_WIDTH = CONTENT_WIDTH - 2 * ITEM_BORDER_WIDTH;
|
|
36435
36427
|
const INNER_GRADIENT_HEIGHT = CONTENT_WIDTH - 30 - 2 * ITEM_BORDER_WIDTH;
|
|
36436
36428
|
css`
|
|
@@ -36442,7 +36434,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
36442
36434
|
line-height: 1.2;
|
|
36443
36435
|
overflow-y: auto;
|
|
36444
36436
|
overflow-x: hidden;
|
|
36445
|
-
width: ${
|
|
36437
|
+
width: ${234}px;
|
|
36446
36438
|
|
|
36447
36439
|
.o-color-picker-section-name {
|
|
36448
36440
|
margin: 0px ${ITEM_BORDER_WIDTH}px;
|
|
@@ -36468,8 +36460,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
36468
36460
|
}
|
|
36469
36461
|
}
|
|
36470
36462
|
.o-color-picker-line-item {
|
|
36471
|
-
width: ${
|
|
36472
|
-
height: ${
|
|
36463
|
+
width: ${20}px;
|
|
36464
|
+
height: ${20}px;
|
|
36473
36465
|
margin: 0px;
|
|
36474
36466
|
border-radius: 50px;
|
|
36475
36467
|
border: ${ITEM_BORDER_WIDTH}px solid #666666;
|
|
@@ -36513,13 +36505,13 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
36513
36505
|
}
|
|
36514
36506
|
|
|
36515
36507
|
.o-custom-selector {
|
|
36516
|
-
padding: ${
|
|
36508
|
+
padding: ${10}px ${PICKER_PADDING}px;
|
|
36517
36509
|
position: relative;
|
|
36518
36510
|
.o-gradient {
|
|
36519
36511
|
margin-bottom: ${MAGNIFIER_EDGE / 2}px;
|
|
36520
36512
|
border: ${ITEM_BORDER_WIDTH}px solid #c0c0c0;
|
|
36521
|
-
width: ${
|
|
36522
|
-
height: ${
|
|
36513
|
+
width: ${218}px;
|
|
36514
|
+
height: ${188}px;
|
|
36523
36515
|
position: relative;
|
|
36524
36516
|
}
|
|
36525
36517
|
|
|
@@ -36657,8 +36649,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
36657
36649
|
const left = Math.round(INNER_GRADIENT_WIDTH * clip(s / 100, 0, 1));
|
|
36658
36650
|
const top = Math.round(INNER_GRADIENT_HEIGHT * clip(1 - 2 * l / (200 - s), 0, 1));
|
|
36659
36651
|
return cssPropertiesToCss({
|
|
36660
|
-
left: `${-
|
|
36661
|
-
top: `${-
|
|
36652
|
+
left: `${-16 / 2 + left}px`,
|
|
36653
|
+
top: `${-16 / 2 + top}px`,
|
|
36662
36654
|
background: hslaToHex(this.state.currentHslaColor)
|
|
36663
36655
|
});
|
|
36664
36656
|
}
|
|
@@ -42014,9 +42006,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
42014
42006
|
allSheetsMatches = [];
|
|
42015
42007
|
activeSheetMatches = [];
|
|
42016
42008
|
specificRangeMatches = [];
|
|
42009
|
+
selectedMatchPosition = null;
|
|
42017
42010
|
currentSearchRegex = null;
|
|
42018
42011
|
initialShowFormulaState;
|
|
42019
|
-
preserveSelectedMatchIndex = false;
|
|
42020
42012
|
irreplaceableMatchCount = 0;
|
|
42021
42013
|
isSearchDirty = false;
|
|
42022
42014
|
shouldFinalizeUpdateSelection = false;
|
|
@@ -42138,7 +42130,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
42138
42130
|
*/
|
|
42139
42131
|
_updateSearch(toSearch, searchOptions) {
|
|
42140
42132
|
this.searchOptions = searchOptions;
|
|
42141
|
-
if (toSearch !== this.toSearch)
|
|
42133
|
+
if (toSearch !== this.toSearch) {
|
|
42134
|
+
this.selectedMatchIndex = null;
|
|
42135
|
+
this.selectedMatchPosition = null;
|
|
42136
|
+
}
|
|
42142
42137
|
this.toSearch = toSearch;
|
|
42143
42138
|
this.currentSearchRegex = getSearchRegex(this.toSearch, this.searchOptions);
|
|
42144
42139
|
this.refreshSearch({
|
|
@@ -42150,8 +42145,14 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
42150
42145
|
* refresh the matches according to the current search options
|
|
42151
42146
|
*/
|
|
42152
42147
|
refreshSearch(options) {
|
|
42153
|
-
if (!this.preserveSelectedMatchIndex) this.selectedMatchIndex = null;
|
|
42154
42148
|
this.findMatches();
|
|
42149
|
+
if (this.selectedMatchPosition) if (this.selectedMatchPosition.sheetId !== this.getters.getActiveSheetId()) {
|
|
42150
|
+
this.selectedMatchIndex = null;
|
|
42151
|
+
this.selectedMatchPosition = null;
|
|
42152
|
+
} else {
|
|
42153
|
+
const index = this.searchMatches.findIndex((match) => match.sheetId === this.selectedMatchPosition?.sheetId && match.col === this.selectedMatchPosition?.col && match.row === this.selectedMatchPosition?.row);
|
|
42154
|
+
if (index !== -1) this.selectedMatchIndex = index;
|
|
42155
|
+
}
|
|
42155
42156
|
this.selectNextCell(0, options);
|
|
42156
42157
|
}
|
|
42157
42158
|
getSheetsInSearchOrder() {
|
|
@@ -42219,6 +42220,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
42219
42220
|
const matches = this.searchMatches;
|
|
42220
42221
|
if (!matches.length) {
|
|
42221
42222
|
this.selectedMatchIndex = null;
|
|
42223
|
+
this.selectedMatchPosition = null;
|
|
42222
42224
|
return;
|
|
42223
42225
|
}
|
|
42224
42226
|
let nextIndex;
|
|
@@ -42232,14 +42234,13 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
42232
42234
|
} else nextIndex = this.selectedMatchIndex + indexChange;
|
|
42233
42235
|
nextIndex = (nextIndex + matches.length) % matches.length;
|
|
42234
42236
|
this.selectedMatchIndex = nextIndex;
|
|
42237
|
+
this.selectedMatchPosition = matches[this.selectedMatchIndex];
|
|
42235
42238
|
const selectedMatch = matches[nextIndex];
|
|
42236
42239
|
if (options.jumpToMatchSheet && this.getters.getActiveSheetId() !== selectedMatch.sheetId) {
|
|
42237
|
-
this.preserveSelectedMatchIndex = true;
|
|
42238
42240
|
this.model.dispatch("ACTIVATE_SHEET", {
|
|
42239
42241
|
sheetIdFrom: this.getters.getActiveSheetId(),
|
|
42240
42242
|
sheetIdTo: selectedMatch.sheetId
|
|
42241
42243
|
});
|
|
42242
|
-
this.preserveSelectedMatchIndex = false;
|
|
42243
42244
|
this.isSearchDirty = false;
|
|
42244
42245
|
}
|
|
42245
42246
|
this.model.selection.getBackToDefault();
|
|
@@ -42250,7 +42251,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
42250
42251
|
*/
|
|
42251
42252
|
replace() {
|
|
42252
42253
|
if (this.selectedMatchIndex === null) return;
|
|
42253
|
-
this.preserveSelectedMatchIndex = true;
|
|
42254
42254
|
this.shouldFinalizeUpdateSelection = true;
|
|
42255
42255
|
this.model.dispatch("REPLACE_SEARCH", {
|
|
42256
42256
|
searchString: this.toSearch,
|
|
@@ -42258,7 +42258,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
42258
42258
|
matches: [this.searchMatches[this.selectedMatchIndex]],
|
|
42259
42259
|
searchOptions: this.searchOptions
|
|
42260
42260
|
});
|
|
42261
|
-
this.preserveSelectedMatchIndex = false;
|
|
42262
42261
|
}
|
|
42263
42262
|
/**
|
|
42264
42263
|
* Apply the replace function to all the matches one time.
|
|
@@ -43548,8 +43547,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
43548
43547
|
sortedColumn;
|
|
43549
43548
|
constructor(definition, fields) {
|
|
43550
43549
|
this.measures = definition.measures.map((measure) => createMeasure(fields, measure));
|
|
43551
|
-
this.columns = definition.columns.map((dimension) => createPivotDimension(fields, dimension));
|
|
43552
|
-
this.rows = definition.rows.map((dimension) => createPivotDimension(fields, dimension));
|
|
43550
|
+
this.columns = definition.columns.map((dimension) => this.createPivotDimension(fields, dimension));
|
|
43551
|
+
this.rows = definition.rows.map((dimension) => this.createPivotDimension(fields, dimension));
|
|
43553
43552
|
this.sortedColumn = definition.sortedColumn;
|
|
43554
43553
|
}
|
|
43555
43554
|
getDimension(nameWithGranularity) {
|
|
@@ -43562,6 +43561,40 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
43562
43561
|
if (!measure) throw new EvaluationError(_t("Field %s is not a measure", id));
|
|
43563
43562
|
return measure;
|
|
43564
43563
|
}
|
|
43564
|
+
createPivotDimension(fields, dimension) {
|
|
43565
|
+
const field = fields[dimension.fieldName];
|
|
43566
|
+
const type = field?.type ?? "integer";
|
|
43567
|
+
const granularity = field && isDateOrDatetimeField(field) ? dimension.granularity : void 0;
|
|
43568
|
+
return {
|
|
43569
|
+
/**
|
|
43570
|
+
* Get the display name of the dimension
|
|
43571
|
+
* e.g. "stage_id" -> "Stage", "create_date:month" -> "Create Date"
|
|
43572
|
+
*/
|
|
43573
|
+
displayName: field?.string ?? dimension.fieldName,
|
|
43574
|
+
/**
|
|
43575
|
+
* Get the name of the dimension, as it is stored in the pivot formula
|
|
43576
|
+
* e.g. "stage_id", "create_date:month"
|
|
43577
|
+
*/
|
|
43578
|
+
nameWithGranularity: dimension.fieldName + (granularity ? `:${granularity}` : ""),
|
|
43579
|
+
/**
|
|
43580
|
+
* Get the name of the field of the dimension
|
|
43581
|
+
* e.g. "stage_id" -> "stage_id", "create_date:month" -> "create_date"
|
|
43582
|
+
*/
|
|
43583
|
+
fieldName: dimension.fieldName,
|
|
43584
|
+
/**
|
|
43585
|
+
* Get the aggregate operator of the dimension
|
|
43586
|
+
* e.g. "stage_id" -> undefined, "create_date:month" -> "month"
|
|
43587
|
+
*/
|
|
43588
|
+
granularity,
|
|
43589
|
+
/**
|
|
43590
|
+
* Get the type of the field of the dimension
|
|
43591
|
+
* e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
|
|
43592
|
+
*/
|
|
43593
|
+
type,
|
|
43594
|
+
order: dimension.order,
|
|
43595
|
+
isValid: !!field
|
|
43596
|
+
};
|
|
43597
|
+
}
|
|
43565
43598
|
};
|
|
43566
43599
|
function createMeasure(fields, measure) {
|
|
43567
43600
|
const fieldName = measure.fieldName;
|
|
@@ -43605,40 +43638,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
43605
43638
|
display: measure.display
|
|
43606
43639
|
};
|
|
43607
43640
|
}
|
|
43608
|
-
function createPivotDimension(fields, dimension) {
|
|
43609
|
-
const field = fields[dimension.fieldName];
|
|
43610
|
-
const type = field?.type ?? "integer";
|
|
43611
|
-
const granularity = field && isDateOrDatetimeField(field) ? dimension.granularity : void 0;
|
|
43612
|
-
return {
|
|
43613
|
-
/**
|
|
43614
|
-
* Get the display name of the dimension
|
|
43615
|
-
* e.g. "stage_id" -> "Stage", "create_date:month" -> "Create Date"
|
|
43616
|
-
*/
|
|
43617
|
-
displayName: field?.string ?? dimension.fieldName,
|
|
43618
|
-
/**
|
|
43619
|
-
* Get the name of the dimension, as it is stored in the pivot formula
|
|
43620
|
-
* e.g. "stage_id", "create_date:month"
|
|
43621
|
-
*/
|
|
43622
|
-
nameWithGranularity: dimension.fieldName + (granularity ? `:${granularity}` : ""),
|
|
43623
|
-
/**
|
|
43624
|
-
* Get the name of the field of the dimension
|
|
43625
|
-
* e.g. "stage_id" -> "stage_id", "create_date:month" -> "create_date"
|
|
43626
|
-
*/
|
|
43627
|
-
fieldName: dimension.fieldName,
|
|
43628
|
-
/**
|
|
43629
|
-
* Get the aggregate operator of the dimension
|
|
43630
|
-
* e.g. "stage_id" -> undefined, "create_date:month" -> "month"
|
|
43631
|
-
*/
|
|
43632
|
-
granularity,
|
|
43633
|
-
/**
|
|
43634
|
-
* Get the type of the field of the dimension
|
|
43635
|
-
* e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
|
|
43636
|
-
*/
|
|
43637
|
-
type,
|
|
43638
|
-
order: dimension.order,
|
|
43639
|
-
isValid: !!field
|
|
43640
|
-
};
|
|
43641
|
-
}
|
|
43642
43641
|
|
|
43643
43642
|
//#endregion
|
|
43644
43643
|
//#region src/helpers/pivot/spreadsheet_pivot/runtime_definition_spreadsheet_pivot.ts
|
|
@@ -46333,11 +46332,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
46333
46332
|
getResizerPosition(resizer) {
|
|
46334
46333
|
const anchorCenteringOffset = (ANCHOR_SIZE - ACTIVE_BORDER_WIDTH) / 2;
|
|
46335
46334
|
const style = {};
|
|
46336
|
-
if (resizer.includes("top")) style.top =
|
|
46337
|
-
else if (resizer.includes("bottom")) style.bottom =
|
|
46335
|
+
if (resizer.includes("top")) style.top = `-3px`;
|
|
46336
|
+
else if (resizer.includes("bottom")) style.bottom = `-3px`;
|
|
46338
46337
|
else style.bottom = `calc(50% - ${anchorCenteringOffset}px)`;
|
|
46339
|
-
if (resizer.includes("left")) style.left =
|
|
46340
|
-
else if (resizer.includes("right")) style.right =
|
|
46338
|
+
if (resizer.includes("left")) style.left = `-3px`;
|
|
46339
|
+
else if (resizer.includes("right")) style.right = `-3px`;
|
|
46341
46340
|
else style.right = `calc(50% - ${anchorCenteringOffset}px)`;
|
|
46342
46341
|
return cssPropertiesToCss(style);
|
|
46343
46342
|
}
|
|
@@ -46880,8 +46879,12 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
46880
46879
|
}
|
|
46881
46880
|
stopEdition(direction) {
|
|
46882
46881
|
if (this.canStopEdition()) {
|
|
46882
|
+
const { col, row } = this.currentEditedCell;
|
|
46883
46883
|
this._stopEdition();
|
|
46884
|
-
if (direction)
|
|
46884
|
+
if (direction) {
|
|
46885
|
+
this.model.selection.selectCell(col, row);
|
|
46886
|
+
this.model.selection.moveAnchorCell(direction, 1);
|
|
46887
|
+
}
|
|
46885
46888
|
return;
|
|
46886
46889
|
}
|
|
46887
46890
|
const editedCell = this.currentEditedCell;
|
|
@@ -57616,6 +57619,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57616
57619
|
case "CREATE_CHART":
|
|
57617
57620
|
this.tryToAddColors(this.getChartColors(cmd.figureId));
|
|
57618
57621
|
break;
|
|
57622
|
+
case "COLOR_SHEET":
|
|
57623
|
+
if (cmd.color) this.tryToAddColors([cmd.color]);
|
|
57624
|
+
break;
|
|
57619
57625
|
case "UPDATE_CELL":
|
|
57620
57626
|
case "ADD_CONDITIONAL_FORMAT":
|
|
57621
57627
|
case "SET_BORDER":
|
|
@@ -57638,8 +57644,12 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
57638
57644
|
}
|
|
57639
57645
|
computeCustomColors() {
|
|
57640
57646
|
let usedColors = [];
|
|
57641
|
-
for (const sheetId of this.getters.getSheetIds()) usedColors = usedColors.concat(this.getColorsFromCells(sheetId), this.getFormattingColors(sheetId), this.getTableColors(sheetId));
|
|
57642
|
-
return [
|
|
57647
|
+
for (const sheetId of this.getters.getSheetIds()) usedColors = usedColors.concat(this.getSheetColors(sheetId), this.getColorsFromCells(sheetId), this.getFormattingColors(sheetId), this.getTableColors(sheetId));
|
|
57648
|
+
return [.../* @__PURE__ */ new Set([...usedColors])];
|
|
57649
|
+
}
|
|
57650
|
+
getSheetColors(sheetId) {
|
|
57651
|
+
const sheet = this.getters.getSheet(sheetId);
|
|
57652
|
+
return sheet.color ? [sheet.color] : [];
|
|
57643
57653
|
}
|
|
57644
57654
|
getColorsFromCells(sheetId) {
|
|
57645
57655
|
const cells = Object.values(this.getters.getCells(sheetId));
|
|
@@ -61985,7 +61995,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
61985
61995
|
};
|
|
61986
61996
|
}
|
|
61987
61997
|
};
|
|
61988
|
-
const invalidateTableStyleCommandsSet = new Set([
|
|
61998
|
+
const invalidateTableStyleCommandsSet = /* @__PURE__ */ new Set([
|
|
61989
61999
|
"HIDE_COLUMNS_ROWS",
|
|
61990
62000
|
"UNHIDE_COLUMNS_ROWS",
|
|
61991
62001
|
"UNFOLD_HEADER_GROUP",
|
|
@@ -64146,14 +64156,14 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
64146
64156
|
adjustPositionX(targetCol) {
|
|
64147
64157
|
const sheetId = this.sheetId;
|
|
64148
64158
|
const { start, end } = this.getters.getColDimensions(sheetId, targetCol);
|
|
64149
|
-
if (this.offsetX + this.viewportWidth + this.offsetCorrectionX < end) this.offsetX = end - this.viewportWidth;
|
|
64159
|
+
if (this.offsetX + this.viewportWidth + this.offsetCorrectionX < end) this.offsetX = end - this.viewportWidth - this.offsetCorrectionX;
|
|
64150
64160
|
else if (this.offsetX + this.offsetCorrectionX > start) this.offsetX = start - this.offsetCorrectionX;
|
|
64151
64161
|
this.adjustViewportZoneX();
|
|
64152
64162
|
}
|
|
64153
64163
|
adjustPositionY(targetRow) {
|
|
64154
64164
|
const sheetId = this.sheetId;
|
|
64155
64165
|
const { start, end } = this.getters.getRowDimensions(sheetId, targetRow);
|
|
64156
|
-
if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) this.offsetY = end - this.viewportHeight;
|
|
64166
|
+
if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) this.offsetY = end - this.viewportHeight - this.offsetCorrectionY;
|
|
64157
64167
|
else if (this.offsetY + this.offsetCorrectionY > start) this.offsetY = start - this.offsetCorrectionY;
|
|
64158
64168
|
this.adjustViewportZoneY();
|
|
64159
64169
|
}
|
|
@@ -65546,11 +65556,14 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
65546
65556
|
}
|
|
65547
65557
|
});
|
|
65548
65558
|
this.DOMFocusableElementStore = useStore(DOMFocusableElementStore);
|
|
65549
|
-
(0, _odoo_owl.useExternalListener)(window, "click", ()
|
|
65559
|
+
(0, _odoo_owl.useExternalListener)(window, "click", this.onExternalClick.bind(this), { capture: true });
|
|
65550
65560
|
(0, _odoo_owl.useEffect)((sheetId) => {
|
|
65551
65561
|
if (this.props.sheetId === sheetId) this.scrollToSheet();
|
|
65552
65562
|
}, () => [this.env.model.getters.getActiveSheetId()]);
|
|
65553
65563
|
}
|
|
65564
|
+
onExternalClick(ev) {
|
|
65565
|
+
if (!ev.target.closest(".o-color-picker")) this.state.pickerOpened = false;
|
|
65566
|
+
}
|
|
65554
65567
|
focusInputAndSelectContent() {
|
|
65555
65568
|
if (!this.state.isEditing || !this.sheetNameRef.el) return;
|
|
65556
65569
|
this.sheetNameRef.el.focus();
|
|
@@ -65647,6 +65660,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
65647
65660
|
},
|
|
65648
65661
|
openSheetColorPickerCallback: () => {
|
|
65649
65662
|
this.state.pickerOpened = true;
|
|
65663
|
+
const sheet = this.env.model.getters.getSheet(this.props.sheetId);
|
|
65664
|
+
this.state.currentPickerColor = sheet.color;
|
|
65650
65665
|
}
|
|
65651
65666
|
});
|
|
65652
65667
|
}
|
|
@@ -69831,11 +69846,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
69831
69846
|
<!-- each data marker in the series does not have a different color -->
|
|
69832
69847
|
<c:varyColors val="0"/>
|
|
69833
69848
|
${joinXmlNodes(rightDataSetsNodes)}
|
|
69834
|
-
<c:axId val="${
|
|
69835
|
-
<c:axId val="${
|
|
69849
|
+
<c:axId val="${17781238}" />
|
|
69850
|
+
<c:axId val="${88853994}" />
|
|
69836
69851
|
</c:barChart>
|
|
69837
|
-
${addAx("b", "c:catAx",
|
|
69838
|
-
${addAx("r", "c:valAx",
|
|
69852
|
+
${addAx("b", "c:catAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
|
|
69853
|
+
${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
|
|
69839
69854
|
` : ""}`;
|
|
69840
69855
|
}
|
|
69841
69856
|
function addComboChart(chart) {
|
|
@@ -69990,11 +70005,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
69990
70005
|
<!-- each data marker in the series does not have a different color -->
|
|
69991
70006
|
<c:varyColors val="0"/>
|
|
69992
70007
|
${joinXmlNodes(rightDataSetsNodes)}
|
|
69993
|
-
<c:axId val="${
|
|
69994
|
-
<c:axId val="${
|
|
70008
|
+
<c:axId val="${17781238}" />
|
|
70009
|
+
<c:axId val="${88853994}" />
|
|
69995
70010
|
</c:lineChart>
|
|
69996
|
-
${addAx("b", "c:catAx",
|
|
69997
|
-
${addAx("r", "c:valAx",
|
|
70011
|
+
${addAx("b", "c:catAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
|
|
70012
|
+
${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
|
|
69998
70013
|
` : ""}
|
|
69999
70014
|
`;
|
|
70000
70015
|
}
|
|
@@ -70056,11 +70071,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
70056
70071
|
<c:varyColors val="0"/>
|
|
70057
70072
|
<c:scatterStyle val="lineMarker"/>
|
|
70058
70073
|
${joinXmlNodes(rightDataSetsNodes)}
|
|
70059
|
-
<c:axId val="${
|
|
70060
|
-
<c:axId val="${
|
|
70074
|
+
<c:axId val="${17781238}" />
|
|
70075
|
+
<c:axId val="${88853994}" />
|
|
70061
70076
|
</c:scatterChart>
|
|
70062
|
-
${addAx("b", "c:valAx",
|
|
70063
|
-
${addAx("r", "c:valAx",
|
|
70077
|
+
${addAx("b", "c:valAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
|
|
70078
|
+
${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
|
|
70064
70079
|
` : ""}`;
|
|
70065
70080
|
}
|
|
70066
70081
|
function addRadarChart(chart) {
|
|
@@ -72271,8 +72286,8 @@ exports.stores = stores;
|
|
|
72271
72286
|
exports.tokenColors = tokenColors;
|
|
72272
72287
|
exports.tokenize = tokenize;
|
|
72273
72288
|
|
|
72274
|
-
__info__.version = "18.3.
|
|
72275
|
-
__info__.date = "2026-
|
|
72276
|
-
__info__.hash = "
|
|
72289
|
+
__info__.version = "18.3.54";
|
|
72290
|
+
__info__.date = "2026-07-01T05:01:44.424Z";
|
|
72291
|
+
__info__.hash = "d00e4b6";
|
|
72277
72292
|
|
|
72278
72293
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|