@rowsncolumns/spreadsheet-state 29.2.0 → 29.3.2

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.
Files changed (127) hide show
  1. package/dist/cjs/api/border.d.ts +1 -1
  2. package/dist/cjs/api/border.d.ts.map +1 -1
  3. package/dist/cjs/commands.d.ts +36 -3
  4. package/dist/cjs/commands.d.ts.map +1 -1
  5. package/dist/cjs/components/editors/cell-format/alignment-tab.d.ts +27 -0
  6. package/dist/cjs/components/editors/cell-format/alignment-tab.d.ts.map +1 -0
  7. package/dist/cjs/components/editors/cell-format/alignment-tab.js +83 -0
  8. package/dist/cjs/components/editors/cell-format/border-edges.d.ts +42 -0
  9. package/dist/cjs/components/editors/cell-format/border-edges.d.ts.map +1 -0
  10. package/dist/cjs/components/editors/cell-format/border-edges.js +118 -0
  11. package/dist/cjs/components/editors/cell-format/border-tab.d.ts +21 -0
  12. package/dist/cjs/components/editors/cell-format/border-tab.d.ts.map +1 -0
  13. package/dist/cjs/components/editors/cell-format/border-tab.js +123 -0
  14. package/dist/cjs/components/editors/cell-format/fill-tab.d.ts +14 -0
  15. package/dist/cjs/components/editors/cell-format/fill-tab.d.ts.map +1 -0
  16. package/dist/cjs/components/editors/cell-format/fill-tab.js +54 -0
  17. package/dist/cjs/components/editors/cell-format/font-tab.d.ts +18 -0
  18. package/dist/cjs/components/editors/cell-format/font-tab.d.ts.map +1 -0
  19. package/dist/cjs/components/editors/cell-format/font-tab.js +99 -0
  20. package/dist/cjs/components/editors/cell-format/list-box.d.ts +35 -0
  21. package/dist/cjs/components/editors/cell-format/list-box.d.ts.map +1 -0
  22. package/dist/cjs/components/editors/cell-format/list-box.js +37 -0
  23. package/dist/cjs/components/editors/cell-format/number-formats.d.ts +90 -0
  24. package/dist/cjs/components/editors/cell-format/number-formats.d.ts.map +1 -0
  25. package/dist/cjs/components/editors/cell-format/number-formats.js +403 -0
  26. package/dist/cjs/components/editors/cell-format/number-tab.d.ts +12 -0
  27. package/dist/cjs/components/editors/cell-format/number-tab.d.ts.map +1 -0
  28. package/dist/cjs/components/editors/cell-format/number-tab.js +194 -0
  29. package/dist/cjs/components/editors/cell-format/protection-tab.d.ts +13 -0
  30. package/dist/cjs/components/editors/cell-format/protection-tab.d.ts.map +1 -0
  31. package/dist/cjs/components/editors/cell-format/protection-tab.js +13 -0
  32. package/dist/cjs/components/editors/cell-format-editor.d.ts +31 -3
  33. package/dist/cjs/components/editors/cell-format-editor.d.ts.map +1 -1
  34. package/dist/cjs/components/editors/cell-format-editor.js +182 -636
  35. package/dist/cjs/components/editors/conditional-format-data-bar-options.d.ts +16 -0
  36. package/dist/cjs/components/editors/conditional-format-data-bar-options.d.ts.map +1 -0
  37. package/dist/cjs/components/editors/conditional-format-data-bar-options.js +166 -0
  38. package/dist/cjs/components/editors/conditional-format-editor.d.ts +7 -1
  39. package/dist/cjs/components/editors/conditional-format-editor.d.ts.map +1 -1
  40. package/dist/cjs/components/editors/conditional-format-editor.js +51 -9
  41. package/dist/cjs/components/editors/conditional-format-icon-set-options.d.ts +17 -0
  42. package/dist/cjs/components/editors/conditional-format-icon-set-options.d.ts.map +1 -0
  43. package/dist/cjs/components/editors/conditional-format-icon-set-options.js +163 -0
  44. package/dist/cjs/components/editors/conditional-format-rule-editor.d.ts +9 -0
  45. package/dist/cjs/components/editors/conditional-format-rule-editor.d.ts.map +1 -1
  46. package/dist/cjs/components/editors/conditional-format-rule-editor.js +97 -125
  47. package/dist/cjs/components/editors/sheet-filter.d.ts +20 -9
  48. package/dist/cjs/components/editors/sheet-filter.d.ts.map +1 -1
  49. package/dist/cjs/components/editors/sheet-filter.js +44 -12
  50. package/dist/cjs/hooks/use-conditional-formatting-rules.d.ts +2 -0
  51. package/dist/cjs/hooks/use-conditional-formatting-rules.d.ts.map +1 -1
  52. package/dist/cjs/hooks/use-conditional-formatting-rules.js +22 -1
  53. package/dist/cjs/hooks/use-spreadsheet-state.d.ts +2 -0
  54. package/dist/cjs/hooks/use-spreadsheet-state.d.ts.map +1 -1
  55. package/dist/cjs/hooks/use-spreadsheet-state.js +4 -2
  56. package/dist/cjs/interface/change-border.d.ts.map +1 -1
  57. package/dist/cjs/interface/change-border.js +8 -1
  58. package/dist/cjs/interface/conditional-formatting-rules.d.ts +11 -1
  59. package/dist/cjs/interface/conditional-formatting-rules.d.ts.map +1 -1
  60. package/dist/cjs/interface/conditional-formatting-rules.js +44 -1
  61. package/dist/cjs/sheet-cell.d.ts +8 -0
  62. package/dist/cjs/sheet-cell.d.ts.map +1 -1
  63. package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  64. package/dist/esm/api/border.d.ts +1 -1
  65. package/dist/esm/api/border.d.ts.map +1 -1
  66. package/dist/esm/commands.d.ts +36 -3
  67. package/dist/esm/commands.d.ts.map +1 -1
  68. package/dist/esm/components/editors/cell-format/alignment-tab.d.ts +27 -0
  69. package/dist/esm/components/editors/cell-format/alignment-tab.d.ts.map +1 -0
  70. package/dist/esm/components/editors/cell-format/alignment-tab.js +81 -0
  71. package/dist/esm/components/editors/cell-format/border-edges.d.ts +42 -0
  72. package/dist/esm/components/editors/cell-format/border-edges.d.ts.map +1 -0
  73. package/dist/esm/components/editors/cell-format/border-edges.js +79 -0
  74. package/dist/esm/components/editors/cell-format/border-tab.d.ts +21 -0
  75. package/dist/esm/components/editors/cell-format/border-tab.d.ts.map +1 -0
  76. package/dist/esm/components/editors/cell-format/border-tab.js +103 -0
  77. package/dist/esm/components/editors/cell-format/fill-tab.d.ts +14 -0
  78. package/dist/esm/components/editors/cell-format/fill-tab.d.ts.map +1 -0
  79. package/dist/esm/components/editors/cell-format/fill-tab.js +49 -0
  80. package/dist/esm/components/editors/cell-format/font-tab.d.ts +18 -0
  81. package/dist/esm/components/editors/cell-format/font-tab.d.ts.map +1 -0
  82. package/dist/esm/components/editors/cell-format/font-tab.js +88 -0
  83. package/dist/esm/components/editors/cell-format/list-box.d.ts +35 -0
  84. package/dist/esm/components/editors/cell-format/list-box.d.ts.map +1 -0
  85. package/dist/esm/components/editors/cell-format/list-box.js +30 -0
  86. package/dist/esm/components/editors/cell-format/number-formats.d.ts +90 -0
  87. package/dist/esm/components/editors/cell-format/number-formats.d.ts.map +1 -0
  88. package/dist/esm/components/editors/cell-format/number-formats.js +383 -0
  89. package/dist/esm/components/editors/cell-format/number-tab.d.ts +12 -0
  90. package/dist/esm/components/editors/cell-format/number-tab.d.ts.map +1 -0
  91. package/dist/esm/components/editors/cell-format/number-tab.js +165 -0
  92. package/dist/esm/components/editors/cell-format/protection-tab.d.ts +13 -0
  93. package/dist/esm/components/editors/cell-format/protection-tab.d.ts.map +1 -0
  94. package/dist/esm/components/editors/cell-format/protection-tab.js +9 -0
  95. package/dist/esm/components/editors/cell-format-editor.d.ts +31 -3
  96. package/dist/esm/components/editors/cell-format-editor.d.ts.map +1 -1
  97. package/dist/esm/components/editors/cell-format-editor.js +148 -615
  98. package/dist/esm/components/editors/conditional-format-data-bar-options.d.ts +16 -0
  99. package/dist/esm/components/editors/conditional-format-data-bar-options.d.ts.map +1 -0
  100. package/dist/esm/components/editors/conditional-format-data-bar-options.js +145 -0
  101. package/dist/esm/components/editors/conditional-format-editor.d.ts +7 -1
  102. package/dist/esm/components/editors/conditional-format-editor.d.ts.map +1 -1
  103. package/dist/esm/components/editors/conditional-format-editor.js +39 -8
  104. package/dist/esm/components/editors/conditional-format-icon-set-options.d.ts +17 -0
  105. package/dist/esm/components/editors/conditional-format-icon-set-options.d.ts.map +1 -0
  106. package/dist/esm/components/editors/conditional-format-icon-set-options.js +139 -0
  107. package/dist/esm/components/editors/conditional-format-rule-editor.d.ts +9 -0
  108. package/dist/esm/components/editors/conditional-format-rule-editor.d.ts.map +1 -1
  109. package/dist/esm/components/editors/conditional-format-rule-editor.js +60 -85
  110. package/dist/esm/components/editors/sheet-filter.d.ts +20 -9
  111. package/dist/esm/components/editors/sheet-filter.d.ts.map +1 -1
  112. package/dist/esm/components/editors/sheet-filter.js +31 -11
  113. package/dist/esm/hooks/use-conditional-formatting-rules.d.ts +2 -0
  114. package/dist/esm/hooks/use-conditional-formatting-rules.d.ts.map +1 -1
  115. package/dist/esm/hooks/use-conditional-formatting-rules.js +19 -1
  116. package/dist/esm/hooks/use-spreadsheet-state.d.ts +2 -0
  117. package/dist/esm/hooks/use-spreadsheet-state.d.ts.map +1 -1
  118. package/dist/esm/hooks/use-spreadsheet-state.js +4 -2
  119. package/dist/esm/interface/change-border.d.ts.map +1 -1
  120. package/dist/esm/interface/change-border.js +8 -1
  121. package/dist/esm/interface/conditional-formatting-rules.d.ts +11 -1
  122. package/dist/esm/interface/conditional-formatting-rules.d.ts.map +1 -1
  123. package/dist/esm/interface/conditional-formatting-rules.js +29 -1
  124. package/dist/esm/sheet-cell.d.ts +8 -0
  125. package/dist/esm/sheet-cell.d.ts.map +1 -1
  126. package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
  127. package/package.json +6 -6
@@ -1,6 +1,6 @@
1
1
  import { useIsomorphicLayoutEffect } from "@rowsncolumns/grid";
2
2
  import { CrossCircledIcon } from "@rowsncolumns/icons";
3
- import { BackgroundColorSelector, BorderSelector, ButtonBold, ButtonItalic, ButtonStrikethrough, ButtonUnderline, CONDITION_LABELS, CONDITION_NONE, FormulaInput, getStringifiedColor, ICON_SET_COLORS, ICON_SET_GLYPHS, shouldShowFromValue, shouldShowToValue, TextColorSelector, useFormulaInputState, useFormulaRangeHelpers, } from "@rowsncolumns/spreadsheet";
3
+ import { BackgroundColorSelector, BorderSelector, ButtonBold, ButtonItalic, ButtonStrikethrough, ButtonUnderline, CONDITION_LABELS, CONDITION_NONE, FormulaInput, getStringifiedColor, shouldShowFromValue, shouldShowToValue, TextColorSelector, useFormulaInputState, useFormulaRangeHelpers, } from "@rowsncolumns/spreadsheet";
4
4
  import { Button, IconButton, Input, Select, SelectContent, SelectItem, SelectPortal, SelectTrigger, SelectValue, Stack, } from "@rowsncolumns/ui";
5
5
  import { isNil, uuid } from "@rowsncolumns/utils";
6
6
  import { useFormik } from "formik";
@@ -8,6 +8,8 @@ import isEqual from "lodash/isEqual";
8
8
  import omit from "lodash/omit";
9
9
  import React, { useEffect, useMemo, useRef, useState } from "react";
10
10
  import { getBorderWidthFromStyle, getCSSBorderStyleFromStyle, } from "../../api/border";
11
+ import { ConditionalFormatDataBarOptions, DEFAULT_DATA_BAR_RULE, } from "./conditional-format-data-bar-options";
12
+ import { ConditionalFormatIconSetOptions, defaultIconThresholds, } from "./conditional-format-icon-set-options";
11
13
  export const createBorderCSSFromBorder = (borders, theme) => {
12
14
  if (!borders) {
13
15
  return {};
@@ -45,6 +47,44 @@ export const createRulePreviewStyle = (format, theme) => {
45
47
  ...createBorderCSSFromBorder(format?.borders, theme),
46
48
  };
47
49
  };
50
+ /** Excel's "Format only values that are above or below average" choices. */
51
+ export const AVERAGE_OPTIONS = [
52
+ { key: "above", label: "above", type: "NUMBER_ABOVE_AVERAGE" },
53
+ { key: "below", label: "below", type: "NUMBER_BELOW_AVERAGE" },
54
+ {
55
+ key: "equalAbove",
56
+ label: "equal or above",
57
+ type: "NUMBER_ABOVE_AVERAGE",
58
+ equalAverage: true,
59
+ },
60
+ {
61
+ key: "equalBelow",
62
+ label: "equal or below",
63
+ type: "NUMBER_BELOW_AVERAGE",
64
+ equalAverage: true,
65
+ },
66
+ ...[1, 2, 3].map((stdDev) => ({
67
+ key: `above${stdDev}`,
68
+ label: `${stdDev} std dev above`,
69
+ type: "NUMBER_ABOVE_AVERAGE",
70
+ stdDev,
71
+ })),
72
+ ...[1, 2, 3].map((stdDev) => ({
73
+ key: `below${stdDev}`,
74
+ label: `${stdDev} std dev below`,
75
+ type: "NUMBER_BELOW_AVERAGE",
76
+ stdDev,
77
+ })),
78
+ ];
79
+ export const averageOptionKey = (rule) => {
80
+ const above = rule?.condition?.type !== "NUMBER_BELOW_AVERAGE";
81
+ if (rule?.stdDev) {
82
+ return `${above ? "above" : "below"}${rule.stdDev}`;
83
+ }
84
+ if (rule?.equalAverage)
85
+ return above ? "equalAbove" : "equalBelow";
86
+ return above ? "above" : "below";
87
+ };
48
88
  const ensureFormula = (value) => {
49
89
  if (!value)
50
90
  return undefined;
@@ -220,10 +260,7 @@ export const ConditionalFormatRuleEditor = ({ sheetId, conditionalFormatRule, th
220
260
  if (selectedTab === "iconSetRule" && !values.iconSetRule) {
221
261
  setFieldValue("iconSetRule", {
222
262
  iconSet: "3TrafficLights1",
223
- thresholds: [
224
- { type: "PERCENT", value: 33 },
225
- { type: "PERCENT", value: 67 },
226
- ],
263
+ thresholds: defaultIconThresholds(3),
227
264
  });
228
265
  }
229
266
  }, [selectedTab, values.iconSetRule]);
@@ -232,11 +269,7 @@ export const ConditionalFormatRuleEditor = ({ sheetId, conditionalFormatRule, th
232
269
  // "Single color" on reopen). Mirrors the topBottomRule/distinctRule effects.
233
270
  useIsomorphicLayoutEffect(() => {
234
271
  if (selectedTab === "dataBarRule" && !values.dataBarRule) {
235
- setFieldValue("dataBarRule", {
236
- minpoint: { type: "MIN" },
237
- maxpoint: { type: "MAX" },
238
- color: "#638ec6",
239
- });
272
+ setFieldValue("dataBarRule", DEFAULT_DATA_BAR_RULE);
240
273
  }
241
274
  }, [selectedTab, values.dataBarRule]);
242
275
  const len = values.ranges.length;
@@ -363,6 +396,21 @@ export const ConditionalFormatRuleEditor = ({ sheetId, conditionalFormatRule, th
363
396
  conditionLabelOptions.map(({ condition, label }) => {
364
397
  return (React.createElement(SelectItem, { key: condition, value: condition }, label));
365
398
  }))))),
399
+ booleanRule?.condition?.type === "NUMBER_ABOVE_AVERAGE" ||
400
+ booleanRule?.condition?.type === "NUMBER_BELOW_AVERAGE" ? (React.createElement(Stack, { direction: "vertical", className: "gap-1 pb-3" },
401
+ React.createElement("label", { className: "font-system text-sm" }, "Format values that are"),
402
+ React.createElement(Select, { value: averageOptionKey(booleanRule), onValueChange: (key) => {
403
+ const option = AVERAGE_OPTIONS.find((o) => o.key === key);
404
+ if (!option)
405
+ return;
406
+ setFieldValue("booleanRule.condition.type", option.type);
407
+ setFieldValue("booleanRule.equalAverage", option.equalAverage || undefined);
408
+ setFieldValue("booleanRule.stdDev", option.stdDev);
409
+ } },
410
+ React.createElement(SelectTrigger, { className: "text-sm", "aria-label": "Average option" },
411
+ React.createElement(SelectValue, null)),
412
+ React.createElement(SelectPortal, null,
413
+ React.createElement(SelectContent, null, AVERAGE_OPTIONS.map((option) => (React.createElement(SelectItem, { key: option.key, value: option.key }, option.label)))))))) : null,
366
414
  React.createElement(Stack, { direction: "vertical", className: "gap-1 pb-3" },
367
415
  showFromValue ? (values.booleanRule?.condition?.type === "CUSTOM_FORMULA" ? (React.createElement(FormulaInput, { onChange: (value) => updateBooleanRuleInputs(value, undefined, "CUSTOM_FORMULA", false), value: fromValue ?? "=", required: true, placeholder: "Enter a formula", autoFocus: true, functionDescriptions: functionDescriptions })) : (React.createElement(Input, { value: fromValue ?? "", type: "text", name: "fromValue", onChange: (e) => updateBooleanRuleInputs(e.target.value, toValue), className: "text-xs", placeholder: "Value or formula" }))) : null,
368
416
  showToValue ? (React.createElement(Input, { value: toValue ?? "", type: "text", name: "toValue", onChange: (e) => updateBooleanRuleInputs(fromValue, e.target.value), className: "text-xs", placeholder: "Value or formula" })) : null),
@@ -538,81 +586,8 @@ export const ConditionalFormatRuleEditor = ({ sheetId, conditionalFormatRule, th
538
586
  React.createElement(Stack, { direction: "vertical", className: "gap-1 pb-3" },
539
587
  React.createElement("label", { className: "font-system text-sm" }, "Preview"),
540
588
  React.createElement("div", { className: "p-2 text-center shadow-lg", style: createRulePreviewStyle(distinctRule?.format, theme) }, "AaBbCcYyZz")))),
541
- selectedTab === "iconSetRule" && (React.createElement(Stack, { direction: "vertical", className: "gap-1 pb-1" },
542
- React.createElement("label", { className: "font-system text-sm" }, "Icon set"),
543
- React.createElement(Select, { value: iconSetRule?.iconSet ?? "3TrafficLights1", onValueChange: (value) => {
544
- // Default thresholds at 33% / 67% to bucket the value range
545
- // into 3 equal slices when switching to a 3-icon set, etc.
546
- const familyDefaults = {
547
- "3": [{ value: 33 }, { value: 67 }],
548
- "4": [{ value: 25 }, { value: 50 }, { value: 75 }],
549
- "5": [
550
- { value: 20 },
551
- { value: 40 },
552
- { value: 60 },
553
- { value: 80 },
554
- ],
555
- };
556
- const count = value.startsWith("5")
557
- ? "5"
558
- : value.startsWith("4")
559
- ? "4"
560
- : "3";
561
- setFieldValue("iconSetRule.iconSet", value);
562
- if (!iconSetRule?.thresholds?.length) {
563
- setFieldValue("iconSetRule.thresholds", familyDefaults[count].map((t) => ({
564
- type: "PERCENT",
565
- value: t.value,
566
- })));
567
- }
568
- } },
569
- React.createElement(SelectTrigger, { className: "text-sm mb-0 w-64" },
570
- React.createElement(SelectValue, { placeholder: "3 Traffic Lights" })),
571
- React.createElement(SelectPortal, null,
572
- React.createElement(SelectContent, null, [
573
- ["3Arrows", "3 Arrows"],
574
- ["3TrafficLights1", "3 Traffic Lights"],
575
- ["3Signs", "3 Signs"],
576
- ["3Symbols", "3 Symbols"],
577
- ["3Flags", "3 Flags"],
578
- ["4Arrows", "4 Arrows"],
579
- ["4Rating", "4 Rating"],
580
- ["4TrafficLights", "4 Traffic Lights"],
581
- ["5Arrows", "5 Arrows"],
582
- ["5Rating", "5 Rating"],
583
- ["5Quarters", "5 Quarters"],
584
- ].map(([family, label]) => {
585
- const glyphs = ICON_SET_GLYPHS[family];
586
- const colors = ICON_SET_COLORS[family];
587
- return (React.createElement(SelectItem, { key: family, value: family },
588
- React.createElement("span", { className: "inline-flex items-center gap-2" },
589
- React.createElement("span", null, label),
590
- React.createElement("span", { className: "inline-flex gap-0.5" }, glyphs.map((glyph, i) => (React.createElement("span", { key: i, style: { color: colors[i] } }, glyph)))))));
591
- })))),
592
- React.createElement("label", { className: "font-system text-sm mt-2 inline-flex items-center gap-2" },
593
- React.createElement("input", { type: "checkbox", checked: !!iconSetRule?.reverse, onChange: (e) => {
594
- setFieldValue("iconSetRule.reverse", e.target.checked);
595
- } }),
596
- "Reverse icon order"))),
597
- selectedTab === "dataBarRule" && (React.createElement(Stack, { direction: "vertical", className: "gap-1 pb-1" },
598
- React.createElement("label", { className: "font-system text-sm" }, "Bar color"),
599
- React.createElement(Input, { type: "color", value: typeof dataBarRule?.color === "string"
600
- ? dataBarRule.color
601
- : "#638ec6", onChange: (e) => {
602
- setFieldValue("dataBarRule.color", e.target.value);
603
- if (!dataBarRule?.minpoint) {
604
- setFieldValue("dataBarRule.minpoint", { type: "MIN" });
605
- }
606
- if (!dataBarRule?.maxpoint) {
607
- setFieldValue("dataBarRule.maxpoint", { type: "MAX" });
608
- }
609
- }, className: "w-24 h-8" }),
610
- React.createElement("label", { className: "font-system text-sm mt-2" }, "Negative color (optional)"),
611
- React.createElement(Input, { type: "color", value: typeof dataBarRule?.negativeColor === "string"
612
- ? dataBarRule.negativeColor
613
- : "#dc2626", onChange: (e) => {
614
- setFieldValue("dataBarRule.negativeColor", e.target.value);
615
- }, className: "w-24 h-8" })))),
589
+ selectedTab === "iconSetRule" && (React.createElement(ConditionalFormatIconSetOptions, { rule: iconSetRule, onChange: (next) => setFieldValue("iconSetRule", next) })),
590
+ selectedTab === "dataBarRule" && (React.createElement(ConditionalFormatDataBarOptions, { rule: dataBarRule, theme: theme, onChange: (next) => setFieldValue("dataBarRule", next) }))),
616
591
  React.createElement("div", { className: "flex gap-1 py-2" },
617
592
  React.createElement(Button, { type: "submit", variant: "primary", size: "xs" }, "Save"),
618
593
  React.createElement(Button, { size: "xs", onClick: onCancelForm, type: "button" }, "Cancel"))));
@@ -1,17 +1,24 @@
1
1
  import React from "react";
2
2
  /**
3
- * "all", or a specific sheet id a rule list is narrowed to.
3
+ * "all", "selection" (Excel's "Show formatting rules for: Current Selection"), or a specific sheet
4
+ * id a rule list is narrowed to.
4
5
  */
5
- export type SheetFilter = number | "all";
6
+ export type SheetFilter = number | "all" | "selection";
7
+ type FilterRange = {
8
+ sheetId?: number;
9
+ startRowIndex?: number;
10
+ endRowIndex?: number;
11
+ startColumnIndex?: number;
12
+ endColumnIndex?: number;
13
+ };
6
14
  type RuleWithRanges = {
7
- ranges?: {
8
- sheetId?: number;
9
- }[];
15
+ ranges?: FilterRange[];
10
16
  };
11
17
  /**
12
- * A rule belongs to a sheet when any of its ranges targets that sheet.
18
+ * A rule belongs to a sheet when any of its ranges targets that sheet, and to the current selection
19
+ * when any of its ranges overlaps a selected range.
13
20
  */
14
- export declare function filterRulesBySheet<T extends RuleWithRanges>(rules: T[], filter: SheetFilter): T[];
21
+ export declare function filterRulesBySheet<T extends RuleWithRanges>(rules: T[], filter: SheetFilter, selectionRanges?: readonly FilterRange[]): T[];
15
22
  /**
16
23
  * Sheet ids that appear in at least one rule's ranges, in first-seen order.
17
24
  */
@@ -51,17 +58,21 @@ export declare function getFilterableSheetIds(rules: RuleWithRanges[], sheetId:
51
58
  *
52
59
  * `workbookSheetIds` is the workbook's sheets in tab order; see getFilterableSheetIds.
53
60
  */
54
- export declare function useSheetFilter<T extends RuleWithRanges>(sheetId: number, rules: T[], workbookSheetIds?: readonly number[]): {
61
+ export declare function useSheetFilter<T extends RuleWithRanges>(sheetId: number, rules: T[], workbookSheetIds?: readonly number[],
62
+ /** The selected ranges (with `sheetId`), read when "Current selection" is chosen. */
63
+ getSelectionRanges?: () => readonly FilterRange[]): {
55
64
  sheetFilter: SheetFilter;
56
65
  setSheetFilter: React.Dispatch<React.SetStateAction<SheetFilter>>;
57
66
  filterableSheetIds: number[];
58
67
  visibleRules: T[];
59
68
  showFilter: boolean;
60
69
  };
61
- export declare const SheetFilterSelect: ({ value, sheetIds, onValueChange, }: {
70
+ export declare const SheetFilterSelect: ({ value, sheetIds, onValueChange, offerSelection, }: {
62
71
  value: SheetFilter;
63
72
  sheetIds: number[];
64
73
  onValueChange: (value: SheetFilter) => void;
74
+ /** Offer "Current selection" (the Conditional Formatting Rules Manager does). */
75
+ offerSelection?: boolean;
65
76
  }) => React.JSX.Element;
66
77
  export declare const SheetFilterEmptyState: ({ sheetFilter, label, }: {
67
78
  sheetFilter: SheetFilter;
@@ -1 +1 @@
1
- {"version":3,"file":"sheet-filter.d.ts","sourceRoot":"","sources":["../../../../components/editors/sheet-filter.tsx"],"names":[],"mappings":"AASA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,KAAK,CAAC;AAEzC,KAAK,cAAc,GAAG;IACpB,MAAM,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACjC,CAAC;AAEF;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,cAAc,EACzD,KAAK,EAAE,CAAC,EAAE,EACV,MAAM,EAAE,WAAW,GAClB,CAAC,EAAE,CAML;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,MAAM,EAAE,CAUtE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,SAAS,EACT,WAAW,EACX,OAAO,GACR,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;CACjB,GAAG,OAAO,CAEV;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,cAAc,EAAE,EACvB,OAAO,EAAE,MAAM,EACf,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,GACnC,MAAM,EAAE,CAKV;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,cAAc,EACrD,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,CAAC,EAAE,EACV,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE;;;;;;EA8BrC;AAED,eAAO,MAAM,iBAAiB,GAAI,qCAI/B;IACD,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;CAC7C,sBA6BA,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,yBAGnC;IACD,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;CACf,sBAKA,CAAC"}
1
+ {"version":3,"file":"sheet-filter.d.ts","sourceRoot":"","sources":["../../../../components/editors/sheet-filter.tsx"],"names":[],"mappings":"AASA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAE5D;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,KAAK,GAAG,WAAW,CAAC;AAEvD,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;CACxB,CAAC;AASF;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,cAAc,EACzD,KAAK,EAAE,CAAC,EAAE,EACV,MAAM,EAAE,WAAW,EACnB,eAAe,GAAE,SAAS,WAAW,EAAO,GAC3C,CAAC,EAAE,CAYL;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,cAAc,EAAE,GAAG,MAAM,EAAE,CAUtE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,EACpC,SAAS,EACT,WAAW,EACX,OAAO,GACR,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;CACjB,GAAG,OAAO,CAEV;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,cAAc,EAAE,EACvB,OAAO,EAAE,MAAM,EACf,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,GACnC,MAAM,EAAE,CAKV;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,cAAc,EACrD,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,CAAC,EAAE,EACV,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE;AACpC,qFAAqF;AACrF,kBAAkB,CAAC,EAAE,MAAM,SAAS,WAAW,EAAE;;;;;;EAoClD;AAED,eAAO,MAAM,iBAAiB,GAAI,qDAK/B;IACD,KAAK,EAAE,WAAW,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,aAAa,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IAC5C,iFAAiF;IACjF,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,sBAkCA,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,yBAGnC;IACD,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;CACf,sBASA,CAAC"}
@@ -1,13 +1,22 @@
1
1
  import { useGetSheetName } from "@rowsncolumns/spreadsheet";
2
2
  import { Select, SelectContent, SelectItem, SelectPortal, SelectTrigger, SelectValue, } from "@rowsncolumns/ui";
3
3
  import React, { useEffect, useMemo, useState } from "react";
4
+ const rangesIntersect = (a, b) => a.sheetId === b.sheetId &&
5
+ (a.startRowIndex ?? 0) <= (b.endRowIndex ?? Number.MAX_SAFE_INTEGER) &&
6
+ (b.startRowIndex ?? 0) <= (a.endRowIndex ?? Number.MAX_SAFE_INTEGER) &&
7
+ (a.startColumnIndex ?? 0) <= (b.endColumnIndex ?? Number.MAX_SAFE_INTEGER) &&
8
+ (b.startColumnIndex ?? 0) <= (a.endColumnIndex ?? Number.MAX_SAFE_INTEGER);
4
9
  /**
5
- * A rule belongs to a sheet when any of its ranges targets that sheet.
10
+ * A rule belongs to a sheet when any of its ranges targets that sheet, and to the current selection
11
+ * when any of its ranges overlaps a selected range.
6
12
  */
7
- export function filterRulesBySheet(rules, filter) {
8
- return filter === "all"
9
- ? rules
10
- : rules.filter((rule) => rule.ranges?.some((range) => range.sheetId === filter));
13
+ export function filterRulesBySheet(rules, filter, selectionRanges = []) {
14
+ if (filter === "all")
15
+ return rules;
16
+ if (filter === "selection") {
17
+ return rules.filter((rule) => rule.ranges?.some((range) => selectionRanges.some((selected) => rangesIntersect(range, selected))));
18
+ }
19
+ return rules.filter((rule) => rule.ranges?.some((range) => range.sheetId === filter));
11
20
  }
12
21
  /**
13
22
  * Sheet ids that appear in at least one rule's ranges, in first-seen order.
@@ -61,13 +70,19 @@ export function getFilterableSheetIds(rules, sheetId, workbookSheetIds) {
61
70
  *
62
71
  * `workbookSheetIds` is the workbook's sheets in tab order; see getFilterableSheetIds.
63
72
  */
64
- export function useSheetFilter(sheetId, rules, workbookSheetIds) {
73
+ export function useSheetFilter(sheetId, rules, workbookSheetIds,
74
+ /** The selected ranges (with `sheetId`), read when "Current selection" is chosen. */
75
+ getSelectionRanges) {
65
76
  const [sheetFilter, setSheetFilter] = useState(sheetId);
66
77
  useEffect(() => {
67
78
  setSheetFilter(sheetId);
68
79
  }, [sheetId]);
69
80
  const filterableSheetIds = useMemo(() => getFilterableSheetIds(rules, sheetId, workbookSheetIds), [rules, sheetId, workbookSheetIds]);
70
- const visibleRules = useMemo(() => filterRulesBySheet(rules, sheetFilter), [rules, sheetFilter]);
81
+ const sheetRules = useMemo(() => sheetFilter === "selection" ? rules : filterRulesBySheet(rules, sheetFilter), [rules, sheetFilter]);
82
+ // The selection can move while the (non-modal) dialog is open, so it is read on every render.
83
+ const visibleRules = sheetFilter === "selection"
84
+ ? filterRulesBySheet(rules, "selection", getSelectionRanges?.() ?? [])
85
+ : sheetRules;
71
86
  const showFilter = shouldShowSheetFilter({
72
87
  ruleCount: rules.length,
73
88
  sheetFilter,
@@ -81,21 +96,26 @@ export function useSheetFilter(sheetId, rules, workbookSheetIds) {
81
96
  showFilter,
82
97
  };
83
98
  }
84
- export const SheetFilterSelect = ({ value, sheetIds, onValueChange, }) => {
99
+ export const SheetFilterSelect = ({ value, sheetIds, onValueChange, offerSelection = false, }) => {
85
100
  const getSheetName = useGetSheetName();
86
101
  return (React.createElement("div", { className: "flex items-center gap-2 p-2 text-sm border-0 border-solid border-b border-rnc-border" },
87
102
  React.createElement("label", { className: "text-rnc-muted-foreground whitespace-nowrap" }, "Show rules for"),
88
- React.createElement(Select, { value: value === "all" ? "all" : String(value), onValueChange: (next) => {
89
- onValueChange(next === "all" ? "all" : Number(next));
103
+ React.createElement(Select, { value: typeof value === "number" ? String(value) : value, onValueChange: (next) => {
104
+ onValueChange(next === "all" || next === "selection" ? next : Number(next));
90
105
  } },
91
106
  React.createElement(SelectTrigger, { className: "text-sm" },
92
107
  React.createElement(SelectValue, null)),
93
108
  React.createElement(SelectPortal, null,
94
109
  React.createElement(SelectContent, null,
110
+ offerSelection ? (React.createElement(SelectItem, { value: "selection" }, "Current selection")) : null,
95
111
  React.createElement(SelectItem, { value: "all" }, "All sheets"),
96
112
  sheetIds.map((id) => (React.createElement(SelectItem, { key: id, value: String(id) }, getSheetName?.(id) ?? `Sheet ${id}`))))))));
97
113
  };
98
114
  export const SheetFilterEmptyState = ({ sheetFilter, label, }) => (React.createElement("div", { className: "p-4 text-sm text-rnc-muted-foreground text-center" },
99
115
  "No ",
100
116
  label,
101
- sheetFilter === "all" ? "" : " in this sheet"));
117
+ sheetFilter === "all"
118
+ ? ""
119
+ : sheetFilter === "selection"
120
+ ? " in the current selection"
121
+ : " in this sheet"));
@@ -1,4 +1,5 @@
1
1
  import type { ConditionalFormatRule } from "@rowsncolumns/spreadsheet";
2
+ import { type ConditionalFormatPriorityUpdate } from "../interface/conditional-formatting-rules";
2
3
  import type { useCalculation } from "./use-calculation";
3
4
  import type { SpreadsheetPatch } from "./use-undo-redo";
4
5
  export type UseConditionalFormattingRulesProps = {
@@ -17,6 +18,7 @@ export declare const useConditionalFormattingRules: ({ enqueueCalculation, creat
17
18
  onCreateConditionalFormattingRule: (rule: ConditionalFormatRule) => void;
18
19
  onUpdateConditionalFormattingRule: (updatedRule: ConditionalFormatRule, previousRule: ConditionalFormatRule) => void;
19
20
  onDeleteConditionalFormattingRule: (rule: ConditionalFormatRule) => void;
21
+ onReorderConditionalFormattingRules: (updates: ConditionalFormatPriorityUpdate[]) => void;
20
22
  onPreviewConditionalFormattingRule: (rule: ConditionalFormatRule) => void;
21
23
  };
22
24
  //# sourceMappingURL=use-conditional-formatting-rules.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-conditional-formatting-rules.d.ts","sourceRoot":"","sources":["../../../hooks/use-conditional-formatting-rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAUvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAcxD,MAAM,MAAM,kCAAkC,GAAG;IAC/C,kBAAkB,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,oBAAoB,CAAC,CAAC;IAC5E;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACzD;;OAEG;IACH,0BAA0B,CAAC,EAAE,KAAK,CAAC,QAAQ,CACzC,KAAK,CAAC,cAAc,CAAC,qBAAqB,EAAE,CAAC,CAC9C,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,6BAA6B,GAAI,oEAI3C,kCAAkC;8CAK1B,qBAAqB;qDAwBb,qBAAqB,gBACpB,qBAAqB;8CA2B9B,qBAAqB;+CAuBrB,qBAAqB;CAgB/B,CAAC"}
1
+ {"version":3,"file":"use-conditional-formatting-rules.d.ts","sourceRoot":"","sources":["../../../hooks/use-conditional-formatting-rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGvE,OAAO,EAGL,KAAK,+BAA+B,EAIrC,MAAM,2CAA2C,CAAC;AAEnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAcxD,MAAM,MAAM,kCAAkC,GAAG;IAC/C,kBAAkB,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,oBAAoB,CAAC,CAAC;IAC5E;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACzD;;OAEG;IACH,0BAA0B,CAAC,EAAE,KAAK,CAAC,QAAQ,CACzC,KAAK,CAAC,cAAc,CAAC,qBAAqB,EAAE,CAAC,CAC9C,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,6BAA6B,GAAI,oEAI3C,kCAAkC;8CAK1B,qBAAqB;qDAwBb,qBAAqB,gBACpB,qBAAqB;8CA2B9B,qBAAqB;mDAuBlB,+BAA+B,EAAE;+CAyBpC,qBAAqB;CAiB/B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { useCallback } from "react";
2
- import { createConditionalFormattingRule, deleteConditionalFormattingRule, previewConditionalFormattingRule, updateConditionalFormattingRule, } from "../interface/conditional-formatting-rules";
2
+ import { createConditionalFormattingRule, deleteConditionalFormattingRule, previewConditionalFormattingRule, reorderConditionalFormattingRules, updateConditionalFormattingRule, } from "../interface/conditional-formatting-rules";
3
3
  import { useCanEditSheet } from "./use-can-edit-cellrange";
4
4
  // CF rules carry one or more ranges; each range names a sheetId. A
5
5
  // rule is editable only if EVERY sheet it touches is editable.
@@ -64,6 +64,23 @@ export const useConditionalFormattingRules = ({ enqueueCalculation, createHistor
64
64
  createHistory,
65
65
  canEditSheet,
66
66
  ]);
67
+ // Rules Manager Move Up / Move Down — one undo step
68
+ const onReorderConditionalFormattingRules = useCallback((updates) => {
69
+ if (updates.some(({ rule }) => !ruleSheetsEditable(rule, canEditSheet))) {
70
+ console.debug("Cannot reorder conditional formatting rules — one of their ranges is on a protected sheet.");
71
+ return;
72
+ }
73
+ reorderConditionalFormattingRules({
74
+ enqueueCalculation,
75
+ createHistory,
76
+ onChangeConditionalFormats,
77
+ })(updates);
78
+ }, [
79
+ enqueueCalculation,
80
+ createHistory,
81
+ onChangeConditionalFormats,
82
+ canEditSheet,
83
+ ]);
67
84
  // on Preview conditional formatting — non-destructive, no gate
68
85
  const onPreviewConditionalFormattingRule = useCallback((rule) => {
69
86
  previewConditionalFormattingRule({
@@ -76,6 +93,7 @@ export const useConditionalFormattingRules = ({ enqueueCalculation, createHistor
76
93
  onCreateConditionalFormattingRule,
77
94
  onUpdateConditionalFormattingRule,
78
95
  onDeleteConditionalFormattingRule,
96
+ onReorderConditionalFormattingRules,
79
97
  onPreviewConditionalFormattingRule,
80
98
  };
81
99
  };
@@ -434,6 +434,7 @@ export declare const useSpreadsheetState: <T extends CellData = CellData, S exte
434
434
  selections: import("@rowsncolumns/grid").SelectionArea<SelectionAttributes>[];
435
435
  showGridLines: import("@rowsncolumns/spreadsheet").Maybe<boolean>;
436
436
  showRowColHeaders: import("@rowsncolumns/spreadsheet").Maybe<boolean>;
437
+ showZeros: import("@rowsncolumns/spreadsheet").Maybe<boolean>;
437
438
  zoomScale: import("@rowsncolumns/spreadsheet").Maybe<number>;
438
439
  rowCount: number;
439
440
  columnCount: number;
@@ -656,6 +657,7 @@ export declare const useSpreadsheetState: <T extends CellData = CellData, S exte
656
657
  onCreateConditionalFormattingRule: (rule: ConditionalFormatRule) => void;
657
658
  onUpdateConditionalFormattingRule: (updatedRule: ConditionalFormatRule, previousRule: ConditionalFormatRule) => void;
658
659
  onDeleteConditionalFormattingRule: (rule: ConditionalFormatRule) => void;
660
+ onReorderConditionalFormattingRules: (updates: import("../interface/conditional-formatting-rules").ConditionalFormatPriorityUpdate[]) => void;
659
661
  onPreviewConditionalFormattingRule: (rule: ConditionalFormatRule) => void;
660
662
  onRequestDataValidation: (sheetId: number, activeCell: import("@rowsncolumns/grid").CellInterface, selections: import("@rowsncolumns/grid").SelectionArea<SelectionAttributes>[], initialDataValidationRule?: DataValidationRuleRecord, showEditUI?: boolean) => void;
661
663
  onDeleteDataValidationRules: (rules: DataValidationRuleRecord[]) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"use-spreadsheet-state.d.ts","sourceRoot":"","sources":["../../../hooks/use-spreadsheet-state.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EACV,UAAU,EACV,aAAa,EACb,QAAQ,EACR,SAAS,EACT,2BAA2B,EAC3B,cAAc,EACd,aAAa,EACd,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EACV,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,QAAQ,EACR,SAAS,EACT,qBAAqB,EACrB,wBAAwB,EACxB,aAAa,EACb,cAAc,EACd,UAAU,EACV,UAAU,EACV,cAAc,EACd,mBAAmB,EACnB,KAAK,EACL,MAAM,EACN,gBAAgB,EAChB,iBAAiB,EACjB,SAAS,EACT,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,2BAA2B,CAAC;AAkBnC,OAAO,EAEL,KAAK,kBAAkB,EAMxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAInC,OAAO,EAAE,iBAAiB,IAAI,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAQ5E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIzD,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAmI7D,OAAO,KAAK,EAAE,WA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAh/BjB,MAAM,sBAAsB,MAAM;;;;;;;;;;;;;;;;;;CAq6D/C,CAAC"}
@@ -363,7 +363,7 @@ sanitizeHtml, }) => {
363
363
  // Get current active cell
364
364
  const getSelections = useCallbackRef(useCallback(() => selections, [selections]));
365
365
  // Extract row count and column count
366
- const { rowCount: _rowCount = DEFAULT_ROW_COUNT, columnCount: _columnCount = DEFAULT_COLUMN_COUNT, frozenColumnCount, frozenRowCount, rowMetadata, columnMetadata, merges, showGridLines, showRowColHeaders, zoomScale, basicFilter, } = useMemo(() => {
366
+ const { rowCount: _rowCount = DEFAULT_ROW_COUNT, columnCount: _columnCount = DEFAULT_COLUMN_COUNT, frozenColumnCount, frozenRowCount, rowMetadata, columnMetadata, merges, showGridLines, showRowColHeaders, showZeros, zoomScale, basicFilter, } = useMemo(() => {
367
367
  const sheet = sheets.find((sheet) => sheet.sheetId === activeSheetId);
368
368
  // For collaboration mode
369
369
  // when someone deletes a sheet
@@ -2008,7 +2008,7 @@ sanitizeHtml, }) => {
2008
2008
  onStreamEnd,
2009
2009
  });
2010
2010
  // Conditional format actions
2011
- const { onCreateConditionalFormattingRule, onUpdateConditionalFormattingRule, onDeleteConditionalFormattingRule, onPreviewConditionalFormattingRule, } = useConditionalFormattingRules({
2011
+ const { onCreateConditionalFormattingRule, onUpdateConditionalFormattingRule, onDeleteConditionalFormattingRule, onReorderConditionalFormattingRules, onPreviewConditionalFormattingRule, } = useConditionalFormattingRules({
2012
2012
  enqueueCalculation,
2013
2013
  onChangeConditionalFormats,
2014
2014
  createHistory,
@@ -2206,6 +2206,7 @@ sanitizeHtml, }) => {
2206
2206
  selections,
2207
2207
  showGridLines,
2208
2208
  showRowColHeaders,
2209
+ showZeros,
2209
2210
  zoomScale,
2210
2211
  rowCount,
2211
2212
  columnCount,
@@ -2396,6 +2397,7 @@ sanitizeHtml, }) => {
2396
2397
  onCreateConditionalFormattingRule,
2397
2398
  onUpdateConditionalFormattingRule,
2398
2399
  onDeleteConditionalFormattingRule,
2400
+ onReorderConditionalFormattingRules,
2399
2401
  onPreviewConditionalFormattingRule,
2400
2402
  onRequestDataValidation,
2401
2403
  onDeleteDataValidationRules,
@@ -1 +1 @@
1
- {"version":3,"file":"change-border.d.ts","sourceRoot":"","sources":["../../../interface/change-border.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,SAAS,EACT,aAAa,EACd,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAEV,cAAc,EACd,WAAW,EACX,QAAQ,EACR,KAAK,EACL,mBAAmB,EACnB,KAAK,EACN,MAAM,2BAA2B,CAAC;AAMnC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAGpF;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,GAC9B,OAAO,SAAS,EAChB,QAAQ,SAAS,SAAS,EAAE,GAAG,SAAS,KACvC,SAoCF,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,QAAQ,EAAE,CAAC,SAAS,KAAK,EAAE,kGAO/D,0BAA0B,CAAC,CAAC,EAAE,CAAC,CAAC,MAE/B,SAAS,MAAM,EACf,YAAY,aAAa,EACzB,YAAY,aAAa,CAAC,mBAAmB,CAAC,EAAE,EAChD,UAAU,cAAc,EACxB,OAAO,KAAK,GAAG,SAAS,EACxB,QAAO,WAAW,GAAG,SAAmB,SA8I3C,CAAC"}
1
+ {"version":3,"file":"change-border.d.ts","sourceRoot":"","sources":["../../../interface/change-border.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,SAAS,EACT,aAAa,EACd,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAEV,cAAc,EACd,WAAW,EACX,QAAQ,EACR,KAAK,EACL,mBAAmB,EACnB,KAAK,EACN,MAAM,2BAA2B,CAAC;AAMnC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAGpF;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,GAC9B,OAAO,SAAS,EAChB,QAAQ,SAAS,SAAS,EAAE,GAAG,SAAS,KACvC,SAoCF,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,QAAQ,EAAE,CAAC,SAAS,KAAK,EAAE,kGAO/D,0BAA0B,CAAC,CAAC,EAAE,CAAC,CAAC,MAE/B,SAAS,MAAM,EACf,YAAY,aAAa,EACzB,YAAY,aAAa,CAAC,mBAAmB,CAAC,EAAE,EAChD,UAAU,cAAc,EACxB,OAAO,KAAK,GAAG,SAAS,EACxB,QAAO,WAAW,GAAG,SAAmB,SAuJ3C,CAAC"}
@@ -68,12 +68,19 @@ export const changeBorder = ({ createHistory, onChangeSheetData, locale, cellXfs
68
68
  cellXfsRegistry,
69
69
  getDataValidationById,
70
70
  });
71
- // Selected border
71
+ // Selected border. A border without a colour clears the edge it
72
+ // lands on (`SheetCell.setBorder`).
72
73
  const selectedBorder = {
73
74
  color,
74
75
  style,
75
76
  width: getBorderWidthFromStyle(style),
76
77
  };
78
+ if (location === "none") {
79
+ sheetCell.clearAllBorders();
80
+ }
81
+ if (location === "diagonalUp" || location === "diagonalDown") {
82
+ sheetCell.setBorder(location, selectedBorder);
83
+ }
77
84
  if (location === "all") {
78
85
  sheetCell.setAllBorders({
79
86
  color,
@@ -1,7 +1,17 @@
1
- import type { ConditionalFormatRule } from "@rowsncolumns/spreadsheet";
1
+ import { type ConditionalFormatRule } from "@rowsncolumns/spreadsheet";
2
2
  import type { UseConditionalFormattingRulesProps } from "../hooks/use-conditional-formatting-rules";
3
3
  export declare const createConditionalFormattingRule: ({ enqueueCalculation, createHistory, onChangeConditionalFormats, }: UseConditionalFormattingRulesProps) => (rule: ConditionalFormatRule) => void;
4
4
  export declare const updateConditionalFormattingRule: ({ enqueueCalculation, createHistory, onChangeConditionalFormats, }: UseConditionalFormattingRulesProps) => (updatedRule: ConditionalFormatRule, previousRule: ConditionalFormatRule) => void;
5
5
  export declare const deleteConditionalFormattingRule: ({ enqueueCalculation, createHistory, onChangeConditionalFormats, }: UseConditionalFormattingRulesProps) => (rule: ConditionalFormatRule) => void;
6
+ /** One precedence change (Move Up / Move Down): the rule and its new `priority`. */
7
+ export type ConditionalFormatPriorityUpdate = {
8
+ rule: ConditionalFormatRule;
9
+ priority: number;
10
+ };
11
+ /**
12
+ * Apply the `priority` updates of a Rules Manager reorder as ONE undoable change (Excel's Move Up /
13
+ * Move Down). Priority only orders the rules, so no cell re-evaluates.
14
+ */
15
+ export declare const reorderConditionalFormattingRules: ({ createHistory, onChangeConditionalFormats, }: UseConditionalFormattingRulesProps) => (updates: ConditionalFormatPriorityUpdate[]) => void;
6
16
  export declare const previewConditionalFormattingRule: ({ onChangeConditionalFormats, }: UseConditionalFormattingRulesProps) => (rule: ConditionalFormatRule) => void;
7
17
  //# sourceMappingURL=conditional-formatting-rules.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"conditional-formatting-rules.d.ts","sourceRoot":"","sources":["../../../interface/conditional-formatting-rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAMvE,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,2CAA2C,CAAC;AAEpG,eAAO,MAAM,+BAA+B,GAAI,oEAI7C,kCAAkC,MAC3B,MAAM,qBAAqB,SAoCpC,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAAI,oEAI7C,kCAAkC,MAEjC,aAAa,qBAAqB,EAClC,cAAc,qBAAqB,SA8CtC,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAAI,oEAI7C,kCAAkC,MAC3B,MAAM,qBAAqB,SAuCpC,CAAC;AAEF,eAAO,MAAM,gCAAgC,GAAI,iCAE9C,kCAAkC,MAC3B,MAAM,qBAAqB,SAcpC,CAAC"}
1
+ {"version":3,"file":"conditional-formatting-rules.d.ts","sourceRoot":"","sources":["../../../interface/conditional-formatting-rules.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAE3B,MAAM,2BAA2B,CAAC;AAMnC,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,2CAA2C,CAAC;AAEpG,eAAO,MAAM,+BAA+B,GAAI,oEAI7C,kCAAkC,MAC3B,MAAM,qBAAqB,SAqCpC,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAAI,oEAI7C,kCAAkC,MAEjC,aAAa,qBAAqB,EAClC,cAAc,qBAAqB,SA8CtC,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAAI,oEAI7C,kCAAkC,MAC3B,MAAM,qBAAqB,SAuCpC,CAAC;AAEF,oFAAoF;AACpF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,EAAE,qBAAqB,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iCAAiC,GAAI,gDAG/C,kCAAkC,MAC3B,SAAS,+BAA+B,EAAE,SA0BnD,CAAC;AAEF,eAAO,MAAM,gCAAgC,GAAI,iCAE9C,kCAAkC,MAC3B,MAAM,qBAAqB,SAcpC,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { withTopConditionalFormatPriority, } from "@rowsncolumns/spreadsheet";
1
2
  import { iterateCellsInRange } from "@rowsncolumns/utils";
2
3
  import { produceWithPatches } from "immer";
3
4
  import { isConditionalFormatFormulaRule } from "../api/conditional-format";
@@ -7,7 +8,8 @@ export const createConditionalFormattingRule = ({ enqueueCalculation, createHist
7
8
  const saveHistory = createHistory();
8
9
  onChangeConditionalFormats?.((prevConditionalFormats) => {
9
10
  const [nextState, patches, inversePatches] = produceWithPatches(prevConditionalFormats, (draft) => {
10
- draft.push(rule);
11
+ // Excel adds a new rule at the TOP of the precedence list.
12
+ draft.push(withTopConditionalFormatPriority(rule, draft));
11
13
  // Formula rule (include formula-backed rules too)
12
14
  if (isConditionalFormatFormulaRule(rule)) {
13
15
  for (const range of rule.ranges) {
@@ -105,6 +107,32 @@ export const deleteConditionalFormattingRule = ({ enqueueCalculation, createHist
105
107
  });
106
108
  };
107
109
  };
110
+ /**
111
+ * Apply the `priority` updates of a Rules Manager reorder as ONE undoable change (Excel's Move Up /
112
+ * Move Down). Priority only orders the rules, so no cell re-evaluates.
113
+ */
114
+ export const reorderConditionalFormattingRules = ({ createHistory, onChangeConditionalFormats, }) => {
115
+ return (updates) => {
116
+ if (!updates.length)
117
+ return;
118
+ const priorityById = new Map(updates.map(({ rule, priority }) => [rule.id, priority]));
119
+ const saveHistory = createHistory();
120
+ onChangeConditionalFormats?.((prevConditionalFormats) => {
121
+ const [nextState, patches, inversePatches] = produceWithPatches(prevConditionalFormats, (draft) => {
122
+ for (const rule of draft) {
123
+ const priority = priorityById.get(rule.id);
124
+ if (priority !== undefined) {
125
+ rule.priority = priority;
126
+ }
127
+ }
128
+ });
129
+ saveHistory({
130
+ conditionalFormats: { patches, inversePatches },
131
+ });
132
+ return nextState;
133
+ });
134
+ };
135
+ };
108
136
  export const previewConditionalFormattingRule = ({ onChangeConditionalFormats, }) => {
109
137
  return (rule) => {
110
138
  // Preview is the user editing the rule live; drop xlsxSource so the
@@ -287,6 +287,7 @@ export declare class SheetCell<T extends CellData = CellData> {
287
287
  relativeIndent?: import("@rowsncolumns/spreadsheet").Maybe<number>;
288
288
  textRotation?: import("@rowsncolumns/spreadsheet").Maybe<number | "vertical">;
289
289
  shrinkToFit?: import("@rowsncolumns/spreadsheet").Maybe<boolean>;
290
+ readingOrder?: import("@rowsncolumns/spreadsheet").Maybe<import("@rowsncolumns/spreadsheet").ReadingOrder>;
290
291
  fillPattern?: import("@rowsncolumns/spreadsheet").Maybe<import("@rowsncolumns/spreadsheet").FillPattern>;
291
292
  foregroundColor?: import("@rowsncolumns/spreadsheet").Maybe<import("@rowsncolumns/spreadsheet").Color>;
292
293
  foregroundColorTheme?: import("@rowsncolumns/spreadsheet").Maybe<import("@rowsncolumns/spreadsheet").ColorTheme>;
@@ -296,6 +297,7 @@ export declare class SheetCell<T extends CellData = CellData> {
296
297
  color?: import("@rowsncolumns/spreadsheet").Maybe<string>;
297
298
  iconSet?: import("@rowsncolumns/spreadsheet").Maybe<string>;
298
299
  iconId?: import("@rowsncolumns/spreadsheet").Maybe<number>;
300
+ hideValue?: boolean;
299
301
  }>;
300
302
  conditionalDataBar?: import("@rowsncolumns/spreadsheet").Maybe<{
301
303
  color: string;
@@ -303,6 +305,12 @@ export declare class SheetCell<T extends CellData = CellData> {
303
305
  negative?: boolean;
304
306
  borderColor?: string;
305
307
  direction?: "leftToRight" | "rightToLeft";
308
+ barStart?: number;
309
+ barEnd?: number;
310
+ gradient?: boolean;
311
+ axisPosition?: number;
312
+ axisColor?: string;
313
+ hideValue?: boolean;
306
314
  }>;
307
315
  } | {
308
316
  styleId: string;