@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
package/dist/o_spreadsheet.cjs
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 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
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
@@ -235,7 +235,7 @@ const GRAY_400 = "#ced4da";
|
|
|
235
235
|
const GRAY_300 = "#D8DADD";
|
|
236
236
|
const GRAY_200 = "#E7E9ED";
|
|
237
237
|
const TEXT_BODY = "#374151";
|
|
238
|
-
const TEXT_BODY_MUTED =
|
|
238
|
+
const TEXT_BODY_MUTED = "#374151C2";
|
|
239
239
|
const ACTION_COLOR = HIGHLIGHT_COLOR;
|
|
240
240
|
const CHART_TITLE_FONT_SIZE = 16;
|
|
241
241
|
const DEFAULT_CHART_COLOR_SCALE = {
|
|
@@ -328,9 +328,6 @@ const COLOR_PICKER_DEFAULTS = [
|
|
|
328
328
|
];
|
|
329
329
|
const DEFAULT_CELL_HEIGHT = 23;
|
|
330
330
|
const FOOTER_HEIGHT = 2 * 23;
|
|
331
|
-
const MENU_SEPARATOR_BORDER_WIDTH = 1;
|
|
332
|
-
const MENU_SEPARATOR_PADDING = 5;
|
|
333
|
-
const MENU_SEPARATOR_HEIGHT = 1 + 2 * 5;
|
|
334
331
|
const ZOOM_VALUES = [
|
|
335
332
|
50,
|
|
336
333
|
75,
|
|
@@ -361,7 +358,7 @@ const DEFAULT_NUMBER_STYLE = {
|
|
|
361
358
|
const DEFAULT_VERTICAL_ALIGN = DEFAULT_STYLE.verticalAlign;
|
|
362
359
|
const DEFAULT_WRAPPING_MODE = DEFAULT_STYLE.wrapping;
|
|
363
360
|
const DEFAULT_FONT_SIZE = DEFAULT_STYLE.fontSize;
|
|
364
|
-
const DEFAULT_FONT = "'Roboto', arial";
|
|
361
|
+
const DEFAULT_FONT = "'Roboto', arial, 'Liberation Sans'";
|
|
365
362
|
const DEFAULT_BORDER_DESC = {
|
|
366
363
|
style: "thin",
|
|
367
364
|
color: "#000000"
|
|
@@ -1233,7 +1230,7 @@ function toXC(col, row, rangePart = {
|
|
|
1233
1230
|
function recomputeZones(zones, zonesToRemove = []) {
|
|
1234
1231
|
if (zones.length <= 1 && zonesToRemove.length === 0) return zones;
|
|
1235
1232
|
const profilesStartingPosition = [0];
|
|
1236
|
-
const profiles = new Map([[0, []]]);
|
|
1233
|
+
const profiles = /* @__PURE__ */ new Map([[0, []]]);
|
|
1237
1234
|
modifyProfiles(profilesStartingPosition, profiles, zones, false);
|
|
1238
1235
|
modifyProfiles(profilesStartingPosition, profiles, zonesToRemove, true);
|
|
1239
1236
|
return constructZonesFromProfiles(profilesStartingPosition, profiles);
|
|
@@ -3945,12 +3942,10 @@ const getNumberRegex = memoize(function getNumberRegex(locale) {
|
|
|
3945
3942
|
const pIntegerAndDecimals = `(?:\\d+(?:${escapeRegExp(locale.thousandsSeparator || "")}\\d{3,})*(?:${decimalSeparator}\\d*)?)`;
|
|
3946
3943
|
const pOnlyDecimals = `(?:${decimalSeparator}\\d+)`;
|
|
3947
3944
|
const pNumber = "(?:\\s*" + pIntegerAndDecimals + "|" + pOnlyDecimals + ")(?:(e|E)(?:\\+|-)?(?:[0-9]|[0-9][0-9]|[12][0-9]{2}|30[0-7]))?(?:\\s*%)?";
|
|
3948
|
-
const pMinus = "(?:\\s*-)?";
|
|
3949
|
-
const pCurrencyFormat = "(?:\\s*[\\$€])?";
|
|
3950
3945
|
const pNumberExp = "^(?:(?:" + [
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3946
|
+
"(?:\\s*-)?(?:\\s*[\\$€])?" + pNumber,
|
|
3947
|
+
"(?:\\s*-)?" + pNumber + "(?:\\s*[\\$€])?",
|
|
3948
|
+
"(?:\\s*[\\$€])?(?:\\s*-)?" + pNumber
|
|
3954
3949
|
].join(")|(?:") + "))$";
|
|
3955
3950
|
return new RegExp(pNumberExp, "i");
|
|
3956
3951
|
});
|
|
@@ -7552,7 +7547,7 @@ function isPositionDependent(cmd) {
|
|
|
7552
7547
|
function isZoneDependent(cmd) {
|
|
7553
7548
|
return "sheetId" in cmd && "zone" in cmd;
|
|
7554
7549
|
}
|
|
7555
|
-
const invalidateEvaluationCommands = new Set([
|
|
7550
|
+
const invalidateEvaluationCommands = /* @__PURE__ */ new Set([
|
|
7556
7551
|
"RENAME_SHEET",
|
|
7557
7552
|
"DELETE_SHEET",
|
|
7558
7553
|
"CREATE_SHEET",
|
|
@@ -7574,7 +7569,7 @@ const invalidateEvaluationCommands = new Set([
|
|
|
7574
7569
|
"UPDATE_NAMED_RANGE",
|
|
7575
7570
|
"DELETE_NAMED_RANGE"
|
|
7576
7571
|
]);
|
|
7577
|
-
const invalidateChartEvaluationCommands = new Set([
|
|
7572
|
+
const invalidateChartEvaluationCommands = /* @__PURE__ */ new Set([
|
|
7578
7573
|
"EVALUATE_CELLS",
|
|
7579
7574
|
"EVALUATE_CHARTS",
|
|
7580
7575
|
"UPDATE_CELL",
|
|
@@ -7593,20 +7588,20 @@ const invalidateChartEvaluationCommands = new Set([
|
|
|
7593
7588
|
"UNDO",
|
|
7594
7589
|
"REDO"
|
|
7595
7590
|
]);
|
|
7596
|
-
const invalidateDependenciesCommands = new Set(["MOVE_RANGES"]);
|
|
7597
|
-
const invalidateCFEvaluationCommands = new Set([
|
|
7591
|
+
const invalidateDependenciesCommands = /* @__PURE__ */ new Set(["MOVE_RANGES"]);
|
|
7592
|
+
const invalidateCFEvaluationCommands = /* @__PURE__ */ new Set([
|
|
7598
7593
|
"EVALUATE_CELLS",
|
|
7599
7594
|
"ADD_CONDITIONAL_FORMAT",
|
|
7600
7595
|
"REMOVE_CONDITIONAL_FORMAT",
|
|
7601
7596
|
"CHANGE_CONDITIONAL_FORMAT_PRIORITY"
|
|
7602
7597
|
]);
|
|
7603
|
-
const invalidateBordersCommands = new Set([
|
|
7598
|
+
const invalidateBordersCommands = /* @__PURE__ */ new Set([
|
|
7604
7599
|
"AUTOFILL_CELL",
|
|
7605
7600
|
"SET_BORDER",
|
|
7606
7601
|
"SET_ZONE_BORDERS",
|
|
7607
7602
|
"SET_BORDERS_ON_TARGET"
|
|
7608
7603
|
]);
|
|
7609
|
-
const invalidSubtotalFormulasCommands = new Set([
|
|
7604
|
+
const invalidSubtotalFormulasCommands = /* @__PURE__ */ new Set([
|
|
7610
7605
|
"UNHIDE_COLUMNS_ROWS",
|
|
7611
7606
|
"HIDE_COLUMNS_ROWS",
|
|
7612
7607
|
"GROUP_HEADERS",
|
|
@@ -7620,7 +7615,7 @@ const invalidSubtotalFormulasCommands = new Set([
|
|
|
7620
7615
|
"UPDATE_TABLE",
|
|
7621
7616
|
"UPDATE_FILTER"
|
|
7622
7617
|
]);
|
|
7623
|
-
const readonlyAllowedCommands = new Set([
|
|
7618
|
+
const readonlyAllowedCommands = /* @__PURE__ */ new Set([
|
|
7624
7619
|
"START",
|
|
7625
7620
|
"ACTIVATE_SHEET",
|
|
7626
7621
|
"COPY",
|
|
@@ -7636,7 +7631,7 @@ const readonlyAllowedCommands = new Set([
|
|
|
7636
7631
|
"UPDATE_CAROUSEL_ACTIVE_ITEM",
|
|
7637
7632
|
"UPDATE_PIVOT"
|
|
7638
7633
|
]);
|
|
7639
|
-
const lockedSheetAllowedCommands = new Set([
|
|
7634
|
+
const lockedSheetAllowedCommands = /* @__PURE__ */ new Set([
|
|
7640
7635
|
"LOCK_SHEET",
|
|
7641
7636
|
"UNLOCK_SHEET",
|
|
7642
7637
|
"MOVE_SHEET",
|
|
@@ -7667,7 +7662,7 @@ const lockedSheetAllowedCommands = new Set([
|
|
|
7667
7662
|
"SHIFT_VIEWPORT_DOWN",
|
|
7668
7663
|
"SHIFT_VIEWPORT_UP"
|
|
7669
7664
|
]);
|
|
7670
|
-
const coreTypes = new Set([
|
|
7665
|
+
const coreTypes = /* @__PURE__ */ new Set([
|
|
7671
7666
|
"UPDATE_CELL",
|
|
7672
7667
|
"UPDATE_CELL_POSITION",
|
|
7673
7668
|
"CLEAR_CELL",
|
|
@@ -8301,7 +8296,6 @@ function getCanonicalRepresentation(item) {
|
|
|
8301
8296
|
//#region src/helpers/edge_scrolling.ts
|
|
8302
8297
|
const MAX_DELAY = 140;
|
|
8303
8298
|
const MIN_DELAY = 20;
|
|
8304
|
-
const ACCELERATION = .035;
|
|
8305
8299
|
/**
|
|
8306
8300
|
* Decreasing exponential function used to determine the "speed" of edge-scrolling
|
|
8307
8301
|
* as the timeout delay.
|
|
@@ -8309,7 +8303,7 @@ const ACCELERATION = .035;
|
|
|
8309
8303
|
* Returns a timeout delay in milliseconds.
|
|
8310
8304
|
*/
|
|
8311
8305
|
function scrollDelay(value) {
|
|
8312
|
-
return 20 + (140 - 20) * Math.exp(
|
|
8306
|
+
return 20 + (140 - 20) * Math.exp(-.035 * (value - 1));
|
|
8313
8307
|
}
|
|
8314
8308
|
|
|
8315
8309
|
//#endregion
|
|
@@ -8712,7 +8706,7 @@ var UuidGenerator = class {
|
|
|
8712
8706
|
const cryptoObj = this.getCrypto();
|
|
8713
8707
|
if (cryptoObj) return "10000000-1000".replace(/[01]/g, (c) => {
|
|
8714
8708
|
const n = Number(c);
|
|
8715
|
-
return (n ^ cryptoObj.getRandomValues(new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
8709
|
+
return (n ^ cryptoObj.getRandomValues(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
8716
8710
|
});
|
|
8717
8711
|
else return "xxxxxxxx-xxxx".replace(/[xy]/g, function(c) {
|
|
8718
8712
|
const r = Math.random() * 16 | 0;
|
|
@@ -8727,7 +8721,7 @@ var UuidGenerator = class {
|
|
|
8727
8721
|
const cryptoObj = this.getCrypto();
|
|
8728
8722
|
if (cryptoObj) return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => {
|
|
8729
8723
|
const n = Number(c);
|
|
8730
|
-
return (n ^ cryptoObj.getRandomValues(new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
8724
|
+
return (n ^ cryptoObj.getRandomValues(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
8731
8725
|
});
|
|
8732
8726
|
else return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
|
|
8733
8727
|
const r = Math.random() * 16 | 0;
|
|
@@ -12749,7 +12743,7 @@ const availableConditionalFormatOperators = new Set(cfOperators);
|
|
|
12749
12743
|
|
|
12750
12744
|
//#endregion
|
|
12751
12745
|
//#region src/types/data_validation.ts
|
|
12752
|
-
const availableDataValidationOperators = new Set([
|
|
12746
|
+
const availableDataValidationOperators = /* @__PURE__ */ new Set([
|
|
12753
12747
|
"containsText",
|
|
12754
12748
|
"notContainsText",
|
|
12755
12749
|
"isEqualText",
|
|
@@ -13343,10 +13337,10 @@ function toNormalizedPivotValue(dimension, groupValue) {
|
|
|
13343
13337
|
type: dimension.type
|
|
13344
13338
|
}));
|
|
13345
13339
|
if (groupValueString.toLowerCase() === "false") return false;
|
|
13346
|
-
return pivotNormalizationValueRegistry.get(dimension.type)(groupValueString, dimension
|
|
13340
|
+
return pivotNormalizationValueRegistry.get(dimension.type)(groupValueString, dimension);
|
|
13347
13341
|
}
|
|
13348
|
-
function normalizeDateTime(value,
|
|
13349
|
-
return pivotTimeAdapter(granularity ?? "month").normalizeFunctionValue(value);
|
|
13342
|
+
function normalizeDateTime(value, dimension) {
|
|
13343
|
+
return pivotTimeAdapter(dimension.granularity ?? "month").normalizeFunctionValue(value);
|
|
13350
13344
|
}
|
|
13351
13345
|
function toFunctionPivotValue(value, dimension) {
|
|
13352
13346
|
if (value === null) return `"null"`;
|
|
@@ -14147,7 +14141,7 @@ function filterInvalidCalendarDataPoints(labels, datasets) {
|
|
|
14147
14141
|
*/
|
|
14148
14142
|
function filterInvalidHierarchicalPoints(values, hierarchy) {
|
|
14149
14143
|
const numberOfDataPoints = Math.max(values.length, ...hierarchy.map((dataset) => dataset.data?.length || 0));
|
|
14150
|
-
const isEmpty = (value) => value === null || value === "";
|
|
14144
|
+
const isEmpty = (value) => value === void 0 || value === null || value === "";
|
|
14151
14145
|
const dataPointsIndexes = range(0, numberOfDataPoints).filter((dataPointIndex) => {
|
|
14152
14146
|
const groups = hierarchy.map((dataset) => dataset.data?.[dataPointIndex]);
|
|
14153
14147
|
if (isEmpty(groups[0]?.value)) return false;
|
|
@@ -15945,6 +15939,59 @@ function getCarouselItemTitle(getters, item) {
|
|
|
15945
15939
|
return (chartSubtypeRegistry.getAll().find((c) => c.matcher?.(definition)) || chartSubtypeRegistry.get(definition.type)).displayName;
|
|
15946
15940
|
}
|
|
15947
15941
|
|
|
15942
|
+
//#endregion
|
|
15943
|
+
//#region src/components/helpers/css.ts
|
|
15944
|
+
function getTextDecoration({ strikethrough, underline }) {
|
|
15945
|
+
if (!strikethrough && !underline) return "none";
|
|
15946
|
+
return `${strikethrough ? "line-through" : ""} ${underline ? "underline" : ""}`;
|
|
15947
|
+
}
|
|
15948
|
+
/**
|
|
15949
|
+
* Convert the cell style to CSS properties.
|
|
15950
|
+
*/
|
|
15951
|
+
function cellStyleToCss(style) {
|
|
15952
|
+
const attributes = cellTextStyleToCss(style);
|
|
15953
|
+
if (!style) return attributes;
|
|
15954
|
+
if (style.fillColor) attributes["background"] = style.fillColor;
|
|
15955
|
+
return attributes;
|
|
15956
|
+
}
|
|
15957
|
+
/**
|
|
15958
|
+
* Convert the cell text style to CSS properties.
|
|
15959
|
+
*/
|
|
15960
|
+
function cellTextStyleToCss(style) {
|
|
15961
|
+
const attributes = {};
|
|
15962
|
+
if (!style) return attributes;
|
|
15963
|
+
if (style.bold) attributes["font-weight"] = "bold";
|
|
15964
|
+
if (style.italic) attributes["font-style"] = "italic";
|
|
15965
|
+
if (style.fontSize) attributes["font-size"] = `${style.fontSize}px`;
|
|
15966
|
+
if (style.strikethrough || style.underline) {
|
|
15967
|
+
let decoration = style.strikethrough ? "line-through" : "";
|
|
15968
|
+
decoration = style.underline ? decoration + " underline" : decoration;
|
|
15969
|
+
attributes["text-decoration"] = decoration;
|
|
15970
|
+
}
|
|
15971
|
+
if (style.textColor) attributes["color"] = style.textColor;
|
|
15972
|
+
return attributes;
|
|
15973
|
+
}
|
|
15974
|
+
/**
|
|
15975
|
+
* Transform CSS properties into a CSS string.
|
|
15976
|
+
*/
|
|
15977
|
+
function cssPropertiesToCss(attributes) {
|
|
15978
|
+
let styleStr = "";
|
|
15979
|
+
for (const attName in attributes) {
|
|
15980
|
+
if (!attributes[attName]) continue;
|
|
15981
|
+
styleStr += `${attName}:${attributes[attName]}; `;
|
|
15982
|
+
}
|
|
15983
|
+
return styleStr;
|
|
15984
|
+
}
|
|
15985
|
+
function getElementMargins(el) {
|
|
15986
|
+
const style = window.getComputedStyle(el);
|
|
15987
|
+
return {
|
|
15988
|
+
top: parseInt(style.marginTop, 10) || 0,
|
|
15989
|
+
bottom: parseInt(style.marginBottom, 10) || 0,
|
|
15990
|
+
left: parseInt(style.marginLeft, 10) || 0,
|
|
15991
|
+
right: parseInt(style.marginRight, 10) || 0
|
|
15992
|
+
};
|
|
15993
|
+
}
|
|
15994
|
+
|
|
15948
15995
|
//#endregion
|
|
15949
15996
|
//#region src/components/figures/chart/chartJs/zoomable_chart/zoomable_chart_store.ts
|
|
15950
15997
|
const TREND_LINE_AXES_IDS = ["x1", MOVING_AVERAGE_TREND_LINE_XAXIS_ID];
|
|
@@ -16063,9 +16110,7 @@ var ZoomableChartJsComponent = class extends ChartJsComponent {
|
|
|
16063
16110
|
this.removeEventListeners();
|
|
16064
16111
|
}
|
|
16065
16112
|
get containerStyle() {
|
|
16066
|
-
return `
|
|
16067
|
-
height:${this.sliceable ? `calc(100% - ${60}px)` : "100%"};
|
|
16068
|
-
`;
|
|
16113
|
+
return cssPropertiesToCss({ height: this.sliceable ? `calc(100% - ${60}px)` : "100%" });
|
|
16069
16114
|
}
|
|
16070
16115
|
get masterChartContainerStyle() {
|
|
16071
16116
|
const runtime = this.env.model.getters.getChartRuntime(this.props.chartId);
|
|
@@ -16929,59 +16974,6 @@ var FullScreenFigureStore = class extends SpreadsheetStore {
|
|
|
16929
16974
|
}
|
|
16930
16975
|
};
|
|
16931
16976
|
|
|
16932
|
-
//#endregion
|
|
16933
|
-
//#region src/components/helpers/css.ts
|
|
16934
|
-
function getTextDecoration({ strikethrough, underline }) {
|
|
16935
|
-
if (!strikethrough && !underline) return "none";
|
|
16936
|
-
return `${strikethrough ? "line-through" : ""} ${underline ? "underline" : ""}`;
|
|
16937
|
-
}
|
|
16938
|
-
/**
|
|
16939
|
-
* Convert the cell style to CSS properties.
|
|
16940
|
-
*/
|
|
16941
|
-
function cellStyleToCss(style) {
|
|
16942
|
-
const attributes = cellTextStyleToCss(style);
|
|
16943
|
-
if (!style) return attributes;
|
|
16944
|
-
if (style.fillColor) attributes["background"] = style.fillColor;
|
|
16945
|
-
return attributes;
|
|
16946
|
-
}
|
|
16947
|
-
/**
|
|
16948
|
-
* Convert the cell text style to CSS properties.
|
|
16949
|
-
*/
|
|
16950
|
-
function cellTextStyleToCss(style) {
|
|
16951
|
-
const attributes = {};
|
|
16952
|
-
if (!style) return attributes;
|
|
16953
|
-
if (style.bold) attributes["font-weight"] = "bold";
|
|
16954
|
-
if (style.italic) attributes["font-style"] = "italic";
|
|
16955
|
-
if (style.fontSize) attributes["font-size"] = `${style.fontSize}px`;
|
|
16956
|
-
if (style.strikethrough || style.underline) {
|
|
16957
|
-
let decoration = style.strikethrough ? "line-through" : "";
|
|
16958
|
-
decoration = style.underline ? decoration + " underline" : decoration;
|
|
16959
|
-
attributes["text-decoration"] = decoration;
|
|
16960
|
-
}
|
|
16961
|
-
if (style.textColor) attributes["color"] = style.textColor;
|
|
16962
|
-
return attributes;
|
|
16963
|
-
}
|
|
16964
|
-
/**
|
|
16965
|
-
* Transform CSS properties into a CSS string.
|
|
16966
|
-
*/
|
|
16967
|
-
function cssPropertiesToCss(attributes) {
|
|
16968
|
-
let styleStr = "";
|
|
16969
|
-
for (const attName in attributes) {
|
|
16970
|
-
if (!attributes[attName]) continue;
|
|
16971
|
-
styleStr += `${attName}:${attributes[attName]}; `;
|
|
16972
|
-
}
|
|
16973
|
-
return styleStr;
|
|
16974
|
-
}
|
|
16975
|
-
function getElementMargins(el) {
|
|
16976
|
-
const style = window.getComputedStyle(el);
|
|
16977
|
-
return {
|
|
16978
|
-
top: parseInt(style.marginTop, 10) || 0,
|
|
16979
|
-
bottom: parseInt(style.marginBottom, 10) || 0,
|
|
16980
|
-
left: parseInt(style.marginLeft, 10) || 0,
|
|
16981
|
-
right: parseInt(style.marginRight, 10) || 0
|
|
16982
|
-
};
|
|
16983
|
-
}
|
|
16984
|
-
|
|
16985
16977
|
//#endregion
|
|
16986
16978
|
//#region src/stores/DOM_focus_store.ts
|
|
16987
16979
|
var DOMFocusableElementStore = class {
|
|
@@ -18229,11 +18221,11 @@ var FigureComponent = class extends _odoo_owl.Component {
|
|
|
18229
18221
|
getResizerPosition(resizer) {
|
|
18230
18222
|
const anchorCenteringOffset = (ANCHOR_SIZE - ACTIVE_BORDER_WIDTH) / 2;
|
|
18231
18223
|
const style = {};
|
|
18232
|
-
if (resizer.includes("top")) style.top =
|
|
18233
|
-
else if (resizer.includes("bottom")) style.bottom =
|
|
18224
|
+
if (resizer.includes("top")) style.top = `-3px`;
|
|
18225
|
+
else if (resizer.includes("bottom")) style.bottom = `-3px`;
|
|
18234
18226
|
else style.bottom = `calc(50% - ${anchorCenteringOffset}px)`;
|
|
18235
|
-
if (resizer.includes("left")) style.left =
|
|
18236
|
-
else if (resizer.includes("right")) style.right =
|
|
18227
|
+
if (resizer.includes("left")) style.left = `-3px`;
|
|
18228
|
+
else if (resizer.includes("right")) style.right = `-3px`;
|
|
18237
18229
|
else style.right = `calc(50% - ${anchorCenteringOffset}px)`;
|
|
18238
18230
|
return cssPropertiesToCss(style);
|
|
18239
18231
|
}
|
|
@@ -25831,6 +25823,7 @@ function mapParenthesisCode(tokens) {
|
|
|
25831
25823
|
function mapParentFunction(tokens) {
|
|
25832
25824
|
const stack = [];
|
|
25833
25825
|
let functionStarted = "";
|
|
25826
|
+
let braceDepth = 0;
|
|
25834
25827
|
function pushTokenToFunctionContext(token) {
|
|
25835
25828
|
if (stack.length === 0) return;
|
|
25836
25829
|
const functionContext = stack.at(-1);
|
|
@@ -25843,7 +25836,7 @@ function mapParentFunction(tokens) {
|
|
|
25843
25836
|
});
|
|
25844
25837
|
}
|
|
25845
25838
|
}
|
|
25846
|
-
return tokens.map((token
|
|
25839
|
+
return tokens.map((token) => {
|
|
25847
25840
|
if (!["SPACE", "LEFT_PAREN"].includes(token.type)) functionStarted = "";
|
|
25848
25841
|
switch (token.type) {
|
|
25849
25842
|
case "SYMBOL":
|
|
@@ -25864,8 +25857,16 @@ function mapParentFunction(tokens) {
|
|
|
25864
25857
|
stack.pop()?.argsTokens?.flat().forEach(pushTokenToFunctionContext);
|
|
25865
25858
|
pushTokenToFunctionContext(token);
|
|
25866
25859
|
break;
|
|
25860
|
+
case "LEFT_BRACE":
|
|
25861
|
+
braceDepth++;
|
|
25862
|
+
pushTokenToFunctionContext(token);
|
|
25863
|
+
break;
|
|
25864
|
+
case "RIGHT_BRACE":
|
|
25865
|
+
braceDepth--;
|
|
25866
|
+
pushTokenToFunctionContext(token);
|
|
25867
|
+
break;
|
|
25867
25868
|
case "ARG_SEPARATOR":
|
|
25868
|
-
if (stack.length) stack[stack.length - 1].argPosition++;
|
|
25869
|
+
if (stack.length && braceDepth === 0) stack[stack.length - 1].argPosition++;
|
|
25869
25870
|
pushTokenToFunctionContext(token);
|
|
25870
25871
|
break;
|
|
25871
25872
|
default:
|
|
@@ -27217,10 +27218,7 @@ function startDnd(onPointerMove, onPointerUp) {
|
|
|
27217
27218
|
//#endregion
|
|
27218
27219
|
//#region src/components/color_picker/color_picker.ts
|
|
27219
27220
|
const ITEM_BORDER_WIDTH = 1;
|
|
27220
|
-
const
|
|
27221
|
-
const ITEMS_PER_LINE = 10;
|
|
27222
|
-
const MAGNIFIER_EDGE = 16;
|
|
27223
|
-
const CONTENT_WIDTH = ITEMS_PER_LINE * (ITEM_EDGE_LENGTH + 2 * ITEM_BORDER_WIDTH) + (ITEMS_PER_LINE - 1) * 2;
|
|
27221
|
+
const CONTENT_WIDTH = 218;
|
|
27224
27222
|
const INNER_GRADIENT_WIDTH = CONTENT_WIDTH - 2 * ITEM_BORDER_WIDTH;
|
|
27225
27223
|
const INNER_GRADIENT_HEIGHT = CONTENT_WIDTH - 30 - 2 * ITEM_BORDER_WIDTH;
|
|
27226
27224
|
var ColorPicker = class extends _odoo_owl.Component {
|
|
@@ -27284,8 +27282,8 @@ var ColorPicker = class extends _odoo_owl.Component {
|
|
|
27284
27282
|
const left = Math.round(INNER_GRADIENT_WIDTH * clip(s / 100, 0, 1));
|
|
27285
27283
|
const top = Math.round(INNER_GRADIENT_HEIGHT * clip(1 - 2 * l / (200 - s), 0, 1));
|
|
27286
27284
|
return cssPropertiesToCss({
|
|
27287
|
-
left: `${-
|
|
27288
|
-
top: `${-
|
|
27285
|
+
left: `${-16 / 2 + left}px`,
|
|
27286
|
+
top: `${-16 / 2 + top}px`,
|
|
27289
27287
|
background: hslaToHex(this.state.currentHslaColor)
|
|
27290
27288
|
});
|
|
27291
27289
|
}
|
|
@@ -32825,9 +32823,12 @@ var SpreadsheetChart = class SpreadsheetChart {
|
|
|
32825
32823
|
labelValues: []
|
|
32826
32824
|
})
|
|
32827
32825
|
};
|
|
32828
|
-
return this.chartTypeBuilder.getRuntime(getters, this.definition, dataExtractors, this.sheetId, {
|
|
32829
|
-
|
|
32830
|
-
|
|
32826
|
+
return this.chartTypeBuilder.getRuntime(getters, this.definition, dataExtractors, this.sheetId, {
|
|
32827
|
+
onClick: (event, items, chartJsChart) => {
|
|
32828
|
+
return this.dataSourceBuilder.onDataSetClick?.(this.definition.type, chartId, event, items, chartJsChart, getters);
|
|
32829
|
+
},
|
|
32830
|
+
onHover: (event, items, chartJsChart) => this.dataSourceBuilder.onDataSetHover?.(this.definition.type, chartId, event, items, chartJsChart)
|
|
32831
|
+
});
|
|
32831
32832
|
}
|
|
32832
32833
|
static deleteInvalidKeys(definition) {
|
|
32833
32834
|
definition = { ...definition };
|
|
@@ -33034,7 +33035,7 @@ function getChartDatasetValues(getters, dataSets) {
|
|
|
33034
33035
|
if (cell) label = cell.formattedValue;
|
|
33035
33036
|
}
|
|
33036
33037
|
let data = ds.dataRange ? getData(getters, ds) : [];
|
|
33037
|
-
if (data.every((cell) => !cell.value || isTextResult(cell)) && data.filter(isTextResult).length > 1) data = data.map((cell) => cell.value && isErrorResult(cell) ? ONE : EMPTY);
|
|
33038
|
+
if (data.every((cell) => !cell.value || isTextResult(cell)) && data.filter(isTextResult).length > 1) data = data.map((cell) => cell.value && !isErrorResult(cell) ? ONE : EMPTY);
|
|
33038
33039
|
else if (data.every((cell) => !isNumberResult(cell))) hidden = true;
|
|
33039
33040
|
datasetValues.push({
|
|
33040
33041
|
data,
|
|
@@ -36024,9 +36025,9 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
|
|
|
36024
36025
|
allSheetsMatches = [];
|
|
36025
36026
|
activeSheetMatches = [];
|
|
36026
36027
|
specificRangeMatches = [];
|
|
36028
|
+
selectedMatchPosition = null;
|
|
36027
36029
|
currentSearchRegex = null;
|
|
36028
36030
|
initialShowFormulaState;
|
|
36029
|
-
preserveSelectedMatchIndex = false;
|
|
36030
36031
|
irreplaceableMatchCount = 0;
|
|
36031
36032
|
isSearchDirty = false;
|
|
36032
36033
|
shouldFinalizeUpdateSelection = false;
|
|
@@ -36148,7 +36149,10 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
|
|
|
36148
36149
|
*/
|
|
36149
36150
|
_updateSearch(toSearch, searchOptions) {
|
|
36150
36151
|
this.searchOptions = searchOptions;
|
|
36151
|
-
if (toSearch !== this.toSearch)
|
|
36152
|
+
if (toSearch !== this.toSearch) {
|
|
36153
|
+
this.selectedMatchIndex = null;
|
|
36154
|
+
this.selectedMatchPosition = null;
|
|
36155
|
+
}
|
|
36152
36156
|
this.toSearch = toSearch;
|
|
36153
36157
|
this.currentSearchRegex = getSearchRegex(this.toSearch, this.searchOptions);
|
|
36154
36158
|
this.refreshSearch({
|
|
@@ -36160,8 +36164,14 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
|
|
|
36160
36164
|
* refresh the matches according to the current search options
|
|
36161
36165
|
*/
|
|
36162
36166
|
refreshSearch(options) {
|
|
36163
|
-
if (!this.preserveSelectedMatchIndex) this.selectedMatchIndex = null;
|
|
36164
36167
|
this.findMatches();
|
|
36168
|
+
if (this.selectedMatchPosition) if (this.selectedMatchPosition.sheetId !== this.getters.getActiveSheetId()) {
|
|
36169
|
+
this.selectedMatchIndex = null;
|
|
36170
|
+
this.selectedMatchPosition = null;
|
|
36171
|
+
} else {
|
|
36172
|
+
const index = this.searchMatches.findIndex((match) => match.sheetId === this.selectedMatchPosition?.sheetId && match.col === this.selectedMatchPosition?.col && match.row === this.selectedMatchPosition?.row);
|
|
36173
|
+
if (index !== -1) this.selectedMatchIndex = index;
|
|
36174
|
+
}
|
|
36165
36175
|
this.selectNextCell(0, options);
|
|
36166
36176
|
}
|
|
36167
36177
|
getSheetsInSearchOrder() {
|
|
@@ -36229,6 +36239,7 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
|
|
|
36229
36239
|
const matches = this.searchMatches;
|
|
36230
36240
|
if (!matches.length) {
|
|
36231
36241
|
this.selectedMatchIndex = null;
|
|
36242
|
+
this.selectedMatchPosition = null;
|
|
36232
36243
|
return;
|
|
36233
36244
|
}
|
|
36234
36245
|
let nextIndex;
|
|
@@ -36242,14 +36253,13 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
|
|
|
36242
36253
|
} else nextIndex = this.selectedMatchIndex + indexChange;
|
|
36243
36254
|
nextIndex = (nextIndex + matches.length) % matches.length;
|
|
36244
36255
|
this.selectedMatchIndex = nextIndex;
|
|
36256
|
+
this.selectedMatchPosition = matches[this.selectedMatchIndex];
|
|
36245
36257
|
const selectedMatch = matches[nextIndex];
|
|
36246
36258
|
if (options.jumpToMatchSheet && this.getters.getActiveSheetId() !== selectedMatch.sheetId) {
|
|
36247
|
-
this.preserveSelectedMatchIndex = true;
|
|
36248
36259
|
this.model.dispatch("ACTIVATE_SHEET", {
|
|
36249
36260
|
sheetIdFrom: this.getters.getActiveSheetId(),
|
|
36250
36261
|
sheetIdTo: selectedMatch.sheetId
|
|
36251
36262
|
});
|
|
36252
|
-
this.preserveSelectedMatchIndex = false;
|
|
36253
36263
|
this.isSearchDirty = false;
|
|
36254
36264
|
}
|
|
36255
36265
|
this.model.selection.getBackToDefault();
|
|
@@ -36260,7 +36270,6 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
|
|
|
36260
36270
|
*/
|
|
36261
36271
|
replace() {
|
|
36262
36272
|
if (this.selectedMatchIndex === null) return;
|
|
36263
|
-
this.preserveSelectedMatchIndex = true;
|
|
36264
36273
|
this.shouldFinalizeUpdateSelection = true;
|
|
36265
36274
|
this.model.dispatch("REPLACE_SEARCH", {
|
|
36266
36275
|
searchString: this.toSearch,
|
|
@@ -36268,7 +36277,6 @@ var FindAndReplaceStore = class extends SpreadsheetStore {
|
|
|
36268
36277
|
matches: [this.searchMatches[this.selectedMatchIndex]],
|
|
36269
36278
|
searchOptions: this.searchOptions
|
|
36270
36279
|
});
|
|
36271
|
-
this.preserveSelectedMatchIndex = false;
|
|
36272
36280
|
}
|
|
36273
36281
|
/**
|
|
36274
36282
|
* Apply the replace function to all the matches one time.
|
|
@@ -41204,7 +41212,7 @@ var TableStylePreview = class extends _odoo_owl.Component {
|
|
|
41204
41212
|
mode: "pivot",
|
|
41205
41213
|
numberOfCols: 5,
|
|
41206
41214
|
numberOfRows: 8,
|
|
41207
|
-
mainSubHeaderRows: new Set([props.tableConfig.numberOfHeaders, props.tableConfig.numberOfHeaders + 3])
|
|
41215
|
+
mainSubHeaderRows: /* @__PURE__ */ new Set([props.tableConfig.numberOfHeaders, props.tableConfig.numberOfHeaders + 3])
|
|
41208
41216
|
};
|
|
41209
41217
|
drawPreviewTable(ctx, getComputedTableStyle(props.tableConfig, props.tableStyle, tableMetaData), {
|
|
41210
41218
|
...tableMetaData,
|
|
@@ -44530,9 +44538,12 @@ var CellComposerStore = class extends AbstractComposerStore {
|
|
|
44530
44538
|
}
|
|
44531
44539
|
stopEdition(direction) {
|
|
44532
44540
|
if (this.canStopEdition()) {
|
|
44541
|
+
const { col, row } = this.currentEditedCell;
|
|
44533
44542
|
this._stopEdition();
|
|
44534
|
-
if (direction) if (this.getters.isSingleCellOrMerge(this.sheetId, this.getters.getSelectedZone()))
|
|
44535
|
-
|
|
44543
|
+
if (direction) if (this.getters.isSingleCellOrMerge(this.sheetId, this.getters.getSelectedZone())) {
|
|
44544
|
+
this.model.selection.selectCell(col, row);
|
|
44545
|
+
this.model.selection.moveAnchorCell(direction, 1);
|
|
44546
|
+
} else moveAnchorWithinSelection(this.getters, this.model.selection, direction);
|
|
44536
44547
|
return;
|
|
44537
44548
|
}
|
|
44538
44549
|
const editedCell = this.currentEditedCell;
|
|
@@ -48542,7 +48553,7 @@ var Grid = class extends _odoo_owl.Component {
|
|
|
48542
48553
|
ev.preventDefault();
|
|
48543
48554
|
const clipboardData = ev.clipboardData;
|
|
48544
48555
|
if (!clipboardData) return;
|
|
48545
|
-
const image = [...clipboardData.files]
|
|
48556
|
+
const image = [...clipboardData.files].find((file) => AllowedImageMimeTypes.includes(file.type));
|
|
48546
48557
|
const osClipboard = { content: {
|
|
48547
48558
|
["text/plain"]: clipboardData?.getData("text/plain"),
|
|
48548
48559
|
["text/html"]: clipboardData?.getData("text/html")
|
|
@@ -54608,7 +54619,7 @@ function compareIntervals(a, b) {
|
|
|
54608
54619
|
//#region src/plugins/ui_core_views/cell_evaluation/zone_set.ts
|
|
54609
54620
|
var ZoneSet = class ZoneSet {
|
|
54610
54621
|
profilesStartingPosition = [0];
|
|
54611
|
-
profiles = new Map([[0, []]]);
|
|
54622
|
+
profiles = /* @__PURE__ */ new Map([[0, []]]);
|
|
54612
54623
|
constructor(zones = []) {
|
|
54613
54624
|
for (const zone of zones) this.add(zone);
|
|
54614
54625
|
}
|
|
@@ -56409,12 +56420,22 @@ var CustomColorsPlugin = class extends CoreViewPlugin {
|
|
|
56409
56420
|
handle(cmd) {
|
|
56410
56421
|
switch (cmd.type) {
|
|
56411
56422
|
case "START":
|
|
56412
|
-
for (const sheetId of this.getters.getSheetIds())
|
|
56423
|
+
for (const sheetId of this.getters.getSheetIds()) {
|
|
56424
|
+
for (const chartId of this.getters.getChartIds(sheetId)) this.tryToAddColors(this.getChartColors(chartId));
|
|
56425
|
+
for (const figureId of this.getters.getFigures(sheetId)) this.tryToAddColors(this.getCarouselColors(sheetId, figureId.id));
|
|
56426
|
+
}
|
|
56413
56427
|
break;
|
|
56414
56428
|
case "UPDATE_CHART":
|
|
56415
56429
|
case "CREATE_CHART":
|
|
56416
56430
|
this.tryToAddColors(this.getChartColors(cmd.chartId));
|
|
56417
56431
|
break;
|
|
56432
|
+
case "CREATE_CAROUSEL":
|
|
56433
|
+
case "UPDATE_CAROUSEL":
|
|
56434
|
+
this.tryToAddColors(this.getCarouselColors(cmd.sheetId, cmd.figureId));
|
|
56435
|
+
break;
|
|
56436
|
+
case "COLOR_SHEET":
|
|
56437
|
+
if (cmd.color) this.tryToAddColors([cmd.color]);
|
|
56438
|
+
break;
|
|
56418
56439
|
case "UPDATE_CELL":
|
|
56419
56440
|
case "ADD_CONDITIONAL_FORMAT":
|
|
56420
56441
|
case "SET_BORDER":
|
|
@@ -56437,8 +56458,12 @@ var CustomColorsPlugin = class extends CoreViewPlugin {
|
|
|
56437
56458
|
}
|
|
56438
56459
|
computeCustomColors() {
|
|
56439
56460
|
let usedColors = [];
|
|
56440
|
-
for (const sheetId of this.getters.getSheetIds()) usedColors = usedColors.concat(this.getColorsFromCells(sheetId), this.getFormattingColors(sheetId), this.getTableColors(sheetId));
|
|
56441
|
-
return [
|
|
56461
|
+
for (const sheetId of this.getters.getSheetIds()) usedColors = usedColors.concat(this.getSheetColors(sheetId), this.getColorsFromCells(sheetId), this.getFormattingColors(sheetId), this.getTableColors(sheetId));
|
|
56462
|
+
return [.../* @__PURE__ */ new Set([...usedColors])];
|
|
56463
|
+
}
|
|
56464
|
+
getSheetColors(sheetId) {
|
|
56465
|
+
const sheet = this.getters.getSheet(sheetId);
|
|
56466
|
+
return sheet.color ? [sheet.color] : [];
|
|
56442
56467
|
}
|
|
56443
56468
|
getColorsFromCells(sheetId) {
|
|
56444
56469
|
const cells = Object.values(this.getters.getCells(sheetId));
|
|
@@ -56471,6 +56496,11 @@ var CustomColorsPlugin = class extends CoreViewPlugin {
|
|
|
56471
56496
|
if (chart === void 0) return [];
|
|
56472
56497
|
return [...JSON.stringify(chart.getRangeDefinition()).matchAll(chartColorRegex)].map((color) => color[1]);
|
|
56473
56498
|
}
|
|
56499
|
+
getCarouselColors(sheetId, figureId) {
|
|
56500
|
+
if (this.getters.getFigure(sheetId, figureId)?.tag !== "carousel") return [];
|
|
56501
|
+
const titleColor = this.getters.getCarousel(figureId).title?.color;
|
|
56502
|
+
return titleColor ? [titleColor] : [];
|
|
56503
|
+
}
|
|
56474
56504
|
getTableColors(sheetId) {
|
|
56475
56505
|
return this.getters.getTables(sheetId).flatMap((table) => {
|
|
56476
56506
|
const config = table.config;
|
|
@@ -57096,13 +57126,13 @@ var EvaluationConditionalFormatPlugin = class extends CoreViewPlugin {
|
|
|
57096
57126
|
const minValue = this.parsePoint(sheetId, range, rule.minimum, "min");
|
|
57097
57127
|
const midValue = rule.midpoint ? this.parsePoint(sheetId, range, rule.midpoint) : null;
|
|
57098
57128
|
const maxValue = this.parsePoint(sheetId, range, rule.maximum, "max");
|
|
57099
|
-
if (minValue === null || maxValue === null || minValue >= maxValue || midValue && (minValue >= midValue || midValue >= maxValue)) return;
|
|
57129
|
+
if (minValue === null || maxValue === null || minValue >= maxValue || midValue !== null && (minValue >= midValue || midValue >= maxValue)) return;
|
|
57100
57130
|
const zone = this.getters.getRangeFromSheetXC(sheetId, range).zone;
|
|
57101
57131
|
const colorThresholds = [{
|
|
57102
57132
|
value: minValue,
|
|
57103
57133
|
color: rule.minimum.color
|
|
57104
57134
|
}];
|
|
57105
|
-
if (rule.midpoint && midValue) colorThresholds.push({
|
|
57135
|
+
if (rule.midpoint && midValue !== null) colorThresholds.push({
|
|
57106
57136
|
value: midValue,
|
|
57107
57137
|
color: rule.midpoint.color
|
|
57108
57138
|
});
|
|
@@ -59974,7 +60004,7 @@ var TableComputedStylePlugin = class extends UIPlugin {
|
|
|
59974
60004
|
};
|
|
59975
60005
|
}
|
|
59976
60006
|
};
|
|
59977
|
-
const invalidateTableStyleCommandsSet = new Set([
|
|
60007
|
+
const invalidateTableStyleCommandsSet = /* @__PURE__ */ new Set([
|
|
59978
60008
|
"HIDE_COLUMNS_ROWS",
|
|
59979
60009
|
"UNHIDE_COLUMNS_ROWS",
|
|
59980
60010
|
"UNFOLD_HEADER_GROUP",
|
|
@@ -64415,11 +64445,23 @@ var GridSelectionPlugin = class extends UIPlugin {
|
|
|
64415
64445
|
ctx.strokeStyle = SELECTION_BORDER_COLOR;
|
|
64416
64446
|
ctx.lineWidth = 1.5 * thinLineWidth;
|
|
64417
64447
|
for (const zone of zones) {
|
|
64448
|
+
if (!viewports.isZoneVisibleInViewport(sheetId, zone)) continue;
|
|
64418
64449
|
const { x, y, width, height } = viewports.getVisibleRect(sheetId, zone);
|
|
64419
64450
|
ctx.globalCompositeOperation = "multiply";
|
|
64420
|
-
|
|
64421
|
-
ctx.
|
|
64422
|
-
|
|
64451
|
+
const currentLineWidth = ctx.lineWidth;
|
|
64452
|
+
if (height === 0 || width === 0) ctx.lineWidth = 3 * thinLineWidth;
|
|
64453
|
+
if (height === 0 && width === 0) {
|
|
64454
|
+
ctx.beginPath();
|
|
64455
|
+
ctx.arc(x, y, 3, 0, 2 * Math.PI);
|
|
64456
|
+
ctx.fill();
|
|
64457
|
+
ctx.globalCompositeOperation = "source-over";
|
|
64458
|
+
ctx.stroke();
|
|
64459
|
+
} else {
|
|
64460
|
+
ctx.fillRect(x, y, width, height);
|
|
64461
|
+
ctx.globalCompositeOperation = "source-over";
|
|
64462
|
+
ctx.strokeRect(x, y, width, height);
|
|
64463
|
+
}
|
|
64464
|
+
ctx.lineWidth = currentLineWidth;
|
|
64423
64465
|
}
|
|
64424
64466
|
ctx.globalCompositeOperation = "source-over";
|
|
64425
64467
|
const position = renderingContext.activePosition;
|
|
@@ -64544,14 +64586,14 @@ var InternalViewport = class {
|
|
|
64544
64586
|
adjustPositionX(targetCol) {
|
|
64545
64587
|
const sheetId = this.sheetId;
|
|
64546
64588
|
const { start, end } = this.getters.getColDimensions(sheetId, targetCol);
|
|
64547
|
-
if (this.offsetX + this.viewportWidth + this.offsetCorrectionX < end) this.offsetX = end - this.viewportWidth;
|
|
64589
|
+
if (this.offsetX + this.viewportWidth + this.offsetCorrectionX < end) this.offsetX = end - this.viewportWidth - this.offsetCorrectionX;
|
|
64548
64590
|
else if (this.offsetX + this.offsetCorrectionX > start) this.offsetX = start - this.offsetCorrectionX;
|
|
64549
64591
|
this.adjustViewportZoneX();
|
|
64550
64592
|
}
|
|
64551
64593
|
adjustPositionY(targetRow) {
|
|
64552
64594
|
const sheetId = this.sheetId;
|
|
64553
64595
|
const { start, end } = this.getters.getRowDimensions(sheetId, targetRow);
|
|
64554
|
-
if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) this.offsetY = end - this.viewportHeight;
|
|
64596
|
+
if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) this.offsetY = end - this.viewportHeight - this.offsetCorrectionY;
|
|
64555
64597
|
else if (this.offsetY + this.offsetCorrectionY > start) this.offsetY = start - this.offsetCorrectionY;
|
|
64556
64598
|
this.adjustViewportZoneY();
|
|
64557
64599
|
}
|
|
@@ -64566,6 +64608,9 @@ var InternalViewport = class {
|
|
|
64566
64608
|
this.adjustViewportZoneX();
|
|
64567
64609
|
this.adjustViewportZoneY();
|
|
64568
64610
|
}
|
|
64611
|
+
isZoneVisible(zone) {
|
|
64612
|
+
return intersection(zone, this) !== void 0;
|
|
64613
|
+
}
|
|
64569
64614
|
/**
|
|
64570
64615
|
*
|
|
64571
64616
|
* Computes the visible coordinates & dimensions of a given zone inside the viewport
|
|
@@ -64846,6 +64891,9 @@ var ViewportCollection = class {
|
|
|
64846
64891
|
isVisibleInViewport({ sheetId, col, row }) {
|
|
64847
64892
|
return this.getSubViewports(sheetId).some((pane) => pane.isVisible(col, row));
|
|
64848
64893
|
}
|
|
64894
|
+
isZoneVisibleInViewport(sheetId, zone) {
|
|
64895
|
+
return this.getSubViewports(sheetId).some((pane) => pane.isZoneVisible(zone));
|
|
64896
|
+
}
|
|
64849
64897
|
getScrollBarWidth() {
|
|
64850
64898
|
return 15 / this.zoomLevel;
|
|
64851
64899
|
}
|
|
@@ -67501,7 +67549,7 @@ var BottomBarSheet = class extends _odoo_owl.Component {
|
|
|
67501
67549
|
}
|
|
67502
67550
|
});
|
|
67503
67551
|
this.DOMFocusableElementStore = useStore(DOMFocusableElementStore);
|
|
67504
|
-
(0, _odoo_owl.useExternalListener)(window, "click", ()
|
|
67552
|
+
(0, _odoo_owl.useExternalListener)(window, "click", this.onExternalClick.bind(this), { capture: true });
|
|
67505
67553
|
(0, _odoo_owl.useEffect)((sheetId) => {
|
|
67506
67554
|
if (this.props.sheetId === sheetId) this.scrollToSheet();
|
|
67507
67555
|
}, () => [this.env.model.getters.getActiveSheetId()]);
|
|
@@ -67520,6 +67568,9 @@ var BottomBarSheet = class extends _odoo_owl.Component {
|
|
|
67520
67568
|
this.env.model.off("command-rejected", this);
|
|
67521
67569
|
});
|
|
67522
67570
|
}
|
|
67571
|
+
onExternalClick(ev) {
|
|
67572
|
+
if (!ev.target.closest(".o-color-picker")) this.state.pickerOpened = false;
|
|
67573
|
+
}
|
|
67523
67574
|
focusInputAndSelectContent() {
|
|
67524
67575
|
if (!this.state.isEditing || !this.sheetNameRef.el) return;
|
|
67525
67576
|
this.sheetNameRef.el.focus();
|
|
@@ -67623,6 +67674,8 @@ var BottomBarSheet = class extends _odoo_owl.Component {
|
|
|
67623
67674
|
},
|
|
67624
67675
|
openSheetColorPickerCallback: () => {
|
|
67625
67676
|
this.state.pickerOpened = true;
|
|
67677
|
+
const sheet = this.env.model.getters.getSheet(this.props.sheetId);
|
|
67678
|
+
this.state.currentPickerColor = sheet.color;
|
|
67626
67679
|
}
|
|
67627
67680
|
});
|
|
67628
67681
|
}
|
|
@@ -69372,18 +69425,28 @@ var NamedRangeSelector = class extends _odoo_owl.Component {
|
|
|
69372
69425
|
return;
|
|
69373
69426
|
}
|
|
69374
69427
|
const activeSheetId = this.env.model.getters.getActiveSheetId();
|
|
69375
|
-
if (activeSheetId !== sheetId)
|
|
69376
|
-
|
|
69377
|
-
|
|
69378
|
-
|
|
69379
|
-
|
|
69428
|
+
if (activeSheetId !== sheetId) {
|
|
69429
|
+
if (!this.env.model.getters.getSheet(sheetId).isVisible) {
|
|
69430
|
+
this.env.notifyUser({
|
|
69431
|
+
text: _t("The sheet on which the range is defined is hidden."),
|
|
69432
|
+
type: "info",
|
|
69433
|
+
sticky: false
|
|
69434
|
+
});
|
|
69435
|
+
return;
|
|
69436
|
+
}
|
|
69437
|
+
this.env.model.dispatch("ACTIVATE_SHEET", {
|
|
69438
|
+
sheetIdFrom: activeSheetId,
|
|
69439
|
+
sheetIdTo: sheetId
|
|
69440
|
+
});
|
|
69441
|
+
}
|
|
69442
|
+
this.env.model.selection.selectCell(zone.right, zone.bottom, { allowsHiddenSelection: true });
|
|
69380
69443
|
this.env.model.selection.selectZone({
|
|
69381
69444
|
cell: {
|
|
69382
69445
|
col: zone.left,
|
|
69383
69446
|
row: zone.top
|
|
69384
69447
|
},
|
|
69385
69448
|
zone
|
|
69386
|
-
});
|
|
69449
|
+
}, { allowsHiddenSelection: true });
|
|
69387
69450
|
}
|
|
69388
69451
|
get selectionKey() {
|
|
69389
69452
|
return `${this.env.model.getters.getActiveSheetId()}-${zoneToXc(this.selectedZone)}`;
|
|
@@ -69658,7 +69721,7 @@ var TableDropdownButton = class extends _odoo_owl.Component {
|
|
|
69658
69721
|
this.closePopover();
|
|
69659
69722
|
return;
|
|
69660
69723
|
}
|
|
69661
|
-
const pivotId = this.
|
|
69724
|
+
const pivotId = this.dynamicPivotIdInSelection;
|
|
69662
69725
|
if (pivotId) {
|
|
69663
69726
|
this.env.openSidePanel("PivotSidePanel", {
|
|
69664
69727
|
pivotId,
|
|
@@ -69688,7 +69751,7 @@ var TableDropdownButton = class extends _odoo_owl.Component {
|
|
|
69688
69751
|
this.state.popoverProps = void 0;
|
|
69689
69752
|
}
|
|
69690
69753
|
get action() {
|
|
69691
|
-
if (this.
|
|
69754
|
+
if (this.dynamicPivotIdInSelection) return {
|
|
69692
69755
|
name: _t("Edit pivot style"),
|
|
69693
69756
|
icon: "o-spreadsheet-Icon.EDIT_TABLE"
|
|
69694
69757
|
};
|
|
@@ -69707,15 +69770,19 @@ var TableDropdownButton = class extends _odoo_owl.Component {
|
|
|
69707
69770
|
get tableStyles() {
|
|
69708
69771
|
return this.env.model.getters.getTableStyles();
|
|
69709
69772
|
}
|
|
69710
|
-
get
|
|
69773
|
+
get dynamicPivotIdInSelection() {
|
|
69711
69774
|
const selection = this.env.model.getters.getSelectedZones();
|
|
69712
|
-
|
|
69713
|
-
|
|
69714
|
-
|
|
69715
|
-
|
|
69716
|
-
|
|
69717
|
-
|
|
69718
|
-
|
|
69775
|
+
const pivotCellIds = new Set(this.env.model.getters.getCellsWithTrackedFormula("PIVOT"));
|
|
69776
|
+
if (pivotCellIds.size === 0) return;
|
|
69777
|
+
const activeSheetId = this.env.model.getters.getActiveSheetId();
|
|
69778
|
+
for (const zone of selection) for (const position of cellPositions(activeSheetId, zone)) {
|
|
69779
|
+
const mainPosition = this.env.model.getters.getArrayFormulaSpreadingOn(position);
|
|
69780
|
+
if (!mainPosition) continue;
|
|
69781
|
+
const cellId = this.env.model.getters.getCell(mainPosition)?.id;
|
|
69782
|
+
if (cellId && pivotCellIds.has(cellId)) {
|
|
69783
|
+
const pivotId = this.env.model.getters.getPivotIdFromPosition(mainPosition);
|
|
69784
|
+
if (pivotId) return pivotId;
|
|
69785
|
+
}
|
|
69719
69786
|
}
|
|
69720
69787
|
}
|
|
69721
69788
|
get class() {
|
|
@@ -71788,7 +71855,7 @@ var SelectionStreamProcessorImpl = class {
|
|
|
71788
71855
|
/**
|
|
71789
71856
|
* Select a single cell as the new anchor.
|
|
71790
71857
|
*/
|
|
71791
|
-
selectCell(col, row) {
|
|
71858
|
+
selectCell(col, row, options) {
|
|
71792
71859
|
const zone = positionToZone({
|
|
71793
71860
|
col,
|
|
71794
71861
|
row
|
|
@@ -71799,7 +71866,10 @@ var SelectionStreamProcessorImpl = class {
|
|
|
71799
71866
|
col,
|
|
71800
71867
|
row
|
|
71801
71868
|
}
|
|
71802
|
-
}, {
|
|
71869
|
+
}, {
|
|
71870
|
+
scrollIntoView: true,
|
|
71871
|
+
...options
|
|
71872
|
+
});
|
|
71803
71873
|
}
|
|
71804
71874
|
/**
|
|
71805
71875
|
* Set the selection to one of the cells adjacent to the current anchor cell.
|
|
@@ -72154,15 +72224,21 @@ var SelectionStreamProcessorImpl = class {
|
|
|
72154
72224
|
return DispatchResult.Success;
|
|
72155
72225
|
}
|
|
72156
72226
|
checkEventAnchorZone(event) {
|
|
72157
|
-
return this.checkAnchorZone(event.anchor);
|
|
72227
|
+
return this.checkAnchorZone(event.anchor, event.options);
|
|
72158
72228
|
}
|
|
72159
|
-
checkAnchorZone(anchor) {
|
|
72229
|
+
checkAnchorZone(anchor, options) {
|
|
72160
72230
|
const { cell, zone } = anchor;
|
|
72161
72231
|
if (!isInside(cell.col, cell.row, zone)) return "InvalidAnchorZone";
|
|
72162
72232
|
const { left, right, top, bottom } = zone;
|
|
72163
72233
|
const sheetId = this.getters.getActiveSheetId();
|
|
72164
|
-
|
|
72165
|
-
|
|
72234
|
+
if (!options?.allowsHiddenSelection) {
|
|
72235
|
+
const refCol = this.getters.findVisibleHeader(sheetId, "COL", left, right);
|
|
72236
|
+
if (this.getters.findVisibleHeader(sheetId, "ROW", top, bottom) === void 0 || refCol === void 0) return "SelectionOutOfBound";
|
|
72237
|
+
} else {
|
|
72238
|
+
const numberCols = this.getters.getNumberCols(sheetId);
|
|
72239
|
+
const numberRows = this.getters.getNumberRows(sheetId);
|
|
72240
|
+
if (left < 0 || right > numberCols - 1 || top < 0 || bottom > numberRows - 1) return "SelectionOutOfBound";
|
|
72241
|
+
}
|
|
72166
72242
|
return "Success";
|
|
72167
72243
|
}
|
|
72168
72244
|
checkAnchorZoneOrThrow(anchor) {
|
|
@@ -72647,11 +72723,11 @@ function addBarChart(chart) {
|
|
|
72647
72723
|
<!-- each data marker in the series does not have a different color -->
|
|
72648
72724
|
<c:varyColors val="0"/>
|
|
72649
72725
|
${joinXmlNodes(rightDataSetsNodes)}
|
|
72650
|
-
<c:axId val="${
|
|
72651
|
-
<c:axId val="${
|
|
72726
|
+
<c:axId val="${17781238}" />
|
|
72727
|
+
<c:axId val="${88853994}" />
|
|
72652
72728
|
</c:barChart>
|
|
72653
|
-
${addAx("b", "c:catAx",
|
|
72654
|
-
${addAx("r", "c:valAx",
|
|
72729
|
+
${addAx("b", "c:catAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
|
|
72730
|
+
${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
|
|
72655
72731
|
` : ""}`;
|
|
72656
72732
|
}
|
|
72657
72733
|
function addComboChart(chart) {
|
|
@@ -72903,11 +72979,11 @@ function addLineChart(chart) {
|
|
|
72903
72979
|
<c:varyColors val="0"/>
|
|
72904
72980
|
${joinXmlNodes(rightDataSetsNodes)}
|
|
72905
72981
|
${insertDataLabels({ showValues: chart.showValues })}
|
|
72906
|
-
<c:axId val="${
|
|
72907
|
-
<c:axId val="${
|
|
72982
|
+
<c:axId val="${17781238}" />
|
|
72983
|
+
<c:axId val="${88853994}" />
|
|
72908
72984
|
</c:lineChart>
|
|
72909
|
-
${addAx("b", "c:catAx",
|
|
72910
|
-
${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)}
|
|
72911
72987
|
` : ""}
|
|
72912
72988
|
`;
|
|
72913
72989
|
}
|
|
@@ -72973,11 +73049,11 @@ function addScatterChart(chart) {
|
|
|
72973
73049
|
<c:scatterStyle val="lineMarker"/>
|
|
72974
73050
|
${joinXmlNodes(rightDataSetsNodes)}
|
|
72975
73051
|
${insertDataLabels({ showValues: chart.showValues })}
|
|
72976
|
-
<c:axId val="${
|
|
72977
|
-
<c:axId val="${
|
|
73052
|
+
<c:axId val="${17781238}" />
|
|
73053
|
+
<c:axId val="${88853994}" />
|
|
72978
73054
|
</c:scatterChart>
|
|
72979
|
-
${addAx("b", "c:valAx",
|
|
72980
|
-
${addAx("r", "c:valAx",
|
|
73055
|
+
${addAx("b", "c:valAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
|
|
73056
|
+
${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
|
|
72981
73057
|
` : ""}`;
|
|
72982
73058
|
}
|
|
72983
73059
|
function addRadarChart(chart) {
|
|
@@ -84713,6 +84789,6 @@ exports.stores = stores;
|
|
|
84713
84789
|
exports.tokenColors = tokenColors;
|
|
84714
84790
|
exports.tokenize = tokenize;
|
|
84715
84791
|
|
|
84716
|
-
__info__.version = "19.3.
|
|
84717
|
-
__info__.date = "2026-
|
|
84718
|
-
__info__.hash = "
|
|
84792
|
+
__info__.version = "19.3.11";
|
|
84793
|
+
__info__.date = "2026-07-13T06:26:28.422Z";
|
|
84794
|
+
__info__.hash = "35c06d3";
|