@odoo/o-spreadsheet 18.4.43 → 18.4.46
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 +109 -105
- package/dist/o_spreadsheet.iife.js +109 -105
- package/dist/o_spreadsheet.iife.min.js +211 -211
- package/dist/o_spreadsheet.xml +4 -4
- package/package.json +7 -2
- package/dist/o_spreadsheet.cjs.js +0 -75614
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 18.4.
|
|
6
|
-
* @date 2026-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.4.46
|
|
6
|
+
* @date 2026-07-01T05:02:56.676Z
|
|
7
|
+
* @hash 26297b3
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function(exports, _odoo_owl) {
|
|
@@ -215,7 +215,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
215
215
|
const GRAY_200 = "#E7E9ED";
|
|
216
216
|
const GRAY_100 = "#F9FAFB";
|
|
217
217
|
const TEXT_BODY = "#374151";
|
|
218
|
-
const TEXT_BODY_MUTED =
|
|
218
|
+
const TEXT_BODY_MUTED = "#374151C2";
|
|
219
219
|
const TEXT_HEADING = "#111827";
|
|
220
220
|
const PRIMARY_BUTTON_BG = "#714B67";
|
|
221
221
|
const PRIMARY_BUTTON_HOVER_BG = "#624159";
|
|
@@ -322,9 +322,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
322
322
|
];
|
|
323
323
|
const DEFAULT_CELL_HEIGHT = 23;
|
|
324
324
|
const FOOTER_HEIGHT = 2 * 23;
|
|
325
|
-
const MENU_SEPARATOR_BORDER_WIDTH = 1;
|
|
326
|
-
const MENU_SEPARATOR_PADDING = 5;
|
|
327
|
-
const MENU_SEPARATOR_HEIGHT = 1 + 2 * 5;
|
|
328
325
|
const DEFAULT_STYLE = {
|
|
329
326
|
align: "left",
|
|
330
327
|
verticalAlign: "bottom",
|
|
@@ -344,7 +341,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
344
341
|
const DEFAULT_VERTICAL_ALIGN = DEFAULT_STYLE.verticalAlign;
|
|
345
342
|
const DEFAULT_WRAPPING_MODE = DEFAULT_STYLE.wrapping;
|
|
346
343
|
const DEFAULT_FONT_SIZE = DEFAULT_STYLE.fontSize;
|
|
347
|
-
const DEFAULT_FONT = "'Roboto', arial";
|
|
344
|
+
const DEFAULT_FONT = "'Roboto', arial, 'Liberation Sans'";
|
|
348
345
|
const DEFAULT_BORDER_DESC = {
|
|
349
346
|
style: "thin",
|
|
350
347
|
color: "#000000"
|
|
@@ -1626,7 +1623,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1626
1623
|
function isZoneDependent(cmd) {
|
|
1627
1624
|
return "sheetId" in cmd && "zone" in cmd;
|
|
1628
1625
|
}
|
|
1629
|
-
const invalidateEvaluationCommands = new Set([
|
|
1626
|
+
const invalidateEvaluationCommands = /* @__PURE__ */ new Set([
|
|
1630
1627
|
"RENAME_SHEET",
|
|
1631
1628
|
"DELETE_SHEET",
|
|
1632
1629
|
"CREATE_SHEET",
|
|
@@ -1645,7 +1642,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1645
1642
|
"REMOVE_PIVOT",
|
|
1646
1643
|
"DUPLICATE_PIVOT"
|
|
1647
1644
|
]);
|
|
1648
|
-
const invalidateChartEvaluationCommands = new Set([
|
|
1645
|
+
const invalidateChartEvaluationCommands = /* @__PURE__ */ new Set([
|
|
1649
1646
|
"EVALUATE_CELLS",
|
|
1650
1647
|
"EVALUATE_CHARTS",
|
|
1651
1648
|
"UPDATE_CELL",
|
|
@@ -1664,20 +1661,20 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1664
1661
|
"UNDO",
|
|
1665
1662
|
"REDO"
|
|
1666
1663
|
]);
|
|
1667
|
-
const invalidateDependenciesCommands = new Set(["MOVE_RANGES"]);
|
|
1668
|
-
const invalidateCFEvaluationCommands = new Set([
|
|
1664
|
+
const invalidateDependenciesCommands = /* @__PURE__ */ new Set(["MOVE_RANGES"]);
|
|
1665
|
+
const invalidateCFEvaluationCommands = /* @__PURE__ */ new Set([
|
|
1669
1666
|
"EVALUATE_CELLS",
|
|
1670
1667
|
"ADD_CONDITIONAL_FORMAT",
|
|
1671
1668
|
"REMOVE_CONDITIONAL_FORMAT",
|
|
1672
1669
|
"CHANGE_CONDITIONAL_FORMAT_PRIORITY"
|
|
1673
1670
|
]);
|
|
1674
|
-
const invalidateBordersCommands = new Set([
|
|
1671
|
+
const invalidateBordersCommands = /* @__PURE__ */ new Set([
|
|
1675
1672
|
"AUTOFILL_CELL",
|
|
1676
1673
|
"SET_BORDER",
|
|
1677
1674
|
"SET_ZONE_BORDERS",
|
|
1678
1675
|
"SET_BORDERS_ON_TARGET"
|
|
1679
1676
|
]);
|
|
1680
|
-
const readonlyAllowedCommands = new Set([
|
|
1677
|
+
const readonlyAllowedCommands = /* @__PURE__ */ new Set([
|
|
1681
1678
|
"START",
|
|
1682
1679
|
"ACTIVATE_SHEET",
|
|
1683
1680
|
"COPY",
|
|
@@ -1689,7 +1686,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1689
1686
|
"UPDATE_FILTER",
|
|
1690
1687
|
"UPDATE_CHART"
|
|
1691
1688
|
]);
|
|
1692
|
-
const coreTypes = new Set([
|
|
1689
|
+
const coreTypes = /* @__PURE__ */ new Set([
|
|
1693
1690
|
"UPDATE_CELL",
|
|
1694
1691
|
"UPDATE_CELL_POSITION",
|
|
1695
1692
|
"CLEAR_CELL",
|
|
@@ -1921,7 +1918,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1921
1918
|
|
|
1922
1919
|
//#endregion
|
|
1923
1920
|
//#region src/types/conditional_formatting.ts
|
|
1924
|
-
const availableConditionalFormatOperators = new Set([
|
|
1921
|
+
const availableConditionalFormatOperators = /* @__PURE__ */ new Set([
|
|
1925
1922
|
"containsText",
|
|
1926
1923
|
"notContainsText",
|
|
1927
1924
|
"isGreaterThan",
|
|
@@ -1940,7 +1937,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1940
1937
|
|
|
1941
1938
|
//#endregion
|
|
1942
1939
|
//#region src/types/data_validation.ts
|
|
1943
|
-
const availableDataValidationOperators = new Set([
|
|
1940
|
+
const availableDataValidationOperators = /* @__PURE__ */ new Set([
|
|
1944
1941
|
"containsText",
|
|
1945
1942
|
"notContainsText",
|
|
1946
1943
|
"isEqualText",
|
|
@@ -2665,12 +2662,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2665
2662
|
const pIntegerAndDecimals = `(?:\\d+(?:${escapeRegExp(locale.thousandsSeparator || "")}\\d{3,})*(?:${decimalSeparator}\\d*)?)`;
|
|
2666
2663
|
const pOnlyDecimals = `(?:${decimalSeparator}\\d+)`;
|
|
2667
2664
|
const pNumber = "(?:\\s*" + pIntegerAndDecimals + "|" + pOnlyDecimals + ")(?:e(?:\\+|-)?\\d+)?(?:\\s*%)?";
|
|
2668
|
-
const pMinus = "(?:\\s*-)?";
|
|
2669
|
-
const pCurrencyFormat = "(?:\\s*[\\$€])?";
|
|
2670
2665
|
const pNumberExp = "^(?:(?:" + [
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2666
|
+
"(?:\\s*-)?(?:\\s*[\\$€])?" + pNumber,
|
|
2667
|
+
"(?:\\s*-)?" + pNumber + "(?:\\s*[\\$€])?",
|
|
2668
|
+
"(?:\\s*[\\$€])?(?:\\s*-)?" + pNumber
|
|
2674
2669
|
].join(")|(?:") + "))$";
|
|
2675
2670
|
return new RegExp(pNumberExp, "i");
|
|
2676
2671
|
});
|
|
@@ -4581,7 +4576,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
4581
4576
|
function recomputeZones(zones, zonesToRemove = []) {
|
|
4582
4577
|
if (zones.length <= 1 && zonesToRemove.length === 0) return zones;
|
|
4583
4578
|
const profilesStartingPosition = [0];
|
|
4584
|
-
const profiles = new Map([[0, []]]);
|
|
4579
|
+
const profiles = /* @__PURE__ */ new Map([[0, []]]);
|
|
4585
4580
|
modifyProfiles(profilesStartingPosition, profiles, zones, false);
|
|
4586
4581
|
modifyProfiles(profilesStartingPosition, profiles, zonesToRemove, true);
|
|
4587
4582
|
return constructZonesFromProfiles(profilesStartingPosition, profiles);
|
|
@@ -5320,7 +5315,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5320
5315
|
//#region src/helpers/edge_scrolling.ts
|
|
5321
5316
|
const MAX_DELAY = 140;
|
|
5322
5317
|
const MIN_DELAY = 20;
|
|
5323
|
-
const ACCELERATION = .035;
|
|
5324
5318
|
/**
|
|
5325
5319
|
* Decreasing exponential function used to determine the "speed" of edge-scrolling
|
|
5326
5320
|
* as the timeout delay.
|
|
@@ -5328,7 +5322,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5328
5322
|
* Returns a timeout delay in milliseconds.
|
|
5329
5323
|
*/
|
|
5330
5324
|
function scrollDelay(value) {
|
|
5331
|
-
return 20 + (140 - 20) * Math.exp(
|
|
5325
|
+
return 20 + (140 - 20) * Math.exp(-.035 * (value - 1));
|
|
5332
5326
|
}
|
|
5333
5327
|
|
|
5334
5328
|
//#endregion
|
|
@@ -6154,7 +6148,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
6154
6148
|
smallUuid() {
|
|
6155
6149
|
if (window.crypto) return "10000000-1000".replace(/[01]/g, (c) => {
|
|
6156
6150
|
const n = Number(c);
|
|
6157
|
-
return (n ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
6151
|
+
return (n ^ crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
6158
6152
|
});
|
|
6159
6153
|
else return "xxxxxxxx-xxxx".replace(/[xy]/g, function(c) {
|
|
6160
6154
|
const r = Math.random() * 16 | 0;
|
|
@@ -6168,7 +6162,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
6168
6162
|
uuidv4() {
|
|
6169
6163
|
if (window.crypto) return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => {
|
|
6170
6164
|
const n = Number(c);
|
|
6171
|
-
return (n ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
6165
|
+
return (n ^ crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
6172
6166
|
});
|
|
6173
6167
|
else return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
|
|
6174
6168
|
const r = Math.random() * 16 | 0;
|
|
@@ -7612,10 +7606,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
7612
7606
|
type: dimension.type
|
|
7613
7607
|
}));
|
|
7614
7608
|
if (groupValueString.toLowerCase() === "false") return false;
|
|
7615
|
-
return pivotNormalizationValueRegistry.get(dimension.type)(groupValueString, dimension
|
|
7609
|
+
return pivotNormalizationValueRegistry.get(dimension.type)(groupValueString, dimension);
|
|
7616
7610
|
}
|
|
7617
|
-
function normalizeDateTime(value,
|
|
7618
|
-
return pivotTimeAdapter(granularity ?? "month").normalizeFunctionValue(value);
|
|
7611
|
+
function normalizeDateTime(value, dimension) {
|
|
7612
|
+
return pivotTimeAdapter(dimension.granularity ?? "month").normalizeFunctionValue(value);
|
|
7619
7613
|
}
|
|
7620
7614
|
function toFunctionPivotValue(value, dimension) {
|
|
7621
7615
|
if (value === null) return `"null"`;
|
|
@@ -26263,11 +26257,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
26263
26257
|
getResizerPosition(resizer) {
|
|
26264
26258
|
const anchorCenteringOffset = (ANCHOR_SIZE - ACTIVE_BORDER_WIDTH) / 2;
|
|
26265
26259
|
const style = {};
|
|
26266
|
-
if (resizer.includes("top")) style.top =
|
|
26267
|
-
else if (resizer.includes("bottom")) style.bottom =
|
|
26260
|
+
if (resizer.includes("top")) style.top = `-3px`;
|
|
26261
|
+
else if (resizer.includes("bottom")) style.bottom = `-3px`;
|
|
26268
26262
|
else style.bottom = `calc(50% - ${anchorCenteringOffset}px)`;
|
|
26269
|
-
if (resizer.includes("left")) style.left =
|
|
26270
|
-
else if (resizer.includes("right")) style.right =
|
|
26263
|
+
if (resizer.includes("left")) style.left = `-3px`;
|
|
26264
|
+
else if (resizer.includes("right")) style.right = `-3px`;
|
|
26271
26265
|
else style.right = `calc(50% - ${anchorCenteringOffset}px)`;
|
|
26272
26266
|
return cssPropertiesToCss(style);
|
|
26273
26267
|
}
|
|
@@ -29228,11 +29222,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29228
29222
|
const LINE_VERTICAL_PADDING = 1;
|
|
29229
29223
|
const PICKER_PADDING = 8;
|
|
29230
29224
|
const ITEM_BORDER_WIDTH = 1;
|
|
29231
|
-
const ITEM_EDGE_LENGTH = 18;
|
|
29232
29225
|
const ITEMS_PER_LINE = 10;
|
|
29233
29226
|
const MAGNIFIER_EDGE = 16;
|
|
29234
29227
|
const ITEM_GAP = 2;
|
|
29235
|
-
const CONTENT_WIDTH =
|
|
29228
|
+
const CONTENT_WIDTH = 218;
|
|
29236
29229
|
const INNER_GRADIENT_WIDTH = CONTENT_WIDTH - 2 * ITEM_BORDER_WIDTH;
|
|
29237
29230
|
const INNER_GRADIENT_HEIGHT = CONTENT_WIDTH - 30 - 2 * ITEM_BORDER_WIDTH;
|
|
29238
29231
|
css`
|
|
@@ -29244,7 +29237,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29244
29237
|
line-height: 1.2;
|
|
29245
29238
|
overflow-y: auto;
|
|
29246
29239
|
overflow-x: hidden;
|
|
29247
|
-
width: ${
|
|
29240
|
+
width: ${234}px;
|
|
29248
29241
|
|
|
29249
29242
|
.o-color-picker-section-name {
|
|
29250
29243
|
margin: 0px ${ITEM_BORDER_WIDTH}px;
|
|
@@ -29270,8 +29263,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29270
29263
|
}
|
|
29271
29264
|
}
|
|
29272
29265
|
.o-color-picker-line-item {
|
|
29273
|
-
width: ${
|
|
29274
|
-
height: ${
|
|
29266
|
+
width: ${20}px;
|
|
29267
|
+
height: ${20}px;
|
|
29275
29268
|
margin: 0px;
|
|
29276
29269
|
border-radius: 50px;
|
|
29277
29270
|
border: ${ITEM_BORDER_WIDTH}px solid #666666;
|
|
@@ -29315,13 +29308,13 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29315
29308
|
}
|
|
29316
29309
|
|
|
29317
29310
|
.o-custom-selector {
|
|
29318
|
-
padding: ${
|
|
29311
|
+
padding: ${10}px ${PICKER_PADDING}px;
|
|
29319
29312
|
position: relative;
|
|
29320
29313
|
.o-gradient {
|
|
29321
29314
|
margin-bottom: ${MAGNIFIER_EDGE / 2}px;
|
|
29322
29315
|
border: ${ITEM_BORDER_WIDTH}px solid #c0c0c0;
|
|
29323
|
-
width: ${
|
|
29324
|
-
height: ${
|
|
29316
|
+
width: ${218}px;
|
|
29317
|
+
height: ${188}px;
|
|
29325
29318
|
position: relative;
|
|
29326
29319
|
}
|
|
29327
29320
|
|
|
@@ -29459,8 +29452,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
29459
29452
|
const left = Math.round(INNER_GRADIENT_WIDTH * clip(s / 100, 0, 1));
|
|
29460
29453
|
const top = Math.round(INNER_GRADIENT_HEIGHT * clip(1 - 2 * l / (200 - s), 0, 1));
|
|
29461
29454
|
return cssPropertiesToCss({
|
|
29462
|
-
left: `${-
|
|
29463
|
-
top: `${-
|
|
29455
|
+
left: `${-16 / 2 + left}px`,
|
|
29456
|
+
top: `${-16 / 2 + top}px`,
|
|
29464
29457
|
background: hslaToHex(this.state.currentHslaColor)
|
|
29465
29458
|
});
|
|
29466
29459
|
}
|
|
@@ -31642,17 +31635,16 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
31642
31635
|
|
|
31643
31636
|
//#endregion
|
|
31644
31637
|
//#region src/components/link/link_editor/link_editor.ts
|
|
31645
|
-
const PADDING = 12;
|
|
31646
31638
|
css`
|
|
31647
31639
|
.o-link-editor {
|
|
31648
31640
|
font-size: 13px;
|
|
31649
31641
|
background-color: white;
|
|
31650
31642
|
box-shadow: 0 1px 4px 3px rgba(60, 64, 67, 0.15);
|
|
31651
|
-
padding: ${
|
|
31643
|
+
padding: ${12}px;
|
|
31652
31644
|
display: flex;
|
|
31653
31645
|
flex-direction: column;
|
|
31654
31646
|
border-radius: 4px;
|
|
31655
|
-
width: ${
|
|
31647
|
+
width: ${364}px;
|
|
31656
31648
|
|
|
31657
31649
|
.o-section {
|
|
31658
31650
|
.o-section-title {
|
|
@@ -48703,8 +48695,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
48703
48695
|
collapsedDomains;
|
|
48704
48696
|
constructor(definition, fields) {
|
|
48705
48697
|
this.measures = definition.measures.map((measure) => createMeasure(fields, measure));
|
|
48706
|
-
this.columns = definition.columns.map((dimension) => createPivotDimension(fields, dimension));
|
|
48707
|
-
this.rows = definition.rows.map((dimension) => createPivotDimension(fields, dimension));
|
|
48698
|
+
this.columns = definition.columns.map((dimension) => this.createPivotDimension(fields, dimension));
|
|
48699
|
+
this.rows = definition.rows.map((dimension) => this.createPivotDimension(fields, dimension));
|
|
48708
48700
|
this.sortedColumn = definition.sortedColumn;
|
|
48709
48701
|
this.collapsedDomains = definition.collapsedDomains;
|
|
48710
48702
|
}
|
|
@@ -48718,6 +48710,40 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
48718
48710
|
if (!measure) throw new EvaluationError(_t("Field %s is not a measure", id));
|
|
48719
48711
|
return measure;
|
|
48720
48712
|
}
|
|
48713
|
+
createPivotDimension(fields, dimension) {
|
|
48714
|
+
const field = fields[dimension.fieldName];
|
|
48715
|
+
const type = field?.type ?? "integer";
|
|
48716
|
+
const granularity = field && isDateOrDatetimeField(field) ? dimension.granularity : void 0;
|
|
48717
|
+
return {
|
|
48718
|
+
/**
|
|
48719
|
+
* Get the display name of the dimension
|
|
48720
|
+
* e.g. "stage_id" -> "Stage", "create_date:month" -> "Create Date"
|
|
48721
|
+
*/
|
|
48722
|
+
displayName: field?.string ?? dimension.fieldName,
|
|
48723
|
+
/**
|
|
48724
|
+
* Get the name of the dimension, as it is stored in the pivot formula
|
|
48725
|
+
* e.g. "stage_id", "create_date:month"
|
|
48726
|
+
*/
|
|
48727
|
+
nameWithGranularity: dimension.fieldName + (granularity ? `:${granularity}` : ""),
|
|
48728
|
+
/**
|
|
48729
|
+
* Get the name of the field of the dimension
|
|
48730
|
+
* e.g. "stage_id" -> "stage_id", "create_date:month" -> "create_date"
|
|
48731
|
+
*/
|
|
48732
|
+
fieldName: dimension.fieldName,
|
|
48733
|
+
/**
|
|
48734
|
+
* Get the aggregate operator of the dimension
|
|
48735
|
+
* e.g. "stage_id" -> undefined, "create_date:month" -> "month"
|
|
48736
|
+
*/
|
|
48737
|
+
granularity,
|
|
48738
|
+
/**
|
|
48739
|
+
* Get the type of the field of the dimension
|
|
48740
|
+
* e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
|
|
48741
|
+
*/
|
|
48742
|
+
type,
|
|
48743
|
+
order: dimension.order,
|
|
48744
|
+
isValid: !!field
|
|
48745
|
+
};
|
|
48746
|
+
}
|
|
48721
48747
|
};
|
|
48722
48748
|
function createMeasure(fields, measure) {
|
|
48723
48749
|
const fieldName = measure.fieldName;
|
|
@@ -48761,40 +48787,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
48761
48787
|
display: measure.display
|
|
48762
48788
|
};
|
|
48763
48789
|
}
|
|
48764
|
-
function createPivotDimension(fields, dimension) {
|
|
48765
|
-
const field = fields[dimension.fieldName];
|
|
48766
|
-
const type = field?.type ?? "integer";
|
|
48767
|
-
const granularity = field && isDateOrDatetimeField(field) ? dimension.granularity : void 0;
|
|
48768
|
-
return {
|
|
48769
|
-
/**
|
|
48770
|
-
* Get the display name of the dimension
|
|
48771
|
-
* e.g. "stage_id" -> "Stage", "create_date:month" -> "Create Date"
|
|
48772
|
-
*/
|
|
48773
|
-
displayName: field?.string ?? dimension.fieldName,
|
|
48774
|
-
/**
|
|
48775
|
-
* Get the name of the dimension, as it is stored in the pivot formula
|
|
48776
|
-
* e.g. "stage_id", "create_date:month"
|
|
48777
|
-
*/
|
|
48778
|
-
nameWithGranularity: dimension.fieldName + (granularity ? `:${granularity}` : ""),
|
|
48779
|
-
/**
|
|
48780
|
-
* Get the name of the field of the dimension
|
|
48781
|
-
* e.g. "stage_id" -> "stage_id", "create_date:month" -> "create_date"
|
|
48782
|
-
*/
|
|
48783
|
-
fieldName: dimension.fieldName,
|
|
48784
|
-
/**
|
|
48785
|
-
* Get the aggregate operator of the dimension
|
|
48786
|
-
* e.g. "stage_id" -> undefined, "create_date:month" -> "month"
|
|
48787
|
-
*/
|
|
48788
|
-
granularity,
|
|
48789
|
-
/**
|
|
48790
|
-
* Get the type of the field of the dimension
|
|
48791
|
-
* e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
|
|
48792
|
-
*/
|
|
48793
|
-
type,
|
|
48794
|
-
order: dimension.order,
|
|
48795
|
-
isValid: !!field
|
|
48796
|
-
};
|
|
48797
|
-
}
|
|
48798
48790
|
|
|
48799
48791
|
//#endregion
|
|
48800
48792
|
//#region src/helpers/pivot/spreadsheet_pivot/runtime_definition_spreadsheet_pivot.ts
|
|
@@ -51911,7 +51903,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
51911
51903
|
ev.preventDefault();
|
|
51912
51904
|
const clipboardData = ev.clipboardData;
|
|
51913
51905
|
if (!clipboardData) return;
|
|
51914
|
-
const image = [...clipboardData.files]
|
|
51906
|
+
const image = [...clipboardData.files].find((file) => AllowedImageMimeTypes.includes(file.type));
|
|
51915
51907
|
const osClipboard = { content: {
|
|
51916
51908
|
["text/plain"]: clipboardData?.getData("text/plain"),
|
|
51917
51909
|
["text/html"]: clipboardData?.getData("text/html")
|
|
@@ -58672,6 +58664,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
58672
58664
|
case "CREATE_CHART":
|
|
58673
58665
|
this.tryToAddColors(this.getChartColors(cmd.figureId));
|
|
58674
58666
|
break;
|
|
58667
|
+
case "COLOR_SHEET":
|
|
58668
|
+
if (cmd.color) this.tryToAddColors([cmd.color]);
|
|
58669
|
+
break;
|
|
58675
58670
|
case "UPDATE_CELL":
|
|
58676
58671
|
case "ADD_CONDITIONAL_FORMAT":
|
|
58677
58672
|
case "SET_BORDER":
|
|
@@ -58694,8 +58689,12 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
58694
58689
|
}
|
|
58695
58690
|
computeCustomColors() {
|
|
58696
58691
|
let usedColors = [];
|
|
58697
|
-
for (const sheetId of this.getters.getSheetIds()) usedColors = usedColors.concat(this.getColorsFromCells(sheetId), this.getFormattingColors(sheetId), this.getTableColors(sheetId));
|
|
58698
|
-
return [
|
|
58692
|
+
for (const sheetId of this.getters.getSheetIds()) usedColors = usedColors.concat(this.getSheetColors(sheetId), this.getColorsFromCells(sheetId), this.getFormattingColors(sheetId), this.getTableColors(sheetId));
|
|
58693
|
+
return [.../* @__PURE__ */ new Set([...usedColors])];
|
|
58694
|
+
}
|
|
58695
|
+
getSheetColors(sheetId) {
|
|
58696
|
+
const sheet = this.getters.getSheet(sheetId);
|
|
58697
|
+
return sheet.color ? [sheet.color] : [];
|
|
58699
58698
|
}
|
|
58700
58699
|
getColorsFromCells(sheetId) {
|
|
58701
58700
|
const cells = Object.values(this.getters.getCells(sheetId));
|
|
@@ -63666,7 +63665,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
63666
63665
|
};
|
|
63667
63666
|
}
|
|
63668
63667
|
};
|
|
63669
|
-
const invalidateTableStyleCommandsSet = new Set([
|
|
63668
|
+
const invalidateTableStyleCommandsSet = /* @__PURE__ */ new Set([
|
|
63670
63669
|
"HIDE_COLUMNS_ROWS",
|
|
63671
63670
|
"UNHIDE_COLUMNS_ROWS",
|
|
63672
63671
|
"UNFOLD_HEADER_GROUP",
|
|
@@ -65922,14 +65921,14 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
65922
65921
|
adjustPositionX(targetCol) {
|
|
65923
65922
|
const sheetId = this.sheetId;
|
|
65924
65923
|
const { start, end } = this.getters.getColDimensions(sheetId, targetCol);
|
|
65925
|
-
if (this.offsetX + this.viewportWidth + this.offsetCorrectionX < end) this.offsetX = end - this.viewportWidth;
|
|
65924
|
+
if (this.offsetX + this.viewportWidth + this.offsetCorrectionX < end) this.offsetX = end - this.viewportWidth - this.offsetCorrectionX;
|
|
65926
65925
|
else if (this.offsetX + this.offsetCorrectionX > start) this.offsetX = start - this.offsetCorrectionX;
|
|
65927
65926
|
this.adjustViewportZoneX();
|
|
65928
65927
|
}
|
|
65929
65928
|
adjustPositionY(targetRow) {
|
|
65930
65929
|
const sheetId = this.sheetId;
|
|
65931
65930
|
const { start, end } = this.getters.getRowDimensions(sheetId, targetRow);
|
|
65932
|
-
if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) this.offsetY = end - this.viewportHeight;
|
|
65931
|
+
if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) this.offsetY = end - this.viewportHeight - this.offsetCorrectionY;
|
|
65933
65932
|
else if (this.offsetY + this.offsetCorrectionY > start) this.offsetY = start - this.offsetCorrectionY;
|
|
65934
65933
|
this.adjustViewportZoneY();
|
|
65935
65934
|
}
|
|
@@ -68342,11 +68341,14 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
68342
68341
|
}
|
|
68343
68342
|
});
|
|
68344
68343
|
this.DOMFocusableElementStore = useStore(DOMFocusableElementStore);
|
|
68345
|
-
(0, _odoo_owl.useExternalListener)(window, "click", ()
|
|
68344
|
+
(0, _odoo_owl.useExternalListener)(window, "click", this.onExternalClick.bind(this), { capture: true });
|
|
68346
68345
|
(0, _odoo_owl.useEffect)((sheetId) => {
|
|
68347
68346
|
if (this.props.sheetId === sheetId) this.scrollToSheet();
|
|
68348
68347
|
}, () => [this.env.model.getters.getActiveSheetId()]);
|
|
68349
68348
|
}
|
|
68349
|
+
onExternalClick(ev) {
|
|
68350
|
+
if (!ev.target.closest(".o-color-picker")) this.state.pickerOpened = false;
|
|
68351
|
+
}
|
|
68350
68352
|
focusInputAndSelectContent() {
|
|
68351
68353
|
if (!this.state.isEditing || !this.sheetNameRef.el) return;
|
|
68352
68354
|
this.sheetNameRef.el.focus();
|
|
@@ -68448,6 +68450,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
68448
68450
|
},
|
|
68449
68451
|
openSheetColorPickerCallback: () => {
|
|
68450
68452
|
this.state.pickerOpened = true;
|
|
68453
|
+
const sheet = this.env.model.getters.getSheet(this.props.sheetId);
|
|
68454
|
+
this.state.currentPickerColor = sheet.color;
|
|
68451
68455
|
}
|
|
68452
68456
|
});
|
|
68453
68457
|
}
|
|
@@ -72975,11 +72979,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
72975
72979
|
<!-- each data marker in the series does not have a different color -->
|
|
72976
72980
|
<c:varyColors val="0"/>
|
|
72977
72981
|
${joinXmlNodes(rightDataSetsNodes)}
|
|
72978
|
-
<c:axId val="${
|
|
72979
|
-
<c:axId val="${
|
|
72982
|
+
<c:axId val="${17781238}" />
|
|
72983
|
+
<c:axId val="${88853994}" />
|
|
72980
72984
|
</c:barChart>
|
|
72981
|
-
${addAx("b", "c:catAx",
|
|
72982
|
-
${addAx("r", "c:valAx",
|
|
72985
|
+
${addAx("b", "c:catAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
|
|
72986
|
+
${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
|
|
72983
72987
|
` : ""}`;
|
|
72984
72988
|
}
|
|
72985
72989
|
function addComboChart(chart) {
|
|
@@ -73137,11 +73141,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
73137
73141
|
<!-- each data marker in the series does not have a different color -->
|
|
73138
73142
|
<c:varyColors val="0"/>
|
|
73139
73143
|
${joinXmlNodes(rightDataSetsNodes)}
|
|
73140
|
-
<c:axId val="${
|
|
73141
|
-
<c:axId val="${
|
|
73144
|
+
<c:axId val="${17781238}" />
|
|
73145
|
+
<c:axId val="${88853994}" />
|
|
73142
73146
|
</c:lineChart>
|
|
73143
|
-
${addAx("b", "c:catAx",
|
|
73144
|
-
${addAx("r", "c:valAx",
|
|
73147
|
+
${addAx("b", "c:catAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
|
|
73148
|
+
${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
|
|
73145
73149
|
` : ""}
|
|
73146
73150
|
`;
|
|
73147
73151
|
}
|
|
@@ -73204,11 +73208,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
73204
73208
|
<c:varyColors val="0"/>
|
|
73205
73209
|
<c:scatterStyle val="lineMarker"/>
|
|
73206
73210
|
${joinXmlNodes(rightDataSetsNodes)}
|
|
73207
|
-
<c:axId val="${
|
|
73208
|
-
<c:axId val="${
|
|
73211
|
+
<c:axId val="${17781238}" />
|
|
73212
|
+
<c:axId val="${88853994}" />
|
|
73209
73213
|
</c:scatterChart>
|
|
73210
|
-
${addAx("b", "c:valAx",
|
|
73211
|
-
${addAx("r", "c:valAx",
|
|
73214
|
+
${addAx("b", "c:valAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
|
|
73215
|
+
${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
|
|
73212
73216
|
` : ""}`;
|
|
73213
73217
|
}
|
|
73214
73218
|
function addRadarChart(chart) {
|
|
@@ -75426,8 +75430,8 @@ exports.stores = stores;
|
|
|
75426
75430
|
exports.tokenColors = tokenColors;
|
|
75427
75431
|
exports.tokenize = tokenize;
|
|
75428
75432
|
|
|
75429
|
-
__info__.version = "18.4.
|
|
75430
|
-
__info__.date = "2026-
|
|
75431
|
-
__info__.hash = "
|
|
75433
|
+
__info__.version = "18.4.46";
|
|
75434
|
+
__info__.date = "2026-07-01T05:02:56.676Z";
|
|
75435
|
+
__info__.hash = "26297b3";
|
|
75432
75436
|
|
|
75433
75437
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|