@rowsncolumns/spreadsheet-state 29.1.19 → 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.
- package/dist/cjs/api/border.d.ts +1 -1
- package/dist/cjs/api/border.d.ts.map +1 -1
- package/dist/cjs/api/goal-seek.d.ts +44 -2
- package/dist/cjs/api/goal-seek.d.ts.map +1 -1
- package/dist/cjs/api/goal-seek.js +219 -1
- package/dist/cjs/commands.d.ts +50 -3
- package/dist/cjs/commands.d.ts.map +1 -1
- package/dist/cjs/components/editors/cell-format/alignment-tab.d.ts +27 -0
- package/dist/cjs/components/editors/cell-format/alignment-tab.d.ts.map +1 -0
- package/dist/cjs/components/editors/cell-format/alignment-tab.js +83 -0
- package/dist/cjs/components/editors/cell-format/border-edges.d.ts +42 -0
- package/dist/cjs/components/editors/cell-format/border-edges.d.ts.map +1 -0
- package/dist/cjs/components/editors/cell-format/border-edges.js +118 -0
- package/dist/cjs/components/editors/cell-format/border-tab.d.ts +21 -0
- package/dist/cjs/components/editors/cell-format/border-tab.d.ts.map +1 -0
- package/dist/cjs/components/editors/cell-format/border-tab.js +123 -0
- package/dist/cjs/components/editors/cell-format/fill-tab.d.ts +14 -0
- package/dist/cjs/components/editors/cell-format/fill-tab.d.ts.map +1 -0
- package/dist/cjs/components/editors/cell-format/fill-tab.js +54 -0
- package/dist/cjs/components/editors/cell-format/font-tab.d.ts +18 -0
- package/dist/cjs/components/editors/cell-format/font-tab.d.ts.map +1 -0
- package/dist/cjs/components/editors/cell-format/font-tab.js +99 -0
- package/dist/cjs/components/editors/cell-format/list-box.d.ts +35 -0
- package/dist/cjs/components/editors/cell-format/list-box.d.ts.map +1 -0
- package/dist/cjs/components/editors/cell-format/list-box.js +37 -0
- package/dist/cjs/components/editors/cell-format/number-formats.d.ts +90 -0
- package/dist/cjs/components/editors/cell-format/number-formats.d.ts.map +1 -0
- package/dist/cjs/components/editors/cell-format/number-formats.js +403 -0
- package/dist/cjs/components/editors/cell-format/number-tab.d.ts +12 -0
- package/dist/cjs/components/editors/cell-format/number-tab.d.ts.map +1 -0
- package/dist/cjs/components/editors/cell-format/number-tab.js +194 -0
- package/dist/cjs/components/editors/cell-format/protection-tab.d.ts +13 -0
- package/dist/cjs/components/editors/cell-format/protection-tab.d.ts.map +1 -0
- package/dist/cjs/components/editors/cell-format/protection-tab.js +13 -0
- package/dist/cjs/components/editors/cell-format-editor.d.ts +31 -3
- package/dist/cjs/components/editors/cell-format-editor.d.ts.map +1 -1
- package/dist/cjs/components/editors/cell-format-editor.js +182 -636
- package/dist/cjs/components/editors/conditional-format-data-bar-options.d.ts +16 -0
- package/dist/cjs/components/editors/conditional-format-data-bar-options.d.ts.map +1 -0
- package/dist/cjs/components/editors/conditional-format-data-bar-options.js +166 -0
- package/dist/cjs/components/editors/conditional-format-editor.d.ts +7 -1
- package/dist/cjs/components/editors/conditional-format-editor.d.ts.map +1 -1
- package/dist/cjs/components/editors/conditional-format-editor.js +51 -9
- package/dist/cjs/components/editors/conditional-format-icon-set-options.d.ts +17 -0
- package/dist/cjs/components/editors/conditional-format-icon-set-options.d.ts.map +1 -0
- package/dist/cjs/components/editors/conditional-format-icon-set-options.js +163 -0
- package/dist/cjs/components/editors/conditional-format-rule-editor.d.ts +9 -0
- package/dist/cjs/components/editors/conditional-format-rule-editor.d.ts.map +1 -1
- package/dist/cjs/components/editors/conditional-format-rule-editor.js +97 -125
- package/dist/cjs/components/editors/sheet-filter.d.ts +20 -9
- package/dist/cjs/components/editors/sheet-filter.d.ts.map +1 -1
- package/dist/cjs/components/editors/sheet-filter.js +44 -12
- package/dist/cjs/hooks/use-conditional-formatting-rules.d.ts +2 -0
- package/dist/cjs/hooks/use-conditional-formatting-rules.d.ts.map +1 -1
- package/dist/cjs/hooks/use-conditional-formatting-rules.js +22 -1
- package/dist/cjs/hooks/use-on-goal-seek.d.ts +9 -1
- package/dist/cjs/hooks/use-on-goal-seek.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-goal-seek.js +43 -11
- package/dist/cjs/hooks/use-spreadsheet-state.d.ts +3 -1
- package/dist/cjs/hooks/use-spreadsheet-state.d.ts.map +1 -1
- package/dist/cjs/hooks/use-spreadsheet-state.js +5 -2
- package/dist/cjs/interface/change-border.d.ts.map +1 -1
- package/dist/cjs/interface/change-border.js +8 -1
- package/dist/cjs/interface/conditional-formatting-rules.d.ts +11 -1
- package/dist/cjs/interface/conditional-formatting-rules.d.ts.map +1 -1
- package/dist/cjs/interface/conditional-formatting-rules.js +44 -1
- package/dist/cjs/sheet-cell.d.ts +10 -0
- package/dist/cjs/sheet-cell.d.ts.map +1 -1
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/api/border.d.ts +1 -1
- package/dist/esm/api/border.d.ts.map +1 -1
- package/dist/esm/api/goal-seek.d.ts +44 -2
- package/dist/esm/api/goal-seek.d.ts.map +1 -1
- package/dist/esm/api/goal-seek.js +136 -0
- package/dist/esm/commands.d.ts +50 -3
- package/dist/esm/commands.d.ts.map +1 -1
- package/dist/esm/components/editors/cell-format/alignment-tab.d.ts +27 -0
- package/dist/esm/components/editors/cell-format/alignment-tab.d.ts.map +1 -0
- package/dist/esm/components/editors/cell-format/alignment-tab.js +81 -0
- package/dist/esm/components/editors/cell-format/border-edges.d.ts +42 -0
- package/dist/esm/components/editors/cell-format/border-edges.d.ts.map +1 -0
- package/dist/esm/components/editors/cell-format/border-edges.js +79 -0
- package/dist/esm/components/editors/cell-format/border-tab.d.ts +21 -0
- package/dist/esm/components/editors/cell-format/border-tab.d.ts.map +1 -0
- package/dist/esm/components/editors/cell-format/border-tab.js +103 -0
- package/dist/esm/components/editors/cell-format/fill-tab.d.ts +14 -0
- package/dist/esm/components/editors/cell-format/fill-tab.d.ts.map +1 -0
- package/dist/esm/components/editors/cell-format/fill-tab.js +49 -0
- package/dist/esm/components/editors/cell-format/font-tab.d.ts +18 -0
- package/dist/esm/components/editors/cell-format/font-tab.d.ts.map +1 -0
- package/dist/esm/components/editors/cell-format/font-tab.js +88 -0
- package/dist/esm/components/editors/cell-format/list-box.d.ts +35 -0
- package/dist/esm/components/editors/cell-format/list-box.d.ts.map +1 -0
- package/dist/esm/components/editors/cell-format/list-box.js +30 -0
- package/dist/esm/components/editors/cell-format/number-formats.d.ts +90 -0
- package/dist/esm/components/editors/cell-format/number-formats.d.ts.map +1 -0
- package/dist/esm/components/editors/cell-format/number-formats.js +383 -0
- package/dist/esm/components/editors/cell-format/number-tab.d.ts +12 -0
- package/dist/esm/components/editors/cell-format/number-tab.d.ts.map +1 -0
- package/dist/esm/components/editors/cell-format/number-tab.js +165 -0
- package/dist/esm/components/editors/cell-format/protection-tab.d.ts +13 -0
- package/dist/esm/components/editors/cell-format/protection-tab.d.ts.map +1 -0
- package/dist/esm/components/editors/cell-format/protection-tab.js +9 -0
- package/dist/esm/components/editors/cell-format-editor.d.ts +31 -3
- package/dist/esm/components/editors/cell-format-editor.d.ts.map +1 -1
- package/dist/esm/components/editors/cell-format-editor.js +148 -615
- package/dist/esm/components/editors/conditional-format-data-bar-options.d.ts +16 -0
- package/dist/esm/components/editors/conditional-format-data-bar-options.d.ts.map +1 -0
- package/dist/esm/components/editors/conditional-format-data-bar-options.js +145 -0
- package/dist/esm/components/editors/conditional-format-editor.d.ts +7 -1
- package/dist/esm/components/editors/conditional-format-editor.d.ts.map +1 -1
- package/dist/esm/components/editors/conditional-format-editor.js +39 -8
- package/dist/esm/components/editors/conditional-format-icon-set-options.d.ts +17 -0
- package/dist/esm/components/editors/conditional-format-icon-set-options.d.ts.map +1 -0
- package/dist/esm/components/editors/conditional-format-icon-set-options.js +139 -0
- package/dist/esm/components/editors/conditional-format-rule-editor.d.ts +9 -0
- package/dist/esm/components/editors/conditional-format-rule-editor.d.ts.map +1 -1
- package/dist/esm/components/editors/conditional-format-rule-editor.js +60 -85
- package/dist/esm/components/editors/sheet-filter.d.ts +20 -9
- package/dist/esm/components/editors/sheet-filter.d.ts.map +1 -1
- package/dist/esm/components/editors/sheet-filter.js +31 -11
- package/dist/esm/hooks/use-conditional-formatting-rules.d.ts +2 -0
- package/dist/esm/hooks/use-conditional-formatting-rules.d.ts.map +1 -1
- package/dist/esm/hooks/use-conditional-formatting-rules.js +19 -1
- package/dist/esm/hooks/use-on-goal-seek.d.ts +9 -1
- package/dist/esm/hooks/use-on-goal-seek.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-goal-seek.js +40 -4
- package/dist/esm/hooks/use-spreadsheet-state.d.ts +3 -1
- package/dist/esm/hooks/use-spreadsheet-state.d.ts.map +1 -1
- package/dist/esm/hooks/use-spreadsheet-state.js +5 -2
- package/dist/esm/interface/change-border.d.ts.map +1 -1
- package/dist/esm/interface/change-border.js +8 -1
- package/dist/esm/interface/conditional-formatting-rules.d.ts +11 -1
- package/dist/esm/interface/conditional-formatting-rules.d.ts.map +1 -1
- package/dist/esm/interface/conditional-formatting-rules.js +29 -1
- package/dist/esm/sheet-cell.d.ts +10 -0
- package/dist/esm/sheet-cell.d.ts.map +1 -1
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- 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,
|
|
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(
|
|
542
|
-
|
|
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",
|
|
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
|
|
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,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|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
|
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 === "
|
|
89
|
-
onValueChange(next === "all"
|
|
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"
|
|
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;
|
|
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
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CellInterface } from "@rowsncolumns/common-types";
|
|
2
|
+
import type { GoalSeekTargetOptions } from "@rowsncolumns/spreadsheet";
|
|
2
3
|
import { type GoalSeekResult } from "../api/goal-seek";
|
|
3
4
|
import type { useCalculation } from "./use-calculation";
|
|
4
5
|
import type { useOnChange } from "./use-on-change";
|
|
@@ -11,6 +12,8 @@ export type UseOnGoalSeekProps = {
|
|
|
11
12
|
onRequestCalculate: ReturnType<typeof useCalculation>["onRequestCalculate"];
|
|
12
13
|
getDependents: ReturnType<typeof useCalculation>["getDependents"];
|
|
13
14
|
onChange: ReturnType<typeof useOnChange>;
|
|
15
|
+
/** The changing cell's number format sets the grid a rounded search snaps to. */
|
|
16
|
+
getEffectiveFormat?: ReturnType<typeof useSheetProperties>["getEffectiveFormat"];
|
|
14
17
|
};
|
|
15
18
|
/**
|
|
16
19
|
* Excel's Goal Seek (Data → What-If Analysis): find the value of
|
|
@@ -25,6 +28,11 @@ export type UseOnGoalSeekProps = {
|
|
|
25
28
|
* Resolves to `undefined` when the set cell holds no formula or the changing
|
|
26
29
|
* cell is protected; otherwise the {@link GoalSeekResult} — Excel reports
|
|
27
30
|
* "found a solution" / "may not have found a solution" from `status`.
|
|
31
|
+
*
|
|
32
|
+
* With `options` asking for a one-sided target or a round answer, the search
|
|
33
|
+
* continues from the exact solution to up to three candidates
|
|
34
|
+
* (`goalSeekCandidates`) and nothing is committed: the caller writes the one
|
|
35
|
+
* the user picks.
|
|
28
36
|
*/
|
|
29
|
-
export declare const useOnGoalSeek: ({ getFormulaValue, getEffectiveValue, onRequestCalculate, getDependents, onChange, }: UseOnGoalSeekProps) => (sheetId: number, setCell: CellInterface, targetValue: number, changingCell: CellInterface) => Promise<GoalSeekResult | undefined>;
|
|
37
|
+
export declare const useOnGoalSeek: ({ getFormulaValue, getEffectiveValue, onRequestCalculate, getDependents, onChange, getEffectiveFormat, }: UseOnGoalSeekProps) => (sheetId: number, setCell: CellInterface, targetValue: number, changingCell: CellInterface, options?: GoalSeekTargetOptions) => Promise<GoalSeekResult | undefined>;
|
|
30
38
|
//# sourceMappingURL=use-on-goal-seek.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-on-goal-seek.d.ts","sourceRoot":"","sources":["../../../hooks/use-on-goal-seek.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"use-on-goal-seek.d.ts","sourceRoot":"","sources":["../../../hooks/use-on-goal-seek.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAIvE,OAAO,EAGL,KAAK,cAAc,EAEpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAGV,cAAc,EACf,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,MAAM,MAAM,kBAAkB,GAAG;IAC/B,eAAe,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,iBAAiB,CAAC,CAAC;IAC1E,iBAAiB,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,mBAAmB,CAAC,CAAC;IAC9E,iEAAiE;IACjE,kBAAkB,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,oBAAoB,CAAC,CAAC;IAC5E,aAAa,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,eAAe,CAAC,CAAC;IAClE,QAAQ,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;IACzC,iFAAiF;IACjF,kBAAkB,CAAC,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,oBAAoB,CAAC,CAAC;CAClF,CAAC;AAUF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,aAAa,GAAI,0GAO3B,kBAAkB,eAKN,MAAM,WACN,aAAa,eACT,MAAM,gBACL,aAAa,YACjB,qBAAqB,KAC9B,OAAO,CAAC,cAAc,GAAG,SAAS,CAkGxC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isCellNode, makeKey } from "@rowsncolumns/dag";
|
|
2
2
|
import { useCallback } from "react";
|
|
3
|
-
import { goalSeek } from "../api/goal-seek";
|
|
3
|
+
import { goalSeek, goalSeekCandidates, numberFormatStep, } from "../api/goal-seek";
|
|
4
4
|
import { useCanEditCellRange } from "./use-can-edit-cellrange";
|
|
5
5
|
/** Cap on the formula chain re-evaluated per trial (a runaway dependency fan-out). */
|
|
6
6
|
const MAX_AFFECTED_CELLS = 2000;
|
|
@@ -20,10 +20,15 @@ const sameCell = (a, sheetId, b) => (a.sheetId ?? sheetId) === sheetId &&
|
|
|
20
20
|
* Resolves to `undefined` when the set cell holds no formula or the changing
|
|
21
21
|
* cell is protected; otherwise the {@link GoalSeekResult} — Excel reports
|
|
22
22
|
* "found a solution" / "may not have found a solution" from `status`.
|
|
23
|
+
*
|
|
24
|
+
* With `options` asking for a one-sided target or a round answer, the search
|
|
25
|
+
* continues from the exact solution to up to three candidates
|
|
26
|
+
* (`goalSeekCandidates`) and nothing is committed: the caller writes the one
|
|
27
|
+
* the user picks.
|
|
23
28
|
*/
|
|
24
|
-
export const useOnGoalSeek = ({ getFormulaValue, getEffectiveValue, onRequestCalculate, getDependents, onChange, }) => {
|
|
29
|
+
export const useOnGoalSeek = ({ getFormulaValue, getEffectiveValue, onRequestCalculate, getDependents, onChange, getEffectiveFormat, }) => {
|
|
25
30
|
const canEditCellRange = useCanEditCellRange();
|
|
26
|
-
return useCallback(async (sheetId, setCell, targetValue, changingCell) => {
|
|
31
|
+
return useCallback(async (sheetId, setCell, targetValue, changingCell, options) => {
|
|
27
32
|
if (!Number.isFinite(targetValue))
|
|
28
33
|
return undefined;
|
|
29
34
|
if (!canEditCellRange(sheetId, changingCell)) {
|
|
@@ -76,7 +81,38 @@ export const useOnGoalSeek = ({ getFormulaValue, getEffectiveValue, onRequestCal
|
|
|
76
81
|
? Number(current)
|
|
77
82
|
: 0;
|
|
78
83
|
const result = await goalSeek({ evaluate, targetValue, initialValue });
|
|
84
|
+
const mode = options?.mode ?? "exact";
|
|
85
|
+
const round = options?.round === true;
|
|
86
|
+
if (round || mode !== "exact") {
|
|
87
|
+
const pattern = getEffectiveFormat?.(sheetId, changingCell.rowIndex, changingCell.columnIndex)?.numberFormat?.pattern;
|
|
88
|
+
const { candidates, trials } = await goalSeekCandidates({
|
|
89
|
+
evaluate,
|
|
90
|
+
exact: result.value,
|
|
91
|
+
targetValue,
|
|
92
|
+
mode,
|
|
93
|
+
round,
|
|
94
|
+
tolerance: options?.tolerance,
|
|
95
|
+
displayStep: pattern ? numberFormatStep(pattern) : undefined,
|
|
96
|
+
});
|
|
97
|
+
const [first] = candidates;
|
|
98
|
+
return {
|
|
99
|
+
...result,
|
|
100
|
+
status: first ? "found" : "not-found",
|
|
101
|
+
value: first?.value ?? result.value,
|
|
102
|
+
currentValue: first?.currentValue ?? result.currentValue,
|
|
103
|
+
iterations: result.iterations + trials,
|
|
104
|
+
candidates,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
79
107
|
onChange(sheetId, changingCell, String(result.value), undefined);
|
|
80
108
|
return result;
|
|
81
|
-
}, [
|
|
109
|
+
}, [
|
|
110
|
+
canEditCellRange,
|
|
111
|
+
getFormulaValue,
|
|
112
|
+
getEffectiveValue,
|
|
113
|
+
onRequestCalculate,
|
|
114
|
+
getDependents,
|
|
115
|
+
onChange,
|
|
116
|
+
getEffectiveFormat,
|
|
117
|
+
]);
|
|
82
118
|
};
|
|
@@ -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;
|
|
@@ -684,7 +686,7 @@ export declare const useSpreadsheetState: <T extends CellData = CellData, S exte
|
|
|
684
686
|
getErrorValue: (sheetId: number, rowIndex: number, columnIndex: number) => any;
|
|
685
687
|
onSplitTextToColumns: (sheetId: number, activeCell: CellInterface, selections?: SelectionArea<SelectionAttributes>[], delimiter?: string, options?: import("@rowsncolumns/spreadsheet").SplitTextOptions) => void;
|
|
686
688
|
onRemoveDuplicates: (sheetId: number, activeCell: CellInterface, selections?: SelectionArea<SelectionAttributes>[], options?: import("@rowsncolumns/spreadsheet").RemoveDuplicatesOptions) => import("../interface/remove-duplicates").RemoveDuplicatesResult | undefined;
|
|
687
|
-
onGoalSeek: (sheetId: number, setCell: CellInterface, targetValue: number, changingCell: CellInterface) => Promise<import("@rowsncolumns/spreadsheet").GoalSeekResult | undefined>;
|
|
689
|
+
onGoalSeek: (sheetId: number, setCell: CellInterface, targetValue: number, changingCell: CellInterface, options?: import("@rowsncolumns/spreadsheet").GoalSeekTargetOptions) => Promise<import("@rowsncolumns/spreadsheet").GoalSeekResult | undefined>;
|
|
688
690
|
onSubtotal: (sheetId: number, options: import("@rowsncolumns/spreadsheet").SubtotalOptions) => import("./use-on-subtotal").SubtotalPlan | undefined;
|
|
689
691
|
onAdvancedFilter: (sheetId: number, options: import("@rowsncolumns/spreadsheet").AdvancedFilterOptions) => import("./use-on-advanced-filter").AdvancedFilterPlan | undefined;
|
|
690
692
|
onRequestAddRows: (sheetId: number, additionalRowCount: number) => S | undefined;
|
|
@@ -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,kBAA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C,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,KACE,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC5B;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CACzC,CAAC;AAOF;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,GACpC,OAAO,SAAS,KACf,gBAAgB,GAAG,SAkDrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAC5B,OAAO,SAAS,EAChB,SAAS,iBAAiB,KACzB,SAID,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAC9B,CAAC,SAAS,QAAQ,GAAG,QAAQ,EAC7B,CAAC,SAAS,KAAK,GAAG,KAAK,EACvB,61CAqJC,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC;;
|
|
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,qB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|
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,
|
|
@@ -2152,6 +2152,7 @@ sanitizeHtml, }) => {
|
|
|
2152
2152
|
onRequestCalculate: onRequestCalculateWithoutFormatting,
|
|
2153
2153
|
getDependents,
|
|
2154
2154
|
onChange,
|
|
2155
|
+
getEffectiveFormat,
|
|
2155
2156
|
});
|
|
2156
2157
|
// Data → Subtotal (outline of SUBTOTAL rows) over the row/write/group callbacks
|
|
2157
2158
|
const onSubtotal = useOnSubtotal({
|
|
@@ -2205,6 +2206,7 @@ sanitizeHtml, }) => {
|
|
|
2205
2206
|
selections,
|
|
2206
2207
|
showGridLines,
|
|
2207
2208
|
showRowColHeaders,
|
|
2209
|
+
showZeros,
|
|
2208
2210
|
zoomScale,
|
|
2209
2211
|
rowCount,
|
|
2210
2212
|
columnCount,
|
|
@@ -2395,6 +2397,7 @@ sanitizeHtml, }) => {
|
|
|
2395
2397
|
onCreateConditionalFormattingRule,
|
|
2396
2398
|
onUpdateConditionalFormattingRule,
|
|
2397
2399
|
onDeleteConditionalFormattingRule,
|
|
2400
|
+
onReorderConditionalFormattingRules,
|
|
2398
2401
|
onPreviewConditionalFormattingRule,
|
|
2399
2402
|
onRequestDataValidation,
|
|
2400
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,WAA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