@odoo/o-spreadsheet 16.0.65 → 16.0.66
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 +28 -10
- package/dist/o-spreadsheet.esm.js +28 -10
- package/dist/o-spreadsheet.iife.js +28 -10
- package/dist/o-spreadsheet.iife.min.js +35 -35
- package/dist/o_spreadsheet.xml +3 -3
- package/package.json +1 -1
|
@@ -7386,7 +7386,8 @@ function getChartLabelValues(getters, dataSets, labelRange) {
|
|
|
7386
7386
|
}
|
|
7387
7387
|
}
|
|
7388
7388
|
else if (dataSets.length === 1) {
|
|
7389
|
-
|
|
7389
|
+
const dataLength = getData(getters, dataSets[0]).length;
|
|
7390
|
+
for (let i = 0; i < dataLength; i++) {
|
|
7390
7391
|
labels.formattedValues.push("");
|
|
7391
7392
|
labels.values.push("");
|
|
7392
7393
|
}
|
|
@@ -23731,9 +23732,9 @@ const XLSX_CHART_TYPES = [
|
|
|
23731
23732
|
/** In XLSX color format (no #) */
|
|
23732
23733
|
const AUTO_COLOR = "000000";
|
|
23733
23734
|
const XLSX_ICONSET_MAP = {
|
|
23734
|
-
|
|
23735
|
+
arrows: "3Arrows",
|
|
23735
23736
|
smiley: "3Symbols",
|
|
23736
|
-
|
|
23737
|
+
dots: "3TrafficLights1",
|
|
23737
23738
|
};
|
|
23738
23739
|
const NAMESPACE = {
|
|
23739
23740
|
styleSheet: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
@@ -24122,6 +24123,7 @@ const ICON_SET_CONVERSION_MAP = {
|
|
|
24122
24123
|
};
|
|
24123
24124
|
/** Map between legend position in XLSX file and human readable position */
|
|
24124
24125
|
const DRAWING_LEGEND_POSITION_CONVERSION_MAP = {
|
|
24126
|
+
none: "none",
|
|
24125
24127
|
b: "bottom",
|
|
24126
24128
|
t: "top",
|
|
24127
24129
|
l: "left",
|
|
@@ -26299,7 +26301,7 @@ class XlsxChartExtractor extends XlsxBaseExtractor {
|
|
|
26299
26301
|
? "right"
|
|
26300
26302
|
: "left",
|
|
26301
26303
|
legendPosition: DRAWING_LEGEND_POSITION_CONVERSION_MAP[this.extractChildAttr(rootChartElement, "c:legendPos", "val", {
|
|
26302
|
-
default: "
|
|
26304
|
+
default: "none",
|
|
26303
26305
|
}).asString()],
|
|
26304
26306
|
stacked: barChartGrouping === "stacked",
|
|
26305
26307
|
fontColor: "000000",
|
|
@@ -42464,10 +42466,14 @@ function addIconSetRule(cf, rule) {
|
|
|
42464
42466
|
continue;
|
|
42465
42467
|
}
|
|
42466
42468
|
const cfValueObjectNodes = cfValueObject.map((attrs) => escapeXml /*xml*/ `<cfvo ${formatAttributes(attrs)} />`);
|
|
42469
|
+
const iconSetAttrs = [["iconSet", getIconSet(rule.icons)]];
|
|
42470
|
+
if (isIconSetReversed(rule.icons)) {
|
|
42471
|
+
iconSetAttrs.push(["reverse", "1"]);
|
|
42472
|
+
}
|
|
42467
42473
|
conditionalFormats.push(escapeXml /*xml*/ `
|
|
42468
42474
|
<conditionalFormatting sqref="${range}">
|
|
42469
42475
|
<cfRule ${formatAttributes(ruleAttributes)}>
|
|
42470
|
-
<iconSet
|
|
42476
|
+
<iconSet ${formatAttributes(iconSetAttrs)}>
|
|
42471
42477
|
${joinXmlNodes(cfValueObjectNodes)}
|
|
42472
42478
|
</iconSet>
|
|
42473
42479
|
</cfRule>
|
|
@@ -42485,9 +42491,21 @@ function commonCfAttributes(cf) {
|
|
|
42485
42491
|
["stopIfTrue", cf.stopIfTrue ? 1 : 0],
|
|
42486
42492
|
];
|
|
42487
42493
|
}
|
|
42494
|
+
function isIconSetReversed(iconSet) {
|
|
42495
|
+
const defaultIconSet = ICON_SETS[detectIconsType(iconSet)];
|
|
42496
|
+
return iconSet.upper === defaultIconSet.bad && iconSet.lower === defaultIconSet.good;
|
|
42497
|
+
}
|
|
42488
42498
|
function getIconSet(iconSet) {
|
|
42489
|
-
return XLSX_ICONSET_MAP[
|
|
42490
|
-
|
|
42499
|
+
return XLSX_ICONSET_MAP[detectIconsType(iconSet)];
|
|
42500
|
+
}
|
|
42501
|
+
/**
|
|
42502
|
+
* Partial detection based on "upper" point only.
|
|
42503
|
+
* We support any arbitrary icon in the set, while excel doesn't allow
|
|
42504
|
+
* mixing icons from different types.
|
|
42505
|
+
*/
|
|
42506
|
+
function detectIconsType(iconSet) {
|
|
42507
|
+
const type = Object.keys(ICON_SETS).find((type) => Object.values(ICON_SETS[type]).includes(iconSet.upper)) || "dots";
|
|
42508
|
+
return type;
|
|
42491
42509
|
}
|
|
42492
42510
|
function thresholdAttributes(threshold, position) {
|
|
42493
42511
|
const type = getExcelThresholdType(threshold.type, position);
|
|
@@ -43760,6 +43778,6 @@ exports.setTranslationMethod = setTranslationMethod;
|
|
|
43760
43778
|
exports.tokenize = tokenize;
|
|
43761
43779
|
|
|
43762
43780
|
|
|
43763
|
-
__info__.version = '16.0.
|
|
43764
|
-
__info__.date = '2025-03-
|
|
43765
|
-
__info__.hash = '
|
|
43781
|
+
__info__.version = '16.0.66';
|
|
43782
|
+
__info__.date = '2025-03-26T12:44:10.381Z';
|
|
43783
|
+
__info__.hash = 'e2c1da2';
|
|
@@ -7382,7 +7382,8 @@ function getChartLabelValues(getters, dataSets, labelRange) {
|
|
|
7382
7382
|
}
|
|
7383
7383
|
}
|
|
7384
7384
|
else if (dataSets.length === 1) {
|
|
7385
|
-
|
|
7385
|
+
const dataLength = getData(getters, dataSets[0]).length;
|
|
7386
|
+
for (let i = 0; i < dataLength; i++) {
|
|
7386
7387
|
labels.formattedValues.push("");
|
|
7387
7388
|
labels.values.push("");
|
|
7388
7389
|
}
|
|
@@ -23727,9 +23728,9 @@ const XLSX_CHART_TYPES = [
|
|
|
23727
23728
|
/** In XLSX color format (no #) */
|
|
23728
23729
|
const AUTO_COLOR = "000000";
|
|
23729
23730
|
const XLSX_ICONSET_MAP = {
|
|
23730
|
-
|
|
23731
|
+
arrows: "3Arrows",
|
|
23731
23732
|
smiley: "3Symbols",
|
|
23732
|
-
|
|
23733
|
+
dots: "3TrafficLights1",
|
|
23733
23734
|
};
|
|
23734
23735
|
const NAMESPACE = {
|
|
23735
23736
|
styleSheet: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
@@ -24118,6 +24119,7 @@ const ICON_SET_CONVERSION_MAP = {
|
|
|
24118
24119
|
};
|
|
24119
24120
|
/** Map between legend position in XLSX file and human readable position */
|
|
24120
24121
|
const DRAWING_LEGEND_POSITION_CONVERSION_MAP = {
|
|
24122
|
+
none: "none",
|
|
24121
24123
|
b: "bottom",
|
|
24122
24124
|
t: "top",
|
|
24123
24125
|
l: "left",
|
|
@@ -26295,7 +26297,7 @@ class XlsxChartExtractor extends XlsxBaseExtractor {
|
|
|
26295
26297
|
? "right"
|
|
26296
26298
|
: "left",
|
|
26297
26299
|
legendPosition: DRAWING_LEGEND_POSITION_CONVERSION_MAP[this.extractChildAttr(rootChartElement, "c:legendPos", "val", {
|
|
26298
|
-
default: "
|
|
26300
|
+
default: "none",
|
|
26299
26301
|
}).asString()],
|
|
26300
26302
|
stacked: barChartGrouping === "stacked",
|
|
26301
26303
|
fontColor: "000000",
|
|
@@ -42460,10 +42462,14 @@ function addIconSetRule(cf, rule) {
|
|
|
42460
42462
|
continue;
|
|
42461
42463
|
}
|
|
42462
42464
|
const cfValueObjectNodes = cfValueObject.map((attrs) => escapeXml /*xml*/ `<cfvo ${formatAttributes(attrs)} />`);
|
|
42465
|
+
const iconSetAttrs = [["iconSet", getIconSet(rule.icons)]];
|
|
42466
|
+
if (isIconSetReversed(rule.icons)) {
|
|
42467
|
+
iconSetAttrs.push(["reverse", "1"]);
|
|
42468
|
+
}
|
|
42463
42469
|
conditionalFormats.push(escapeXml /*xml*/ `
|
|
42464
42470
|
<conditionalFormatting sqref="${range}">
|
|
42465
42471
|
<cfRule ${formatAttributes(ruleAttributes)}>
|
|
42466
|
-
<iconSet
|
|
42472
|
+
<iconSet ${formatAttributes(iconSetAttrs)}>
|
|
42467
42473
|
${joinXmlNodes(cfValueObjectNodes)}
|
|
42468
42474
|
</iconSet>
|
|
42469
42475
|
</cfRule>
|
|
@@ -42481,9 +42487,21 @@ function commonCfAttributes(cf) {
|
|
|
42481
42487
|
["stopIfTrue", cf.stopIfTrue ? 1 : 0],
|
|
42482
42488
|
];
|
|
42483
42489
|
}
|
|
42490
|
+
function isIconSetReversed(iconSet) {
|
|
42491
|
+
const defaultIconSet = ICON_SETS[detectIconsType(iconSet)];
|
|
42492
|
+
return iconSet.upper === defaultIconSet.bad && iconSet.lower === defaultIconSet.good;
|
|
42493
|
+
}
|
|
42484
42494
|
function getIconSet(iconSet) {
|
|
42485
|
-
return XLSX_ICONSET_MAP[
|
|
42486
|
-
|
|
42495
|
+
return XLSX_ICONSET_MAP[detectIconsType(iconSet)];
|
|
42496
|
+
}
|
|
42497
|
+
/**
|
|
42498
|
+
* Partial detection based on "upper" point only.
|
|
42499
|
+
* We support any arbitrary icon in the set, while excel doesn't allow
|
|
42500
|
+
* mixing icons from different types.
|
|
42501
|
+
*/
|
|
42502
|
+
function detectIconsType(iconSet) {
|
|
42503
|
+
const type = Object.keys(ICON_SETS).find((type) => Object.values(ICON_SETS[type]).includes(iconSet.upper)) || "dots";
|
|
42504
|
+
return type;
|
|
42487
42505
|
}
|
|
42488
42506
|
function thresholdAttributes(threshold, position) {
|
|
42489
42507
|
const type = getExcelThresholdType(threshold.type, position);
|
|
@@ -43728,6 +43746,6 @@ function addFunction(functionName, functionDescription) {
|
|
|
43728
43746
|
export { AbstractChart, CommandResult, CorePlugin, DATETIME_FORMAT, DispatchResult, EvaluationError, Model, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, UIPlugin, __info__, addFunction, astToFormula, cellTypes, compile, components, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, invalidateEvaluationCommands, load, parse, readonlyAllowedCommands, registries, setTranslationMethod, tokenize };
|
|
43729
43747
|
|
|
43730
43748
|
|
|
43731
|
-
__info__.version = '16.0.
|
|
43732
|
-
__info__.date = '2025-03-
|
|
43733
|
-
__info__.hash = '
|
|
43749
|
+
__info__.version = '16.0.66';
|
|
43750
|
+
__info__.date = '2025-03-26T12:44:10.381Z';
|
|
43751
|
+
__info__.hash = 'e2c1da2';
|
|
@@ -7383,7 +7383,8 @@
|
|
|
7383
7383
|
}
|
|
7384
7384
|
}
|
|
7385
7385
|
else if (dataSets.length === 1) {
|
|
7386
|
-
|
|
7386
|
+
const dataLength = getData(getters, dataSets[0]).length;
|
|
7387
|
+
for (let i = 0; i < dataLength; i++) {
|
|
7387
7388
|
labels.formattedValues.push("");
|
|
7388
7389
|
labels.values.push("");
|
|
7389
7390
|
}
|
|
@@ -23728,9 +23729,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
23728
23729
|
/** In XLSX color format (no #) */
|
|
23729
23730
|
const AUTO_COLOR = "000000";
|
|
23730
23731
|
const XLSX_ICONSET_MAP = {
|
|
23731
|
-
|
|
23732
|
+
arrows: "3Arrows",
|
|
23732
23733
|
smiley: "3Symbols",
|
|
23733
|
-
|
|
23734
|
+
dots: "3TrafficLights1",
|
|
23734
23735
|
};
|
|
23735
23736
|
const NAMESPACE = {
|
|
23736
23737
|
styleSheet: "http://schemas.openxmlformats.org/spreadsheetml/2006/main",
|
|
@@ -24119,6 +24120,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
24119
24120
|
};
|
|
24120
24121
|
/** Map between legend position in XLSX file and human readable position */
|
|
24121
24122
|
const DRAWING_LEGEND_POSITION_CONVERSION_MAP = {
|
|
24123
|
+
none: "none",
|
|
24122
24124
|
b: "bottom",
|
|
24123
24125
|
t: "top",
|
|
24124
24126
|
l: "left",
|
|
@@ -26296,7 +26298,7 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
26296
26298
|
? "right"
|
|
26297
26299
|
: "left",
|
|
26298
26300
|
legendPosition: DRAWING_LEGEND_POSITION_CONVERSION_MAP[this.extractChildAttr(rootChartElement, "c:legendPos", "val", {
|
|
26299
|
-
default: "
|
|
26301
|
+
default: "none",
|
|
26300
26302
|
}).asString()],
|
|
26301
26303
|
stacked: barChartGrouping === "stacked",
|
|
26302
26304
|
fontColor: "000000",
|
|
@@ -42461,10 +42463,14 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
42461
42463
|
continue;
|
|
42462
42464
|
}
|
|
42463
42465
|
const cfValueObjectNodes = cfValueObject.map((attrs) => escapeXml /*xml*/ `<cfvo ${formatAttributes(attrs)} />`);
|
|
42466
|
+
const iconSetAttrs = [["iconSet", getIconSet(rule.icons)]];
|
|
42467
|
+
if (isIconSetReversed(rule.icons)) {
|
|
42468
|
+
iconSetAttrs.push(["reverse", "1"]);
|
|
42469
|
+
}
|
|
42464
42470
|
conditionalFormats.push(escapeXml /*xml*/ `
|
|
42465
42471
|
<conditionalFormatting sqref="${range}">
|
|
42466
42472
|
<cfRule ${formatAttributes(ruleAttributes)}>
|
|
42467
|
-
<iconSet
|
|
42473
|
+
<iconSet ${formatAttributes(iconSetAttrs)}>
|
|
42468
42474
|
${joinXmlNodes(cfValueObjectNodes)}
|
|
42469
42475
|
</iconSet>
|
|
42470
42476
|
</cfRule>
|
|
@@ -42482,9 +42488,21 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
42482
42488
|
["stopIfTrue", cf.stopIfTrue ? 1 : 0],
|
|
42483
42489
|
];
|
|
42484
42490
|
}
|
|
42491
|
+
function isIconSetReversed(iconSet) {
|
|
42492
|
+
const defaultIconSet = ICON_SETS[detectIconsType(iconSet)];
|
|
42493
|
+
return iconSet.upper === defaultIconSet.bad && iconSet.lower === defaultIconSet.good;
|
|
42494
|
+
}
|
|
42485
42495
|
function getIconSet(iconSet) {
|
|
42486
|
-
return XLSX_ICONSET_MAP[
|
|
42487
|
-
|
|
42496
|
+
return XLSX_ICONSET_MAP[detectIconsType(iconSet)];
|
|
42497
|
+
}
|
|
42498
|
+
/**
|
|
42499
|
+
* Partial detection based on "upper" point only.
|
|
42500
|
+
* We support any arbitrary icon in the set, while excel doesn't allow
|
|
42501
|
+
* mixing icons from different types.
|
|
42502
|
+
*/
|
|
42503
|
+
function detectIconsType(iconSet) {
|
|
42504
|
+
const type = Object.keys(ICON_SETS).find((type) => Object.values(ICON_SETS[type]).includes(iconSet.upper)) || "dots";
|
|
42505
|
+
return type;
|
|
42488
42506
|
}
|
|
42489
42507
|
function thresholdAttributes(threshold, position) {
|
|
42490
42508
|
const type = getExcelThresholdType(threshold.type, position);
|
|
@@ -43759,9 +43777,9 @@ day_count_convention (number, default=${DEFAULT_DAY_COUNT_CONVENTION} ) ${_lt("A
|
|
|
43759
43777
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
43760
43778
|
|
|
43761
43779
|
|
|
43762
|
-
__info__.version = '16.0.
|
|
43763
|
-
__info__.date = '2025-03-
|
|
43764
|
-
__info__.hash = '
|
|
43780
|
+
__info__.version = '16.0.66';
|
|
43781
|
+
__info__.date = '2025-03-26T12:44:10.381Z';
|
|
43782
|
+
__info__.hash = 'e2c1da2';
|
|
43765
43783
|
|
|
43766
43784
|
|
|
43767
43785
|
})(this.o_spreadsheet = this.o_spreadsheet || {}, owl);
|