@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
package/dist/o_spreadsheet.cjs
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* This file is generated by o-spreadsheet build tools. Do not edit it.
|
|
4
4
|
* @see https://github.com/odoo/o-spreadsheet
|
|
5
|
-
* @version 19.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
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
@@ -446,6 +446,7 @@ const FILTERS_COLOR = "#188038";
|
|
|
446
446
|
const COMPOSER_ASSISTANT_COLOR = "light-dark(#9B359B, #B972A6)";
|
|
447
447
|
const COLOR_TRANSPARENT = "#00000000";
|
|
448
448
|
const TABLE_HOVER_BACKGROUND_COLOR = "#017E8414";
|
|
449
|
+
const DEFAULT_CHART_BACKGROUND_COLOR = "#FFFFFF";
|
|
449
450
|
const CHART_WATERFALL_POSITIVE_COLOR = "#4EA7F2";
|
|
450
451
|
const CHART_WATERFALL_NEGATIVE_COLOR = "#EA6175";
|
|
451
452
|
const CHART_WATERFALL_SUBTOTAL_COLOR = "#AAAAAA";
|
|
@@ -7896,7 +7897,8 @@ const readonlyAllowedCommands = /* @__PURE__ */ new Set([
|
|
|
7896
7897
|
"UPDATE_CHART",
|
|
7897
7898
|
"UPDATE_CHART_REGION",
|
|
7898
7899
|
"UPDATE_CAROUSEL_ACTIVE_ITEM",
|
|
7899
|
-
"UPDATE_PIVOT"
|
|
7900
|
+
"UPDATE_PIVOT",
|
|
7901
|
+
"UPDATE_COLOR_SCHEME"
|
|
7900
7902
|
]);
|
|
7901
7903
|
const lockedSheetAllowedCommands = /* @__PURE__ */ new Set([
|
|
7902
7904
|
"LOCK_SHEET",
|
|
@@ -8992,6 +8994,259 @@ const chartMinorGridPlugin = {
|
|
|
8992
8994
|
}
|
|
8993
8995
|
};
|
|
8994
8996
|
|
|
8997
|
+
//#endregion
|
|
8998
|
+
//#region src/xlsx/constants.ts
|
|
8999
|
+
/** In XLSX color format (no #) */
|
|
9000
|
+
const AUTO_COLOR = "000000";
|
|
9001
|
+
const XLSX_ICONSET_MAP = {
|
|
9002
|
+
arrows: "3Arrows",
|
|
9003
|
+
smiley: "3Symbols",
|
|
9004
|
+
dots: "3TrafficLights1"
|
|
9005
|
+
};
|
|
9006
|
+
const NAMESPACE = {
|
|
9007
|
+
styleSheet: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
9008
|
+
sst: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
9009
|
+
Relationships: "http://schemas.openxmlformats.org/package/2006/relationships",
|
|
9010
|
+
Types: "http://schemas.openxmlformats.org/package/2006/content-types",
|
|
9011
|
+
worksheet: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
9012
|
+
workbook: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
9013
|
+
drawing: "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing",
|
|
9014
|
+
table: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
9015
|
+
revision: "http://schemas.microsoft.com/office/spreadsheetml/2014/revision",
|
|
9016
|
+
revision3: "http://schemas.microsoft.com/office/spreadsheetml/2016/revision3",
|
|
9017
|
+
markupCompatibility: "http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
9018
|
+
};
|
|
9019
|
+
const DRAWING_NS_A = "http://schemas.openxmlformats.org/drawingml/2006/main";
|
|
9020
|
+
const DRAWING_NS_C = "http://schemas.openxmlformats.org/drawingml/2006/chart";
|
|
9021
|
+
const CONTENT_TYPES = {
|
|
9022
|
+
workbook: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",
|
|
9023
|
+
macroEnabledWorkbook: "application/vnd.ms-excel.sheet.macroEnabled.main+xml",
|
|
9024
|
+
templateWorkbook: "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml",
|
|
9025
|
+
macroEnabledTemplateWorkbook: "application/vnd.ms-excel.template.macroEnabled.main+xml",
|
|
9026
|
+
excelAddInWorkbook: "application/vnd.ms-excel.addin.macroEnabled.main+xml",
|
|
9027
|
+
sheet: "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",
|
|
9028
|
+
metadata: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",
|
|
9029
|
+
sharedStrings: "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",
|
|
9030
|
+
styles: "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",
|
|
9031
|
+
drawing: "application/vnd.openxmlformats-officedocument.drawing+xml",
|
|
9032
|
+
chart: "application/vnd.openxmlformats-officedocument.drawingml.chart+xml",
|
|
9033
|
+
themes: "application/vnd.openxmlformats-officedocument.theme+xml",
|
|
9034
|
+
table: "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml",
|
|
9035
|
+
pivot: "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml",
|
|
9036
|
+
externalLink: "application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml"
|
|
9037
|
+
};
|
|
9038
|
+
const XLSX_RELATION_TYPE = {
|
|
9039
|
+
document: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",
|
|
9040
|
+
sheet: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",
|
|
9041
|
+
metadata: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",
|
|
9042
|
+
sharedStrings: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",
|
|
9043
|
+
styles: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",
|
|
9044
|
+
drawing: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",
|
|
9045
|
+
chart: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",
|
|
9046
|
+
theme: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",
|
|
9047
|
+
table: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/table",
|
|
9048
|
+
hyperlink: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",
|
|
9049
|
+
image: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"
|
|
9050
|
+
};
|
|
9051
|
+
const ARRAY_FORMULA_URI = "bdbb8cdc-fa1e-496e-a857-3c3f30c029c3";
|
|
9052
|
+
const RELATIONSHIP_NSR = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
|
|
9053
|
+
const HEIGHT_FACTOR = .75;
|
|
9054
|
+
/**
|
|
9055
|
+
* Excel says its default column width is 8.43 characters (64px)
|
|
9056
|
+
* which makes WIDTH_FACTOR = 0.1317, but it doesn't work well
|
|
9057
|
+
* 0.143 is a value from dev's experiments.
|
|
9058
|
+
*/
|
|
9059
|
+
const WIDTH_FACTOR = .143;
|
|
9060
|
+
/** unit : maximum number of characters a column can hold at the standard font size. What. */
|
|
9061
|
+
const EXCEL_DEFAULT_COL_WIDTH = 8.43;
|
|
9062
|
+
/** unit : points */
|
|
9063
|
+
const EXCEL_DEFAULT_ROW_HEIGHT = 12.75;
|
|
9064
|
+
const FORCE_DEFAULT_ARGS_FUNCTIONS = {
|
|
9065
|
+
FLOOR: [{
|
|
9066
|
+
type: "NUMBER",
|
|
9067
|
+
value: 1
|
|
9068
|
+
}],
|
|
9069
|
+
CEILING: [{
|
|
9070
|
+
type: "NUMBER",
|
|
9071
|
+
value: 1
|
|
9072
|
+
}],
|
|
9073
|
+
ROUND: [{
|
|
9074
|
+
type: "NUMBER",
|
|
9075
|
+
value: 0
|
|
9076
|
+
}],
|
|
9077
|
+
ROUNDUP: [{
|
|
9078
|
+
type: "NUMBER",
|
|
9079
|
+
value: 0
|
|
9080
|
+
}],
|
|
9081
|
+
ROUNDDOWN: [{
|
|
9082
|
+
type: "NUMBER",
|
|
9083
|
+
value: 0
|
|
9084
|
+
}],
|
|
9085
|
+
IFERROR: [{
|
|
9086
|
+
type: "NUMBER",
|
|
9087
|
+
value: 0
|
|
9088
|
+
}]
|
|
9089
|
+
};
|
|
9090
|
+
/**
|
|
9091
|
+
* This list contains all "future" functions that are not compatible with older versions of Excel
|
|
9092
|
+
* For more information, see https://docs.microsoft.com/en-us/openspecs/office_standards/ms-xlsx/5d1b6d44-6fc1-4ecd-8fef-0b27406cc2bf
|
|
9093
|
+
*/
|
|
9094
|
+
const NON_RETROCOMPATIBLE_FUNCTIONS = [
|
|
9095
|
+
"ACOT",
|
|
9096
|
+
"ACOTH",
|
|
9097
|
+
"AGGREGATE",
|
|
9098
|
+
"ARABIC",
|
|
9099
|
+
"BASE",
|
|
9100
|
+
"BETA.DIST",
|
|
9101
|
+
"BETA.INV",
|
|
9102
|
+
"BINOM.DIST",
|
|
9103
|
+
"BINOM.DIST.RANGE",
|
|
9104
|
+
"BINOM.INV",
|
|
9105
|
+
"BITAND",
|
|
9106
|
+
"BITLSHIFT",
|
|
9107
|
+
"BITOR",
|
|
9108
|
+
"BITRSHIFT",
|
|
9109
|
+
"BITXOR",
|
|
9110
|
+
"BYCOL",
|
|
9111
|
+
"BYROW",
|
|
9112
|
+
"CEILING.MATH",
|
|
9113
|
+
"CEILING.PRECISE",
|
|
9114
|
+
"CHISQ.DIST",
|
|
9115
|
+
"CHISQ.DIST.RT",
|
|
9116
|
+
"CHISQ.INV",
|
|
9117
|
+
"CHISQ.INV.RT",
|
|
9118
|
+
"CHISQ.TEST",
|
|
9119
|
+
"CHOOSECOLS",
|
|
9120
|
+
"CHOOSEROWS",
|
|
9121
|
+
"COMBINA",
|
|
9122
|
+
"CONCAT",
|
|
9123
|
+
"CONFIDENCE.NORM",
|
|
9124
|
+
"CONFIDENCE.T",
|
|
9125
|
+
"COT",
|
|
9126
|
+
"COTH",
|
|
9127
|
+
"COVARIANCE.P",
|
|
9128
|
+
"COVARIANCE.S",
|
|
9129
|
+
"CSC",
|
|
9130
|
+
"CSCH",
|
|
9131
|
+
"DAYS",
|
|
9132
|
+
"DECIMAL",
|
|
9133
|
+
"DROP",
|
|
9134
|
+
"ERF.PRECISE",
|
|
9135
|
+
"ERFC.PRECISE",
|
|
9136
|
+
"EXPAND",
|
|
9137
|
+
"EXPON.DIST",
|
|
9138
|
+
"F.DIST",
|
|
9139
|
+
"F.DIST.RT",
|
|
9140
|
+
"F.INV",
|
|
9141
|
+
"F.INV.RT",
|
|
9142
|
+
"F.TEST",
|
|
9143
|
+
"FIELDVALUE",
|
|
9144
|
+
"FILTERXML",
|
|
9145
|
+
"FLOOR.MATH",
|
|
9146
|
+
"FLOOR.PRECISE",
|
|
9147
|
+
"FORECAST.ETS",
|
|
9148
|
+
"FORECAST.ETS.CONFINT",
|
|
9149
|
+
"FORECAST.ETS.SEASONALITY",
|
|
9150
|
+
"FORECAST.ETS.STAT",
|
|
9151
|
+
"FORECAST.LINEAR",
|
|
9152
|
+
"FORMULATEXT",
|
|
9153
|
+
"GAMMA",
|
|
9154
|
+
"GAMMA.DIST",
|
|
9155
|
+
"GAMMA.INV",
|
|
9156
|
+
"GAMMALN.PRECISE",
|
|
9157
|
+
"GAUSS",
|
|
9158
|
+
"HSTACK",
|
|
9159
|
+
"HYPGEOM.DIST",
|
|
9160
|
+
"IFNA",
|
|
9161
|
+
"IFS",
|
|
9162
|
+
"IMCOSH",
|
|
9163
|
+
"IMCOT",
|
|
9164
|
+
"IMCSC",
|
|
9165
|
+
"IMCSCH",
|
|
9166
|
+
"IMSEC",
|
|
9167
|
+
"IMSECH",
|
|
9168
|
+
"IMSINH",
|
|
9169
|
+
"IMTAN",
|
|
9170
|
+
"ISFORMULA",
|
|
9171
|
+
"ISOMITTED",
|
|
9172
|
+
"ISOWEEKNUM",
|
|
9173
|
+
"LAMBDA",
|
|
9174
|
+
"LET",
|
|
9175
|
+
"LOGNORM.DIST",
|
|
9176
|
+
"LOGNORM.INV",
|
|
9177
|
+
"MAKEARRAY",
|
|
9178
|
+
"MAP",
|
|
9179
|
+
"MAXIFS",
|
|
9180
|
+
"MINIFS",
|
|
9181
|
+
"MODE.MULT",
|
|
9182
|
+
"MODE.SNGL",
|
|
9183
|
+
"MUNIT",
|
|
9184
|
+
"NEGBINOM.DIST",
|
|
9185
|
+
"NORM.DIST",
|
|
9186
|
+
"NORM.INV",
|
|
9187
|
+
"NORM.S.DIST",
|
|
9188
|
+
"NORM.S.INV",
|
|
9189
|
+
"NUMBERVALUE",
|
|
9190
|
+
"PDURATION",
|
|
9191
|
+
"PERCENTILE.EXC",
|
|
9192
|
+
"PERCENTILE.INC",
|
|
9193
|
+
"PERCENTRANK.EXC",
|
|
9194
|
+
"PERCENTRANK.INC",
|
|
9195
|
+
"PERMUTATIONA",
|
|
9196
|
+
"PHI",
|
|
9197
|
+
"POISSON.DIST",
|
|
9198
|
+
"PQSOURCE",
|
|
9199
|
+
"PYTHON_STR",
|
|
9200
|
+
"PYTHON_TYPE",
|
|
9201
|
+
"PYTHON_TYPENAME",
|
|
9202
|
+
"QUARTILE.EXC",
|
|
9203
|
+
"QUARTILE.INC",
|
|
9204
|
+
"QUERYSTRING",
|
|
9205
|
+
"RANDARRAY",
|
|
9206
|
+
"RANK.AVG",
|
|
9207
|
+
"RANK.EQ",
|
|
9208
|
+
"REDUCE",
|
|
9209
|
+
"RRI",
|
|
9210
|
+
"SCAN",
|
|
9211
|
+
"SEC",
|
|
9212
|
+
"SECH",
|
|
9213
|
+
"SEQUENCE",
|
|
9214
|
+
"SHEET",
|
|
9215
|
+
"SHEETS",
|
|
9216
|
+
"SKEW.P",
|
|
9217
|
+
"SORTBY",
|
|
9218
|
+
"STDEV.P",
|
|
9219
|
+
"STDEV.S",
|
|
9220
|
+
"SWITCH",
|
|
9221
|
+
"T.DIST",
|
|
9222
|
+
"T.DIST.2T",
|
|
9223
|
+
"T.DIST.RT",
|
|
9224
|
+
"T.INV",
|
|
9225
|
+
"T.INV.2T",
|
|
9226
|
+
"T.TEST",
|
|
9227
|
+
"TAKE",
|
|
9228
|
+
"TEXTAFTER",
|
|
9229
|
+
"TEXTBEFORE",
|
|
9230
|
+
"TEXTJOIN",
|
|
9231
|
+
"TEXTSPLIT",
|
|
9232
|
+
"TOCOL",
|
|
9233
|
+
"TOROW",
|
|
9234
|
+
"UNICHAR",
|
|
9235
|
+
"UNICODE",
|
|
9236
|
+
"UNIQUE",
|
|
9237
|
+
"VAR.P",
|
|
9238
|
+
"VAR.S",
|
|
9239
|
+
"VSTACK",
|
|
9240
|
+
"WEBSERVICE",
|
|
9241
|
+
"WEIBULL.DIST",
|
|
9242
|
+
"WRAPCOLS",
|
|
9243
|
+
"WRAPROWS",
|
|
9244
|
+
"XLOOKUP",
|
|
9245
|
+
"XOR",
|
|
9246
|
+
"Z.TEST"
|
|
9247
|
+
];
|
|
9248
|
+
const CONTENT_TYPES_FILE = "[Content_Types].xml";
|
|
9249
|
+
|
|
8995
9250
|
//#endregion
|
|
8996
9251
|
//#region src/helpers/color.ts
|
|
8997
9252
|
const RBA_REGEX = /rgba?\(|\s+|\)/gi;
|
|
@@ -9693,259 +9948,6 @@ function colorCell(value, minValue, minColor, colorDiffUnit) {
|
|
|
9693
9948
|
return r << 16 | g << 8 | b;
|
|
9694
9949
|
}
|
|
9695
9950
|
|
|
9696
|
-
//#endregion
|
|
9697
|
-
//#region src/xlsx/constants.ts
|
|
9698
|
-
/** In XLSX color format (no #) */
|
|
9699
|
-
const AUTO_COLOR = "000000";
|
|
9700
|
-
const XLSX_ICONSET_MAP = {
|
|
9701
|
-
arrows: "3Arrows",
|
|
9702
|
-
smiley: "3Symbols",
|
|
9703
|
-
dots: "3TrafficLights1"
|
|
9704
|
-
};
|
|
9705
|
-
const NAMESPACE = {
|
|
9706
|
-
styleSheet: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
9707
|
-
sst: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
9708
|
-
Relationships: "http://schemas.openxmlformats.org/package/2006/relationships",
|
|
9709
|
-
Types: "http://schemas.openxmlformats.org/package/2006/content-types",
|
|
9710
|
-
worksheet: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
9711
|
-
workbook: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
9712
|
-
drawing: "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing",
|
|
9713
|
-
table: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
9714
|
-
revision: "http://schemas.microsoft.com/office/spreadsheetml/2014/revision",
|
|
9715
|
-
revision3: "http://schemas.microsoft.com/office/spreadsheetml/2016/revision3",
|
|
9716
|
-
markupCompatibility: "http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
9717
|
-
};
|
|
9718
|
-
const DRAWING_NS_A = "http://schemas.openxmlformats.org/drawingml/2006/main";
|
|
9719
|
-
const DRAWING_NS_C = "http://schemas.openxmlformats.org/drawingml/2006/chart";
|
|
9720
|
-
const CONTENT_TYPES = {
|
|
9721
|
-
workbook: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml",
|
|
9722
|
-
macroEnabledWorkbook: "application/vnd.ms-excel.sheet.macroEnabled.main+xml",
|
|
9723
|
-
templateWorkbook: "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml",
|
|
9724
|
-
macroEnabledTemplateWorkbook: "application/vnd.ms-excel.template.macroEnabled.main+xml",
|
|
9725
|
-
excelAddInWorkbook: "application/vnd.ms-excel.addin.macroEnabled.main+xml",
|
|
9726
|
-
sheet: "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml",
|
|
9727
|
-
metadata: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml",
|
|
9728
|
-
sharedStrings: "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml",
|
|
9729
|
-
styles: "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml",
|
|
9730
|
-
drawing: "application/vnd.openxmlformats-officedocument.drawing+xml",
|
|
9731
|
-
chart: "application/vnd.openxmlformats-officedocument.drawingml.chart+xml",
|
|
9732
|
-
themes: "application/vnd.openxmlformats-officedocument.theme+xml",
|
|
9733
|
-
table: "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml",
|
|
9734
|
-
pivot: "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml",
|
|
9735
|
-
externalLink: "application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml"
|
|
9736
|
-
};
|
|
9737
|
-
const XLSX_RELATION_TYPE = {
|
|
9738
|
-
document: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",
|
|
9739
|
-
sheet: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",
|
|
9740
|
-
metadata: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sheetMetadata",
|
|
9741
|
-
sharedStrings: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",
|
|
9742
|
-
styles: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",
|
|
9743
|
-
drawing: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",
|
|
9744
|
-
chart: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",
|
|
9745
|
-
theme: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",
|
|
9746
|
-
table: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/table",
|
|
9747
|
-
hyperlink: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",
|
|
9748
|
-
image: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image"
|
|
9749
|
-
};
|
|
9750
|
-
const ARRAY_FORMULA_URI = "bdbb8cdc-fa1e-496e-a857-3c3f30c029c3";
|
|
9751
|
-
const RELATIONSHIP_NSR = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
|
|
9752
|
-
const HEIGHT_FACTOR = .75;
|
|
9753
|
-
/**
|
|
9754
|
-
* Excel says its default column width is 8.43 characters (64px)
|
|
9755
|
-
* which makes WIDTH_FACTOR = 0.1317, but it doesn't work well
|
|
9756
|
-
* 0.143 is a value from dev's experiments.
|
|
9757
|
-
*/
|
|
9758
|
-
const WIDTH_FACTOR = .143;
|
|
9759
|
-
/** unit : maximum number of characters a column can hold at the standard font size. What. */
|
|
9760
|
-
const EXCEL_DEFAULT_COL_WIDTH = 8.43;
|
|
9761
|
-
/** unit : points */
|
|
9762
|
-
const EXCEL_DEFAULT_ROW_HEIGHT = 12.75;
|
|
9763
|
-
const FORCE_DEFAULT_ARGS_FUNCTIONS = {
|
|
9764
|
-
FLOOR: [{
|
|
9765
|
-
type: "NUMBER",
|
|
9766
|
-
value: 1
|
|
9767
|
-
}],
|
|
9768
|
-
CEILING: [{
|
|
9769
|
-
type: "NUMBER",
|
|
9770
|
-
value: 1
|
|
9771
|
-
}],
|
|
9772
|
-
ROUND: [{
|
|
9773
|
-
type: "NUMBER",
|
|
9774
|
-
value: 0
|
|
9775
|
-
}],
|
|
9776
|
-
ROUNDUP: [{
|
|
9777
|
-
type: "NUMBER",
|
|
9778
|
-
value: 0
|
|
9779
|
-
}],
|
|
9780
|
-
ROUNDDOWN: [{
|
|
9781
|
-
type: "NUMBER",
|
|
9782
|
-
value: 0
|
|
9783
|
-
}],
|
|
9784
|
-
IFERROR: [{
|
|
9785
|
-
type: "NUMBER",
|
|
9786
|
-
value: 0
|
|
9787
|
-
}]
|
|
9788
|
-
};
|
|
9789
|
-
/**
|
|
9790
|
-
* This list contains all "future" functions that are not compatible with older versions of Excel
|
|
9791
|
-
* For more information, see https://docs.microsoft.com/en-us/openspecs/office_standards/ms-xlsx/5d1b6d44-6fc1-4ecd-8fef-0b27406cc2bf
|
|
9792
|
-
*/
|
|
9793
|
-
const NON_RETROCOMPATIBLE_FUNCTIONS = [
|
|
9794
|
-
"ACOT",
|
|
9795
|
-
"ACOTH",
|
|
9796
|
-
"AGGREGATE",
|
|
9797
|
-
"ARABIC",
|
|
9798
|
-
"BASE",
|
|
9799
|
-
"BETA.DIST",
|
|
9800
|
-
"BETA.INV",
|
|
9801
|
-
"BINOM.DIST",
|
|
9802
|
-
"BINOM.DIST.RANGE",
|
|
9803
|
-
"BINOM.INV",
|
|
9804
|
-
"BITAND",
|
|
9805
|
-
"BITLSHIFT",
|
|
9806
|
-
"BITOR",
|
|
9807
|
-
"BITRSHIFT",
|
|
9808
|
-
"BITXOR",
|
|
9809
|
-
"BYCOL",
|
|
9810
|
-
"BYROW",
|
|
9811
|
-
"CEILING.MATH",
|
|
9812
|
-
"CEILING.PRECISE",
|
|
9813
|
-
"CHISQ.DIST",
|
|
9814
|
-
"CHISQ.DIST.RT",
|
|
9815
|
-
"CHISQ.INV",
|
|
9816
|
-
"CHISQ.INV.RT",
|
|
9817
|
-
"CHISQ.TEST",
|
|
9818
|
-
"CHOOSECOLS",
|
|
9819
|
-
"CHOOSEROWS",
|
|
9820
|
-
"COMBINA",
|
|
9821
|
-
"CONCAT",
|
|
9822
|
-
"CONFIDENCE.NORM",
|
|
9823
|
-
"CONFIDENCE.T",
|
|
9824
|
-
"COT",
|
|
9825
|
-
"COTH",
|
|
9826
|
-
"COVARIANCE.P",
|
|
9827
|
-
"COVARIANCE.S",
|
|
9828
|
-
"CSC",
|
|
9829
|
-
"CSCH",
|
|
9830
|
-
"DAYS",
|
|
9831
|
-
"DECIMAL",
|
|
9832
|
-
"DROP",
|
|
9833
|
-
"ERF.PRECISE",
|
|
9834
|
-
"ERFC.PRECISE",
|
|
9835
|
-
"EXPAND",
|
|
9836
|
-
"EXPON.DIST",
|
|
9837
|
-
"F.DIST",
|
|
9838
|
-
"F.DIST.RT",
|
|
9839
|
-
"F.INV",
|
|
9840
|
-
"F.INV.RT",
|
|
9841
|
-
"F.TEST",
|
|
9842
|
-
"FIELDVALUE",
|
|
9843
|
-
"FILTERXML",
|
|
9844
|
-
"FLOOR.MATH",
|
|
9845
|
-
"FLOOR.PRECISE",
|
|
9846
|
-
"FORECAST.ETS",
|
|
9847
|
-
"FORECAST.ETS.CONFINT",
|
|
9848
|
-
"FORECAST.ETS.SEASONALITY",
|
|
9849
|
-
"FORECAST.ETS.STAT",
|
|
9850
|
-
"FORECAST.LINEAR",
|
|
9851
|
-
"FORMULATEXT",
|
|
9852
|
-
"GAMMA",
|
|
9853
|
-
"GAMMA.DIST",
|
|
9854
|
-
"GAMMA.INV",
|
|
9855
|
-
"GAMMALN.PRECISE",
|
|
9856
|
-
"GAUSS",
|
|
9857
|
-
"HSTACK",
|
|
9858
|
-
"HYPGEOM.DIST",
|
|
9859
|
-
"IFNA",
|
|
9860
|
-
"IFS",
|
|
9861
|
-
"IMCOSH",
|
|
9862
|
-
"IMCOT",
|
|
9863
|
-
"IMCSC",
|
|
9864
|
-
"IMCSCH",
|
|
9865
|
-
"IMSEC",
|
|
9866
|
-
"IMSECH",
|
|
9867
|
-
"IMSINH",
|
|
9868
|
-
"IMTAN",
|
|
9869
|
-
"ISFORMULA",
|
|
9870
|
-
"ISOMITTED",
|
|
9871
|
-
"ISOWEEKNUM",
|
|
9872
|
-
"LAMBDA",
|
|
9873
|
-
"LET",
|
|
9874
|
-
"LOGNORM.DIST",
|
|
9875
|
-
"LOGNORM.INV",
|
|
9876
|
-
"MAKEARRAY",
|
|
9877
|
-
"MAP",
|
|
9878
|
-
"MAXIFS",
|
|
9879
|
-
"MINIFS",
|
|
9880
|
-
"MODE.MULT",
|
|
9881
|
-
"MODE.SNGL",
|
|
9882
|
-
"MUNIT",
|
|
9883
|
-
"NEGBINOM.DIST",
|
|
9884
|
-
"NORM.DIST",
|
|
9885
|
-
"NORM.INV",
|
|
9886
|
-
"NORM.S.DIST",
|
|
9887
|
-
"NORM.S.INV",
|
|
9888
|
-
"NUMBERVALUE",
|
|
9889
|
-
"PDURATION",
|
|
9890
|
-
"PERCENTILE.EXC",
|
|
9891
|
-
"PERCENTILE.INC",
|
|
9892
|
-
"PERCENTRANK.EXC",
|
|
9893
|
-
"PERCENTRANK.INC",
|
|
9894
|
-
"PERMUTATIONA",
|
|
9895
|
-
"PHI",
|
|
9896
|
-
"POISSON.DIST",
|
|
9897
|
-
"PQSOURCE",
|
|
9898
|
-
"PYTHON_STR",
|
|
9899
|
-
"PYTHON_TYPE",
|
|
9900
|
-
"PYTHON_TYPENAME",
|
|
9901
|
-
"QUARTILE.EXC",
|
|
9902
|
-
"QUARTILE.INC",
|
|
9903
|
-
"QUERYSTRING",
|
|
9904
|
-
"RANDARRAY",
|
|
9905
|
-
"RANK.AVG",
|
|
9906
|
-
"RANK.EQ",
|
|
9907
|
-
"REDUCE",
|
|
9908
|
-
"RRI",
|
|
9909
|
-
"SCAN",
|
|
9910
|
-
"SEC",
|
|
9911
|
-
"SECH",
|
|
9912
|
-
"SEQUENCE",
|
|
9913
|
-
"SHEET",
|
|
9914
|
-
"SHEETS",
|
|
9915
|
-
"SKEW.P",
|
|
9916
|
-
"SORTBY",
|
|
9917
|
-
"STDEV.P",
|
|
9918
|
-
"STDEV.S",
|
|
9919
|
-
"SWITCH",
|
|
9920
|
-
"T.DIST",
|
|
9921
|
-
"T.DIST.2T",
|
|
9922
|
-
"T.DIST.RT",
|
|
9923
|
-
"T.INV",
|
|
9924
|
-
"T.INV.2T",
|
|
9925
|
-
"T.TEST",
|
|
9926
|
-
"TAKE",
|
|
9927
|
-
"TEXTAFTER",
|
|
9928
|
-
"TEXTBEFORE",
|
|
9929
|
-
"TEXTJOIN",
|
|
9930
|
-
"TEXTSPLIT",
|
|
9931
|
-
"TOCOL",
|
|
9932
|
-
"TOROW",
|
|
9933
|
-
"UNICHAR",
|
|
9934
|
-
"UNICODE",
|
|
9935
|
-
"UNIQUE",
|
|
9936
|
-
"VAR.P",
|
|
9937
|
-
"VAR.S",
|
|
9938
|
-
"VSTACK",
|
|
9939
|
-
"WEBSERVICE",
|
|
9940
|
-
"WEIBULL.DIST",
|
|
9941
|
-
"WRAPCOLS",
|
|
9942
|
-
"WRAPROWS",
|
|
9943
|
-
"XLOOKUP",
|
|
9944
|
-
"XOR",
|
|
9945
|
-
"Z.TEST"
|
|
9946
|
-
];
|
|
9947
|
-
const CONTENT_TYPES_FILE = "[Content_Types].xml";
|
|
9948
|
-
|
|
9949
9951
|
//#endregion
|
|
9950
9952
|
//#region src/helpers/figures/charts/chart_common.ts
|
|
9951
9953
|
const TREND_LINE_XAXIS_ID = "x1";
|
|
@@ -10211,10 +10213,10 @@ const chartShowValuesPlugin = {
|
|
|
10211
10213
|
drawLineOrBarOrRadarChartValues(chart, options, ctx);
|
|
10212
10214
|
break;
|
|
10213
10215
|
case "bar":
|
|
10214
|
-
options.horizontal ? drawHorizontalBarChartValues(chart, options, ctx) : drawLineOrBarOrRadarChartValues(chart, options, ctx);
|
|
10216
|
+
options.horizontal ? drawHorizontalBarChartValues(chart, options, ctx, { offsetFromAxisOrigin: true }) : drawLineOrBarOrRadarChartValues(chart, options, ctx);
|
|
10215
10217
|
break;
|
|
10216
10218
|
case "pyramid":
|
|
10217
|
-
drawHorizontalBarChartValues(chart, options, ctx);
|
|
10219
|
+
drawHorizontalBarChartValues(chart, options, ctx, { offsetFromAxisOrigin: true });
|
|
10218
10220
|
break;
|
|
10219
10221
|
case "calendar":
|
|
10220
10222
|
drawBarChartValues(chart, options, ctx);
|
|
@@ -10223,7 +10225,7 @@ const chartShowValuesPlugin = {
|
|
|
10223
10225
|
drawBubbleChartValues(chart, options, ctx);
|
|
10224
10226
|
break;
|
|
10225
10227
|
case "funnel":
|
|
10226
|
-
drawHorizontalBarChartValues(chart, options, ctx);
|
|
10228
|
+
drawHorizontalBarChartValues(chart, options, ctx, { offsetFromAxisOrigin: false });
|
|
10227
10229
|
break;
|
|
10228
10230
|
}
|
|
10229
10231
|
ctx.restore();
|
|
@@ -10298,23 +10300,33 @@ function drawBubbleChartValues(chart, options, ctx) {
|
|
|
10298
10300
|
const yMax = chart.chartArea.bottom;
|
|
10299
10301
|
const yMin = chart.chartArea.top;
|
|
10300
10302
|
const textsPositions = {};
|
|
10303
|
+
const canDrawTextInsideBubble = (chartElement, textSize) => {
|
|
10304
|
+
const radius = chartElement.options.radius ?? globalThis.Chart?.defaults.elements.point.radius ?? 3;
|
|
10305
|
+
return textSize.height < radius * 2;
|
|
10306
|
+
};
|
|
10301
10307
|
for (const dataset of chart._metasets) for (let i = 0; i < dataset._parsed.length; i++) {
|
|
10302
10308
|
const value = dataset._parsed[i].y;
|
|
10303
10309
|
if (isNaN(value)) continue;
|
|
10310
|
+
const valueToDisplay = options.callback(Number(value), dataset, i);
|
|
10304
10311
|
const point = dataset.data[i];
|
|
10305
10312
|
const xPosition = point.x;
|
|
10306
10313
|
let yPosition = Math.max(Math.min(point.y, yMax), yMin);
|
|
10314
|
+
const textSize = getTextDimensions(valueToDisplay, ctx);
|
|
10315
|
+
if (!canDrawTextInsideBubble(point, textSize)) yPosition = value < 0 ? point.y + 10 : point.y - 10;
|
|
10307
10316
|
if (!textsPositions[xPosition]) textsPositions[xPosition] = [];
|
|
10308
10317
|
for (const otherPosition of textsPositions[xPosition] || []) if (Math.abs(otherPosition - yPosition) < MINIMAL_VERTICAL_DISTANCE) yPosition = otherPosition + MINIMAL_VERTICAL_DISTANCE * (value < 0 ? 1 : -1);
|
|
10309
10318
|
textsPositions[xPosition].push(yPosition);
|
|
10310
|
-
|
|
10311
|
-
|
|
10312
|
-
|
|
10313
|
-
|
|
10314
|
-
|
|
10319
|
+
if (canDrawTextInsideBubble(point, textSize)) {
|
|
10320
|
+
ctx.strokeStyle = point.options.backgroundColor;
|
|
10321
|
+
ctx.fillStyle = options.background(Number(value), dataset, i) || "#ffffff";
|
|
10322
|
+
} else {
|
|
10323
|
+
ctx.strokeStyle = options.background(Number(value), dataset, i) || "#ffffff";
|
|
10324
|
+
ctx.fillStyle = point.options.backgroundColor;
|
|
10325
|
+
}
|
|
10326
|
+
drawTextWithBackground(valueToDisplay, xPosition, yPosition, ctx);
|
|
10315
10327
|
}
|
|
10316
10328
|
}
|
|
10317
|
-
function drawHorizontalBarChartValues(chart, options, ctx) {
|
|
10329
|
+
function drawHorizontalBarChartValues(chart, options, ctx, args) {
|
|
10318
10330
|
const textsPositions = {};
|
|
10319
10331
|
for (const dataset of chart._metasets) {
|
|
10320
10332
|
if (isTrendLineAxis(dataset.xAxisID) || isLineOverlayOnBarChart(options, dataset)) continue;
|
|
@@ -10329,7 +10341,7 @@ function drawHorizontalBarChartValues(chart, options, ctx) {
|
|
|
10329
10341
|
const distanceFromAxisOrigin = Math.abs(point.x - xZeroLine);
|
|
10330
10342
|
const PADDING = 3;
|
|
10331
10343
|
let xPosition;
|
|
10332
|
-
if (distanceFromAxisOrigin < textWidth) xPosition = value < 0 ? xZeroLine - textWidth / 2 - PADDING : xZeroLine + textWidth / 2 + PADDING;
|
|
10344
|
+
if (args.offsetFromAxisOrigin && distanceFromAxisOrigin < textWidth) xPosition = value < 0 ? xZeroLine - textWidth / 2 - PADDING : xZeroLine + textWidth / 2 + PADDING;
|
|
10333
10345
|
else xPosition = value < 0 ? point.x + point.width / 2 : point.x - point.width / 2;
|
|
10334
10346
|
if (!textsPositions[yPosition]) textsPositions[yPosition] = [];
|
|
10335
10347
|
for (const otherPosition of textsPositions[yPosition]) if (Math.abs(otherPosition - xPosition) < textWidth) xPosition = value < 0 ? otherPosition - textWidth - PADDING : otherPosition + textWidth + PADDING;
|
|
@@ -10364,6 +10376,9 @@ function drawPieChartValues(chart, options, ctx) {
|
|
|
10364
10376
|
drawTextWithBackground(displayValue, x, y, ctx);
|
|
10365
10377
|
}
|
|
10366
10378
|
}
|
|
10379
|
+
function getTextDimensions(text, ctx) {
|
|
10380
|
+
return computeCachedTextDimension(ctx, text, computeTextFont({ fontSize: globalThis.Chart?.defaults.font.size ?? 12 }, "px"));
|
|
10381
|
+
}
|
|
10367
10382
|
|
|
10368
10383
|
//#endregion
|
|
10369
10384
|
//#region src/types/chart/tree_map_chart.ts
|
|
@@ -11215,6 +11230,7 @@ function getRadarChartDatasets(definition, args) {
|
|
|
11215
11230
|
hidden,
|
|
11216
11231
|
borderColor,
|
|
11217
11232
|
backgroundColor: borderColor,
|
|
11233
|
+
pointBackgroundColor: borderColor,
|
|
11218
11234
|
pointRadius: definition.hideDataMarkers ? 0 : 3
|
|
11219
11235
|
};
|
|
11220
11236
|
if (fill) {
|
|
@@ -31289,9 +31305,10 @@ var Composer = class extends Component {
|
|
|
31289
31305
|
compositionActive = false;
|
|
31290
31306
|
spreadsheetRect = useSpreadsheetRect();
|
|
31291
31307
|
lastHoveredTokenIndex = void 0;
|
|
31292
|
-
debouncedHover = debounce((tokenIndex, hoveredRect) => {
|
|
31308
|
+
debouncedHover = debounce((tokenIndex, composerContent, hoveredRect) => {
|
|
31293
31309
|
const selection = this.contentHelper.getCurrentSelection();
|
|
31294
|
-
|
|
31310
|
+
const currentContent = this.props.composerStore.currentContent;
|
|
31311
|
+
if (selection.start !== selection.end || currentContent !== composerContent) return;
|
|
31295
31312
|
const currentHoveredContext = this.props.composerStore.hoveredTokens;
|
|
31296
31313
|
this.props.composerStore.hoverToken(tokenIndex);
|
|
31297
31314
|
if (!deepEquals(currentHoveredContext, this.props.composerStore.hoveredTokens)) this.composerState.hoveredRect = hoveredRect;
|
|
@@ -31611,7 +31628,8 @@ var Composer = class extends Component {
|
|
|
31611
31628
|
onTokenHover(tokenIndex, hoveredRect) {
|
|
31612
31629
|
if (this.lastHoveredTokenIndex !== tokenIndex) {
|
|
31613
31630
|
this.lastHoveredTokenIndex = tokenIndex;
|
|
31614
|
-
this.
|
|
31631
|
+
const composerContent = this.props.composerStore.currentContent;
|
|
31632
|
+
this.debouncedHover(tokenIndex, composerContent, hoveredRect);
|
|
31615
31633
|
}
|
|
31616
31634
|
}
|
|
31617
31635
|
/**
|
|
@@ -37065,7 +37083,7 @@ var FindAndReplacePanel = class extends Component {
|
|
|
37065
37083
|
get currentSheetMatchesCount() {
|
|
37066
37084
|
const { activeSheetMatchesCount: count, activeSheetHiddenMatchesCount: hidden, searchOptions } = this.store;
|
|
37067
37085
|
const sheetName = this.env.model.getters.getSheetName(this.env.model.getters.getActiveSheetId());
|
|
37068
|
-
let label = count === 1 ? _t("1 match in %(sheetName)s", { sheetName }) : _t("%(count)s matches in %(sheetName)s", {
|
|
37086
|
+
let label = count === 1 ? _t("1 match in '%(sheetName)s'", { sheetName }) : _t("%(count)s matches in '%(sheetName)s'", {
|
|
37069
37087
|
count,
|
|
37070
37088
|
sheetName
|
|
37071
37089
|
});
|
|
@@ -37077,10 +37095,10 @@ var FindAndReplacePanel = class extends Component {
|
|
|
37077
37095
|
if (!range) return "";
|
|
37078
37096
|
const { specificRangeMatchesCount: count, specificRangeHiddenMatchesCount: hidden, searchOptions } = this.store;
|
|
37079
37097
|
const { sheetId, zone } = range;
|
|
37080
|
-
let label = count === 1 ? _t("1 match in range %(range)s of %(sheetName)s", {
|
|
37098
|
+
let label = count === 1 ? _t("1 match in range %(range)s of '%(sheetName)s'", {
|
|
37081
37099
|
range: zoneToXc(zone),
|
|
37082
37100
|
sheetName: this.env.model.getters.getSheetName(sheetId)
|
|
37083
|
-
}) : _t("%(count)s matches in range %(range)s of %(sheetName)s", {
|
|
37101
|
+
}) : _t("%(count)s matches in range %(range)s of '%(sheetName)s'", {
|
|
37084
37102
|
count,
|
|
37085
37103
|
range: zoneToXc(zone),
|
|
37086
37104
|
sheetName: this.env.model.getters.getSheetName(sheetId)
|
|
@@ -41267,7 +41285,13 @@ var PivotSpreadsheetSidePanel = class extends Component {
|
|
|
41267
41285
|
}
|
|
41268
41286
|
onSelectionChanged(ranges) {
|
|
41269
41287
|
this.state.rangeHasChanged = true;
|
|
41270
|
-
|
|
41288
|
+
if (ranges.length === 0) {
|
|
41289
|
+
this.state.range = void 0;
|
|
41290
|
+
return;
|
|
41291
|
+
}
|
|
41292
|
+
const sheetId = this.env.model.getters.getActiveSheetId();
|
|
41293
|
+
const range = this.env.model.getters.getRangeFromSheetXC(sheetId, ranges[0]);
|
|
41294
|
+
this.state.range = this.env.model.getters.getRangeString(range, "forceSheetReference", { useBoundedReference: true });
|
|
41271
41295
|
}
|
|
41272
41296
|
onSelectionConfirmed() {
|
|
41273
41297
|
if (this.state.range) {
|
|
@@ -51026,6 +51050,7 @@ var CarouselPlugin = class extends CorePlugin {
|
|
|
51026
51050
|
return "Success";
|
|
51027
51051
|
case "UPDATE_CAROUSEL":
|
|
51028
51052
|
if (!this.carousels[cmd.sheetId]?.[cmd.figureId]) return "InvalidFigureId";
|
|
51053
|
+
for (const item of cmd.definition.items) if (item.type === "chart" && !this.getters.getChart(item.chartId)) return "ChartDoesNotExist";
|
|
51029
51054
|
return "Success";
|
|
51030
51055
|
}
|
|
51031
51056
|
return "Success";
|
|
@@ -51130,6 +51155,7 @@ var Squisher = class {
|
|
|
51130
51155
|
baseFormulaWasTransformed = false;
|
|
51131
51156
|
rangeToStringOptions = { doNotSimplifyRange: true };
|
|
51132
51157
|
baseNumber = void 0;
|
|
51158
|
+
baseNumberFormat = void 0;
|
|
51133
51159
|
constructor(getters) {
|
|
51134
51160
|
this.getters = getters;
|
|
51135
51161
|
}
|
|
@@ -51164,6 +51190,11 @@ var Squisher = class {
|
|
|
51164
51190
|
this.baseFormulaWasTransformed = false;
|
|
51165
51191
|
}
|
|
51166
51192
|
}
|
|
51193
|
+
/** Reset the base number literal chain, so the next literal number cannot be squished as an offset of it */
|
|
51194
|
+
resetBaseNumber() {
|
|
51195
|
+
this.baseNumber = void 0;
|
|
51196
|
+
this.baseNumberFormat = void 0;
|
|
51197
|
+
}
|
|
51167
51198
|
/**
|
|
51168
51199
|
* Takes a cell and squish their formulas against the previous one (in the previous call).
|
|
51169
51200
|
* 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).
|
|
@@ -51202,8 +51233,9 @@ var Squisher = class {
|
|
|
51202
51233
|
if (typeof cell.parsedValue === "number" && cell.parsedValue % 1 === 0) {
|
|
51203
51234
|
this.resetBaseFormula();
|
|
51204
51235
|
const numberValue = cell.parsedValue;
|
|
51205
|
-
if (this.baseNumber === void 0) {
|
|
51236
|
+
if (this.baseNumber === void 0 || cell.format !== this.baseNumberFormat) {
|
|
51206
51237
|
this.baseNumber = numberValue;
|
|
51238
|
+
this.baseNumberFormat = cell.format;
|
|
51207
51239
|
return cell.content;
|
|
51208
51240
|
}
|
|
51209
51241
|
const numberOffset = numberValue - this.baseNumber;
|
|
@@ -51214,7 +51246,7 @@ var Squisher = class {
|
|
|
51214
51246
|
}
|
|
51215
51247
|
}
|
|
51216
51248
|
this.resetBaseFormula();
|
|
51217
|
-
this.
|
|
51249
|
+
this.resetBaseNumber();
|
|
51218
51250
|
return cell.content;
|
|
51219
51251
|
}
|
|
51220
51252
|
squishCommand(command) {
|
|
@@ -51223,6 +51255,8 @@ var Squisher = class {
|
|
|
51223
51255
|
const squished = this.squish(cell, command.sheetId);
|
|
51224
51256
|
return typeof squished === "string" ? command.content : squished;
|
|
51225
51257
|
}
|
|
51258
|
+
this.resetBaseFormula();
|
|
51259
|
+
this.resetBaseNumber();
|
|
51226
51260
|
return command.content;
|
|
51227
51261
|
}
|
|
51228
51262
|
/**
|
|
@@ -51376,8 +51410,10 @@ var Unsquisher = class {
|
|
|
51376
51410
|
continue;
|
|
51377
51411
|
}
|
|
51378
51412
|
const current = command.content;
|
|
51379
|
-
if (current === void 0 || current === null || current === "")
|
|
51380
|
-
|
|
51413
|
+
if (current === void 0 || current === null || current === "") {
|
|
51414
|
+
this.rebase();
|
|
51415
|
+
strategy = "NOT_A_FORMULA";
|
|
51416
|
+
} else strategy = this.chooseStrategy(current, strategy, command.sheetId, getters);
|
|
51381
51417
|
let targetPositions;
|
|
51382
51418
|
if (command.type === "SQUISHED_UPDATE_CELL" && "targetRange" in command) {
|
|
51383
51419
|
const [start, end] = command.targetRange.split(":");
|
|
@@ -51422,8 +51458,11 @@ var Unsquisher = class {
|
|
|
51422
51458
|
let strategy;
|
|
51423
51459
|
for (const { key } of keys) {
|
|
51424
51460
|
const current = squished[key];
|
|
51425
|
-
if (current === void 0 || current === null || current === "")
|
|
51426
|
-
|
|
51461
|
+
if (current === void 0 || current === null || current === "") {
|
|
51462
|
+
this.rebase();
|
|
51463
|
+
strategy = void 0;
|
|
51464
|
+
continue;
|
|
51465
|
+
} else strategy = this.chooseStrategy(current, strategy, sheetId, getters);
|
|
51427
51466
|
const parts = key.split(":");
|
|
51428
51467
|
const targetPositions = parts.length === 1 ? expandXc(key) : expandRange(parts[0], parts[1]);
|
|
51429
51468
|
yield* this.applyStrategy(strategy, targetPositions, current, sheetId, getters);
|
|
@@ -51469,6 +51508,9 @@ var Unsquisher = class {
|
|
|
51469
51508
|
case "FIRST_OFFSET":
|
|
51470
51509
|
strategy = "COMBINE_OFFSET";
|
|
51471
51510
|
break;
|
|
51511
|
+
case "COMBINE_OFFSET":
|
|
51512
|
+
case "OFFSET_NUMBER": break;
|
|
51513
|
+
default: throw new Error(`Cannot unsquish an offset without a preceding base cell: ${strategy}`);
|
|
51472
51514
|
}
|
|
51473
51515
|
}
|
|
51474
51516
|
return strategy;
|
|
@@ -56536,6 +56578,7 @@ var FormulaDependencyGraph = class {
|
|
|
56536
56578
|
}
|
|
56537
56579
|
getCellsDependingOn(ranges, visited = new RangeSet()) {
|
|
56538
56580
|
visited = visited.copy();
|
|
56581
|
+
let initialRangesToRemove = visited.copy();
|
|
56539
56582
|
const queue = Array.from(ranges).reverse();
|
|
56540
56583
|
while (queue.length > 0) {
|
|
56541
56584
|
const range = queue.pop();
|
|
@@ -56551,8 +56594,9 @@ var FormulaDependencyGraph = class {
|
|
|
56551
56594
|
for (const interval of overlappingIntervals) impactedRanges.add(interval.dependents);
|
|
56552
56595
|
}
|
|
56553
56596
|
queue.push(...impactedRanges.difference(visited));
|
|
56597
|
+
initialRangesToRemove = initialRangesToRemove.difference(impactedRanges);
|
|
56554
56598
|
}
|
|
56555
|
-
for (const range of
|
|
56599
|
+
for (const range of initialRangesToRemove) visited.delete(range);
|
|
56556
56600
|
return visited;
|
|
56557
56601
|
}
|
|
56558
56602
|
getOrCreateIntervalTree(sheetId, col) {
|
|
@@ -62331,6 +62375,7 @@ var Session = class extends EventBus {
|
|
|
62331
62375
|
transportService;
|
|
62332
62376
|
serverRevisionId;
|
|
62333
62377
|
commandSquisher;
|
|
62378
|
+
shouldVerifySquish;
|
|
62334
62379
|
/**
|
|
62335
62380
|
* Positions of the others client.
|
|
62336
62381
|
*/
|
|
@@ -62364,13 +62409,15 @@ var Session = class extends EventBus {
|
|
|
62364
62409
|
* between all connected clients
|
|
62365
62410
|
* @param serverRevisionId
|
|
62366
62411
|
* @param commandSquisher used to squish and unsquish commands to reduce the size of messages sent to the server
|
|
62412
|
+
* @param shouldVerifySquish either the commands should be unsquished and verified before being sent to the server
|
|
62367
62413
|
*/
|
|
62368
|
-
constructor(revisions, transportService, serverRevisionId = DEFAULT_REVISION_ID, commandSquisher) {
|
|
62414
|
+
constructor(revisions, transportService, serverRevisionId = DEFAULT_REVISION_ID, commandSquisher, shouldVerifySquish = true) {
|
|
62369
62415
|
super();
|
|
62370
62416
|
this.revisions = revisions;
|
|
62371
62417
|
this.transportService = transportService;
|
|
62372
62418
|
this.serverRevisionId = serverRevisionId;
|
|
62373
62419
|
this.commandSquisher = commandSquisher;
|
|
62420
|
+
this.shouldVerifySquish = shouldVerifySquish;
|
|
62374
62421
|
}
|
|
62375
62422
|
canApplyOptimisticUpdate() {
|
|
62376
62423
|
return !this.waitingUndoRedoAck;
|
|
@@ -62626,10 +62673,20 @@ var Session = class extends EventBus {
|
|
|
62626
62673
|
this.revisions.rebase(revision.id);
|
|
62627
62674
|
revision = this.revisions.get(message.nextRevisionId);
|
|
62628
62675
|
}
|
|
62629
|
-
|
|
62676
|
+
const squishedCommands = this.commandSquisher.squish(revision.commands);
|
|
62677
|
+
if (!squishedCommands.some((x) => x.type === "SQUISHED_UPDATE_CELL")) message = {
|
|
62630
62678
|
...message,
|
|
62631
62679
|
commands: revision.commands
|
|
62632
62680
|
};
|
|
62681
|
+
else if (this.shouldVerifySquish && !deepEquals(revision.commands, this.commandSquisher.unsquish(squishedCommands))) message = {
|
|
62682
|
+
...message,
|
|
62683
|
+
commands: revision.commands,
|
|
62684
|
+
squishedFailed: true
|
|
62685
|
+
};
|
|
62686
|
+
else message = {
|
|
62687
|
+
...message,
|
|
62688
|
+
commands: squishedCommands
|
|
62689
|
+
};
|
|
62633
62690
|
}
|
|
62634
62691
|
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.
|
|
62635
62692
|
${JSON.stringify(message)}`);
|
|
@@ -69862,13 +69919,12 @@ var SpreadsheetDashboard = class extends Component {
|
|
|
69862
69919
|
return this.env.model.getters.getColDimensions(sheetId, right).end;
|
|
69863
69920
|
}
|
|
69864
69921
|
get dashboardStyle() {
|
|
69865
|
-
|
|
69866
|
-
if (this.env.model.getters.getActiveSheet().backgroundColor) style["background-color"] = "transparent";
|
|
69867
|
-
return cssPropertiesToCss(style);
|
|
69922
|
+
return cssPropertiesToCss({ zoom: `${this.env.model.getters.getViewportZoomLevel()}` });
|
|
69868
69923
|
}
|
|
69869
69924
|
get backgroundStyle() {
|
|
69870
69925
|
const sheet = this.env.model.getters.getActiveSheet();
|
|
69871
|
-
|
|
69926
|
+
const theme = this.env.model.getters.getSpreadsheetTheme();
|
|
69927
|
+
return cssPropertiesToCss({ "background-color": sheet.backgroundColor || theme.backgroundColor });
|
|
69872
69928
|
}
|
|
69873
69929
|
};
|
|
69874
69930
|
|
|
@@ -70400,7 +70456,7 @@ var FigureRendererStore = class extends DisposableStore {
|
|
|
70400
70456
|
if (!this.getters.isDashboard()) {
|
|
70401
70457
|
ctx.strokeStyle = GRAY_400;
|
|
70402
70458
|
ctx.lineWidth = 1;
|
|
70403
|
-
ctx.strokeRect(x, y, figure.width, figure.height);
|
|
70459
|
+
ctx.strokeRect(x + .5, y + .5, figure.width - 1, figure.height - 1);
|
|
70404
70460
|
}
|
|
70405
70461
|
}
|
|
70406
70462
|
}
|
|
@@ -79280,14 +79336,13 @@ const PyramidChart = {
|
|
|
79280
79336
|
},
|
|
79281
79337
|
getDefinitionForExcel(getters, definition, { dataSets, labelRange }) {
|
|
79282
79338
|
if (definition.dataSource.type !== "range") return;
|
|
79283
|
-
const
|
|
79284
|
-
const { dataSetsValues } = chartData;
|
|
79339
|
+
const { dataSetsValues } = getPyramidChartData(definition, getChartData(getters, definition.dataSource), getters);
|
|
79285
79340
|
const maxValue = Math.max(...dataSetsValues.map((dataSet) => Math.max(...dataSet.data.map((cell) => isNumberResult(cell) ? Math.abs(cell.value) : -Infinity))));
|
|
79286
79341
|
return {
|
|
79287
79342
|
...definition,
|
|
79288
79343
|
horizontal: true,
|
|
79289
|
-
backgroundColor: toXlsxHexColor(
|
|
79290
|
-
fontColor: toXlsxHexColor(chartFontColor(
|
|
79344
|
+
backgroundColor: toXlsxHexColor(definition.background || "#FFFFFF"),
|
|
79345
|
+
fontColor: toXlsxHexColor(chartFontColor(definition.background)),
|
|
79291
79346
|
dataSets,
|
|
79292
79347
|
labelRange,
|
|
79293
79348
|
verticalAxis: getDefinedAxis(definition),
|
|
@@ -87942,6 +87997,6 @@ exports.stores = stores;
|
|
|
87942
87997
|
exports.tokenColors = tokenColors;
|
|
87943
87998
|
exports.tokenize = tokenize;
|
|
87944
87999
|
|
|
87945
|
-
__info__.version = "19.4.
|
|
87946
|
-
__info__.date = "2026-
|
|
87947
|
-
__info__.hash = "
|
|
88000
|
+
__info__.version = "19.4.11";
|
|
88001
|
+
__info__.date = "2026-09-04T07:50:39.272Z";
|
|
88002
|
+
__info__.hash = "7660254";
|