@odoo/o-spreadsheet 19.3.7 → 19.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/o_spreadsheet.cjs +241 -165
- package/dist/o_spreadsheet.css +3 -3
- package/dist/o_spreadsheet.esm.js +241 -165
- package/dist/o_spreadsheet.iife.js +241 -165
- package/dist/o_spreadsheet.min.iife.js +27 -29
- 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/components/tables/table_dropdown_button/table_dropdown_button.d.ts +1 -1
- package/dist/types/constants.d.ts +1 -1
- package/dist/types/helpers/internal_viewport.d.ts +1 -0
- package/dist/types/helpers/pivot/pivot_helpers.d.ts +2 -2
- package/dist/types/helpers/viewport_collection.d.ts +1 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/plugins/ui_core_views/custom_colors.d.ts +2 -0
- package/dist/types/registries/chart_data_source_registry.d.ts +3 -1
- package/dist/types/registries/chart_registry.d.ts +2 -4
- package/dist/types/selection_stream/selection_stream_processor.d.ts +1 -1
- package/dist/types/types/event_stream/selection_events.d.ts +1 -0
- package/dist/types/types/selection_stream_processor.d.ts +1 -1
- package/package.json +9 -6
|
@@ -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 19.3.
|
|
6
|
-
* @date 2026-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.3.11
|
|
6
|
+
* @date 2026-07-13T06:26:28.422Z
|
|
7
|
+
* @hash 35c06d3
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function(exports, _odoo_owl) {
|
|
@@ -236,7 +236,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
236
236
|
const GRAY_300 = "#D8DADD";
|
|
237
237
|
const GRAY_200 = "#E7E9ED";
|
|
238
238
|
const TEXT_BODY = "#374151";
|
|
239
|
-
const TEXT_BODY_MUTED =
|
|
239
|
+
const TEXT_BODY_MUTED = "#374151C2";
|
|
240
240
|
const ACTION_COLOR = HIGHLIGHT_COLOR;
|
|
241
241
|
const CHART_TITLE_FONT_SIZE = 16;
|
|
242
242
|
const DEFAULT_CHART_COLOR_SCALE = {
|
|
@@ -329,9 +329,6 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
329
329
|
];
|
|
330
330
|
const DEFAULT_CELL_HEIGHT = 23;
|
|
331
331
|
const FOOTER_HEIGHT = 2 * 23;
|
|
332
|
-
const MENU_SEPARATOR_BORDER_WIDTH = 1;
|
|
333
|
-
const MENU_SEPARATOR_PADDING = 5;
|
|
334
|
-
const MENU_SEPARATOR_HEIGHT = 1 + 2 * 5;
|
|
335
332
|
const ZOOM_VALUES = [
|
|
336
333
|
50,
|
|
337
334
|
75,
|
|
@@ -362,7 +359,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
362
359
|
const DEFAULT_VERTICAL_ALIGN = DEFAULT_STYLE.verticalAlign;
|
|
363
360
|
const DEFAULT_WRAPPING_MODE = DEFAULT_STYLE.wrapping;
|
|
364
361
|
const DEFAULT_FONT_SIZE = DEFAULT_STYLE.fontSize;
|
|
365
|
-
const DEFAULT_FONT = "'Roboto', arial";
|
|
362
|
+
const DEFAULT_FONT = "'Roboto', arial, 'Liberation Sans'";
|
|
366
363
|
const DEFAULT_BORDER_DESC = {
|
|
367
364
|
style: "thin",
|
|
368
365
|
color: "#000000"
|
|
@@ -1234,7 +1231,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
1234
1231
|
function recomputeZones(zones, zonesToRemove = []) {
|
|
1235
1232
|
if (zones.length <= 1 && zonesToRemove.length === 0) return zones;
|
|
1236
1233
|
const profilesStartingPosition = [0];
|
|
1237
|
-
const profiles = new Map([[0, []]]);
|
|
1234
|
+
const profiles = /* @__PURE__ */ new Map([[0, []]]);
|
|
1238
1235
|
modifyProfiles(profilesStartingPosition, profiles, zones, false);
|
|
1239
1236
|
modifyProfiles(profilesStartingPosition, profiles, zonesToRemove, true);
|
|
1240
1237
|
return constructZonesFromProfiles(profilesStartingPosition, profiles);
|
|
@@ -3946,12 +3943,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
3946
3943
|
const pIntegerAndDecimals = `(?:\\d+(?:${escapeRegExp(locale.thousandsSeparator || "")}\\d{3,})*(?:${decimalSeparator}\\d*)?)`;
|
|
3947
3944
|
const pOnlyDecimals = `(?:${decimalSeparator}\\d+)`;
|
|
3948
3945
|
const pNumber = "(?:\\s*" + pIntegerAndDecimals + "|" + pOnlyDecimals + ")(?:(e|E)(?:\\+|-)?(?:[0-9]|[0-9][0-9]|[12][0-9]{2}|30[0-7]))?(?:\\s*%)?";
|
|
3949
|
-
const pMinus = "(?:\\s*-)?";
|
|
3950
|
-
const pCurrencyFormat = "(?:\\s*[\\$€])?";
|
|
3951
3946
|
const pNumberExp = "^(?:(?:" + [
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
|
|
3947
|
+
"(?:\\s*-)?(?:\\s*[\\$€])?" + pNumber,
|
|
3948
|
+
"(?:\\s*-)?" + pNumber + "(?:\\s*[\\$€])?",
|
|
3949
|
+
"(?:\\s*[\\$€])?(?:\\s*-)?" + pNumber
|
|
3955
3950
|
].join(")|(?:") + "))$";
|
|
3956
3951
|
return new RegExp(pNumberExp, "i");
|
|
3957
3952
|
});
|
|
@@ -7553,7 +7548,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
7553
7548
|
function isZoneDependent(cmd) {
|
|
7554
7549
|
return "sheetId" in cmd && "zone" in cmd;
|
|
7555
7550
|
}
|
|
7556
|
-
const invalidateEvaluationCommands = new Set([
|
|
7551
|
+
const invalidateEvaluationCommands = /* @__PURE__ */ new Set([
|
|
7557
7552
|
"RENAME_SHEET",
|
|
7558
7553
|
"DELETE_SHEET",
|
|
7559
7554
|
"CREATE_SHEET",
|
|
@@ -7575,7 +7570,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
7575
7570
|
"UPDATE_NAMED_RANGE",
|
|
7576
7571
|
"DELETE_NAMED_RANGE"
|
|
7577
7572
|
]);
|
|
7578
|
-
const invalidateChartEvaluationCommands = new Set([
|
|
7573
|
+
const invalidateChartEvaluationCommands = /* @__PURE__ */ new Set([
|
|
7579
7574
|
"EVALUATE_CELLS",
|
|
7580
7575
|
"EVALUATE_CHARTS",
|
|
7581
7576
|
"UPDATE_CELL",
|
|
@@ -7594,20 +7589,20 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
7594
7589
|
"UNDO",
|
|
7595
7590
|
"REDO"
|
|
7596
7591
|
]);
|
|
7597
|
-
const invalidateDependenciesCommands = new Set(["MOVE_RANGES"]);
|
|
7598
|
-
const invalidateCFEvaluationCommands = new Set([
|
|
7592
|
+
const invalidateDependenciesCommands = /* @__PURE__ */ new Set(["MOVE_RANGES"]);
|
|
7593
|
+
const invalidateCFEvaluationCommands = /* @__PURE__ */ new Set([
|
|
7599
7594
|
"EVALUATE_CELLS",
|
|
7600
7595
|
"ADD_CONDITIONAL_FORMAT",
|
|
7601
7596
|
"REMOVE_CONDITIONAL_FORMAT",
|
|
7602
7597
|
"CHANGE_CONDITIONAL_FORMAT_PRIORITY"
|
|
7603
7598
|
]);
|
|
7604
|
-
const invalidateBordersCommands = new Set([
|
|
7599
|
+
const invalidateBordersCommands = /* @__PURE__ */ new Set([
|
|
7605
7600
|
"AUTOFILL_CELL",
|
|
7606
7601
|
"SET_BORDER",
|
|
7607
7602
|
"SET_ZONE_BORDERS",
|
|
7608
7603
|
"SET_BORDERS_ON_TARGET"
|
|
7609
7604
|
]);
|
|
7610
|
-
const invalidSubtotalFormulasCommands = new Set([
|
|
7605
|
+
const invalidSubtotalFormulasCommands = /* @__PURE__ */ new Set([
|
|
7611
7606
|
"UNHIDE_COLUMNS_ROWS",
|
|
7612
7607
|
"HIDE_COLUMNS_ROWS",
|
|
7613
7608
|
"GROUP_HEADERS",
|
|
@@ -7621,7 +7616,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
7621
7616
|
"UPDATE_TABLE",
|
|
7622
7617
|
"UPDATE_FILTER"
|
|
7623
7618
|
]);
|
|
7624
|
-
const readonlyAllowedCommands = new Set([
|
|
7619
|
+
const readonlyAllowedCommands = /* @__PURE__ */ new Set([
|
|
7625
7620
|
"START",
|
|
7626
7621
|
"ACTIVATE_SHEET",
|
|
7627
7622
|
"COPY",
|
|
@@ -7637,7 +7632,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
7637
7632
|
"UPDATE_CAROUSEL_ACTIVE_ITEM",
|
|
7638
7633
|
"UPDATE_PIVOT"
|
|
7639
7634
|
]);
|
|
7640
|
-
const lockedSheetAllowedCommands = new Set([
|
|
7635
|
+
const lockedSheetAllowedCommands = /* @__PURE__ */ new Set([
|
|
7641
7636
|
"LOCK_SHEET",
|
|
7642
7637
|
"UNLOCK_SHEET",
|
|
7643
7638
|
"MOVE_SHEET",
|
|
@@ -7668,7 +7663,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
7668
7663
|
"SHIFT_VIEWPORT_DOWN",
|
|
7669
7664
|
"SHIFT_VIEWPORT_UP"
|
|
7670
7665
|
]);
|
|
7671
|
-
const coreTypes = new Set([
|
|
7666
|
+
const coreTypes = /* @__PURE__ */ new Set([
|
|
7672
7667
|
"UPDATE_CELL",
|
|
7673
7668
|
"UPDATE_CELL_POSITION",
|
|
7674
7669
|
"CLEAR_CELL",
|
|
@@ -8302,7 +8297,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
8302
8297
|
//#region src/helpers/edge_scrolling.ts
|
|
8303
8298
|
const MAX_DELAY = 140;
|
|
8304
8299
|
const MIN_DELAY = 20;
|
|
8305
|
-
const ACCELERATION = .035;
|
|
8306
8300
|
/**
|
|
8307
8301
|
* Decreasing exponential function used to determine the "speed" of edge-scrolling
|
|
8308
8302
|
* as the timeout delay.
|
|
@@ -8310,7 +8304,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
8310
8304
|
* Returns a timeout delay in milliseconds.
|
|
8311
8305
|
*/
|
|
8312
8306
|
function scrollDelay(value) {
|
|
8313
|
-
return 20 + (140 - 20) * Math.exp(
|
|
8307
|
+
return 20 + (140 - 20) * Math.exp(-.035 * (value - 1));
|
|
8314
8308
|
}
|
|
8315
8309
|
|
|
8316
8310
|
//#endregion
|
|
@@ -8713,7 +8707,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
8713
8707
|
const cryptoObj = this.getCrypto();
|
|
8714
8708
|
if (cryptoObj) return "10000000-1000".replace(/[01]/g, (c) => {
|
|
8715
8709
|
const n = Number(c);
|
|
8716
|
-
return (n ^ cryptoObj.getRandomValues(new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
8710
|
+
return (n ^ cryptoObj.getRandomValues(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
8717
8711
|
});
|
|
8718
8712
|
else return "xxxxxxxx-xxxx".replace(/[xy]/g, function(c) {
|
|
8719
8713
|
const r = Math.random() * 16 | 0;
|
|
@@ -8728,7 +8722,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
8728
8722
|
const cryptoObj = this.getCrypto();
|
|
8729
8723
|
if (cryptoObj) return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => {
|
|
8730
8724
|
const n = Number(c);
|
|
8731
|
-
return (n ^ cryptoObj.getRandomValues(new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
8725
|
+
return (n ^ cryptoObj.getRandomValues(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
8732
8726
|
});
|
|
8733
8727
|
else return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
|
|
8734
8728
|
const r = Math.random() * 16 | 0;
|
|
@@ -12750,7 +12744,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
12750
12744
|
|
|
12751
12745
|
//#endregion
|
|
12752
12746
|
//#region src/types/data_validation.ts
|
|
12753
|
-
const availableDataValidationOperators = new Set([
|
|
12747
|
+
const availableDataValidationOperators = /* @__PURE__ */ new Set([
|
|
12754
12748
|
"containsText",
|
|
12755
12749
|
"notContainsText",
|
|
12756
12750
|
"isEqualText",
|
|
@@ -13344,10 +13338,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
13344
13338
|
type: dimension.type
|
|
13345
13339
|
}));
|
|
13346
13340
|
if (groupValueString.toLowerCase() === "false") return false;
|
|
13347
|
-
return pivotNormalizationValueRegistry.get(dimension.type)(groupValueString, dimension
|
|
13341
|
+
return pivotNormalizationValueRegistry.get(dimension.type)(groupValueString, dimension);
|
|
13348
13342
|
}
|
|
13349
|
-
function normalizeDateTime(value,
|
|
13350
|
-
return pivotTimeAdapter(granularity ?? "month").normalizeFunctionValue(value);
|
|
13343
|
+
function normalizeDateTime(value, dimension) {
|
|
13344
|
+
return pivotTimeAdapter(dimension.granularity ?? "month").normalizeFunctionValue(value);
|
|
13351
13345
|
}
|
|
13352
13346
|
function toFunctionPivotValue(value, dimension) {
|
|
13353
13347
|
if (value === null) return `"null"`;
|
|
@@ -14148,7 +14142,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
14148
14142
|
*/
|
|
14149
14143
|
function filterInvalidHierarchicalPoints(values, hierarchy) {
|
|
14150
14144
|
const numberOfDataPoints = Math.max(values.length, ...hierarchy.map((dataset) => dataset.data?.length || 0));
|
|
14151
|
-
const isEmpty = (value) => value === null || value === "";
|
|
14145
|
+
const isEmpty = (value) => value === void 0 || value === null || value === "";
|
|
14152
14146
|
const dataPointsIndexes = range(0, numberOfDataPoints).filter((dataPointIndex) => {
|
|
14153
14147
|
const groups = hierarchy.map((dataset) => dataset.data?.[dataPointIndex]);
|
|
14154
14148
|
if (isEmpty(groups[0]?.value)) return false;
|
|
@@ -15946,6 +15940,59 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
15946
15940
|
return (chartSubtypeRegistry.getAll().find((c) => c.matcher?.(definition)) || chartSubtypeRegistry.get(definition.type)).displayName;
|
|
15947
15941
|
}
|
|
15948
15942
|
|
|
15943
|
+
//#endregion
|
|
15944
|
+
//#region src/components/helpers/css.ts
|
|
15945
|
+
function getTextDecoration({ strikethrough, underline }) {
|
|
15946
|
+
if (!strikethrough && !underline) return "none";
|
|
15947
|
+
return `${strikethrough ? "line-through" : ""} ${underline ? "underline" : ""}`;
|
|
15948
|
+
}
|
|
15949
|
+
/**
|
|
15950
|
+
* Convert the cell style to CSS properties.
|
|
15951
|
+
*/
|
|
15952
|
+
function cellStyleToCss(style) {
|
|
15953
|
+
const attributes = cellTextStyleToCss(style);
|
|
15954
|
+
if (!style) return attributes;
|
|
15955
|
+
if (style.fillColor) attributes["background"] = style.fillColor;
|
|
15956
|
+
return attributes;
|
|
15957
|
+
}
|
|
15958
|
+
/**
|
|
15959
|
+
* Convert the cell text style to CSS properties.
|
|
15960
|
+
*/
|
|
15961
|
+
function cellTextStyleToCss(style) {
|
|
15962
|
+
const attributes = {};
|
|
15963
|
+
if (!style) return attributes;
|
|
15964
|
+
if (style.bold) attributes["font-weight"] = "bold";
|
|
15965
|
+
if (style.italic) attributes["font-style"] = "italic";
|
|
15966
|
+
if (style.fontSize) attributes["font-size"] = `${style.fontSize}px`;
|
|
15967
|
+
if (style.strikethrough || style.underline) {
|
|
15968
|
+
let decoration = style.strikethrough ? "line-through" : "";
|
|
15969
|
+
decoration = style.underline ? decoration + " underline" : decoration;
|
|
15970
|
+
attributes["text-decoration"] = decoration;
|
|
15971
|
+
}
|
|
15972
|
+
if (style.textColor) attributes["color"] = style.textColor;
|
|
15973
|
+
return attributes;
|
|
15974
|
+
}
|
|
15975
|
+
/**
|
|
15976
|
+
* Transform CSS properties into a CSS string.
|
|
15977
|
+
*/
|
|
15978
|
+
function cssPropertiesToCss(attributes) {
|
|
15979
|
+
let styleStr = "";
|
|
15980
|
+
for (const attName in attributes) {
|
|
15981
|
+
if (!attributes[attName]) continue;
|
|
15982
|
+
styleStr += `${attName}:${attributes[attName]}; `;
|
|
15983
|
+
}
|
|
15984
|
+
return styleStr;
|
|
15985
|
+
}
|
|
15986
|
+
function getElementMargins(el) {
|
|
15987
|
+
const style = window.getComputedStyle(el);
|
|
15988
|
+
return {
|
|
15989
|
+
top: parseInt(style.marginTop, 10) || 0,
|
|
15990
|
+
bottom: parseInt(style.marginBottom, 10) || 0,
|
|
15991
|
+
left: parseInt(style.marginLeft, 10) || 0,
|
|
15992
|
+
right: parseInt(style.marginRight, 10) || 0
|
|
15993
|
+
};
|
|
15994
|
+
}
|
|
15995
|
+
|
|
15949
15996
|
//#endregion
|
|
15950
15997
|
//#region src/components/figures/chart/chartJs/zoomable_chart/zoomable_chart_store.ts
|
|
15951
15998
|
const TREND_LINE_AXES_IDS = ["x1", MOVING_AVERAGE_TREND_LINE_XAXIS_ID];
|
|
@@ -16064,9 +16111,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
16064
16111
|
this.removeEventListeners();
|
|
16065
16112
|
}
|
|
16066
16113
|
get containerStyle() {
|
|
16067
|
-
return `
|
|
16068
|
-
height:${this.sliceable ? `calc(100% - ${60}px)` : "100%"};
|
|
16069
|
-
`;
|
|
16114
|
+
return cssPropertiesToCss({ height: this.sliceable ? `calc(100% - ${60}px)` : "100%" });
|
|
16070
16115
|
}
|
|
16071
16116
|
get masterChartContainerStyle() {
|
|
16072
16117
|
const runtime = this.env.model.getters.getChartRuntime(this.props.chartId);
|
|
@@ -16930,59 +16975,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
16930
16975
|
}
|
|
16931
16976
|
};
|
|
16932
16977
|
|
|
16933
|
-
//#endregion
|
|
16934
|
-
//#region src/components/helpers/css.ts
|
|
16935
|
-
function getTextDecoration({ strikethrough, underline }) {
|
|
16936
|
-
if (!strikethrough && !underline) return "none";
|
|
16937
|
-
return `${strikethrough ? "line-through" : ""} ${underline ? "underline" : ""}`;
|
|
16938
|
-
}
|
|
16939
|
-
/**
|
|
16940
|
-
* Convert the cell style to CSS properties.
|
|
16941
|
-
*/
|
|
16942
|
-
function cellStyleToCss(style) {
|
|
16943
|
-
const attributes = cellTextStyleToCss(style);
|
|
16944
|
-
if (!style) return attributes;
|
|
16945
|
-
if (style.fillColor) attributes["background"] = style.fillColor;
|
|
16946
|
-
return attributes;
|
|
16947
|
-
}
|
|
16948
|
-
/**
|
|
16949
|
-
* Convert the cell text style to CSS properties.
|
|
16950
|
-
*/
|
|
16951
|
-
function cellTextStyleToCss(style) {
|
|
16952
|
-
const attributes = {};
|
|
16953
|
-
if (!style) return attributes;
|
|
16954
|
-
if (style.bold) attributes["font-weight"] = "bold";
|
|
16955
|
-
if (style.italic) attributes["font-style"] = "italic";
|
|
16956
|
-
if (style.fontSize) attributes["font-size"] = `${style.fontSize}px`;
|
|
16957
|
-
if (style.strikethrough || style.underline) {
|
|
16958
|
-
let decoration = style.strikethrough ? "line-through" : "";
|
|
16959
|
-
decoration = style.underline ? decoration + " underline" : decoration;
|
|
16960
|
-
attributes["text-decoration"] = decoration;
|
|
16961
|
-
}
|
|
16962
|
-
if (style.textColor) attributes["color"] = style.textColor;
|
|
16963
|
-
return attributes;
|
|
16964
|
-
}
|
|
16965
|
-
/**
|
|
16966
|
-
* Transform CSS properties into a CSS string.
|
|
16967
|
-
*/
|
|
16968
|
-
function cssPropertiesToCss(attributes) {
|
|
16969
|
-
let styleStr = "";
|
|
16970
|
-
for (const attName in attributes) {
|
|
16971
|
-
if (!attributes[attName]) continue;
|
|
16972
|
-
styleStr += `${attName}:${attributes[attName]}; `;
|
|
16973
|
-
}
|
|
16974
|
-
return styleStr;
|
|
16975
|
-
}
|
|
16976
|
-
function getElementMargins(el) {
|
|
16977
|
-
const style = window.getComputedStyle(el);
|
|
16978
|
-
return {
|
|
16979
|
-
top: parseInt(style.marginTop, 10) || 0,
|
|
16980
|
-
bottom: parseInt(style.marginBottom, 10) || 0,
|
|
16981
|
-
left: parseInt(style.marginLeft, 10) || 0,
|
|
16982
|
-
right: parseInt(style.marginRight, 10) || 0
|
|
16983
|
-
};
|
|
16984
|
-
}
|
|
16985
|
-
|
|
16986
16978
|
//#endregion
|
|
16987
16979
|
//#region src/stores/DOM_focus_store.ts
|
|
16988
16980
|
var DOMFocusableElementStore = class {
|
|
@@ -18230,11 +18222,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
18230
18222
|
getResizerPosition(resizer) {
|
|
18231
18223
|
const anchorCenteringOffset = (ANCHOR_SIZE - ACTIVE_BORDER_WIDTH) / 2;
|
|
18232
18224
|
const style = {};
|
|
18233
|
-
if (resizer.includes("top")) style.top =
|
|
18234
|
-
else if (resizer.includes("bottom")) style.bottom =
|
|
18225
|
+
if (resizer.includes("top")) style.top = `-3px`;
|
|
18226
|
+
else if (resizer.includes("bottom")) style.bottom = `-3px`;
|
|
18235
18227
|
else style.bottom = `calc(50% - ${anchorCenteringOffset}px)`;
|
|
18236
|
-
if (resizer.includes("left")) style.left =
|
|
18237
|
-
else if (resizer.includes("right")) style.right =
|
|
18228
|
+
if (resizer.includes("left")) style.left = `-3px`;
|
|
18229
|
+
else if (resizer.includes("right")) style.right = `-3px`;
|
|
18238
18230
|
else style.right = `calc(50% - ${anchorCenteringOffset}px)`;
|
|
18239
18231
|
return cssPropertiesToCss(style);
|
|
18240
18232
|
}
|
|
@@ -25832,6 +25824,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
25832
25824
|
function mapParentFunction(tokens) {
|
|
25833
25825
|
const stack = [];
|
|
25834
25826
|
let functionStarted = "";
|
|
25827
|
+
let braceDepth = 0;
|
|
25835
25828
|
function pushTokenToFunctionContext(token) {
|
|
25836
25829
|
if (stack.length === 0) return;
|
|
25837
25830
|
const functionContext = stack.at(-1);
|
|
@@ -25844,7 +25837,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
25844
25837
|
});
|
|
25845
25838
|
}
|
|
25846
25839
|
}
|
|
25847
|
-
return tokens.map((token
|
|
25840
|
+
return tokens.map((token) => {
|
|
25848
25841
|
if (!["SPACE", "LEFT_PAREN"].includes(token.type)) functionStarted = "";
|
|
25849
25842
|
switch (token.type) {
|
|
25850
25843
|
case "SYMBOL":
|
|
@@ -25865,8 +25858,16 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
25865
25858
|
stack.pop()?.argsTokens?.flat().forEach(pushTokenToFunctionContext);
|
|
25866
25859
|
pushTokenToFunctionContext(token);
|
|
25867
25860
|
break;
|
|
25861
|
+
case "LEFT_BRACE":
|
|
25862
|
+
braceDepth++;
|
|
25863
|
+
pushTokenToFunctionContext(token);
|
|
25864
|
+
break;
|
|
25865
|
+
case "RIGHT_BRACE":
|
|
25866
|
+
braceDepth--;
|
|
25867
|
+
pushTokenToFunctionContext(token);
|
|
25868
|
+
break;
|
|
25868
25869
|
case "ARG_SEPARATOR":
|
|
25869
|
-
if (stack.length) stack[stack.length - 1].argPosition++;
|
|
25870
|
+
if (stack.length && braceDepth === 0) stack[stack.length - 1].argPosition++;
|
|
25870
25871
|
pushTokenToFunctionContext(token);
|
|
25871
25872
|
break;
|
|
25872
25873
|
default:
|
|
@@ -27218,10 +27219,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
27218
27219
|
//#endregion
|
|
27219
27220
|
//#region src/components/color_picker/color_picker.ts
|
|
27220
27221
|
const ITEM_BORDER_WIDTH = 1;
|
|
27221
|
-
const
|
|
27222
|
-
const ITEMS_PER_LINE = 10;
|
|
27223
|
-
const MAGNIFIER_EDGE = 16;
|
|
27224
|
-
const CONTENT_WIDTH = ITEMS_PER_LINE * (ITEM_EDGE_LENGTH + 2 * ITEM_BORDER_WIDTH) + (ITEMS_PER_LINE - 1) * 2;
|
|
27222
|
+
const CONTENT_WIDTH = 218;
|
|
27225
27223
|
const INNER_GRADIENT_WIDTH = CONTENT_WIDTH - 2 * ITEM_BORDER_WIDTH;
|
|
27226
27224
|
const INNER_GRADIENT_HEIGHT = CONTENT_WIDTH - 30 - 2 * ITEM_BORDER_WIDTH;
|
|
27227
27225
|
var ColorPicker = class extends _odoo_owl.Component {
|
|
@@ -27285,8 +27283,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
27285
27283
|
const left = Math.round(INNER_GRADIENT_WIDTH * clip(s / 100, 0, 1));
|
|
27286
27284
|
const top = Math.round(INNER_GRADIENT_HEIGHT * clip(1 - 2 * l / (200 - s), 0, 1));
|
|
27287
27285
|
return cssPropertiesToCss({
|
|
27288
|
-
left: `${-
|
|
27289
|
-
top: `${-
|
|
27286
|
+
left: `${-16 / 2 + left}px`,
|
|
27287
|
+
top: `${-16 / 2 + top}px`,
|
|
27290
27288
|
background: hslaToHex(this.state.currentHslaColor)
|
|
27291
27289
|
});
|
|
27292
27290
|
}
|
|
@@ -32826,9 +32824,12 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
32826
32824
|
labelValues: []
|
|
32827
32825
|
})
|
|
32828
32826
|
};
|
|
32829
|
-
return this.chartTypeBuilder.getRuntime(getters, this.definition, dataExtractors, this.sheetId, {
|
|
32830
|
-
|
|
32831
|
-
|
|
32827
|
+
return this.chartTypeBuilder.getRuntime(getters, this.definition, dataExtractors, this.sheetId, {
|
|
32828
|
+
onClick: (event, items, chartJsChart) => {
|
|
32829
|
+
return this.dataSourceBuilder.onDataSetClick?.(this.definition.type, chartId, event, items, chartJsChart, getters);
|
|
32830
|
+
},
|
|
32831
|
+
onHover: (event, items, chartJsChart) => this.dataSourceBuilder.onDataSetHover?.(this.definition.type, chartId, event, items, chartJsChart)
|
|
32832
|
+
});
|
|
32832
32833
|
}
|
|
32833
32834
|
static deleteInvalidKeys(definition) {
|
|
32834
32835
|
definition = { ...definition };
|
|
@@ -33035,7 +33036,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
33035
33036
|
if (cell) label = cell.formattedValue;
|
|
33036
33037
|
}
|
|
33037
33038
|
let data = ds.dataRange ? getData(getters, ds) : [];
|
|
33038
|
-
if (data.every((cell) => !cell.value || isTextResult(cell)) && data.filter(isTextResult).length > 1) data = data.map((cell) => cell.value && isErrorResult(cell) ? ONE : EMPTY);
|
|
33039
|
+
if (data.every((cell) => !cell.value || isTextResult(cell)) && data.filter(isTextResult).length > 1) data = data.map((cell) => cell.value && !isErrorResult(cell) ? ONE : EMPTY);
|
|
33039
33040
|
else if (data.every((cell) => !isNumberResult(cell))) hidden = true;
|
|
33040
33041
|
datasetValues.push({
|
|
33041
33042
|
data,
|
|
@@ -36025,9 +36026,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
36025
36026
|
allSheetsMatches = [];
|
|
36026
36027
|
activeSheetMatches = [];
|
|
36027
36028
|
specificRangeMatches = [];
|
|
36029
|
+
selectedMatchPosition = null;
|
|
36028
36030
|
currentSearchRegex = null;
|
|
36029
36031
|
initialShowFormulaState;
|
|
36030
|
-
preserveSelectedMatchIndex = false;
|
|
36031
36032
|
irreplaceableMatchCount = 0;
|
|
36032
36033
|
isSearchDirty = false;
|
|
36033
36034
|
shouldFinalizeUpdateSelection = false;
|
|
@@ -36149,7 +36150,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
36149
36150
|
*/
|
|
36150
36151
|
_updateSearch(toSearch, searchOptions) {
|
|
36151
36152
|
this.searchOptions = searchOptions;
|
|
36152
|
-
if (toSearch !== this.toSearch)
|
|
36153
|
+
if (toSearch !== this.toSearch) {
|
|
36154
|
+
this.selectedMatchIndex = null;
|
|
36155
|
+
this.selectedMatchPosition = null;
|
|
36156
|
+
}
|
|
36153
36157
|
this.toSearch = toSearch;
|
|
36154
36158
|
this.currentSearchRegex = getSearchRegex(this.toSearch, this.searchOptions);
|
|
36155
36159
|
this.refreshSearch({
|
|
@@ -36161,8 +36165,14 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
36161
36165
|
* refresh the matches according to the current search options
|
|
36162
36166
|
*/
|
|
36163
36167
|
refreshSearch(options) {
|
|
36164
|
-
if (!this.preserveSelectedMatchIndex) this.selectedMatchIndex = null;
|
|
36165
36168
|
this.findMatches();
|
|
36169
|
+
if (this.selectedMatchPosition) if (this.selectedMatchPosition.sheetId !== this.getters.getActiveSheetId()) {
|
|
36170
|
+
this.selectedMatchIndex = null;
|
|
36171
|
+
this.selectedMatchPosition = null;
|
|
36172
|
+
} else {
|
|
36173
|
+
const index = this.searchMatches.findIndex((match) => match.sheetId === this.selectedMatchPosition?.sheetId && match.col === this.selectedMatchPosition?.col && match.row === this.selectedMatchPosition?.row);
|
|
36174
|
+
if (index !== -1) this.selectedMatchIndex = index;
|
|
36175
|
+
}
|
|
36166
36176
|
this.selectNextCell(0, options);
|
|
36167
36177
|
}
|
|
36168
36178
|
getSheetsInSearchOrder() {
|
|
@@ -36230,6 +36240,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
36230
36240
|
const matches = this.searchMatches;
|
|
36231
36241
|
if (!matches.length) {
|
|
36232
36242
|
this.selectedMatchIndex = null;
|
|
36243
|
+
this.selectedMatchPosition = null;
|
|
36233
36244
|
return;
|
|
36234
36245
|
}
|
|
36235
36246
|
let nextIndex;
|
|
@@ -36243,14 +36254,13 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
36243
36254
|
} else nextIndex = this.selectedMatchIndex + indexChange;
|
|
36244
36255
|
nextIndex = (nextIndex + matches.length) % matches.length;
|
|
36245
36256
|
this.selectedMatchIndex = nextIndex;
|
|
36257
|
+
this.selectedMatchPosition = matches[this.selectedMatchIndex];
|
|
36246
36258
|
const selectedMatch = matches[nextIndex];
|
|
36247
36259
|
if (options.jumpToMatchSheet && this.getters.getActiveSheetId() !== selectedMatch.sheetId) {
|
|
36248
|
-
this.preserveSelectedMatchIndex = true;
|
|
36249
36260
|
this.model.dispatch("ACTIVATE_SHEET", {
|
|
36250
36261
|
sheetIdFrom: this.getters.getActiveSheetId(),
|
|
36251
36262
|
sheetIdTo: selectedMatch.sheetId
|
|
36252
36263
|
});
|
|
36253
|
-
this.preserveSelectedMatchIndex = false;
|
|
36254
36264
|
this.isSearchDirty = false;
|
|
36255
36265
|
}
|
|
36256
36266
|
this.model.selection.getBackToDefault();
|
|
@@ -36261,7 +36271,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
36261
36271
|
*/
|
|
36262
36272
|
replace() {
|
|
36263
36273
|
if (this.selectedMatchIndex === null) return;
|
|
36264
|
-
this.preserveSelectedMatchIndex = true;
|
|
36265
36274
|
this.shouldFinalizeUpdateSelection = true;
|
|
36266
36275
|
this.model.dispatch("REPLACE_SEARCH", {
|
|
36267
36276
|
searchString: this.toSearch,
|
|
@@ -36269,7 +36278,6 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
36269
36278
|
matches: [this.searchMatches[this.selectedMatchIndex]],
|
|
36270
36279
|
searchOptions: this.searchOptions
|
|
36271
36280
|
});
|
|
36272
|
-
this.preserveSelectedMatchIndex = false;
|
|
36273
36281
|
}
|
|
36274
36282
|
/**
|
|
36275
36283
|
* Apply the replace function to all the matches one time.
|
|
@@ -41205,7 +41213,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
41205
41213
|
mode: "pivot",
|
|
41206
41214
|
numberOfCols: 5,
|
|
41207
41215
|
numberOfRows: 8,
|
|
41208
|
-
mainSubHeaderRows: new Set([props.tableConfig.numberOfHeaders, props.tableConfig.numberOfHeaders + 3])
|
|
41216
|
+
mainSubHeaderRows: /* @__PURE__ */ new Set([props.tableConfig.numberOfHeaders, props.tableConfig.numberOfHeaders + 3])
|
|
41209
41217
|
};
|
|
41210
41218
|
drawPreviewTable(ctx, getComputedTableStyle(props.tableConfig, props.tableStyle, tableMetaData), {
|
|
41211
41219
|
...tableMetaData,
|
|
@@ -44531,9 +44539,12 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
44531
44539
|
}
|
|
44532
44540
|
stopEdition(direction) {
|
|
44533
44541
|
if (this.canStopEdition()) {
|
|
44542
|
+
const { col, row } = this.currentEditedCell;
|
|
44534
44543
|
this._stopEdition();
|
|
44535
|
-
if (direction) if (this.getters.isSingleCellOrMerge(this.sheetId, this.getters.getSelectedZone()))
|
|
44536
|
-
|
|
44544
|
+
if (direction) if (this.getters.isSingleCellOrMerge(this.sheetId, this.getters.getSelectedZone())) {
|
|
44545
|
+
this.model.selection.selectCell(col, row);
|
|
44546
|
+
this.model.selection.moveAnchorCell(direction, 1);
|
|
44547
|
+
} else moveAnchorWithinSelection(this.getters, this.model.selection, direction);
|
|
44537
44548
|
return;
|
|
44538
44549
|
}
|
|
44539
44550
|
const editedCell = this.currentEditedCell;
|
|
@@ -48543,7 +48554,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
48543
48554
|
ev.preventDefault();
|
|
48544
48555
|
const clipboardData = ev.clipboardData;
|
|
48545
48556
|
if (!clipboardData) return;
|
|
48546
|
-
const image = [...clipboardData.files]
|
|
48557
|
+
const image = [...clipboardData.files].find((file) => AllowedImageMimeTypes.includes(file.type));
|
|
48547
48558
|
const osClipboard = { content: {
|
|
48548
48559
|
["text/plain"]: clipboardData?.getData("text/plain"),
|
|
48549
48560
|
["text/html"]: clipboardData?.getData("text/html")
|
|
@@ -54609,7 +54620,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
54609
54620
|
//#region src/plugins/ui_core_views/cell_evaluation/zone_set.ts
|
|
54610
54621
|
var ZoneSet = class ZoneSet {
|
|
54611
54622
|
profilesStartingPosition = [0];
|
|
54612
|
-
profiles = new Map([[0, []]]);
|
|
54623
|
+
profiles = /* @__PURE__ */ new Map([[0, []]]);
|
|
54613
54624
|
constructor(zones = []) {
|
|
54614
54625
|
for (const zone of zones) this.add(zone);
|
|
54615
54626
|
}
|
|
@@ -56226,12 +56237,22 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
56226
56237
|
handle(cmd) {
|
|
56227
56238
|
switch (cmd.type) {
|
|
56228
56239
|
case "START":
|
|
56229
|
-
for (const sheetId of this.getters.getSheetIds())
|
|
56240
|
+
for (const sheetId of this.getters.getSheetIds()) {
|
|
56241
|
+
for (const chartId of this.getters.getChartIds(sheetId)) this.tryToAddColors(this.getChartColors(chartId));
|
|
56242
|
+
for (const figureId of this.getters.getFigures(sheetId)) this.tryToAddColors(this.getCarouselColors(sheetId, figureId.id));
|
|
56243
|
+
}
|
|
56230
56244
|
break;
|
|
56231
56245
|
case "UPDATE_CHART":
|
|
56232
56246
|
case "CREATE_CHART":
|
|
56233
56247
|
this.tryToAddColors(this.getChartColors(cmd.chartId));
|
|
56234
56248
|
break;
|
|
56249
|
+
case "CREATE_CAROUSEL":
|
|
56250
|
+
case "UPDATE_CAROUSEL":
|
|
56251
|
+
this.tryToAddColors(this.getCarouselColors(cmd.sheetId, cmd.figureId));
|
|
56252
|
+
break;
|
|
56253
|
+
case "COLOR_SHEET":
|
|
56254
|
+
if (cmd.color) this.tryToAddColors([cmd.color]);
|
|
56255
|
+
break;
|
|
56235
56256
|
case "UPDATE_CELL":
|
|
56236
56257
|
case "ADD_CONDITIONAL_FORMAT":
|
|
56237
56258
|
case "SET_BORDER":
|
|
@@ -56254,8 +56275,12 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
56254
56275
|
}
|
|
56255
56276
|
computeCustomColors() {
|
|
56256
56277
|
let usedColors = [];
|
|
56257
|
-
for (const sheetId of this.getters.getSheetIds()) usedColors = usedColors.concat(this.getColorsFromCells(sheetId), this.getFormattingColors(sheetId), this.getTableColors(sheetId));
|
|
56258
|
-
return [
|
|
56278
|
+
for (const sheetId of this.getters.getSheetIds()) usedColors = usedColors.concat(this.getSheetColors(sheetId), this.getColorsFromCells(sheetId), this.getFormattingColors(sheetId), this.getTableColors(sheetId));
|
|
56279
|
+
return [.../* @__PURE__ */ new Set([...usedColors])];
|
|
56280
|
+
}
|
|
56281
|
+
getSheetColors(sheetId) {
|
|
56282
|
+
const sheet = this.getters.getSheet(sheetId);
|
|
56283
|
+
return sheet.color ? [sheet.color] : [];
|
|
56259
56284
|
}
|
|
56260
56285
|
getColorsFromCells(sheetId) {
|
|
56261
56286
|
const cells = Object.values(this.getters.getCells(sheetId));
|
|
@@ -56288,6 +56313,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
56288
56313
|
if (chart === void 0) return [];
|
|
56289
56314
|
return [...JSON.stringify(chart.getRangeDefinition()).matchAll(chartColorRegex)].map((color) => color[1]);
|
|
56290
56315
|
}
|
|
56316
|
+
getCarouselColors(sheetId, figureId) {
|
|
56317
|
+
if (this.getters.getFigure(sheetId, figureId)?.tag !== "carousel") return [];
|
|
56318
|
+
const titleColor = this.getters.getCarousel(figureId).title?.color;
|
|
56319
|
+
return titleColor ? [titleColor] : [];
|
|
56320
|
+
}
|
|
56291
56321
|
getTableColors(sheetId) {
|
|
56292
56322
|
return this.getters.getTables(sheetId).flatMap((table) => {
|
|
56293
56323
|
const config = table.config;
|
|
@@ -56913,13 +56943,13 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
56913
56943
|
const minValue = this.parsePoint(sheetId, range, rule.minimum, "min");
|
|
56914
56944
|
const midValue = rule.midpoint ? this.parsePoint(sheetId, range, rule.midpoint) : null;
|
|
56915
56945
|
const maxValue = this.parsePoint(sheetId, range, rule.maximum, "max");
|
|
56916
|
-
if (minValue === null || maxValue === null || minValue >= maxValue || midValue && (minValue >= midValue || midValue >= maxValue)) return;
|
|
56946
|
+
if (minValue === null || maxValue === null || minValue >= maxValue || midValue !== null && (minValue >= midValue || midValue >= maxValue)) return;
|
|
56917
56947
|
const zone = this.getters.getRangeFromSheetXC(sheetId, range).zone;
|
|
56918
56948
|
const colorThresholds = [{
|
|
56919
56949
|
value: minValue,
|
|
56920
56950
|
color: rule.minimum.color
|
|
56921
56951
|
}];
|
|
56922
|
-
if (rule.midpoint && midValue) colorThresholds.push({
|
|
56952
|
+
if (rule.midpoint && midValue !== null) colorThresholds.push({
|
|
56923
56953
|
value: midValue,
|
|
56924
56954
|
color: rule.midpoint.color
|
|
56925
56955
|
});
|
|
@@ -59791,7 +59821,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
59791
59821
|
};
|
|
59792
59822
|
}
|
|
59793
59823
|
};
|
|
59794
|
-
const invalidateTableStyleCommandsSet = new Set([
|
|
59824
|
+
const invalidateTableStyleCommandsSet = /* @__PURE__ */ new Set([
|
|
59795
59825
|
"HIDE_COLUMNS_ROWS",
|
|
59796
59826
|
"UNHIDE_COLUMNS_ROWS",
|
|
59797
59827
|
"UNFOLD_HEADER_GROUP",
|
|
@@ -64232,11 +64262,23 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
64232
64262
|
ctx.strokeStyle = SELECTION_BORDER_COLOR;
|
|
64233
64263
|
ctx.lineWidth = 1.5 * thinLineWidth;
|
|
64234
64264
|
for (const zone of zones) {
|
|
64265
|
+
if (!viewports.isZoneVisibleInViewport(sheetId, zone)) continue;
|
|
64235
64266
|
const { x, y, width, height } = viewports.getVisibleRect(sheetId, zone);
|
|
64236
64267
|
ctx.globalCompositeOperation = "multiply";
|
|
64237
|
-
|
|
64238
|
-
ctx.
|
|
64239
|
-
|
|
64268
|
+
const currentLineWidth = ctx.lineWidth;
|
|
64269
|
+
if (height === 0 || width === 0) ctx.lineWidth = 3 * thinLineWidth;
|
|
64270
|
+
if (height === 0 && width === 0) {
|
|
64271
|
+
ctx.beginPath();
|
|
64272
|
+
ctx.arc(x, y, 3, 0, 2 * Math.PI);
|
|
64273
|
+
ctx.fill();
|
|
64274
|
+
ctx.globalCompositeOperation = "source-over";
|
|
64275
|
+
ctx.stroke();
|
|
64276
|
+
} else {
|
|
64277
|
+
ctx.fillRect(x, y, width, height);
|
|
64278
|
+
ctx.globalCompositeOperation = "source-over";
|
|
64279
|
+
ctx.strokeRect(x, y, width, height);
|
|
64280
|
+
}
|
|
64281
|
+
ctx.lineWidth = currentLineWidth;
|
|
64240
64282
|
}
|
|
64241
64283
|
ctx.globalCompositeOperation = "source-over";
|
|
64242
64284
|
const position = renderingContext.activePosition;
|
|
@@ -64361,14 +64403,14 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
64361
64403
|
adjustPositionX(targetCol) {
|
|
64362
64404
|
const sheetId = this.sheetId;
|
|
64363
64405
|
const { start, end } = this.getters.getColDimensions(sheetId, targetCol);
|
|
64364
|
-
if (this.offsetX + this.viewportWidth + this.offsetCorrectionX < end) this.offsetX = end - this.viewportWidth;
|
|
64406
|
+
if (this.offsetX + this.viewportWidth + this.offsetCorrectionX < end) this.offsetX = end - this.viewportWidth - this.offsetCorrectionX;
|
|
64365
64407
|
else if (this.offsetX + this.offsetCorrectionX > start) this.offsetX = start - this.offsetCorrectionX;
|
|
64366
64408
|
this.adjustViewportZoneX();
|
|
64367
64409
|
}
|
|
64368
64410
|
adjustPositionY(targetRow) {
|
|
64369
64411
|
const sheetId = this.sheetId;
|
|
64370
64412
|
const { start, end } = this.getters.getRowDimensions(sheetId, targetRow);
|
|
64371
|
-
if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) this.offsetY = end - this.viewportHeight;
|
|
64413
|
+
if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) this.offsetY = end - this.viewportHeight - this.offsetCorrectionY;
|
|
64372
64414
|
else if (this.offsetY + this.offsetCorrectionY > start) this.offsetY = start - this.offsetCorrectionY;
|
|
64373
64415
|
this.adjustViewportZoneY();
|
|
64374
64416
|
}
|
|
@@ -64383,6 +64425,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
64383
64425
|
this.adjustViewportZoneX();
|
|
64384
64426
|
this.adjustViewportZoneY();
|
|
64385
64427
|
}
|
|
64428
|
+
isZoneVisible(zone) {
|
|
64429
|
+
return intersection(zone, this) !== void 0;
|
|
64430
|
+
}
|
|
64386
64431
|
/**
|
|
64387
64432
|
*
|
|
64388
64433
|
* Computes the visible coordinates & dimensions of a given zone inside the viewport
|
|
@@ -64663,6 +64708,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
64663
64708
|
isVisibleInViewport({ sheetId, col, row }) {
|
|
64664
64709
|
return this.getSubViewports(sheetId).some((pane) => pane.isVisible(col, row));
|
|
64665
64710
|
}
|
|
64711
|
+
isZoneVisibleInViewport(sheetId, zone) {
|
|
64712
|
+
return this.getSubViewports(sheetId).some((pane) => pane.isZoneVisible(zone));
|
|
64713
|
+
}
|
|
64666
64714
|
getScrollBarWidth() {
|
|
64667
64715
|
return 15 / this.zoomLevel;
|
|
64668
64716
|
}
|
|
@@ -67318,7 +67366,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
67318
67366
|
}
|
|
67319
67367
|
});
|
|
67320
67368
|
this.DOMFocusableElementStore = useStore(DOMFocusableElementStore);
|
|
67321
|
-
(0, _odoo_owl.useExternalListener)(window, "click", ()
|
|
67369
|
+
(0, _odoo_owl.useExternalListener)(window, "click", this.onExternalClick.bind(this), { capture: true });
|
|
67322
67370
|
(0, _odoo_owl.useEffect)((sheetId) => {
|
|
67323
67371
|
if (this.props.sheetId === sheetId) this.scrollToSheet();
|
|
67324
67372
|
}, () => [this.env.model.getters.getActiveSheetId()]);
|
|
@@ -67337,6 +67385,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
67337
67385
|
this.env.model.off("command-rejected", this);
|
|
67338
67386
|
});
|
|
67339
67387
|
}
|
|
67388
|
+
onExternalClick(ev) {
|
|
67389
|
+
if (!ev.target.closest(".o-color-picker")) this.state.pickerOpened = false;
|
|
67390
|
+
}
|
|
67340
67391
|
focusInputAndSelectContent() {
|
|
67341
67392
|
if (!this.state.isEditing || !this.sheetNameRef.el) return;
|
|
67342
67393
|
this.sheetNameRef.el.focus();
|
|
@@ -67440,6 +67491,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
67440
67491
|
},
|
|
67441
67492
|
openSheetColorPickerCallback: () => {
|
|
67442
67493
|
this.state.pickerOpened = true;
|
|
67494
|
+
const sheet = this.env.model.getters.getSheet(this.props.sheetId);
|
|
67495
|
+
this.state.currentPickerColor = sheet.color;
|
|
67443
67496
|
}
|
|
67444
67497
|
});
|
|
67445
67498
|
}
|
|
@@ -69189,18 +69242,28 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
69189
69242
|
return;
|
|
69190
69243
|
}
|
|
69191
69244
|
const activeSheetId = this.env.model.getters.getActiveSheetId();
|
|
69192
|
-
if (activeSheetId !== sheetId)
|
|
69193
|
-
|
|
69194
|
-
|
|
69195
|
-
|
|
69196
|
-
|
|
69245
|
+
if (activeSheetId !== sheetId) {
|
|
69246
|
+
if (!this.env.model.getters.getSheet(sheetId).isVisible) {
|
|
69247
|
+
this.env.notifyUser({
|
|
69248
|
+
text: _t("The sheet on which the range is defined is hidden."),
|
|
69249
|
+
type: "info",
|
|
69250
|
+
sticky: false
|
|
69251
|
+
});
|
|
69252
|
+
return;
|
|
69253
|
+
}
|
|
69254
|
+
this.env.model.dispatch("ACTIVATE_SHEET", {
|
|
69255
|
+
sheetIdFrom: activeSheetId,
|
|
69256
|
+
sheetIdTo: sheetId
|
|
69257
|
+
});
|
|
69258
|
+
}
|
|
69259
|
+
this.env.model.selection.selectCell(zone.right, zone.bottom, { allowsHiddenSelection: true });
|
|
69197
69260
|
this.env.model.selection.selectZone({
|
|
69198
69261
|
cell: {
|
|
69199
69262
|
col: zone.left,
|
|
69200
69263
|
row: zone.top
|
|
69201
69264
|
},
|
|
69202
69265
|
zone
|
|
69203
|
-
});
|
|
69266
|
+
}, { allowsHiddenSelection: true });
|
|
69204
69267
|
}
|
|
69205
69268
|
get selectionKey() {
|
|
69206
69269
|
return `${this.env.model.getters.getActiveSheetId()}-${zoneToXc(this.selectedZone)}`;
|
|
@@ -69475,7 +69538,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
69475
69538
|
this.closePopover();
|
|
69476
69539
|
return;
|
|
69477
69540
|
}
|
|
69478
|
-
const pivotId = this.
|
|
69541
|
+
const pivotId = this.dynamicPivotIdInSelection;
|
|
69479
69542
|
if (pivotId) {
|
|
69480
69543
|
this.env.openSidePanel("PivotSidePanel", {
|
|
69481
69544
|
pivotId,
|
|
@@ -69505,7 +69568,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
69505
69568
|
this.state.popoverProps = void 0;
|
|
69506
69569
|
}
|
|
69507
69570
|
get action() {
|
|
69508
|
-
if (this.
|
|
69571
|
+
if (this.dynamicPivotIdInSelection) return {
|
|
69509
69572
|
name: _t("Edit pivot style"),
|
|
69510
69573
|
icon: "o-spreadsheet-Icon.EDIT_TABLE"
|
|
69511
69574
|
};
|
|
@@ -69524,15 +69587,19 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
69524
69587
|
get tableStyles() {
|
|
69525
69588
|
return this.env.model.getters.getTableStyles();
|
|
69526
69589
|
}
|
|
69527
|
-
get
|
|
69590
|
+
get dynamicPivotIdInSelection() {
|
|
69528
69591
|
const selection = this.env.model.getters.getSelectedZones();
|
|
69529
|
-
|
|
69530
|
-
|
|
69531
|
-
|
|
69532
|
-
|
|
69533
|
-
|
|
69534
|
-
|
|
69535
|
-
|
|
69592
|
+
const pivotCellIds = new Set(this.env.model.getters.getCellsWithTrackedFormula("PIVOT"));
|
|
69593
|
+
if (pivotCellIds.size === 0) return;
|
|
69594
|
+
const activeSheetId = this.env.model.getters.getActiveSheetId();
|
|
69595
|
+
for (const zone of selection) for (const position of cellPositions(activeSheetId, zone)) {
|
|
69596
|
+
const mainPosition = this.env.model.getters.getArrayFormulaSpreadingOn(position);
|
|
69597
|
+
if (!mainPosition) continue;
|
|
69598
|
+
const cellId = this.env.model.getters.getCell(mainPosition)?.id;
|
|
69599
|
+
if (cellId && pivotCellIds.has(cellId)) {
|
|
69600
|
+
const pivotId = this.env.model.getters.getPivotIdFromPosition(mainPosition);
|
|
69601
|
+
if (pivotId) return pivotId;
|
|
69602
|
+
}
|
|
69536
69603
|
}
|
|
69537
69604
|
}
|
|
69538
69605
|
get class() {
|
|
@@ -71605,7 +71672,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
71605
71672
|
/**
|
|
71606
71673
|
* Select a single cell as the new anchor.
|
|
71607
71674
|
*/
|
|
71608
|
-
selectCell(col, row) {
|
|
71675
|
+
selectCell(col, row, options) {
|
|
71609
71676
|
const zone = positionToZone({
|
|
71610
71677
|
col,
|
|
71611
71678
|
row
|
|
@@ -71616,7 +71683,10 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
71616
71683
|
col,
|
|
71617
71684
|
row
|
|
71618
71685
|
}
|
|
71619
|
-
}, {
|
|
71686
|
+
}, {
|
|
71687
|
+
scrollIntoView: true,
|
|
71688
|
+
...options
|
|
71689
|
+
});
|
|
71620
71690
|
}
|
|
71621
71691
|
/**
|
|
71622
71692
|
* Set the selection to one of the cells adjacent to the current anchor cell.
|
|
@@ -71971,15 +72041,21 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
71971
72041
|
return DispatchResult.Success;
|
|
71972
72042
|
}
|
|
71973
72043
|
checkEventAnchorZone(event) {
|
|
71974
|
-
return this.checkAnchorZone(event.anchor);
|
|
72044
|
+
return this.checkAnchorZone(event.anchor, event.options);
|
|
71975
72045
|
}
|
|
71976
|
-
checkAnchorZone(anchor) {
|
|
72046
|
+
checkAnchorZone(anchor, options) {
|
|
71977
72047
|
const { cell, zone } = anchor;
|
|
71978
72048
|
if (!isInside(cell.col, cell.row, zone)) return "InvalidAnchorZone";
|
|
71979
72049
|
const { left, right, top, bottom } = zone;
|
|
71980
72050
|
const sheetId = this.getters.getActiveSheetId();
|
|
71981
|
-
|
|
71982
|
-
|
|
72051
|
+
if (!options?.allowsHiddenSelection) {
|
|
72052
|
+
const refCol = this.getters.findVisibleHeader(sheetId, "COL", left, right);
|
|
72053
|
+
if (this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) === void 0 || refCol === void 0) return "SelectionOutOfBound";
|
|
72054
|
+
} else {
|
|
72055
|
+
const numberCols = this.getters.getNumberCols(sheetId);
|
|
72056
|
+
const numberRows = this.getters.getNumberRows(sheetId);
|
|
72057
|
+
if (left < 0 || right > numberCols - 1 || top < 0 || bottom > numberRows - 1) return "SelectionOutOfBound";
|
|
72058
|
+
}
|
|
71983
72059
|
return "Success";
|
|
71984
72060
|
}
|
|
71985
72061
|
checkAnchorZoneOrThrow(anchor) {
|
|
@@ -72464,11 +72540,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
72464
72540
|
<!-- each data marker in the series does not have a different color -->
|
|
72465
72541
|
<c:varyColors val="0"/>
|
|
72466
72542
|
${joinXmlNodes(rightDataSetsNodes)}
|
|
72467
|
-
<c:axId val="${
|
|
72468
|
-
<c:axId val="${
|
|
72543
|
+
<c:axId val="${17781238}" />
|
|
72544
|
+
<c:axId val="${88853994}" />
|
|
72469
72545
|
</c:barChart>
|
|
72470
|
-
${addAx("b", "c:catAx",
|
|
72471
|
-
${addAx("r", "c:valAx",
|
|
72546
|
+
${addAx("b", "c:catAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
|
|
72547
|
+
${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
|
|
72472
72548
|
` : ""}`;
|
|
72473
72549
|
}
|
|
72474
72550
|
function addComboChart(chart) {
|
|
@@ -72720,11 +72796,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
72720
72796
|
<c:varyColors val="0"/>
|
|
72721
72797
|
${joinXmlNodes(rightDataSetsNodes)}
|
|
72722
72798
|
${insertDataLabels({ showValues: chart.showValues })}
|
|
72723
|
-
<c:axId val="${
|
|
72724
|
-
<c:axId val="${
|
|
72799
|
+
<c:axId val="${17781238}" />
|
|
72800
|
+
<c:axId val="${88853994}" />
|
|
72725
72801
|
</c:lineChart>
|
|
72726
|
-
${addAx("b", "c:catAx",
|
|
72727
|
-
${addAx("r", "c:valAx",
|
|
72802
|
+
${addAx("b", "c:catAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
|
|
72803
|
+
${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
|
|
72728
72804
|
` : ""}
|
|
72729
72805
|
`;
|
|
72730
72806
|
}
|
|
@@ -72790,11 +72866,11 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
72790
72866
|
<c:scatterStyle val="lineMarker"/>
|
|
72791
72867
|
${joinXmlNodes(rightDataSetsNodes)}
|
|
72792
72868
|
${insertDataLabels({ showValues: chart.showValues })}
|
|
72793
|
-
<c:axId val="${
|
|
72794
|
-
<c:axId val="${
|
|
72869
|
+
<c:axId val="${17781238}" />
|
|
72870
|
+
<c:axId val="${88853994}" />
|
|
72795
72871
|
</c:scatterChart>
|
|
72796
|
-
${addAx("b", "c:valAx",
|
|
72797
|
-
${addAx("r", "c:valAx",
|
|
72872
|
+
${addAx("b", "c:valAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
|
|
72873
|
+
${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
|
|
72798
72874
|
` : ""}`;
|
|
72799
72875
|
}
|
|
72800
72876
|
function addRadarChart(chart) {
|
|
@@ -84530,8 +84606,8 @@ exports.stores = stores;
|
|
|
84530
84606
|
exports.tokenColors = tokenColors;
|
|
84531
84607
|
exports.tokenize = tokenize;
|
|
84532
84608
|
|
|
84533
|
-
__info__.version = "19.3.
|
|
84534
|
-
__info__.date = "2026-
|
|
84535
|
-
__info__.hash = "
|
|
84609
|
+
__info__.version = "19.3.11";
|
|
84610
|
+
__info__.date = "2026-07-13T06:26:28.422Z";
|
|
84611
|
+
__info__.hash = "35c06d3";
|
|
84536
84612
|
|
|
84537
84613
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|