@odoo/o-spreadsheet 17.4.27 → 17.4.28
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.js +51 -53
- package/dist/o-spreadsheet.esm.js +51 -53
- package/dist/o-spreadsheet.iife.js +51 -53
- package/dist/o-spreadsheet.iife.min.js +49 -47
- package/dist/o_spreadsheet.xml +6 -3
- 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 17.4.
|
|
6
|
-
* @date 2025-03-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.4.28
|
|
6
|
+
* @date 2025-03-26T12:48:33.387Z
|
|
7
|
+
* @hash a81a8f4
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
'use strict';
|
|
@@ -1009,7 +1009,10 @@ function rgbaStringToHex(color) {
|
|
|
1009
1009
|
}
|
|
1010
1010
|
else if (stringVals.length === 4) {
|
|
1011
1011
|
const alpha = parseFloat(stringVals.pop() || "1");
|
|
1012
|
-
|
|
1012
|
+
if (isNaN(alpha)) {
|
|
1013
|
+
throw new Error("invalid alpha value");
|
|
1014
|
+
}
|
|
1015
|
+
alphaHex = Math.round(alpha * 255);
|
|
1013
1016
|
}
|
|
1014
1017
|
const vals = stringVals.map((val) => parseInt(val, 10));
|
|
1015
1018
|
if (alphaHex !== 255) {
|
|
@@ -5965,7 +5968,7 @@ function isValidLocale(locale) {
|
|
|
5965
5968
|
*/
|
|
5966
5969
|
function canonicalizeNumberContent(content, locale) {
|
|
5967
5970
|
return content.startsWith("=")
|
|
5968
|
-
? canonicalizeFormula
|
|
5971
|
+
? canonicalizeFormula(content, locale)
|
|
5969
5972
|
: canonicalizeNumberLiteral(content, locale);
|
|
5970
5973
|
}
|
|
5971
5974
|
/**
|
|
@@ -5980,7 +5983,7 @@ function canonicalizeNumberContent(content, locale) {
|
|
|
5980
5983
|
*/
|
|
5981
5984
|
function canonicalizeContent(content, locale) {
|
|
5982
5985
|
return content.startsWith("=")
|
|
5983
|
-
? canonicalizeFormula
|
|
5986
|
+
? canonicalizeFormula(content, locale)
|
|
5984
5987
|
: canonicalizeLiteral(content, locale);
|
|
5985
5988
|
}
|
|
5986
5989
|
/**
|
|
@@ -5996,15 +5999,21 @@ function localizeContent(content, locale) {
|
|
|
5996
5999
|
? localizeFormula(content, locale)
|
|
5997
6000
|
: localizeLiteral(content, locale);
|
|
5998
6001
|
}
|
|
6002
|
+
/** Change a number string to its canonical form (en_US locale) */
|
|
6003
|
+
function canonicalizeNumberValue(content, locale) {
|
|
6004
|
+
return content.startsWith("=")
|
|
6005
|
+
? canonicalizeFormula(content, locale)
|
|
6006
|
+
: canonicalizeNumberLiteral(content, locale);
|
|
6007
|
+
}
|
|
5999
6008
|
/** Change a formula to its canonical form (en_US locale) */
|
|
6000
|
-
function canonicalizeFormula
|
|
6001
|
-
return _localizeFormula
|
|
6009
|
+
function canonicalizeFormula(formula, locale) {
|
|
6010
|
+
return _localizeFormula(formula, locale, DEFAULT_LOCALE);
|
|
6002
6011
|
}
|
|
6003
6012
|
/** Change a formula from the canonical form to the given locale */
|
|
6004
6013
|
function localizeFormula(formula, locale) {
|
|
6005
|
-
return _localizeFormula
|
|
6014
|
+
return _localizeFormula(formula, DEFAULT_LOCALE, locale);
|
|
6006
6015
|
}
|
|
6007
|
-
function _localizeFormula
|
|
6016
|
+
function _localizeFormula(formula, fromLocale, toLocale) {
|
|
6008
6017
|
if (fromLocale.formulaArgSeparator === toLocale.formulaArgSeparator &&
|
|
6009
6018
|
fromLocale.decimalSeparator === toLocale.decimalSeparator) {
|
|
6010
6019
|
return formula;
|
|
@@ -6159,37 +6168,6 @@ function getDateTimeFormat(locale) {
|
|
|
6159
6168
|
return locale.dateFormat + " " + locale.timeFormat;
|
|
6160
6169
|
}
|
|
6161
6170
|
|
|
6162
|
-
/** Change a number string to its canonical form (en_US locale) */
|
|
6163
|
-
function canonicalizeNumberValue(content, locale) {
|
|
6164
|
-
return content.startsWith("=")
|
|
6165
|
-
? canonicalizeFormula(content, locale)
|
|
6166
|
-
: canonicalizeNumberLiteral(content, locale);
|
|
6167
|
-
}
|
|
6168
|
-
/** Change a formula to its canonical form (en_US locale) */
|
|
6169
|
-
function canonicalizeFormula(formula, locale) {
|
|
6170
|
-
return _localizeFormula(formula, locale, DEFAULT_LOCALE);
|
|
6171
|
-
}
|
|
6172
|
-
function _localizeFormula(formula, fromLocale, toLocale) {
|
|
6173
|
-
if (fromLocale.formulaArgSeparator === toLocale.formulaArgSeparator &&
|
|
6174
|
-
fromLocale.decimalSeparator === toLocale.decimalSeparator) {
|
|
6175
|
-
return formula;
|
|
6176
|
-
}
|
|
6177
|
-
const tokens = tokenize(formula, fromLocale);
|
|
6178
|
-
let localizedFormula = "";
|
|
6179
|
-
for (const token of tokens) {
|
|
6180
|
-
if (token.type === "NUMBER") {
|
|
6181
|
-
localizedFormula += token.value.replace(fromLocale.decimalSeparator, toLocale.decimalSeparator);
|
|
6182
|
-
}
|
|
6183
|
-
else if (token.type === "ARG_SEPARATOR") {
|
|
6184
|
-
localizedFormula += toLocale.formulaArgSeparator;
|
|
6185
|
-
}
|
|
6186
|
-
else {
|
|
6187
|
-
localizedFormula += token.value;
|
|
6188
|
-
}
|
|
6189
|
-
}
|
|
6190
|
-
return localizedFormula;
|
|
6191
|
-
}
|
|
6192
|
-
|
|
6193
6171
|
function boolAnd(args) {
|
|
6194
6172
|
let foundBoolean = false;
|
|
6195
6173
|
let acc = true;
|
|
@@ -12026,7 +12004,8 @@ function getChartLabelValues(getters, dataSets, labelRange) {
|
|
|
12026
12004
|
}
|
|
12027
12005
|
}
|
|
12028
12006
|
else if (dataSets.length === 1) {
|
|
12029
|
-
|
|
12007
|
+
const dataLength = getData(getters, dataSets[0]).length;
|
|
12008
|
+
for (let i = 0; i < dataLength; i++) {
|
|
12030
12009
|
labels.formattedValues.push("");
|
|
12031
12010
|
labels.values.push("");
|
|
12032
12011
|
}
|
|
@@ -43181,9 +43160,9 @@ const XLSX_CHART_TYPES = [
|
|
|
43181
43160
|
/** In XLSX color format (no #) */
|
|
43182
43161
|
const AUTO_COLOR = "000000";
|
|
43183
43162
|
const XLSX_ICONSET_MAP = {
|
|
43184
|
-
|
|
43163
|
+
arrows: "3Arrows",
|
|
43185
43164
|
smiley: "3Symbols",
|
|
43186
|
-
|
|
43165
|
+
dots: "3TrafficLights1",
|
|
43187
43166
|
};
|
|
43188
43167
|
const NAMESPACE = {
|
|
43189
43168
|
styleSheet: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
@@ -43599,6 +43578,7 @@ const ICON_SET_CONVERSION_MAP = {
|
|
|
43599
43578
|
};
|
|
43600
43579
|
/** Map between legend position in XLSX file and human readable position */
|
|
43601
43580
|
const DRAWING_LEGEND_POSITION_CONVERSION_MAP = {
|
|
43581
|
+
none: "none",
|
|
43602
43582
|
b: "bottom",
|
|
43603
43583
|
t: "top",
|
|
43604
43584
|
l: "left",
|
|
@@ -45848,7 +45828,7 @@ class XlsxChartExtractor extends XlsxBaseExtractor {
|
|
|
45848
45828
|
default: "ffffff",
|
|
45849
45829
|
}).asString(),
|
|
45850
45830
|
legendPosition: DRAWING_LEGEND_POSITION_CONVERSION_MAP[this.extractChildAttr(rootChartElement, "c:legendPos", "val", {
|
|
45851
|
-
default: "
|
|
45831
|
+
default: "none",
|
|
45852
45832
|
}).asString()],
|
|
45853
45833
|
stacked: barChartGrouping === "stacked",
|
|
45854
45834
|
fontColor: "000000",
|
|
@@ -45882,7 +45862,7 @@ class XlsxChartExtractor extends XlsxBaseExtractor {
|
|
|
45882
45862
|
default: "ffffff",
|
|
45883
45863
|
}).asString(),
|
|
45884
45864
|
legendPosition: DRAWING_LEGEND_POSITION_CONVERSION_MAP[this.extractChildAttr(chartElement, "c:legendPos", "val", {
|
|
45885
|
-
default: "
|
|
45865
|
+
default: "none",
|
|
45886
45866
|
}).asString()],
|
|
45887
45867
|
stacked: barChartGrouping === "stacked",
|
|
45888
45868
|
fontColor: "000000",
|
|
@@ -64180,7 +64160,9 @@ css /* scss */ `
|
|
|
64180
64160
|
margin-top: -1px;
|
|
64181
64161
|
border: 1px solid;
|
|
64182
64162
|
|
|
64183
|
-
|
|
64163
|
+
/* In readonly we always show the fx icon if the composer is empty, not matter the focus */
|
|
64164
|
+
.o-composer:empty:not(:focus):not(.active)::before,
|
|
64165
|
+
&.o-topbar-composer-readonly .o-composer:empty::before {
|
|
64184
64166
|
content: url("data:image/svg+xml,${encodeURIComponent(FX_SVG)}");
|
|
64185
64167
|
position: relative;
|
|
64186
64168
|
top: 20%;
|
|
@@ -67424,10 +67406,14 @@ function addIconSetRule(cf, rule) {
|
|
|
67424
67406
|
continue;
|
|
67425
67407
|
}
|
|
67426
67408
|
const cfValueObjectNodes = cfValueObject.map((attrs) => escapeXml /*xml*/ `<cfvo ${formatAttributes(attrs)} />`);
|
|
67409
|
+
const iconSetAttrs = [["iconSet", getIconSet(rule.icons)]];
|
|
67410
|
+
if (isIconSetReversed(rule.icons)) {
|
|
67411
|
+
iconSetAttrs.push(["reverse", "1"]);
|
|
67412
|
+
}
|
|
67427
67413
|
conditionalFormats.push(escapeXml /*xml*/ `
|
|
67428
67414
|
<conditionalFormatting sqref="${range}">
|
|
67429
67415
|
<cfRule ${formatAttributes(ruleAttributes)}>
|
|
67430
|
-
<iconSet
|
|
67416
|
+
<iconSet ${formatAttributes(iconSetAttrs)}>
|
|
67431
67417
|
${joinXmlNodes(cfValueObjectNodes)}
|
|
67432
67418
|
</iconSet>
|
|
67433
67419
|
</cfRule>
|
|
@@ -67445,9 +67431,21 @@ function commonCfAttributes(cf) {
|
|
|
67445
67431
|
["stopIfTrue", cf.stopIfTrue ? 1 : 0],
|
|
67446
67432
|
];
|
|
67447
67433
|
}
|
|
67434
|
+
function isIconSetReversed(iconSet) {
|
|
67435
|
+
const defaultIconSet = ICON_SETS[detectIconsType(iconSet)];
|
|
67436
|
+
return iconSet.upper === defaultIconSet.bad && iconSet.lower === defaultIconSet.good;
|
|
67437
|
+
}
|
|
67448
67438
|
function getIconSet(iconSet) {
|
|
67449
|
-
return XLSX_ICONSET_MAP[
|
|
67450
|
-
|
|
67439
|
+
return XLSX_ICONSET_MAP[detectIconsType(iconSet)];
|
|
67440
|
+
}
|
|
67441
|
+
/**
|
|
67442
|
+
* Partial detection based on "upper" point only.
|
|
67443
|
+
* We support any arbitrary icon in the set, while excel doesn't allow
|
|
67444
|
+
* mixing icons from different types.
|
|
67445
|
+
*/
|
|
67446
|
+
function detectIconsType(iconSet) {
|
|
67447
|
+
const type = Object.keys(ICON_SETS).find((type) => Object.values(ICON_SETS[type]).includes(iconSet.upper)) || "dots";
|
|
67448
|
+
return type;
|
|
67451
67449
|
}
|
|
67452
67450
|
function thresholdAttributes(threshold, position) {
|
|
67453
67451
|
const type = getExcelThresholdType(threshold.type, position);
|
|
@@ -69229,6 +69227,6 @@ exports.tokenColors = tokenColors;
|
|
|
69229
69227
|
exports.tokenize = tokenize;
|
|
69230
69228
|
|
|
69231
69229
|
|
|
69232
|
-
__info__.version = "17.4.
|
|
69233
|
-
__info__.date = "2025-03-
|
|
69234
|
-
__info__.hash = "
|
|
69230
|
+
__info__.version = "17.4.28";
|
|
69231
|
+
__info__.date = "2025-03-26T12:48:33.387Z";
|
|
69232
|
+
__info__.hash = "a81a8f4";
|
|
@@ -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 17.4.
|
|
6
|
-
* @date 2025-03-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.4.28
|
|
6
|
+
* @date 2025-03-26T12:48:33.387Z
|
|
7
|
+
* @hash a81a8f4
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, useState, onPatched, onWillPatch, onWillUpdateProps, useExternalListener, onWillStart, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
|
|
@@ -1007,7 +1007,10 @@ function rgbaStringToHex(color) {
|
|
|
1007
1007
|
}
|
|
1008
1008
|
else if (stringVals.length === 4) {
|
|
1009
1009
|
const alpha = parseFloat(stringVals.pop() || "1");
|
|
1010
|
-
|
|
1010
|
+
if (isNaN(alpha)) {
|
|
1011
|
+
throw new Error("invalid alpha value");
|
|
1012
|
+
}
|
|
1013
|
+
alphaHex = Math.round(alpha * 255);
|
|
1011
1014
|
}
|
|
1012
1015
|
const vals = stringVals.map((val) => parseInt(val, 10));
|
|
1013
1016
|
if (alphaHex !== 255) {
|
|
@@ -5963,7 +5966,7 @@ function isValidLocale(locale) {
|
|
|
5963
5966
|
*/
|
|
5964
5967
|
function canonicalizeNumberContent(content, locale) {
|
|
5965
5968
|
return content.startsWith("=")
|
|
5966
|
-
? canonicalizeFormula
|
|
5969
|
+
? canonicalizeFormula(content, locale)
|
|
5967
5970
|
: canonicalizeNumberLiteral(content, locale);
|
|
5968
5971
|
}
|
|
5969
5972
|
/**
|
|
@@ -5978,7 +5981,7 @@ function canonicalizeNumberContent(content, locale) {
|
|
|
5978
5981
|
*/
|
|
5979
5982
|
function canonicalizeContent(content, locale) {
|
|
5980
5983
|
return content.startsWith("=")
|
|
5981
|
-
? canonicalizeFormula
|
|
5984
|
+
? canonicalizeFormula(content, locale)
|
|
5982
5985
|
: canonicalizeLiteral(content, locale);
|
|
5983
5986
|
}
|
|
5984
5987
|
/**
|
|
@@ -5994,15 +5997,21 @@ function localizeContent(content, locale) {
|
|
|
5994
5997
|
? localizeFormula(content, locale)
|
|
5995
5998
|
: localizeLiteral(content, locale);
|
|
5996
5999
|
}
|
|
6000
|
+
/** Change a number string to its canonical form (en_US locale) */
|
|
6001
|
+
function canonicalizeNumberValue(content, locale) {
|
|
6002
|
+
return content.startsWith("=")
|
|
6003
|
+
? canonicalizeFormula(content, locale)
|
|
6004
|
+
: canonicalizeNumberLiteral(content, locale);
|
|
6005
|
+
}
|
|
5997
6006
|
/** Change a formula to its canonical form (en_US locale) */
|
|
5998
|
-
function canonicalizeFormula
|
|
5999
|
-
return _localizeFormula
|
|
6007
|
+
function canonicalizeFormula(formula, locale) {
|
|
6008
|
+
return _localizeFormula(formula, locale, DEFAULT_LOCALE);
|
|
6000
6009
|
}
|
|
6001
6010
|
/** Change a formula from the canonical form to the given locale */
|
|
6002
6011
|
function localizeFormula(formula, locale) {
|
|
6003
|
-
return _localizeFormula
|
|
6012
|
+
return _localizeFormula(formula, DEFAULT_LOCALE, locale);
|
|
6004
6013
|
}
|
|
6005
|
-
function _localizeFormula
|
|
6014
|
+
function _localizeFormula(formula, fromLocale, toLocale) {
|
|
6006
6015
|
if (fromLocale.formulaArgSeparator === toLocale.formulaArgSeparator &&
|
|
6007
6016
|
fromLocale.decimalSeparator === toLocale.decimalSeparator) {
|
|
6008
6017
|
return formula;
|
|
@@ -6157,37 +6166,6 @@ function getDateTimeFormat(locale) {
|
|
|
6157
6166
|
return locale.dateFormat + " " + locale.timeFormat;
|
|
6158
6167
|
}
|
|
6159
6168
|
|
|
6160
|
-
/** Change a number string to its canonical form (en_US locale) */
|
|
6161
|
-
function canonicalizeNumberValue(content, locale) {
|
|
6162
|
-
return content.startsWith("=")
|
|
6163
|
-
? canonicalizeFormula(content, locale)
|
|
6164
|
-
: canonicalizeNumberLiteral(content, locale);
|
|
6165
|
-
}
|
|
6166
|
-
/** Change a formula to its canonical form (en_US locale) */
|
|
6167
|
-
function canonicalizeFormula(formula, locale) {
|
|
6168
|
-
return _localizeFormula(formula, locale, DEFAULT_LOCALE);
|
|
6169
|
-
}
|
|
6170
|
-
function _localizeFormula(formula, fromLocale, toLocale) {
|
|
6171
|
-
if (fromLocale.formulaArgSeparator === toLocale.formulaArgSeparator &&
|
|
6172
|
-
fromLocale.decimalSeparator === toLocale.decimalSeparator) {
|
|
6173
|
-
return formula;
|
|
6174
|
-
}
|
|
6175
|
-
const tokens = tokenize(formula, fromLocale);
|
|
6176
|
-
let localizedFormula = "";
|
|
6177
|
-
for (const token of tokens) {
|
|
6178
|
-
if (token.type === "NUMBER") {
|
|
6179
|
-
localizedFormula += token.value.replace(fromLocale.decimalSeparator, toLocale.decimalSeparator);
|
|
6180
|
-
}
|
|
6181
|
-
else if (token.type === "ARG_SEPARATOR") {
|
|
6182
|
-
localizedFormula += toLocale.formulaArgSeparator;
|
|
6183
|
-
}
|
|
6184
|
-
else {
|
|
6185
|
-
localizedFormula += token.value;
|
|
6186
|
-
}
|
|
6187
|
-
}
|
|
6188
|
-
return localizedFormula;
|
|
6189
|
-
}
|
|
6190
|
-
|
|
6191
6169
|
function boolAnd(args) {
|
|
6192
6170
|
let foundBoolean = false;
|
|
6193
6171
|
let acc = true;
|
|
@@ -12024,7 +12002,8 @@ function getChartLabelValues(getters, dataSets, labelRange) {
|
|
|
12024
12002
|
}
|
|
12025
12003
|
}
|
|
12026
12004
|
else if (dataSets.length === 1) {
|
|
12027
|
-
|
|
12005
|
+
const dataLength = getData(getters, dataSets[0]).length;
|
|
12006
|
+
for (let i = 0; i < dataLength; i++) {
|
|
12028
12007
|
labels.formattedValues.push("");
|
|
12029
12008
|
labels.values.push("");
|
|
12030
12009
|
}
|
|
@@ -43179,9 +43158,9 @@ const XLSX_CHART_TYPES = [
|
|
|
43179
43158
|
/** In XLSX color format (no #) */
|
|
43180
43159
|
const AUTO_COLOR = "000000";
|
|
43181
43160
|
const XLSX_ICONSET_MAP = {
|
|
43182
|
-
|
|
43161
|
+
arrows: "3Arrows",
|
|
43183
43162
|
smiley: "3Symbols",
|
|
43184
|
-
|
|
43163
|
+
dots: "3TrafficLights1",
|
|
43185
43164
|
};
|
|
43186
43165
|
const NAMESPACE = {
|
|
43187
43166
|
styleSheet: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
@@ -43597,6 +43576,7 @@ const ICON_SET_CONVERSION_MAP = {
|
|
|
43597
43576
|
};
|
|
43598
43577
|
/** Map between legend position in XLSX file and human readable position */
|
|
43599
43578
|
const DRAWING_LEGEND_POSITION_CONVERSION_MAP = {
|
|
43579
|
+
none: "none",
|
|
43600
43580
|
b: "bottom",
|
|
43601
43581
|
t: "top",
|
|
43602
43582
|
l: "left",
|
|
@@ -45846,7 +45826,7 @@ class XlsxChartExtractor extends XlsxBaseExtractor {
|
|
|
45846
45826
|
default: "ffffff",
|
|
45847
45827
|
}).asString(),
|
|
45848
45828
|
legendPosition: DRAWING_LEGEND_POSITION_CONVERSION_MAP[this.extractChildAttr(rootChartElement, "c:legendPos", "val", {
|
|
45849
|
-
default: "
|
|
45829
|
+
default: "none",
|
|
45850
45830
|
}).asString()],
|
|
45851
45831
|
stacked: barChartGrouping === "stacked",
|
|
45852
45832
|
fontColor: "000000",
|
|
@@ -45880,7 +45860,7 @@ class XlsxChartExtractor extends XlsxBaseExtractor {
|
|
|
45880
45860
|
default: "ffffff",
|
|
45881
45861
|
}).asString(),
|
|
45882
45862
|
legendPosition: DRAWING_LEGEND_POSITION_CONVERSION_MAP[this.extractChildAttr(chartElement, "c:legendPos", "val", {
|
|
45883
|
-
default: "
|
|
45863
|
+
default: "none",
|
|
45884
45864
|
}).asString()],
|
|
45885
45865
|
stacked: barChartGrouping === "stacked",
|
|
45886
45866
|
fontColor: "000000",
|
|
@@ -64178,7 +64158,9 @@ css /* scss */ `
|
|
|
64178
64158
|
margin-top: -1px;
|
|
64179
64159
|
border: 1px solid;
|
|
64180
64160
|
|
|
64181
|
-
|
|
64161
|
+
/* In readonly we always show the fx icon if the composer is empty, not matter the focus */
|
|
64162
|
+
.o-composer:empty:not(:focus):not(.active)::before,
|
|
64163
|
+
&.o-topbar-composer-readonly .o-composer:empty::before {
|
|
64182
64164
|
content: url("data:image/svg+xml,${encodeURIComponent(FX_SVG)}");
|
|
64183
64165
|
position: relative;
|
|
64184
64166
|
top: 20%;
|
|
@@ -67422,10 +67404,14 @@ function addIconSetRule(cf, rule) {
|
|
|
67422
67404
|
continue;
|
|
67423
67405
|
}
|
|
67424
67406
|
const cfValueObjectNodes = cfValueObject.map((attrs) => escapeXml /*xml*/ `<cfvo ${formatAttributes(attrs)} />`);
|
|
67407
|
+
const iconSetAttrs = [["iconSet", getIconSet(rule.icons)]];
|
|
67408
|
+
if (isIconSetReversed(rule.icons)) {
|
|
67409
|
+
iconSetAttrs.push(["reverse", "1"]);
|
|
67410
|
+
}
|
|
67425
67411
|
conditionalFormats.push(escapeXml /*xml*/ `
|
|
67426
67412
|
<conditionalFormatting sqref="${range}">
|
|
67427
67413
|
<cfRule ${formatAttributes(ruleAttributes)}>
|
|
67428
|
-
<iconSet
|
|
67414
|
+
<iconSet ${formatAttributes(iconSetAttrs)}>
|
|
67429
67415
|
${joinXmlNodes(cfValueObjectNodes)}
|
|
67430
67416
|
</iconSet>
|
|
67431
67417
|
</cfRule>
|
|
@@ -67443,9 +67429,21 @@ function commonCfAttributes(cf) {
|
|
|
67443
67429
|
["stopIfTrue", cf.stopIfTrue ? 1 : 0],
|
|
67444
67430
|
];
|
|
67445
67431
|
}
|
|
67432
|
+
function isIconSetReversed(iconSet) {
|
|
67433
|
+
const defaultIconSet = ICON_SETS[detectIconsType(iconSet)];
|
|
67434
|
+
return iconSet.upper === defaultIconSet.bad && iconSet.lower === defaultIconSet.good;
|
|
67435
|
+
}
|
|
67446
67436
|
function getIconSet(iconSet) {
|
|
67447
|
-
return XLSX_ICONSET_MAP[
|
|
67448
|
-
|
|
67437
|
+
return XLSX_ICONSET_MAP[detectIconsType(iconSet)];
|
|
67438
|
+
}
|
|
67439
|
+
/**
|
|
67440
|
+
* Partial detection based on "upper" point only.
|
|
67441
|
+
* We support any arbitrary icon in the set, while excel doesn't allow
|
|
67442
|
+
* mixing icons from different types.
|
|
67443
|
+
*/
|
|
67444
|
+
function detectIconsType(iconSet) {
|
|
67445
|
+
const type = Object.keys(ICON_SETS).find((type) => Object.values(ICON_SETS[type]).includes(iconSet.upper)) || "dots";
|
|
67446
|
+
return type;
|
|
67449
67447
|
}
|
|
67450
67448
|
function thresholdAttributes(threshold, position) {
|
|
67451
67449
|
const type = getExcelThresholdType(threshold.type, position);
|
|
@@ -69184,6 +69182,6 @@ const constants = {
|
|
|
69184
69182
|
export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, CommandResult, CorePlugin, DispatchResult, EvaluationError, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
|
|
69185
69183
|
|
|
69186
69184
|
|
|
69187
|
-
__info__.version = "17.4.
|
|
69188
|
-
__info__.date = "2025-03-
|
|
69189
|
-
__info__.hash = "
|
|
69185
|
+
__info__.version = "17.4.28";
|
|
69186
|
+
__info__.date = "2025-03-26T12:48:33.387Z";
|
|
69187
|
+
__info__.hash = "a81a8f4";
|
|
@@ -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 17.4.
|
|
6
|
-
* @date 2025-03-
|
|
7
|
-
* @hash
|
|
5
|
+
* @version 17.4.28
|
|
6
|
+
* @date 2025-03-26T12:48:33.387Z
|
|
7
|
+
* @hash a81a8f4
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
(function (exports, owl) {
|
|
@@ -1008,7 +1008,10 @@
|
|
|
1008
1008
|
}
|
|
1009
1009
|
else if (stringVals.length === 4) {
|
|
1010
1010
|
const alpha = parseFloat(stringVals.pop() || "1");
|
|
1011
|
-
|
|
1011
|
+
if (isNaN(alpha)) {
|
|
1012
|
+
throw new Error("invalid alpha value");
|
|
1013
|
+
}
|
|
1014
|
+
alphaHex = Math.round(alpha * 255);
|
|
1012
1015
|
}
|
|
1013
1016
|
const vals = stringVals.map((val) => parseInt(val, 10));
|
|
1014
1017
|
if (alphaHex !== 255) {
|
|
@@ -5964,7 +5967,7 @@
|
|
|
5964
5967
|
*/
|
|
5965
5968
|
function canonicalizeNumberContent(content, locale) {
|
|
5966
5969
|
return content.startsWith("=")
|
|
5967
|
-
? canonicalizeFormula
|
|
5970
|
+
? canonicalizeFormula(content, locale)
|
|
5968
5971
|
: canonicalizeNumberLiteral(content, locale);
|
|
5969
5972
|
}
|
|
5970
5973
|
/**
|
|
@@ -5979,7 +5982,7 @@
|
|
|
5979
5982
|
*/
|
|
5980
5983
|
function canonicalizeContent(content, locale) {
|
|
5981
5984
|
return content.startsWith("=")
|
|
5982
|
-
? canonicalizeFormula
|
|
5985
|
+
? canonicalizeFormula(content, locale)
|
|
5983
5986
|
: canonicalizeLiteral(content, locale);
|
|
5984
5987
|
}
|
|
5985
5988
|
/**
|
|
@@ -5995,15 +5998,21 @@
|
|
|
5995
5998
|
? localizeFormula(content, locale)
|
|
5996
5999
|
: localizeLiteral(content, locale);
|
|
5997
6000
|
}
|
|
6001
|
+
/** Change a number string to its canonical form (en_US locale) */
|
|
6002
|
+
function canonicalizeNumberValue(content, locale) {
|
|
6003
|
+
return content.startsWith("=")
|
|
6004
|
+
? canonicalizeFormula(content, locale)
|
|
6005
|
+
: canonicalizeNumberLiteral(content, locale);
|
|
6006
|
+
}
|
|
5998
6007
|
/** Change a formula to its canonical form (en_US locale) */
|
|
5999
|
-
function canonicalizeFormula
|
|
6000
|
-
return _localizeFormula
|
|
6008
|
+
function canonicalizeFormula(formula, locale) {
|
|
6009
|
+
return _localizeFormula(formula, locale, DEFAULT_LOCALE);
|
|
6001
6010
|
}
|
|
6002
6011
|
/** Change a formula from the canonical form to the given locale */
|
|
6003
6012
|
function localizeFormula(formula, locale) {
|
|
6004
|
-
return _localizeFormula
|
|
6013
|
+
return _localizeFormula(formula, DEFAULT_LOCALE, locale);
|
|
6005
6014
|
}
|
|
6006
|
-
function _localizeFormula
|
|
6015
|
+
function _localizeFormula(formula, fromLocale, toLocale) {
|
|
6007
6016
|
if (fromLocale.formulaArgSeparator === toLocale.formulaArgSeparator &&
|
|
6008
6017
|
fromLocale.decimalSeparator === toLocale.decimalSeparator) {
|
|
6009
6018
|
return formula;
|
|
@@ -6158,37 +6167,6 @@
|
|
|
6158
6167
|
return locale.dateFormat + " " + locale.timeFormat;
|
|
6159
6168
|
}
|
|
6160
6169
|
|
|
6161
|
-
/** Change a number string to its canonical form (en_US locale) */
|
|
6162
|
-
function canonicalizeNumberValue(content, locale) {
|
|
6163
|
-
return content.startsWith("=")
|
|
6164
|
-
? canonicalizeFormula(content, locale)
|
|
6165
|
-
: canonicalizeNumberLiteral(content, locale);
|
|
6166
|
-
}
|
|
6167
|
-
/** Change a formula to its canonical form (en_US locale) */
|
|
6168
|
-
function canonicalizeFormula(formula, locale) {
|
|
6169
|
-
return _localizeFormula(formula, locale, DEFAULT_LOCALE);
|
|
6170
|
-
}
|
|
6171
|
-
function _localizeFormula(formula, fromLocale, toLocale) {
|
|
6172
|
-
if (fromLocale.formulaArgSeparator === toLocale.formulaArgSeparator &&
|
|
6173
|
-
fromLocale.decimalSeparator === toLocale.decimalSeparator) {
|
|
6174
|
-
return formula;
|
|
6175
|
-
}
|
|
6176
|
-
const tokens = tokenize(formula, fromLocale);
|
|
6177
|
-
let localizedFormula = "";
|
|
6178
|
-
for (const token of tokens) {
|
|
6179
|
-
if (token.type === "NUMBER") {
|
|
6180
|
-
localizedFormula += token.value.replace(fromLocale.decimalSeparator, toLocale.decimalSeparator);
|
|
6181
|
-
}
|
|
6182
|
-
else if (token.type === "ARG_SEPARATOR") {
|
|
6183
|
-
localizedFormula += toLocale.formulaArgSeparator;
|
|
6184
|
-
}
|
|
6185
|
-
else {
|
|
6186
|
-
localizedFormula += token.value;
|
|
6187
|
-
}
|
|
6188
|
-
}
|
|
6189
|
-
return localizedFormula;
|
|
6190
|
-
}
|
|
6191
|
-
|
|
6192
6170
|
function boolAnd(args) {
|
|
6193
6171
|
let foundBoolean = false;
|
|
6194
6172
|
let acc = true;
|
|
@@ -12025,7 +12003,8 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
12025
12003
|
}
|
|
12026
12004
|
}
|
|
12027
12005
|
else if (dataSets.length === 1) {
|
|
12028
|
-
|
|
12006
|
+
const dataLength = getData(getters, dataSets[0]).length;
|
|
12007
|
+
for (let i = 0; i < dataLength; i++) {
|
|
12029
12008
|
labels.formattedValues.push("");
|
|
12030
12009
|
labels.values.push("");
|
|
12031
12010
|
}
|
|
@@ -43180,9 +43159,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
43180
43159
|
/** In XLSX color format (no #) */
|
|
43181
43160
|
const AUTO_COLOR = "000000";
|
|
43182
43161
|
const XLSX_ICONSET_MAP = {
|
|
43183
|
-
|
|
43162
|
+
arrows: "3Arrows",
|
|
43184
43163
|
smiley: "3Symbols",
|
|
43185
|
-
|
|
43164
|
+
dots: "3TrafficLights1",
|
|
43186
43165
|
};
|
|
43187
43166
|
const NAMESPACE = {
|
|
43188
43167
|
styleSheet: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
@@ -43598,6 +43577,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
43598
43577
|
};
|
|
43599
43578
|
/** Map between legend position in XLSX file and human readable position */
|
|
43600
43579
|
const DRAWING_LEGEND_POSITION_CONVERSION_MAP = {
|
|
43580
|
+
none: "none",
|
|
43601
43581
|
b: "bottom",
|
|
43602
43582
|
t: "top",
|
|
43603
43583
|
l: "left",
|
|
@@ -45847,7 +45827,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
45847
45827
|
default: "ffffff",
|
|
45848
45828
|
}).asString(),
|
|
45849
45829
|
legendPosition: DRAWING_LEGEND_POSITION_CONVERSION_MAP[this.extractChildAttr(rootChartElement, "c:legendPos", "val", {
|
|
45850
|
-
default: "
|
|
45830
|
+
default: "none",
|
|
45851
45831
|
}).asString()],
|
|
45852
45832
|
stacked: barChartGrouping === "stacked",
|
|
45853
45833
|
fontColor: "000000",
|
|
@@ -45881,7 +45861,7 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
45881
45861
|
default: "ffffff",
|
|
45882
45862
|
}).asString(),
|
|
45883
45863
|
legendPosition: DRAWING_LEGEND_POSITION_CONVERSION_MAP[this.extractChildAttr(chartElement, "c:legendPos", "val", {
|
|
45884
|
-
default: "
|
|
45864
|
+
default: "none",
|
|
45885
45865
|
}).asString()],
|
|
45886
45866
|
stacked: barChartGrouping === "stacked",
|
|
45887
45867
|
fontColor: "000000",
|
|
@@ -64179,7 +64159,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
64179
64159
|
margin-top: -1px;
|
|
64180
64160
|
border: 1px solid;
|
|
64181
64161
|
|
|
64182
|
-
|
|
64162
|
+
/* In readonly we always show the fx icon if the composer is empty, not matter the focus */
|
|
64163
|
+
.o-composer:empty:not(:focus):not(.active)::before,
|
|
64164
|
+
&.o-topbar-composer-readonly .o-composer:empty::before {
|
|
64183
64165
|
content: url("data:image/svg+xml,${encodeURIComponent(FX_SVG)}");
|
|
64184
64166
|
position: relative;
|
|
64185
64167
|
top: 20%;
|
|
@@ -67423,10 +67405,14 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
67423
67405
|
continue;
|
|
67424
67406
|
}
|
|
67425
67407
|
const cfValueObjectNodes = cfValueObject.map((attrs) => escapeXml /*xml*/ `<cfvo ${formatAttributes(attrs)} />`);
|
|
67408
|
+
const iconSetAttrs = [["iconSet", getIconSet(rule.icons)]];
|
|
67409
|
+
if (isIconSetReversed(rule.icons)) {
|
|
67410
|
+
iconSetAttrs.push(["reverse", "1"]);
|
|
67411
|
+
}
|
|
67426
67412
|
conditionalFormats.push(escapeXml /*xml*/ `
|
|
67427
67413
|
<conditionalFormatting sqref="${range}">
|
|
67428
67414
|
<cfRule ${formatAttributes(ruleAttributes)}>
|
|
67429
|
-
<iconSet
|
|
67415
|
+
<iconSet ${formatAttributes(iconSetAttrs)}>
|
|
67430
67416
|
${joinXmlNodes(cfValueObjectNodes)}
|
|
67431
67417
|
</iconSet>
|
|
67432
67418
|
</cfRule>
|
|
@@ -67444,9 +67430,21 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
67444
67430
|
["stopIfTrue", cf.stopIfTrue ? 1 : 0],
|
|
67445
67431
|
];
|
|
67446
67432
|
}
|
|
67433
|
+
function isIconSetReversed(iconSet) {
|
|
67434
|
+
const defaultIconSet = ICON_SETS[detectIconsType(iconSet)];
|
|
67435
|
+
return iconSet.upper === defaultIconSet.bad && iconSet.lower === defaultIconSet.good;
|
|
67436
|
+
}
|
|
67447
67437
|
function getIconSet(iconSet) {
|
|
67448
|
-
return XLSX_ICONSET_MAP[
|
|
67449
|
-
|
|
67438
|
+
return XLSX_ICONSET_MAP[detectIconsType(iconSet)];
|
|
67439
|
+
}
|
|
67440
|
+
/**
|
|
67441
|
+
* Partial detection based on "upper" point only.
|
|
67442
|
+
* We support any arbitrary icon in the set, while excel doesn't allow
|
|
67443
|
+
* mixing icons from different types.
|
|
67444
|
+
*/
|
|
67445
|
+
function detectIconsType(iconSet) {
|
|
67446
|
+
const type = Object.keys(ICON_SETS).find((type) => Object.values(ICON_SETS[type]).includes(iconSet.upper)) || "dots";
|
|
67447
|
+
return type;
|
|
67450
67448
|
}
|
|
67451
67449
|
function thresholdAttributes(threshold, position) {
|
|
67452
67450
|
const type = getExcelThresholdType(threshold.type, position);
|
|
@@ -69228,9 +69226,9 @@ stores.inject(MyMetaStore, storeInstance);
|
|
|
69228
69226
|
exports.tokenize = tokenize;
|
|
69229
69227
|
|
|
69230
69228
|
|
|
69231
|
-
__info__.version = "17.4.
|
|
69232
|
-
__info__.date = "2025-03-
|
|
69233
|
-
__info__.hash = "
|
|
69229
|
+
__info__.version = "17.4.28";
|
|
69230
|
+
__info__.date = "2025-03-26T12:48:33.387Z";
|
|
69231
|
+
__info__.hash = "a81a8f4";
|
|
69234
69232
|
|
|
69235
69233
|
|
|
69236
69234
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|