@rowsncolumns/toolkit 24.5.19 → 24.5.20
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.
|
@@ -3910,7 +3910,7 @@ var groupSlicersBySheet = function (slicers) {
|
|
|
3910
3910
|
};
|
|
3911
3911
|
var buildConditionalFormattingXml = function (_a) {
|
|
3912
3912
|
var e_44, _b;
|
|
3913
|
-
var _d, _e
|
|
3913
|
+
var _d, _e;
|
|
3914
3914
|
var conditionalFormats = _a.conditionalFormats, sheetId = _a.sheetId, styleBuilder = _a.styleBuilder, locale = _a.locale;
|
|
3915
3915
|
if (!(conditionalFormats === null || conditionalFormats === void 0 ? void 0 : conditionalFormats.length)) {
|
|
3916
3916
|
return "";
|
|
@@ -3957,7 +3957,9 @@ var buildConditionalFormattingXml = function (_a) {
|
|
|
3957
3957
|
columnIndex: ranges[0].startColumnIndex,
|
|
3958
3958
|
})) !== null && _e !== void 0 ? _e : undefined
|
|
3959
3959
|
: undefined;
|
|
3960
|
-
|
|
3960
|
+
// Each sheet's rules are numbered 1..N in precedence order; the stored `priority` only orders
|
|
3961
|
+
// them (Athena-created rules sit at zero or below to rank first, and Excel requires >= 1).
|
|
3962
|
+
var basePriority = priority;
|
|
3961
3963
|
var cfRulesXml = buildConditionalFormattingRuleXml({
|
|
3962
3964
|
rule: rule,
|
|
3963
3965
|
styleBuilder: styleBuilder,
|
|
@@ -3970,7 +3972,7 @@ var buildConditionalFormattingXml = function (_a) {
|
|
|
3970
3972
|
var ruleXmlEntries = Array.isArray(cfRulesXml)
|
|
3971
3973
|
? cfRulesXml
|
|
3972
3974
|
: [cfRulesXml];
|
|
3973
|
-
priority =
|
|
3975
|
+
priority = basePriority + ruleXmlEntries.length;
|
|
3974
3976
|
parts.push("<conditionalFormatting sqref=\"".concat(sqrefParts.join(" "), "\">").concat(ruleXmlEntries.join(""), "</conditionalFormatting>"));
|
|
3975
3977
|
}
|
|
3976
3978
|
}
|
|
@@ -3518,7 +3518,9 @@ const buildConditionalFormattingXml = ({ conditionalFormats, sheetId, styleBuild
|
|
|
3518
3518
|
columnIndex: ranges[0].startColumnIndex,
|
|
3519
3519
|
}) ?? undefined
|
|
3520
3520
|
: undefined;
|
|
3521
|
-
|
|
3521
|
+
// Each sheet's rules are numbered 1..N in precedence order; the stored `priority` only orders
|
|
3522
|
+
// them (Athena-created rules sit at zero or below to rank first, and Excel requires >= 1).
|
|
3523
|
+
const basePriority = priority;
|
|
3522
3524
|
const cfRulesXml = buildConditionalFormattingRuleXml({
|
|
3523
3525
|
rule,
|
|
3524
3526
|
styleBuilder,
|
|
@@ -3531,7 +3533,7 @@ const buildConditionalFormattingXml = ({ conditionalFormats, sheetId, styleBuild
|
|
|
3531
3533
|
const ruleXmlEntries = Array.isArray(cfRulesXml)
|
|
3532
3534
|
? cfRulesXml
|
|
3533
3535
|
: [cfRulesXml];
|
|
3534
|
-
priority =
|
|
3536
|
+
priority = basePriority + ruleXmlEntries.length;
|
|
3535
3537
|
parts.push(`<conditionalFormatting sqref="${sqrefParts.join(" ")}">${ruleXmlEntries.join("")}</conditionalFormatting>`);
|
|
3536
3538
|
}
|
|
3537
3539
|
return parts.join("");
|