@odoo/o-spreadsheet 18.4.43 → 18.4.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/o_spreadsheet.css +3 -3
- package/dist/o_spreadsheet.esm.js +109 -105
- package/dist/o_spreadsheet.iife.js +109 -105
- package/dist/o_spreadsheet.iife.min.js +211 -211
- package/dist/o_spreadsheet.xml +4 -4
- package/package.json +7 -2
- package/dist/o_spreadsheet.cjs.js +0 -75614
package/dist/o_spreadsheet.css
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/*
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 18.4.
|
|
6
|
-
* @date 2026-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.4.46
|
|
6
|
+
* @date 2026-07-01T05:02:58.175Z
|
|
7
|
+
* @hash 26297b3
|
|
8
8
|
*/
|
|
9
9
|
/* Originates from src/components/top_bar/top_bar.scss */
|
|
10
10
|
@media (max-width: 1200px) {
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 18.4.
|
|
6
|
-
* @date 2026-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 18.4.46
|
|
6
|
+
* @date 2026-07-01T05:02:56.676Z
|
|
7
|
+
* @hash 26297b3
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { App, Component, blockDom, markRaw, onMounted, onPatched, onWillPatch, onWillStart, onWillUnmount, onWillUpdateProps, status, toRaw, useChildSubEnv, useComponent, useEffect, useEnv, useExternalListener, useRef, useState, useSubEnv, xml } from "@odoo/owl";
|
|
@@ -213,7 +213,7 @@ const GRAY_300 = "#D8DADD";
|
|
|
213
213
|
const GRAY_200 = "#E7E9ED";
|
|
214
214
|
const GRAY_100 = "#F9FAFB";
|
|
215
215
|
const TEXT_BODY = "#374151";
|
|
216
|
-
const TEXT_BODY_MUTED =
|
|
216
|
+
const TEXT_BODY_MUTED = "#374151C2";
|
|
217
217
|
const TEXT_HEADING = "#111827";
|
|
218
218
|
const PRIMARY_BUTTON_BG = "#714B67";
|
|
219
219
|
const PRIMARY_BUTTON_HOVER_BG = "#624159";
|
|
@@ -320,9 +320,6 @@ const COLOR_PICKER_DEFAULTS = [
|
|
|
320
320
|
];
|
|
321
321
|
const DEFAULT_CELL_HEIGHT = 23;
|
|
322
322
|
const FOOTER_HEIGHT = 2 * 23;
|
|
323
|
-
const MENU_SEPARATOR_BORDER_WIDTH = 1;
|
|
324
|
-
const MENU_SEPARATOR_PADDING = 5;
|
|
325
|
-
const MENU_SEPARATOR_HEIGHT = 1 + 2 * 5;
|
|
326
323
|
const DEFAULT_STYLE = {
|
|
327
324
|
align: "left",
|
|
328
325
|
verticalAlign: "bottom",
|
|
@@ -342,7 +339,7 @@ const DEFAULT_NUMBER_STYLE = {
|
|
|
342
339
|
const DEFAULT_VERTICAL_ALIGN = DEFAULT_STYLE.verticalAlign;
|
|
343
340
|
const DEFAULT_WRAPPING_MODE = DEFAULT_STYLE.wrapping;
|
|
344
341
|
const DEFAULT_FONT_SIZE = DEFAULT_STYLE.fontSize;
|
|
345
|
-
const DEFAULT_FONT = "'Roboto', arial";
|
|
342
|
+
const DEFAULT_FONT = "'Roboto', arial, 'Liberation Sans'";
|
|
346
343
|
const DEFAULT_BORDER_DESC = {
|
|
347
344
|
style: "thin",
|
|
348
345
|
color: "#000000"
|
|
@@ -1624,7 +1621,7 @@ function isPositionDependent(cmd) {
|
|
|
1624
1621
|
function isZoneDependent(cmd) {
|
|
1625
1622
|
return "sheetId" in cmd && "zone" in cmd;
|
|
1626
1623
|
}
|
|
1627
|
-
const invalidateEvaluationCommands = new Set([
|
|
1624
|
+
const invalidateEvaluationCommands = /* @__PURE__ */ new Set([
|
|
1628
1625
|
"RENAME_SHEET",
|
|
1629
1626
|
"DELETE_SHEET",
|
|
1630
1627
|
"CREATE_SHEET",
|
|
@@ -1643,7 +1640,7 @@ const invalidateEvaluationCommands = new Set([
|
|
|
1643
1640
|
"REMOVE_PIVOT",
|
|
1644
1641
|
"DUPLICATE_PIVOT"
|
|
1645
1642
|
]);
|
|
1646
|
-
const invalidateChartEvaluationCommands = new Set([
|
|
1643
|
+
const invalidateChartEvaluationCommands = /* @__PURE__ */ new Set([
|
|
1647
1644
|
"EVALUATE_CELLS",
|
|
1648
1645
|
"EVALUATE_CHARTS",
|
|
1649
1646
|
"UPDATE_CELL",
|
|
@@ -1662,20 +1659,20 @@ const invalidateChartEvaluationCommands = new Set([
|
|
|
1662
1659
|
"UNDO",
|
|
1663
1660
|
"REDO"
|
|
1664
1661
|
]);
|
|
1665
|
-
const invalidateDependenciesCommands = new Set(["MOVE_RANGES"]);
|
|
1666
|
-
const invalidateCFEvaluationCommands = new Set([
|
|
1662
|
+
const invalidateDependenciesCommands = /* @__PURE__ */ new Set(["MOVE_RANGES"]);
|
|
1663
|
+
const invalidateCFEvaluationCommands = /* @__PURE__ */ new Set([
|
|
1667
1664
|
"EVALUATE_CELLS",
|
|
1668
1665
|
"ADD_CONDITIONAL_FORMAT",
|
|
1669
1666
|
"REMOVE_CONDITIONAL_FORMAT",
|
|
1670
1667
|
"CHANGE_CONDITIONAL_FORMAT_PRIORITY"
|
|
1671
1668
|
]);
|
|
1672
|
-
const invalidateBordersCommands = new Set([
|
|
1669
|
+
const invalidateBordersCommands = /* @__PURE__ */ new Set([
|
|
1673
1670
|
"AUTOFILL_CELL",
|
|
1674
1671
|
"SET_BORDER",
|
|
1675
1672
|
"SET_ZONE_BORDERS",
|
|
1676
1673
|
"SET_BORDERS_ON_TARGET"
|
|
1677
1674
|
]);
|
|
1678
|
-
const readonlyAllowedCommands = new Set([
|
|
1675
|
+
const readonlyAllowedCommands = /* @__PURE__ */ new Set([
|
|
1679
1676
|
"START",
|
|
1680
1677
|
"ACTIVATE_SHEET",
|
|
1681
1678
|
"COPY",
|
|
@@ -1687,7 +1684,7 @@ const readonlyAllowedCommands = new Set([
|
|
|
1687
1684
|
"UPDATE_FILTER",
|
|
1688
1685
|
"UPDATE_CHART"
|
|
1689
1686
|
]);
|
|
1690
|
-
const coreTypes = new Set([
|
|
1687
|
+
const coreTypes = /* @__PURE__ */ new Set([
|
|
1691
1688
|
"UPDATE_CELL",
|
|
1692
1689
|
"UPDATE_CELL_POSITION",
|
|
1693
1690
|
"CLEAR_CELL",
|
|
@@ -1919,7 +1916,7 @@ let CommandResult = /* @__PURE__ */ function(CommandResult) {
|
|
|
1919
1916
|
|
|
1920
1917
|
//#endregion
|
|
1921
1918
|
//#region src/types/conditional_formatting.ts
|
|
1922
|
-
const availableConditionalFormatOperators = new Set([
|
|
1919
|
+
const availableConditionalFormatOperators = /* @__PURE__ */ new Set([
|
|
1923
1920
|
"containsText",
|
|
1924
1921
|
"notContainsText",
|
|
1925
1922
|
"isGreaterThan",
|
|
@@ -1938,7 +1935,7 @@ const availableConditionalFormatOperators = new Set([
|
|
|
1938
1935
|
|
|
1939
1936
|
//#endregion
|
|
1940
1937
|
//#region src/types/data_validation.ts
|
|
1941
|
-
const availableDataValidationOperators = new Set([
|
|
1938
|
+
const availableDataValidationOperators = /* @__PURE__ */ new Set([
|
|
1942
1939
|
"containsText",
|
|
1943
1940
|
"notContainsText",
|
|
1944
1941
|
"isEqualText",
|
|
@@ -2663,12 +2660,10 @@ const getNumberRegex = memoize(function getNumberRegex(locale) {
|
|
|
2663
2660
|
const pIntegerAndDecimals = `(?:\\d+(?:${escapeRegExp(locale.thousandsSeparator || "")}\\d{3,})*(?:${decimalSeparator}\\d*)?)`;
|
|
2664
2661
|
const pOnlyDecimals = `(?:${decimalSeparator}\\d+)`;
|
|
2665
2662
|
const pNumber = "(?:\\s*" + pIntegerAndDecimals + "|" + pOnlyDecimals + ")(?:e(?:\\+|-)?\\d+)?(?:\\s*%)?";
|
|
2666
|
-
const pMinus = "(?:\\s*-)?";
|
|
2667
|
-
const pCurrencyFormat = "(?:\\s*[\\$€])?";
|
|
2668
2663
|
const pNumberExp = "^(?:(?:" + [
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2664
|
+
"(?:\\s*-)?(?:\\s*[\\$€])?" + pNumber,
|
|
2665
|
+
"(?:\\s*-)?" + pNumber + "(?:\\s*[\\$€])?",
|
|
2666
|
+
"(?:\\s*[\\$€])?(?:\\s*-)?" + pNumber
|
|
2672
2667
|
].join(")|(?:") + "))$";
|
|
2673
2668
|
return new RegExp(pNumberExp, "i");
|
|
2674
2669
|
});
|
|
@@ -4579,7 +4574,7 @@ function getDateCriterionFormattedValues(values, locale) {
|
|
|
4579
4574
|
function recomputeZones(zones, zonesToRemove = []) {
|
|
4580
4575
|
if (zones.length <= 1 && zonesToRemove.length === 0) return zones;
|
|
4581
4576
|
const profilesStartingPosition = [0];
|
|
4582
|
-
const profiles = new Map([[0, []]]);
|
|
4577
|
+
const profiles = /* @__PURE__ */ new Map([[0, []]]);
|
|
4583
4578
|
modifyProfiles(profilesStartingPosition, profiles, zones, false);
|
|
4584
4579
|
modifyProfiles(profilesStartingPosition, profiles, zonesToRemove, true);
|
|
4585
4580
|
return constructZonesFromProfiles(profilesStartingPosition, profiles);
|
|
@@ -5318,7 +5313,6 @@ function getCanonicalRepresentation(item) {
|
|
|
5318
5313
|
//#region src/helpers/edge_scrolling.ts
|
|
5319
5314
|
const MAX_DELAY = 140;
|
|
5320
5315
|
const MIN_DELAY = 20;
|
|
5321
|
-
const ACCELERATION = .035;
|
|
5322
5316
|
/**
|
|
5323
5317
|
* Decreasing exponential function used to determine the "speed" of edge-scrolling
|
|
5324
5318
|
* as the timeout delay.
|
|
@@ -5326,7 +5320,7 @@ const ACCELERATION = .035;
|
|
|
5326
5320
|
* Returns a timeout delay in milliseconds.
|
|
5327
5321
|
*/
|
|
5328
5322
|
function scrollDelay(value) {
|
|
5329
|
-
return 20 + (140 - 20) * Math.exp(
|
|
5323
|
+
return 20 + (140 - 20) * Math.exp(-.035 * (value - 1));
|
|
5330
5324
|
}
|
|
5331
5325
|
|
|
5332
5326
|
//#endregion
|
|
@@ -6152,7 +6146,7 @@ var UuidGenerator = class {
|
|
|
6152
6146
|
smallUuid() {
|
|
6153
6147
|
if (window.crypto) return "10000000-1000".replace(/[01]/g, (c) => {
|
|
6154
6148
|
const n = Number(c);
|
|
6155
|
-
return (n ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
6149
|
+
return (n ^ crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
6156
6150
|
});
|
|
6157
6151
|
else return "xxxxxxxx-xxxx".replace(/[xy]/g, function(c) {
|
|
6158
6152
|
const r = Math.random() * 16 | 0;
|
|
@@ -6166,7 +6160,7 @@ var UuidGenerator = class {
|
|
|
6166
6160
|
uuidv4() {
|
|
6167
6161
|
if (window.crypto) return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => {
|
|
6168
6162
|
const n = Number(c);
|
|
6169
|
-
return (n ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
6163
|
+
return (n ^ crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(1))[0] & 15 >> n / 4).toString(16);
|
|
6170
6164
|
});
|
|
6171
6165
|
else return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
|
|
6172
6166
|
const r = Math.random() * 16 | 0;
|
|
@@ -7610,10 +7604,10 @@ function toNormalizedPivotValue(dimension, groupValue) {
|
|
|
7610
7604
|
type: dimension.type
|
|
7611
7605
|
}));
|
|
7612
7606
|
if (groupValueString.toLowerCase() === "false") return false;
|
|
7613
|
-
return pivotNormalizationValueRegistry.get(dimension.type)(groupValueString, dimension
|
|
7607
|
+
return pivotNormalizationValueRegistry.get(dimension.type)(groupValueString, dimension);
|
|
7614
7608
|
}
|
|
7615
|
-
function normalizeDateTime(value,
|
|
7616
|
-
return pivotTimeAdapter(granularity ?? "month").normalizeFunctionValue(value);
|
|
7609
|
+
function normalizeDateTime(value, dimension) {
|
|
7610
|
+
return pivotTimeAdapter(dimension.granularity ?? "month").normalizeFunctionValue(value);
|
|
7617
7611
|
}
|
|
7618
7612
|
function toFunctionPivotValue(value, dimension) {
|
|
7619
7613
|
if (value === null) return `"null"`;
|
|
@@ -26261,11 +26255,11 @@ var FigureComponent = class extends Component {
|
|
|
26261
26255
|
getResizerPosition(resizer) {
|
|
26262
26256
|
const anchorCenteringOffset = (ANCHOR_SIZE - ACTIVE_BORDER_WIDTH) / 2;
|
|
26263
26257
|
const style = {};
|
|
26264
|
-
if (resizer.includes("top")) style.top =
|
|
26265
|
-
else if (resizer.includes("bottom")) style.bottom =
|
|
26258
|
+
if (resizer.includes("top")) style.top = `-3px`;
|
|
26259
|
+
else if (resizer.includes("bottom")) style.bottom = `-3px`;
|
|
26266
26260
|
else style.bottom = `calc(50% - ${anchorCenteringOffset}px)`;
|
|
26267
|
-
if (resizer.includes("left")) style.left =
|
|
26268
|
-
else if (resizer.includes("right")) style.right =
|
|
26261
|
+
if (resizer.includes("left")) style.left = `-3px`;
|
|
26262
|
+
else if (resizer.includes("right")) style.right = `-3px`;
|
|
26269
26263
|
else style.right = `calc(50% - ${anchorCenteringOffset}px)`;
|
|
26270
26264
|
return cssPropertiesToCss(style);
|
|
26271
26265
|
}
|
|
@@ -29226,11 +29220,10 @@ function startDnd(onPointerMove, onPointerUp) {
|
|
|
29226
29220
|
const LINE_VERTICAL_PADDING = 1;
|
|
29227
29221
|
const PICKER_PADDING = 8;
|
|
29228
29222
|
const ITEM_BORDER_WIDTH = 1;
|
|
29229
|
-
const ITEM_EDGE_LENGTH = 18;
|
|
29230
29223
|
const ITEMS_PER_LINE = 10;
|
|
29231
29224
|
const MAGNIFIER_EDGE = 16;
|
|
29232
29225
|
const ITEM_GAP = 2;
|
|
29233
|
-
const CONTENT_WIDTH =
|
|
29226
|
+
const CONTENT_WIDTH = 218;
|
|
29234
29227
|
const INNER_GRADIENT_WIDTH = CONTENT_WIDTH - 2 * ITEM_BORDER_WIDTH;
|
|
29235
29228
|
const INNER_GRADIENT_HEIGHT = CONTENT_WIDTH - 30 - 2 * ITEM_BORDER_WIDTH;
|
|
29236
29229
|
css`
|
|
@@ -29242,7 +29235,7 @@ css`
|
|
|
29242
29235
|
line-height: 1.2;
|
|
29243
29236
|
overflow-y: auto;
|
|
29244
29237
|
overflow-x: hidden;
|
|
29245
|
-
width: ${
|
|
29238
|
+
width: ${234}px;
|
|
29246
29239
|
|
|
29247
29240
|
.o-color-picker-section-name {
|
|
29248
29241
|
margin: 0px ${ITEM_BORDER_WIDTH}px;
|
|
@@ -29268,8 +29261,8 @@ css`
|
|
|
29268
29261
|
}
|
|
29269
29262
|
}
|
|
29270
29263
|
.o-color-picker-line-item {
|
|
29271
|
-
width: ${
|
|
29272
|
-
height: ${
|
|
29264
|
+
width: ${20}px;
|
|
29265
|
+
height: ${20}px;
|
|
29273
29266
|
margin: 0px;
|
|
29274
29267
|
border-radius: 50px;
|
|
29275
29268
|
border: ${ITEM_BORDER_WIDTH}px solid #666666;
|
|
@@ -29313,13 +29306,13 @@ css`
|
|
|
29313
29306
|
}
|
|
29314
29307
|
|
|
29315
29308
|
.o-custom-selector {
|
|
29316
|
-
padding: ${
|
|
29309
|
+
padding: ${10}px ${PICKER_PADDING}px;
|
|
29317
29310
|
position: relative;
|
|
29318
29311
|
.o-gradient {
|
|
29319
29312
|
margin-bottom: ${MAGNIFIER_EDGE / 2}px;
|
|
29320
29313
|
border: ${ITEM_BORDER_WIDTH}px solid #c0c0c0;
|
|
29321
|
-
width: ${
|
|
29322
|
-
height: ${
|
|
29314
|
+
width: ${218}px;
|
|
29315
|
+
height: ${188}px;
|
|
29323
29316
|
position: relative;
|
|
29324
29317
|
}
|
|
29325
29318
|
|
|
@@ -29457,8 +29450,8 @@ var ColorPicker = class extends Component {
|
|
|
29457
29450
|
const left = Math.round(INNER_GRADIENT_WIDTH * clip(s / 100, 0, 1));
|
|
29458
29451
|
const top = Math.round(INNER_GRADIENT_HEIGHT * clip(1 - 2 * l / (200 - s), 0, 1));
|
|
29459
29452
|
return cssPropertiesToCss({
|
|
29460
|
-
left: `${-
|
|
29461
|
-
top: `${-
|
|
29453
|
+
left: `${-16 / 2 + left}px`,
|
|
29454
|
+
top: `${-16 / 2 + top}px`,
|
|
29462
29455
|
background: hslaToHex(this.state.currentHslaColor)
|
|
29463
29456
|
});
|
|
29464
29457
|
}
|
|
@@ -31640,17 +31633,16 @@ linkMenuRegistry.add("sheet", {
|
|
|
31640
31633
|
|
|
31641
31634
|
//#endregion
|
|
31642
31635
|
//#region src/components/link/link_editor/link_editor.ts
|
|
31643
|
-
const PADDING = 12;
|
|
31644
31636
|
css`
|
|
31645
31637
|
.o-link-editor {
|
|
31646
31638
|
font-size: 13px;
|
|
31647
31639
|
background-color: white;
|
|
31648
31640
|
box-shadow: 0 1px 4px 3px rgba(60, 64, 67, 0.15);
|
|
31649
|
-
padding: ${
|
|
31641
|
+
padding: ${12}px;
|
|
31650
31642
|
display: flex;
|
|
31651
31643
|
flex-direction: column;
|
|
31652
31644
|
border-radius: 4px;
|
|
31653
|
-
width: ${
|
|
31645
|
+
width: ${364}px;
|
|
31654
31646
|
|
|
31655
31647
|
.o-section {
|
|
31656
31648
|
.o-section-title {
|
|
@@ -48701,8 +48693,8 @@ var PivotRuntimeDefinition = class {
|
|
|
48701
48693
|
collapsedDomains;
|
|
48702
48694
|
constructor(definition, fields) {
|
|
48703
48695
|
this.measures = definition.measures.map((measure) => createMeasure(fields, measure));
|
|
48704
|
-
this.columns = definition.columns.map((dimension) => createPivotDimension(fields, dimension));
|
|
48705
|
-
this.rows = definition.rows.map((dimension) => createPivotDimension(fields, dimension));
|
|
48696
|
+
this.columns = definition.columns.map((dimension) => this.createPivotDimension(fields, dimension));
|
|
48697
|
+
this.rows = definition.rows.map((dimension) => this.createPivotDimension(fields, dimension));
|
|
48706
48698
|
this.sortedColumn = definition.sortedColumn;
|
|
48707
48699
|
this.collapsedDomains = definition.collapsedDomains;
|
|
48708
48700
|
}
|
|
@@ -48716,6 +48708,40 @@ var PivotRuntimeDefinition = class {
|
|
|
48716
48708
|
if (!measure) throw new EvaluationError(_t("Field %s is not a measure", id));
|
|
48717
48709
|
return measure;
|
|
48718
48710
|
}
|
|
48711
|
+
createPivotDimension(fields, dimension) {
|
|
48712
|
+
const field = fields[dimension.fieldName];
|
|
48713
|
+
const type = field?.type ?? "integer";
|
|
48714
|
+
const granularity = field && isDateOrDatetimeField(field) ? dimension.granularity : void 0;
|
|
48715
|
+
return {
|
|
48716
|
+
/**
|
|
48717
|
+
* Get the display name of the dimension
|
|
48718
|
+
* e.g. "stage_id" -> "Stage", "create_date:month" -> "Create Date"
|
|
48719
|
+
*/
|
|
48720
|
+
displayName: field?.string ?? dimension.fieldName,
|
|
48721
|
+
/**
|
|
48722
|
+
* Get the name of the dimension, as it is stored in the pivot formula
|
|
48723
|
+
* e.g. "stage_id", "create_date:month"
|
|
48724
|
+
*/
|
|
48725
|
+
nameWithGranularity: dimension.fieldName + (granularity ? `:${granularity}` : ""),
|
|
48726
|
+
/**
|
|
48727
|
+
* Get the name of the field of the dimension
|
|
48728
|
+
* e.g. "stage_id" -> "stage_id", "create_date:month" -> "create_date"
|
|
48729
|
+
*/
|
|
48730
|
+
fieldName: dimension.fieldName,
|
|
48731
|
+
/**
|
|
48732
|
+
* Get the aggregate operator of the dimension
|
|
48733
|
+
* e.g. "stage_id" -> undefined, "create_date:month" -> "month"
|
|
48734
|
+
*/
|
|
48735
|
+
granularity,
|
|
48736
|
+
/**
|
|
48737
|
+
* Get the type of the field of the dimension
|
|
48738
|
+
* e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
|
|
48739
|
+
*/
|
|
48740
|
+
type,
|
|
48741
|
+
order: dimension.order,
|
|
48742
|
+
isValid: !!field
|
|
48743
|
+
};
|
|
48744
|
+
}
|
|
48719
48745
|
};
|
|
48720
48746
|
function createMeasure(fields, measure) {
|
|
48721
48747
|
const fieldName = measure.fieldName;
|
|
@@ -48759,40 +48785,6 @@ function createMeasure(fields, measure) {
|
|
|
48759
48785
|
display: measure.display
|
|
48760
48786
|
};
|
|
48761
48787
|
}
|
|
48762
|
-
function createPivotDimension(fields, dimension) {
|
|
48763
|
-
const field = fields[dimension.fieldName];
|
|
48764
|
-
const type = field?.type ?? "integer";
|
|
48765
|
-
const granularity = field && isDateOrDatetimeField(field) ? dimension.granularity : void 0;
|
|
48766
|
-
return {
|
|
48767
|
-
/**
|
|
48768
|
-
* Get the display name of the dimension
|
|
48769
|
-
* e.g. "stage_id" -> "Stage", "create_date:month" -> "Create Date"
|
|
48770
|
-
*/
|
|
48771
|
-
displayName: field?.string ?? dimension.fieldName,
|
|
48772
|
-
/**
|
|
48773
|
-
* Get the name of the dimension, as it is stored in the pivot formula
|
|
48774
|
-
* e.g. "stage_id", "create_date:month"
|
|
48775
|
-
*/
|
|
48776
|
-
nameWithGranularity: dimension.fieldName + (granularity ? `:${granularity}` : ""),
|
|
48777
|
-
/**
|
|
48778
|
-
* Get the name of the field of the dimension
|
|
48779
|
-
* e.g. "stage_id" -> "stage_id", "create_date:month" -> "create_date"
|
|
48780
|
-
*/
|
|
48781
|
-
fieldName: dimension.fieldName,
|
|
48782
|
-
/**
|
|
48783
|
-
* Get the aggregate operator of the dimension
|
|
48784
|
-
* e.g. "stage_id" -> undefined, "create_date:month" -> "month"
|
|
48785
|
-
*/
|
|
48786
|
-
granularity,
|
|
48787
|
-
/**
|
|
48788
|
-
* Get the type of the field of the dimension
|
|
48789
|
-
* e.g. "stage_id" -> "many2one", "create_date:month" -> "date"
|
|
48790
|
-
*/
|
|
48791
|
-
type,
|
|
48792
|
-
order: dimension.order,
|
|
48793
|
-
isValid: !!field
|
|
48794
|
-
};
|
|
48795
|
-
}
|
|
48796
48788
|
|
|
48797
48789
|
//#endregion
|
|
48798
48790
|
//#region src/helpers/pivot/spreadsheet_pivot/runtime_definition_spreadsheet_pivot.ts
|
|
@@ -51909,7 +51901,7 @@ var Grid = class extends Component {
|
|
|
51909
51901
|
ev.preventDefault();
|
|
51910
51902
|
const clipboardData = ev.clipboardData;
|
|
51911
51903
|
if (!clipboardData) return;
|
|
51912
|
-
const image = [...clipboardData.files]
|
|
51904
|
+
const image = [...clipboardData.files].find((file) => AllowedImageMimeTypes.includes(file.type));
|
|
51913
51905
|
const osClipboard = { content: {
|
|
51914
51906
|
["text/plain"]: clipboardData?.getData("text/plain"),
|
|
51915
51907
|
["text/html"]: clipboardData?.getData("text/html")
|
|
@@ -58670,6 +58662,9 @@ var CustomColorsPlugin = class extends CoreViewPlugin {
|
|
|
58670
58662
|
case "CREATE_CHART":
|
|
58671
58663
|
this.tryToAddColors(this.getChartColors(cmd.figureId));
|
|
58672
58664
|
break;
|
|
58665
|
+
case "COLOR_SHEET":
|
|
58666
|
+
if (cmd.color) this.tryToAddColors([cmd.color]);
|
|
58667
|
+
break;
|
|
58673
58668
|
case "UPDATE_CELL":
|
|
58674
58669
|
case "ADD_CONDITIONAL_FORMAT":
|
|
58675
58670
|
case "SET_BORDER":
|
|
@@ -58692,8 +58687,12 @@ var CustomColorsPlugin = class extends CoreViewPlugin {
|
|
|
58692
58687
|
}
|
|
58693
58688
|
computeCustomColors() {
|
|
58694
58689
|
let usedColors = [];
|
|
58695
|
-
for (const sheetId of this.getters.getSheetIds()) usedColors = usedColors.concat(this.getColorsFromCells(sheetId), this.getFormattingColors(sheetId), this.getTableColors(sheetId));
|
|
58696
|
-
return [
|
|
58690
|
+
for (const sheetId of this.getters.getSheetIds()) usedColors = usedColors.concat(this.getSheetColors(sheetId), this.getColorsFromCells(sheetId), this.getFormattingColors(sheetId), this.getTableColors(sheetId));
|
|
58691
|
+
return [.../* @__PURE__ */ new Set([...usedColors])];
|
|
58692
|
+
}
|
|
58693
|
+
getSheetColors(sheetId) {
|
|
58694
|
+
const sheet = this.getters.getSheet(sheetId);
|
|
58695
|
+
return sheet.color ? [sheet.color] : [];
|
|
58697
58696
|
}
|
|
58698
58697
|
getColorsFromCells(sheetId) {
|
|
58699
58698
|
const cells = Object.values(this.getters.getCells(sheetId));
|
|
@@ -63664,7 +63663,7 @@ var TableComputedStylePlugin = class extends UIPlugin {
|
|
|
63664
63663
|
};
|
|
63665
63664
|
}
|
|
63666
63665
|
};
|
|
63667
|
-
const invalidateTableStyleCommandsSet = new Set([
|
|
63666
|
+
const invalidateTableStyleCommandsSet = /* @__PURE__ */ new Set([
|
|
63668
63667
|
"HIDE_COLUMNS_ROWS",
|
|
63669
63668
|
"UNHIDE_COLUMNS_ROWS",
|
|
63670
63669
|
"UNFOLD_HEADER_GROUP",
|
|
@@ -65920,14 +65919,14 @@ var InternalViewport = class {
|
|
|
65920
65919
|
adjustPositionX(targetCol) {
|
|
65921
65920
|
const sheetId = this.sheetId;
|
|
65922
65921
|
const { start, end } = this.getters.getColDimensions(sheetId, targetCol);
|
|
65923
|
-
if (this.offsetX + this.viewportWidth + this.offsetCorrectionX < end) this.offsetX = end - this.viewportWidth;
|
|
65922
|
+
if (this.offsetX + this.viewportWidth + this.offsetCorrectionX < end) this.offsetX = end - this.viewportWidth - this.offsetCorrectionX;
|
|
65924
65923
|
else if (this.offsetX + this.offsetCorrectionX > start) this.offsetX = start - this.offsetCorrectionX;
|
|
65925
65924
|
this.adjustViewportZoneX();
|
|
65926
65925
|
}
|
|
65927
65926
|
adjustPositionY(targetRow) {
|
|
65928
65927
|
const sheetId = this.sheetId;
|
|
65929
65928
|
const { start, end } = this.getters.getRowDimensions(sheetId, targetRow);
|
|
65930
|
-
if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) this.offsetY = end - this.viewportHeight;
|
|
65929
|
+
if (this.offsetY + this.viewportHeight + this.offsetCorrectionY < end) this.offsetY = end - this.viewportHeight - this.offsetCorrectionY;
|
|
65931
65930
|
else if (this.offsetY + this.offsetCorrectionY > start) this.offsetY = start - this.offsetCorrectionY;
|
|
65932
65931
|
this.adjustViewportZoneY();
|
|
65933
65932
|
}
|
|
@@ -68340,11 +68339,14 @@ var BottomBarSheet = class extends Component {
|
|
|
68340
68339
|
}
|
|
68341
68340
|
});
|
|
68342
68341
|
this.DOMFocusableElementStore = useStore(DOMFocusableElementStore);
|
|
68343
|
-
useExternalListener(window, "click", ()
|
|
68342
|
+
useExternalListener(window, "click", this.onExternalClick.bind(this), { capture: true });
|
|
68344
68343
|
useEffect((sheetId) => {
|
|
68345
68344
|
if (this.props.sheetId === sheetId) this.scrollToSheet();
|
|
68346
68345
|
}, () => [this.env.model.getters.getActiveSheetId()]);
|
|
68347
68346
|
}
|
|
68347
|
+
onExternalClick(ev) {
|
|
68348
|
+
if (!ev.target.closest(".o-color-picker")) this.state.pickerOpened = false;
|
|
68349
|
+
}
|
|
68348
68350
|
focusInputAndSelectContent() {
|
|
68349
68351
|
if (!this.state.isEditing || !this.sheetNameRef.el) return;
|
|
68350
68352
|
this.sheetNameRef.el.focus();
|
|
@@ -68446,6 +68448,8 @@ var BottomBarSheet = class extends Component {
|
|
|
68446
68448
|
},
|
|
68447
68449
|
openSheetColorPickerCallback: () => {
|
|
68448
68450
|
this.state.pickerOpened = true;
|
|
68451
|
+
const sheet = this.env.model.getters.getSheet(this.props.sheetId);
|
|
68452
|
+
this.state.currentPickerColor = sheet.color;
|
|
68449
68453
|
}
|
|
68450
68454
|
});
|
|
68451
68455
|
}
|
|
@@ -72973,11 +72977,11 @@ function addBarChart(chart) {
|
|
|
72973
72977
|
<!-- each data marker in the series does not have a different color -->
|
|
72974
72978
|
<c:varyColors val="0"/>
|
|
72975
72979
|
${joinXmlNodes(rightDataSetsNodes)}
|
|
72976
|
-
<c:axId val="${
|
|
72977
|
-
<c:axId val="${
|
|
72980
|
+
<c:axId val="${17781238}" />
|
|
72981
|
+
<c:axId val="${88853994}" />
|
|
72978
72982
|
</c:barChart>
|
|
72979
|
-
${addAx("b", "c:catAx",
|
|
72980
|
-
${addAx("r", "c:valAx",
|
|
72983
|
+
${addAx("b", "c:catAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
|
|
72984
|
+
${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
|
|
72981
72985
|
` : ""}`;
|
|
72982
72986
|
}
|
|
72983
72987
|
function addComboChart(chart) {
|
|
@@ -73135,11 +73139,11 @@ function addLineChart(chart) {
|
|
|
73135
73139
|
<!-- each data marker in the series does not have a different color -->
|
|
73136
73140
|
<c:varyColors val="0"/>
|
|
73137
73141
|
${joinXmlNodes(rightDataSetsNodes)}
|
|
73138
|
-
<c:axId val="${
|
|
73139
|
-
<c:axId val="${
|
|
73142
|
+
<c:axId val="${17781238}" />
|
|
73143
|
+
<c:axId val="${88853994}" />
|
|
73140
73144
|
</c:lineChart>
|
|
73141
|
-
${addAx("b", "c:catAx",
|
|
73142
|
-
${addAx("r", "c:valAx",
|
|
73145
|
+
${addAx("b", "c:catAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
|
|
73146
|
+
${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
|
|
73143
73147
|
` : ""}
|
|
73144
73148
|
`;
|
|
73145
73149
|
}
|
|
@@ -73202,11 +73206,11 @@ function addScatterChart(chart) {
|
|
|
73202
73206
|
<c:varyColors val="0"/>
|
|
73203
73207
|
<c:scatterStyle val="lineMarker"/>
|
|
73204
73208
|
${joinXmlNodes(rightDataSetsNodes)}
|
|
73205
|
-
<c:axId val="${
|
|
73206
|
-
<c:axId val="${
|
|
73209
|
+
<c:axId val="${17781238}" />
|
|
73210
|
+
<c:axId val="${88853994}" />
|
|
73207
73211
|
</c:scatterChart>
|
|
73208
|
-
${addAx("b", "c:valAx",
|
|
73209
|
-
${addAx("r", "c:valAx",
|
|
73212
|
+
${addAx("b", "c:valAx", 17781238, 88853994, chart.axesDesign?.x?.title, chart.fontColor, leftDataSetsNodes.length ? 1 : 0)}
|
|
73213
|
+
${addAx("r", "c:valAx", 88853994, 17781238, chart.axesDesign?.y1?.title, chart.fontColor)}
|
|
73210
73214
|
` : ""}`;
|
|
73211
73215
|
}
|
|
73212
73216
|
function addRadarChart(chart) {
|
|
@@ -75375,6 +75379,6 @@ const chartHelpers = {
|
|
|
75375
75379
|
//#endregion
|
|
75376
75380
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, LocalTransportService, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, chartHelpers, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
75377
75381
|
|
|
75378
|
-
__info__.version = "18.4.
|
|
75379
|
-
__info__.date = "2026-
|
|
75380
|
-
__info__.hash = "
|
|
75382
|
+
__info__.version = "18.4.46";
|
|
75383
|
+
__info__.date = "2026-07-01T05:02:56.676Z";
|
|
75384
|
+
__info__.hash = "26297b3";
|