@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
package/dist/o_spreadsheet.css
CHANGED
|
@@ -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:46.026Z
|
|
7
|
+
* @hash d00e4b6
|
|
8
8
|
*/
|
|
9
9
|
/* Originates from src/components/top_bar/top_bar.scss */
|
|
10
10
|
@media (max-width: 900px) {
|
|
@@ -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
|
import { App, Component, blockDom, markRaw, onMounted, onPatched, onWillPatch, onWillStart, onWillUnmount, onWillUpdateProps, status, toRaw, useChildSubEnv, useComponent, useEffect, useEnv, useExternalListener, useRef, useState, useSubEnv, xml } from "@odoo/owl";
|
|
@@ -187,7 +187,7 @@ const GRAY_300 = "#D8DADD";
|
|
|
187
187
|
const GRAY_200 = "#E7E9ED";
|
|
188
188
|
const GRAY_100 = "#F9FAFB";
|
|
189
189
|
const TEXT_BODY = "#374151";
|
|
190
|
-
const TEXT_BODY_MUTED =
|
|
190
|
+
const TEXT_BODY_MUTED = "#374151C2";
|
|
191
191
|
const TEXT_HEADING = "#111827";
|
|
192
192
|
const PRIMARY_BUTTON_BG = "#714B67";
|
|
193
193
|
const PRIMARY_BUTTON_HOVER_BG = "#624159";
|
|
@@ -294,9 +294,6 @@ const COLOR_PICKER_DEFAULTS = [
|
|
|
294
294
|
];
|
|
295
295
|
const DEFAULT_CELL_HEIGHT = 23;
|
|
296
296
|
const FOOTER_HEIGHT = 2 * 23;
|
|
297
|
-
const MENU_SEPARATOR_BORDER_WIDTH = 1;
|
|
298
|
-
const MENU_SEPARATOR_PADDING = 5;
|
|
299
|
-
const MENU_SEPARATOR_HEIGHT = 1 + 2 * 5;
|
|
300
297
|
const DEFAULT_STYLE = {
|
|
301
298
|
align: "left",
|
|
302
299
|
verticalAlign: "bottom",
|
|
@@ -316,7 +313,7 @@ const DEFAULT_NUMBER_STYLE = {
|
|
|
316
313
|
const DEFAULT_VERTICAL_ALIGN = DEFAULT_STYLE.verticalAlign;
|
|
317
314
|
const DEFAULT_WRAPPING_MODE = DEFAULT_STYLE.wrapping;
|
|
318
315
|
const DEFAULT_FONT_SIZE = DEFAULT_STYLE.fontSize;
|
|
319
|
-
const DEFAULT_FONT = "'Roboto', arial";
|
|
316
|
+
const DEFAULT_FONT = "'Roboto', arial, 'Liberation Sans'";
|
|
320
317
|
const DEFAULT_BORDER_DESC = {
|
|
321
318
|
style: "thin",
|
|
322
319
|
color: "#000000"
|
|
@@ -1636,7 +1633,7 @@ function toXC(col, row, rangePart = {
|
|
|
1636
1633
|
function recomputeZones(zones, zonesToRemove = []) {
|
|
1637
1634
|
if (zones.length <= 1 && zonesToRemove.length === 0) return zones;
|
|
1638
1635
|
const profilesStartingPosition = [0];
|
|
1639
|
-
const profiles = new Map([[0, []]]);
|
|
1636
|
+
const profiles = /* @__PURE__ */ new Map([[0, []]]);
|
|
1640
1637
|
modifyProfiles(profilesStartingPosition, profiles, zones, false);
|
|
1641
1638
|
modifyProfiles(profilesStartingPosition, profiles, zonesToRemove, true);
|
|
1642
1639
|
return constructZonesFromProfiles(profilesStartingPosition, profiles);
|
|
@@ -2846,12 +2843,10 @@ const getNumberRegex = memoize(function getNumberRegex(locale) {
|
|
|
2846
2843
|
const pIntegerAndDecimals = `(?:\\d+(?:${escapeRegExp(locale.thousandsSeparator || "")}\\d{3,})*(?:${decimalSeparator}\\d*)?)`;
|
|
2847
2844
|
const pOnlyDecimals = `(?:${decimalSeparator}\\d+)`;
|
|
2848
2845
|
const pNumber = "(?:\\s*" + pIntegerAndDecimals + "|" + pOnlyDecimals + ")(?:e(?:\\+|-)?\\d+)?(?:\\s*%)?";
|
|
2849
|
-
const pMinus = "(?:\\s*-)?";
|
|
2850
|
-
const pCurrencyFormat = "(?:\\s*[\\$€])?";
|
|
2851
2846
|
const pNumberExp = "^(?:(?:" + [
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2847
|
+
"(?:\\s*-)?(?:\\s*[\\$€])?" + pNumber,
|
|
2848
|
+
"(?:\\s*-)?" + pNumber + "(?:\\s*[\\$€])?",
|
|
2849
|
+
"(?:\\s*[\\$€])?(?:\\s*-)?" + pNumber
|
|
2855
2850
|
].join(")|(?:") + "))$";
|
|
2856
2851
|
return new RegExp(pNumberExp, "i");
|
|
2857
2852
|
});
|
|
@@ -2966,7 +2961,7 @@ function isPositionDependent(cmd) {
|
|
|
2966
2961
|
function isZoneDependent(cmd) {
|
|
2967
2962
|
return "sheetId" in cmd && "zone" in cmd;
|
|
2968
2963
|
}
|
|
2969
|
-
const invalidateEvaluationCommands = new Set([
|
|
2964
|
+
const invalidateEvaluationCommands = /* @__PURE__ */ new Set([
|
|
2970
2965
|
"RENAME_SHEET",
|
|
2971
2966
|
"DELETE_SHEET",
|
|
2972
2967
|
"CREATE_SHEET",
|
|
@@ -2985,7 +2980,7 @@ const invalidateEvaluationCommands = new Set([
|
|
|
2985
2980
|
"REMOVE_PIVOT",
|
|
2986
2981
|
"DUPLICATE_PIVOT"
|
|
2987
2982
|
]);
|
|
2988
|
-
const invalidateChartEvaluationCommands = new Set([
|
|
2983
|
+
const invalidateChartEvaluationCommands = /* @__PURE__ */ new Set([
|
|
2989
2984
|
"EVALUATE_CELLS",
|
|
2990
2985
|
"EVALUATE_CHARTS",
|
|
2991
2986
|
"UPDATE_CELL",
|
|
@@ -3004,20 +2999,20 @@ const invalidateChartEvaluationCommands = new Set([
|
|
|
3004
2999
|
"UNDO",
|
|
3005
3000
|
"REDO"
|
|
3006
3001
|
]);
|
|
3007
|
-
const invalidateDependenciesCommands = new Set(["MOVE_RANGES"]);
|
|
3008
|
-
const invalidateCFEvaluationCommands = new Set([
|
|
3002
|
+
const invalidateDependenciesCommands = /* @__PURE__ */ new Set(["MOVE_RANGES"]);
|
|
3003
|
+
const invalidateCFEvaluationCommands = /* @__PURE__ */ new Set([
|
|
3009
3004
|
"EVALUATE_CELLS",
|
|
3010
3005
|
"ADD_CONDITIONAL_FORMAT",
|
|
3011
3006
|
"REMOVE_CONDITIONAL_FORMAT",
|
|
3012
3007
|
"CHANGE_CONDITIONAL_FORMAT_PRIORITY"
|
|
3013
3008
|
]);
|
|
3014
|
-
const invalidateBordersCommands = new Set([
|
|
3009
|
+
const invalidateBordersCommands = /* @__PURE__ */ new Set([
|
|
3015
3010
|
"AUTOFILL_CELL",
|
|
3016
3011
|
"SET_BORDER",
|
|
3017
3012
|
"SET_ZONE_BORDERS",
|
|
3018
3013
|
"SET_BORDERS_ON_TARGET"
|
|
3019
3014
|
]);
|
|
3020
|
-
const readonlyAllowedCommands = new Set([
|
|
3015
|
+
const readonlyAllowedCommands = /* @__PURE__ */ new Set([
|
|
3021
3016
|
"START",
|
|
3022
3017
|
"ACTIVATE_SHEET",
|
|
3023
3018
|
"COPY",
|
|
@@ -3028,7 +3023,7 @@ const readonlyAllowedCommands = new Set([
|
|
|
3028
3023
|
"SET_FORMULA_VISIBILITY",
|
|
3029
3024
|
"UPDATE_FILTER"
|
|
3030
3025
|
]);
|
|
3031
|
-
const coreTypes = new Set([
|
|
3026
|
+
const coreTypes = /* @__PURE__ */ new Set([
|
|
3032
3027
|
"UPDATE_CELL",
|
|
3033
3028
|
"UPDATE_CELL_POSITION",
|
|
3034
3029
|
"CLEAR_CELL",
|
|
@@ -5130,7 +5125,6 @@ function getDateCriterionFormattedValues(values, locale) {
|
|
|
5130
5125
|
//#region src/helpers/edge_scrolling.ts
|
|
5131
5126
|
const MAX_DELAY = 140;
|
|
5132
5127
|
const MIN_DELAY = 20;
|
|
5133
|
-
const ACCELERATION = .035;
|
|
5134
5128
|
/**
|
|
5135
5129
|
* Decreasing exponential function used to determine the "speed" of edge-scrolling
|
|
5136
5130
|
* as the timeout delay.
|
|
@@ -5138,7 +5132,7 @@ const ACCELERATION = .035;
|
|
|
5138
5132
|
* Returns a timeout delay in milliseconds.
|
|
5139
5133
|
*/
|
|
5140
5134
|
function scrollDelay(value) {
|
|
5141
|
-
return 20 + (140 - 20) * Math.exp(
|
|
5135
|
+
return 20 + (140 - 20) * Math.exp(-.035 * (value - 1));
|
|
5142
5136
|
}
|
|
5143
5137
|
|
|
5144
5138
|
//#endregion
|
|
@@ -6011,7 +6005,7 @@ var UuidGenerator = class {
|
|
|
6011
6005
|
smallUuid() {
|
|
6012
6006
|
if (window.crypto) return "10000000-1000".replace(/[01]/g, (c) => {
|
|
6013
6007
|
const n = Number(c);
|
|
6014
|
-
return (n ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
6008
|
+
return (n ^ crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
6015
6009
|
});
|
|
6016
6010
|
else return "xxxxxxxx-xxxx".replace(/[xy]/g, function(c) {
|
|
6017
6011
|
const r = Math.random() * 16 | 0;
|
|
@@ -6025,7 +6019,7 @@ var UuidGenerator = class {
|
|
|
6025
6019
|
uuidv4() {
|
|
6026
6020
|
if (window.crypto) return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => {
|
|
6027
6021
|
const n = Number(c);
|
|
6028
|
-
return (n ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
6022
|
+
return (n ^ crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
6029
6023
|
});
|
|
6030
6024
|
else return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
|
|
6031
6025
|
const r = Math.random() * 16 | 0;
|
|
@@ -7617,10 +7611,10 @@ function toNormalizedPivotValue(dimension, groupValue) {
|
|
|
7617
7611
|
type: dimension.type
|
|
7618
7612
|
}));
|
|
7619
7613
|
if (groupValueString.toLowerCase() === "false") return false;
|
|
7620
|
-
return pivotNormalizationValueRegistry.get(dimension.type)(groupValueString, dimension
|
|
7614
|
+
return pivotNormalizationValueRegistry.get(dimension.type)(groupValueString, dimension);
|
|
7621
7615
|
}
|
|
7622
|
-
function normalizeDateTime(value,
|
|
7623
|
-
return pivotTimeAdapter(granularity ?? "month").normalizeFunctionValue(value);
|
|
7616
|
+
function normalizeDateTime(value, dimension) {
|
|
7617
|
+
return pivotTimeAdapter(dimension.granularity ?? "month").normalizeFunctionValue(value);
|
|
7624
7618
|
}
|
|
7625
7619
|
function toFunctionPivotValue(value, dimension) {
|
|
7626
7620
|
if (value === null) return `"null"`;
|
|
@@ -32260,17 +32254,16 @@ var Menu = class Menu extends Component {
|
|
|
32260
32254
|
|
|
32261
32255
|
//#endregion
|
|
32262
32256
|
//#region src/components/link/link_editor/link_editor.ts
|
|
32263
|
-
const PADDING = 12;
|
|
32264
32257
|
css`
|
|
32265
32258
|
.o-link-editor {
|
|
32266
32259
|
font-size: 13px;
|
|
32267
32260
|
background-color: white;
|
|
32268
32261
|
box-shadow: 0 1px 4px 3px rgba(60, 64, 67, 0.15);
|
|
32269
|
-
padding: ${
|
|
32262
|
+
padding: ${12}px;
|
|
32270
32263
|
display: flex;
|
|
32271
32264
|
flex-direction: column;
|
|
32272
32265
|
border-radius: 4px;
|
|
32273
|
-
width: ${
|
|
32266
|
+
width: ${364}px;
|
|
32274
32267
|
|
|
32275
32268
|
.o-section {
|
|
32276
32269
|
.o-section-title {
|
|
@@ -36424,11 +36417,10 @@ var ActionButton = class extends Component {
|
|
|
36424
36417
|
const LINE_VERTICAL_PADDING = 1;
|
|
36425
36418
|
const PICKER_PADDING = 8;
|
|
36426
36419
|
const ITEM_BORDER_WIDTH = 1;
|
|
36427
|
-
const ITEM_EDGE_LENGTH = 18;
|
|
36428
36420
|
const ITEMS_PER_LINE = 10;
|
|
36429
36421
|
const MAGNIFIER_EDGE = 16;
|
|
36430
36422
|
const ITEM_GAP = 2;
|
|
36431
|
-
const CONTENT_WIDTH =
|
|
36423
|
+
const CONTENT_WIDTH = 218;
|
|
36432
36424
|
const INNER_GRADIENT_WIDTH = CONTENT_WIDTH - 2 * ITEM_BORDER_WIDTH;
|
|
36433
36425
|
const INNER_GRADIENT_HEIGHT = CONTENT_WIDTH - 30 - 2 * ITEM_BORDER_WIDTH;
|
|
36434
36426
|
css`
|
|
@@ -36440,7 +36432,7 @@ css`
|
|
|
36440
36432
|
line-height: 1.2;
|
|
36441
36433
|
overflow-y: auto;
|
|
36442
36434
|
overflow-x: hidden;
|
|
36443
|
-
width: ${
|
|
36435
|
+
width: ${234}px;
|
|
36444
36436
|
|
|
36445
36437
|
.o-color-picker-section-name {
|
|
36446
36438
|
margin: 0px ${ITEM_BORDER_WIDTH}px;
|
|
@@ -36466,8 +36458,8 @@ css`
|
|
|
36466
36458
|
}
|
|
36467
36459
|
}
|
|
36468
36460
|
.o-color-picker-line-item {
|
|
36469
|
-
width: ${
|
|
36470
|
-
height: ${
|
|
36461
|
+
width: ${20}px;
|
|
36462
|
+
height: ${20}px;
|
|
36471
36463
|
margin: 0px;
|
|
36472
36464
|
border-radius: 50px;
|
|
36473
36465
|
border: ${ITEM_BORDER_WIDTH}px solid #666666;
|
|
@@ -36511,13 +36503,13 @@ css`
|
|
|
36511
36503
|
}
|
|
36512
36504
|
|
|
36513
36505
|
.o-custom-selector {
|
|
36514
|
-
padding: ${
|
|
36506
|
+
padding: ${10}px ${PICKER_PADDING}px;
|
|
36515
36507
|
position: relative;
|
|
36516
36508
|
.o-gradient {
|
|
36517
36509
|
margin-bottom: ${MAGNIFIER_EDGE / 2}px;
|
|
36518
36510
|
border: ${ITEM_BORDER_WIDTH}px solid #c0c0c0;
|
|
36519
|
-
width: ${
|
|
36520
|
-
height: ${
|
|
36511
|
+
width: ${218}px;
|
|
36512
|
+
height: ${188}px;
|
|
36521
36513
|
position: relative;
|
|
36522
36514
|
}
|
|
36523
36515
|
|
|
@@ -36655,8 +36647,8 @@ var ColorPicker = class extends Component {
|
|
|
36655
36647
|
const left = Math.round(INNER_GRADIENT_WIDTH * clip(s / 100, 0, 1));
|
|
36656
36648
|
const top = Math.round(INNER_GRADIENT_HEIGHT * clip(1 - 2 * l / (200 - s), 0, 1));
|
|
36657
36649
|
return cssPropertiesToCss({
|
|
36658
|
-
left: `${-
|
|
36659
|
-
top: `${-
|
|
36650
|
+
left: `${-16 / 2 + left}px`,
|
|
36651
|
+
top: `${-16 / 2 + top}px`,
|
|
36660
36652
|
background: hslaToHex(this.state.currentHslaColor)
|
|
36661
36653
|
});
|
|
36662
36654
|
}
|
|
@@ -42012,9 +42004,9 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
|
|
|
42012
42004
|
allSheetsMatches = [];
|
|
42013
42005
|
activeSheetMatches = [];
|
|
42014
42006
|
specificRangeMatches = [];
|
|
42007
|
+
selectedMatchPosition = null;
|
|
42015
42008
|
currentSearchRegex = null;
|
|
42016
42009
|
initialShowFormulaState;
|
|
42017
|
-
preserveSelectedMatchIndex = false;
|
|
42018
42010
|
irreplaceableMatchCount = 0;
|
|
42019
42011
|
isSearchDirty = false;
|
|
42020
42012
|
shouldFinalizeUpdateSelection = false;
|
|
@@ -42136,7 +42128,10 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
|
|
|
42136
42128
|
*/
|
|
42137
42129
|
_updateSearch(toSearch, searchOptions) {
|
|
42138
42130
|
this.searchOptions = searchOptions;
|
|
42139
|
-
if (toSearch !== this.toSearch)
|
|
42131
|
+
if (toSearch !== this.toSearch) {
|
|
42132
|
+
this.selectedMatchIndex = null;
|
|
42133
|
+
this.selectedMatchPosition = null;
|
|
42134
|
+
}
|
|
42140
42135
|
this.toSearch = toSearch;
|
|
42141
42136
|
this.currentSearchRegex = getSearchRegex(this.toSearch, this.searchOptions);
|
|
42142
42137
|
this.refreshSearch({
|
|
@@ -42148,8 +42143,14 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
|
|
|
42148
42143
|
* refresh the matches according to the current search options
|
|
42149
42144
|
*/
|
|
42150
42145
|
refreshSearch(options) {
|
|
42151
|
-
if (!this.preserveSelectedMatchIndex) this.selectedMatchIndex = null;
|
|
42152
42146
|
this.findMatches();
|
|
42147
|
+
if (this.selectedMatchPosition) if (this.selectedMatchPosition.sheetId !== this.getters.getActiveSheetId()) {
|
|
42148
|
+
this.selectedMatchIndex = null;
|
|
42149
|
+
this.selectedMatchPosition = null;
|
|
42150
|
+
} else {
|
|
42151
|
+
const index = this.searchMatches.findIndex((match) => match.sheetId === this.selectedMatchPosition?.sheetId && match.col === this.selectedMatchPosition?.col && match.row === this.selectedMatchPosition?.row);
|
|
42152
|
+
if (index !== -1) this.selectedMatchIndex = index;
|
|
42153
|
+
}
|
|
42153
42154
|
this.selectNextCell(0, options);
|
|
42154
42155
|
}
|
|
42155
42156
|
getSheetsInSearchOrder() {
|
|
@@ -42217,6 +42218,7 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
|
|
|
42217
42218
|
const matches = this.searchMatches;
|
|
42218
42219
|
if (!matches.length) {
|
|
42219
42220
|
this.selectedMatchIndex = null;
|
|
42221
|
+
this.selectedMatchPosition = null;
|
|
42220
42222
|
return;
|
|
42221
42223
|
}
|
|
42222
42224
|
let nextIndex;
|
|
@@ -42230,14 +42232,13 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
|
|
|
42230
42232
|
} else nextIndex = this.selectedMatchIndex + indexChange;
|
|
42231
42233
|
nextIndex = (nextIndex + matches.length) % matches.length;
|
|
42232
42234
|
this.selectedMatchIndex = nextIndex;
|
|
42235
|
+
this.selectedMatchPosition = matches[this.selectedMatchIndex];
|
|
42233
42236
|
const selectedMatch = matches[nextIndex];
|
|
42234
42237
|
if (options.jumpToMatchSheet && this.getters.getActiveSheetId() !== selectedMatch.sheetId) {
|
|
42235
|
-
this.preserveSelectedMatchIndex = true;
|
|
42236
42238
|
this.model.dispatch("ACTIVATE_SHEET", {
|
|
42237
42239
|
sheetIdFrom: this.getters.getActiveSheetId(),
|
|
42238
42240
|
sheetIdTo: selectedMatch.sheetId
|
|
42239
42241
|
});
|
|
42240
|
-
this.preserveSelectedMatchIndex = false;
|
|
42241
42242
|
this.isSearchDirty = false;
|
|
42242
42243
|
}
|
|
42243
42244
|
this.model.selection.getBackToDefault();
|
|
@@ -42248,7 +42249,6 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
|
|
|
42248
42249
|
*/
|
|
42249
42250
|
replace() {
|
|
42250
42251
|
if (this.selectedMatchIndex === null) return;
|
|
42251
|
-
this.preserveSelectedMatchIndex = true;
|
|
42252
42252
|
this.shouldFinalizeUpdateSelection = true;
|
|
42253
42253
|
this.model.dispatch("REPLACE_SEARCH", {
|
|
42254
42254
|
searchString: this.toSearch,
|
|
@@ -42256,7 +42256,6 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
|
|
|
42256
42256
|
matches: [this.searchMatches[this.selectedMatchIndex]],
|
|
42257
42257
|
searchOptions: this.searchOptions
|
|
42258
42258
|
});
|
|
42259
|
-
this.preserveSelectedMatchIndex = false;
|
|
42260
42259
|
}
|
|
42261
42260
|
/**
|
|
42262
42261
|
* Apply the replace function to all the matches one time.
|
|
@@ -43546,8 +43545,8 @@ var PivotRuntimeDefinition = class {
|
|
|
43546
43545
|
sortedColumn;
|
|
43547
43546
|
constructor(definition, fields) {
|
|
43548
43547
|
this.measures = definition.measures.map((measure) => createMeasure(fields, measure));
|
|
43549
|
-
this.columns = definition.columns.map((dimension) => createPivotDimension(fields, dimension));
|
|
43550
|
-
this.rows = definition.rows.map((dimension) => createPivotDimension(fields, dimension));
|
|
43548
|
+
this.columns = definition.columns.map((dimension) => this.createPivotDimension(fields, dimension));
|
|
43549
|
+
this.rows = definition.rows.map((dimension) => this.createPivotDimension(fields, dimension));
|
|
43551
43550
|
this.sortedColumn = definition.sortedColumn;
|
|
43552
43551
|
}
|
|
43553
43552
|
getDimension(nameWithGranularity) {
|
|
@@ -43560,6 +43559,40 @@ var PivotRuntimeDefinition = class {
|
|
|
43560
43559
|
if (!measure) throw new EvaluationError(_t("Field %s is not a measure", id));
|
|
43561
43560
|
return measure;
|
|
43562
43561
|
}
|
|
43562
|
+
createPivotDimension(fields, dimension) {
|
|
43563
|
+
const field = fields[dimension.fieldName];
|
|
43564
|
+
const type = field?.type ?? "integer";
|
|
43565
|
+
const granularity = field && isDateOrDatetimeField(field) ? dimension.granularity : void 0;
|
|
43566
|
+
return {
|
|
43567
|
+
/**
|
|
43568
|
+
* Get the display name of the dimension
|
|
43569
|
+
* e.g. "stage_id" -> "Stage", "create_date:month" -> "Create Date"
|
|
43570
|
+
*/
|
|
43571
|
+
displayName: field?.string ?? dimension.fieldName,
|
|
43572
|
+
/**
|
|
43573
|
+
* Get the name of the dimension, as it is stored in the pivot formula
|
|
43574
|
+
* e.g. "stage_id", "create_date:month"
|
|
43575
|
+
*/
|
|
43576
|
+
nameWithGranularity: dimension.fieldName + (granularity ? `:${granularity}` : ""),
|
|
43577
|
+
/**
|
|
43578
|
+
* Get the name of the field of the dimension
|
|
43579
|
+
* e.g. "stage_id" -> "stage_id", "create_date:month" -> "create_date"
|
|
43580
|
+
*/
|
|
43581
|
+
fieldName: dimension.fieldName,
|
|
43582
|
+
/**
|
|
43583
|
+
* Get the aggregate operator of the dimension
|
|
43584
|
+
* e.g. "stage_id" -> undefined, "create_date:month" -> "month"
|
|
43585
|
+
*/
|
|
43586
|
+
granularity,
|
|
43587
|
+
/**
|
|
43588
|
+
* Get the type of the field of the dimension
|
|
43589
|
+
* e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
|
|
43590
|
+
*/
|
|
43591
|
+
type,
|
|
43592
|
+
order: dimension.order,
|
|
43593
|
+
isValid: !!field
|
|
43594
|
+
};
|
|
43595
|
+
}
|
|
43563
43596
|
};
|
|
43564
43597
|
function createMeasure(fields, measure) {
|
|
43565
43598
|
const fieldName = measure.fieldName;
|
|
@@ -43603,40 +43636,6 @@ function createMeasure(fields, measure) {
|
|
|
43603
43636
|
display: measure.display
|
|
43604
43637
|
};
|
|
43605
43638
|
}
|
|
43606
|
-
function createPivotDimension(fields, dimension) {
|
|
43607
|
-
const field = fields[dimension.fieldName];
|
|
43608
|
-
const type = field?.type ?? "integer";
|
|
43609
|
-
const granularity = field && isDateOrDatetimeField(field) ? dimension.granularity : void 0;
|
|
43610
|
-
return {
|
|
43611
|
-
/**
|
|
43612
|
-
* Get the display name of the dimension
|
|
43613
|
-
* e.g. "stage_id" -> "Stage", "create_date:month" -> "Create Date"
|
|
43614
|
-
*/
|
|
43615
|
-
displayName: field?.string ?? dimension.fieldName,
|
|
43616
|
-
/**
|
|
43617
|
-
* Get the name of the dimension, as it is stored in the pivot formula
|
|
43618
|
-
* e.g. "stage_id", "create_date:month"
|
|
43619
|
-
*/
|
|
43620
|
-
nameWithGranularity: dimension.fieldName + (granularity ? `:${granularity}` : ""),
|
|
43621
|
-
/**
|
|
43622
|
-
* Get the name of the field of the dimension
|
|
43623
|
-
* e.g. "stage_id" -> "stage_id", "create_date:month" -> "create_date"
|
|
43624
|
-
*/
|
|
43625
|
-
fieldName: dimension.fieldName,
|
|
43626
|
-
/**
|
|
43627
|
-
* Get the aggregate operator of the dimension
|
|
43628
|
-
* e.g. "stage_id" -> undefined, "create_date:month" -> "month"
|
|
43629
|
-
*/
|
|
43630
|
-
granularity,
|
|
43631
|
-
/**
|
|
43632
|
-
* Get the type of the field of the dimension
|
|
43633
|
-
* e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
|
|
43634
|
-
*/
|
|
43635
|
-
type,
|
|
43636
|
-
order: dimension.order,
|
|
43637
|
-
isValid: !!field
|
|
43638
|
-
};
|
|
43639
|
-
}
|
|
43640
43639
|
|
|
43641
43640
|
//#endregion
|
|
43642
43641
|
//#region src/helpers/pivot/spreadsheet_pivot/runtime_definition_spreadsheet_pivot.ts
|
|
@@ -46331,11 +46330,11 @@ var FigureComponent = class extends Component {
|
|
|
46331
46330
|
getResizerPosition(resizer) {
|
|
46332
46331
|
const anchorCenteringOffset = (ANCHOR_SIZE - ACTIVE_BORDER_WIDTH) / 2;
|
|
46333
46332
|
const style = {};
|
|
46334
|
-
if (resizer.includes("top")) style.top =
|
|
46335
|
-
else if (resizer.includes("bottom")) style.bottom =
|
|
46333
|
+
if (resizer.includes("top")) style.top = `-3px`;
|
|
46334
|
+
else if (resizer.includes("bottom")) style.bottom = `-3px`;
|
|
46336
46335
|
else style.bottom = `calc(50% - ${anchorCenteringOffset}px)`;
|
|
46337
|
-
if (resizer.includes("left")) style.left =
|
|
46338
|
-
else if (resizer.includes("right")) style.right =
|
|
46336
|
+
if (resizer.includes("left")) style.left = `-3px`;
|
|
46337
|
+
else if (resizer.includes("right")) style.right = `-3px`;
|
|
46339
46338
|
else style.right = `calc(50% - ${anchorCenteringOffset}px)`;
|
|
46340
46339
|
return cssPropertiesToCss(style);
|
|
46341
46340
|
}
|
|
@@ -46878,8 +46877,12 @@ var CellComposerStore = class extends AbstractComposerStore {
|
|
|
46878
46877
|
}
|
|
46879
46878
|
stopEdition(direction) {
|
|
46880
46879
|
if (this.canStopEdition()) {
|
|
46880
|
+
const { col, row } = this.currentEditedCell;
|
|
46881
46881
|
this._stopEdition();
|
|
46882
|
-
if (direction)
|
|
46882
|
+
if (direction) {
|
|
46883
|
+
this.model.selection.selectCell(col, row);
|
|
46884
|
+
this.model.selection.moveAnchorCell(direction, 1);
|
|
46885
|
+
}
|
|
46883
46886
|
return;
|
|
46884
46887
|
}
|
|
46885
46888
|
const editedCell = this.currentEditedCell;
|
|
@@ -57614,6 +57617,9 @@ var CustomColorsPlugin = class extends CoreViewPlugin {
|
|
|
57614
57617
|
case "CREATE_CHART":
|
|
57615
57618
|
this.tryToAddColors(this.getChartColors(cmd.figureId));
|
|
57616
57619
|
break;
|
|
57620
|
+
case "COLOR_SHEET":
|
|
57621
|
+
if (cmd.color) this.tryToAddColors([cmd.color]);
|
|
57622
|
+
break;
|
|
57617
57623
|
case "UPDATE_CELL":
|
|
57618
57624
|
case "ADD_CONDITIONAL_FORMAT":
|
|
57619
57625
|
case "SET_BORDER":
|
|
@@ -57636,8 +57642,12 @@ var CustomColorsPlugin = class extends CoreViewPlugin {
|
|
|
57636
57642
|
}
|
|
57637
57643
|
computeCustomColors() {
|
|
57638
57644
|
let usedColors = [];
|
|
57639
|
-
for (const sheetId of this.getters.getSheetIds()) usedColors = usedColors.concat(this.getColorsFromCells(sheetId), this.getFormattingColors(sheetId), this.getTableColors(sheetId));
|
|
57640
|
-
return [
|
|
57645
|
+
for (const sheetId of this.getters.getSheetIds()) usedColors = usedColors.concat(this.getSheetColors(sheetId), this.getColorsFromCells(sheetId), this.getFormattingColors(sheetId), this.getTableColors(sheetId));
|
|
57646
|
+
return [.../* @__PURE__ */ new Set([...usedColors])];
|
|
57647
|
+
}
|
|
57648
|
+
getSheetColors(sheetId) {
|
|
57649
|
+
const sheet = this.getters.getSheet(sheetId);
|
|
57650
|
+
return sheet.color ? [sheet.color] : [];
|
|
57641
57651
|
}
|
|
57642
57652
|
getColorsFromCells(sheetId) {
|
|
57643
57653
|
const cells = Object.values(this.getters.getCells(sheetId));
|
|
@@ -61983,7 +61993,7 @@ var TableComputedStylePlugin = class extends UIPlugin {
|
|
|
61983
61993
|
};
|
|
61984
61994
|
}
|
|
61985
61995
|
};
|
|
61986
|
-
const invalidateTableStyleCommandsSet = new Set([
|
|
61996
|
+
const invalidateTableStyleCommandsSet = /* @__PURE__ */ new Set([
|
|
61987
61997
|
"HIDE_COLUMNS_ROWS",
|
|
61988
61998
|
"UNHIDE_COLUMNS_ROWS",
|
|
61989
61999
|
"UNFOLD_HEADER_GROUP",
|
|
@@ -64144,14 +64154,14 @@ var InternalViewport = class {
|
|
|
64144
64154
|
adjustPositionX(targetCol) {
|
|
64145
64155
|
const sheetId = this.sheetId;
|
|
64146
64156
|
const { start, end } = this.getters.getColDimensions(sheetId, targetCol);
|
|
64147
|
-
if (this.offsetX + this.viewportWidth + this.offsetCorrectionX < end) this.offsetX = end - this.viewportWidth;
|
|
64157
|
+
if (this.offsetX + this.viewportWidth + this.offsetCorrectionX < end) this.offsetX = end - this.viewportWidth - this.offsetCorrectionX;
|
|
64148
64158
|
else if (this.offsetX + this.offsetCorrectionX > start) this.offsetX = start - this.offsetCorrectionX;
|
|
64149
64159
|
this.adjustViewportZoneX();
|
|
64150
64160
|
}
|
|
64151
64161
|
adjustPositionY(targetRow) {
|
|
64152
64162
|
const sheetId = this.sheetId;
|
|
64153
64163
|
const { start, end } = this.getters.getRowDimensions(sheetId, targetRow);
|
|
64154
|
-
if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) this.offsetY = end - this.viewportHeight;
|
|
64164
|
+
if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) this.offsetY = end - this.viewportHeight - this.offsetCorrectionY;
|
|
64155
64165
|
else if (this.offsetY + this.offsetCorrectionY > start) this.offsetY = start - this.offsetCorrectionY;
|
|
64156
64166
|
this.adjustViewportZoneY();
|
|
64157
64167
|
}
|
|
@@ -65544,11 +65554,14 @@ var BottomBarSheet = class extends Component {
|
|
|
65544
65554
|
}
|
|
65545
65555
|
});
|
|
65546
65556
|
this.DOMFocusableElementStore = useStore(DOMFocusableElementStore);
|
|
65547
|
-
useExternalListener(window, "click", ()
|
|
65557
|
+
useExternalListener(window, "click", this.onExternalClick.bind(this), { capture: true });
|
|
65548
65558
|
useEffect((sheetId) => {
|
|
65549
65559
|
if (this.props.sheetId === sheetId) this.scrollToSheet();
|
|
65550
65560
|
}, () => [this.env.model.getters.getActiveSheetId()]);
|
|
65551
65561
|
}
|
|
65562
|
+
onExternalClick(ev) {
|
|
65563
|
+
if (!ev.target.closest(".o-color-picker")) this.state.pickerOpened = false;
|
|
65564
|
+
}
|
|
65552
65565
|
focusInputAndSelectContent() {
|
|
65553
65566
|
if (!this.state.isEditing || !this.sheetNameRef.el) return;
|
|
65554
65567
|
this.sheetNameRef.el.focus();
|
|
@@ -65645,6 +65658,8 @@ var BottomBarSheet = class extends Component {
|
|
|
65645
65658
|
},
|
|
65646
65659
|
openSheetColorPickerCallback: () => {
|
|
65647
65660
|
this.state.pickerOpened = true;
|
|
65661
|
+
const sheet = this.env.model.getters.getSheet(this.props.sheetId);
|
|
65662
|
+
this.state.currentPickerColor = sheet.color;
|
|
65648
65663
|
}
|
|
65649
65664
|
});
|
|
65650
65665
|
}
|
|
@@ -69829,11 +69844,11 @@ function addBarChart(chart) {
|
|
|
69829
69844
|
<!-- each data marker in the series does not have a different color -->
|
|
69830
69845
|
<c:varyColors val="0"/>
|
|
69831
69846
|
${joinXmlNodes(rightDataSetsNodes)}
|
|
69832
|
-
<c:axId val="${
|
|
69833
|
-
<c:axId val="${
|
|
69847
|
+
<c:axId val="${17781238}" />
|
|
69848
|
+
<c:axId val="${88853994}" />
|
|
69834
69849
|
</c:barChart>
|
|
69835
|
-
${addAx("b", "c:catAx",
|
|
69836
|
-
${addAx("r", "c:valAx",
|
|
69850
|
+
${addAx("b", "c:catAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
|
|
69851
|
+
${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
|
|
69837
69852
|
` : ""}`;
|
|
69838
69853
|
}
|
|
69839
69854
|
function addComboChart(chart) {
|
|
@@ -69988,11 +70003,11 @@ function addLineChart(chart) {
|
|
|
69988
70003
|
<!-- each data marker in the series does not have a different color -->
|
|
69989
70004
|
<c:varyColors val="0"/>
|
|
69990
70005
|
${joinXmlNodes(rightDataSetsNodes)}
|
|
69991
|
-
<c:axId val="${
|
|
69992
|
-
<c:axId val="${
|
|
70006
|
+
<c:axId val="${17781238}" />
|
|
70007
|
+
<c:axId val="${88853994}" />
|
|
69993
70008
|
</c:lineChart>
|
|
69994
|
-
${addAx("b", "c:catAx",
|
|
69995
|
-
${addAx("r", "c:valAx",
|
|
70009
|
+
${addAx("b", "c:catAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
|
|
70010
|
+
${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
|
|
69996
70011
|
` : ""}
|
|
69997
70012
|
`;
|
|
69998
70013
|
}
|
|
@@ -70054,11 +70069,11 @@ function addScatterChart(chart) {
|
|
|
70054
70069
|
<c:varyColors val="0"/>
|
|
70055
70070
|
<c:scatterStyle val="lineMarker"/>
|
|
70056
70071
|
${joinXmlNodes(rightDataSetsNodes)}
|
|
70057
|
-
<c:axId val="${
|
|
70058
|
-
<c:axId val="${
|
|
70072
|
+
<c:axId val="${17781238}" />
|
|
70073
|
+
<c:axId val="${88853994}" />
|
|
70059
70074
|
</c:scatterChart>
|
|
70060
|
-
${addAx("b", "c:valAx",
|
|
70061
|
-
${addAx("r", "c:valAx",
|
|
70075
|
+
${addAx("b", "c:valAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
|
|
70076
|
+
${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
|
|
70062
70077
|
` : ""}`;
|
|
70063
70078
|
}
|
|
70064
70079
|
function addRadarChart(chart) {
|
|
@@ -72222,6 +72237,6 @@ const chartHelpers = {
|
|
|
72222
72237
|
//#endregion
|
|
72223
72238
|
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 };
|
|
72224
72239
|
|
|
72225
|
-
__info__.version = "18.3.
|
|
72226
|
-
__info__.date = "2026-
|
|
72227
|
-
__info__.hash = "
|
|
72240
|
+
__info__.version = "18.3.54";
|
|
72241
|
+
__info__.date = "2026-07-01T05:01:44.424Z";
|
|
72242
|
+
__info__.hash = "d00e4b6";
|