@odoo/o-spreadsheet 18.0.70 → 18.0.73
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.esm.js +119 -102
- package/dist/o-spreadsheet.iife.js +119 -102
- package/dist/o-spreadsheet.iife.min.js +216 -216
- package/dist/o_spreadsheet.xml +4 -4
- package/dist/types/components/bottom_bar/bottom_bar_sheet/bottom_bar_sheet.d.ts +1 -0
- package/dist/types/components/side_panel/find_and_replace/find_and_replace_store.d.ts +1 -1
- package/dist/types/constants.d.ts +1 -1
- package/dist/types/helpers/pivot/pivot_helpers.d.ts +2 -2
- package/dist/types/helpers/pivot/pivot_runtime_definition.d.ts +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/plugins/ui_core_views/custom_colors.d.ts +1 -0
- package/package.json +7 -2
- package/dist/o-spreadsheet.cjs.js +0 -66563
|
@@ -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.0.
|
|
6
|
-
* @date 2026-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.0.73
|
|
6
|
+
* @date 2026-07-01T05:00:54.172Z
|
|
7
|
+
* @hash 1a9c761
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function(exports, _odoo_owl) {
|
|
@@ -187,7 +187,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
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";
|
|
@@ -293,9 +293,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
293
293
|
];
|
|
294
294
|
const DEFAULT_CELL_HEIGHT = 23;
|
|
295
295
|
const FOOTER_HEIGHT = 2 * 23;
|
|
296
|
-
const MENU_SEPARATOR_BORDER_WIDTH = 1;
|
|
297
|
-
const MENU_SEPARATOR_PADDING = 5;
|
|
298
|
-
const MENU_SEPARATOR_HEIGHT = 1 + 2 * 5;
|
|
299
296
|
const DEFAULT_STYLE = {
|
|
300
297
|
align: "left",
|
|
301
298
|
verticalAlign: "bottom",
|
|
@@ -315,7 +312,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
315
312
|
const DEFAULT_VERTICAL_ALIGN = DEFAULT_STYLE.verticalAlign;
|
|
316
313
|
const DEFAULT_WRAPPING_MODE = DEFAULT_STYLE.wrapping;
|
|
317
314
|
const DEFAULT_FONT_SIZE = DEFAULT_STYLE.fontSize;
|
|
318
|
-
const DEFAULT_FONT = "'Roboto', arial";
|
|
315
|
+
const DEFAULT_FONT = "'Roboto', arial, 'Liberation Sans'";
|
|
319
316
|
const DEFAULT_BORDER_DESC = {
|
|
320
317
|
style: "thin",
|
|
321
318
|
color: "#000000"
|
|
@@ -1491,7 +1488,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1491
1488
|
function recomputeZones(zones, zonesToRemove = []) {
|
|
1492
1489
|
if (zones.length <= 1 && zonesToRemove.length === 0) return zones;
|
|
1493
1490
|
const profilesStartingPosition = [0];
|
|
1494
|
-
const profiles = new Map([[0, []]]);
|
|
1491
|
+
const profiles = /* @__PURE__ */ new Map([[0, []]]);
|
|
1495
1492
|
modifyProfiles(profilesStartingPosition, profiles, zones, false);
|
|
1496
1493
|
modifyProfiles(profilesStartingPosition, profiles, zonesToRemove, true);
|
|
1497
1494
|
return constructZonesFromProfiles(profilesStartingPosition, profiles);
|
|
@@ -2725,12 +2722,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2725
2722
|
const pIntegerAndDecimals = `(?:\\d+(?:${escapeRegExp(locale.thousandsSeparator || "")}\\d{3,})*(?:${decimalSeparator}\\d*)?)`;
|
|
2726
2723
|
const pOnlyDecimals = `(?:${decimalSeparator}\\d+)`;
|
|
2727
2724
|
const pNumber = "(?:\\s*" + pIntegerAndDecimals + "|" + pOnlyDecimals + ")(?:e(?:\\+|-)?\\d+)?(?:\\s*%)?";
|
|
2728
|
-
const pMinus = "(?:\\s*-)?";
|
|
2729
|
-
const pCurrencyFormat = "(?:\\s*[\\$€])?";
|
|
2730
2725
|
const pNumberExp = "^(?:(?:" + [
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2726
|
+
"(?:\\s*-)?(?:\\s*[\\$€])?" + pNumber,
|
|
2727
|
+
"(?:\\s*-)?" + pNumber + "(?:\\s*[\\$€])?",
|
|
2728
|
+
"(?:\\s*[\\$€])?(?:\\s*-)?" + pNumber
|
|
2734
2729
|
].join(")|(?:") + "))$";
|
|
2735
2730
|
return new RegExp(pNumberExp, "i");
|
|
2736
2731
|
});
|
|
@@ -2793,7 +2788,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2793
2788
|
function isZoneDependent(cmd) {
|
|
2794
2789
|
return "sheetId" in cmd && "zone" in cmd;
|
|
2795
2790
|
}
|
|
2796
|
-
const invalidateEvaluationCommands = new Set([
|
|
2791
|
+
const invalidateEvaluationCommands = /* @__PURE__ */ new Set([
|
|
2797
2792
|
"RENAME_SHEET",
|
|
2798
2793
|
"DELETE_SHEET",
|
|
2799
2794
|
"CREATE_SHEET",
|
|
@@ -2812,7 +2807,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2812
2807
|
"REMOVE_PIVOT",
|
|
2813
2808
|
"DUPLICATE_PIVOT"
|
|
2814
2809
|
]);
|
|
2815
|
-
const invalidateChartEvaluationCommands = new Set([
|
|
2810
|
+
const invalidateChartEvaluationCommands = /* @__PURE__ */ new Set([
|
|
2816
2811
|
"EVALUATE_CELLS",
|
|
2817
2812
|
"UPDATE_CELL",
|
|
2818
2813
|
"UNHIDE_COLUMNS_ROWS",
|
|
@@ -2830,20 +2825,20 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2830
2825
|
"UNDO",
|
|
2831
2826
|
"REDO"
|
|
2832
2827
|
]);
|
|
2833
|
-
const invalidateDependenciesCommands = new Set(["MOVE_RANGES"]);
|
|
2834
|
-
const invalidateCFEvaluationCommands = new Set([
|
|
2828
|
+
const invalidateDependenciesCommands = /* @__PURE__ */ new Set(["MOVE_RANGES"]);
|
|
2829
|
+
const invalidateCFEvaluationCommands = /* @__PURE__ */ new Set([
|
|
2835
2830
|
"EVALUATE_CELLS",
|
|
2836
2831
|
"ADD_CONDITIONAL_FORMAT",
|
|
2837
2832
|
"REMOVE_CONDITIONAL_FORMAT",
|
|
2838
2833
|
"CHANGE_CONDITIONAL_FORMAT_PRIORITY"
|
|
2839
2834
|
]);
|
|
2840
|
-
const invalidateBordersCommands = new Set([
|
|
2835
|
+
const invalidateBordersCommands = /* @__PURE__ */ new Set([
|
|
2841
2836
|
"AUTOFILL_CELL",
|
|
2842
2837
|
"SET_BORDER",
|
|
2843
2838
|
"SET_ZONE_BORDERS",
|
|
2844
2839
|
"SET_BORDERS_ON_TARGET"
|
|
2845
2840
|
]);
|
|
2846
|
-
const readonlyAllowedCommands = new Set([
|
|
2841
|
+
const readonlyAllowedCommands = /* @__PURE__ */ new Set([
|
|
2847
2842
|
"START",
|
|
2848
2843
|
"ACTIVATE_SHEET",
|
|
2849
2844
|
"COPY",
|
|
@@ -2853,7 +2848,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2853
2848
|
"SET_FORMULA_VISIBILITY",
|
|
2854
2849
|
"UPDATE_FILTER"
|
|
2855
2850
|
]);
|
|
2856
|
-
const coreTypes = new Set([
|
|
2851
|
+
const coreTypes = /* @__PURE__ */ new Set([
|
|
2857
2852
|
"UPDATE_CELL",
|
|
2858
2853
|
"UPDATE_CELL_POSITION",
|
|
2859
2854
|
"CLEAR_CELL",
|
|
@@ -4946,7 +4941,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
4946
4941
|
//#region src/helpers/edge_scrolling.ts
|
|
4947
4942
|
const MAX_DELAY = 140;
|
|
4948
4943
|
const MIN_DELAY = 20;
|
|
4949
|
-
const ACCELERATION = .035;
|
|
4950
4944
|
/**
|
|
4951
4945
|
* Decreasing exponential function used to determine the "speed" of edge-scrolling
|
|
4952
4946
|
* as the timeout delay.
|
|
@@ -4954,7 +4948,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
4954
4948
|
* Returns a timeout delay in milliseconds.
|
|
4955
4949
|
*/
|
|
4956
4950
|
function scrollDelay(value) {
|
|
4957
|
-
return 20 + (140 - 20) * Math.exp(
|
|
4951
|
+
return 20 + (140 - 20) * Math.exp(-.035 * (value - 1));
|
|
4958
4952
|
}
|
|
4959
4953
|
|
|
4960
4954
|
//#endregion
|
|
@@ -5586,7 +5580,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5586
5580
|
return String(this.fastIdStart);
|
|
5587
5581
|
} else if (window.crypto) return "10000000-1000".replace(/[01]/g, (c) => {
|
|
5588
5582
|
const n = Number(c);
|
|
5589
|
-
return (n ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
5583
|
+
return (n ^ crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
5590
5584
|
});
|
|
5591
5585
|
else return "xxxxxxxx-xxxx".replace(/[xy]/g, function(c) {
|
|
5592
5586
|
var r = Math.random() * 16 | 0;
|
|
@@ -5603,7 +5597,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5603
5597
|
return String(this.fastIdStart);
|
|
5604
5598
|
} else if (window.crypto) return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => {
|
|
5605
5599
|
const n = Number(c);
|
|
5606
|
-
return (n ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
5600
|
+
return (n ^ crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
5607
5601
|
});
|
|
5608
5602
|
else return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
|
|
5609
5603
|
var r = Math.random() * 16 | 0;
|
|
@@ -7148,10 +7142,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
7148
7142
|
type: dimension.type
|
|
7149
7143
|
}));
|
|
7150
7144
|
if (groupValueString.toLowerCase() === "false") return false;
|
|
7151
|
-
return pivotNormalizationValueRegistry.get(dimension.type)(groupValueString, dimension
|
|
7145
|
+
return pivotNormalizationValueRegistry.get(dimension.type)(groupValueString, dimension);
|
|
7152
7146
|
}
|
|
7153
|
-
function normalizeDateTime(value,
|
|
7154
|
-
return pivotTimeAdapter(granularity ?? "month").normalizeFunctionValue(value);
|
|
7147
|
+
function normalizeDateTime(value, dimension) {
|
|
7148
|
+
return pivotTimeAdapter(dimension.granularity ?? "month").normalizeFunctionValue(value);
|
|
7155
7149
|
}
|
|
7156
7150
|
function toFunctionPivotValue(value, dimension) {
|
|
7157
7151
|
if (value === null) return `"null"`;
|
|
@@ -32695,7 +32689,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
32695
32689
|
const ITEMS_PER_LINE = 10;
|
|
32696
32690
|
const MAGNIFIER_EDGE = 16;
|
|
32697
32691
|
const ITEM_GAP = 2;
|
|
32698
|
-
const CONTENT_WIDTH =
|
|
32692
|
+
const CONTENT_WIDTH = 218;
|
|
32699
32693
|
const INNER_GRADIENT_WIDTH = CONTENT_WIDTH - 2 * ITEM_BORDER_WIDTH;
|
|
32700
32694
|
const INNER_GRADIENT_HEIGHT = CONTENT_WIDTH - 30 - 2 * ITEM_BORDER_WIDTH;
|
|
32701
32695
|
css`
|
|
@@ -32707,7 +32701,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
32707
32701
|
line-height: 1.2;
|
|
32708
32702
|
overflow-y: auto;
|
|
32709
32703
|
overflow-x: hidden;
|
|
32710
|
-
width: ${
|
|
32704
|
+
width: ${234}px;
|
|
32711
32705
|
|
|
32712
32706
|
.o-color-picker-section-name {
|
|
32713
32707
|
margin: 0px ${ITEM_BORDER_WIDTH}px;
|
|
@@ -32779,14 +32773,14 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
32779
32773
|
}
|
|
32780
32774
|
|
|
32781
32775
|
.o-custom-selector {
|
|
32782
|
-
padding: ${
|
|
32776
|
+
padding: ${10}px ${PICKER_PADDING}px;
|
|
32783
32777
|
position: relative;
|
|
32784
32778
|
.o-gradient {
|
|
32785
32779
|
margin-bottom: ${MAGNIFIER_EDGE / 2}px;
|
|
32786
32780
|
border: ${ITEM_BORDER_WIDTH}px solid #c0c0c0;
|
|
32787
32781
|
box-sizing: border-box;
|
|
32788
|
-
width: ${
|
|
32789
|
-
height: ${
|
|
32782
|
+
width: ${218}px;
|
|
32783
|
+
height: ${188}px;
|
|
32790
32784
|
position: relative;
|
|
32791
32785
|
}
|
|
32792
32786
|
|
|
@@ -32927,8 +32921,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
32927
32921
|
const left = Math.round(INNER_GRADIENT_WIDTH * clip(s / 100, 0, 1));
|
|
32928
32922
|
const top = Math.round(INNER_GRADIENT_HEIGHT * clip(1 - 2 * l / (200 - s), 0, 1));
|
|
32929
32923
|
return cssPropertiesToCss({
|
|
32930
|
-
left: `${-
|
|
32931
|
-
top: `${-
|
|
32924
|
+
left: `${-16 / 2 + left}px`,
|
|
32925
|
+
top: `${-16 / 2 + top}px`,
|
|
32932
32926
|
background: hslaToHex(this.state.currentHslaColor)
|
|
32933
32927
|
});
|
|
32934
32928
|
}
|
|
@@ -37219,10 +37213,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
37219
37213
|
allSheetsMatches = [];
|
|
37220
37214
|
activeSheetMatches = [];
|
|
37221
37215
|
specificRangeMatches = [];
|
|
37216
|
+
selectedMatchPosition = null;
|
|
37222
37217
|
currentSearchRegex = null;
|
|
37223
37218
|
isSearchDirty = false;
|
|
37224
37219
|
initialShowFormulaState;
|
|
37225
|
-
preserveSelectedMatchIndex = false;
|
|
37226
37220
|
irreplaceableMatchCount = 0;
|
|
37227
37221
|
notificationStore = this.get(NotificationStore);
|
|
37228
37222
|
selectedMatchIndex = null;
|
|
@@ -37326,7 +37320,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
37326
37320
|
*/
|
|
37327
37321
|
_updateSearch(toSearch, searchOptions) {
|
|
37328
37322
|
this.searchOptions = searchOptions;
|
|
37329
|
-
if (toSearch !== this.toSearch)
|
|
37323
|
+
if (toSearch !== this.toSearch) {
|
|
37324
|
+
this.selectedMatchIndex = null;
|
|
37325
|
+
this.selectedMatchPosition = null;
|
|
37326
|
+
}
|
|
37330
37327
|
this.toSearch = toSearch;
|
|
37331
37328
|
this.currentSearchRegex = getSearchRegex(this.toSearch, this.searchOptions);
|
|
37332
37329
|
this.refreshSearch();
|
|
@@ -37335,8 +37332,14 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
37335
37332
|
* refresh the matches according to the current search options
|
|
37336
37333
|
*/
|
|
37337
37334
|
refreshSearch(jumpToMatchSheet = true) {
|
|
37338
|
-
if (!this.preserveSelectedMatchIndex) this.selectedMatchIndex = null;
|
|
37339
37335
|
this.findMatches();
|
|
37336
|
+
if (this.selectedMatchPosition) if (this.selectedMatchPosition.sheetId !== this.getters.getActiveSheetId()) {
|
|
37337
|
+
this.selectedMatchIndex = null;
|
|
37338
|
+
this.selectedMatchPosition = null;
|
|
37339
|
+
} else {
|
|
37340
|
+
const index = this.searchMatches.findIndex((match) => match.sheetId === this.selectedMatchPosition?.sheetId && match.col === this.selectedMatchPosition?.col && match.row === this.selectedMatchPosition?.row);
|
|
37341
|
+
if (index !== -1) this.selectedMatchIndex = index;
|
|
37342
|
+
}
|
|
37340
37343
|
this.selectNextCell(0, jumpToMatchSheet);
|
|
37341
37344
|
}
|
|
37342
37345
|
getSheetsInSearchOrder() {
|
|
@@ -37404,6 +37407,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
37404
37407
|
const matches = this.searchMatches;
|
|
37405
37408
|
if (!matches.length) {
|
|
37406
37409
|
this.selectedMatchIndex = null;
|
|
37410
|
+
this.selectedMatchPosition = null;
|
|
37407
37411
|
return;
|
|
37408
37412
|
}
|
|
37409
37413
|
let nextIndex;
|
|
@@ -37417,14 +37421,13 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
37417
37421
|
} else nextIndex = this.selectedMatchIndex + indexChange;
|
|
37418
37422
|
nextIndex = (nextIndex + matches.length) % matches.length;
|
|
37419
37423
|
this.selectedMatchIndex = nextIndex;
|
|
37424
|
+
this.selectedMatchPosition = matches[this.selectedMatchIndex];
|
|
37420
37425
|
const selectedMatch = matches[nextIndex];
|
|
37421
37426
|
if (jumpToMatchSheet && this.getters.getActiveSheetId() !== selectedMatch.sheetId) {
|
|
37422
|
-
this.preserveSelectedMatchIndex = true;
|
|
37423
37427
|
this.model.dispatch("ACTIVATE_SHEET", {
|
|
37424
37428
|
sheetIdFrom: this.getters.getActiveSheetId(),
|
|
37425
37429
|
sheetIdTo: selectedMatch.sheetId
|
|
37426
37430
|
});
|
|
37427
|
-
this.preserveSelectedMatchIndex = false;
|
|
37428
37431
|
this.isSearchDirty = false;
|
|
37429
37432
|
}
|
|
37430
37433
|
this.model.selection.getBackToDefault();
|
|
@@ -37435,14 +37438,12 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
37435
37438
|
*/
|
|
37436
37439
|
replace() {
|
|
37437
37440
|
if (this.selectedMatchIndex === null) return;
|
|
37438
|
-
this.preserveSelectedMatchIndex = true;
|
|
37439
37441
|
this.model.dispatch("REPLACE_SEARCH", {
|
|
37440
37442
|
searchString: this.toSearch,
|
|
37441
37443
|
replaceWith: this.toReplace,
|
|
37442
37444
|
matches: [this.searchMatches[this.selectedMatchIndex]],
|
|
37443
37445
|
searchOptions: this.searchOptions
|
|
37444
37446
|
});
|
|
37445
|
-
this.preserveSelectedMatchIndex = false;
|
|
37446
37447
|
}
|
|
37447
37448
|
/**
|
|
37448
37449
|
* Apply the replace function to all the matches one time.
|
|
@@ -38653,8 +38654,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
38653
38654
|
rows;
|
|
38654
38655
|
constructor(definition, fields) {
|
|
38655
38656
|
this.measures = definition.measures.map((measure) => createMeasure(fields, measure));
|
|
38656
|
-
this.columns = definition.columns.map((dimension) => createPivotDimension(fields, dimension));
|
|
38657
|
-
this.rows = definition.rows.map((dimension) => createPivotDimension(fields, dimension));
|
|
38657
|
+
this.columns = definition.columns.map((dimension) => this.createPivotDimension(fields, dimension));
|
|
38658
|
+
this.rows = definition.rows.map((dimension) => this.createPivotDimension(fields, dimension));
|
|
38658
38659
|
}
|
|
38659
38660
|
getDimension(nameWithGranularity) {
|
|
38660
38661
|
const dimension = this.columns.find((d) => d.nameWithGranularity === nameWithGranularity) || this.rows.find((d) => d.nameWithGranularity === nameWithGranularity);
|
|
@@ -38666,6 +38667,40 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
38666
38667
|
if (!measure) throw new EvaluationError(_t("Field %s is not a measure", id));
|
|
38667
38668
|
return measure;
|
|
38668
38669
|
}
|
|
38670
|
+
createPivotDimension(fields, dimension) {
|
|
38671
|
+
const field = fields[dimension.fieldName];
|
|
38672
|
+
const type = field?.type ?? "integer";
|
|
38673
|
+
const granularity = field && isDateOrDatetimeField(field) ? dimension.granularity : void 0;
|
|
38674
|
+
return {
|
|
38675
|
+
/**
|
|
38676
|
+
* Get the display name of the dimension
|
|
38677
|
+
* e.g. "stage_id" -> "Stage", "create_date:month" -> "Create Date"
|
|
38678
|
+
*/
|
|
38679
|
+
displayName: field?.string ?? dimension.fieldName,
|
|
38680
|
+
/**
|
|
38681
|
+
* Get the name of the dimension, as it is stored in the pivot formula
|
|
38682
|
+
* e.g. "stage_id", "create_date:month"
|
|
38683
|
+
*/
|
|
38684
|
+
nameWithGranularity: dimension.fieldName + (granularity ? `:${granularity}` : ""),
|
|
38685
|
+
/**
|
|
38686
|
+
* Get the name of the field of the dimension
|
|
38687
|
+
* e.g. "stage_id" -> "stage_id", "create_date:month" -> "create_date"
|
|
38688
|
+
*/
|
|
38689
|
+
fieldName: dimension.fieldName,
|
|
38690
|
+
/**
|
|
38691
|
+
* Get the aggregate operator of the dimension
|
|
38692
|
+
* e.g. "stage_id" -> undefined, "create_date:month" -> "month"
|
|
38693
|
+
*/
|
|
38694
|
+
granularity,
|
|
38695
|
+
/**
|
|
38696
|
+
* Get the type of the field of the dimension
|
|
38697
|
+
* e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
|
|
38698
|
+
*/
|
|
38699
|
+
type,
|
|
38700
|
+
order: dimension.order,
|
|
38701
|
+
isValid: !!field
|
|
38702
|
+
};
|
|
38703
|
+
}
|
|
38669
38704
|
};
|
|
38670
38705
|
function createMeasure(fields, measure) {
|
|
38671
38706
|
const fieldName = measure.fieldName;
|
|
@@ -38709,40 +38744,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
38709
38744
|
display: measure.display
|
|
38710
38745
|
};
|
|
38711
38746
|
}
|
|
38712
|
-
function createPivotDimension(fields, dimension) {
|
|
38713
|
-
const field = fields[dimension.fieldName];
|
|
38714
|
-
const type = field?.type ?? "integer";
|
|
38715
|
-
const granularity = field && isDateOrDatetimeField(field) ? dimension.granularity : void 0;
|
|
38716
|
-
return {
|
|
38717
|
-
/**
|
|
38718
|
-
* Get the display name of the dimension
|
|
38719
|
-
* e.g. "stage_id" -> "Stage", "create_date:month" -> "Create Date"
|
|
38720
|
-
*/
|
|
38721
|
-
displayName: field?.string ?? dimension.fieldName,
|
|
38722
|
-
/**
|
|
38723
|
-
* Get the name of the dimension, as it is stored in the pivot formula
|
|
38724
|
-
* e.g. "stage_id", "create_date:month"
|
|
38725
|
-
*/
|
|
38726
|
-
nameWithGranularity: dimension.fieldName + (granularity ? `:${granularity}` : ""),
|
|
38727
|
-
/**
|
|
38728
|
-
* Get the name of the field of the dimension
|
|
38729
|
-
* e.g. "stage_id" -> "stage_id", "create_date:month" -> "create_date"
|
|
38730
|
-
*/
|
|
38731
|
-
fieldName: dimension.fieldName,
|
|
38732
|
-
/**
|
|
38733
|
-
* Get the aggregate operator of the dimension
|
|
38734
|
-
* e.g. "stage_id" -> undefined, "create_date:month" -> "month"
|
|
38735
|
-
*/
|
|
38736
|
-
granularity,
|
|
38737
|
-
/**
|
|
38738
|
-
* Get the type of the field of the dimension
|
|
38739
|
-
* e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
|
|
38740
|
-
*/
|
|
38741
|
-
type,
|
|
38742
|
-
order: dimension.order,
|
|
38743
|
-
isValid: !!field
|
|
38744
|
-
};
|
|
38745
|
-
}
|
|
38746
38747
|
|
|
38747
38748
|
//#endregion
|
|
38748
38749
|
//#region src/helpers/pivot/spreadsheet_pivot/runtime_definition_spreadsheet_pivot.ts
|
|
@@ -41392,11 +41393,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
41392
41393
|
getResizerPosition(resizer) {
|
|
41393
41394
|
const anchorCenteringOffset = (ANCHOR_SIZE - ACTIVE_BORDER_WIDTH) / 2;
|
|
41394
41395
|
const style = {};
|
|
41395
|
-
if (resizer.includes("top")) style.top =
|
|
41396
|
-
else if (resizer.includes("bottom")) style.bottom =
|
|
41396
|
+
if (resizer.includes("top")) style.top = `-3px`;
|
|
41397
|
+
else if (resizer.includes("bottom")) style.bottom = `-3px`;
|
|
41397
41398
|
else style.bottom = `calc(50% - ${anchorCenteringOffset}px)`;
|
|
41398
|
-
if (resizer.includes("left")) style.left =
|
|
41399
|
-
else if (resizer.includes("right")) style.right =
|
|
41399
|
+
if (resizer.includes("left")) style.left = `-3px`;
|
|
41400
|
+
else if (resizer.includes("right")) style.right = `-3px`;
|
|
41400
41401
|
else style.right = `calc(50% - ${anchorCenteringOffset}px)`;
|
|
41401
41402
|
return cssPropertiesToCss(style);
|
|
41402
41403
|
}
|
|
@@ -41778,8 +41779,12 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
41778
41779
|
}
|
|
41779
41780
|
stopEdition(direction) {
|
|
41780
41781
|
if (this.canStopEdition()) {
|
|
41782
|
+
const { col, row } = this.currentEditedCell;
|
|
41781
41783
|
this._stopEdition();
|
|
41782
|
-
if (direction)
|
|
41784
|
+
if (direction) {
|
|
41785
|
+
this.model.selection.selectCell(col, row);
|
|
41786
|
+
this.model.selection.moveAnchorCell(direction, 1);
|
|
41787
|
+
}
|
|
41783
41788
|
return;
|
|
41784
41789
|
}
|
|
41785
41790
|
const editedCell = this.currentEditedCell;
|
|
@@ -52425,6 +52430,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
52425
52430
|
case "CREATE_CHART":
|
|
52426
52431
|
this.tryToAddColors(this.getChartColors(cmd.id));
|
|
52427
52432
|
break;
|
|
52433
|
+
case "COLOR_SHEET":
|
|
52434
|
+
if (cmd.color) this.tryToAddColors([cmd.color]);
|
|
52435
|
+
break;
|
|
52428
52436
|
case "UPDATE_CELL":
|
|
52429
52437
|
case "ADD_CONDITIONAL_FORMAT":
|
|
52430
52438
|
case "SET_BORDER":
|
|
@@ -52447,8 +52455,12 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
52447
52455
|
}
|
|
52448
52456
|
computeCustomColors() {
|
|
52449
52457
|
let usedColors = [];
|
|
52450
|
-
for (const sheetId of this.getters.getSheetIds()) usedColors = usedColors.concat(this.getColorsFromCells(sheetId), this.getFormattingColors(sheetId), this.getTableColors(sheetId));
|
|
52451
|
-
return [
|
|
52458
|
+
for (const sheetId of this.getters.getSheetIds()) usedColors = usedColors.concat(this.getSheetColors(sheetId), this.getColorsFromCells(sheetId), this.getFormattingColors(sheetId), this.getTableColors(sheetId));
|
|
52459
|
+
return [.../* @__PURE__ */ new Set([...usedColors])];
|
|
52460
|
+
}
|
|
52461
|
+
getSheetColors(sheetId) {
|
|
52462
|
+
const sheet = this.getters.getSheet(sheetId);
|
|
52463
|
+
return sheet.color ? [sheet.color] : [];
|
|
52452
52464
|
}
|
|
52453
52465
|
getColorsFromCells(sheetId) {
|
|
52454
52466
|
const cells = Object.values(this.getters.getCells(sheetId));
|
|
@@ -56618,7 +56630,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
56618
56630
|
};
|
|
56619
56631
|
}
|
|
56620
56632
|
};
|
|
56621
|
-
const invalidateTableStyleCommandsSet = new Set([
|
|
56633
|
+
const invalidateTableStyleCommandsSet = /* @__PURE__ */ new Set([
|
|
56622
56634
|
"HIDE_COLUMNS_ROWS",
|
|
56623
56635
|
"UNHIDE_COLUMNS_ROWS",
|
|
56624
56636
|
"UNFOLD_HEADER_GROUP",
|
|
@@ -60008,11 +60020,14 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
60008
60020
|
}
|
|
60009
60021
|
});
|
|
60010
60022
|
this.DOMFocusableElementStore = useStore(DOMFocusableElementStore);
|
|
60011
|
-
(0, _odoo_owl.useExternalListener)(window, "click", ()
|
|
60023
|
+
(0, _odoo_owl.useExternalListener)(window, "click", this.onExternalClick.bind(this), { capture: true });
|
|
60012
60024
|
(0, _odoo_owl.useEffect)((sheetId) => {
|
|
60013
60025
|
if (this.props.sheetId === sheetId) this.scrollToSheet();
|
|
60014
60026
|
}, () => [this.env.model.getters.getActiveSheetId()]);
|
|
60015
60027
|
}
|
|
60028
|
+
onExternalClick(ev) {
|
|
60029
|
+
if (!ev.target.closest(".o-color-picker")) this.state.pickerOpened = false;
|
|
60030
|
+
}
|
|
60016
60031
|
focusInputAndSelectContent() {
|
|
60017
60032
|
if (!this.state.isEditing || !this.sheetNameRef.el) return;
|
|
60018
60033
|
this.sheetNameRef.el.focus();
|
|
@@ -60109,6 +60124,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
60109
60124
|
},
|
|
60110
60125
|
openSheetColorPickerCallback: () => {
|
|
60111
60126
|
this.state.pickerOpened = true;
|
|
60127
|
+
const sheet = this.env.model.getters.getSheet(this.props.sheetId);
|
|
60128
|
+
this.state.currentPickerColor = sheet.color;
|
|
60112
60129
|
}
|
|
60113
60130
|
});
|
|
60114
60131
|
}
|
|
@@ -64043,11 +64060,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
64043
64060
|
<!-- each data marker in the series does not have a different color -->
|
|
64044
64061
|
<c:varyColors val="0"/>
|
|
64045
64062
|
${joinXmlNodes(rightDataSetsNodes)}
|
|
64046
|
-
<c:axId val="${
|
|
64047
|
-
<c:axId val="${
|
|
64063
|
+
<c:axId val="${17781238}" />
|
|
64064
|
+
<c:axId val="${88853994}" />
|
|
64048
64065
|
</c:barChart>
|
|
64049
|
-
${addAx("b", "c:catAx",
|
|
64050
|
-
${addAx("r", "c:valAx",
|
|
64066
|
+
${addAx("b", "c:catAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
|
|
64067
|
+
${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
|
|
64051
64068
|
` : ""}`;
|
|
64052
64069
|
}
|
|
64053
64070
|
function addComboChart(chart) {
|
|
@@ -64202,11 +64219,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
64202
64219
|
<!-- each data marker in the series does not have a different color -->
|
|
64203
64220
|
<c:varyColors val="0"/>
|
|
64204
64221
|
${joinXmlNodes(rightDataSetsNodes)}
|
|
64205
|
-
<c:axId val="${
|
|
64206
|
-
<c:axId val="${
|
|
64222
|
+
<c:axId val="${17781238}" />
|
|
64223
|
+
<c:axId val="${88853994}" />
|
|
64207
64224
|
</c:lineChart>
|
|
64208
|
-
${addAx("b", "c:catAx",
|
|
64209
|
-
${addAx("r", "c:valAx",
|
|
64225
|
+
${addAx("b", "c:catAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
|
|
64226
|
+
${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
|
|
64210
64227
|
` : ""}
|
|
64211
64228
|
`;
|
|
64212
64229
|
}
|
|
@@ -64268,11 +64285,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
64268
64285
|
<c:varyColors val="0"/>
|
|
64269
64286
|
<c:scatterStyle val="lineMarker"/>
|
|
64270
64287
|
${joinXmlNodes(rightDataSetsNodes)}
|
|
64271
|
-
<c:axId val="${
|
|
64272
|
-
<c:axId val="${
|
|
64288
|
+
<c:axId val="${17781238}" />
|
|
64289
|
+
<c:axId val="${88853994}" />
|
|
64273
64290
|
</c:scatterChart>
|
|
64274
|
-
${addAx("b", "c:valAx",
|
|
64275
|
-
${addAx("r", "c:valAx",
|
|
64291
|
+
${addAx("b", "c:valAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
|
|
64292
|
+
${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
|
|
64276
64293
|
` : ""}`;
|
|
64277
64294
|
}
|
|
64278
64295
|
function addDoughnutChart(chart, chartSheetIndex, data, { holeSize } = { holeSize: 50 }) {
|
|
@@ -66375,8 +66392,8 @@ exports.stores = stores;
|
|
|
66375
66392
|
exports.tokenColors = tokenColors;
|
|
66376
66393
|
exports.tokenize = tokenize;
|
|
66377
66394
|
|
|
66378
|
-
__info__.version = "18.0.
|
|
66379
|
-
__info__.date = "2026-
|
|
66380
|
-
__info__.hash = "
|
|
66395
|
+
__info__.version = "18.0.73";
|
|
66396
|
+
__info__.date = "2026-07-01T05:00:54.172Z";
|
|
66397
|
+
__info__.hash = "1a9c761";
|
|
66381
66398
|
|
|
66382
66399
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|