@cj-tech-master/excelts 5.0.2 → 5.0.3
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/browser/modules/excel/xlsx/xform/sheet/cf/conditional-formattings-xform.js +10 -0
- package/dist/cjs/modules/excel/xlsx/xform/sheet/cf/conditional-formattings-xform.js +10 -0
- package/dist/esm/modules/excel/xlsx/xform/sheet/cf/conditional-formattings-xform.js +10 -0
- package/dist/iife/excelts.iife.js +5 -1
- package/dist/iife/excelts.iife.js.map +1 -1
- package/dist/iife/excelts.iife.min.js +2 -2
- package/package.json +1 -1
|
@@ -22,6 +22,16 @@ class ConditionalFormattingsXform extends BaseXform {
|
|
|
22
22
|
if (rule.style) {
|
|
23
23
|
rule.dxfId = options.styles.addDxfStyle(rule.style);
|
|
24
24
|
}
|
|
25
|
+
// Ensure dataBar rules have required cfvo and color properties
|
|
26
|
+
if (rule.type === "dataBar") {
|
|
27
|
+
if (!rule.cfvo || rule.cfvo.length < 2) {
|
|
28
|
+
rule.cfvo = [{ type: "min" }, { type: "max" }];
|
|
29
|
+
}
|
|
30
|
+
if (!rule.color) {
|
|
31
|
+
// Default blue color for data bars (same as Excel's default)
|
|
32
|
+
rule.color = { argb: "FF638EC6" };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
25
35
|
});
|
|
26
36
|
});
|
|
27
37
|
}
|
|
@@ -25,6 +25,16 @@ class ConditionalFormattingsXform extends base_xform_1.BaseXform {
|
|
|
25
25
|
if (rule.style) {
|
|
26
26
|
rule.dxfId = options.styles.addDxfStyle(rule.style);
|
|
27
27
|
}
|
|
28
|
+
// Ensure dataBar rules have required cfvo and color properties
|
|
29
|
+
if (rule.type === "dataBar") {
|
|
30
|
+
if (!rule.cfvo || rule.cfvo.length < 2) {
|
|
31
|
+
rule.cfvo = [{ type: "min" }, { type: "max" }];
|
|
32
|
+
}
|
|
33
|
+
if (!rule.color) {
|
|
34
|
+
// Default blue color for data bars (same as Excel's default)
|
|
35
|
+
rule.color = { argb: "FF638EC6" };
|
|
36
|
+
}
|
|
37
|
+
}
|
|
28
38
|
});
|
|
29
39
|
});
|
|
30
40
|
}
|
|
@@ -22,6 +22,16 @@ class ConditionalFormattingsXform extends BaseXform {
|
|
|
22
22
|
if (rule.style) {
|
|
23
23
|
rule.dxfId = options.styles.addDxfStyle(rule.style);
|
|
24
24
|
}
|
|
25
|
+
// Ensure dataBar rules have required cfvo and color properties
|
|
26
|
+
if (rule.type === "dataBar") {
|
|
27
|
+
if (!rule.cfvo || rule.cfvo.length < 2) {
|
|
28
|
+
rule.cfvo = [{ type: "min" }, { type: "max" }];
|
|
29
|
+
}
|
|
30
|
+
if (!rule.color) {
|
|
31
|
+
// Default blue color for data bars (same as Excel's default)
|
|
32
|
+
rule.color = { argb: "FF638EC6" };
|
|
33
|
+
}
|
|
34
|
+
}
|
|
25
35
|
});
|
|
26
36
|
});
|
|
27
37
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @cj-tech-master/excelts v5.0.
|
|
2
|
+
* @cj-tech-master/excelts v5.0.3
|
|
3
3
|
* TypeScript Excel Workbook Manager - Read and Write xlsx and csv Files.
|
|
4
4
|
* (c) 2026 cjnoname
|
|
5
5
|
* Released under the MIT License
|
|
@@ -13306,6 +13306,10 @@ var ExcelTS = (function(exports) {
|
|
|
13306
13306
|
cf.rules.forEach((rule) => {
|
|
13307
13307
|
if (!rule.priority) rule.priority = nextPriority++;
|
|
13308
13308
|
if (rule.style) rule.dxfId = options.styles.addDxfStyle(rule.style);
|
|
13309
|
+
if (rule.type === "dataBar") {
|
|
13310
|
+
if (!rule.cfvo || rule.cfvo.length < 2) rule.cfvo = [{ type: "min" }, { type: "max" }];
|
|
13311
|
+
if (!rule.color) rule.color = { argb: "FF638EC6" };
|
|
13312
|
+
}
|
|
13309
13313
|
});
|
|
13310
13314
|
});
|
|
13311
13315
|
}
|