@odoo/o-spreadsheet 19.4.9 → 19.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/o_spreadsheet.cjs +350 -295
- package/dist/o_spreadsheet.css +17 -6
- package/dist/o_spreadsheet.esm.js +350 -295
- package/dist/o_spreadsheet.iife.js +350 -295
- package/dist/o_spreadsheet.min.iife.js +256 -256
- package/dist/o_spreadsheet.xml +7 -7
- package/dist/types/collaborative/session.d.ts +3 -1
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/helpers/text_helper.d.ts +4 -0
- package/dist/types/plugins/core/carousel.d.ts +1 -1
- package/dist/types/plugins/core/squisher.d.ts +3 -0
- package/dist/types/types/collaborative/transport_service.d.ts +1 -0
- package/package.json +2 -2
|
@@ -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.4.
|
|
6
|
-
* @date 2026-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 19.4.11
|
|
6
|
+
* @date 2026-09-04T07:50:39.272Z
|
|
7
|
+
* @hash 7660254
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import * as owl from "@odoo/owl";
|
|
@@ -445,6 +445,7 @@ const FILTERS_COLOR = "#188038";
|
|
|
445
445
|
const COMPOSER_ASSISTANT_COLOR = "light-dark(#9B359B, #B972A6)";
|
|
446
446
|
const COLOR_TRANSPARENT = "#00000000";
|
|
447
447
|
const TABLE_HOVER_BACKGROUND_COLOR = "#017E8414";
|
|
448
|
+
const DEFAULT_CHART_BACKGROUND_COLOR = "#FFFFFF";
|
|
448
449
|
const CHART_WATERFALL_POSITIVE_COLOR = "#4EA7F2";
|
|
449
450
|
const CHART_WATERFALL_NEGATIVE_COLOR = "#EA6175";
|
|
450
451
|
const CHART_WATERFALL_SUBTOTAL_COLOR = "#AAAAAA";
|
|
@@ -7895,7 +7896,8 @@ const readonlyAllowedCommands = /* @__PURE__ */ new Set([
|
|
|
7895
7896
|
"UPDATE_CHART",
|
|
7896
7897
|
"UPDATE_CHART_REGION",
|
|
7897
7898
|
"UPDATE_CAROUSEL_ACTIVE_ITEM",
|
|
7898
|
-
"UPDATE_PIVOT"
|
|
7899
|
+
"UPDATE_PIVOT",
|
|
7900
|
+
"UPDATE_COLOR_SCHEME"
|
|
7899
7901
|
]);
|
|
7900
7902
|
const lockedSheetAllowedCommands = /* @__PURE__ */ new Set([
|
|
7901
7903
|
"LOCK_SHEET",
|
|
@@ -8991,6 +8993,259 @@ const chartMinorGridPlugin = {
|
|
|
8991
8993
|
}
|
|
8992
8994
|
};
|
|
8993
8995
|
|
|
8996
|
+
//#endregion
|
|
8997
|
+
//#region src/xlsx/constants.ts
|
|
8998
|
+
/** In XLSX color format (no #) */
|
|
8999
|
+
const AUTO_COLOR = "000000";
|
|
9000
|
+
const XLSX_ICONSET_MAP = {
|
|
9001
|
+
arrows: "3Arrows",
|
|
9002
|
+
smiley: "3Symbols",
|
|
9003
|
+
dots: "3TrafficLights1"
|
|
9004
|
+
};
|
|
9005
|
+
const NAMESPACE = {
|
|
9006
|
+
styleSheet: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
9007
|
+
sst: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
9008
|
+
Relationships: "http://schemas.openxmlformats.org/package/2006/relationships",
|
|
9009
|
+
Types: "http://schemas.openxmlformats.org/package/2006/content-types",
|
|
9010
|
+
worksheet: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
9011
|
+
workbook: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
9012
|
+
drawing: "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing",
|
|
9013
|
+
table: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
9014
|
+
revision: "http://schemas.microsoft.com/office/spreadsheetml/2014/revision",
|
|
9015
|
+
revision3: "http://schemas.microsoft.com/office/spreadsheetml/2016/revision3",
|
|
9016
|
+
markupCompatibility: "http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
9017
|
+
};
|
|
9018
|
+
const DRAWING_NS_A = "http://schemas.openxmlformats.org/drawingml/2006/main";
|
|
9019
|
+
const DRAWING_NS_C = "http://schemas.openxmlformats.org/drawingml/2006/chart";
|
|
9020
|
+
const CONTENT_TYPES = {
|
|
9021
|
+
workbook: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",
|
|
9022
|
+
macroEnabledWorkbook: "application/vnd.ms-excel.sheet.macroEnabled.main+xml",
|
|
9023
|
+
templateWorkbook: "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml",
|
|
9024
|
+
macroEnabledTemplateWorkbook: "application/vnd.ms-excel.template.macroEnabled.main+xml",
|
|
9025
|
+
excelAddInWorkbook: "application/vnd.ms-excel.addin.macroEnabled.main+xml",
|
|
9026
|
+
sheet: "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",
|
|
9027
|
+
metadata: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",
|
|
9028
|
+
sharedStrings: "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",
|
|
9029
|
+
styles: "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",
|
|
9030
|
+
drawing: "application/vnd.openxmlformats-officedocument.drawing+xml",
|
|
9031
|
+
chart: "application/vnd.openxmlformats-officedocument.drawingml.chart+xml",
|
|
9032
|
+
themes: "application/vnd.openxmlformats-officedocument.theme+xml",
|
|
9033
|
+
table: "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml",
|
|
9034
|
+
pivot: "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml",
|
|
9035
|
+
externalLink: "application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml"
|
|
9036
|
+
};
|
|
9037
|
+
const XLSX_RELATION_TYPE = {
|
|
9038
|
+
document: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",
|
|
9039
|
+
sheet: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",
|
|
9040
|
+
metadata: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",
|
|
9041
|
+
sharedStrings: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",
|
|
9042
|
+
styles: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",
|
|
9043
|
+
drawing: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",
|
|
9044
|
+
chart: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",
|
|
9045
|
+
theme: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",
|
|
9046
|
+
table: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/table",
|
|
9047
|
+
hyperlink: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",
|
|
9048
|
+
image: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"
|
|
9049
|
+
};
|
|
9050
|
+
const ARRAY_FORMULA_URI = "bdbb8cdc-fa1e-496e-a857-3c3f30c029c3";
|
|
9051
|
+
const RELATIONSHIP_NSR = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
|
|
9052
|
+
const HEIGHT_FACTOR = .75;
|
|
9053
|
+
/**
|
|
9054
|
+
* Excel says its default column width is 8.43 characters (64px)
|
|
9055
|
+
* which makes WIDTH_FACTOR = 0.1317, but it doesn't work well
|
|
9056
|
+
* 0.143 is a value from dev's experiments.
|
|
9057
|
+
*/
|
|
9058
|
+
const WIDTH_FACTOR = .143;
|
|
9059
|
+
/** unit : maximum number of characters a column can hold at the standard font size. What. */
|
|
9060
|
+
const EXCEL_DEFAULT_COL_WIDTH = 8.43;
|
|
9061
|
+
/** unit : points */
|
|
9062
|
+
const EXCEL_DEFAULT_ROW_HEIGHT = 12.75;
|
|
9063
|
+
const FORCE_DEFAULT_ARGS_FUNCTIONS = {
|
|
9064
|
+
FLOOR: [{
|
|
9065
|
+
type: "NUMBER",
|
|
9066
|
+
value: 1
|
|
9067
|
+
}],
|
|
9068
|
+
CEILING: [{
|
|
9069
|
+
type: "NUMBER",
|
|
9070
|
+
value: 1
|
|
9071
|
+
}],
|
|
9072
|
+
ROUND: [{
|
|
9073
|
+
type: "NUMBER",
|
|
9074
|
+
value: 0
|
|
9075
|
+
}],
|
|
9076
|
+
ROUNDUP: [{
|
|
9077
|
+
type: "NUMBER",
|
|
9078
|
+
value: 0
|
|
9079
|
+
}],
|
|
9080
|
+
ROUNDDOWN: [{
|
|
9081
|
+
type: "NUMBER",
|
|
9082
|
+
value: 0
|
|
9083
|
+
}],
|
|
9084
|
+
IFERROR: [{
|
|
9085
|
+
type: "NUMBER",
|
|
9086
|
+
value: 0
|
|
9087
|
+
}]
|
|
9088
|
+
};
|
|
9089
|
+
/**
|
|
9090
|
+
* This list contains all "future" functions that are not compatible with older versions of Excel
|
|
9091
|
+
* For more information, see https://docs.microsoft.com/en-us/openspecs/office_standards/ms-xlsx/5d1b6d44-6fc1-4ecd-8fef-0b27406cc2bf
|
|
9092
|
+
*/
|
|
9093
|
+
const NON_RETROCOMPATIBLE_FUNCTIONS = [
|
|
9094
|
+
"ACOT",
|
|
9095
|
+
"ACOTH",
|
|
9096
|
+
"AGGREGATE",
|
|
9097
|
+
"ARABIC",
|
|
9098
|
+
"BASE",
|
|
9099
|
+
"BETA.DIST",
|
|
9100
|
+
"BETA.INV",
|
|
9101
|
+
"BINOM.DIST",
|
|
9102
|
+
"BINOM.DIST.RANGE",
|
|
9103
|
+
"BINOM.INV",
|
|
9104
|
+
"BITAND",
|
|
9105
|
+
"BITLSHIFT",
|
|
9106
|
+
"BITOR",
|
|
9107
|
+
"BITRSHIFT",
|
|
9108
|
+
"BITXOR",
|
|
9109
|
+
"BYCOL",
|
|
9110
|
+
"BYROW",
|
|
9111
|
+
"CEILING.MATH",
|
|
9112
|
+
"CEILING.PRECISE",
|
|
9113
|
+
"CHISQ.DIST",
|
|
9114
|
+
"CHISQ.DIST.RT",
|
|
9115
|
+
"CHISQ.INV",
|
|
9116
|
+
"CHISQ.INV.RT",
|
|
9117
|
+
"CHISQ.TEST",
|
|
9118
|
+
"CHOOSECOLS",
|
|
9119
|
+
"CHOOSEROWS",
|
|
9120
|
+
"COMBINA",
|
|
9121
|
+
"CONCAT",
|
|
9122
|
+
"CONFIDENCE.NORM",
|
|
9123
|
+
"CONFIDENCE.T",
|
|
9124
|
+
"COT",
|
|
9125
|
+
"COTH",
|
|
9126
|
+
"COVARIANCE.P",
|
|
9127
|
+
"COVARIANCE.S",
|
|
9128
|
+
"CSC",
|
|
9129
|
+
"CSCH",
|
|
9130
|
+
"DAYS",
|
|
9131
|
+
"DECIMAL",
|
|
9132
|
+
"DROP",
|
|
9133
|
+
"ERF.PRECISE",
|
|
9134
|
+
"ERFC.PRECISE",
|
|
9135
|
+
"EXPAND",
|
|
9136
|
+
"EXPON.DIST",
|
|
9137
|
+
"F.DIST",
|
|
9138
|
+
"F.DIST.RT",
|
|
9139
|
+
"F.INV",
|
|
9140
|
+
"F.INV.RT",
|
|
9141
|
+
"F.TEST",
|
|
9142
|
+
"FIELDVALUE",
|
|
9143
|
+
"FILTERXML",
|
|
9144
|
+
"FLOOR.MATH",
|
|
9145
|
+
"FLOOR.PRECISE",
|
|
9146
|
+
"FORECAST.ETS",
|
|
9147
|
+
"FORECAST.ETS.CONFINT",
|
|
9148
|
+
"FORECAST.ETS.SEASONALITY",
|
|
9149
|
+
"FORECAST.ETS.STAT",
|
|
9150
|
+
"FORECAST.LINEAR",
|
|
9151
|
+
"FORMULATEXT",
|
|
9152
|
+
"GAMMA",
|
|
9153
|
+
"GAMMA.DIST",
|
|
9154
|
+
"GAMMA.INV",
|
|
9155
|
+
"GAMMALN.PRECISE",
|
|
9156
|
+
"GAUSS",
|
|
9157
|
+
"HSTACK",
|
|
9158
|
+
"HYPGEOM.DIST",
|
|
9159
|
+
"IFNA",
|
|
9160
|
+
"IFS",
|
|
9161
|
+
"IMCOSH",
|
|
9162
|
+
"IMCOT",
|
|
9163
|
+
"IMCSC",
|
|
9164
|
+
"IMCSCH",
|
|
9165
|
+
"IMSEC",
|
|
9166
|
+
"IMSECH",
|
|
9167
|
+
"IMSINH",
|
|
9168
|
+
"IMTAN",
|
|
9169
|
+
"ISFORMULA",
|
|
9170
|
+
"ISOMITTED",
|
|
9171
|
+
"ISOWEEKNUM",
|
|
9172
|
+
"LAMBDA",
|
|
9173
|
+
"LET",
|
|
9174
|
+
"LOGNORM.DIST",
|
|
9175
|
+
"LOGNORM.INV",
|
|
9176
|
+
"MAKEARRAY",
|
|
9177
|
+
"MAP",
|
|
9178
|
+
"MAXIFS",
|
|
9179
|
+
"MINIFS",
|
|
9180
|
+
"MODE.MULT",
|
|
9181
|
+
"MODE.SNGL",
|
|
9182
|
+
"MUNIT",
|
|
9183
|
+
"NEGBINOM.DIST",
|
|
9184
|
+
"NORM.DIST",
|
|
9185
|
+
"NORM.INV",
|
|
9186
|
+
"NORM.S.DIST",
|
|
9187
|
+
"NORM.S.INV",
|
|
9188
|
+
"NUMBERVALUE",
|
|
9189
|
+
"PDURATION",
|
|
9190
|
+
"PERCENTILE.EXC",
|
|
9191
|
+
"PERCENTILE.INC",
|
|
9192
|
+
"PERCENTRANK.EXC",
|
|
9193
|
+
"PERCENTRANK.INC",
|
|
9194
|
+
"PERMUTATIONA",
|
|
9195
|
+
"PHI",
|
|
9196
|
+
"POISSON.DIST",
|
|
9197
|
+
"PQSOURCE",
|
|
9198
|
+
"PYTHON_STR",
|
|
9199
|
+
"PYTHON_TYPE",
|
|
9200
|
+
"PYTHON_TYPENAME",
|
|
9201
|
+
"QUARTILE.EXC",
|
|
9202
|
+
"QUARTILE.INC",
|
|
9203
|
+
"QUERYSTRING",
|
|
9204
|
+
"RANDARRAY",
|
|
9205
|
+
"RANK.AVG",
|
|
9206
|
+
"RANK.EQ",
|
|
9207
|
+
"REDUCE",
|
|
9208
|
+
"RRI",
|
|
9209
|
+
"SCAN",
|
|
9210
|
+
"SEC",
|
|
9211
|
+
"SECH",
|
|
9212
|
+
"SEQUENCE",
|
|
9213
|
+
"SHEET",
|
|
9214
|
+
"SHEETS",
|
|
9215
|
+
"SKEW.P",
|
|
9216
|
+
"SORTBY",
|
|
9217
|
+
"STDEV.P",
|
|
9218
|
+
"STDEV.S",
|
|
9219
|
+
"SWITCH",
|
|
9220
|
+
"T.DIST",
|
|
9221
|
+
"T.DIST.2T",
|
|
9222
|
+
"T.DIST.RT",
|
|
9223
|
+
"T.INV",
|
|
9224
|
+
"T.INV.2T",
|
|
9225
|
+
"T.TEST",
|
|
9226
|
+
"TAKE",
|
|
9227
|
+
"TEXTAFTER",
|
|
9228
|
+
"TEXTBEFORE",
|
|
9229
|
+
"TEXTJOIN",
|
|
9230
|
+
"TEXTSPLIT",
|
|
9231
|
+
"TOCOL",
|
|
9232
|
+
"TOROW",
|
|
9233
|
+
"UNICHAR",
|
|
9234
|
+
"UNICODE",
|
|
9235
|
+
"UNIQUE",
|
|
9236
|
+
"VAR.P",
|
|
9237
|
+
"VAR.S",
|
|
9238
|
+
"VSTACK",
|
|
9239
|
+
"WEBSERVICE",
|
|
9240
|
+
"WEIBULL.DIST",
|
|
9241
|
+
"WRAPCOLS",
|
|
9242
|
+
"WRAPROWS",
|
|
9243
|
+
"XLOOKUP",
|
|
9244
|
+
"XOR",
|
|
9245
|
+
"Z.TEST"
|
|
9246
|
+
];
|
|
9247
|
+
const CONTENT_TYPES_FILE = "[Content_Types].xml";
|
|
9248
|
+
|
|
8994
9249
|
//#endregion
|
|
8995
9250
|
//#region src/helpers/color.ts
|
|
8996
9251
|
const RBA_REGEX = /rgba?\(|\s+|\)/gi;
|
|
@@ -9692,259 +9947,6 @@ function colorCell(value, minValue, minColor, colorDiffUnit) {
|
|
|
9692
9947
|
return r << 16 | g << 8 | b;
|
|
9693
9948
|
}
|
|
9694
9949
|
|
|
9695
|
-
//#endregion
|
|
9696
|
-
//#region src/xlsx/constants.ts
|
|
9697
|
-
/** In XLSX color format (no #) */
|
|
9698
|
-
const AUTO_COLOR = "000000";
|
|
9699
|
-
const XLSX_ICONSET_MAP = {
|
|
9700
|
-
arrows: "3Arrows",
|
|
9701
|
-
smiley: "3Symbols",
|
|
9702
|
-
dots: "3TrafficLights1"
|
|
9703
|
-
};
|
|
9704
|
-
const NAMESPACE = {
|
|
9705
|
-
styleSheet: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
9706
|
-
sst: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
9707
|
-
Relationships: "http://schemas.openxmlformats.org/package/2006/relationships",
|
|
9708
|
-
Types: "http://schemas.openxmlformats.org/package/2006/content-types",
|
|
9709
|
-
worksheet: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
9710
|
-
workbook: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
9711
|
-
drawing: "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing",
|
|
9712
|
-
table: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
9713
|
-
revision: "http://schemas.microsoft.com/office/spreadsheetml/2014/revision",
|
|
9714
|
-
revision3: "http://schemas.microsoft.com/office/spreadsheetml/2016/revision3",
|
|
9715
|
-
markupCompatibility: "http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
9716
|
-
};
|
|
9717
|
-
const DRAWING_NS_A = "http://schemas.openxmlformats.org/drawingml/2006/main";
|
|
9718
|
-
const DRAWING_NS_C = "http://schemas.openxmlformats.org/drawingml/2006/chart";
|
|
9719
|
-
const CONTENT_TYPES = {
|
|
9720
|
-
workbook: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",
|
|
9721
|
-
macroEnabledWorkbook: "application/vnd.ms-excel.sheet.macroEnabled.main+xml",
|
|
9722
|
-
templateWorkbook: "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml",
|
|
9723
|
-
macroEnabledTemplateWorkbook: "application/vnd.ms-excel.template.macroEnabled.main+xml",
|
|
9724
|
-
excelAddInWorkbook: "application/vnd.ms-excel.addin.macroEnabled.main+xml",
|
|
9725
|
-
sheet: "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",
|
|
9726
|
-
metadata: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",
|
|
9727
|
-
sharedStrings: "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",
|
|
9728
|
-
styles: "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",
|
|
9729
|
-
drawing: "application/vnd.openxmlformats-officedocument.drawing+xml",
|
|
9730
|
-
chart: "application/vnd.openxmlformats-officedocument.drawingml.chart+xml",
|
|
9731
|
-
themes: "application/vnd.openxmlformats-officedocument.theme+xml",
|
|
9732
|
-
table: "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml",
|
|
9733
|
-
pivot: "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml",
|
|
9734
|
-
externalLink: "application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml"
|
|
9735
|
-
};
|
|
9736
|
-
const XLSX_RELATION_TYPE = {
|
|
9737
|
-
document: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",
|
|
9738
|
-
sheet: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",
|
|
9739
|
-
metadata: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",
|
|
9740
|
-
sharedStrings: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",
|
|
9741
|
-
styles: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",
|
|
9742
|
-
drawing: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",
|
|
9743
|
-
chart: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",
|
|
9744
|
-
theme: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",
|
|
9745
|
-
table: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/table",
|
|
9746
|
-
hyperlink: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",
|
|
9747
|
-
image: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"
|
|
9748
|
-
};
|
|
9749
|
-
const ARRAY_FORMULA_URI = "bdbb8cdc-fa1e-496e-a857-3c3f30c029c3";
|
|
9750
|
-
const RELATIONSHIP_NSR = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
|
|
9751
|
-
const HEIGHT_FACTOR = .75;
|
|
9752
|
-
/**
|
|
9753
|
-
* Excel says its default column width is 8.43 characters (64px)
|
|
9754
|
-
* which makes WIDTH_FACTOR = 0.1317, but it doesn't work well
|
|
9755
|
-
* 0.143 is a value from dev's experiments.
|
|
9756
|
-
*/
|
|
9757
|
-
const WIDTH_FACTOR = .143;
|
|
9758
|
-
/** unit : maximum number of characters a column can hold at the standard font size. What. */
|
|
9759
|
-
const EXCEL_DEFAULT_COL_WIDTH = 8.43;
|
|
9760
|
-
/** unit : points */
|
|
9761
|
-
const EXCEL_DEFAULT_ROW_HEIGHT = 12.75;
|
|
9762
|
-
const FORCE_DEFAULT_ARGS_FUNCTIONS = {
|
|
9763
|
-
FLOOR: [{
|
|
9764
|
-
type: "NUMBER",
|
|
9765
|
-
value: 1
|
|
9766
|
-
}],
|
|
9767
|
-
CEILING: [{
|
|
9768
|
-
type: "NUMBER",
|
|
9769
|
-
value: 1
|
|
9770
|
-
}],
|
|
9771
|
-
ROUND: [{
|
|
9772
|
-
type: "NUMBER",
|
|
9773
|
-
value: 0
|
|
9774
|
-
}],
|
|
9775
|
-
ROUNDUP: [{
|
|
9776
|
-
type: "NUMBER",
|
|
9777
|
-
value: 0
|
|
9778
|
-
}],
|
|
9779
|
-
ROUNDDOWN: [{
|
|
9780
|
-
type: "NUMBER",
|
|
9781
|
-
value: 0
|
|
9782
|
-
}],
|
|
9783
|
-
IFERROR: [{
|
|
9784
|
-
type: "NUMBER",
|
|
9785
|
-
value: 0
|
|
9786
|
-
}]
|
|
9787
|
-
};
|
|
9788
|
-
/**
|
|
9789
|
-
* This list contains all "future" functions that are not compatible with older versions of Excel
|
|
9790
|
-
* For more information, see https://docs.microsoft.com/en-us/openspecs/office_standards/ms-xlsx/5d1b6d44-6fc1-4ecd-8fef-0b27406cc2bf
|
|
9791
|
-
*/
|
|
9792
|
-
const NON_RETROCOMPATIBLE_FUNCTIONS = [
|
|
9793
|
-
"ACOT",
|
|
9794
|
-
"ACOTH",
|
|
9795
|
-
"AGGREGATE",
|
|
9796
|
-
"ARABIC",
|
|
9797
|
-
"BASE",
|
|
9798
|
-
"BETA.DIST",
|
|
9799
|
-
"BETA.INV",
|
|
9800
|
-
"BINOM.DIST",
|
|
9801
|
-
"BINOM.DIST.RANGE",
|
|
9802
|
-
"BINOM.INV",
|
|
9803
|
-
"BITAND",
|
|
9804
|
-
"BITLSHIFT",
|
|
9805
|
-
"BITOR",
|
|
9806
|
-
"BITRSHIFT",
|
|
9807
|
-
"BITXOR",
|
|
9808
|
-
"BYCOL",
|
|
9809
|
-
"BYROW",
|
|
9810
|
-
"CEILING.MATH",
|
|
9811
|
-
"CEILING.PRECISE",
|
|
9812
|
-
"CHISQ.DIST",
|
|
9813
|
-
"CHISQ.DIST.RT",
|
|
9814
|
-
"CHISQ.INV",
|
|
9815
|
-
"CHISQ.INV.RT",
|
|
9816
|
-
"CHISQ.TEST",
|
|
9817
|
-
"CHOOSECOLS",
|
|
9818
|
-
"CHOOSEROWS",
|
|
9819
|
-
"COMBINA",
|
|
9820
|
-
"CONCAT",
|
|
9821
|
-
"CONFIDENCE.NORM",
|
|
9822
|
-
"CONFIDENCE.T",
|
|
9823
|
-
"COT",
|
|
9824
|
-
"COTH",
|
|
9825
|
-
"COVARIANCE.P",
|
|
9826
|
-
"COVARIANCE.S",
|
|
9827
|
-
"CSC",
|
|
9828
|
-
"CSCH",
|
|
9829
|
-
"DAYS",
|
|
9830
|
-
"DECIMAL",
|
|
9831
|
-
"DROP",
|
|
9832
|
-
"ERF.PRECISE",
|
|
9833
|
-
"ERFC.PRECISE",
|
|
9834
|
-
"EXPAND",
|
|
9835
|
-
"EXPON.DIST",
|
|
9836
|
-
"F.DIST",
|
|
9837
|
-
"F.DIST.RT",
|
|
9838
|
-
"F.INV",
|
|
9839
|
-
"F.INV.RT",
|
|
9840
|
-
"F.TEST",
|
|
9841
|
-
"FIELDVALUE",
|
|
9842
|
-
"FILTERXML",
|
|
9843
|
-
"FLOOR.MATH",
|
|
9844
|
-
"FLOOR.PRECISE",
|
|
9845
|
-
"FORECAST.ETS",
|
|
9846
|
-
"FORECAST.ETS.CONFINT",
|
|
9847
|
-
"FORECAST.ETS.SEASONALITY",
|
|
9848
|
-
"FORECAST.ETS.STAT",
|
|
9849
|
-
"FORECAST.LINEAR",
|
|
9850
|
-
"FORMULATEXT",
|
|
9851
|
-
"GAMMA",
|
|
9852
|
-
"GAMMA.DIST",
|
|
9853
|
-
"GAMMA.INV",
|
|
9854
|
-
"GAMMALN.PRECISE",
|
|
9855
|
-
"GAUSS",
|
|
9856
|
-
"HSTACK",
|
|
9857
|
-
"HYPGEOM.DIST",
|
|
9858
|
-
"IFNA",
|
|
9859
|
-
"IFS",
|
|
9860
|
-
"IMCOSH",
|
|
9861
|
-
"IMCOT",
|
|
9862
|
-
"IMCSC",
|
|
9863
|
-
"IMCSCH",
|
|
9864
|
-
"IMSEC",
|
|
9865
|
-
"IMSECH",
|
|
9866
|
-
"IMSINH",
|
|
9867
|
-
"IMTAN",
|
|
9868
|
-
"ISFORMULA",
|
|
9869
|
-
"ISOMITTED",
|
|
9870
|
-
"ISOWEEKNUM",
|
|
9871
|
-
"LAMBDA",
|
|
9872
|
-
"LET",
|
|
9873
|
-
"LOGNORM.DIST",
|
|
9874
|
-
"LOGNORM.INV",
|
|
9875
|
-
"MAKEARRAY",
|
|
9876
|
-
"MAP",
|
|
9877
|
-
"MAXIFS",
|
|
9878
|
-
"MINIFS",
|
|
9879
|
-
"MODE.MULT",
|
|
9880
|
-
"MODE.SNGL",
|
|
9881
|
-
"MUNIT",
|
|
9882
|
-
"NEGBINOM.DIST",
|
|
9883
|
-
"NORM.DIST",
|
|
9884
|
-
"NORM.INV",
|
|
9885
|
-
"NORM.S.DIST",
|
|
9886
|
-
"NORM.S.INV",
|
|
9887
|
-
"NUMBERVALUE",
|
|
9888
|
-
"PDURATION",
|
|
9889
|
-
"PERCENTILE.EXC",
|
|
9890
|
-
"PERCENTILE.INC",
|
|
9891
|
-
"PERCENTRANK.EXC",
|
|
9892
|
-
"PERCENTRANK.INC",
|
|
9893
|
-
"PERMUTATIONA",
|
|
9894
|
-
"PHI",
|
|
9895
|
-
"POISSON.DIST",
|
|
9896
|
-
"PQSOURCE",
|
|
9897
|
-
"PYTHON_STR",
|
|
9898
|
-
"PYTHON_TYPE",
|
|
9899
|
-
"PYTHON_TYPENAME",
|
|
9900
|
-
"QUARTILE.EXC",
|
|
9901
|
-
"QUARTILE.INC",
|
|
9902
|
-
"QUERYSTRING",
|
|
9903
|
-
"RANDARRAY",
|
|
9904
|
-
"RANK.AVG",
|
|
9905
|
-
"RANK.EQ",
|
|
9906
|
-
"REDUCE",
|
|
9907
|
-
"RRI",
|
|
9908
|
-
"SCAN",
|
|
9909
|
-
"SEC",
|
|
9910
|
-
"SECH",
|
|
9911
|
-
"SEQUENCE",
|
|
9912
|
-
"SHEET",
|
|
9913
|
-
"SHEETS",
|
|
9914
|
-
"SKEW.P",
|
|
9915
|
-
"SORTBY",
|
|
9916
|
-
"STDEV.P",
|
|
9917
|
-
"STDEV.S",
|
|
9918
|
-
"SWITCH",
|
|
9919
|
-
"T.DIST",
|
|
9920
|
-
"T.DIST.2T",
|
|
9921
|
-
"T.DIST.RT",
|
|
9922
|
-
"T.INV",
|
|
9923
|
-
"T.INV.2T",
|
|
9924
|
-
"T.TEST",
|
|
9925
|
-
"TAKE",
|
|
9926
|
-
"TEXTAFTER",
|
|
9927
|
-
"TEXTBEFORE",
|
|
9928
|
-
"TEXTJOIN",
|
|
9929
|
-
"TEXTSPLIT",
|
|
9930
|
-
"TOCOL",
|
|
9931
|
-
"TOROW",
|
|
9932
|
-
"UNICHAR",
|
|
9933
|
-
"UNICODE",
|
|
9934
|
-
"UNIQUE",
|
|
9935
|
-
"VAR.P",
|
|
9936
|
-
"VAR.S",
|
|
9937
|
-
"VSTACK",
|
|
9938
|
-
"WEBSERVICE",
|
|
9939
|
-
"WEIBULL.DIST",
|
|
9940
|
-
"WRAPCOLS",
|
|
9941
|
-
"WRAPROWS",
|
|
9942
|
-
"XLOOKUP",
|
|
9943
|
-
"XOR",
|
|
9944
|
-
"Z.TEST"
|
|
9945
|
-
];
|
|
9946
|
-
const CONTENT_TYPES_FILE = "[Content_Types].xml";
|
|
9947
|
-
|
|
9948
9950
|
//#endregion
|
|
9949
9951
|
//#region src/helpers/figures/charts/chart_common.ts
|
|
9950
9952
|
const TREND_LINE_XAXIS_ID = "x1";
|
|
@@ -10210,10 +10212,10 @@ const chartShowValuesPlugin = {
|
|
|
10210
10212
|
drawLineOrBarOrRadarChartValues(chart, options, ctx);
|
|
10211
10213
|
break;
|
|
10212
10214
|
case "bar":
|
|
10213
|
-
options.horizontal ? drawHorizontalBarChartValues(chart, options, ctx) : drawLineOrBarOrRadarChartValues(chart, options, ctx);
|
|
10215
|
+
options.horizontal ? drawHorizontalBarChartValues(chart, options, ctx, { offsetFromAxisOrigin: true }) : drawLineOrBarOrRadarChartValues(chart, options, ctx);
|
|
10214
10216
|
break;
|
|
10215
10217
|
case "pyramid":
|
|
10216
|
-
drawHorizontalBarChartValues(chart, options, ctx);
|
|
10218
|
+
drawHorizontalBarChartValues(chart, options, ctx, { offsetFromAxisOrigin: true });
|
|
10217
10219
|
break;
|
|
10218
10220
|
case "calendar":
|
|
10219
10221
|
drawBarChartValues(chart, options, ctx);
|
|
@@ -10222,7 +10224,7 @@ const chartShowValuesPlugin = {
|
|
|
10222
10224
|
drawBubbleChartValues(chart, options, ctx);
|
|
10223
10225
|
break;
|
|
10224
10226
|
case "funnel":
|
|
10225
|
-
drawHorizontalBarChartValues(chart, options, ctx);
|
|
10227
|
+
drawHorizontalBarChartValues(chart, options, ctx, { offsetFromAxisOrigin: false });
|
|
10226
10228
|
break;
|
|
10227
10229
|
}
|
|
10228
10230
|
ctx.restore();
|
|
@@ -10297,23 +10299,33 @@ function drawBubbleChartValues(chart, options, ctx) {
|
|
|
10297
10299
|
const yMax = chart.chartArea.bottom;
|
|
10298
10300
|
const yMin = chart.chartArea.top;
|
|
10299
10301
|
const textsPositions = {};
|
|
10302
|
+
const canDrawTextInsideBubble = (chartElement, textSize) => {
|
|
10303
|
+
const radius = chartElement.options.radius ?? globalThis.Chart?.defaults.elements.point.radius ?? 3;
|
|
10304
|
+
return textSize.height < radius * 2;
|
|
10305
|
+
};
|
|
10300
10306
|
for (const dataset of chart._metasets) for (let i = 0; i < dataset._parsed.length; i++) {
|
|
10301
10307
|
const value = dataset._parsed[i].y;
|
|
10302
10308
|
if (isNaN(value)) continue;
|
|
10309
|
+
const valueToDisplay = options.callback(Number(value), dataset, i);
|
|
10303
10310
|
const point = dataset.data[i];
|
|
10304
10311
|
const xPosition = point.x;
|
|
10305
10312
|
let yPosition = Math.max(Math.min(point.y, yMax), yMin);
|
|
10313
|
+
const textSize = getTextDimensions(valueToDisplay, ctx);
|
|
10314
|
+
if (!canDrawTextInsideBubble(point, textSize)) yPosition = value < 0 ? point.y + 10 : point.y - 10;
|
|
10306
10315
|
if (!textsPositions[xPosition]) textsPositions[xPosition] = [];
|
|
10307
10316
|
for (const otherPosition of textsPositions[xPosition] || []) if (Math.abs(otherPosition - yPosition) < MINIMAL_VERTICAL_DISTANCE) yPosition = otherPosition + MINIMAL_VERTICAL_DISTANCE * (value < 0 ? 1 : -1);
|
|
10308
10317
|
textsPositions[xPosition].push(yPosition);
|
|
10309
|
-
|
|
10310
|
-
|
|
10311
|
-
|
|
10312
|
-
|
|
10313
|
-
|
|
10318
|
+
if (canDrawTextInsideBubble(point, textSize)) {
|
|
10319
|
+
ctx.strokeStyle = point.options.backgroundColor;
|
|
10320
|
+
ctx.fillStyle = options.background(Number(value), dataset, i) || "#ffffff";
|
|
10321
|
+
} else {
|
|
10322
|
+
ctx.strokeStyle = options.background(Number(value), dataset, i) || "#ffffff";
|
|
10323
|
+
ctx.fillStyle = point.options.backgroundColor;
|
|
10324
|
+
}
|
|
10325
|
+
drawTextWithBackground(valueToDisplay, xPosition, yPosition, ctx);
|
|
10314
10326
|
}
|
|
10315
10327
|
}
|
|
10316
|
-
function drawHorizontalBarChartValues(chart, options, ctx) {
|
|
10328
|
+
function drawHorizontalBarChartValues(chart, options, ctx, args) {
|
|
10317
10329
|
const textsPositions = {};
|
|
10318
10330
|
for (const dataset of chart._metasets) {
|
|
10319
10331
|
if (isTrendLineAxis(dataset.xAxisID) || isLineOverlayOnBarChart(options, dataset)) continue;
|
|
@@ -10328,7 +10340,7 @@ function drawHorizontalBarChartValues(chart, options, ctx) {
|
|
|
10328
10340
|
const distanceFromAxisOrigin = Math.abs(point.x - xZeroLine);
|
|
10329
10341
|
const PADDING = 3;
|
|
10330
10342
|
let xPosition;
|
|
10331
|
-
if (distanceFromAxisOrigin < textWidth) xPosition = value < 0 ? xZeroLine - textWidth / 2 - PADDING : xZeroLine + textWidth / 2 + PADDING;
|
|
10343
|
+
if (args.offsetFromAxisOrigin && distanceFromAxisOrigin < textWidth) xPosition = value < 0 ? xZeroLine - textWidth / 2 - PADDING : xZeroLine + textWidth / 2 + PADDING;
|
|
10332
10344
|
else xPosition = value < 0 ? point.x + point.width / 2 : point.x - point.width / 2;
|
|
10333
10345
|
if (!textsPositions[yPosition]) textsPositions[yPosition] = [];
|
|
10334
10346
|
for (const otherPosition of textsPositions[yPosition]) if (Math.abs(otherPosition - xPosition) < textWidth) xPosition = value < 0 ? otherPosition - textWidth - PADDING : otherPosition + textWidth + PADDING;
|
|
@@ -10363,6 +10375,9 @@ function drawPieChartValues(chart, options, ctx) {
|
|
|
10363
10375
|
drawTextWithBackground(displayValue, x, y, ctx);
|
|
10364
10376
|
}
|
|
10365
10377
|
}
|
|
10378
|
+
function getTextDimensions(text, ctx) {
|
|
10379
|
+
return computeCachedTextDimension(ctx, text, computeTextFont({ fontSize: globalThis.Chart?.defaults.font.size ?? 12 }, "px"));
|
|
10380
|
+
}
|
|
10366
10381
|
|
|
10367
10382
|
//#endregion
|
|
10368
10383
|
//#region src/types/chart/tree_map_chart.ts
|
|
@@ -11214,6 +11229,7 @@ function getRadarChartDatasets(definition, args) {
|
|
|
11214
11229
|
hidden,
|
|
11215
11230
|
borderColor,
|
|
11216
11231
|
backgroundColor: borderColor,
|
|
11232
|
+
pointBackgroundColor: borderColor,
|
|
11217
11233
|
pointRadius: definition.hideDataMarkers ? 0 : 3
|
|
11218
11234
|
};
|
|
11219
11235
|
if (fill) {
|
|
@@ -31288,9 +31304,10 @@ var Composer = class extends Component {
|
|
|
31288
31304
|
compositionActive = false;
|
|
31289
31305
|
spreadsheetRect = useSpreadsheetRect();
|
|
31290
31306
|
lastHoveredTokenIndex = void 0;
|
|
31291
|
-
debouncedHover = debounce((tokenIndex, hoveredRect) => {
|
|
31307
|
+
debouncedHover = debounce((tokenIndex, composerContent, hoveredRect) => {
|
|
31292
31308
|
const selection = this.contentHelper.getCurrentSelection();
|
|
31293
|
-
|
|
31309
|
+
const currentContent = this.props.composerStore.currentContent;
|
|
31310
|
+
if (selection.start !== selection.end || currentContent !== composerContent) return;
|
|
31294
31311
|
const currentHoveredContext = this.props.composerStore.hoveredTokens;
|
|
31295
31312
|
this.props.composerStore.hoverToken(tokenIndex);
|
|
31296
31313
|
if (!deepEquals(currentHoveredContext, this.props.composerStore.hoveredTokens)) this.composerState.hoveredRect = hoveredRect;
|
|
@@ -31610,7 +31627,8 @@ var Composer = class extends Component {
|
|
|
31610
31627
|
onTokenHover(tokenIndex, hoveredRect) {
|
|
31611
31628
|
if (this.lastHoveredTokenIndex !== tokenIndex) {
|
|
31612
31629
|
this.lastHoveredTokenIndex = tokenIndex;
|
|
31613
|
-
this.
|
|
31630
|
+
const composerContent = this.props.composerStore.currentContent;
|
|
31631
|
+
this.debouncedHover(tokenIndex, composerContent, hoveredRect);
|
|
31614
31632
|
}
|
|
31615
31633
|
}
|
|
31616
31634
|
/**
|
|
@@ -37064,7 +37082,7 @@ var FindAndReplacePanel = class extends Component {
|
|
|
37064
37082
|
get currentSheetMatchesCount() {
|
|
37065
37083
|
const { activeSheetMatchesCount: count, activeSheetHiddenMatchesCount: hidden, searchOptions } = this.store;
|
|
37066
37084
|
const sheetName = this.env.model.getters.getSheetName(this.env.model.getters.getActiveSheetId());
|
|
37067
|
-
let label = count === 1 ? _t("1 match in %(sheetName)s", { sheetName }) : _t("%(count)s matches in %(sheetName)s", {
|
|
37085
|
+
let label = count === 1 ? _t("1 match in '%(sheetName)s'", { sheetName }) : _t("%(count)s matches in '%(sheetName)s'", {
|
|
37068
37086
|
count,
|
|
37069
37087
|
sheetName
|
|
37070
37088
|
});
|
|
@@ -37076,10 +37094,10 @@ var FindAndReplacePanel = class extends Component {
|
|
|
37076
37094
|
if (!range) return "";
|
|
37077
37095
|
const { specificRangeMatchesCount: count, specificRangeHiddenMatchesCount: hidden, searchOptions } = this.store;
|
|
37078
37096
|
const { sheetId, zone } = range;
|
|
37079
|
-
let label = count === 1 ? _t("1 match in range %(range)s of %(sheetName)s", {
|
|
37097
|
+
let label = count === 1 ? _t("1 match in range %(range)s of '%(sheetName)s'", {
|
|
37080
37098
|
range: zoneToXc(zone),
|
|
37081
37099
|
sheetName: this.env.model.getters.getSheetName(sheetId)
|
|
37082
|
-
}) : _t("%(count)s matches in range %(range)s of %(sheetName)s", {
|
|
37100
|
+
}) : _t("%(count)s matches in range %(range)s of '%(sheetName)s'", {
|
|
37083
37101
|
count,
|
|
37084
37102
|
range: zoneToXc(zone),
|
|
37085
37103
|
sheetName: this.env.model.getters.getSheetName(sheetId)
|
|
@@ -41266,7 +41284,13 @@ var PivotSpreadsheetSidePanel = class extends Component {
|
|
|
41266
41284
|
}
|
|
41267
41285
|
onSelectionChanged(ranges) {
|
|
41268
41286
|
this.state.rangeHasChanged = true;
|
|
41269
|
-
|
|
41287
|
+
if (ranges.length === 0) {
|
|
41288
|
+
this.state.range = void 0;
|
|
41289
|
+
return;
|
|
41290
|
+
}
|
|
41291
|
+
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
41292
|
+
const range = this.env.model.getters.getRangeFromSheetXC(sheetId, ranges[0]);
|
|
41293
|
+
this.state.range = this.env.model.getters.getRangeString(range, "forceSheetReference", { useBoundedReference: true });
|
|
41270
41294
|
}
|
|
41271
41295
|
onSelectionConfirmed() {
|
|
41272
41296
|
if (this.state.range) {
|
|
@@ -51025,6 +51049,7 @@ var CarouselPlugin = class extends CorePlugin {
|
|
|
51025
51049
|
return "Success";
|
|
51026
51050
|
case "UPDATE_CAROUSEL":
|
|
51027
51051
|
if (!this.carousels[cmd.sheetId]?.[cmd.figureId]) return "InvalidFigureId";
|
|
51052
|
+
for (const item of cmd.definition.items) if (item.type === "chart" && !this.getters.getChart(item.chartId)) return "ChartDoesNotExist";
|
|
51028
51053
|
return "Success";
|
|
51029
51054
|
}
|
|
51030
51055
|
return "Success";
|
|
@@ -51129,6 +51154,7 @@ var Squisher = class {
|
|
|
51129
51154
|
baseFormulaWasTransformed = false;
|
|
51130
51155
|
rangeToStringOptions = { doNotSimplifyRange: true };
|
|
51131
51156
|
baseNumber = void 0;
|
|
51157
|
+
baseNumberFormat = void 0;
|
|
51132
51158
|
constructor(getters) {
|
|
51133
51159
|
this.getters = getters;
|
|
51134
51160
|
}
|
|
@@ -51163,6 +51189,11 @@ var Squisher = class {
|
|
|
51163
51189
|
this.baseFormulaWasTransformed = false;
|
|
51164
51190
|
}
|
|
51165
51191
|
}
|
|
51192
|
+
/** Reset the base number literal chain, so the next literal number cannot be squished as an offset of it */
|
|
51193
|
+
resetBaseNumber() {
|
|
51194
|
+
this.baseNumber = void 0;
|
|
51195
|
+
this.baseNumberFormat = void 0;
|
|
51196
|
+
}
|
|
51166
51197
|
/**
|
|
51167
51198
|
* Takes a cell and squish their formulas against the previous one (in the previous call).
|
|
51168
51199
|
* We should call this method for each cell in the sheet, in order from top to bottom, then from left to right (all cells of a columns, for each columns left to right).
|
|
@@ -51201,8 +51232,9 @@ var Squisher = class {
|
|
|
51201
51232
|
if (typeof cell.parsedValue === "number" && cell.parsedValue % 1 === 0) {
|
|
51202
51233
|
this.resetBaseFormula();
|
|
51203
51234
|
const numberValue = cell.parsedValue;
|
|
51204
|
-
if (this.baseNumber === void 0) {
|
|
51235
|
+
if (this.baseNumber === void 0 || cell.format !== this.baseNumberFormat) {
|
|
51205
51236
|
this.baseNumber = numberValue;
|
|
51237
|
+
this.baseNumberFormat = cell.format;
|
|
51206
51238
|
return cell.content;
|
|
51207
51239
|
}
|
|
51208
51240
|
const numberOffset = numberValue - this.baseNumber;
|
|
@@ -51213,7 +51245,7 @@ var Squisher = class {
|
|
|
51213
51245
|
}
|
|
51214
51246
|
}
|
|
51215
51247
|
this.resetBaseFormula();
|
|
51216
|
-
this.
|
|
51248
|
+
this.resetBaseNumber();
|
|
51217
51249
|
return cell.content;
|
|
51218
51250
|
}
|
|
51219
51251
|
squishCommand(command) {
|
|
@@ -51222,6 +51254,8 @@ var Squisher = class {
|
|
|
51222
51254
|
const squished = this.squish(cell, command.sheetId);
|
|
51223
51255
|
return typeof squished === "string" ? command.content : squished;
|
|
51224
51256
|
}
|
|
51257
|
+
this.resetBaseFormula();
|
|
51258
|
+
this.resetBaseNumber();
|
|
51225
51259
|
return command.content;
|
|
51226
51260
|
}
|
|
51227
51261
|
/**
|
|
@@ -51375,8 +51409,10 @@ var Unsquisher = class {
|
|
|
51375
51409
|
continue;
|
|
51376
51410
|
}
|
|
51377
51411
|
const current = command.content;
|
|
51378
|
-
if (current === void 0 || current === null || current === "")
|
|
51379
|
-
|
|
51412
|
+
if (current === void 0 || current === null || current === "") {
|
|
51413
|
+
this.rebase();
|
|
51414
|
+
strategy = "NOT_A_FORMULA";
|
|
51415
|
+
} else strategy = this.chooseStrategy(current, strategy, command.sheetId, getters);
|
|
51380
51416
|
let targetPositions;
|
|
51381
51417
|
if (command.type === "SQUISHED_UPDATE_CELL" && "targetRange" in command) {
|
|
51382
51418
|
const [start, end] = command.targetRange.split(":");
|
|
@@ -51421,8 +51457,11 @@ var Unsquisher = class {
|
|
|
51421
51457
|
let strategy;
|
|
51422
51458
|
for (const { key } of keys) {
|
|
51423
51459
|
const current = squished[key];
|
|
51424
|
-
if (current === void 0 || current === null || current === "")
|
|
51425
|
-
|
|
51460
|
+
if (current === void 0 || current === null || current === "") {
|
|
51461
|
+
this.rebase();
|
|
51462
|
+
strategy = void 0;
|
|
51463
|
+
continue;
|
|
51464
|
+
} else strategy = this.chooseStrategy(current, strategy, sheetId, getters);
|
|
51426
51465
|
const parts = key.split(":");
|
|
51427
51466
|
const targetPositions = parts.length === 1 ? expandXc(key) : expandRange(parts[0], parts[1]);
|
|
51428
51467
|
yield* this.applyStrategy(strategy, targetPositions, current, sheetId, getters);
|
|
@@ -51468,6 +51507,9 @@ var Unsquisher = class {
|
|
|
51468
51507
|
case "FIRST_OFFSET":
|
|
51469
51508
|
strategy = "COMBINE_OFFSET";
|
|
51470
51509
|
break;
|
|
51510
|
+
case "COMBINE_OFFSET":
|
|
51511
|
+
case "OFFSET_NUMBER": break;
|
|
51512
|
+
default: throw new Error(`Cannot unsquish an offset without a preceding base cell: ${strategy}`);
|
|
51471
51513
|
}
|
|
51472
51514
|
}
|
|
51473
51515
|
return strategy;
|
|
@@ -56535,6 +56577,7 @@ var FormulaDependencyGraph = class {
|
|
|
56535
56577
|
}
|
|
56536
56578
|
getCellsDependingOn(ranges, visited = new RangeSet()) {
|
|
56537
56579
|
visited = visited.copy();
|
|
56580
|
+
let initialRangesToRemove = visited.copy();
|
|
56538
56581
|
const queue = Array.from(ranges).reverse();
|
|
56539
56582
|
while (queue.length > 0) {
|
|
56540
56583
|
const range = queue.pop();
|
|
@@ -56550,8 +56593,9 @@ var FormulaDependencyGraph = class {
|
|
|
56550
56593
|
for (const interval of overlappingIntervals) impactedRanges.add(interval.dependents);
|
|
56551
56594
|
}
|
|
56552
56595
|
queue.push(...impactedRanges.difference(visited));
|
|
56596
|
+
initialRangesToRemove = initialRangesToRemove.difference(impactedRanges);
|
|
56553
56597
|
}
|
|
56554
|
-
for (const range of
|
|
56598
|
+
for (const range of initialRangesToRemove) visited.delete(range);
|
|
56555
56599
|
return visited;
|
|
56556
56600
|
}
|
|
56557
56601
|
getOrCreateIntervalTree(sheetId, col) {
|
|
@@ -62146,6 +62190,7 @@ var Session = class extends EventBus {
|
|
|
62146
62190
|
transportService;
|
|
62147
62191
|
serverRevisionId;
|
|
62148
62192
|
commandSquisher;
|
|
62193
|
+
shouldVerifySquish;
|
|
62149
62194
|
/**
|
|
62150
62195
|
* Positions of the others client.
|
|
62151
62196
|
*/
|
|
@@ -62179,13 +62224,15 @@ var Session = class extends EventBus {
|
|
|
62179
62224
|
* between all connected clients
|
|
62180
62225
|
* @param serverRevisionId
|
|
62181
62226
|
* @param commandSquisher used to squish and unsquish commands to reduce the size of messages sent to the server
|
|
62227
|
+
* @param shouldVerifySquish either the commands should be unsquished and verified before being sent to the server
|
|
62182
62228
|
*/
|
|
62183
|
-
constructor(revisions, transportService, serverRevisionId = DEFAULT_REVISION_ID, commandSquisher) {
|
|
62229
|
+
constructor(revisions, transportService, serverRevisionId = DEFAULT_REVISION_ID, commandSquisher, shouldVerifySquish = true) {
|
|
62184
62230
|
super();
|
|
62185
62231
|
this.revisions = revisions;
|
|
62186
62232
|
this.transportService = transportService;
|
|
62187
62233
|
this.serverRevisionId = serverRevisionId;
|
|
62188
62234
|
this.commandSquisher = commandSquisher;
|
|
62235
|
+
this.shouldVerifySquish = shouldVerifySquish;
|
|
62189
62236
|
}
|
|
62190
62237
|
canApplyOptimisticUpdate() {
|
|
62191
62238
|
return !this.waitingUndoRedoAck;
|
|
@@ -62441,10 +62488,20 @@ var Session = class extends EventBus {
|
|
|
62441
62488
|
this.revisions.rebase(revision.id);
|
|
62442
62489
|
revision = this.revisions.get(message.nextRevisionId);
|
|
62443
62490
|
}
|
|
62444
|
-
|
|
62491
|
+
const squishedCommands = this.commandSquisher.squish(revision.commands);
|
|
62492
|
+
if (!squishedCommands.some((x) => x.type === "SQUISHED_UPDATE_CELL")) message = {
|
|
62445
62493
|
...message,
|
|
62446
62494
|
commands: revision.commands
|
|
62447
62495
|
};
|
|
62496
|
+
else if (this.shouldVerifySquish && !deepEquals(revision.commands, this.commandSquisher.unsquish(squishedCommands))) message = {
|
|
62497
|
+
...message,
|
|
62498
|
+
commands: revision.commands,
|
|
62499
|
+
squishedFailed: true
|
|
62500
|
+
};
|
|
62501
|
+
else message = {
|
|
62502
|
+
...message,
|
|
62503
|
+
commands: squishedCommands
|
|
62504
|
+
};
|
|
62448
62505
|
}
|
|
62449
62506
|
if (this.isReplayingInitialRevisions) throw new Error(`Trying to send a new revision while replaying initial revision. This can lead to endless dispatches every time the spreadsheet is open.
|
|
62450
62507
|
${JSON.stringify(message)}`);
|
|
@@ -69677,13 +69734,12 @@ var SpreadsheetDashboard = class extends Component {
|
|
|
69677
69734
|
return this.env.model.getters.getColDimensions(sheetId, right).end;
|
|
69678
69735
|
}
|
|
69679
69736
|
get dashboardStyle() {
|
|
69680
|
-
|
|
69681
|
-
if (this.env.model.getters.getActiveSheet().backgroundColor) style["background-color"] = "transparent";
|
|
69682
|
-
return cssPropertiesToCss(style);
|
|
69737
|
+
return cssPropertiesToCss({ zoom: `${this.env.model.getters.getViewportZoomLevel()}` });
|
|
69683
69738
|
}
|
|
69684
69739
|
get backgroundStyle() {
|
|
69685
69740
|
const sheet = this.env.model.getters.getActiveSheet();
|
|
69686
|
-
|
|
69741
|
+
const theme = this.env.model.getters.getSpreadsheetTheme();
|
|
69742
|
+
return cssPropertiesToCss({ "background-color": sheet.backgroundColor || theme.backgroundColor });
|
|
69687
69743
|
}
|
|
69688
69744
|
};
|
|
69689
69745
|
|
|
@@ -70215,7 +70271,7 @@ var FigureRendererStore = class extends DisposableStore {
|
|
|
70215
70271
|
if (!this.getters.isDashboard()) {
|
|
70216
70272
|
ctx.strokeStyle = GRAY_400;
|
|
70217
70273
|
ctx.lineWidth = 1;
|
|
70218
|
-
ctx.strokeRect(x, y, figure.width, figure.height);
|
|
70274
|
+
ctx.strokeRect(x + .5, y + .5, figure.width - 1, figure.height - 1);
|
|
70219
70275
|
}
|
|
70220
70276
|
}
|
|
70221
70277
|
}
|
|
@@ -79095,14 +79151,13 @@ const PyramidChart = {
|
|
|
79095
79151
|
},
|
|
79096
79152
|
getDefinitionForExcel(getters, definition, { dataSets, labelRange }) {
|
|
79097
79153
|
if (definition.dataSource.type !== "range") return;
|
|
79098
|
-
const
|
|
79099
|
-
const { dataSetsValues } = chartData;
|
|
79154
|
+
const { dataSetsValues } = getPyramidChartData(definition, getChartData(getters, definition.dataSource), getters);
|
|
79100
79155
|
const maxValue = Math.max(...dataSetsValues.map((dataSet) => Math.max(...dataSet.data.map((cell) => isNumberResult(cell) ? Math.abs(cell.value) : -Infinity))));
|
|
79101
79156
|
return {
|
|
79102
79157
|
...definition,
|
|
79103
79158
|
horizontal: true,
|
|
79104
|
-
backgroundColor: toXlsxHexColor(
|
|
79105
|
-
fontColor: toXlsxHexColor(chartFontColor(
|
|
79159
|
+
backgroundColor: toXlsxHexColor(definition.background || "#FFFFFF"),
|
|
79160
|
+
fontColor: toXlsxHexColor(chartFontColor(definition.background)),
|
|
79106
79161
|
dataSets,
|
|
79107
79162
|
labelRange,
|
|
79108
79163
|
verticalAxis: getDefinedAxis(definition),
|
|
@@ -87663,6 +87718,6 @@ const chartHelpers = {
|
|
|
87663
87718
|
//#endregion
|
|
87664
87719
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, BadExpressionError, CHART_TYPES, CellErrorType, CellValueType, CircularDependencyError, ClientDisconnectedError, ClipboardMIMEType, CommandResult, CompiledFormula, CorePlugin, CoreViewPlugin, DEFAULT_LOCALE, DEFAULT_LOCALES, DEFAULT_LOCALE_DIGIT_GROUPING, DIRECTION, DispatchResult, DivisionByZeroError, EvaluationError, InvalidReferenceError, LocalTransportService, Model, NEXT_VALUE, NotAvailableError, NumberTooLargeError, OrderedLayers, PREVIOUS_VALUE, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, SplillBlockedError, Spreadsheet, SpreadsheetPivotTable, UIPlugin, UnknownFunctionError, __info__, addFunction, addRenderingLayer, astToFormula, availableConditionalFormatOperators, availableDataValidationOperators, availableFiltersOperators, borderPositions, borderStyles, canExecuteInReadonly, categories, chartHelpers, compatibility, components, composerFocusTypes, constants, convertAstNodes, coreTypes, createAutocompleteArgumentsProvider, errorTypes, filterDateCriterionOperators, filterNumberCriterionOperators, filterTextCriterionOperators, findCellInNewZone, functionCache, getCaretDownSvg, getCaretUpSvg, helpers, hooks, invalidSubtotalFormulasCommands, invalidateBordersCommands, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, isCoreCommand, isHeadersDependant, isMatrix, isPositionDependent, isRangeDependant, isSheetDependent, isTargetDependent, isZoneDependent, iterateAstNodes, links, load, lockedSheetAllowedCommands, parse, parseTokens, readonlyAllowedCommands, registries, schemeToColorScale, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
87665
87720
|
|
|
87666
|
-
__info__.version = "19.4.
|
|
87667
|
-
__info__.date = "2026-
|
|
87668
|
-
__info__.hash = "
|
|
87721
|
+
__info__.version = "19.4.11";
|
|
87722
|
+
__info__.date = "2026-09-04T07:50:39.272Z";
|
|
87723
|
+
__info__.hash = "7660254";
|