@odoo/o-spreadsheet 19.2.30 → 19.2.31
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 +418 -364
- package/dist/o_spreadsheet.iife.js +418 -364
- package/dist/o_spreadsheet.iife.min.js +257 -257
- package/dist/o_spreadsheet.xml +97 -92
- package/package.json +1 -1
|
@@ -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.2.
|
|
6
|
-
* @date 2026-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.2.31
|
|
6
|
+
* @date 2026-10-01T07:52:54.414Z
|
|
7
|
+
* @hash a784cea
|
|
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, whenReady, xml } from "@odoo/owl";
|
|
@@ -227,12 +227,19 @@ const GRAY_200 = "#E7E9ED";
|
|
|
227
227
|
const TEXT_BODY = "#374151";
|
|
228
228
|
const TEXT_BODY_MUTED = "#374151C2";
|
|
229
229
|
const ACTION_COLOR = HIGHLIGHT_COLOR;
|
|
230
|
+
const CHART_PADDING = 20;
|
|
231
|
+
const CHART_PADDING_BOTTOM = 10;
|
|
232
|
+
const CHART_PADDING_TOP = 15;
|
|
230
233
|
const CHART_TITLE_FONT_SIZE = 16;
|
|
234
|
+
const CHART_AXIS_TITLE_FONT_SIZE = 12;
|
|
235
|
+
const MASTER_CHART_HEIGHT = 60;
|
|
236
|
+
const CHART_COLORSCALE_WIDTH = 70;
|
|
231
237
|
const DEFAULT_CHART_COLOR_SCALE = {
|
|
232
238
|
minColor: "#FFF5EB",
|
|
233
239
|
midColor: "#FD8D3C",
|
|
234
240
|
maxColor: "#7F2704"
|
|
235
241
|
};
|
|
242
|
+
const SCORECARD_CHART_TITLE_FONT_SIZE = 14;
|
|
236
243
|
const PIVOT_TOKEN_COLOR = "#F28C28";
|
|
237
244
|
const COLOR_PICKER_DEFAULTS = [
|
|
238
245
|
"#000000",
|
|
@@ -316,8 +323,30 @@ const COLOR_PICKER_DEFAULTS = [
|
|
|
316
323
|
"#20124D",
|
|
317
324
|
"#4C1130"
|
|
318
325
|
];
|
|
326
|
+
const MIN_ROW_HEIGHT = 10;
|
|
327
|
+
const MIN_COL_WIDTH = 5;
|
|
328
|
+
const HEADER_HEIGHT = 26;
|
|
329
|
+
const HEADER_WIDTH = 48;
|
|
330
|
+
const DESKTOP_TOPBAR_TOOLBAR_HEIGHT = 34;
|
|
331
|
+
const DESKTOP_BOTTOMBAR_HEIGHT = 36;
|
|
332
|
+
const DEFAULT_CELL_WIDTH = 96;
|
|
319
333
|
const DEFAULT_CELL_HEIGHT = 23;
|
|
320
|
-
const
|
|
334
|
+
const SCROLLBAR_WIDTH = 15;
|
|
335
|
+
const AUTOFILL_EDGE_LENGTH = 8;
|
|
336
|
+
const ICON_EDGE_LENGTH = 18;
|
|
337
|
+
const MIN_CF_ICON_MARGIN = 4;
|
|
338
|
+
const MIN_CELL_TEXT_MARGIN = 4;
|
|
339
|
+
const PADDING_AUTORESIZE_VERTICAL = 3;
|
|
340
|
+
const PADDING_AUTORESIZE_HORIZONTAL = MIN_CELL_TEXT_MARGIN;
|
|
341
|
+
const GROUP_LAYER_WIDTH = 21;
|
|
342
|
+
const GRID_ICON_MARGIN = 2;
|
|
343
|
+
const GRID_ICON_EDGE_LENGTH = 17;
|
|
344
|
+
const FOOTER_HEIGHT = 2 * DEFAULT_CELL_HEIGHT;
|
|
345
|
+
const DATA_VALIDATION_CHIP_MARGIN = 5;
|
|
346
|
+
const MOBILE_WIDTH_BREAKPOINT = 768;
|
|
347
|
+
const MENU_WIDTH = 250;
|
|
348
|
+
const MENU_VERTICAL_PADDING = 6;
|
|
349
|
+
const DESKTOP_MENU_ITEM_HEIGHT = 26;
|
|
321
350
|
const ZOOM_VALUES = [
|
|
322
351
|
50,
|
|
323
352
|
75,
|
|
@@ -347,20 +376,34 @@ const DEFAULT_NUMBER_STYLE = {
|
|
|
347
376
|
};
|
|
348
377
|
const DEFAULT_VERTICAL_ALIGN = DEFAULT_STYLE.verticalAlign;
|
|
349
378
|
const DEFAULT_WRAPPING_MODE = DEFAULT_STYLE.wrapping;
|
|
379
|
+
const DEFAULT_FONT_WEIGHT = "400";
|
|
350
380
|
const DEFAULT_FONT_SIZE = DEFAULT_STYLE.fontSize;
|
|
381
|
+
const HEADER_FONT_SIZE = 11;
|
|
351
382
|
const DEFAULT_FONT = "'Roboto', arial, 'Liberation Sans'";
|
|
352
383
|
const DEFAULT_BORDER_DESC = {
|
|
353
384
|
style: "thin",
|
|
354
385
|
color: "#000000"
|
|
355
386
|
};
|
|
387
|
+
const MAX_HISTORY_STEPS = 99;
|
|
356
388
|
const DEFAULT_REVISION_ID = "START_REVISION";
|
|
389
|
+
const DEFAULT_FIGURE_HEIGHT = 335;
|
|
390
|
+
const DEFAULT_FIGURE_WIDTH = 536;
|
|
391
|
+
const FIGURE_BORDER_WIDTH = 1;
|
|
392
|
+
const MIN_FIG_SIZE = 80;
|
|
393
|
+
const MAX_CHAR_LABEL = 20;
|
|
394
|
+
const FIGURE_ID_SPLITTER = "??";
|
|
357
395
|
const DEFAULT_GAUGE_LOWER_COLOR = "#EA6175";
|
|
358
396
|
const DEFAULT_GAUGE_MIDDLE_COLOR = "#FFD86D";
|
|
359
397
|
const DEFAULT_GAUGE_UPPER_COLOR = "#43C5B1";
|
|
360
398
|
const DEFAULT_SCORECARD_BASELINE_MODE = "difference";
|
|
361
399
|
const DEFAULT_SCORECARD_BASELINE_COLOR_UP = "#43C5B1";
|
|
362
400
|
const DEFAULT_SCORECARD_BASELINE_COLOR_DOWN = "#EA6175";
|
|
401
|
+
const DEFAULT_SCORECARD_KEY_VALUE_FONT_SIZE = 32;
|
|
402
|
+
const DEFAULT_SCORECARD_BASELINE_FONT_SIZE = 16;
|
|
363
403
|
const LINE_FILL_TRANSPARENCY = .4;
|
|
404
|
+
const LINE_DATA_POINT_RADIUS = 3;
|
|
405
|
+
const DEFAULT_WINDOW_SIZE = 2;
|
|
406
|
+
const MESSAGE_VERSION = 1;
|
|
364
407
|
const FORBIDDEN_SHEETNAME_CHARS = [
|
|
365
408
|
"'",
|
|
366
409
|
"*",
|
|
@@ -371,6 +414,7 @@ const FORBIDDEN_SHEETNAME_CHARS = [
|
|
|
371
414
|
"]"
|
|
372
415
|
];
|
|
373
416
|
const FORBIDDEN_SHEETNAME_CHARS_IN_EXCEL_REGEX = /'|\*|\?|\/|\\|\[|\]/;
|
|
417
|
+
const FORMULA_REF_IDENTIFIER = "|";
|
|
374
418
|
let DEFAULT_SHEETVIEW_SIZE = 0;
|
|
375
419
|
function getDefaultSheetViewSize() {
|
|
376
420
|
return DEFAULT_SHEETVIEW_SIZE;
|
|
@@ -379,6 +423,7 @@ function setDefaultSheetViewSize(size) {
|
|
|
379
423
|
DEFAULT_SHEETVIEW_SIZE = size;
|
|
380
424
|
}
|
|
381
425
|
const MAXIMAL_FREEZABLE_RATIO = .85;
|
|
426
|
+
const NEWLINE = "\n";
|
|
382
427
|
const FONT_SIZES = [
|
|
383
428
|
6,
|
|
384
429
|
7,
|
|
@@ -404,6 +449,8 @@ const PIVOT_STATIC_TABLE_CONFIG = {
|
|
|
404
449
|
automaticAutofill: false
|
|
405
450
|
};
|
|
406
451
|
const PIVOT_INSERT_TABLE_STYLE_ID = "PivotTableStyleMedium12";
|
|
452
|
+
const PIVOT_INDENT = 15;
|
|
453
|
+
const PIVOT_COLLAPSE_ICON_SIZE = 12;
|
|
407
454
|
const PIVOT_MAX_NUMBER_OF_CELLS = 5e5;
|
|
408
455
|
const DEFAULT_CURRENCY = {
|
|
409
456
|
symbol: "$",
|
|
@@ -413,7 +460,7 @@ const DEFAULT_CURRENCY = {
|
|
|
413
460
|
name: "Dollar"
|
|
414
461
|
};
|
|
415
462
|
const DEFAULT_CAROUSEL_TITLE_STYLE = {
|
|
416
|
-
fontSize:
|
|
463
|
+
fontSize: CHART_TITLE_FONT_SIZE,
|
|
417
464
|
color: TEXT_BODY
|
|
418
465
|
};
|
|
419
466
|
const DEFAULT_TOKEN_COLOR = "light-dark(#000000, #ffffff)";
|
|
@@ -430,6 +477,7 @@ const tokenColors = {
|
|
|
430
477
|
ARG_SEPARATOR: functionColor,
|
|
431
478
|
ORPHAN_RIGHT_PAREN: "#ff0000"
|
|
432
479
|
};
|
|
480
|
+
const DRAG_THRESHOLD = 5;
|
|
433
481
|
|
|
434
482
|
//#endregion
|
|
435
483
|
//#region src/helpers/misc.ts
|
|
@@ -799,7 +847,7 @@ const whiteSpaceCharacters = specialWhiteSpaceSpecialCharacters.concat([" "]);
|
|
|
799
847
|
*/
|
|
800
848
|
function replaceNewLines(text) {
|
|
801
849
|
if (!text) return "";
|
|
802
|
-
return text.replace(newLineRegexp,
|
|
850
|
+
return text.replace(newLineRegexp, NEWLINE);
|
|
803
851
|
}
|
|
804
852
|
/**
|
|
805
853
|
* Determine if the numbers are consecutive.
|
|
@@ -1031,7 +1079,7 @@ function toCartesian(xc) {
|
|
|
1031
1079
|
consumeSpaces(chars);
|
|
1032
1080
|
const col = letterPart - 1;
|
|
1033
1081
|
const row = num - 1;
|
|
1034
|
-
if (!chars.isOver() || col > MAX_COL || row >
|
|
1082
|
+
if (!chars.isOver() || col > MAX_COL || row > MAX_ROW) throw new Error(`Invalid cell description: ${xc}`);
|
|
1035
1083
|
return {
|
|
1036
1084
|
col,
|
|
1037
1085
|
row
|
|
@@ -1442,7 +1490,7 @@ function toUnboundedZone(xc) {
|
|
|
1442
1490
|
const orderedZone = reorderZone(toZoneWithoutBoundaryChanges(xc));
|
|
1443
1491
|
const bottom = orderedZone.bottom;
|
|
1444
1492
|
const right = orderedZone.right;
|
|
1445
|
-
if (bottom !== void 0 && bottom >
|
|
1493
|
+
if (bottom !== void 0 && bottom > MAX_ROW || right !== void 0 && right > MAX_COL) throw new Error(`Range string out of bounds: ${xc}`);
|
|
1446
1494
|
if (bottom === void 0 && right === void 0) throw new Error("Wrong zone xc. The zone cannot be at the same time a full column and a full row");
|
|
1447
1495
|
return orderedZone;
|
|
1448
1496
|
}
|
|
@@ -1603,7 +1651,7 @@ function intersection(z1, z2) {
|
|
|
1603
1651
|
return {
|
|
1604
1652
|
top: Math.max(z1.top, z2.top),
|
|
1605
1653
|
left: Math.max(z1.left, z2.left),
|
|
1606
|
-
bottom: Math.min(z1.bottom ??
|
|
1654
|
+
bottom: Math.min(z1.bottom ?? MAX_ROW, z2.bottom),
|
|
1607
1655
|
right: Math.min(z1.right ?? MAX_COL, z2.right)
|
|
1608
1656
|
};
|
|
1609
1657
|
}
|
|
@@ -4573,7 +4621,7 @@ function parseNumberFormatTokens(tokens) {
|
|
|
4573
4621
|
switch (token.type) {
|
|
4574
4622
|
case "DIGIT":
|
|
4575
4623
|
if (parsedPart === integerPart) parsedPart.push(token);
|
|
4576
|
-
else if (numberOfDecimalsDigits <
|
|
4624
|
+
else if (numberOfDecimalsDigits < MAX_DECIMAL_PLACES) {
|
|
4577
4625
|
parsedPart.push(token);
|
|
4578
4626
|
numberOfDecimalsDigits++;
|
|
4579
4627
|
}
|
|
@@ -4936,7 +4984,7 @@ const numberRepresentation = [];
|
|
|
4936
4984
|
* exceed in the decimal part, in which case digits are rounded.
|
|
4937
4985
|
*
|
|
4938
4986
|
**/
|
|
4939
|
-
function splitNumber(value, maxDecimals =
|
|
4987
|
+
function splitNumber(value, maxDecimals = MAX_DECIMAL_PLACES) {
|
|
4940
4988
|
const asString = value.toString();
|
|
4941
4989
|
if (asString.includes("e")) return splitNumberIntl(value, maxDecimals);
|
|
4942
4990
|
if (Number.isInteger(value)) return {
|
|
@@ -5005,7 +5053,7 @@ function limitDecimalDigits(decimalDigits, maxDecimals) {
|
|
|
5005
5053
|
* Supports numbers with a lot of digits that are transformed to scientific notation by
|
|
5006
5054
|
* number.toString(), but is slow.
|
|
5007
5055
|
*/
|
|
5008
|
-
function splitNumberIntl(value, maxDecimals =
|
|
5056
|
+
function splitNumberIntl(value, maxDecimals = MAX_DECIMAL_PLACES) {
|
|
5009
5057
|
let formatter = numberRepresentation[maxDecimals];
|
|
5010
5058
|
if (!formatter) {
|
|
5011
5059
|
formatter = new Intl.NumberFormat("en-US", {
|
|
@@ -6115,7 +6163,7 @@ const MIN_DELAY = 20;
|
|
|
6115
6163
|
* Returns a timeout delay in milliseconds.
|
|
6116
6164
|
*/
|
|
6117
6165
|
function scrollDelay(value) {
|
|
6118
|
-
return
|
|
6166
|
+
return MIN_DELAY + (MAX_DELAY - MIN_DELAY) * Math.exp(-.035 * (value - 1));
|
|
6119
6167
|
}
|
|
6120
6168
|
|
|
6121
6169
|
//#endregion
|
|
@@ -6773,7 +6821,7 @@ function createEmptyStructure(node) {
|
|
|
6773
6821
|
//#endregion
|
|
6774
6822
|
//#region src/helpers/text_helper.ts
|
|
6775
6823
|
function computeTextLinesHeight(textLineHeight, numberOfLines = 1) {
|
|
6776
|
-
return numberOfLines * (textLineHeight +
|
|
6824
|
+
return numberOfLines * (textLineHeight + MIN_CELL_TEXT_MARGIN) - MIN_CELL_TEXT_MARGIN;
|
|
6777
6825
|
}
|
|
6778
6826
|
function getCanvas(width = 100, height = 100) {
|
|
6779
6827
|
return new OffscreenCanvas(width, height).getContext("2d");
|
|
@@ -6782,7 +6830,7 @@ function getCanvas(width = 100, height = 100) {
|
|
|
6782
6830
|
* Get the default height of the cell given its style.
|
|
6783
6831
|
*/
|
|
6784
6832
|
function getDefaultCellHeight(ctx, cell, locale, colSize) {
|
|
6785
|
-
if (!cell || !cell.isFormula && !cell.content) return
|
|
6833
|
+
if (!cell || !cell.isFormula && !cell.content) return DEFAULT_CELL_HEIGHT;
|
|
6786
6834
|
let content = "";
|
|
6787
6835
|
try {
|
|
6788
6836
|
if (!cell.isFormula) {
|
|
@@ -6798,7 +6846,7 @@ function getDefaultCellHeight(ctx, cell, locale, colSize) {
|
|
|
6798
6846
|
return getCellContentHeight(ctx, content, cell.style, colSize);
|
|
6799
6847
|
}
|
|
6800
6848
|
function getCellContentHeight(ctx, content, style, colSize) {
|
|
6801
|
-
return computeMultilineTextSize(ctx, splitTextToWidth(ctx, content, style, style?.wrapping === "wrap" ? colSize - 2 *
|
|
6849
|
+
return computeMultilineTextSize(ctx, splitTextToWidth(ctx, content, style, style?.wrapping === "wrap" ? colSize - 2 * MIN_CELL_TEXT_MARGIN : void 0), style).height + 2 * PADDING_AUTORESIZE_VERTICAL;
|
|
6802
6850
|
}
|
|
6803
6851
|
function getDefaultContextFont(fontSize, bold = false, italic = false) {
|
|
6804
6852
|
return `${italic ? "italic" : ""} ${bold ? "bold" : ""} ${fontSize}px ${DEFAULT_FONT}`;
|
|
@@ -6864,7 +6912,7 @@ function fontSizeInPixels(fontSize) {
|
|
|
6864
6912
|
return Math.round(fontSize * 96 / 72);
|
|
6865
6913
|
}
|
|
6866
6914
|
function computeTextFont(style, fontUnit = "pt") {
|
|
6867
|
-
return `${style.italic ? "italic " : ""}${style.bold ? "bold" :
|
|
6915
|
+
return `${style.italic ? "italic " : ""}${style.bold ? "bold" : DEFAULT_FONT_WEIGHT} ${(fontUnit === "pt" ? computeTextFontSizeInPixels(style) : style.fontSize) ?? DEFAULT_FONT_SIZE}px ${DEFAULT_FONT}`;
|
|
6868
6916
|
}
|
|
6869
6917
|
function computeTextFontSizeInPixels(style) {
|
|
6870
6918
|
return fontSizeInPixels(style?.fontSize || DEFAULT_FONT_SIZE);
|
|
@@ -6888,7 +6936,7 @@ function splitTextToWidth(ctx, text, style, width) {
|
|
|
6888
6936
|
if (!style) style = {};
|
|
6889
6937
|
if (isMarkdownLink(text)) text = parseMarkdownLink(text).label;
|
|
6890
6938
|
const brokenText = [];
|
|
6891
|
-
const lines = text.includes(
|
|
6939
|
+
const lines = text.includes(NEWLINE) ? text.split(NEWLINE) : [text];
|
|
6892
6940
|
for (const line of lines) {
|
|
6893
6941
|
const words = line.includes(" ") ? line.split(" ") : [line];
|
|
6894
6942
|
if (!width) {
|
|
@@ -7054,7 +7102,7 @@ function computeRotationPosition(rect, style) {
|
|
|
7054
7102
|
let { x, y } = rect;
|
|
7055
7103
|
const cos = Math.cos(-style.rotation);
|
|
7056
7104
|
const sin = Math.sin(-style.rotation);
|
|
7057
|
-
const width = rect.textWidth - 2 *
|
|
7105
|
+
const width = rect.textWidth - 2 * MIN_CELL_TEXT_MARGIN;
|
|
7058
7106
|
const height = rect.textHeight;
|
|
7059
7107
|
const center = style.align === "center";
|
|
7060
7108
|
const rotateTowardCellCenter = style.align === "left" === sin < 0;
|
|
@@ -7172,7 +7220,7 @@ const chartBackgroundPlugin = {
|
|
|
7172
7220
|
const { ctx } = chart;
|
|
7173
7221
|
ctx.save();
|
|
7174
7222
|
ctx.globalCompositeOperation = "destination-over";
|
|
7175
|
-
ctx.fillStyle = options.color ||
|
|
7223
|
+
ctx.fillStyle = options.color || BACKGROUND_CHART_COLOR;
|
|
7176
7224
|
ctx.fillRect(0, 0, chart.width, chart.height);
|
|
7177
7225
|
ctx.restore();
|
|
7178
7226
|
}
|
|
@@ -7194,7 +7242,7 @@ function getCalendarChartController() {
|
|
|
7194
7242
|
};
|
|
7195
7243
|
updateElements(rects, start, count, mode) {
|
|
7196
7244
|
super.updateElements(rects, start, count, mode);
|
|
7197
|
-
const backgroundColor = this.chart.config.options?.plugins?.background?.color ||
|
|
7245
|
+
const backgroundColor = this.chart.config.options?.plugins?.background?.color || BACKGROUND_CHART_COLOR;
|
|
7198
7246
|
for (let i = start; i < start + count; i++) if (mode === "reset") this.updateElement(rects[i], i, { options: { backgroundColor } }, mode);
|
|
7199
7247
|
}
|
|
7200
7248
|
};
|
|
@@ -7214,7 +7262,7 @@ const chartColorScalePlugin = {
|
|
|
7214
7262
|
ctx.miterLimit = 1;
|
|
7215
7263
|
const gradientHeight = (chart.chartArea.bottom - chart.chartArea.top) / 2;
|
|
7216
7264
|
const gradientWidth = 10;
|
|
7217
|
-
const gradientX = options.position === "left" ?
|
|
7265
|
+
const gradientX = options.position === "left" ? CHART_PADDING : ctx.canvas.width - CHART_COLORSCALE_WIDTH;
|
|
7218
7266
|
const gradientY = chart.chartArea.top;
|
|
7219
7267
|
const gradient = ctx.createLinearGradient(0, gradientY + gradientHeight, 0, gradientY);
|
|
7220
7268
|
const step = 1 / (options.colorScale.length - 1);
|
|
@@ -7224,7 +7272,7 @@ const chartColorScalePlugin = {
|
|
|
7224
7272
|
ctx.fillStyle = gradient;
|
|
7225
7273
|
ctx.fillRect(gradientX, gradientY, gradientWidth, gradientHeight);
|
|
7226
7274
|
ctx.fillStyle = options.fontColor ?? "black";
|
|
7227
|
-
ctx.font = getDefaultContextFont(
|
|
7275
|
+
ctx.font = getDefaultContextFont(CHART_AXIS_TITLE_FONT_SIZE);
|
|
7228
7276
|
ctx.textAlign = "left";
|
|
7229
7277
|
let minValue = Math.round(options.minValue * 100) / 100;
|
|
7230
7278
|
let maxValue = Math.round(options.maxValue * 100) / 100;
|
|
@@ -7433,6 +7481,12 @@ const WIDTH_FACTOR = .143;
|
|
|
7433
7481
|
const EXCEL_DEFAULT_COL_WIDTH = 8.43;
|
|
7434
7482
|
/** unit : points */
|
|
7435
7483
|
const EXCEL_DEFAULT_ROW_HEIGHT = 12.75;
|
|
7484
|
+
const EXCEL_IMPORT_DEFAULT_NUMBER_OF_COLS = 30;
|
|
7485
|
+
const EXCEL_IMPORT_DEFAULT_NUMBER_OF_ROWS = 100;
|
|
7486
|
+
/** The possible values for the XLSX polynomial trendline order are defined by the ST_Order simple type (§21.2.3.29) */
|
|
7487
|
+
const MAX_XLSX_POLYNOMIAL_DEGREE = 6;
|
|
7488
|
+
const FIRST_NUMFMT_ID = 164;
|
|
7489
|
+
const DEFAULT_DOUGHNUT_CHART_HOLE_SIZE = 50;
|
|
7436
7490
|
const FORCE_DEFAULT_ARGS_FUNCTIONS = {
|
|
7437
7491
|
FLOOR: [{
|
|
7438
7492
|
type: "NUMBER",
|
|
@@ -7656,11 +7710,11 @@ function tokenize(str, locale = DEFAULT_LOCALE) {
|
|
|
7656
7710
|
return result;
|
|
7657
7711
|
}
|
|
7658
7712
|
function tokenizeDebugger(chars) {
|
|
7659
|
-
if (chars.current ===
|
|
7713
|
+
if (chars.current === DEBUGGER_CHAR) {
|
|
7660
7714
|
chars.shift();
|
|
7661
7715
|
return {
|
|
7662
7716
|
type: "DEBUGGER",
|
|
7663
|
-
value:
|
|
7717
|
+
value: DEBUGGER_CHAR
|
|
7664
7718
|
};
|
|
7665
7719
|
}
|
|
7666
7720
|
return null;
|
|
@@ -7819,13 +7873,13 @@ function tokenizeSimpleSpace(chars) {
|
|
|
7819
7873
|
}
|
|
7820
7874
|
function tokenizeNewLine(chars) {
|
|
7821
7875
|
let length = 0;
|
|
7822
|
-
while (chars.current ===
|
|
7876
|
+
while (chars.current === NEWLINE) {
|
|
7823
7877
|
length++;
|
|
7824
7878
|
chars.shift();
|
|
7825
7879
|
}
|
|
7826
7880
|
if (length) return {
|
|
7827
7881
|
type: "SPACE",
|
|
7828
|
-
value:
|
|
7882
|
+
value: NEWLINE.repeat(length)
|
|
7829
7883
|
};
|
|
7830
7884
|
return null;
|
|
7831
7885
|
}
|
|
@@ -8167,8 +8221,8 @@ function toExcelDataset(getters, ds) {
|
|
|
8167
8221
|
if (ds.trend?.type) trend = {
|
|
8168
8222
|
type: ds.trend.type === "polynomial" && ds.trend.order === 1 ? "linear" : SPREADSHEET_TO_EXCEL_TRENDLINE_TYPE_MAPPING[ds.trend.type],
|
|
8169
8223
|
color: ds.trend.color,
|
|
8170
|
-
order: ds.trend.order ? Math.min(ds.trend.order,
|
|
8171
|
-
window: ds.trend.window ||
|
|
8224
|
+
order: ds.trend.order ? Math.min(ds.trend.order, MAX_XLSX_POLYNOMIAL_DEGREE) : void 0,
|
|
8225
|
+
window: ds.trend.window || DEFAULT_WINDOW_SIZE
|
|
8172
8226
|
};
|
|
8173
8227
|
return {
|
|
8174
8228
|
label,
|
|
@@ -8305,13 +8359,13 @@ function getPieColors(colors, dataSetsValues) {
|
|
|
8305
8359
|
for (let i = 0; i <= maxLength; i++) pieColors.push(colors.next());
|
|
8306
8360
|
return pieColors;
|
|
8307
8361
|
}
|
|
8308
|
-
function truncateLabel(label, maxLen =
|
|
8362
|
+
function truncateLabel(label, maxLen = MAX_CHAR_LABEL) {
|
|
8309
8363
|
if (!label) return "";
|
|
8310
8364
|
if (label.length > maxLen) return label.substring(0, maxLen) + "…";
|
|
8311
8365
|
return label;
|
|
8312
8366
|
}
|
|
8313
8367
|
function isTrendLineAxis(axisID) {
|
|
8314
|
-
return axisID ===
|
|
8368
|
+
return axisID === TREND_LINE_XAXIS_ID || axisID === MOVING_AVERAGE_TREND_LINE_XAXIS_ID;
|
|
8315
8369
|
}
|
|
8316
8370
|
|
|
8317
8371
|
//#endregion
|
|
@@ -8617,7 +8671,7 @@ function getBarChartScales(definition, args) {
|
|
|
8617
8671
|
scales = removeFalsyAttributes(scales);
|
|
8618
8672
|
if (trendDatasets && trendDatasets.length && trendDatasets.some(isDefined)) {
|
|
8619
8673
|
const maxLength = Math.max(...trendDatasets.map((trendDataset) => trendDataset?.length || 0));
|
|
8620
|
-
scales[
|
|
8674
|
+
scales[TREND_LINE_XAXIS_ID] = {
|
|
8621
8675
|
...scales.x,
|
|
8622
8676
|
labels: Array(maxLength).fill(""),
|
|
8623
8677
|
offset: false,
|
|
@@ -8720,7 +8774,7 @@ function getLineChartScales(definition, args) {
|
|
|
8720
8774
|
});
|
|
8721
8775
|
}
|
|
8722
8776
|
if (trendDatasets && trendDatasets.length && trendDatasets.some(isDefined)) {
|
|
8723
|
-
scales[
|
|
8777
|
+
scales[TREND_LINE_XAXIS_ID] = {
|
|
8724
8778
|
...scales.x,
|
|
8725
8779
|
display: false
|
|
8726
8780
|
};
|
|
@@ -8730,9 +8784,9 @@ function getLineChartScales(definition, args) {
|
|
|
8730
8784
|
};
|
|
8731
8785
|
if (axisType === "category" || axisType === "time") {
|
|
8732
8786
|
const maxLength = Math.max(...trendDatasets.map((trendDataset) => trendDataset?.length || 0));
|
|
8733
|
-
scales[
|
|
8734
|
-
scales[
|
|
8735
|
-
scales[
|
|
8787
|
+
scales[TREND_LINE_XAXIS_ID]["type"] = "category";
|
|
8788
|
+
scales[TREND_LINE_XAXIS_ID]["labels"] = range(0, maxLength).map((x) => x.toString());
|
|
8789
|
+
scales[TREND_LINE_XAXIS_ID]["offset"] = false;
|
|
8736
8790
|
scales[MOVING_AVERAGE_TREND_LINE_XAXIS_ID]["type"] = "category";
|
|
8737
8791
|
scales[MOVING_AVERAGE_TREND_LINE_XAXIS_ID]["offset"] = false;
|
|
8738
8792
|
}
|
|
@@ -8877,7 +8931,7 @@ function getChartAxisTitleRuntime(design) {
|
|
|
8877
8931
|
font: {
|
|
8878
8932
|
style: italic ? "italic" : "normal",
|
|
8879
8933
|
weight: bold ? "bold" : "normal",
|
|
8880
|
-
size: design.title.fontSize ??
|
|
8934
|
+
size: design.title.fontSize ?? CHART_AXIS_TITLE_FONT_SIZE
|
|
8881
8935
|
},
|
|
8882
8936
|
align: align === "left" ? "start" : align === "right" ? "end" : "center"
|
|
8883
8937
|
};
|
|
@@ -8940,16 +8994,16 @@ function getLegendMargin(definition) {
|
|
|
8940
8994
|
switch (definition.legendPosition) {
|
|
8941
8995
|
case "top":
|
|
8942
8996
|
case "right": return {
|
|
8943
|
-
top: !!definition.title.text ?
|
|
8944
|
-
left:
|
|
8945
|
-
right:
|
|
8997
|
+
top: !!definition.title.text ? CHART_PADDING_TOP + 30 : CHART_PADDING_TOP,
|
|
8998
|
+
left: CHART_PADDING,
|
|
8999
|
+
right: CHART_PADDING
|
|
8946
9000
|
};
|
|
8947
9001
|
case "bottom":
|
|
8948
9002
|
case "left":
|
|
8949
9003
|
case "none": return {
|
|
8950
|
-
left:
|
|
8951
|
-
right:
|
|
8952
|
-
bottom:
|
|
9004
|
+
left: CHART_PADDING,
|
|
9005
|
+
right: CHART_PADDING,
|
|
9006
|
+
bottom: CHART_PADDING_BOTTOM
|
|
8953
9007
|
};
|
|
8954
9008
|
}
|
|
8955
9009
|
}
|
|
@@ -8979,7 +9033,7 @@ function getBarChartDatasets(definition, args) {
|
|
|
8979
9033
|
label,
|
|
8980
9034
|
data,
|
|
8981
9035
|
hidden,
|
|
8982
|
-
borderColor: definition.background ||
|
|
9036
|
+
borderColor: definition.background || BACKGROUND_CHART_COLOR,
|
|
8983
9037
|
borderWidth: definition.stacked ? 1 : 0,
|
|
8984
9038
|
backgroundColor,
|
|
8985
9039
|
yAxisID: definition.horizontal ? "y" : definition.dataSets?.[index].yAxisId || "y",
|
|
@@ -9007,8 +9061,8 @@ function getCalendarChartDatasetAndLabels(definition, args) {
|
|
|
9007
9061
|
for (const dataSetValues of dataSetsValues) dataSets.push({
|
|
9008
9062
|
label: dataSetValues.label,
|
|
9009
9063
|
data: dataSetValues.data.map((v) => 1),
|
|
9010
|
-
backgroundColor: dataSetValues.data.map((v) => v !== void 0 ? colorMap(v) : definition.missingValueColor ||
|
|
9011
|
-
borderColor: definition.background ||
|
|
9064
|
+
backgroundColor: dataSetValues.data.map((v) => v !== void 0 ? colorMap(v) : definition.missingValueColor || COLOR_TRANSPARENT),
|
|
9065
|
+
borderColor: definition.background || BACKGROUND_CHART_COLOR,
|
|
9012
9066
|
borderSkipped: false,
|
|
9013
9067
|
borderWidth: 1,
|
|
9014
9068
|
barPercentage: 1,
|
|
@@ -9022,9 +9076,9 @@ function getCalendarChartDatasetAndLabels(definition, args) {
|
|
|
9022
9076
|
}
|
|
9023
9077
|
function getWaterfallDatasetAndLabels(definition, args) {
|
|
9024
9078
|
const { dataSetsValues, labels } = args;
|
|
9025
|
-
const negativeColor = definition.negativeValuesColor ||
|
|
9026
|
-
const positiveColor = definition.positiveValuesColor ||
|
|
9027
|
-
const subTotalColor = definition.subTotalValuesColor ||
|
|
9079
|
+
const negativeColor = definition.negativeValuesColor || CHART_WATERFALL_NEGATIVE_COLOR;
|
|
9080
|
+
const positiveColor = definition.positiveValuesColor || CHART_WATERFALL_POSITIVE_COLOR;
|
|
9081
|
+
const subTotalColor = definition.subTotalValuesColor || CHART_WATERFALL_SUBTOTAL_COLOR;
|
|
9028
9082
|
const backgroundColor = [];
|
|
9029
9083
|
const datasetValues = [];
|
|
9030
9084
|
const dataset = {
|
|
@@ -9085,7 +9139,7 @@ function getLineChartDatasets(definition, args) {
|
|
|
9085
9139
|
backgroundColor: areaChart ? setColorAlpha(color, LINE_FILL_TRANSPARENCY) : color,
|
|
9086
9140
|
pointBackgroundColor: color,
|
|
9087
9141
|
fill: areaChart ? getFillingMode(index, stackedChart) : false,
|
|
9088
|
-
pointRadius: definition.hideDataMarkers ? 0 :
|
|
9142
|
+
pointRadius: definition.hideDataMarkers ? 0 : LINE_DATA_POINT_RADIUS,
|
|
9089
9143
|
yAxisID: definition.dataSets?.[index].yAxisId || "y"
|
|
9090
9144
|
};
|
|
9091
9145
|
dataSets.push(dataset);
|
|
@@ -9141,7 +9195,7 @@ function getComboChartDatasets(definition, args) {
|
|
|
9141
9195
|
xAxisID: "x",
|
|
9142
9196
|
type,
|
|
9143
9197
|
order: type === "bar" ? dataSetsValues.length + index : index,
|
|
9144
|
-
pointRadius: definition.hideDataMarkers ? 0 :
|
|
9198
|
+
pointRadius: definition.hideDataMarkers ? 0 : LINE_DATA_POINT_RADIUS
|
|
9145
9199
|
};
|
|
9146
9200
|
if (dataset.type === "bar") {
|
|
9147
9201
|
dataset.barPercentage = .9;
|
|
@@ -9173,7 +9227,7 @@ function getRadarChartDatasets(definition, args) {
|
|
|
9173
9227
|
borderColor,
|
|
9174
9228
|
backgroundColor: borderColor,
|
|
9175
9229
|
pointBackgroundColor: borderColor,
|
|
9176
|
-
pointRadius: definition.hideDataMarkers ? 0 :
|
|
9230
|
+
pointRadius: definition.hideDataMarkers ? 0 : LINE_DATA_POINT_RADIUS
|
|
9177
9231
|
};
|
|
9178
9232
|
if (fill) {
|
|
9179
9233
|
dataset.backgroundColor = setColorAlpha(borderColor, LINE_FILL_TRANSPARENCY);
|
|
@@ -9229,7 +9283,7 @@ function getFunnelChartDatasets(definition, args) {
|
|
|
9229
9283
|
xAxisID: "x",
|
|
9230
9284
|
barPercentage: 1,
|
|
9231
9285
|
categoryPercentage: 1,
|
|
9232
|
-
borderColor: definition.background ||
|
|
9286
|
+
borderColor: definition.background || BACKGROUND_CHART_COLOR,
|
|
9233
9287
|
borderWidth: 3
|
|
9234
9288
|
}];
|
|
9235
9289
|
}
|
|
@@ -9254,12 +9308,12 @@ function getSunburstChartDatasets(definition, args) {
|
|
|
9254
9308
|
data: data[i],
|
|
9255
9309
|
borderColor: (ctx) => {
|
|
9256
9310
|
const data = ctx.type === "data" ? ctx.raw : void 0;
|
|
9257
|
-
if (!data || data.label ===
|
|
9258
|
-
return definition.background ||
|
|
9311
|
+
if (!data || data.label === GHOST_SUNBURST_VALUE) return COLOR_TRANSPARENT;
|
|
9312
|
+
return definition.background || BACKGROUND_CHART_COLOR;
|
|
9259
9313
|
},
|
|
9260
9314
|
backgroundColor: (ctx) => {
|
|
9261
9315
|
const data = ctx.type === "data" ? ctx.raw : void 0;
|
|
9262
|
-
if (!data || data.label ===
|
|
9316
|
+
if (!data || data.label === GHOST_SUNBURST_VALUE) return COLOR_TRANSPARENT;
|
|
9263
9317
|
const rootGroup = data.groups[0];
|
|
9264
9318
|
return groupColors.find((groupColor) => groupColor.label === rootGroup)?.color;
|
|
9265
9319
|
},
|
|
@@ -9399,7 +9453,7 @@ function getTrendingLineDataSet(dataset, config, data) {
|
|
|
9399
9453
|
const borderColor = config.color || lightenColor(rgbaToHex(defaultBorderColor), .5);
|
|
9400
9454
|
return {
|
|
9401
9455
|
type: "line",
|
|
9402
|
-
xAxisID: config.type === "trailingMovingAverage" ? MOVING_AVERAGE_TREND_LINE_XAXIS_ID :
|
|
9456
|
+
xAxisID: config.type === "trailingMovingAverage" ? MOVING_AVERAGE_TREND_LINE_XAXIS_ID : TREND_LINE_XAXIS_ID,
|
|
9403
9457
|
yAxisID: dataset.yAxisID,
|
|
9404
9458
|
label: dataset.label ? _t("Trend line for %s", dataset.label) : "",
|
|
9405
9459
|
data,
|
|
@@ -9510,7 +9564,7 @@ const sunburstHoverPlugin = {
|
|
|
9510
9564
|
for (const metaSet of chart.getSortedVisibleDatasetMetas()) for (const arcElement of metaSet.data) {
|
|
9511
9565
|
const context = arcElement["$context"];
|
|
9512
9566
|
const { datasetIndex, index, dataset, raw } = context;
|
|
9513
|
-
if (raw.label ===
|
|
9567
|
+
if (raw.label === GHOST_SUNBURST_VALUE) continue;
|
|
9514
9568
|
const originalBackgroundColor = typeof dataset.backgroundColor === "function" ? dataset.backgroundColor(context) : dataset.backgroundColor;
|
|
9515
9569
|
if (activeDataPoints.length && !activeDataPoints.some((el) => el.datasetIndex === datasetIndex && el.index === index)) arcElement.options.backgroundColor = lightenColor(originalBackgroundColor, .5);
|
|
9516
9570
|
else arcElement.options.backgroundColor = originalBackgroundColor;
|
|
@@ -9538,7 +9592,7 @@ function drawSunburstChartValues(chart, options, ctx) {
|
|
|
9538
9592
|
const lineHeight = fontSize + Y_PADDING;
|
|
9539
9593
|
for (const dataset of chart._metasets) for (let i = 0; i < dataset._dataset.data.length; i++) {
|
|
9540
9594
|
const rawData = dataset._dataset.data[i];
|
|
9541
|
-
if (rawData.label ===
|
|
9595
|
+
if (rawData.label === GHOST_SUNBURST_VALUE) continue;
|
|
9542
9596
|
const valuesToDisplay = [options.showLabels ? rawData.label : void 0, options.showValues ? options.callback(rawData.value, "y") : void 0].filter(isDefined);
|
|
9543
9597
|
const arc = dataset.data[i];
|
|
9544
9598
|
let { startAngle, endAngle, innerRadius, outerRadius, circumference } = arc;
|
|
@@ -9936,8 +9990,8 @@ var ScorecardChart$1 = class ScorecardChart$1 extends AbstractChart {
|
|
|
9936
9990
|
this.baselineMode = definition.baselineMode;
|
|
9937
9991
|
this.baselineDescr = definition.baselineDescr;
|
|
9938
9992
|
this.background = definition.background;
|
|
9939
|
-
this.baselineColorUp = definition.baselineColorUp ??
|
|
9940
|
-
this.baselineColorDown = definition.baselineColorDown ??
|
|
9993
|
+
this.baselineColorUp = definition.baselineColorUp ?? DEFAULT_SCORECARD_BASELINE_COLOR_UP;
|
|
9994
|
+
this.baselineColorDown = definition.baselineColorDown ?? DEFAULT_SCORECARD_BASELINE_COLOR_DOWN;
|
|
9941
9995
|
this.humanize = definition.humanize ?? true;
|
|
9942
9996
|
}
|
|
9943
9997
|
static validateChartDefinition(validator, definition) {
|
|
@@ -10021,7 +10075,7 @@ function drawScoreChart(structure, canvas, zoom = 1) {
|
|
|
10021
10075
|
canvas.width = dpr * structure.canvas.width * zoom;
|
|
10022
10076
|
canvas.height = dpr * structure.canvas.height * zoom;
|
|
10023
10077
|
ctx.scale(dpr * zoom, dpr * zoom);
|
|
10024
|
-
const availableWidth = structure.canvas.width -
|
|
10078
|
+
const availableWidth = structure.canvas.width - CHART_PADDING;
|
|
10025
10079
|
ctx.fillStyle = structure.canvas.backgroundColor;
|
|
10026
10080
|
ctx.fillRect(0, 0, structure.canvas.width, structure.canvas.height);
|
|
10027
10081
|
if (structure.title) {
|
|
@@ -10200,16 +10254,16 @@ var ScorecardChartConfigBuilder = class {
|
|
|
10200
10254
|
x = (this.width - titleWidth) / 2;
|
|
10201
10255
|
break;
|
|
10202
10256
|
case "right":
|
|
10203
|
-
x = this.width - titleWidth -
|
|
10257
|
+
x = this.width - titleWidth - CHART_PADDING;
|
|
10204
10258
|
break;
|
|
10205
|
-
default: x =
|
|
10259
|
+
default: x = CHART_PADDING;
|
|
10206
10260
|
}
|
|
10207
10261
|
structure.title = {
|
|
10208
10262
|
text: this.title,
|
|
10209
10263
|
style: style.title,
|
|
10210
10264
|
position: {
|
|
10211
10265
|
x,
|
|
10212
|
-
y:
|
|
10266
|
+
y: CHART_PADDING_BOTTOM + titleHeight / 2
|
|
10213
10267
|
}
|
|
10214
10268
|
};
|
|
10215
10269
|
}
|
|
@@ -10220,10 +10274,10 @@ var ScorecardChartConfigBuilder = class {
|
|
|
10220
10274
|
let baselineX;
|
|
10221
10275
|
switch (this.runtime.baselineStyle?.align) {
|
|
10222
10276
|
case "right":
|
|
10223
|
-
baselineX = this.width -
|
|
10277
|
+
baselineX = this.width - CHART_PADDING - baselineDescrWidth - baselineWidth;
|
|
10224
10278
|
break;
|
|
10225
10279
|
case "left":
|
|
10226
|
-
baselineX =
|
|
10280
|
+
baselineX = CHART_PADDING + baselineArrowSize;
|
|
10227
10281
|
break;
|
|
10228
10282
|
default: baselineX = (this.width - baselineWidth - baselineDescrWidth + baselineArrowSize) / 2;
|
|
10229
10283
|
}
|
|
@@ -10233,7 +10287,7 @@ var ScorecardChartConfigBuilder = class {
|
|
|
10233
10287
|
style: style.baselineValue,
|
|
10234
10288
|
position: {
|
|
10235
10289
|
x: baselineX,
|
|
10236
|
-
y: this.keyValue ? this.height * (1 - BOTTOM_PADDING_RATIO * (this.runtime.progressBar ? 1 : 2)) : this.height - (this.height - titleHeight - baselineHeight) / 2 -
|
|
10290
|
+
y: this.keyValue ? this.height * (1 - BOTTOM_PADDING_RATIO * (this.runtime.progressBar ? 1 : 2)) : this.height - (this.height - titleHeight - baselineHeight) / 2 - CHART_PADDING_BOTTOM
|
|
10237
10291
|
}
|
|
10238
10292
|
};
|
|
10239
10293
|
if (style.baselineArrow && !this.runtime.progressBar) structure.baselineArrow = {
|
|
@@ -10261,12 +10315,12 @@ var ScorecardChartConfigBuilder = class {
|
|
|
10261
10315
|
progressBarHeight = this.height * .05;
|
|
10262
10316
|
structure.progressBar = {
|
|
10263
10317
|
position: {
|
|
10264
|
-
x: 2 *
|
|
10318
|
+
x: 2 * CHART_PADDING,
|
|
10265
10319
|
y: this.height * (1 - 2 * BOTTOM_PADDING_RATIO) - baselineHeight - progressBarHeight
|
|
10266
10320
|
},
|
|
10267
10321
|
dimension: {
|
|
10268
10322
|
height: progressBarHeight,
|
|
10269
|
-
width: this.width - 4 *
|
|
10323
|
+
width: this.width - 4 * CHART_PADDING
|
|
10270
10324
|
},
|
|
10271
10325
|
value: this.runtime.progressBar.value,
|
|
10272
10326
|
style: {
|
|
@@ -10280,10 +10334,10 @@ var ScorecardChartConfigBuilder = class {
|
|
|
10280
10334
|
let keyX;
|
|
10281
10335
|
switch (this.runtime.keyValueStyle?.align) {
|
|
10282
10336
|
case "right":
|
|
10283
|
-
keyX = this.width -
|
|
10337
|
+
keyX = this.width - CHART_PADDING - keyDescrWidth - keyWidth;
|
|
10284
10338
|
break;
|
|
10285
10339
|
case "left":
|
|
10286
|
-
keyX =
|
|
10340
|
+
keyX = CHART_PADDING;
|
|
10287
10341
|
break;
|
|
10288
10342
|
default: keyX = (this.width - keyWidth - keyDescrWidth) / 2;
|
|
10289
10343
|
}
|
|
@@ -10291,8 +10345,8 @@ var ScorecardChartConfigBuilder = class {
|
|
|
10291
10345
|
text: this.keyValue,
|
|
10292
10346
|
style: style.keyValue,
|
|
10293
10347
|
position: {
|
|
10294
|
-
x: Math.max(
|
|
10295
|
-
y: this.height * (.5 - BOTTOM_PADDING_RATIO * 2) +
|
|
10348
|
+
x: Math.max(CHART_PADDING, keyX),
|
|
10349
|
+
y: this.height * (.5 - BOTTOM_PADDING_RATIO * 2) + CHART_PADDING_BOTTOM / 2 + (titleHeight + keyHeight / 2) / 2
|
|
10296
10350
|
}
|
|
10297
10351
|
};
|
|
10298
10352
|
if (structure.key && this.keyDescr) {
|
|
@@ -10349,14 +10403,14 @@ var ScorecardChartConfigBuilder = class {
|
|
|
10349
10403
|
};
|
|
10350
10404
|
}
|
|
10351
10405
|
getTextStyles() {
|
|
10352
|
-
const keyValueFontSize = this.runtime.keyValueStyle?.fontSize ??
|
|
10406
|
+
const keyValueFontSize = this.runtime.keyValueStyle?.fontSize ?? DEFAULT_SCORECARD_KEY_VALUE_FONT_SIZE;
|
|
10353
10407
|
const keyValueDescrFontSize = Math.floor(.9 * keyValueFontSize);
|
|
10354
|
-
let baselineValueFontSize = this.runtime.baselineStyle?.fontSize ??
|
|
10408
|
+
let baselineValueFontSize = this.runtime.baselineStyle?.fontSize ?? DEFAULT_SCORECARD_BASELINE_FONT_SIZE;
|
|
10355
10409
|
const baselineDescrFontSize = Math.floor(.9 * baselineValueFontSize);
|
|
10356
10410
|
if (this.runtime.progressBar) baselineValueFontSize /= 1.5;
|
|
10357
10411
|
return {
|
|
10358
10412
|
title: {
|
|
10359
|
-
font: getDefaultContextFont(this.runtime.title.fontSize ??
|
|
10413
|
+
font: getDefaultContextFont(this.runtime.title.fontSize ?? SCORECARD_CHART_TITLE_FONT_SIZE, this.runtime.title.bold, this.runtime.title.italic),
|
|
10360
10414
|
color: this.runtime.title.color ?? this.secondaryFontColor
|
|
10361
10415
|
},
|
|
10362
10416
|
keyValue: {
|
|
@@ -10845,35 +10899,35 @@ function getGaugeRenderingConfig(boundingRect, runtime, ctx) {
|
|
|
10845
10899
|
x: boundingRect.width / 2,
|
|
10846
10900
|
y: gaugeRect.y + gaugeRect.height - gaugeRect.height / 12
|
|
10847
10901
|
};
|
|
10848
|
-
let gaugeValueFontSize =
|
|
10902
|
+
let gaugeValueFontSize = GAUGE_DEFAULT_VALUE_FONT_SIZE;
|
|
10849
10903
|
if (gaugeRect.height < 300) gaugeValueFontSize = gaugeValueFontSize * (gaugeRect.height / 300);
|
|
10850
10904
|
const maxTextWidth = gaugeRect.width / 2;
|
|
10851
10905
|
const gaugeLabel = runtime.gaugeValue?.label || "-";
|
|
10852
10906
|
if (computeTextWidth(ctx, gaugeLabel, { fontSize: gaugeValueFontSize }, "px") > maxTextWidth) gaugeValueFontSize = getFontSizeMatchingWidth(maxTextWidth, gaugeValueFontSize, (fontSize) => computeTextWidth(ctx, gaugeLabel, { fontSize }, "px"));
|
|
10853
10907
|
const minLabelPosition = {
|
|
10854
10908
|
x: gaugeRect.x + gaugeArcWidth / 2,
|
|
10855
|
-
y: gaugeRect.y + gaugeRect.height +
|
|
10909
|
+
y: gaugeRect.y + gaugeRect.height + GAUGE_LABELS_FONT_SIZE
|
|
10856
10910
|
};
|
|
10857
10911
|
const maxLabelPosition = {
|
|
10858
10912
|
x: gaugeRect.x + gaugeRect.width - gaugeArcWidth / 2,
|
|
10859
|
-
y: gaugeRect.y + gaugeRect.height +
|
|
10913
|
+
y: gaugeRect.y + gaugeRect.height + GAUGE_LABELS_FONT_SIZE
|
|
10860
10914
|
};
|
|
10861
10915
|
const textColor = chartMutedFontColor(runtime.background);
|
|
10862
10916
|
const inflectionValues = getInflectionValues(runtime, gaugeRect, textColor, ctx);
|
|
10863
10917
|
let x = 0, titleWidth = 0, titleHeight = 0;
|
|
10864
10918
|
if (runtime.title.text) ({width: titleWidth, height: titleHeight} = computeTextDimension(ctx, runtime.title.text, {
|
|
10865
|
-
fontSize:
|
|
10919
|
+
fontSize: CHART_TITLE_FONT_SIZE,
|
|
10866
10920
|
...runtime.title
|
|
10867
10921
|
}, "px"));
|
|
10868
10922
|
switch (runtime.title.align) {
|
|
10869
10923
|
case "right":
|
|
10870
|
-
x = boundingRect.width - titleWidth -
|
|
10924
|
+
x = boundingRect.width - titleWidth - CHART_PADDING;
|
|
10871
10925
|
break;
|
|
10872
10926
|
case "center":
|
|
10873
10927
|
x = (boundingRect.width - titleWidth) / 2;
|
|
10874
10928
|
break;
|
|
10875
10929
|
default:
|
|
10876
|
-
x =
|
|
10930
|
+
x = CHART_PADDING;
|
|
10877
10931
|
break;
|
|
10878
10932
|
}
|
|
10879
10933
|
return {
|
|
@@ -10881,10 +10935,10 @@ function getGaugeRenderingConfig(boundingRect, runtime, ctx) {
|
|
|
10881
10935
|
height: boundingRect.height,
|
|
10882
10936
|
title: {
|
|
10883
10937
|
label: runtime.title.text ?? "",
|
|
10884
|
-
fontSize: runtime.title.fontSize ??
|
|
10938
|
+
fontSize: runtime.title.fontSize ?? CHART_TITLE_FONT_SIZE,
|
|
10885
10939
|
textPosition: {
|
|
10886
10940
|
x,
|
|
10887
|
-
y:
|
|
10941
|
+
y: CHART_PADDING_TOP + titleHeight / 2
|
|
10888
10942
|
},
|
|
10889
10943
|
color: runtime.title.color ?? textColor,
|
|
10890
10944
|
bold: runtime.title.bold,
|
|
@@ -10907,13 +10961,13 @@ function getGaugeRenderingConfig(boundingRect, runtime, ctx) {
|
|
|
10907
10961
|
minLabel: {
|
|
10908
10962
|
label: runtime.minValue.label,
|
|
10909
10963
|
textPosition: minLabelPosition,
|
|
10910
|
-
fontSize:
|
|
10964
|
+
fontSize: GAUGE_LABELS_FONT_SIZE,
|
|
10911
10965
|
color: textColor
|
|
10912
10966
|
},
|
|
10913
10967
|
maxLabel: {
|
|
10914
10968
|
label: runtime.maxValue.label,
|
|
10915
10969
|
textPosition: maxLabelPosition,
|
|
10916
|
-
fontSize:
|
|
10970
|
+
fontSize: GAUGE_LABELS_FONT_SIZE,
|
|
10917
10971
|
color: textColor
|
|
10918
10972
|
}
|
|
10919
10973
|
};
|
|
@@ -10923,9 +10977,9 @@ function getGaugeRenderingConfig(boundingRect, runtime, ctx) {
|
|
|
10923
10977
|
* space for the title and labels.
|
|
10924
10978
|
*/
|
|
10925
10979
|
function getGaugeRect(boundingRect, title) {
|
|
10926
|
-
const titleHeight = title ?
|
|
10927
|
-
const drawHeight = boundingRect.height -
|
|
10928
|
-
const drawWidth = boundingRect.width -
|
|
10980
|
+
const titleHeight = title ? GAUGE_TITLE_SECTION_HEIGHT : 0;
|
|
10981
|
+
const drawHeight = boundingRect.height - GAUGE_PADDING_BOTTOM - titleHeight - GAUGE_PADDING_TOP;
|
|
10982
|
+
const drawWidth = boundingRect.width - GAUGE_PADDING_SIDE * 2;
|
|
10929
10983
|
let gaugeWidth;
|
|
10930
10984
|
let gaugeHeight;
|
|
10931
10985
|
if (drawWidth > 2 * drawHeight) {
|
|
@@ -10936,8 +10990,8 @@ function getGaugeRect(boundingRect, title) {
|
|
|
10936
10990
|
gaugeHeight = drawWidth / 2;
|
|
10937
10991
|
}
|
|
10938
10992
|
return {
|
|
10939
|
-
x:
|
|
10940
|
-
y: titleHeight +
|
|
10993
|
+
x: GAUGE_PADDING_SIDE + (drawWidth - gaugeWidth) / 2,
|
|
10994
|
+
y: titleHeight + GAUGE_PADDING_TOP + (drawHeight - gaugeHeight) / 2,
|
|
10941
10995
|
width: gaugeWidth,
|
|
10942
10996
|
height: gaugeHeight
|
|
10943
10997
|
};
|
|
@@ -10954,20 +11008,20 @@ function getInflectionValues(runtime, gaugeRect, textColor, ctx) {
|
|
|
10954
11008
|
x: gaugeRect.x + gaugeRect.width / 2,
|
|
10955
11009
|
y: gaugeRect.y + gaugeRect.height
|
|
10956
11010
|
};
|
|
10957
|
-
const textStyle = { fontSize:
|
|
11011
|
+
const textStyle = { fontSize: GAUGE_LABELS_FONT_SIZE };
|
|
10958
11012
|
const inflectionValues = [];
|
|
10959
11013
|
const inflectionValuesTextRects = [];
|
|
10960
11014
|
for (const inflectionValue of runtime.inflectionValues) {
|
|
10961
11015
|
const percentage = (inflectionValue.value - minValue.value) / (maxValue.value - minValue.value);
|
|
10962
11016
|
const labelWidth = computeTextWidth(ctx, inflectionValue.label, textStyle, "px");
|
|
10963
11017
|
const angle = Math.PI - Math.PI * percentage;
|
|
10964
|
-
const textRect = getRectangleTangentToCircle(angle, gaugeRect.height + GAUGE_INFLECTION_LABEL_BOTTOM_MARGIN, gaugeCircleCenter.x, gaugeCircleCenter.y, labelWidth + 2,
|
|
10965
|
-
const offset = inflectionValuesTextRects.some((rect) => doRectanglesIntersect(rect, textRect)) ?
|
|
11018
|
+
const textRect = getRectangleTangentToCircle(angle, gaugeRect.height + GAUGE_INFLECTION_LABEL_BOTTOM_MARGIN, gaugeCircleCenter.x, gaugeCircleCenter.y, labelWidth + 2, GAUGE_LABELS_FONT_SIZE);
|
|
11019
|
+
const offset = inflectionValuesTextRects.some((rect) => doRectanglesIntersect(rect, textRect)) ? GAUGE_LABELS_FONT_SIZE : 0;
|
|
10966
11020
|
inflectionValuesTextRects.push(textRect);
|
|
10967
11021
|
inflectionValues.push({
|
|
10968
11022
|
rotation: angle,
|
|
10969
11023
|
label: inflectionValue.label,
|
|
10970
|
-
fontSize:
|
|
11024
|
+
fontSize: GAUGE_LABELS_FONT_SIZE,
|
|
10971
11025
|
color: textColor,
|
|
10972
11026
|
offset
|
|
10973
11027
|
});
|
|
@@ -11697,7 +11751,7 @@ function predictLinearValues(Y, X, newX, computeIntercept) {
|
|
|
11697
11751
|
});
|
|
11698
11752
|
return newY.length === newX.length ? newY : transposeMatrix(newY);
|
|
11699
11753
|
}
|
|
11700
|
-
function getMovingAverageValues(dataset, labels, windowSize =
|
|
11754
|
+
function getMovingAverageValues(dataset, labels, windowSize = DEFAULT_WINDOW_SIZE) {
|
|
11701
11755
|
const values = [];
|
|
11702
11756
|
for (let i = 0; i < windowSize - 1; i++) values.push({
|
|
11703
11757
|
x: labels[i],
|
|
@@ -13331,19 +13385,19 @@ function getTopPaddingForDashboard(definition, getters) {
|
|
|
13331
13385
|
//#region src/helpers/figures/charts/runtime/chartjs_layout.ts
|
|
13332
13386
|
function getChartLayout(definition, args) {
|
|
13333
13387
|
return { padding: {
|
|
13334
|
-
left:
|
|
13335
|
-
right:
|
|
13336
|
-
top: Math.max(
|
|
13337
|
-
bottom:
|
|
13388
|
+
left: CHART_PADDING,
|
|
13389
|
+
right: CHART_PADDING,
|
|
13390
|
+
top: Math.max(CHART_PADDING_TOP, args.topPadding || 0),
|
|
13391
|
+
bottom: CHART_PADDING_BOTTOM
|
|
13338
13392
|
} };
|
|
13339
13393
|
}
|
|
13340
13394
|
function getCalendarChartLayout(definition, args) {
|
|
13341
13395
|
const legendPosition = definition.legendPosition;
|
|
13342
13396
|
return { padding: {
|
|
13343
|
-
left:
|
|
13344
|
-
right:
|
|
13345
|
-
top: Math.max(
|
|
13346
|
-
bottom:
|
|
13397
|
+
left: CHART_PADDING + (legendPosition === "left" ? CHART_COLORSCALE_WIDTH : 0),
|
|
13398
|
+
right: CHART_PADDING + (legendPosition === "right" ? CHART_COLORSCALE_WIDTH : 0),
|
|
13399
|
+
top: Math.max(CHART_PADDING_TOP, args.topPadding || 0),
|
|
13400
|
+
bottom: CHART_PADDING_BOTTOM
|
|
13347
13401
|
} };
|
|
13348
13402
|
}
|
|
13349
13403
|
|
|
@@ -13420,9 +13474,9 @@ function getComboChartLegend(definition, args) {
|
|
|
13420
13474
|
}
|
|
13421
13475
|
function getWaterfallChartLegend(definition, args) {
|
|
13422
13476
|
const fontColor = chartFontColor(definition.background);
|
|
13423
|
-
const negativeColor = definition.negativeValuesColor ||
|
|
13424
|
-
const positiveColor = definition.positiveValuesColor ||
|
|
13425
|
-
const subTotalColor = definition.subTotalValuesColor ||
|
|
13477
|
+
const negativeColor = definition.negativeValuesColor || CHART_WATERFALL_NEGATIVE_COLOR;
|
|
13478
|
+
const positiveColor = definition.positiveValuesColor || CHART_WATERFALL_POSITIVE_COLOR;
|
|
13479
|
+
const subTotalColor = definition.subTotalValuesColor || CHART_WATERFALL_SUBTOTAL_COLOR;
|
|
13426
13480
|
return {
|
|
13427
13481
|
...getLegendDisplayOptions(definition, args),
|
|
13428
13482
|
labels: {
|
|
@@ -13661,11 +13715,11 @@ function getChartTitle(definition, getters) {
|
|
|
13661
13715
|
color: chartTitle?.color ?? fontColor,
|
|
13662
13716
|
align: chartTitle.align === "center" ? "center" : chartTitle.align === "right" ? "end" : "start",
|
|
13663
13717
|
font: {
|
|
13664
|
-
size: definition.title.fontSize ??
|
|
13718
|
+
size: definition.title.fontSize ?? CHART_TITLE_FONT_SIZE,
|
|
13665
13719
|
weight: chartTitle.bold ? "bold" : "normal",
|
|
13666
13720
|
style: chartTitle.italic ? "italic" : "normal"
|
|
13667
13721
|
},
|
|
13668
|
-
padding: { bottom: definition.legendPosition === "top" ? 0 :
|
|
13722
|
+
padding: { bottom: definition.legendPosition === "top" ? 0 : CHART_PADDING }
|
|
13669
13723
|
};
|
|
13670
13724
|
}
|
|
13671
13725
|
|
|
@@ -14182,7 +14236,7 @@ var BarChart = class BarChart extends AbstractChart {
|
|
|
14182
14236
|
const definition = this.getDefinition();
|
|
14183
14237
|
return {
|
|
14184
14238
|
...definition,
|
|
14185
|
-
backgroundColor: toXlsxHexColor(this.background ||
|
|
14239
|
+
backgroundColor: toXlsxHexColor(this.background || BACKGROUND_CHART_COLOR),
|
|
14186
14240
|
fontColor: toXlsxHexColor(chartFontColor(this.background)),
|
|
14187
14241
|
dataSets,
|
|
14188
14242
|
labelRange,
|
|
@@ -14701,7 +14755,7 @@ var LineChart = class LineChart extends AbstractChart {
|
|
|
14701
14755
|
const definition = this.getDefinition();
|
|
14702
14756
|
return {
|
|
14703
14757
|
...definition,
|
|
14704
|
-
backgroundColor: toXlsxHexColor(this.background ||
|
|
14758
|
+
backgroundColor: toXlsxHexColor(this.background || BACKGROUND_CHART_COLOR),
|
|
14705
14759
|
fontColor: toXlsxHexColor(chartFontColor(this.background)),
|
|
14706
14760
|
dataSets,
|
|
14707
14761
|
labelRange,
|
|
@@ -14826,7 +14880,7 @@ var PieChart = class PieChart extends AbstractChart {
|
|
|
14826
14880
|
const { dataSets, labelRange } = this.getCommonDataSetAttributesForExcel(this.labelRange, this.dataSets, shouldRemoveFirstLabel(this.labelRange, this.dataSets[0], this.dataSetsHaveTitle));
|
|
14827
14881
|
return {
|
|
14828
14882
|
...this.getDefinition(),
|
|
14829
|
-
backgroundColor: toXlsxHexColor(this.background ||
|
|
14883
|
+
backgroundColor: toXlsxHexColor(this.background || BACKGROUND_CHART_COLOR),
|
|
14830
14884
|
fontColor: toXlsxHexColor(chartFontColor(this.background)),
|
|
14831
14885
|
dataSets,
|
|
14832
14886
|
labelRange
|
|
@@ -15026,7 +15080,7 @@ var charts_exports = /* @__PURE__ */ __exportAll({
|
|
|
15026
15080
|
PieChart: () => PieChart,
|
|
15027
15081
|
SPREADSHEET_TO_EXCEL_TRENDLINE_TYPE_MAPPING: () => SPREADSHEET_TO_EXCEL_TRENDLINE_TYPE_MAPPING,
|
|
15028
15082
|
ScorecardChart: () => ScorecardChart$1,
|
|
15029
|
-
TREND_LINE_XAXIS_ID: () =>
|
|
15083
|
+
TREND_LINE_XAXIS_ID: () => TREND_LINE_XAXIS_ID,
|
|
15030
15084
|
WaterfallChart: () => WaterfallChart,
|
|
15031
15085
|
adaptChartRange: () => adaptChartRange,
|
|
15032
15086
|
chartFactory: () => chartFactory,
|
|
@@ -15427,7 +15481,7 @@ function getElementMargins(el) {
|
|
|
15427
15481
|
|
|
15428
15482
|
//#endregion
|
|
15429
15483
|
//#region src/components/figures/chart/chartJs/zoomable_chart/zoomable_chart_store.ts
|
|
15430
|
-
const TREND_LINE_AXES_IDS = [
|
|
15484
|
+
const TREND_LINE_AXES_IDS = [TREND_LINE_XAXIS_ID, MOVING_AVERAGE_TREND_LINE_XAXIS_ID];
|
|
15431
15485
|
const ZOOMABLE_AXIS_IDS = ["x", ...TREND_LINE_AXES_IDS];
|
|
15432
15486
|
var ZoomableChartStore = class extends SpreadsheetStore {
|
|
15433
15487
|
mutators = [
|
|
@@ -15524,7 +15578,7 @@ var ZoomableChartJsComponent = class extends ChartJsComponent {
|
|
|
15524
15578
|
this.removeEventListeners();
|
|
15525
15579
|
}
|
|
15526
15580
|
get containerStyle() {
|
|
15527
|
-
return cssPropertiesToCss({ height: this.sliceable ? `calc(100% - ${
|
|
15581
|
+
return cssPropertiesToCss({ height: this.sliceable ? `calc(100% - ${MASTER_CHART_HEIGHT}px)` : "100%" });
|
|
15528
15582
|
}
|
|
15529
15583
|
get masterChartContainerStyle() {
|
|
15530
15584
|
const runtime = this.env.model.getters.getChartRuntime(this.props.chartId);
|
|
@@ -15583,8 +15637,8 @@ var ZoomableChartJsComponent = class extends ChartJsComponent {
|
|
|
15583
15637
|
getAxisLimitsFromDataset(chartData) {
|
|
15584
15638
|
const xValues = chartData.data.datasets.map((ds) => ds.data).flat().map((d, i) => typeof d === "object" && d !== null ? d.x : i);
|
|
15585
15639
|
return {
|
|
15586
|
-
min:
|
|
15587
|
-
max:
|
|
15640
|
+
min: largeMin(xValues),
|
|
15641
|
+
max: largeMax(xValues)
|
|
15588
15642
|
};
|
|
15589
15643
|
}
|
|
15590
15644
|
setMasterChartCursor(runtime) {
|
|
@@ -15670,7 +15724,7 @@ var ZoomableChartJsComponent = class extends ChartJsComponent {
|
|
|
15670
15724
|
updateTrendingLineAxes() {
|
|
15671
15725
|
this.store.updateTrendLineConfiguration(this.chartId);
|
|
15672
15726
|
const limits = this.store.currentAxesLimits[this.chartId];
|
|
15673
|
-
for (const axisId of [
|
|
15727
|
+
for (const axisId of [TREND_LINE_XAXIS_ID, MOVING_AVERAGE_TREND_LINE_XAXIS_ID]) {
|
|
15674
15728
|
if (!this.chart?.config?.options?.scales?.[axisId] || !limits?.[axisId]) continue;
|
|
15675
15729
|
this.chart.config.options.scales[axisId].min = limits[axisId].min;
|
|
15676
15730
|
this.chart.config.options.scales[axisId].max = limits[axisId].max;
|
|
@@ -16909,7 +16963,7 @@ var MenuPopover = class MenuPopover extends Component {
|
|
|
16909
16963
|
onClickMenu: this.onClickMenu.bind(this),
|
|
16910
16964
|
onMouseOver: this.onMouseOver.bind(this),
|
|
16911
16965
|
onMouseLeave: this.onMouseLeave.bind(this),
|
|
16912
|
-
width: this.props.width ||
|
|
16966
|
+
width: this.props.width || MENU_WIDTH,
|
|
16913
16967
|
isActive: this.isActive.bind(this),
|
|
16914
16968
|
onScroll: this.onScroll.bind(this)
|
|
16915
16969
|
};
|
|
@@ -16925,11 +16979,11 @@ var MenuPopover = class MenuPopover extends Component {
|
|
|
16925
16979
|
anchorRect: {
|
|
16926
16980
|
x: this.props.anchorRect.x,
|
|
16927
16981
|
y: this.props.anchorRect.y,
|
|
16928
|
-
width: isRoot ? this.props.anchorRect.width : this.props.width ||
|
|
16929
|
-
height: isRoot ? this.props.anchorRect.height :
|
|
16982
|
+
width: isRoot ? this.props.anchorRect.width : this.props.width || MENU_WIDTH,
|
|
16983
|
+
height: isRoot ? this.props.anchorRect.height : DESKTOP_MENU_ITEM_HEIGHT
|
|
16930
16984
|
},
|
|
16931
16985
|
positioning: this.props.popoverPositioning,
|
|
16932
|
-
verticalOffset: isRoot ? 0 :
|
|
16986
|
+
verticalOffset: isRoot ? 0 : MENU_VERTICAL_PADDING,
|
|
16933
16987
|
onPopoverHidden: () => this.closeSubMenu(),
|
|
16934
16988
|
onPopoverMoved: () => this.closeSubMenu(),
|
|
16935
16989
|
maxHeight: this.props.maxHeight
|
|
@@ -16992,8 +17046,8 @@ var MenuPopover = class MenuPopover extends Component {
|
|
|
16992
17046
|
this.subMenu.anchorRect = {
|
|
16993
17047
|
x: getRefBoundingRect(this.menuRef).x,
|
|
16994
17048
|
y: y - (this.subMenu.scrollOffset || 0),
|
|
16995
|
-
width: this.props.width ||
|
|
16996
|
-
height:
|
|
17049
|
+
width: this.props.width || MENU_WIDTH,
|
|
17050
|
+
height: DESKTOP_MENU_ITEM_HEIGHT
|
|
16997
17051
|
};
|
|
16998
17052
|
this.subMenu.menuItems = menu.children(this.env);
|
|
16999
17053
|
this.subMenu.isOpen = true;
|
|
@@ -17064,7 +17118,7 @@ var ChartDashboardMenu = class extends Component {
|
|
|
17064
17118
|
return [this.fullScreenMenuItem].filter(isDefined);
|
|
17065
17119
|
}
|
|
17066
17120
|
get backgroundColor() {
|
|
17067
|
-
return "background-color: " + (this.env.model.getters.getChartDefinition(this.props.chartId).background ||
|
|
17121
|
+
return "background-color: " + (this.env.model.getters.getChartDefinition(this.props.chartId).background || BACKGROUND_CHART_COLOR);
|
|
17068
17122
|
}
|
|
17069
17123
|
openContextMenu(ev) {
|
|
17070
17124
|
this.menuState.isOpen = true;
|
|
@@ -17172,7 +17226,7 @@ var CarouselFigure = class extends Component {
|
|
|
17172
17226
|
if (this.selectedCarouselItem?.type === "chart") {
|
|
17173
17227
|
const chart = this.env.model.getters.getChartRuntime(this.selectedCarouselItem.chartId);
|
|
17174
17228
|
if ("background" in chart && chart.background) cssProperties["background-color"] = chart.background;
|
|
17175
|
-
else if ("chartJsConfig" in chart) cssProperties["background-color"] = chart.chartJsConfig.options?.plugins?.background?.color ||
|
|
17229
|
+
else if ("chartJsConfig" in chart) cssProperties["background-color"] = chart.chartJsConfig.options?.plugins?.background?.color || BACKGROUND_CHART_COLOR;
|
|
17176
17230
|
} else cssProperties["background-color"] = BACKGROUND_CHART_COLOR;
|
|
17177
17231
|
return cssPropertiesToCss(cssProperties);
|
|
17178
17232
|
}
|
|
@@ -24158,7 +24212,7 @@ const PIVOT = {
|
|
|
24158
24212
|
const error = pivot.assertIsValid({ throwOnError: false });
|
|
24159
24213
|
if (error) return error;
|
|
24160
24214
|
const table = pivot.getCollapsedTableStructure();
|
|
24161
|
-
if (table.numberOfCells >
|
|
24215
|
+
if (table.numberOfCells > PIVOT_MAX_NUMBER_OF_CELLS) return new EvaluationError(getPivotTooBigErrorMessage(table.numberOfCells, this.locale));
|
|
24162
24216
|
const cells = table.getPivotCells(pivotStyle);
|
|
24163
24217
|
let headerRows = 0;
|
|
24164
24218
|
if (pivotStyle.displayColumnHeaders) headerRows = table.columns.length - 1;
|
|
@@ -25989,7 +26043,7 @@ function getCaretDownSvg(color) {
|
|
|
25989
26043
|
width: 512,
|
|
25990
26044
|
height: 512,
|
|
25991
26045
|
paths: [{
|
|
25992
|
-
fillColor: color.textColor ||
|
|
26046
|
+
fillColor: color.textColor || TEXT_BODY_MUTED,
|
|
25993
26047
|
path: CARET_DOWN_PATH
|
|
25994
26048
|
}]
|
|
25995
26049
|
};
|
|
@@ -26000,7 +26054,7 @@ function getCaretUpSvg(color) {
|
|
|
26000
26054
|
width: 512,
|
|
26001
26055
|
height: 512,
|
|
26002
26056
|
paths: [{
|
|
26003
|
-
fillColor: color.textColor ||
|
|
26057
|
+
fillColor: color.textColor || TEXT_BODY_MUTED,
|
|
26004
26058
|
path: CARET_UP_PATH
|
|
26005
26059
|
}]
|
|
26006
26060
|
};
|
|
@@ -26011,7 +26065,7 @@ function getHoveredCaretDownSvg(color) {
|
|
|
26011
26065
|
width: 512,
|
|
26012
26066
|
height: 512,
|
|
26013
26067
|
paths: [{
|
|
26014
|
-
fillColor: color.textColor ||
|
|
26068
|
+
fillColor: color.textColor || TEXT_BODY_MUTED,
|
|
26015
26069
|
path: HOVERED_CARET_DOWN_PATH
|
|
26016
26070
|
}, {
|
|
26017
26071
|
fillColor: color.fillColor || "#fff",
|
|
@@ -26774,7 +26828,7 @@ function extractStyle(data, content, styleId, formatId, borderId) {
|
|
|
26774
26828
|
alignment: {
|
|
26775
26829
|
horizontal: style.align,
|
|
26776
26830
|
vertical: style.verticalAlign ? V_ALIGNMENT_EXPORT_CONVERSION_MAP[style.verticalAlign] : void 0,
|
|
26777
|
-
wrapText: style.wrapping === "wrap" || content?.includes(
|
|
26831
|
+
wrapText: style.wrapping === "wrap" || content?.includes(NEWLINE) ? true : void 0,
|
|
26778
26832
|
textRotation: style.rotation ? rotationToXLSX(style.rotation) : void 0,
|
|
26779
26833
|
shrinkToFit: style.wrapping === "clip" ? true : void 0
|
|
26780
26834
|
}
|
|
@@ -26815,7 +26869,7 @@ function normalizeStyle(construct, styles) {
|
|
|
26815
26869
|
function convertFormat(format, numFmtStructure) {
|
|
26816
26870
|
if (!format) return 0;
|
|
26817
26871
|
let formatId = XLSX_FORMAT_MAP[format.format];
|
|
26818
|
-
if (!formatId) formatId = pushElement(format, numFmtStructure) +
|
|
26872
|
+
if (!formatId) formatId = pushElement(format, numFmtStructure) + FIRST_NUMFMT_ID;
|
|
26819
26873
|
return formatId;
|
|
26820
26874
|
}
|
|
26821
26875
|
/**
|
|
@@ -27398,14 +27452,14 @@ function convertExcelTrendline(trend) {
|
|
|
27398
27452
|
type: trend.type === "linear" ? "polynomial" : EXCEL_TO_SPREADSHEET_TRENDLINE_TYPE_MAPPING[trend.type],
|
|
27399
27453
|
order: trend.type === "linear" ? 1 : trend.order,
|
|
27400
27454
|
color: trend.color,
|
|
27401
|
-
window: trend.window ||
|
|
27455
|
+
window: trend.window || DEFAULT_WINDOW_SIZE,
|
|
27402
27456
|
display: true
|
|
27403
27457
|
};
|
|
27404
27458
|
}
|
|
27405
27459
|
function convertAnchor(XLSXanchor) {
|
|
27406
27460
|
const offset = {
|
|
27407
|
-
x: convertEMUToDotValue(XLSXanchor.colOffset) -
|
|
27408
|
-
y: convertEMUToDotValue(XLSXanchor.rowOffset) -
|
|
27461
|
+
x: convertEMUToDotValue(XLSXanchor.colOffset) - FIGURE_BORDER_WIDTH,
|
|
27462
|
+
y: convertEMUToDotValue(XLSXanchor.rowOffset) - FIGURE_BORDER_WIDTH
|
|
27409
27463
|
};
|
|
27410
27464
|
return {
|
|
27411
27465
|
col: XLSXanchor.col,
|
|
@@ -27757,8 +27811,8 @@ function getSheetDims(sheet) {
|
|
|
27757
27811
|
dims[0] = Math.max(dims[0], fig.anchors[fig.anchors.length - 1]?.col ?? 0);
|
|
27758
27812
|
dims[1] = Math.max(dims[1], fig.anchors[fig.anchors.length - 1]?.row ?? 0);
|
|
27759
27813
|
}
|
|
27760
|
-
dims[0] = Math.max(dims[0] + 5,
|
|
27761
|
-
dims[1] = Math.max(dims[1] + 5,
|
|
27814
|
+
dims[0] = Math.max(dims[0] + 5, EXCEL_IMPORT_DEFAULT_NUMBER_OF_COLS);
|
|
27815
|
+
dims[1] = Math.max(dims[1] + 5, EXCEL_IMPORT_DEFAULT_NUMBER_OF_ROWS);
|
|
27762
27816
|
return dims;
|
|
27763
27817
|
}
|
|
27764
27818
|
/**
|
|
@@ -28924,7 +28978,7 @@ var XlsxBaseExtractor = class {
|
|
|
28924
28978
|
rgb = this.getThemeColor(themeIndex, theme.clrScheme);
|
|
28925
28979
|
} else {
|
|
28926
28980
|
rgb = this.extractAttr(colorElement, "rgb")?.asString();
|
|
28927
|
-
rgb = rgb ===
|
|
28981
|
+
rgb = rgb === DEFAULT_SYSTEM_COLOR ? void 0 : rgb;
|
|
28928
28982
|
}
|
|
28929
28983
|
return {
|
|
28930
28984
|
rgb: rgb || defaultColor,
|
|
@@ -30043,7 +30097,7 @@ function getPathsOfContent(contentType, xmls) {
|
|
|
30043
30097
|
* Get the corresponding relationship file for a given xml file in a XLSX directory.
|
|
30044
30098
|
*/
|
|
30045
30099
|
function getRelationFile(file, xmls) {
|
|
30046
|
-
if (file ===
|
|
30100
|
+
if (file === CONTENT_TYPES_FILE) return "_rels/.rels";
|
|
30047
30101
|
let relsFile = "";
|
|
30048
30102
|
const pathParts = file.split("/");
|
|
30049
30103
|
for (let i = 0; i < pathParts.length - 1; i++) relsFile += pathParts[i] + "/";
|
|
@@ -30153,7 +30207,7 @@ function normalizeV9(formula) {
|
|
|
30153
30207
|
if (token.type === "REFERENCE" && cellReference.test(token.value)) {
|
|
30154
30208
|
const value = token.value.trim();
|
|
30155
30209
|
if (!dependencies.includes(value)) dependencies.push(value);
|
|
30156
|
-
return `${
|
|
30210
|
+
return `${FORMULA_REF_IDENTIFIER}${dependencies.indexOf(value)}${FORMULA_REF_IDENTIFIER}`;
|
|
30157
30211
|
} else return token.value;
|
|
30158
30212
|
})),
|
|
30159
30213
|
dependencies
|
|
@@ -30349,7 +30403,7 @@ migrationStepRegistry.add("0.1", { migrate(data) {
|
|
|
30349
30403
|
if (cell.formula) {
|
|
30350
30404
|
let { text, dependencies } = cell.formula;
|
|
30351
30405
|
for (const [index, d] of Object.entries(dependencies)) {
|
|
30352
|
-
const stringPosition = `\\${
|
|
30406
|
+
const stringPosition = `\\${FORMULA_REF_IDENTIFIER}${index}\\${FORMULA_REF_IDENTIFIER}`;
|
|
30353
30407
|
text = text.replace(new RegExp(stringPosition, "g"), d);
|
|
30354
30408
|
}
|
|
30355
30409
|
cell.content = text;
|
|
@@ -32122,12 +32176,12 @@ var ContentEditableHelper = class {
|
|
|
32122
32176
|
for (let current = it.next(); !current.done; current = it.next()) {
|
|
32123
32177
|
if (current.value.nodeName === "P" || current.value.nodeName === "DIV" && current.value !== this.el) {
|
|
32124
32178
|
if (isFirstParagraph) isFirstParagraph = false;
|
|
32125
|
-
else text +=
|
|
32179
|
+
else text += NEWLINE;
|
|
32126
32180
|
emptyParagraph = isEmptyParagraph(current.value);
|
|
32127
32181
|
continue;
|
|
32128
32182
|
}
|
|
32129
32183
|
if (!current.value.hasChildNodes()) {
|
|
32130
|
-
if (current.value.nodeName === "BR" && !emptyParagraph) text +=
|
|
32184
|
+
if (current.value.nodeName === "BR" && !emptyParagraph) text += NEWLINE;
|
|
32131
32185
|
text += current.value.textContent;
|
|
32132
32186
|
}
|
|
32133
32187
|
}
|
|
@@ -32361,7 +32415,7 @@ var Composer = class extends Component {
|
|
|
32361
32415
|
if (cellX + ASSISTANT_WIDTH > this.props.delimitation.width) assistantStyle.right = `0px`;
|
|
32362
32416
|
} else {
|
|
32363
32417
|
assistantStyle["max-height"] = `${this.spreadsheetRect.height - composerRect.bottom - 1}px`;
|
|
32364
|
-
if (composerRect.left + ASSISTANT_WIDTH +
|
|
32418
|
+
if (composerRect.left + ASSISTANT_WIDTH + SCROLLBAR_WIDTH + CLOSE_ICON_RADIUS > this.spreadsheetRect.width) assistantStyle.right = `${CLOSE_ICON_RADIUS}px`;
|
|
32365
32419
|
}
|
|
32366
32420
|
return assistantStyle;
|
|
32367
32421
|
}
|
|
@@ -32458,7 +32512,7 @@ var Composer = class extends Component {
|
|
|
32458
32512
|
const start = Math.min(selection.start, selection.end);
|
|
32459
32513
|
const end = Math.max(selection.start, selection.end);
|
|
32460
32514
|
this.props.composerStore.stopComposerRangeSelection();
|
|
32461
|
-
this.props.composerStore.setCurrentContent(content.slice(0, start) +
|
|
32515
|
+
this.props.composerStore.setCurrentContent(content.slice(0, start) + NEWLINE + content.slice(end), {
|
|
32462
32516
|
start: start + 1,
|
|
32463
32517
|
end: start + 1
|
|
32464
32518
|
});
|
|
@@ -32636,7 +32690,7 @@ var Composer = class extends Component {
|
|
|
32636
32690
|
const { end, start } = this.props.composerStore.composerSelection;
|
|
32637
32691
|
for (let index = 0; index < tokens.length; index++) {
|
|
32638
32692
|
const token = tokens[index];
|
|
32639
|
-
let color = token.color ||
|
|
32693
|
+
let color = token.color || DEFAULT_TOKEN_COLOR;
|
|
32640
32694
|
if (token.isBlurred) color = setColorAlpha(color, .5);
|
|
32641
32695
|
const classes = [];
|
|
32642
32696
|
if (token.type === "REFERENCE" && this.props.composerStore.tokenAtCursor === token && this.props.composerStore.editionMode === "selecting") classes.push("text-decoration-underline");
|
|
@@ -32667,8 +32721,8 @@ var Composer = class extends Component {
|
|
|
32667
32721
|
splitHtmlContentIntoLines(contents) {
|
|
32668
32722
|
const contentSplitInLines = [];
|
|
32669
32723
|
let currentLine = [];
|
|
32670
|
-
for (const content of contents) if (content.value.includes(
|
|
32671
|
-
const lines = content.value.split(
|
|
32724
|
+
for (const content of contents) if (content.value.includes(NEWLINE)) {
|
|
32725
|
+
const lines = content.value.split(NEWLINE);
|
|
32672
32726
|
const lastLine = lines.pop();
|
|
32673
32727
|
for (const line of lines) {
|
|
32674
32728
|
currentLine.push({
|
|
@@ -33293,7 +33347,7 @@ const autoCompleteProviders = new Registry();
|
|
|
33293
33347
|
function drawHighlight(renderingContext, highlight, rect) {
|
|
33294
33348
|
const { x, y, width, height } = rect;
|
|
33295
33349
|
if (width < 0 || height < 0) return;
|
|
33296
|
-
const color = highlight.color ||
|
|
33350
|
+
const color = highlight.color || HIGHLIGHT_COLOR;
|
|
33297
33351
|
const { ctx } = renderingContext;
|
|
33298
33352
|
ctx.save();
|
|
33299
33353
|
if (!highlight.noBorder) {
|
|
@@ -33860,7 +33914,7 @@ var AbstractComposerStore = class extends SpreadsheetStore {
|
|
|
33860
33914
|
getTokenColor(token) {
|
|
33861
33915
|
if (token.type === "REFERENCE") {
|
|
33862
33916
|
const { xc, sheetName } = splitReference(token.value);
|
|
33863
|
-
return this.rangeColor(xc, sheetName) ||
|
|
33917
|
+
return this.rangeColor(xc, sheetName) || DEFAULT_TOKEN_COLOR;
|
|
33864
33918
|
}
|
|
33865
33919
|
if (token.type === "SYMBOL") {
|
|
33866
33920
|
const upperCaseValue = token.value.toUpperCase();
|
|
@@ -33870,7 +33924,7 @@ var AbstractComposerStore = class extends SpreadsheetStore {
|
|
|
33870
33924
|
if (["LEFT_PAREN", "RIGHT_PAREN"].includes(token.type)) {
|
|
33871
33925
|
if (token.parenthesesCode === "") return tokenColors.ORPHAN_RIGHT_PAREN;
|
|
33872
33926
|
}
|
|
33873
|
-
return tokenColors[token.type] ||
|
|
33927
|
+
return tokenColors[token.type] || DEFAULT_TOKEN_COLOR;
|
|
33874
33928
|
}
|
|
33875
33929
|
rangeColor(xc, sheetName) {
|
|
33876
33930
|
const refSheet = sheetName ? this.model.getters.getSheetIdByName(sheetName) : this.sheetId;
|
|
@@ -34535,7 +34589,7 @@ var ColorPicker = class extends Component {
|
|
|
34535
34589
|
}
|
|
34536
34590
|
get sliderStyle() {
|
|
34537
34591
|
const hue = this.state.currentHslaColor?.h || 0;
|
|
34538
|
-
return cssPropertiesToCss({ "margin-left": `${clip(Math.round(hue / 360 * INNER_GRADIENT_WIDTH), 1, INNER_GRADIENT_WIDTH) -
|
|
34592
|
+
return cssPropertiesToCss({ "margin-left": `${clip(Math.round(hue / 360 * INNER_GRADIENT_WIDTH), 1, INNER_GRADIENT_WIDTH) - ICON_EDGE_LENGTH / 2}px` });
|
|
34539
34593
|
}
|
|
34540
34594
|
get pointerStyle() {
|
|
34541
34595
|
const { s, l } = this.state.currentHslaColor || {
|
|
@@ -36399,7 +36453,7 @@ var LinkDisplay = class extends Component {
|
|
|
36399
36453
|
col,
|
|
36400
36454
|
row
|
|
36401
36455
|
});
|
|
36402
|
-
const textColor = style?.textColor ===
|
|
36456
|
+
const textColor = style?.textColor === LINK_COLOR ? void 0 : style?.textColor;
|
|
36403
36457
|
this.env.model.dispatch("UPDATE_CELL", {
|
|
36404
36458
|
col,
|
|
36405
36459
|
row,
|
|
@@ -37409,8 +37463,8 @@ const CREATE_CHART = (env) => {
|
|
|
37409
37463
|
zones = getters.getSelectedZones();
|
|
37410
37464
|
}
|
|
37411
37465
|
const size = {
|
|
37412
|
-
width:
|
|
37413
|
-
height:
|
|
37466
|
+
width: DEFAULT_FIGURE_WIDTH,
|
|
37467
|
+
height: DEFAULT_FIGURE_HEIGHT
|
|
37414
37468
|
};
|
|
37415
37469
|
const { col, row, offset } = centerFigurePosition(getters, size);
|
|
37416
37470
|
if (env.model.dispatch("CREATE_CHART", {
|
|
@@ -37432,8 +37486,8 @@ const CREATE_CAROUSEL = (env) => {
|
|
|
37432
37486
|
const figureId = env.model.uuidGenerator.smallUuid();
|
|
37433
37487
|
const sheetId = getters.getActiveSheetId();
|
|
37434
37488
|
const size = {
|
|
37435
|
-
width:
|
|
37436
|
-
height:
|
|
37489
|
+
width: DEFAULT_FIGURE_WIDTH,
|
|
37490
|
+
height: DEFAULT_FIGURE_HEIGHT
|
|
37437
37491
|
};
|
|
37438
37492
|
const { col, row, offset } = centerFigurePosition(getters, size);
|
|
37439
37493
|
if (env.model.dispatch("CREATE_CAROUSEL", {
|
|
@@ -37483,7 +37537,7 @@ const REINSERT_STATIC_PIVOT_CHILDREN = (env) => env.model.getters.getPivotIds().
|
|
|
37483
37537
|
execute: (env) => {
|
|
37484
37538
|
const zone = env.model.getters.getSelectedZone();
|
|
37485
37539
|
const table = env.model.getters.getPivot(pivotId).getExpandedTableStructure();
|
|
37486
|
-
if (table.numberOfCells >
|
|
37540
|
+
if (table.numberOfCells > PIVOT_MAX_NUMBER_OF_CELLS) {
|
|
37487
37541
|
env.notifyUser({
|
|
37488
37542
|
type: "warning",
|
|
37489
37543
|
text: getPivotTooBigErrorMessage(table.numberOfCells, env.model.getters.getLocale()),
|
|
@@ -39208,7 +39262,7 @@ var AxisDesignEditor = class extends Component {
|
|
|
39208
39262
|
axesList: Array
|
|
39209
39263
|
};
|
|
39210
39264
|
state = useState({ currentAxis: "x" });
|
|
39211
|
-
defaultFontSize =
|
|
39265
|
+
defaultFontSize = CHART_AXIS_TITLE_FONT_SIZE;
|
|
39212
39266
|
get axisTitleStyle() {
|
|
39213
39267
|
return this.props.definition.axesDesign?.[this.state.currentAxis]?.title ?? {};
|
|
39214
39268
|
}
|
|
@@ -39284,7 +39338,7 @@ var GeneralDesignEditor = class extends Component {
|
|
|
39284
39338
|
optional: true
|
|
39285
39339
|
}
|
|
39286
39340
|
};
|
|
39287
|
-
static defaultProps = { defaultChartTitleFontSize:
|
|
39341
|
+
static defaultProps = { defaultChartTitleFontSize: CHART_TITLE_FONT_SIZE };
|
|
39288
39342
|
state;
|
|
39289
39343
|
setup() {
|
|
39290
39344
|
this.state = useState({ activeTool: "" });
|
|
@@ -39573,11 +39627,11 @@ var SeriesWithAxisDesignEditor = class extends Component {
|
|
|
39573
39627
|
return Math.min(10, runtime.chartJsConfig.data.datasets[index].data.length - 1);
|
|
39574
39628
|
}
|
|
39575
39629
|
get defaultWindowSize() {
|
|
39576
|
-
return
|
|
39630
|
+
return DEFAULT_WINDOW_SIZE;
|
|
39577
39631
|
}
|
|
39578
39632
|
onChangeMovingAverageWindow(index, value) {
|
|
39579
|
-
let window = parseInt(value) ||
|
|
39580
|
-
if (window <= 1) window =
|
|
39633
|
+
let window = parseInt(value) || DEFAULT_WINDOW_SIZE;
|
|
39634
|
+
if (window <= 1) window = DEFAULT_WINDOW_SIZE;
|
|
39581
39635
|
this.updateTrendLineValue(index, { window });
|
|
39582
39636
|
}
|
|
39583
39637
|
getDataSeriesColor(index) {
|
|
@@ -40327,7 +40381,7 @@ var PieChartDesignPanel = class extends Component {
|
|
|
40327
40381
|
});
|
|
40328
40382
|
}
|
|
40329
40383
|
get defaultHoleSize() {
|
|
40330
|
-
return
|
|
40384
|
+
return DEFAULT_DOUGHNUT_CHART_HOLE_SIZE;
|
|
40331
40385
|
}
|
|
40332
40386
|
};
|
|
40333
40387
|
|
|
@@ -40444,7 +40498,7 @@ var ScatterChart = class ScatterChart extends AbstractChart {
|
|
|
40444
40498
|
const definition = this.getDefinition();
|
|
40445
40499
|
return {
|
|
40446
40500
|
...definition,
|
|
40447
|
-
backgroundColor: toXlsxHexColor(this.background ||
|
|
40501
|
+
backgroundColor: toXlsxHexColor(this.background || BACKGROUND_CHART_COLOR),
|
|
40448
40502
|
fontColor: toXlsxHexColor(chartFontColor(this.background)),
|
|
40449
40503
|
dataSets,
|
|
40450
40504
|
labelRange,
|
|
@@ -40597,7 +40651,7 @@ var ScorecardChartDesignPanel = class extends Component {
|
|
|
40597
40651
|
return this.props.definition.baselineMode === "progress" ? _t("Progress bar colors") : _t("Baseline colors");
|
|
40598
40652
|
}
|
|
40599
40653
|
get defaultScorecardTitleFontSize() {
|
|
40600
|
-
return
|
|
40654
|
+
return SCORECARD_CHART_TITLE_FONT_SIZE;
|
|
40601
40655
|
}
|
|
40602
40656
|
translate(term) {
|
|
40603
40657
|
return this.env.model.getters.dynamicTranslate(term);
|
|
@@ -40618,14 +40672,14 @@ var ScorecardChartDesignPanel = class extends Component {
|
|
|
40618
40672
|
get keyStyle() {
|
|
40619
40673
|
return {
|
|
40620
40674
|
align: "center",
|
|
40621
|
-
fontSize:
|
|
40675
|
+
fontSize: DEFAULT_SCORECARD_KEY_VALUE_FONT_SIZE,
|
|
40622
40676
|
...this.props.definition.keyDescr
|
|
40623
40677
|
};
|
|
40624
40678
|
}
|
|
40625
40679
|
get baselineStyle() {
|
|
40626
40680
|
return {
|
|
40627
40681
|
align: "center",
|
|
40628
|
-
fontSize:
|
|
40682
|
+
fontSize: DEFAULT_SCORECARD_BASELINE_FONT_SIZE,
|
|
40629
40683
|
...this.props.definition.baselineDescr
|
|
40630
40684
|
};
|
|
40631
40685
|
}
|
|
@@ -40865,13 +40919,13 @@ var WaterfallChartDesignPanel = class extends Component {
|
|
|
40865
40919
|
}];
|
|
40866
40920
|
}
|
|
40867
40921
|
get positiveValuesColor() {
|
|
40868
|
-
return this.props.definition.positiveValuesColor ||
|
|
40922
|
+
return this.props.definition.positiveValuesColor || CHART_WATERFALL_POSITIVE_COLOR;
|
|
40869
40923
|
}
|
|
40870
40924
|
get negativeValuesColor() {
|
|
40871
|
-
return this.props.definition.negativeValuesColor ||
|
|
40925
|
+
return this.props.definition.negativeValuesColor || CHART_WATERFALL_NEGATIVE_COLOR;
|
|
40872
40926
|
}
|
|
40873
40927
|
get subTotalValuesColor() {
|
|
40874
|
-
return this.props.definition.subTotalValuesColor ||
|
|
40928
|
+
return this.props.definition.subTotalValuesColor || CHART_WATERFALL_SUBTOTAL_COLOR;
|
|
40875
40929
|
}
|
|
40876
40930
|
updateVerticalAxisPosition(value) {
|
|
40877
40931
|
this.props.updateChart(this.props.chartId, { verticalAxisPosition: value });
|
|
@@ -41258,7 +41312,7 @@ var ConditionalFormattingEditorStore = class extends SpreadsheetStore {
|
|
|
41258
41312
|
get previewGradient() {
|
|
41259
41313
|
const rule = this.state.rules.colorScale;
|
|
41260
41314
|
const minColor = colorNumberToHex(rule.minimum.color);
|
|
41261
|
-
const midColor = colorNumberToHex(rule.midpoint?.color ||
|
|
41315
|
+
const midColor = colorNumberToHex(rule.midpoint?.color || DEFAULT_COLOR_SCALE_MIDPOINT_COLOR);
|
|
41262
41316
|
const maxColor = colorNumberToHex(rule.maximum.color);
|
|
41263
41317
|
const baseString = "linear-gradient(to right, ";
|
|
41264
41318
|
return cssPropertiesToCss({
|
|
@@ -43219,7 +43273,7 @@ var PivotMeasureDisplayPanelStore = class extends SpreadsheetStore {
|
|
|
43219
43273
|
return {
|
|
43220
43274
|
type: measureDisplayType,
|
|
43221
43275
|
fieldNameWithGranularity,
|
|
43222
|
-
value: value ??
|
|
43276
|
+
value: value ?? PREVIOUS_VALUE
|
|
43223
43277
|
};
|
|
43224
43278
|
}
|
|
43225
43279
|
}
|
|
@@ -44819,7 +44873,7 @@ function getPreviousOrNextValueDomain(pivot, domain, fieldNameWithGranularity, d
|
|
|
44819
44873
|
if (value === void 0) return;
|
|
44820
44874
|
const valueIndex = values.indexOf(value);
|
|
44821
44875
|
if (value === void 0 || valueIndex === -1) return;
|
|
44822
|
-
return replaceFieldValueInDomain(domain, fieldNameWithGranularity, values[clip(valueIndex + (direction ===
|
|
44876
|
+
return replaceFieldValueInDomain(domain, fieldNameWithGranularity, values[clip(valueIndex + (direction === PREVIOUS_VALUE ? -1 : 1), 0, values.length - 1)]);
|
|
44823
44877
|
}
|
|
44824
44878
|
function domainToString(domain) {
|
|
44825
44879
|
return domain ? domain.map(domainNodeToString).join(", ") : "";
|
|
@@ -46026,7 +46080,7 @@ var PivotSidePanelStore = class extends SpreadsheetStore {
|
|
|
46026
46080
|
}
|
|
46027
46081
|
const pivot = this.getters.getPivot(this.pivotId);
|
|
46028
46082
|
const numberOfCells = pivot.isValid() ? pivot.getExpandedTableStructure().numberOfCells : 0;
|
|
46029
|
-
if (!this.alreadyNotifiedForPivotSize && numberOfCells >
|
|
46083
|
+
if (!this.alreadyNotifiedForPivotSize && numberOfCells > PIVOT_MAX_NUMBER_OF_CELLS) {
|
|
46030
46084
|
this.alreadyNotifiedForPivotSize = true;
|
|
46031
46085
|
this.notification.notifyUser({
|
|
46032
46086
|
type: "warning",
|
|
@@ -47857,7 +47911,7 @@ const SEPARATORS = [
|
|
|
47857
47911
|
},
|
|
47858
47912
|
{
|
|
47859
47913
|
label: _t("Line Break"),
|
|
47860
|
-
value:
|
|
47914
|
+
value: NEWLINE
|
|
47861
47915
|
}
|
|
47862
47916
|
];
|
|
47863
47917
|
var SplitIntoColumnsPanel = class extends Component {
|
|
@@ -48394,7 +48448,7 @@ var SidePanelStore = class extends SpreadsheetStore {
|
|
|
48394
48448
|
const newPanelInfo = {
|
|
48395
48449
|
currentPanelProps,
|
|
48396
48450
|
componentTag,
|
|
48397
|
-
size:
|
|
48451
|
+
size: DEFAULT_SIDE_PANEL_SIZE
|
|
48398
48452
|
};
|
|
48399
48453
|
const state = this.computeState(newPanelInfo);
|
|
48400
48454
|
if (!state.isOpen) return;
|
|
@@ -48402,8 +48456,8 @@ var SidePanelStore = class extends SpreadsheetStore {
|
|
|
48402
48456
|
this._openPanel("mainPanel", newPanelInfo, state);
|
|
48403
48457
|
return;
|
|
48404
48458
|
}
|
|
48405
|
-
const nonCollapsedPanelSize = this.mainPanel.isCollapsed ?
|
|
48406
|
-
if (!this.secondaryPanel && nonCollapsedPanelSize +
|
|
48459
|
+
const nonCollapsedPanelSize = this.mainPanel.isCollapsed ? DEFAULT_SIDE_PANEL_SIZE : this.mainPanel.size;
|
|
48460
|
+
if (!this.secondaryPanel && nonCollapsedPanelSize + DEFAULT_SIDE_PANEL_SIZE > this.availableWidth) {
|
|
48407
48461
|
this.get(NotificationStore).notifyUser({
|
|
48408
48462
|
sticky: false,
|
|
48409
48463
|
type: "warning",
|
|
@@ -48417,7 +48471,7 @@ var SidePanelStore = class extends SpreadsheetStore {
|
|
|
48417
48471
|
const newPanelInfo = {
|
|
48418
48472
|
currentPanelProps,
|
|
48419
48473
|
componentTag,
|
|
48420
|
-
size:
|
|
48474
|
+
size: DEFAULT_SIDE_PANEL_SIZE
|
|
48421
48475
|
};
|
|
48422
48476
|
const state = this.computeState(newPanelInfo);
|
|
48423
48477
|
if (!state.isOpen) return;
|
|
@@ -48446,7 +48500,7 @@ var SidePanelStore = class extends SpreadsheetStore {
|
|
|
48446
48500
|
this[panel] = {
|
|
48447
48501
|
currentPanelProps: state.props ?? {},
|
|
48448
48502
|
componentTag: newPanel.componentTag,
|
|
48449
|
-
size: currentPanel?.size ||
|
|
48503
|
+
size: currentPanel?.size || DEFAULT_SIDE_PANEL_SIZE,
|
|
48450
48504
|
isCollapsed: currentPanel?.isCollapsed || false,
|
|
48451
48505
|
isPinned: currentPanel && "isPinned" in currentPanel ? currentPanel.isPinned : false
|
|
48452
48506
|
};
|
|
@@ -48476,19 +48530,19 @@ var SidePanelStore = class extends SpreadsheetStore {
|
|
|
48476
48530
|
changePanelSize(panel, size) {
|
|
48477
48531
|
const panelInfo = this[panel];
|
|
48478
48532
|
if (!panelInfo || "isCollapsed" in panelInfo && panelInfo.isCollapsed) return;
|
|
48479
|
-
size = Math.max(size,
|
|
48533
|
+
size = Math.max(size, DEFAULT_SIDE_PANEL_SIZE);
|
|
48480
48534
|
let otherPanelSize = panel === "mainPanel" ? this.secondaryPanel?.size || 0 : this.mainPanel?.size || 0;
|
|
48481
48535
|
if (size > this.availableWidth - otherPanelSize) {
|
|
48482
48536
|
if (panel === "mainPanel" && this.secondaryPanel) {
|
|
48483
|
-
this.secondaryPanel.size = Math.max(this.availableWidth - size,
|
|
48537
|
+
this.secondaryPanel.size = Math.max(this.availableWidth - size, DEFAULT_SIDE_PANEL_SIZE);
|
|
48484
48538
|
otherPanelSize = this.secondaryPanel.size;
|
|
48485
48539
|
}
|
|
48486
|
-
size = Math.max(this.availableWidth - otherPanelSize,
|
|
48540
|
+
size = Math.max(this.availableWidth - otherPanelSize, DEFAULT_SIDE_PANEL_SIZE);
|
|
48487
48541
|
}
|
|
48488
48542
|
panelInfo.size = size;
|
|
48489
48543
|
}
|
|
48490
48544
|
resetPanelSize(panel) {
|
|
48491
|
-
if (this[panel]) this[panel].size =
|
|
48545
|
+
if (this[panel]) this[panel].size = DEFAULT_SIDE_PANEL_SIZE;
|
|
48492
48546
|
}
|
|
48493
48547
|
togglePinPanel() {
|
|
48494
48548
|
if (!this.mainPanel) return;
|
|
@@ -48504,10 +48558,10 @@ var SidePanelStore = class extends SpreadsheetStore {
|
|
|
48504
48558
|
if (!panelInfo) return;
|
|
48505
48559
|
if (panelInfo.isCollapsed) {
|
|
48506
48560
|
panelInfo.isCollapsed = false;
|
|
48507
|
-
this.changePanelSize(panel,
|
|
48561
|
+
this.changePanelSize(panel, DEFAULT_SIDE_PANEL_SIZE);
|
|
48508
48562
|
} else {
|
|
48509
48563
|
panelInfo.isCollapsed = true;
|
|
48510
|
-
panelInfo.size =
|
|
48564
|
+
panelInfo.size = COLLAPSED_SIDE_PANEL_SIZE;
|
|
48511
48565
|
}
|
|
48512
48566
|
}
|
|
48513
48567
|
computeState({ componentTag, currentPanelProps: initialPanelProps }) {
|
|
@@ -48522,12 +48576,12 @@ var SidePanelStore = class extends SpreadsheetStore {
|
|
|
48522
48576
|
} : state;
|
|
48523
48577
|
}
|
|
48524
48578
|
changeSpreadsheetWidth(width) {
|
|
48525
|
-
this.availableWidth = width -
|
|
48526
|
-
if (this.secondaryPanel && width - this.totalPanelSize <
|
|
48579
|
+
this.availableWidth = width - MIN_SHEET_VIEW_WIDTH;
|
|
48580
|
+
if (this.secondaryPanel && width - this.totalPanelSize < MIN_SHEET_VIEW_WIDTH) {
|
|
48527
48581
|
this.secondaryPanel?.currentPanelProps.onCloseSidePanel?.();
|
|
48528
48582
|
this.secondaryPanel = void 0;
|
|
48529
48583
|
}
|
|
48530
|
-
if (this.mainPanel && width - this.totalPanelSize <
|
|
48584
|
+
if (this.mainPanel && width - this.totalPanelSize < MIN_SHEET_VIEW_WIDTH) this.mainPanel.size = Math.max(width - MIN_SHEET_VIEW_WIDTH, DEFAULT_SIDE_PANEL_SIZE);
|
|
48531
48585
|
}
|
|
48532
48586
|
};
|
|
48533
48587
|
|
|
@@ -50153,7 +50207,7 @@ function useDragAndDropBeyondTheViewport(env) {
|
|
|
50153
50207
|
let { scrollX, scrollY } = getters.getActiveSheetScrollInfo();
|
|
50154
50208
|
const { xSplit, ySplit } = getters.getPaneDivisions(sheetId);
|
|
50155
50209
|
let canEdgeScroll = false;
|
|
50156
|
-
let timeoutDelay =
|
|
50210
|
+
let timeoutDelay = MAX_DELAY;
|
|
50157
50211
|
const x = zoomedMouseEvent.clientX - position.x;
|
|
50158
50212
|
let colIndex = getters.getColIndex(x);
|
|
50159
50213
|
if (scrollDirection !== "vertical") {
|
|
@@ -50549,7 +50603,7 @@ function fits(width, linkedString) {
|
|
|
50549
50603
|
return true;
|
|
50550
50604
|
}
|
|
50551
50605
|
function astToDoc(ast) {
|
|
50552
|
-
const debugPrefix = ast.debug ? `${
|
|
50606
|
+
const debugPrefix = ast.debug ? `${DEBUGGER_CHAR}` : "";
|
|
50553
50607
|
switch (ast.type) {
|
|
50554
50608
|
case "NUMBER": return debugPrefix + String(ast.value);
|
|
50555
50609
|
case "STRING": return debugPrefix + `"${ast.value}"`;
|
|
@@ -50628,7 +50682,7 @@ function wrapInBraces(doc) {
|
|
|
50628
50682
|
* Converts an ast formula to the corresponding string
|
|
50629
50683
|
*/
|
|
50630
50684
|
function astToFormula(ast) {
|
|
50631
|
-
const debugPrefix = ast.debug ? `${
|
|
50685
|
+
const debugPrefix = ast.debug ? `${DEBUGGER_CHAR}` : "";
|
|
50632
50686
|
switch (ast.type) {
|
|
50633
50687
|
case "FUNCALL":
|
|
50634
50688
|
const args = ast.args.map((arg) => astToFormula(arg));
|
|
@@ -51321,19 +51375,19 @@ function getAxis(getters, figureUI, dnd, axisType) {
|
|
|
51321
51375
|
position = y;
|
|
51322
51376
|
break;
|
|
51323
51377
|
case "bottom":
|
|
51324
|
-
position = y + figureUI.height -
|
|
51378
|
+
position = y + figureUI.height - FIGURE_BORDER_WIDTH;
|
|
51325
51379
|
break;
|
|
51326
51380
|
case "vCenter":
|
|
51327
|
-
position = y + Math.floor(figureUI.height / 2) -
|
|
51381
|
+
position = y + Math.floor(figureUI.height / 2) - FIGURE_BORDER_WIDTH;
|
|
51328
51382
|
break;
|
|
51329
51383
|
case "left":
|
|
51330
51384
|
position = x;
|
|
51331
51385
|
break;
|
|
51332
51386
|
case "right":
|
|
51333
|
-
position = x + figureUI.width -
|
|
51387
|
+
position = x + figureUI.width - FIGURE_BORDER_WIDTH;
|
|
51334
51388
|
break;
|
|
51335
51389
|
case "hCenter":
|
|
51336
|
-
position = x + Math.floor(figureUI.width / 2) -
|
|
51390
|
+
position = x + Math.floor(figureUI.width / 2) - FIGURE_BORDER_WIDTH;
|
|
51337
51391
|
break;
|
|
51338
51392
|
}
|
|
51339
51393
|
return {
|
|
@@ -51545,7 +51599,7 @@ var FiguresContainer = class extends Component {
|
|
|
51545
51599
|
};
|
|
51546
51600
|
const offsetX = Math.abs(currentMousePosition.x - initialMousePosition.x);
|
|
51547
51601
|
const offsetY = Math.abs(currentMousePosition.y - initialMousePosition.y);
|
|
51548
|
-
if (!hasStartedDnd && offsetX <
|
|
51602
|
+
if (!hasStartedDnd && offsetX < DRAG_THRESHOLD && offsetY < DRAG_THRESHOLD) return;
|
|
51549
51603
|
hasStartedDnd = true;
|
|
51550
51604
|
const draggedFigure = dragFigureForMove(currentMousePosition, initialMousePosition, initialFigure, maxDimensions, initialScrollPosition, getters.getActiveSheetScrollInfo());
|
|
51551
51605
|
const otherFigures = this.getOtherFigures(initialFigure.id);
|
|
@@ -51597,7 +51651,7 @@ var FiguresContainer = class extends Component {
|
|
|
51597
51651
|
ev.stopPropagation();
|
|
51598
51652
|
const initialScrollPosition = this.env.model.getters.getActiveSheetScrollInfo();
|
|
51599
51653
|
const keepRatio = figureRegistry.get(figureUI.tag).keepRatio || false;
|
|
51600
|
-
const minFigSize = figureRegistry.get(figureUI.tag).minFigSize ||
|
|
51654
|
+
const minFigSize = figureRegistry.get(figureUI.tag).minFigSize || MIN_FIG_SIZE;
|
|
51601
51655
|
const zoom = this.env.model.getters.getViewportZoomLevel();
|
|
51602
51656
|
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
51603
51657
|
const initialMousePosition = {
|
|
@@ -52166,7 +52220,7 @@ var GridOverlay = class extends Component {
|
|
|
52166
52220
|
get isFooterVisible() {
|
|
52167
52221
|
const { y } = this.env.model.getters.getMainViewportCoordinates();
|
|
52168
52222
|
const { height } = this.env.model.getters.getSheetViewDimension();
|
|
52169
|
-
return !this.env.model.getters.isReadonly() && height - y >
|
|
52223
|
+
return !this.env.model.getters.isReadonly() && height - y > FOOTER_HEIGHT;
|
|
52170
52224
|
}
|
|
52171
52225
|
};
|
|
52172
52226
|
|
|
@@ -52221,7 +52275,7 @@ var UnhideRowHeaders = class extends Component {
|
|
|
52221
52275
|
row: hiddenIndex
|
|
52222
52276
|
}));
|
|
52223
52277
|
return cssPropertiesToCss({
|
|
52224
|
-
top: rect.y + rect.height -
|
|
52278
|
+
top: rect.y + rect.height - HEADER_HEIGHT - this.props.offset + "px",
|
|
52225
52279
|
"margin-right": "1px"
|
|
52226
52280
|
});
|
|
52227
52281
|
}
|
|
@@ -52230,7 +52284,7 @@ var UnhideRowHeaders = class extends Component {
|
|
|
52230
52284
|
top: this.env.model.getters.getRect(positionToZone({
|
|
52231
52285
|
col: 0,
|
|
52232
52286
|
row: hiddenIndex
|
|
52233
|
-
})).y -
|
|
52287
|
+
})).y - HEADER_HEIGHT - this.props.offset + "px",
|
|
52234
52288
|
"margin-right": "1px"
|
|
52235
52289
|
});
|
|
52236
52290
|
}
|
|
@@ -52264,13 +52318,13 @@ var UnhideColumnHeaders = class extends Component {
|
|
|
52264
52318
|
col: hiddenIndex,
|
|
52265
52319
|
row: 0
|
|
52266
52320
|
}));
|
|
52267
|
-
return cssPropertiesToCss({ left: rect.x + rect.width -
|
|
52321
|
+
return cssPropertiesToCss({ left: rect.x + rect.width - HEADER_WIDTH - this.props.offset + "px" });
|
|
52268
52322
|
}
|
|
52269
52323
|
getUnhideNextButtonStyle(hiddenIndex) {
|
|
52270
52324
|
return cssPropertiesToCss({ left: this.env.model.getters.getRect(positionToZone({
|
|
52271
52325
|
col: hiddenIndex,
|
|
52272
52326
|
row: 0
|
|
52273
|
-
})).x -
|
|
52327
|
+
})).x - HEADER_WIDTH - this.props.offset + "px" });
|
|
52274
52328
|
}
|
|
52275
52329
|
unhide(hiddenElements) {
|
|
52276
52330
|
this.env.model.dispatch("UNHIDE_COLUMNS_ROWS", {
|
|
@@ -52493,7 +52547,7 @@ var ColResizer = class extends AbstractResizer {
|
|
|
52493
52547
|
this.colResizerRef = useRef("colResizer");
|
|
52494
52548
|
this.PADDING = 15;
|
|
52495
52549
|
this.MAX_SIZE_MARGIN = 90;
|
|
52496
|
-
this.MIN_ELEMENT_SIZE =
|
|
52550
|
+
this.MIN_ELEMENT_SIZE = MIN_COL_WIDTH;
|
|
52497
52551
|
}
|
|
52498
52552
|
get sheetId() {
|
|
52499
52553
|
return this.env.model.getters.getActiveSheetId();
|
|
@@ -52628,7 +52682,7 @@ var RowResizer = class extends AbstractResizer {
|
|
|
52628
52682
|
this.rowResizerRef = useRef("rowResizer");
|
|
52629
52683
|
this.PADDING = 5;
|
|
52630
52684
|
this.MAX_SIZE_MARGIN = 60;
|
|
52631
|
-
this.MIN_ELEMENT_SIZE =
|
|
52685
|
+
this.MIN_ELEMENT_SIZE = MIN_ROW_HEIGHT;
|
|
52632
52686
|
}
|
|
52633
52687
|
rowResizerRef;
|
|
52634
52688
|
get sheetId() {
|
|
@@ -53047,7 +53101,7 @@ var GridRenderer = class extends SpreadsheetStore {
|
|
|
53047
53101
|
x,
|
|
53048
53102
|
y
|
|
53049
53103
|
}, style.underline, style.strikethrough);
|
|
53050
|
-
y +=
|
|
53104
|
+
y += MIN_CELL_TEXT_MARGIN + box.content.fontSizePx;
|
|
53051
53105
|
}
|
|
53052
53106
|
if (style.rotation) ctx.restore();
|
|
53053
53107
|
if (box.clipRect) ctx.restore();
|
|
@@ -53095,7 +53149,7 @@ var GridRenderer = class extends SpreadsheetStore {
|
|
|
53095
53149
|
const numberOfRows = this.getters.getNumberRows(sheetId);
|
|
53096
53150
|
const activeCols = this.getters.getActiveCols();
|
|
53097
53151
|
const activeRows = this.getters.getActiveRows();
|
|
53098
|
-
ctx.font = `400 ${
|
|
53152
|
+
ctx.font = `400 ${HEADER_FONT_SIZE}px ${DEFAULT_FONT}`;
|
|
53099
53153
|
ctx.textAlign = "center";
|
|
53100
53154
|
ctx.textBaseline = "middle";
|
|
53101
53155
|
ctx.lineWidth = thinLineWidth;
|
|
@@ -53113,7 +53167,7 @@ var GridRenderer = class extends SpreadsheetStore {
|
|
|
53113
53167
|
if (isColActive) ctx.fillStyle = BACKGROUND_HEADER_ACTIVE_COLOR;
|
|
53114
53168
|
else if (isColSelected) ctx.fillStyle = BACKGROUND_HEADER_SELECTED_COLOR;
|
|
53115
53169
|
else ctx.fillStyle = BACKGROUND_HEADER_COLOR;
|
|
53116
|
-
ctx.fillRect(x, 0, width,
|
|
53170
|
+
ctx.fillRect(x, 0, width, HEADER_HEIGHT);
|
|
53117
53171
|
}
|
|
53118
53172
|
for (const row of visibleRows) {
|
|
53119
53173
|
const rowZone = {
|
|
@@ -53128,13 +53182,13 @@ var GridRenderer = class extends SpreadsheetStore {
|
|
|
53128
53182
|
if (isRowActive) ctx.fillStyle = BACKGROUND_HEADER_ACTIVE_COLOR;
|
|
53129
53183
|
else if (isRowSelected) ctx.fillStyle = BACKGROUND_HEADER_SELECTED_COLOR;
|
|
53130
53184
|
else ctx.fillStyle = BACKGROUND_HEADER_COLOR;
|
|
53131
|
-
ctx.fillRect(0, y,
|
|
53185
|
+
ctx.fillRect(0, y, HEADER_WIDTH, height);
|
|
53132
53186
|
}
|
|
53133
53187
|
ctx.beginPath();
|
|
53134
|
-
ctx.moveTo(
|
|
53135
|
-
ctx.lineTo(
|
|
53136
|
-
ctx.moveTo(0,
|
|
53137
|
-
ctx.lineTo(width,
|
|
53188
|
+
ctx.moveTo(HEADER_WIDTH, 0);
|
|
53189
|
+
ctx.lineTo(HEADER_WIDTH, height);
|
|
53190
|
+
ctx.moveTo(0, HEADER_HEIGHT);
|
|
53191
|
+
ctx.lineTo(width, HEADER_HEIGHT);
|
|
53138
53192
|
ctx.strokeStyle = HEADER_BORDER_COLOR;
|
|
53139
53193
|
ctx.stroke();
|
|
53140
53194
|
for (const col of visibleCols) {
|
|
@@ -53150,13 +53204,13 @@ var GridRenderer = class extends SpreadsheetStore {
|
|
|
53150
53204
|
const { x, width } = this.getters.getVisibleRect(zone);
|
|
53151
53205
|
ctx.save();
|
|
53152
53206
|
ctx.beginPath();
|
|
53153
|
-
ctx.rect(x, 0, width,
|
|
53207
|
+
ctx.rect(x, 0, width, HEADER_HEIGHT);
|
|
53154
53208
|
ctx.clip();
|
|
53155
|
-
ctx.fillText(colName, colStart + colSize / 2,
|
|
53209
|
+
ctx.fillText(colName, colStart + colSize / 2, HEADER_HEIGHT / 2);
|
|
53156
53210
|
ctx.restore();
|
|
53157
53211
|
ctx.beginPath();
|
|
53158
53212
|
ctx.moveTo(colStart + colSize, 0);
|
|
53159
|
-
ctx.lineTo(colStart + colSize,
|
|
53213
|
+
ctx.lineTo(colStart + colSize, HEADER_HEIGHT);
|
|
53160
53214
|
ctx.stroke();
|
|
53161
53215
|
}
|
|
53162
53216
|
for (const row of visibleRows) {
|
|
@@ -53171,21 +53225,21 @@ var GridRenderer = class extends SpreadsheetStore {
|
|
|
53171
53225
|
const { y, height } = this.getters.getVisibleRect(zone);
|
|
53172
53226
|
ctx.save();
|
|
53173
53227
|
ctx.beginPath();
|
|
53174
|
-
ctx.rect(0, y,
|
|
53228
|
+
ctx.rect(0, y, HEADER_WIDTH, height);
|
|
53175
53229
|
ctx.clip();
|
|
53176
|
-
ctx.fillText(String(row + 1),
|
|
53230
|
+
ctx.fillText(String(row + 1), HEADER_WIDTH / 2, rowStart + rowSize / 2);
|
|
53177
53231
|
ctx.restore();
|
|
53178
53232
|
ctx.beginPath();
|
|
53179
53233
|
ctx.moveTo(0, rowStart + rowSize);
|
|
53180
|
-
ctx.lineTo(
|
|
53234
|
+
ctx.lineTo(HEADER_WIDTH, rowStart + rowSize);
|
|
53181
53235
|
ctx.stroke();
|
|
53182
53236
|
}
|
|
53183
53237
|
}
|
|
53184
53238
|
drawFrozenPanesHeaders(renderingContext) {
|
|
53185
53239
|
const { ctx, thinLineWidth } = renderingContext;
|
|
53186
53240
|
const { x: offsetCorrectionX, y: offsetCorrectionY } = this.getters.getMainViewportCoordinates();
|
|
53187
|
-
const widthCorrection = this.getters.isDashboard() ? 0 :
|
|
53188
|
-
const heightCorrection = this.getters.isDashboard() ? 0 :
|
|
53241
|
+
const widthCorrection = this.getters.isDashboard() ? 0 : HEADER_WIDTH;
|
|
53242
|
+
const heightCorrection = this.getters.isDashboard() ? 0 : HEADER_HEIGHT;
|
|
53189
53243
|
ctx.lineWidth = 6 * thinLineWidth;
|
|
53190
53244
|
ctx.strokeStyle = FROZEN_PANE_HEADER_BORDER_COLOR;
|
|
53191
53245
|
ctx.beginPath();
|
|
@@ -53213,8 +53267,8 @@ var GridRenderer = class extends SpreadsheetStore {
|
|
|
53213
53267
|
bottom: visibleRows[visibleRows.length - 1]
|
|
53214
53268
|
};
|
|
53215
53269
|
const rect = this.getters.getVisibleRect(viewport);
|
|
53216
|
-
const widthCorrection = this.getters.isDashboard() ? 0 :
|
|
53217
|
-
const heightCorrection = this.getters.isDashboard() ? 0 :
|
|
53270
|
+
const widthCorrection = this.getters.isDashboard() ? 0 : HEADER_WIDTH;
|
|
53271
|
+
const heightCorrection = this.getters.isDashboard() ? 0 : HEADER_HEIGHT;
|
|
53218
53272
|
ctx.lineWidth = 6 * thinLineWidth;
|
|
53219
53273
|
ctx.strokeStyle = FROZEN_PANE_BORDER_COLOR;
|
|
53220
53274
|
ctx.beginPath();
|
|
@@ -53321,7 +53375,7 @@ var GridRenderer = class extends SpreadsheetStore {
|
|
|
53321
53375
|
/** Content */
|
|
53322
53376
|
const wrapping = style.wrapping || "overflow";
|
|
53323
53377
|
const wrapText = wrapping === "wrap" && !showFormula;
|
|
53324
|
-
const maxWidth = width - 2 *
|
|
53378
|
+
const maxWidth = width - 2 * MIN_CELL_TEXT_MARGIN;
|
|
53325
53379
|
const formatWidth = style.align ? 0 : maxWidth;
|
|
53326
53380
|
const multiLineText = this.getters.getCellMultiLineText(position, {
|
|
53327
53381
|
maxWidth,
|
|
@@ -53333,18 +53387,18 @@ var GridRenderer = class extends SpreadsheetStore {
|
|
|
53333
53387
|
align: "left",
|
|
53334
53388
|
rotation: 0
|
|
53335
53389
|
};
|
|
53336
|
-
const textWidth = Math.max(...multiLineText.map((line) => this.getters.getTextWidth(line, noRotatationStyle))) +
|
|
53390
|
+
const textWidth = Math.max(...multiLineText.map((line) => this.getters.getTextWidth(line, noRotatationStyle))) + MIN_CELL_TEXT_MARGIN;
|
|
53337
53391
|
const contentSize = this.getters.getMultilineTextSize(multiLineText, style);
|
|
53338
|
-
const chipMargin = chipStyle ?
|
|
53392
|
+
const chipMargin = chipStyle ? DATA_VALIDATION_CHIP_MARGIN : 0;
|
|
53339
53393
|
const leftMargin = (box.icons.left ? box.icons.left.size + box.icons.left.margin : 0) + chipMargin;
|
|
53340
53394
|
const rightMargin = (box.icons.right ? box.icons.right.size + box.icons.right.margin : 0) + chipMargin;
|
|
53341
|
-
const contentWidth = leftMargin + contentSize.width + rightMargin +
|
|
53395
|
+
const contentWidth = leftMargin + contentSize.width + rightMargin + MIN_CELL_TEXT_MARGIN;
|
|
53342
53396
|
const align = this.computeCellAlignment(position, contentWidth > width);
|
|
53343
53397
|
const numberOfLines = multiLineText.length;
|
|
53344
53398
|
const contentY = Math.round(this.getters.computeTextYCoordinate(box, fontSizePX, style.verticalAlign, numberOfLines));
|
|
53345
53399
|
let contentX = box.x;
|
|
53346
|
-
if (align === "left") contentX +=
|
|
53347
|
-
else if (align === "right") contentX += box.width -
|
|
53400
|
+
if (align === "left") contentX += MIN_CELL_TEXT_MARGIN + leftMargin;
|
|
53401
|
+
else if (align === "right") contentX += box.width - MIN_CELL_TEXT_MARGIN - rightMargin;
|
|
53348
53402
|
else contentX += box.width / 2;
|
|
53349
53403
|
contentX = Math.round(contentX);
|
|
53350
53404
|
const textHeight = computeTextLinesHeight(fontSizePX, numberOfLines);
|
|
@@ -53360,7 +53414,7 @@ var GridRenderer = class extends SpreadsheetStore {
|
|
|
53360
53414
|
};
|
|
53361
53415
|
if (chipStyle?.fillColor) {
|
|
53362
53416
|
const chipMarginLeft = leftMargin;
|
|
53363
|
-
const chipMarginRight =
|
|
53417
|
+
const chipMarginRight = DATA_VALIDATION_CHIP_MARGIN;
|
|
53364
53418
|
box.chip = {
|
|
53365
53419
|
color: chipStyle.fillColor,
|
|
53366
53420
|
width: box.width - chipMarginLeft - chipMarginRight,
|
|
@@ -53524,7 +53578,7 @@ var GridRenderer = class extends SpreadsheetStore {
|
|
|
53524
53578
|
continue;
|
|
53525
53579
|
}
|
|
53526
53580
|
const elapsedTime = timeStamp - animation.startTime;
|
|
53527
|
-
const progress = Math.min(1, elapsedTime /
|
|
53581
|
+
const progress = Math.min(1, elapsedTime / CELL_ANIMATION_DURATION);
|
|
53528
53582
|
if (progress >= 1) this.animations.delete(boxId);
|
|
53529
53583
|
animation.progress = progress;
|
|
53530
53584
|
}
|
|
@@ -53646,7 +53700,7 @@ function useTouchHandlers(ref, { updateScroll, canMoveUp, canMoveDown, getZoom,
|
|
|
53646
53700
|
resetTimeout = setTimeout(() => {
|
|
53647
53701
|
velocityX = 0;
|
|
53648
53702
|
velocityY = 0;
|
|
53649
|
-
},
|
|
53703
|
+
}, resetTimeoutDuration);
|
|
53650
53704
|
updateScroll(deltaX * horizontalScrollFactor, deltaY * verticalScrollFactor);
|
|
53651
53705
|
}
|
|
53652
53706
|
function onTouchEnd(ev) {
|
|
@@ -53715,7 +53769,7 @@ function computeDistance(ev1, ev2) {
|
|
|
53715
53769
|
//#region src/components/helpers/wheel_hook.ts
|
|
53716
53770
|
function useWheelHandler(handler) {
|
|
53717
53771
|
function normalize(val, deltaMode) {
|
|
53718
|
-
return val * (deltaMode === 0 ? 1 :
|
|
53772
|
+
return val * (deltaMode === 0 ? 1 : DEFAULT_CELL_HEIGHT);
|
|
53719
53773
|
}
|
|
53720
53774
|
const onMouseWheel = (ev) => {
|
|
53721
53775
|
handler(normalize(ev.shiftKey && !isMacOS() ? ev.deltaY : ev.deltaX, ev.deltaMode), normalize(ev.shiftKey && !isMacOS() ? ev.deltaX : ev.deltaY, ev.deltaMode));
|
|
@@ -53811,14 +53865,14 @@ var Corner = class extends Component {
|
|
|
53811
53865
|
return cssPropertiesToCss(css);
|
|
53812
53866
|
}
|
|
53813
53867
|
getHandlerEdgeLength() {
|
|
53814
|
-
return this.env.isMobile() ? MOBILE_HANDLER_WIDTH :
|
|
53868
|
+
return this.env.isMobile() ? MOBILE_HANDLER_WIDTH : AUTOFILL_EDGE_LENGTH;
|
|
53815
53869
|
}
|
|
53816
53870
|
get buttonLook() {
|
|
53817
53871
|
const css = {
|
|
53818
53872
|
"background-color": this.props.color,
|
|
53819
53873
|
cursor: `${this.props.orientation}-resize`
|
|
53820
53874
|
};
|
|
53821
|
-
if (this.env.isMobile()) css["border-radius"] = `${
|
|
53875
|
+
if (this.env.isMobile()) css["border-radius"] = `${AUTOFILL_EDGE_LENGTH / 2}px`;
|
|
53822
53876
|
return cssPropertiesToCss(css);
|
|
53823
53877
|
}
|
|
53824
53878
|
onMouseDown(ev) {
|
|
@@ -54236,8 +54290,8 @@ var Grid = class extends Component {
|
|
|
54236
54290
|
TableResizer,
|
|
54237
54291
|
Selection
|
|
54238
54292
|
};
|
|
54239
|
-
HEADER_HEIGHT =
|
|
54240
|
-
HEADER_WIDTH =
|
|
54293
|
+
HEADER_HEIGHT = HEADER_HEIGHT;
|
|
54294
|
+
HEADER_WIDTH = HEADER_WIDTH;
|
|
54241
54295
|
menuState;
|
|
54242
54296
|
gridRef;
|
|
54243
54297
|
highlightStore;
|
|
@@ -54301,10 +54355,10 @@ var Grid = class extends Component {
|
|
|
54301
54355
|
get gridOverlayDimensions() {
|
|
54302
54356
|
const scrollbarWidth = this.env.model.getters.getScrollBarWidth();
|
|
54303
54357
|
return cssPropertiesToCss({
|
|
54304
|
-
top: `${
|
|
54305
|
-
left: `${
|
|
54306
|
-
height: `calc(100% - ${
|
|
54307
|
-
width: `calc(100% - ${
|
|
54358
|
+
top: `${HEADER_HEIGHT}px`,
|
|
54359
|
+
left: `${HEADER_WIDTH}px`,
|
|
54360
|
+
height: `calc(100% - ${HEADER_HEIGHT + scrollbarWidth}px)`,
|
|
54361
|
+
width: `calc(100% - ${HEADER_WIDTH + scrollbarWidth}px)`
|
|
54308
54362
|
});
|
|
54309
54363
|
}
|
|
54310
54364
|
onClosePopover() {
|
|
@@ -54515,8 +54569,8 @@ var Grid = class extends Component {
|
|
|
54515
54569
|
const zone = this.env.model.getters.getSelectedZone();
|
|
54516
54570
|
const rect = this.env.model.getters.getVisibleRect(zone);
|
|
54517
54571
|
return {
|
|
54518
|
-
x: rect.x + rect.width -
|
|
54519
|
-
y: rect.y + rect.height -
|
|
54572
|
+
x: rect.x + rect.width - AUTOFILL_EDGE_LENGTH / 2,
|
|
54573
|
+
y: rect.y + rect.height - AUTOFILL_EDGE_LENGTH / 2
|
|
54520
54574
|
};
|
|
54521
54575
|
}
|
|
54522
54576
|
get isAutofillVisible() {
|
|
@@ -54533,10 +54587,10 @@ var Grid = class extends Component {
|
|
|
54533
54587
|
onGridResized() {
|
|
54534
54588
|
const { height, width } = this.props.getGridSize();
|
|
54535
54589
|
this.env.model.dispatch("RESIZE_SHEETVIEW", {
|
|
54536
|
-
width: width -
|
|
54537
|
-
height: height -
|
|
54538
|
-
gridOffsetX:
|
|
54539
|
-
gridOffsetY:
|
|
54590
|
+
width: width - HEADER_WIDTH,
|
|
54591
|
+
height: height - HEADER_HEIGHT,
|
|
54592
|
+
gridOffsetX: HEADER_WIDTH,
|
|
54593
|
+
gridOffsetY: HEADER_HEIGHT
|
|
54540
54594
|
});
|
|
54541
54595
|
}
|
|
54542
54596
|
moveCanvas(deltaX, deltaY) {
|
|
@@ -54877,7 +54931,7 @@ var ClickableCellSortIcon = class extends Component {
|
|
|
54877
54931
|
return cssPropertiesToCss({
|
|
54878
54932
|
height: `${size}px`,
|
|
54879
54933
|
width: `${size}px`,
|
|
54880
|
-
color: cellStyle.textColor ||
|
|
54934
|
+
color: cellStyle.textColor || TEXT_BODY_MUTED,
|
|
54881
54935
|
"background-color": this.getBackgroundColor(cellStyle)
|
|
54882
54936
|
});
|
|
54883
54937
|
}
|
|
@@ -55770,8 +55824,8 @@ var CarouselPlugin = class extends CorePlugin {
|
|
|
55770
55824
|
case "DUPLICATE_SHEET": {
|
|
55771
55825
|
const sheetFiguresFrom = this.getters.getFigures(cmd.sheetId);
|
|
55772
55826
|
for (const fig of sheetFiguresFrom) if (fig.tag === "carousel") {
|
|
55773
|
-
const figureIdBase = fig.id.split(
|
|
55774
|
-
const duplicatedFigureId = `${cmd.sheetIdTo}${
|
|
55827
|
+
const figureIdBase = fig.id.split(FIGURE_ID_SPLITTER).pop();
|
|
55828
|
+
const duplicatedFigureId = `${cmd.sheetIdTo}${FIGURE_ID_SPLITTER}${figureIdBase}`;
|
|
55775
55829
|
const carousel = this.getCarousel(fig.id);
|
|
55776
55830
|
if (carousel) {
|
|
55777
55831
|
const size = {
|
|
@@ -55787,8 +55841,8 @@ var CarouselPlugin = class extends CorePlugin {
|
|
|
55787
55841
|
size,
|
|
55788
55842
|
definition: { items: carousel.items.map((item) => {
|
|
55789
55843
|
if (item.type === "carouselDataView") return { ...item };
|
|
55790
|
-
const chartIdBase = item.chartId.split(
|
|
55791
|
-
const newChartId = `${cmd.sheetIdTo}${
|
|
55844
|
+
const chartIdBase = item.chartId.split(FIGURE_ID_SPLITTER).pop();
|
|
55845
|
+
const newChartId = `${cmd.sheetIdTo}${FIGURE_ID_SPLITTER}${chartIdBase}`;
|
|
55792
55846
|
return {
|
|
55793
55847
|
...item,
|
|
55794
55848
|
chartId: newChartId
|
|
@@ -55860,12 +55914,12 @@ var Squisher = class {
|
|
|
55860
55914
|
* with references (unless they contain a sheet name that contains the separator). */
|
|
55861
55915
|
buildResult(numbers, strings, references) {
|
|
55862
55916
|
const res = {};
|
|
55863
|
-
if (numbers.length) res.N = numbers.join(
|
|
55917
|
+
if (numbers.length) res.N = numbers.join(SEPARATOR);
|
|
55864
55918
|
if (strings.length) res.S = strings;
|
|
55865
55919
|
if (references.length) {
|
|
55866
55920
|
let referencePattern;
|
|
55867
|
-
if (references.some((x) => x.includes(
|
|
55868
|
-
else referencePattern = references.join(
|
|
55921
|
+
if (references.some((x) => x.includes(SEPARATOR))) referencePattern = references;
|
|
55922
|
+
else referencePattern = references.join(SEPARATOR);
|
|
55869
55923
|
res.R = referencePattern;
|
|
55870
55924
|
}
|
|
55871
55925
|
return res;
|
|
@@ -55958,7 +56012,7 @@ var Squisher = class {
|
|
|
55958
56012
|
}
|
|
55959
56013
|
squishOneReference(reference, previousReferences, index, forSheetId) {
|
|
55960
56014
|
const previousReference = previousReferences[index];
|
|
55961
|
-
if (deepEquals(previousReference, reference)) return
|
|
56015
|
+
if (deepEquals(previousReference, reference)) return NO_CHANGE;
|
|
55962
56016
|
if (previousReference.sheetId !== reference.sheetId || previousReference.prefixSheet !== reference.prefixSheet || previousReference.invalidSheetName !== reference.invalidSheetName || previousReference.invalidXc !== reference.invalidXc || previousReference.parts.length !== reference.parts.length) {
|
|
55963
56017
|
previousReferences[index] = deepCopy(reference);
|
|
55964
56018
|
return getRangeString(reference, forSheetId, this.getters.getSheetName, this.rangeToStringOptions);
|
|
@@ -55992,7 +56046,7 @@ var Squisher = class {
|
|
|
55992
56046
|
* - "=" meaning no change as string
|
|
55993
56047
|
* */
|
|
55994
56048
|
squishNumbers(numbers) {
|
|
55995
|
-
const result = numbers.map((x) =>
|
|
56049
|
+
const result = numbers.map((x) => NO_CHANGE);
|
|
55996
56050
|
for (let i = 0; i < numbers.length; i++) {
|
|
55997
56051
|
const diff = numbers[i].value - (this.baseFormula.literalValues.numbers[i].value + this.alreadyAppliedNumberOffsets[i] || 0);
|
|
55998
56052
|
if (diff !== 0) {
|
|
@@ -56003,7 +56057,7 @@ var Squisher = class {
|
|
|
56003
56057
|
return result;
|
|
56004
56058
|
}
|
|
56005
56059
|
squishStrings(strings) {
|
|
56006
|
-
const result = strings.map((x) =>
|
|
56060
|
+
const result = strings.map((x) => NO_CHANGE);
|
|
56007
56061
|
for (let i = 0; i < strings.length; i++) {
|
|
56008
56062
|
const str = strings[i].value;
|
|
56009
56063
|
if (str !== this.previousStrings[i]) {
|
|
@@ -56138,16 +56192,16 @@ var Unsquisher = class {
|
|
|
56138
56192
|
strings: [],
|
|
56139
56193
|
dependencies: []
|
|
56140
56194
|
};
|
|
56141
|
-
if (squishedElement.N !== void 0 && squishedElement.N.length > 0) current.numbers = squishedElement.N.split(
|
|
56195
|
+
if (squishedElement.N !== void 0 && squishedElement.N.length > 0) current.numbers = squishedElement.N.split(SEPARATOR).map(this.adjustNumbers);
|
|
56142
56196
|
else current.numbers = this.previousCell.literalValues.numbers;
|
|
56143
56197
|
if (squishedElement.S !== void 0 && squishedElement.S.length > 0) current.strings = squishedElement.S.map(this.adjustStrings);
|
|
56144
56198
|
else current.strings = this.previousCell.literalValues.strings;
|
|
56145
56199
|
if (squishedElement.R !== void 0 && this.previousCell) {
|
|
56146
56200
|
let references;
|
|
56147
56201
|
if (typeof squishedElement.R !== "string") references = squishedElement.R;
|
|
56148
|
-
else references = squishedElement.R.split(
|
|
56202
|
+
else references = squishedElement.R.split(SEPARATOR);
|
|
56149
56203
|
current.dependencies = references.map((refStr, index) => {
|
|
56150
|
-
if (refStr ===
|
|
56204
|
+
if (refStr === NO_CHANGE) return { ...this.alreadyAppliedReferenceOffset[index] };
|
|
56151
56205
|
else if (refStr.startsWith("+") || refStr.startsWith("-")) {
|
|
56152
56206
|
const offset = parseInt(refStr.slice(2), 10);
|
|
56153
56207
|
const sign = refStr[0] === "+" ? 1 : -1;
|
|
@@ -56183,14 +56237,14 @@ var Unsquisher = class {
|
|
|
56183
56237
|
throw new Error("Invalid squished element or no previous cell to unsquish against");
|
|
56184
56238
|
}
|
|
56185
56239
|
adjustStrings = (str, index) => {
|
|
56186
|
-
if (str ===
|
|
56240
|
+
if (str === NO_CHANGE) return { value: this.previousString[index] };
|
|
56187
56241
|
else {
|
|
56188
56242
|
this.previousString[index] = str;
|
|
56189
56243
|
return { value: str };
|
|
56190
56244
|
}
|
|
56191
56245
|
};
|
|
56192
56246
|
adjustNumbers = (numStr, index) => {
|
|
56193
|
-
if (numStr ===
|
|
56247
|
+
if (numStr === NO_CHANGE) return { value: this.alreadyAppliedNumberOffset[index] };
|
|
56194
56248
|
else {
|
|
56195
56249
|
const currentOffset = parseFloat(numStr.slice(1));
|
|
56196
56250
|
const adjustedOffset = (this.alreadyAppliedNumberOffset[index] || 0) + currentOffset;
|
|
@@ -56705,10 +56759,10 @@ var ChartPlugin = class extends CorePlugin {
|
|
|
56705
56759
|
if (!chart || !figureId) continue;
|
|
56706
56760
|
const fig = this.getters.getFigure(cmd.sheetId, figureId);
|
|
56707
56761
|
if (!fig) continue;
|
|
56708
|
-
const figureIdBase = figureId.split(
|
|
56709
|
-
const duplicatedFigureId = `${cmd.sheetIdTo}${
|
|
56710
|
-
const chartIdBase = chartId.split(
|
|
56711
|
-
const duplicatedChartId = `${cmd.sheetIdTo}${
|
|
56762
|
+
const figureIdBase = figureId.split(FIGURE_ID_SPLITTER).pop();
|
|
56763
|
+
const duplicatedFigureId = `${cmd.sheetIdTo}${FIGURE_ID_SPLITTER}${figureIdBase}`;
|
|
56764
|
+
const chartIdBase = chartId.split(FIGURE_ID_SPLITTER).pop();
|
|
56765
|
+
const duplicatedChartId = `${cmd.sheetIdTo}${FIGURE_ID_SPLITTER}${chartIdBase}`;
|
|
56712
56766
|
const newChart = chart.duplicateInDuplicatedSheet(cmd.sheetIdTo);
|
|
56713
56767
|
if (newChart) this.dispatch("CREATE_CHART", {
|
|
56714
56768
|
figureId: duplicatedFigureId,
|
|
@@ -56815,8 +56869,8 @@ var ChartPlugin = class extends CorePlugin {
|
|
|
56815
56869
|
* Add a figure with tag chart with the given id at the given position
|
|
56816
56870
|
*/
|
|
56817
56871
|
addFigure(figureId, sheetId, col, row, offset, size = {
|
|
56818
|
-
width:
|
|
56819
|
-
height:
|
|
56872
|
+
width: DEFAULT_FIGURE_WIDTH,
|
|
56873
|
+
height: DEFAULT_FIGURE_HEIGHT
|
|
56820
56874
|
}) {
|
|
56821
56875
|
this.dispatch("CREATE_FIGURE", {
|
|
56822
56876
|
sheetId,
|
|
@@ -57539,8 +57593,8 @@ var FigurePlugin = class extends CorePlugin {
|
|
|
57539
57593
|
const figureId = figure.id;
|
|
57540
57594
|
const fig = this.figures[cmd.sheetId]?.[figureId];
|
|
57541
57595
|
if (!fig) continue;
|
|
57542
|
-
const figureIdBase = figureId.split(
|
|
57543
|
-
const duplicatedFigureId = `${cmd.sheetIdTo}${
|
|
57596
|
+
const figureIdBase = figureId.split(FIGURE_ID_SPLITTER).pop();
|
|
57597
|
+
const duplicatedFigureId = `${cmd.sheetIdTo}${FIGURE_ID_SPLITTER}${figureIdBase}`;
|
|
57544
57598
|
this.dispatch("CREATE_FIGURE", {
|
|
57545
57599
|
figureId: duplicatedFigureId,
|
|
57546
57600
|
...fig,
|
|
@@ -57578,11 +57632,11 @@ var FigurePlugin = class extends CorePlugin {
|
|
|
57578
57632
|
const numHeader = this.getters.getNumberRows(sheetId);
|
|
57579
57633
|
const remainingSize = new Array(numHeader + 1);
|
|
57580
57634
|
remainingSize[numHeader] = 0;
|
|
57581
|
-
for (let i = numHeader - 1; i >= 0; i--) remainingSize[i] = remainingSize[i + 1] + (this.getters.getUserRowSize(sheetId, i) ??
|
|
57635
|
+
for (let i = numHeader - 1; i >= 0; i--) remainingSize[i] = remainingSize[i + 1] + (this.getters.getUserRowSize(sheetId, i) ?? DEFAULT_CELL_HEIGHT);
|
|
57582
57636
|
for (const figure of this.getFigures(sheetId)) if (figure.offset.y + figure.height > remainingSize[figure.row]) {
|
|
57583
57637
|
let y = figure.offset.y;
|
|
57584
57638
|
let row = figure.row;
|
|
57585
|
-
for (let row_size = this.getters.getUserRowSize(sheetId, row) ??
|
|
57639
|
+
for (let row_size = this.getters.getUserRowSize(sheetId, row) ?? DEFAULT_CELL_HEIGHT; row_size < y; row_size = this.getters.getUserRowSize(sheetId, row) ?? DEFAULT_CELL_HEIGHT) {
|
|
57586
57640
|
row += 1;
|
|
57587
57641
|
y -= row_size;
|
|
57588
57642
|
}
|
|
@@ -57607,7 +57661,7 @@ var FigurePlugin = class extends CorePlugin {
|
|
|
57607
57661
|
let rowNum, colNum;
|
|
57608
57662
|
let { col, row } = figure;
|
|
57609
57663
|
const offset = { ...figure.offset };
|
|
57610
|
-
for (rowNum = numberOfRows; availableHeight < figure.height && rowNum > 0; rowNum--) availableHeight += this.getters.getUserRowSize(sheetId, rowNum - 1) ??
|
|
57664
|
+
for (rowNum = numberOfRows; availableHeight < figure.height && rowNum > 0; rowNum--) availableHeight += this.getters.getUserRowSize(sheetId, rowNum - 1) ?? DEFAULT_CELL_HEIGHT;
|
|
57611
57665
|
if (row > rowNum) {
|
|
57612
57666
|
row = rowNum;
|
|
57613
57667
|
offset.y = Math.max(availableHeight - figure.height, 0);
|
|
@@ -58088,7 +58142,7 @@ var HeaderSizePlugin = class extends CorePlugin {
|
|
|
58088
58142
|
}
|
|
58089
58143
|
}
|
|
58090
58144
|
getColSize(sheetId, index) {
|
|
58091
|
-
return Math.round(this.sizes[sheetId]?.["COL"][index] ||
|
|
58145
|
+
return Math.round(this.sizes[sheetId]?.["COL"][index] || DEFAULT_CELL_WIDTH);
|
|
58092
58146
|
}
|
|
58093
58147
|
getUserRowSize(sheetId, index) {
|
|
58094
58148
|
const rowSize = this.sizes[sheetId]?.["ROW"][index];
|
|
@@ -58121,7 +58175,7 @@ var HeaderSizePlugin = class extends CorePlugin {
|
|
|
58121
58175
|
if (sheet.rows === void 0) sheet.rows = {};
|
|
58122
58176
|
for (const row of range(0, this.getters.getNumberRows(sheet.id))) if (exportDefaults || this.sizes[sheet.id]["ROW"][row]) sheet.rows[row] = {
|
|
58123
58177
|
...sheet.rows[row],
|
|
58124
|
-
size: this.getUserRowSize(sheet.id, row) ??
|
|
58178
|
+
size: this.getUserRowSize(sheet.id, row) ?? DEFAULT_CELL_HEIGHT
|
|
58125
58179
|
};
|
|
58126
58180
|
if (sheet.cols === void 0) sheet.cols = {};
|
|
58127
58181
|
for (const col of range(0, this.getters.getNumberCols(sheet.id))) if (exportDefaults || this.sizes[sheet.id]["COL"][col]) sheet.cols[col] = {
|
|
@@ -58302,8 +58356,8 @@ var ImagePlugin = class extends CorePlugin {
|
|
|
58302
58356
|
case "DUPLICATE_SHEET": {
|
|
58303
58357
|
const sheetFiguresFrom = this.getters.getFigures(cmd.sheetId);
|
|
58304
58358
|
for (const fig of sheetFiguresFrom) if (fig.tag === "image") {
|
|
58305
|
-
const figureIdBase = fig.id.split(
|
|
58306
|
-
const duplicatedFigureId = `${cmd.sheetIdTo}${
|
|
58359
|
+
const figureIdBase = fig.id.split(FIGURE_ID_SPLITTER).pop();
|
|
58360
|
+
const duplicatedFigureId = `${cmd.sheetIdTo}${FIGURE_ID_SPLITTER}${figureIdBase}`;
|
|
58307
58361
|
const image = this.getImage(fig.id);
|
|
58308
58362
|
if (image) {
|
|
58309
58363
|
const size = {
|
|
@@ -61831,8 +61885,8 @@ iconsOnCellRegistry.add("data_validation_checkbox", (getters, position) => {
|
|
|
61831
61885
|
hoverSvg: value ? CHECKBOX_CHECKED : CHECKBOX_UNCHECKED_HOVERED,
|
|
61832
61886
|
priority: 2,
|
|
61833
61887
|
horizontalAlign: "center",
|
|
61834
|
-
size:
|
|
61835
|
-
margin:
|
|
61888
|
+
size: GRID_ICON_EDGE_LENGTH,
|
|
61889
|
+
margin: GRID_ICON_MARGIN,
|
|
61836
61890
|
position,
|
|
61837
61891
|
type: "data_validation_checkbox",
|
|
61838
61892
|
onClick: (position, env) => {
|
|
@@ -61879,7 +61933,7 @@ iconsOnCellRegistry.add("conditional_formatting", (getters, position) => {
|
|
|
61879
61933
|
priority: 1,
|
|
61880
61934
|
horizontalAlign: "left",
|
|
61881
61935
|
size: computeTextFontSizeInPixels(style),
|
|
61882
|
-
margin:
|
|
61936
|
+
margin: MIN_CF_ICON_MARGIN,
|
|
61883
61937
|
position
|
|
61884
61938
|
};
|
|
61885
61939
|
}
|
|
@@ -61894,13 +61948,13 @@ iconsOnCellRegistry.add("pivot_collapse", (getters, position) => {
|
|
|
61894
61948
|
const fields = pivotCell.dimension === "COL" ? definition.columns : definition.rows;
|
|
61895
61949
|
const hasIcon = !isDashboard && !getters.shouldShowFormulas() && pivotCell.domain.length !== fields.length;
|
|
61896
61950
|
const isCollapsed = (definition.collapsedDomains?.[pivotCell.dimension] ?? []).some((domain) => deepEquals(domain, pivotCell.domain));
|
|
61897
|
-
const indent = pivotCell.dimension === "ROW" ? (pivotCell.domain.length - 1) *
|
|
61951
|
+
const indent = pivotCell.dimension === "ROW" ? (pivotCell.domain.length - 1) * PIVOT_INDENT : 0;
|
|
61898
61952
|
return {
|
|
61899
61953
|
type: "pivot_collapse",
|
|
61900
61954
|
priority: 4,
|
|
61901
61955
|
horizontalAlign: "left",
|
|
61902
|
-
size: hasIcon || !isDashboard && pivotCell.dimension === "ROW" && definition.rows.length > 1 ?
|
|
61903
|
-
margin: hasIcon ?
|
|
61956
|
+
size: hasIcon || !isDashboard && pivotCell.dimension === "ROW" && definition.rows.length > 1 ? PIVOT_COLLAPSE_ICON_SIZE : 0,
|
|
61957
|
+
margin: hasIcon ? GRID_ICON_MARGIN * 2 + indent : indent,
|
|
61904
61958
|
svg: hasIcon ? getPivotIconSvg(isCollapsed, false) : void 0,
|
|
61905
61959
|
hoverSvg: hasIcon ? getPivotIconSvg(isCollapsed, true) : void 0,
|
|
61906
61960
|
position,
|
|
@@ -62502,7 +62556,7 @@ var EvaluationChartPlugin = class extends CoreViewPlugin {
|
|
|
62502
62556
|
col,
|
|
62503
62557
|
row
|
|
62504
62558
|
});
|
|
62505
|
-
const background = style.fillColor ||
|
|
62559
|
+
const background = style.fillColor || BACKGROUND_CHART_COLOR;
|
|
62506
62560
|
return {
|
|
62507
62561
|
background,
|
|
62508
62562
|
fontColor: style.textColor || chartFontColor(background)
|
|
@@ -62813,7 +62867,7 @@ var EvaluationDataValidationPlugin = class extends CoreViewPlugin {
|
|
|
62813
62867
|
return this.getDataValidationStyle(position);
|
|
62814
62868
|
}
|
|
62815
62869
|
getDataValidationChipStyle(position) {
|
|
62816
|
-
if (this.hasChip(position)) return this.getDataValidationStyle(position) ?? { fillColor:
|
|
62870
|
+
if (this.hasChip(position)) return this.getDataValidationStyle(position) ?? { fillColor: GRAY_200 };
|
|
62817
62871
|
}
|
|
62818
62872
|
getInvalidDataValidationMessage(cellPosition) {
|
|
62819
62873
|
const validationResult = this.getValidationResultForCell(cellPosition);
|
|
@@ -63042,7 +63096,7 @@ var HeaderSizeUIPlugin = class extends CoreViewPlugin {
|
|
|
63042
63096
|
}
|
|
63043
63097
|
}
|
|
63044
63098
|
getRowSize(sheetId, row) {
|
|
63045
|
-
return Math.round(this.getters.getUserRowSize(sheetId, row) ?? this.tallestCellInRow[sheetId][row]?.size ??
|
|
63099
|
+
return Math.round(this.getters.getUserRowSize(sheetId, row) ?? this.tallestCellInRow[sheetId][row]?.size ?? DEFAULT_CELL_HEIGHT);
|
|
63046
63100
|
}
|
|
63047
63101
|
getMaxAnchorOffset(sheetId, height, width) {
|
|
63048
63102
|
let { numberOfRows: row, numberOfCols: col } = this.getters.getSheetSize(sheetId);
|
|
@@ -63080,8 +63134,8 @@ var HeaderSizeUIPlugin = class extends CoreViewPlugin {
|
|
|
63080
63134
|
col,
|
|
63081
63135
|
row
|
|
63082
63136
|
});
|
|
63083
|
-
if (updatedCellHeight <=
|
|
63084
|
-
if (!tallestCellInRow && updatedCellHeight >
|
|
63137
|
+
if (updatedCellHeight <= DEFAULT_CELL_HEIGHT) return;
|
|
63138
|
+
if (!tallestCellInRow && updatedCellHeight > DEFAULT_CELL_HEIGHT || tallestCellInRow && updatedCellHeight > tallestCellInRow.size) {
|
|
63085
63139
|
const newTallestCell = {
|
|
63086
63140
|
cell: {
|
|
63087
63141
|
sheetId,
|
|
@@ -63106,7 +63160,7 @@ var HeaderSizeUIPlugin = class extends CoreViewPlugin {
|
|
|
63106
63160
|
* merge, or the height of the cell computed based on its style/content.
|
|
63107
63161
|
*/
|
|
63108
63162
|
getCellHeight(position) {
|
|
63109
|
-
if (this.isInMultiRowMerge(position)) return
|
|
63163
|
+
if (this.isInMultiRowMerge(position)) return DEFAULT_CELL_HEIGHT;
|
|
63110
63164
|
const cell = this.getters.getCell(position);
|
|
63111
63165
|
const colSize = this.getters.getColSize(position.sheetId, position.col);
|
|
63112
63166
|
return getDefaultCellHeight(this.ctx, cell, this.getters.getLocale(), colSize);
|
|
@@ -63128,7 +63182,7 @@ var HeaderSizeUIPlugin = class extends CoreViewPlugin {
|
|
|
63128
63182
|
if (!cell) continue;
|
|
63129
63183
|
const position = this.getters.getCellPosition(cell.id);
|
|
63130
63184
|
const cellHeight = this.getCellHeight(position);
|
|
63131
|
-
if (cellHeight > maxHeight && cellHeight >
|
|
63185
|
+
if (cellHeight > maxHeight && cellHeight > DEFAULT_CELL_HEIGHT) {
|
|
63132
63186
|
maxHeight = cellHeight;
|
|
63133
63187
|
tallestCell = {
|
|
63134
63188
|
cell: position,
|
|
@@ -63136,7 +63190,7 @@ var HeaderSizeUIPlugin = class extends CoreViewPlugin {
|
|
|
63136
63190
|
};
|
|
63137
63191
|
}
|
|
63138
63192
|
}
|
|
63139
|
-
if (tallestCell && tallestCell.size >
|
|
63193
|
+
if (tallestCell && tallestCell.size > DEFAULT_CELL_HEIGHT) return tallestCell;
|
|
63140
63194
|
}
|
|
63141
63195
|
};
|
|
63142
63196
|
|
|
@@ -63580,7 +63634,7 @@ function pivot_presentation_default(PivotClass) {
|
|
|
63580
63634
|
* @returns the value of the cell in the pivot with the new domain, or "sameValue" if the domain is the same
|
|
63581
63635
|
*/
|
|
63582
63636
|
getComparisonValue(measure, domain, fieldNameWithGranularity, valueToCompare) {
|
|
63583
|
-
const comparedDomain = valueToCompare ===
|
|
63637
|
+
const comparedDomain = valueToCompare === PREVIOUS_VALUE || valueToCompare === NEXT_VALUE ? getPreviousOrNextValueDomain(this, domain, fieldNameWithGranularity, valueToCompare) : replaceFieldValueInDomain(domain, fieldNameWithGranularity, valueToCompare);
|
|
63584
63638
|
if (deepEquals(comparedDomain, domain)) return "sameValue";
|
|
63585
63639
|
if (!comparedDomain || !isDomainIsInPivot(this, comparedDomain)) throw new NotAvailableError();
|
|
63586
63640
|
const comparedValue = this._getPivotCellValueAndFormat(measure.id, comparedDomain);
|
|
@@ -66336,7 +66390,7 @@ var Session = class extends EventBus {
|
|
|
66336
66390
|
this.trigger("new-local-state-update", { id: revision.id });
|
|
66337
66391
|
this.sendUpdateMessage({
|
|
66338
66392
|
type: "REMOTE_REVISION",
|
|
66339
|
-
version:
|
|
66393
|
+
version: MESSAGE_VERSION,
|
|
66340
66394
|
serverRevisionId: this.serverRevisionId,
|
|
66341
66395
|
nextRevisionId: revision.id,
|
|
66342
66396
|
clientId: revision.clientId,
|
|
@@ -66347,7 +66401,7 @@ var Session = class extends EventBus {
|
|
|
66347
66401
|
this.waitingUndoRedoAck = true;
|
|
66348
66402
|
this.sendUpdateMessage({
|
|
66349
66403
|
type: "REVISION_UNDONE",
|
|
66350
|
-
version:
|
|
66404
|
+
version: MESSAGE_VERSION,
|
|
66351
66405
|
serverRevisionId: this.serverRevisionId,
|
|
66352
66406
|
nextRevisionId: this.uuidGenerator.uuidv4(),
|
|
66353
66407
|
undoneRevisionId: revisionId
|
|
@@ -66357,7 +66411,7 @@ var Session = class extends EventBus {
|
|
|
66357
66411
|
this.waitingUndoRedoAck = true;
|
|
66358
66412
|
this.sendUpdateMessage({
|
|
66359
66413
|
type: "REVISION_REDONE",
|
|
66360
|
-
version:
|
|
66414
|
+
version: MESSAGE_VERSION,
|
|
66361
66415
|
serverRevisionId: this.serverRevisionId,
|
|
66362
66416
|
nextRevisionId: this.uuidGenerator.uuidv4(),
|
|
66363
66417
|
redoneRevisionId: revisionId
|
|
@@ -66398,7 +66452,7 @@ var Session = class extends EventBus {
|
|
|
66398
66452
|
this.sendToTransport({
|
|
66399
66453
|
type: "CLIENT_LEFT",
|
|
66400
66454
|
clientId: this.clientId,
|
|
66401
|
-
version:
|
|
66455
|
+
version: MESSAGE_VERSION
|
|
66402
66456
|
});
|
|
66403
66457
|
}
|
|
66404
66458
|
/**
|
|
@@ -66415,7 +66469,7 @@ var Session = class extends EventBus {
|
|
|
66415
66469
|
...data,
|
|
66416
66470
|
revisionId: snapshotId
|
|
66417
66471
|
},
|
|
66418
|
-
version:
|
|
66472
|
+
version: MESSAGE_VERSION
|
|
66419
66473
|
});
|
|
66420
66474
|
}
|
|
66421
66475
|
getCurrentClient() {
|
|
@@ -66459,7 +66513,7 @@ var Session = class extends EventBus {
|
|
|
66459
66513
|
};
|
|
66460
66514
|
this.sendToTransport({
|
|
66461
66515
|
type,
|
|
66462
|
-
version:
|
|
66516
|
+
version: MESSAGE_VERSION,
|
|
66463
66517
|
client: {
|
|
66464
66518
|
...client,
|
|
66465
66519
|
position
|
|
@@ -66538,7 +66592,7 @@ var Session = class extends EventBus {
|
|
|
66538
66592
|
const { position } = client;
|
|
66539
66593
|
if (position) this.sendToTransport({
|
|
66540
66594
|
type: "CLIENT_MOVED",
|
|
66541
|
-
version:
|
|
66595
|
+
version: MESSAGE_VERSION,
|
|
66542
66596
|
client: {
|
|
66543
66597
|
...client,
|
|
66544
66598
|
position
|
|
@@ -67320,7 +67374,7 @@ var HistoryPlugin = class extends UIPlugin {
|
|
|
67320
67374
|
onNewLocalStateUpdate({ id }) {
|
|
67321
67375
|
this.undoStack.push(id);
|
|
67322
67376
|
this.redoStack = [];
|
|
67323
|
-
if (this.undoStack.length >
|
|
67377
|
+
if (this.undoStack.length > MAX_HISTORY_STEPS) this.undoStack.shift();
|
|
67324
67378
|
}
|
|
67325
67379
|
/**
|
|
67326
67380
|
* Fetch the last revision which is not empty and not a repeated command
|
|
@@ -67585,7 +67639,7 @@ var SplitToColumnsPlugin = class extends UIPlugin {
|
|
|
67585
67639
|
}
|
|
67586
67640
|
getAutoSeparatorForString(str) {
|
|
67587
67641
|
const separators = [
|
|
67588
|
-
|
|
67642
|
+
NEWLINE,
|
|
67589
67643
|
";",
|
|
67590
67644
|
",",
|
|
67591
67645
|
" ",
|
|
@@ -67919,9 +67973,9 @@ var SheetUIPlugin = class extends UIPlugin {
|
|
|
67919
67973
|
contentWidth += computeMultilineTextSize(this.ctx, multiLineText, style).width;
|
|
67920
67974
|
}
|
|
67921
67975
|
for (const icon of this.getters.getCellIcons(position)) contentWidth += icon.margin + icon.size;
|
|
67922
|
-
if (this.getters.getDataValidationChipStyle(position)) contentWidth +=
|
|
67976
|
+
if (this.getters.getDataValidationChipStyle(position)) contentWidth += DATA_VALIDATION_CHIP_MARGIN * 2;
|
|
67923
67977
|
if (contentWidth === 0) return 0;
|
|
67924
|
-
contentWidth += 2 *
|
|
67978
|
+
contentWidth += 2 * PADDING_AUTORESIZE_HORIZONTAL;
|
|
67925
67979
|
if (style.wrapping === "wrap") {
|
|
67926
67980
|
const colWidth = this.getters.getColSize(position.sheetId, position.col);
|
|
67927
67981
|
return Math.min(colWidth, contentWidth);
|
|
@@ -67972,11 +68026,11 @@ var SheetUIPlugin = class extends UIPlugin {
|
|
|
67972
68026
|
computeTextYCoordinate(cellRect, textLineHeight, verticalAlign = DEFAULT_VERTICAL_ALIGN, numberOfLines = 1) {
|
|
67973
68027
|
const y = cellRect.y + 1;
|
|
67974
68028
|
const textHeight = computeTextLinesHeight(textLineHeight, numberOfLines);
|
|
67975
|
-
if (cellRect.height > textHeight +
|
|
68029
|
+
if (cellRect.height > textHeight + MIN_CELL_TEXT_MARGIN * 2) {
|
|
67976
68030
|
if (verticalAlign === "middle") return Math.ceil(y + (cellRect.height - textHeight) / 2);
|
|
67977
|
-
if (verticalAlign === "bottom") return y + cellRect.height - textHeight -
|
|
68031
|
+
if (verticalAlign === "bottom") return y + cellRect.height - textHeight - MIN_CELL_TEXT_MARGIN;
|
|
67978
68032
|
}
|
|
67979
|
-
return y +
|
|
68033
|
+
return y + MIN_CELL_TEXT_MARGIN;
|
|
67980
68034
|
}
|
|
67981
68035
|
/**
|
|
67982
68036
|
* Expands the given zone until bordered by empty cells or reached the sheet boundaries.
|
|
@@ -68081,11 +68135,11 @@ var SheetUIPlugin = class extends UIPlugin {
|
|
|
68081
68135
|
if (cell.isFormula || this.getters.getArrayFormulaSpreadingOn(position)) {
|
|
68082
68136
|
const content = this.getters.getEvaluatedCell(position).formattedValue;
|
|
68083
68137
|
const evaluatedSize = getCellContentHeight(this.ctx, content, cell?.style, colSize);
|
|
68084
|
-
if (evaluatedSize > evaluatedRowSize && evaluatedSize >
|
|
68138
|
+
if (evaluatedSize > evaluatedRowSize && evaluatedSize > DEFAULT_CELL_HEIGHT) evaluatedRowSize = evaluatedSize;
|
|
68085
68139
|
} else {
|
|
68086
68140
|
const content = cell.content;
|
|
68087
68141
|
const dynamicRowSize = getCellContentHeight(this.ctx, content, cell?.style, colSize);
|
|
68088
|
-
if (dynamicRowSize >= evaluatedRowSize && dynamicRowSize >
|
|
68142
|
+
if (dynamicRowSize >= evaluatedRowSize && dynamicRowSize > DEFAULT_CELL_HEIGHT) evaluatedRowSize = 0;
|
|
68089
68143
|
}
|
|
68090
68144
|
}
|
|
68091
68145
|
rowSizes.push(evaluatedRowSize || null);
|
|
@@ -68772,7 +68826,7 @@ var ClipboardPlugin = class extends UIPlugin {
|
|
|
68772
68826
|
const imageUrl = this.getters.getImage(figureId).path;
|
|
68773
68827
|
file = await this.fileStore?.getFile(imageUrl);
|
|
68774
68828
|
if (file.type !== "image/png") {
|
|
68775
|
-
if (file.size >
|
|
68829
|
+
if (file.size > MAX_FILE_SIZE) {
|
|
68776
68830
|
this.ui.notifyUI({
|
|
68777
68831
|
text: _t("The file you are trying to copy is too large (>%sMB).\nIt will not be added to your OS clipboard.\nYou can download it directly instead.", Math.round(MAX_FILE_SIZE / (1024 * 1024))),
|
|
68778
68832
|
sticky: false,
|
|
@@ -69932,7 +69986,7 @@ var InternalViewport = class {
|
|
|
69932
69986
|
let height = lastRowEnd - this.offsetCorrectionY;
|
|
69933
69987
|
if (this.canScrollVertically) {
|
|
69934
69988
|
height = Math.max(height, this.viewportHeight);
|
|
69935
|
-
if (lastRowEnd +
|
|
69989
|
+
if (lastRowEnd + FOOTER_HEIGHT > height && !this.getters.isReadonly() && this.viewportHeight > FOOTER_HEIGHT) height += FOOTER_HEIGHT;
|
|
69936
69990
|
}
|
|
69937
69991
|
return {
|
|
69938
69992
|
width,
|
|
@@ -70455,7 +70509,7 @@ var SheetViewPlugin = class extends UIPlugin {
|
|
|
70455
70509
|
return this.getSubViewports(sheetId).some((pane) => pane.isVisible(col, row));
|
|
70456
70510
|
}
|
|
70457
70511
|
getScrollBarWidth() {
|
|
70458
|
-
return
|
|
70512
|
+
return SCROLLBAR_WIDTH / this.zoomLevel;
|
|
70459
70513
|
}
|
|
70460
70514
|
getEdgeScrollCol(x, previousX, startingX) {
|
|
70461
70515
|
let canEdgeScroll = false;
|
|
@@ -70968,8 +71022,8 @@ autoCompleteProviders.add("dataValidation", {
|
|
|
70968
71022
|
text: value.value,
|
|
70969
71023
|
htmlContent: [{
|
|
70970
71024
|
value: value.label,
|
|
70971
|
-
color: chipTextColor(color ||
|
|
70972
|
-
backgroundColor: color ||
|
|
71025
|
+
color: chipTextColor(color || GRAY_200),
|
|
71026
|
+
backgroundColor: color || GRAY_200,
|
|
70973
71027
|
classes: ["badge rounded-pill fs-6 fw-normal w-100 mt-1 text-start"]
|
|
70974
71028
|
}],
|
|
70975
71029
|
fuzzySearchKey: value.label
|
|
@@ -71409,8 +71463,8 @@ iconsOnCellRegistry.add("filter_icon", (getters, position) => {
|
|
|
71409
71463
|
hoverSvg: getDataFilterIcon(isFilterActive, isHighContrast, true),
|
|
71410
71464
|
priority: 3,
|
|
71411
71465
|
horizontalAlign: "right",
|
|
71412
|
-
size:
|
|
71413
|
-
margin:
|
|
71466
|
+
size: GRID_ICON_EDGE_LENGTH,
|
|
71467
|
+
margin: GRID_ICON_MARGIN,
|
|
71414
71468
|
position,
|
|
71415
71469
|
onClick: (position, env) => {
|
|
71416
71470
|
const cellPopovers = env.getStore(CellPopoverStore);
|
|
@@ -73360,16 +73414,16 @@ var RowGroup = class extends AbstractHeaderGroup {
|
|
|
73360
73414
|
const startCoordinates = this.env.model.getters.getRowDimensions(sheetId, startRow).start;
|
|
73361
73415
|
const endCoordinates = this.env.model.getters.getRowDimensions(sheetId, endRow).end;
|
|
73362
73416
|
let groupHeaderY = 0;
|
|
73363
|
-
let groupHeaderHeight =
|
|
73417
|
+
let groupHeaderHeight = HEADER_HEIGHT;
|
|
73364
73418
|
if (startRow !== 0) {
|
|
73365
73419
|
const headerRowDims = this.env.model.getters.getRowDimensions(sheetId, startRow - 1);
|
|
73366
|
-
groupHeaderY =
|
|
73420
|
+
groupHeaderY = HEADER_HEIGHT + headerRowDims.start;
|
|
73367
73421
|
groupHeaderHeight = headerRowDims.end - headerRowDims.start;
|
|
73368
73422
|
}
|
|
73369
73423
|
const headerRect = {
|
|
73370
73424
|
x: this.props.layerOffset,
|
|
73371
73425
|
y: groupHeaderY,
|
|
73372
|
-
width:
|
|
73426
|
+
width: GROUP_LAYER_WIDTH,
|
|
73373
73427
|
height: groupHeaderHeight
|
|
73374
73428
|
};
|
|
73375
73429
|
return {
|
|
@@ -73377,7 +73431,7 @@ var RowGroup = class extends AbstractHeaderGroup {
|
|
|
73377
73431
|
groupRect: {
|
|
73378
73432
|
x: this.props.layerOffset,
|
|
73379
73433
|
y: headerRect.y,
|
|
73380
|
-
width:
|
|
73434
|
+
width: GROUP_LAYER_WIDTH,
|
|
73381
73435
|
height: headerRect.height + (endCoordinates - startCoordinates)
|
|
73382
73436
|
},
|
|
73383
73437
|
isEndHidden: this.env.model.getters.isRowHidden(sheetId, endRow)
|
|
@@ -73410,17 +73464,17 @@ var ColGroup = class extends AbstractHeaderGroup {
|
|
|
73410
73464
|
const startCoordinates = this.env.model.getters.getColDimensions(sheetId, startCol).start;
|
|
73411
73465
|
const endCoordinates = this.env.model.getters.getColDimensions(sheetId, endCol).end;
|
|
73412
73466
|
let groupHeaderX = 0;
|
|
73413
|
-
let groupHeaderWidth =
|
|
73467
|
+
let groupHeaderWidth = HEADER_WIDTH;
|
|
73414
73468
|
if (startCol !== 0) {
|
|
73415
73469
|
const headerRowDims = this.env.model.getters.getColDimensions(sheetId, startCol - 1);
|
|
73416
|
-
groupHeaderX =
|
|
73470
|
+
groupHeaderX = HEADER_WIDTH + headerRowDims.start;
|
|
73417
73471
|
groupHeaderWidth = headerRowDims.end - headerRowDims.start;
|
|
73418
73472
|
}
|
|
73419
73473
|
const headerRect = {
|
|
73420
73474
|
x: groupHeaderX,
|
|
73421
73475
|
y: this.props.layerOffset,
|
|
73422
73476
|
width: groupHeaderWidth,
|
|
73423
|
-
height:
|
|
73477
|
+
height: GROUP_LAYER_WIDTH
|
|
73424
73478
|
};
|
|
73425
73479
|
return {
|
|
73426
73480
|
headerRect,
|
|
@@ -73428,7 +73482,7 @@ var ColGroup = class extends AbstractHeaderGroup {
|
|
|
73428
73482
|
x: headerRect.x,
|
|
73429
73483
|
y: this.props.layerOffset,
|
|
73430
73484
|
width: headerRect.width + (endCoordinates - startCoordinates),
|
|
73431
|
-
height:
|
|
73485
|
+
height: GROUP_LAYER_WIDTH
|
|
73432
73486
|
},
|
|
73433
73487
|
isEndHidden: this.env.model.getters.isColHidden(sheetId, endCol)
|
|
73434
73488
|
};
|
|
@@ -73454,7 +73508,7 @@ var HeaderGroupContainer = class extends Component {
|
|
|
73454
73508
|
menuItems: []
|
|
73455
73509
|
});
|
|
73456
73510
|
getLayerOffset(layerIndex) {
|
|
73457
|
-
return layerIndex *
|
|
73511
|
+
return layerIndex * GROUP_LAYER_WIDTH;
|
|
73458
73512
|
}
|
|
73459
73513
|
onContextMenu(event) {
|
|
73460
73514
|
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
@@ -73502,8 +73556,8 @@ var HeaderGroupContainer = class extends Component {
|
|
|
73502
73556
|
get frozenPaneContainerSize() {
|
|
73503
73557
|
if (!this.hasFrozenPane) return 0;
|
|
73504
73558
|
const viewportCoordinates = this.env.model.getters.getMainViewportCoordinates();
|
|
73505
|
-
if (this.props.dimension === "COL") return
|
|
73506
|
-
else return
|
|
73559
|
+
if (this.props.dimension === "COL") return HEADER_WIDTH + viewportCoordinates.x;
|
|
73560
|
+
else return HEADER_HEIGHT + viewportCoordinates.y;
|
|
73507
73561
|
}
|
|
73508
73562
|
};
|
|
73509
73563
|
|
|
@@ -73512,7 +73566,7 @@ var HeaderGroupContainer = class extends Component {
|
|
|
73512
73566
|
function useScreenWidth() {
|
|
73513
73567
|
const spreadsheetRect = useSpreadsheetRect();
|
|
73514
73568
|
return { get isSmall() {
|
|
73515
|
-
return spreadsheetRect.width <
|
|
73569
|
+
return spreadsheetRect.width < MOBILE_WIDTH_BREAKPOINT;
|
|
73516
73570
|
} };
|
|
73517
73571
|
}
|
|
73518
73572
|
|
|
@@ -73822,7 +73876,7 @@ var TopBarComposer = class extends Component {
|
|
|
73822
73876
|
"line-height": "24px"
|
|
73823
73877
|
};
|
|
73824
73878
|
if (this.env.model.getters.isCurrentSheetLocked()) style["pointer-events"] = "none";
|
|
73825
|
-
style.height = this.focus === "inactive" ? `${
|
|
73879
|
+
style.height = this.focus === "inactive" ? `${DESKTOP_TOPBAR_TOOLBAR_HEIGHT}px` : "fit-content";
|
|
73826
73880
|
return cssPropertiesToCss(style);
|
|
73827
73881
|
}
|
|
73828
73882
|
onFocus(selection) {
|
|
@@ -74817,7 +74871,7 @@ var Spreadsheet = class extends Component {
|
|
|
74817
74871
|
const scrollbarWidth = this.env.model.getters.getScrollBarWidth();
|
|
74818
74872
|
if (this.env.isDashboard()) properties["grid-template-rows"] = `auto`;
|
|
74819
74873
|
else properties["grid-template-rows"] = `min-content auto min-content`;
|
|
74820
|
-
properties["grid-template-columns"] = `auto ${this.sidePanel.mainPanel ? `${this.sidePanel.totalPanelSize ||
|
|
74874
|
+
properties["grid-template-columns"] = `auto ${this.sidePanel.mainPanel ? `${this.sidePanel.totalPanelSize || DEFAULT_SIDE_PANEL_SIZE}px` : "auto"}`;
|
|
74821
74875
|
properties["--os-scrollbar-width"] = `${scrollbarWidth}px`;
|
|
74822
74876
|
properties["color-scheme"] = this.props.colorScheme;
|
|
74823
74877
|
return cssPropertiesToCss(properties);
|
|
@@ -74912,7 +74966,7 @@ var Spreadsheet = class extends Component {
|
|
|
74912
74966
|
checkViewportSize() {
|
|
74913
74967
|
const { xRatio, yRatio } = this.env.model.getters.getFrozenSheetViewRatio(this.env.model.getters.getActiveSheetId());
|
|
74914
74968
|
if (!isFinite(xRatio) || !isFinite(yRatio)) return;
|
|
74915
|
-
if (yRatio >
|
|
74969
|
+
if (yRatio > MAXIMAL_FREEZABLE_RATIO || xRatio > MAXIMAL_FREEZABLE_RATIO) {
|
|
74916
74970
|
if (this.isViewportTooSmall) return;
|
|
74917
74971
|
this.notificationStore.notifyUser({
|
|
74918
74972
|
text: _t("The current window is too small to display this sheet properly. Consider resizing your browser window or adjusting frozen rows and columns."),
|
|
@@ -74930,8 +74984,8 @@ var Spreadsheet = class extends Component {
|
|
|
74930
74984
|
return this.env.model.getters.getSheetViewDimension().height;
|
|
74931
74985
|
}
|
|
74932
74986
|
get gridContainerStyle() {
|
|
74933
|
-
const gridColSize =
|
|
74934
|
-
const gridRowSize =
|
|
74987
|
+
const gridColSize = GROUP_LAYER_WIDTH * this.rowLayers.length;
|
|
74988
|
+
const gridRowSize = GROUP_LAYER_WIDTH * this.colLayers.length;
|
|
74935
74989
|
const zoom = this.env.model.getters.getViewportZoomLevel();
|
|
74936
74990
|
return cssPropertiesToCss({
|
|
74937
74991
|
"grid-template-columns": `${gridColSize ? gridColSize + 2 : 0}px auto`,
|
|
@@ -76744,7 +76798,7 @@ function createChart(chart, chartSheetIndex, data) {
|
|
|
76744
76798
|
let title = escapeXml``;
|
|
76745
76799
|
if (chart.data.title?.text) {
|
|
76746
76800
|
const titleColor = toXlsxHexColor(chartMutedFontColor(chart.data.backgroundColor));
|
|
76747
|
-
const fontSize = chart.data.title.fontSize ??
|
|
76801
|
+
const fontSize = chart.data.title.fontSize ?? CHART_TITLE_FONT_SIZE;
|
|
76748
76802
|
title = escapeXml`
|
|
76749
76803
|
<c:title>
|
|
76750
76804
|
${insertText(chart.data.title.text, titleColor, fontSize, chart.data.title)}
|
|
@@ -76835,7 +76889,7 @@ function lineAttributes(params) {
|
|
|
76835
76889
|
</a:ln>
|
|
76836
76890
|
`;
|
|
76837
76891
|
}
|
|
76838
|
-
function insertText(text, fontColor = "000000", fontsize =
|
|
76892
|
+
function insertText(text, fontColor = "000000", fontsize = CHART_TITLE_FONT_SIZE, style = {}) {
|
|
76839
76893
|
const textProperties = [
|
|
76840
76894
|
["b", style.bold ? "1" : "0"],
|
|
76841
76895
|
["i", style.italic ? "1" : "0"],
|
|
@@ -77422,7 +77476,7 @@ function addDoughnutChart(chart, chartSheetIndex, data) {
|
|
|
77422
77476
|
return escapeXml`
|
|
77423
77477
|
<c:doughnutChart>
|
|
77424
77478
|
<c:varyColors val="1" />
|
|
77425
|
-
<c:holeSize val="${chart.pieHolePercentage ?? (chart.isDoughnut ?
|
|
77479
|
+
<c:holeSize val="${chart.pieHolePercentage ?? (chart.isDoughnut ? DEFAULT_DOUGHNUT_CHART_HOLE_SIZE : 0)}" />
|
|
77426
77480
|
${joinXmlNodes(dataSetsNodes)}
|
|
77427
77481
|
${insertDataLabels({ showValues: chart.showValues })}
|
|
77428
77482
|
</c:doughnutChart>
|
|
@@ -77446,7 +77500,7 @@ function insertDataLabels({ showLeaderLines, showValues } = {
|
|
|
77446
77500
|
}
|
|
77447
77501
|
function addAx(position, axisName, axId, crossAxId, title, defaultFontColor, deleteAxis = 0, orientation = "minMax", crossPosition, tickLabelPosition = "nextTo", maxValue, majorUnit, format = "General") {
|
|
77448
77502
|
const color = title?.color ? toXlsxHexColor(title.color) : defaultFontColor;
|
|
77449
|
-
const fontSize = title?.fontSize ??
|
|
77503
|
+
const fontSize = title?.fontSize ?? CHART_AXIS_TITLE_FONT_SIZE;
|
|
77450
77504
|
const crossBetweenEl = axisName === "c:valAx" ? escapeXml`<c:crossBetween val="between" />` : "";
|
|
77451
77505
|
const maxValueEl = maxValue ? escapeXml`<c:max val="${maxValue}" />` : "";
|
|
77452
77506
|
const minValueEl = maxValue ? escapeXml`<c:min val="${-maxValue}" />` : "";
|
|
@@ -78074,12 +78128,12 @@ function figureCoordinates(headers, anchor, offset) {
|
|
|
78074
78128
|
let currentPosition = 0;
|
|
78075
78129
|
for (const [headerIndex, header] of headers.slice(anchor).entries()) if (currentPosition <= offset && offset < currentPosition + header.size) return {
|
|
78076
78130
|
index: anchor + headerIndex,
|
|
78077
|
-
offset: convertDotValueToEMU(offset - currentPosition +
|
|
78131
|
+
offset: convertDotValueToEMU(offset - currentPosition + FIGURE_BORDER_WIDTH)
|
|
78078
78132
|
};
|
|
78079
78133
|
else if (headerIndex < headers.length - 1) currentPosition += header.size;
|
|
78080
78134
|
return {
|
|
78081
78135
|
index: headers.length - 1,
|
|
78082
|
-
offset: convertDotValueToEMU(offset - currentPosition +
|
|
78136
|
+
offset: convertDotValueToEMU(offset - currentPosition + FIGURE_BORDER_WIDTH)
|
|
78083
78137
|
};
|
|
78084
78138
|
}
|
|
78085
78139
|
function createChartDrawing(figure, sheet, chartRelId, construct) {
|
|
@@ -78185,7 +78239,7 @@ function addSheetProtection(sheet) {
|
|
|
78185
78239
|
function addNumberFormats(numFmts) {
|
|
78186
78240
|
const numFmtNodes = [];
|
|
78187
78241
|
for (const [index, numFmt] of Object.entries(numFmts)) {
|
|
78188
|
-
const numFmtAttrs = [["numFmtId", parseInt(index) +
|
|
78242
|
+
const numFmtAttrs = [["numFmtId", parseInt(index) + FIRST_NUMFMT_ID], ["formatCode", numFmt.format]];
|
|
78189
78243
|
numFmtNodes.push(escapeXml`
|
|
78190
78244
|
<numFmt ${formatAttributes(numFmtAttrs)}/>
|
|
78191
78245
|
`);
|
|
@@ -78418,7 +78472,7 @@ function addColumns(cols) {
|
|
|
78418
78472
|
const attributes = [
|
|
78419
78473
|
["min", parseInt(id) + 1],
|
|
78420
78474
|
["max", parseInt(id) + 1],
|
|
78421
|
-
["width", convertWidthToExcel(col.size ||
|
|
78475
|
+
["width", convertWidthToExcel(col.size || DEFAULT_CELL_WIDTH)],
|
|
78422
78476
|
["customWidth", 1],
|
|
78423
78477
|
["hidden", col.isHidden ? 1 : 0]
|
|
78424
78478
|
];
|
|
@@ -78442,7 +78496,7 @@ function addRows(construct, data, sheet) {
|
|
|
78442
78496
|
for (let r = 0; r < sheet.rowNumber; r++) {
|
|
78443
78497
|
const rowAttrs = [["r", r + 1]];
|
|
78444
78498
|
const row = sheet.rows[r] || {};
|
|
78445
|
-
if (row.size && row.size !==
|
|
78499
|
+
if (row.size && row.size !== DEFAULT_CELL_HEIGHT) rowAttrs.push(["ht", convertHeightToExcel(row.size)], ["customHeight", 1]);
|
|
78446
78500
|
if (row.isHidden) rowAttrs.push(["hidden", 1]);
|
|
78447
78501
|
if (row.outlineLevel) rowAttrs.push(["outlineLevel", row.outlineLevel]);
|
|
78448
78502
|
if (row.collapsed) rowAttrs.push(["collapsed", 1]);
|
|
@@ -78484,7 +78538,7 @@ function addRows(construct, data, sheet) {
|
|
|
78484
78538
|
</c>`);
|
|
78485
78539
|
}
|
|
78486
78540
|
}
|
|
78487
|
-
if (cellNodes.length || row.size !==
|
|
78541
|
+
if (cellNodes.length || row.size !== DEFAULT_CELL_HEIGHT || row.isHidden || row.outlineLevel || row.collapsed) rowNodes.push(escapeXml`
|
|
78488
78542
|
<row ${formatAttributes(rowAttrs)}>
|
|
78489
78543
|
${joinXmlNodes(cellNodes)}
|
|
78490
78544
|
</row>
|
|
@@ -78657,7 +78711,7 @@ function createWorksheets(data, construct) {
|
|
|
78657
78711
|
let currentTableIndex = 1;
|
|
78658
78712
|
for (const [sheetIndex, sheet] of Object.entries(data.sheets)) {
|
|
78659
78713
|
const namespaces = [["xmlns", NAMESPACE["worksheet"]], ["xmlns:r", RELATIONSHIP_NSR]];
|
|
78660
|
-
const sheetFormatAttributes = [["defaultRowHeight", convertHeightToExcel(
|
|
78714
|
+
const sheetFormatAttributes = [["defaultRowHeight", convertHeightToExcel(DEFAULT_CELL_HEIGHT)], ["defaultColWidth", convertWidthToExcel(DEFAULT_CELL_WIDTH)]];
|
|
78661
78715
|
const tablesNode = createTablesForSheet(sheet, sheetIndex, currentTableIndex, construct, files);
|
|
78662
78716
|
currentTableIndex += sheet.tables.length;
|
|
78663
78717
|
let drawingNode = escapeXml``;
|
|
@@ -79358,7 +79412,7 @@ var Model = class Model extends EventBus {
|
|
|
79358
79412
|
_exportData(shouldSquish) {
|
|
79359
79413
|
let data = createEmptyWorkbookData();
|
|
79360
79414
|
for (const handler of this.handlers) if (handler instanceof CorePlugin) handler.export(data, shouldSquish);
|
|
79361
|
-
data.revisionId = this.session.getRevisionId() ||
|
|
79415
|
+
data.revisionId = this.session.getRevisionId() || DEFAULT_REVISION_ID;
|
|
79362
79416
|
data = deepCopy(data);
|
|
79363
79417
|
return data;
|
|
79364
79418
|
}
|
|
@@ -79593,7 +79647,7 @@ var ComboChart = class ComboChart extends AbstractChart {
|
|
|
79593
79647
|
const definition = this.getDefinition();
|
|
79594
79648
|
return {
|
|
79595
79649
|
...definition,
|
|
79596
|
-
backgroundColor: toXlsxHexColor(this.background ||
|
|
79650
|
+
backgroundColor: toXlsxHexColor(this.background || BACKGROUND_CHART_COLOR),
|
|
79597
79651
|
fontColor: toXlsxHexColor(chartFontColor(this.background)),
|
|
79598
79652
|
dataSets,
|
|
79599
79653
|
labelRange,
|
|
@@ -80008,7 +80062,7 @@ var PyramidChart = class PyramidChart extends AbstractChart {
|
|
|
80008
80062
|
return {
|
|
80009
80063
|
...definition,
|
|
80010
80064
|
horizontal: true,
|
|
80011
|
-
backgroundColor: toXlsxHexColor(this.background ||
|
|
80065
|
+
backgroundColor: toXlsxHexColor(this.background || BACKGROUND_CHART_COLOR),
|
|
80012
80066
|
fontColor: toXlsxHexColor(chartFontColor(this.background)),
|
|
80013
80067
|
dataSets,
|
|
80014
80068
|
labelRange,
|
|
@@ -80148,7 +80202,7 @@ var RadarChart = class RadarChart extends AbstractChart {
|
|
|
80148
80202
|
const { dataSets, labelRange } = this.getCommonDataSetAttributesForExcel(this.labelRange, this.dataSets, shouldRemoveFirstLabel(this.labelRange, this.dataSets[0], this.dataSetsHaveTitle));
|
|
80149
80203
|
return {
|
|
80150
80204
|
...this.getDefinition(),
|
|
80151
|
-
backgroundColor: toXlsxHexColor(this.background ||
|
|
80205
|
+
backgroundColor: toXlsxHexColor(this.background || BACKGROUND_CHART_COLOR),
|
|
80152
80206
|
fontColor: toXlsxHexColor(chartFontColor(this.background)),
|
|
80153
80207
|
dataSets,
|
|
80154
80208
|
labelRange
|
|
@@ -81581,14 +81635,14 @@ clipboardHandlersRegistries.cellHandlers.add("dataValidation", DataValidationCli
|
|
|
81581
81635
|
*/
|
|
81582
81636
|
const __info__ = {};
|
|
81583
81637
|
const SPREADSHEET_DIMENSIONS = {
|
|
81584
|
-
MIN_ROW_HEIGHT
|
|
81585
|
-
MIN_COL_WIDTH
|
|
81586
|
-
HEADER_HEIGHT
|
|
81587
|
-
HEADER_WIDTH
|
|
81588
|
-
DESKTOP_BOTTOMBAR_HEIGHT
|
|
81589
|
-
DEFAULT_CELL_WIDTH
|
|
81590
|
-
DEFAULT_CELL_HEIGHT
|
|
81591
|
-
SCROLLBAR_WIDTH
|
|
81638
|
+
MIN_ROW_HEIGHT,
|
|
81639
|
+
MIN_COL_WIDTH,
|
|
81640
|
+
HEADER_HEIGHT,
|
|
81641
|
+
HEADER_WIDTH,
|
|
81642
|
+
DESKTOP_BOTTOMBAR_HEIGHT,
|
|
81643
|
+
DEFAULT_CELL_WIDTH,
|
|
81644
|
+
DEFAULT_CELL_HEIGHT,
|
|
81645
|
+
SCROLLBAR_WIDTH
|
|
81592
81646
|
};
|
|
81593
81647
|
const registries = {
|
|
81594
81648
|
autoCompleteProviders,
|
|
@@ -81810,9 +81864,9 @@ const constants = {
|
|
|
81810
81864
|
PIVOT_STATIC_TABLE_CONFIG,
|
|
81811
81865
|
PIVOT_INSERT_TABLE_STYLE_ID,
|
|
81812
81866
|
ChartTerms,
|
|
81813
|
-
FIGURE_ID_SPLITTER
|
|
81814
|
-
GRID_ICON_EDGE_LENGTH
|
|
81815
|
-
GRID_ICON_MARGIN
|
|
81867
|
+
FIGURE_ID_SPLITTER,
|
|
81868
|
+
GRID_ICON_EDGE_LENGTH,
|
|
81869
|
+
GRID_ICON_MARGIN
|
|
81816
81870
|
};
|
|
81817
81871
|
const chartHelpers = {
|
|
81818
81872
|
...charts_exports,
|
|
@@ -81822,6 +81876,6 @@ const chartHelpers = {
|
|
|
81822
81876
|
//#endregion
|
|
81823
81877
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CompiledFormula, CorePlugin, CoreViewPlugin, DEFAULT_LOCALE, DEFAULT_LOCALES, DispatchResult, EvaluationError, LocalTransportService, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, canExecuteInReadonly, categories, chartHelpers, components, constants, convertAstNodes, coreTypes, createAutocompleteArgumentsProvider, findCellInNewZone, functionCache, getCaretDownSvg, getCaretUpSvg, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isSheetDependent, iterateAstNodes, links, load, lockedSheetAllowedCommands, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
81824
81878
|
|
|
81825
|
-
__info__.version = "19.2.
|
|
81826
|
-
__info__.date = "2026-
|
|
81827
|
-
__info__.hash = "
|
|
81879
|
+
__info__.version = "19.2.31";
|
|
81880
|
+
__info__.date = "2026-10-01T07:52:54.414Z";
|
|
81881
|
+
__info__.hash = "a784cea";
|