@rowsncolumns/spreadsheet 10.19.4 → 10.19.5
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/entry-selections.d.ts +6 -0
- package/dist/cjs/api/entry-selections.d.ts.map +1 -1
- package/dist/cjs/api/entry-selections.js +11 -1
- package/dist/cjs/atoms/cell-input-context.atom.d.ts.map +1 -1
- package/dist/cjs/components/advanced-filter-dialog/index.d.ts.map +1 -1
- package/dist/cjs/components/advanced-filter-dialog/index.js +6 -6
- package/dist/cjs/components/calculation-options-dialog/index.d.ts.map +1 -1
- package/dist/cjs/components/calculation-options-dialog/index.js +3 -3
- package/dist/cjs/components/canvas-grid/index.d.ts.map +1 -1
- package/dist/cjs/components/canvas-grid/index.js +65 -17
- package/dist/cjs/components/canvas-grid/typings.d.ts +12 -0
- package/dist/cjs/components/canvas-grid/typings.d.ts.map +1 -1
- package/dist/cjs/components/cell-input/formula-bar-cell-input.d.ts.map +1 -1
- package/dist/cjs/components/cell-input/formula-bar-cell-input.js +8 -2
- package/dist/cjs/components/consolidate-dialog/index.d.ts.map +1 -1
- package/dist/cjs/components/consolidate-dialog/index.js +12 -8
- package/dist/cjs/components/data-table-dialog/index.d.ts.map +1 -1
- package/dist/cjs/components/data-table-dialog/index.js +2 -2
- package/dist/cjs/components/evaluate-formula-dialog/index.d.ts.map +1 -1
- package/dist/cjs/components/evaluate-formula-dialog/index.js +9 -3
- package/dist/cjs/components/fill-series-dialog/index.d.ts.map +1 -1
- package/dist/cjs/components/fill-series-dialog/index.js +22 -6
- package/dist/cjs/components/forecast-sheet-dialog/index.d.ts.map +1 -1
- package/dist/cjs/components/forecast-sheet-dialog/index.js +4 -4
- package/dist/cjs/components/go-to-dialog/index.d.ts.map +1 -1
- package/dist/cjs/components/go-to-dialog/index.js +19 -6
- package/dist/cjs/components/goal-seek-dialog/index.d.ts.map +1 -1
- package/dist/cjs/components/goal-seek-dialog/index.js +5 -5
- package/dist/cjs/components/insert-cells-dialog/index.d.ts.map +1 -1
- package/dist/cjs/components/insert-cells-dialog/index.js +9 -9
- package/dist/cjs/components/move-chart-dialog/index.d.ts.map +1 -1
- package/dist/cjs/components/move-chart-dialog/index.js +4 -2
- package/dist/cjs/components/outline-settings-dialog/index.d.ts.map +1 -1
- package/dist/cjs/components/outline-settings-dialog/index.js +7 -5
- package/dist/cjs/components/paste-special-dialog/index.d.ts.map +1 -1
- package/dist/cjs/components/paste-special-dialog/index.js +22 -20
- package/dist/cjs/components/protect-sheet-dialog/index.d.ts.map +1 -1
- package/dist/cjs/components/protect-sheet-dialog/index.js +4 -3
- package/dist/cjs/components/remove-duplicates-dialog/index.d.ts.map +1 -1
- package/dist/cjs/components/remove-duplicates-dialog/index.js +5 -3
- package/dist/cjs/components/scenario-manager-dialog/index.d.ts.map +1 -1
- package/dist/cjs/components/scenario-manager-dialog/index.js +16 -11
- package/dist/cjs/components/solver-dialog/index.d.ts.map +1 -1
- package/dist/cjs/components/solver-dialog/index.js +12 -10
- package/dist/cjs/components/sort-range-dialog/index.d.ts.map +1 -1
- package/dist/cjs/components/sort-range-dialog/index.js +13 -9
- package/dist/cjs/components/sparkline-dialog/index.d.ts.map +1 -1
- package/dist/cjs/components/sparkline-dialog/index.js +4 -2
- package/dist/cjs/components/subtotal-dialog/index.d.ts.map +1 -1
- package/dist/cjs/components/subtotal-dialog/index.js +6 -5
- package/dist/cjs/components/text-to-columns-dialog/index.d.ts.map +1 -1
- package/dist/cjs/components/text-to-columns-dialog/index.js +5 -4
- package/dist/cjs/hooks/use-editable.d.ts +7 -1
- package/dist/cjs/hooks/use-editable.d.ts.map +1 -1
- package/dist/cjs/hooks/use-editable.js +72 -8
- package/dist/cjs/hooks/use-editor-submit.d.ts +6 -1
- package/dist/cjs/hooks/use-editor-submit.d.ts.map +1 -1
- package/dist/cjs/hooks/use-editor-submit.js +14 -6
- package/dist/cjs/hooks/use-selection.d.ts.map +1 -1
- package/dist/cjs/hooks/use-selection.js +2 -2
- package/dist/cjs/release-date.js +1 -1
- package/dist/esm/api/entry-selections.d.ts +6 -0
- package/dist/esm/api/entry-selections.d.ts.map +1 -1
- package/dist/esm/api/entry-selections.js +10 -0
- package/dist/esm/atoms/cell-input-context.atom.d.ts.map +1 -1
- package/dist/esm/components/advanced-filter-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/advanced-filter-dialog/index.js +7 -7
- package/dist/esm/components/calculation-options-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/calculation-options-dialog/index.js +4 -4
- package/dist/esm/components/canvas-grid/index.d.ts.map +1 -1
- package/dist/esm/components/canvas-grid/index.js +64 -17
- package/dist/esm/components/canvas-grid/typings.d.ts +12 -0
- package/dist/esm/components/canvas-grid/typings.d.ts.map +1 -1
- package/dist/esm/components/cell-input/formula-bar-cell-input.d.ts.map +1 -1
- package/dist/esm/components/cell-input/formula-bar-cell-input.js +9 -3
- package/dist/esm/components/consolidate-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/consolidate-dialog/index.js +13 -9
- package/dist/esm/components/data-table-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/data-table-dialog/index.js +3 -3
- package/dist/esm/components/evaluate-formula-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/evaluate-formula-dialog/index.js +7 -3
- package/dist/esm/components/fill-series-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/fill-series-dialog/index.js +23 -7
- package/dist/esm/components/forecast-sheet-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/forecast-sheet-dialog/index.js +5 -5
- package/dist/esm/components/go-to-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/go-to-dialog/index.js +20 -7
- package/dist/esm/components/goal-seek-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/goal-seek-dialog/index.js +6 -6
- package/dist/esm/components/insert-cells-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/insert-cells-dialog/index.js +10 -10
- package/dist/esm/components/move-chart-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/move-chart-dialog/index.js +5 -3
- package/dist/esm/components/outline-settings-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/outline-settings-dialog/index.js +8 -6
- package/dist/esm/components/paste-special-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/paste-special-dialog/index.js +23 -21
- package/dist/esm/components/protect-sheet-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/protect-sheet-dialog/index.js +5 -4
- package/dist/esm/components/remove-duplicates-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/remove-duplicates-dialog/index.js +6 -4
- package/dist/esm/components/scenario-manager-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/scenario-manager-dialog/index.js +17 -12
- package/dist/esm/components/solver-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/solver-dialog/index.js +13 -11
- package/dist/esm/components/sort-range-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/sort-range-dialog/index.js +14 -10
- package/dist/esm/components/sparkline-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/sparkline-dialog/index.js +5 -3
- package/dist/esm/components/subtotal-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/subtotal-dialog/index.js +7 -6
- package/dist/esm/components/text-to-columns-dialog/index.d.ts.map +1 -1
- package/dist/esm/components/text-to-columns-dialog/index.js +6 -5
- package/dist/esm/hooks/use-editable.d.ts +7 -1
- package/dist/esm/hooks/use-editable.d.ts.map +1 -1
- package/dist/esm/hooks/use-editable.js +69 -5
- package/dist/esm/hooks/use-editor-submit.d.ts +6 -1
- package/dist/esm/hooks/use-editor-submit.d.ts.map +1 -1
- package/dist/esm/hooks/use-editor-submit.js +14 -4
- package/dist/esm/hooks/use-selection.d.ts.map +1 -1
- package/dist/esm/hooks/use-selection.js +2 -2
- package/dist/esm/release-date.js +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Cross1Icon } from "@rowsncolumns/icons";
|
|
2
|
-
import { Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogDescription, DialogTitle, Separator, } from "@rowsncolumns/ui";
|
|
2
|
+
import { AccessKeyLabel, Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogDescription, DialogTitle, Separator, } from "@rowsncolumns/ui";
|
|
3
3
|
import React, { memo, useCallback, useEffect, useMemo, useState } from "react";
|
|
4
4
|
import { useRegisterRemoveDuplicatesDialogHost, useRemoveDuplicatesDialogState, } from "../../atoms/remove-duplicates-dialog.atom";
|
|
5
5
|
/**
|
|
@@ -47,10 +47,12 @@ export const RemoveDuplicatesDialog = memo(({ open, onOpenChange, columns, initi
|
|
|
47
47
|
React.createElement(DialogBody, { className: "flex flex-col gap-3" },
|
|
48
48
|
React.createElement("label", { className: "font-system text-sm flex items-center gap-1" },
|
|
49
49
|
React.createElement("input", { type: "checkbox", name: "hasHeader", checked: hasHeader, onChange: (e) => setHasHeader(e.target.checked) }),
|
|
50
|
-
"My data has headers"),
|
|
50
|
+
React.createElement(AccessKeyLabel, { accessKey: "m" }, "My data has headers")),
|
|
51
51
|
React.createElement("div", { className: "flex gap-2" },
|
|
52
|
-
React.createElement(Button, { variant: "outline", size: "xs", type: "button", onClick: () => setChecked(new Set(allColumnIndexes)) },
|
|
53
|
-
|
|
52
|
+
React.createElement(Button, { variant: "outline", size: "xs", type: "button", onClick: () => setChecked(new Set(allColumnIndexes)) },
|
|
53
|
+
React.createElement(AccessKeyLabel, { accessKey: "a" }, "Select all")),
|
|
54
|
+
React.createElement(Button, { variant: "outline", size: "xs", type: "button", onClick: () => setChecked(new Set()) },
|
|
55
|
+
React.createElement(AccessKeyLabel, { accessKey: "u" }, "Unselect all"))),
|
|
54
56
|
React.createElement("div", { className: "flex flex-col gap-1 max-h-[240px] overflow-y-auto border border-rnc-border rounded p-2", role: "group", "aria-label": "Columns" }, columns.map((column) => {
|
|
55
57
|
const text = hasHeader && column.header ? column.header : column.label;
|
|
56
58
|
return (React.createElement("label", { key: column.columnIndex, className: "font-system text-sm flex items-center gap-1" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/scenario-manager-dialog/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/scenario-manager-dialog/index.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,qFAAqF;AACrF,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAClE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,kDAAkD;AAClD,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAE9C,KAAK,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAElC,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,oCAAoC;IACpC,SAAS,EAAE,uBAAuB,EAAE,CAAC;IACrC,yEAAyE;IACzE,oBAAoB,EAAE,MAAM,CAAC;IAC7B,uEAAuE;IACvE,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5D,0EAA0E;IAC1E,KAAK,CAAC,QAAQ,EAAE,uBAAuB,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IACrE,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,uBAAuB,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IACtF,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IACnD,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IACjD,SAAS,CAAC,WAAW,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;CACjG,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,GACxB,MAAM,MAAM,KACX;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,IA2BhD,CAAC;AAWF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,mJAY7B,0BAA0B,uBAqS9B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Cross1Icon } from "@rowsncolumns/icons";
|
|
2
|
-
import { Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogDescription, DialogTitle, Input, Separator, } from "@rowsncolumns/ui";
|
|
2
|
+
import { AccessKeyLabel, Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogDescription, DialogTitle, Input, Separator, } from "@rowsncolumns/ui";
|
|
3
3
|
import { addressToCell, cellToAddress } from "@rowsncolumns/utils";
|
|
4
4
|
import React, { memo, useCallback, useEffect, useState } from "react";
|
|
5
5
|
/** Excel's cap on changing cells per scenario. */
|
|
@@ -166,31 +166,36 @@ export const ScenarioManagerDialog = memo(({ open, onOpenChange, scenarios, defa
|
|
|
166
166
|
error ? (React.createElement("div", { role: "alert", className: "text-xs text-rnc-destructive" }, error)) : null,
|
|
167
167
|
React.createElement(Separator, null),
|
|
168
168
|
React.createElement("div", { className: "flex flex-wrap justify-end gap-2" },
|
|
169
|
-
React.createElement(Button, { type: "button", size: "sm", variant: "outline", onClick: () => startEdit(undefined) },
|
|
170
|
-
|
|
171
|
-
React.createElement(Button, { type: "button", size: "sm", variant: "outline", disabled: !current, onClick: () =>
|
|
169
|
+
React.createElement(Button, { type: "button", size: "sm", variant: "outline", onClick: () => startEdit(undefined) },
|
|
170
|
+
React.createElement(AccessKeyLabel, { accessKey: "a" }, "Add\u2026")),
|
|
171
|
+
React.createElement(Button, { type: "button", size: "sm", variant: "outline", disabled: !current, onClick: () => current && void run(() => onDelete(current.name)) },
|
|
172
|
+
React.createElement(AccessKeyLabel, { accessKey: "d" }, "Delete")),
|
|
173
|
+
React.createElement(Button, { type: "button", size: "sm", variant: "outline", disabled: !current, onClick: () => startEdit(current) },
|
|
174
|
+
React.createElement(AccessKeyLabel, { accessKey: "e" }, "Edit\u2026")),
|
|
172
175
|
React.createElement(Button, { type: "button", size: "sm", variant: "outline", disabled: !current, onClick: () => {
|
|
173
176
|
setResultCells("");
|
|
174
177
|
setError(undefined);
|
|
175
178
|
setView({ kind: "summary" });
|
|
176
|
-
} },
|
|
177
|
-
|
|
179
|
+
} },
|
|
180
|
+
React.createElement(AccessKeyLabel, { accessKey: "u" }, "Summary\u2026")),
|
|
181
|
+
React.createElement(Button, { type: "button", size: "sm", disabled: !current, onClick: () => current && void run(() => onShow(current.name)) },
|
|
182
|
+
React.createElement(AccessKeyLabel, { accessKey: "s" }, "Show"))))) : null,
|
|
178
183
|
view.kind === "edit" ? (React.createElement("form", { className: "flex flex-col gap-3", onSubmit: toValues },
|
|
179
184
|
React.createElement("label", { className: "flex flex-col gap-1 text-xs font-medium" },
|
|
180
|
-
"Scenario name:",
|
|
185
|
+
React.createElement(AccessKeyLabel, { accessKey: "n" }, "Scenario name:"),
|
|
181
186
|
React.createElement(Input, { autoFocus: true, "aria-label": "Scenario name", value: name, onChange: (e) => setName(e.target.value) })),
|
|
182
187
|
React.createElement("label", { className: "flex flex-col gap-1 text-xs font-medium" },
|
|
183
|
-
"Changing cells:",
|
|
188
|
+
React.createElement(AccessKeyLabel, { accessKey: "c" }, "Changing cells:"),
|
|
184
189
|
React.createElement(Input, { "aria-label": "Changing cells", value: changing, onChange: (e) => setChanging(e.target.value) })),
|
|
185
190
|
React.createElement("label", { className: "flex flex-col gap-1 text-xs font-medium" },
|
|
186
|
-
"Comment:",
|
|
191
|
+
React.createElement(AccessKeyLabel, { accessKey: "o" }, "Comment:"),
|
|
187
192
|
React.createElement(Input, { "aria-label": "Comment", value: comment, onChange: (e) => setComment(e.target.value) })),
|
|
188
193
|
React.createElement("label", { className: "flex items-center gap-2 text-xs" },
|
|
189
194
|
React.createElement("input", { type: "checkbox", checked: locked, onChange: (e) => setLocked(e.target.checked) }),
|
|
190
|
-
"Prevent changes"),
|
|
195
|
+
React.createElement(AccessKeyLabel, { accessKey: "p" }, "Prevent changes")),
|
|
191
196
|
React.createElement("label", { className: "flex items-center gap-2 text-xs" },
|
|
192
197
|
React.createElement("input", { type: "checkbox", checked: hidden, onChange: (e) => setHidden(e.target.checked) }),
|
|
193
|
-
"Hide"),
|
|
198
|
+
React.createElement(AccessKeyLabel, { accessKey: "d" }, "Hide")),
|
|
194
199
|
footer("OK"))) : null,
|
|
195
200
|
view.kind === "values" ? (React.createElement("form", { className: "flex flex-col gap-2", onSubmit: saveValues },
|
|
196
201
|
React.createElement("p", { className: "text-xs" }, "Enter values for each of the changing cells."),
|
|
@@ -206,7 +211,7 @@ export const ScenarioManagerDialog = memo(({ open, onOpenChange, scenarios, defa
|
|
|
206
211
|
footer("OK"))) : null,
|
|
207
212
|
view.kind === "summary" ? (React.createElement("form", { className: "flex flex-col gap-3", onSubmit: summary },
|
|
208
213
|
React.createElement("label", { className: "flex flex-col gap-1 text-xs font-medium" },
|
|
209
|
-
"Result cells:",
|
|
214
|
+
React.createElement(AccessKeyLabel, { accessKey: "r" }, "Result cells:"),
|
|
210
215
|
React.createElement(Input, { autoFocus: true, "aria-label": "Result cells", value: resultCells, onChange: (e) => setResultCells(e.target.value) })),
|
|
211
216
|
footer("OK"))) : null))));
|
|
212
217
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/solver-dialog/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/solver-dialog/index.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,KAAK,KAAK,GAAG;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,CAAC;IAC5C,GAAG,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CACtB,CAAC;AAEF,+EAA+E;AAC/E,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IACrD,IAAI,EAAE,KAAK,GAAG,KAAK,GAAG,OAAO,CAAC;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,KAAK,EAAE,CAAC;IACvB,WAAW,EAAE,sBAAsB,EAAE,CAAC;IACtC,MAAM,EAAE,cAAc,GAAG,WAAW,CAAC;IACrC,iBAAiB,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,yEAAyE;AACzE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACpE,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,uDAAuD;IACvD,gBAAgB,EAAE,MAAM,CAAC;IACzB,+EAA+E;IAC/E,OAAO,CAAC,UAAU,EAAE,sBAAsB,GAAG,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC,CAAC;IACrF,0EAA0E;IAC1E,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAAC;CAC1C,CAAC;AAIF,+DAA+D;AAC/D,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,KAAG,KAAK,GAAG,IAYvD,CAAC;AAIF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,wFACqC,iBAAiB,uBAmR9E,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Cross1Icon } from "@rowsncolumns/icons";
|
|
2
|
-
import { Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogDescription, DialogTitle, Input, Separator, } from "@rowsncolumns/ui";
|
|
2
|
+
import { AccessKeyLabel, Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogDescription, DialogTitle, Input, Separator, } from "@rowsncolumns/ui";
|
|
3
3
|
import { addressToCell } from "@rowsncolumns/utils";
|
|
4
4
|
import React, { memo, useCallback, useEffect, useState } from "react";
|
|
5
5
|
const OPERATORS = ["<=", "=", ">=", "int", "bin"];
|
|
@@ -130,40 +130,42 @@ export const SolverDialog = memo(({ open, onOpenChange, initialObjective, onSolv
|
|
|
130
130
|
solved ? (React.createElement("div", { className: "flex flex-col gap-1 text-xs" },
|
|
131
131
|
React.createElement("label", { className: "flex items-center gap-2" },
|
|
132
132
|
React.createElement("input", { type: "radio", checked: keep, onChange: () => setKeep(true) }),
|
|
133
|
-
"Keep Solver Solution"),
|
|
133
|
+
React.createElement(AccessKeyLabel, { accessKey: "k" }, "Keep Solver Solution")),
|
|
134
134
|
React.createElement("label", { className: "flex items-center gap-2" },
|
|
135
135
|
React.createElement("input", { type: "radio", checked: !keep, onChange: () => setKeep(false) }),
|
|
136
|
-
"Restore Original Values"))) : null,
|
|
136
|
+
React.createElement(AccessKeyLabel, { accessKey: "o" }, "Restore Original Values")))) : null,
|
|
137
137
|
React.createElement(Separator, null),
|
|
138
138
|
React.createElement("div", { className: "flex justify-end gap-2" },
|
|
139
139
|
React.createElement(Button, { type: "button", size: "sm", variant: "outline", onClick: () => setResult(undefined) }, "Return to Solver Parameters"),
|
|
140
140
|
React.createElement(Button, { type: "button", size: "sm", onClick: () => (solved ? finish() : onOpenChange(false)) }, "OK")))) : (React.createElement("form", { className: "flex flex-col gap-3", onSubmit: solve },
|
|
141
141
|
React.createElement("label", { className: "flex flex-col gap-1 text-xs font-medium" },
|
|
142
|
-
"Set Objective:",
|
|
142
|
+
React.createElement(AccessKeyLabel, { accessKey: "t" }, "Set Objective:"),
|
|
143
143
|
React.createElement(Input, { autoFocus: true, "aria-label": "Set Objective", value: objective, onChange: (e) => setObjective(e.target.value) })),
|
|
144
144
|
React.createElement("div", { className: "flex items-center gap-3 text-xs" },
|
|
145
145
|
"To:",
|
|
146
146
|
["max", "min", "value"].map((g) => (React.createElement("label", { key: g, className: "flex items-center gap-1" },
|
|
147
147
|
React.createElement("input", { type: "radio", checked: goal === g, onChange: () => setGoal(g) }),
|
|
148
|
-
g === "max" ? "Max" : g === "min" ? "Min" : "Value Of:"))),
|
|
148
|
+
g === "max" ? (React.createElement(AccessKeyLabel, { accessKey: "m" }, "Max")) : g === "min" ? (React.createElement(AccessKeyLabel, { accessKey: "n" }, "Min")) : (React.createElement(AccessKeyLabel, { accessKey: "v" }, "Value Of:"))))),
|
|
149
149
|
React.createElement(Input, { className: "w-20", "aria-label": "Value Of", value: target, disabled: goal !== "value", onChange: (e) => setTarget(e.target.value) })),
|
|
150
150
|
React.createElement("label", { className: "flex flex-col gap-1 text-xs font-medium" },
|
|
151
|
-
"By Changing Variable Cells:",
|
|
151
|
+
React.createElement(AccessKeyLabel, { accessKey: "b" }, "By Changing Variable Cells:"),
|
|
152
152
|
React.createElement(Input, { "aria-label": "By Changing Variable Cells", value: changing, onChange: (e) => setChanging(e.target.value) })),
|
|
153
153
|
React.createElement("div", { className: "flex flex-col gap-1 text-xs font-medium" },
|
|
154
|
-
"Subject to the Constraints:",
|
|
154
|
+
React.createElement(AccessKeyLabel, { accessKey: "u" }, "Subject to the Constraints:"),
|
|
155
155
|
constraints.map((row, i) => (React.createElement("div", { key: i, className: "flex items-center gap-1" },
|
|
156
156
|
React.createElement(Input, { "aria-label": `Constraint ${i + 1} cell reference`, value: row.cells, onChange: (e) => setConstraints(constraints.map((r, k) => (k === i ? { ...r, cells: e.target.value } : r))) }),
|
|
157
157
|
React.createElement("select", { "aria-label": `Constraint ${i + 1} relation`, className: "h-8 rounded border border-rnc-border bg-transparent px-1 text-sm", value: row.operator, onChange: (e) => setConstraints(constraints.map((r, k) => k === i ? { ...r, operator: e.target.value } : r)) }, OPERATORS.map((op) => (React.createElement("option", { key: op, value: op }, op)))),
|
|
158
158
|
React.createElement(Input, { "aria-label": `Constraint ${i + 1} value`, value: row.operator === "int" ? "integer" : row.operator === "bin" ? "binary" : row.rhs, disabled: row.operator === "int" || row.operator === "bin", onChange: (e) => setConstraints(constraints.map((r, k) => (k === i ? { ...r, rhs: e.target.value } : r))) }),
|
|
159
|
-
React.createElement(Button, { type: "button", size: "sm", variant: "outline", "aria-label": `Delete constraint ${i + 1}`, onClick: () => setConstraints(constraints.filter((_, k) => k !== i)) },
|
|
159
|
+
React.createElement(Button, { type: "button", size: "sm", variant: "outline", "aria-label": `Delete constraint ${i + 1}`, onClick: () => setConstraints(constraints.filter((_, k) => k !== i)) },
|
|
160
|
+
React.createElement(AccessKeyLabel, { accessKey: "d" }, "Delete"))))),
|
|
160
161
|
React.createElement("div", null,
|
|
161
|
-
React.createElement(Button, { type: "button", size: "sm", variant: "outline", onClick: () => setConstraints([...constraints, { cells: "", operator: "<=", rhs: "" }]) },
|
|
162
|
+
React.createElement(Button, { type: "button", size: "sm", variant: "outline", onClick: () => setConstraints([...constraints, { cells: "", operator: "<=", rhs: "" }]) },
|
|
163
|
+
React.createElement(AccessKeyLabel, { accessKey: "a" }, "Add")))),
|
|
162
164
|
React.createElement("label", { className: "flex items-center gap-2 text-xs" },
|
|
163
165
|
React.createElement("input", { type: "checkbox", checked: nonNegative, onChange: (e) => setNonNegative(e.target.checked) }),
|
|
164
|
-
"Make Unconstrained Variables Non-Negative"),
|
|
166
|
+
React.createElement(AccessKeyLabel, { accessKey: "k" }, "Make Unconstrained Variables Non-Negative")),
|
|
165
167
|
React.createElement("label", { className: "flex items-center gap-2 text-xs font-medium" },
|
|
166
|
-
"Select a Solving Method:",
|
|
168
|
+
React.createElement(AccessKeyLabel, { accessKey: "e" }, "Select a Solving Method:"),
|
|
167
169
|
React.createElement("select", { "aria-label": "Select a Solving Method", className: "h-8 rounded border border-rnc-border bg-transparent px-2 text-sm", value: method, onChange: (e) => setMethod(e.target.value) },
|
|
168
170
|
React.createElement("option", { value: "grgNonlinear" }, "GRG Nonlinear"),
|
|
169
171
|
React.createElement("option", { value: "simplexLp" }, "Simplex LP"))),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/sort-range-dialog/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/sort-range-dialog/index.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAA0D,MAAM,OAAO,CAAC;AAI/E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,EAAa,SAAS,EAAE,MAAM,aAAa,CAAC;AAQxD;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,kFAAkF;IAClF,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE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EAClD,WAAW,OAAO,KACjB,MAGF,CAAC;AAsEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,kLAavB,eAAe,uBAodnB,CAAC;AAIF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;;;CAoB/B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ArrowDownIcon, ArrowUpIcon, Cross1Icon, PlusIcon, SortDownIcon, SortUpIcon, TrashIcon, } from "@rowsncolumns/icons";
|
|
2
|
-
import { Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogTitle, IconButton, Select, SelectContent, SelectItem, SelectPortal, SelectTrigger, SelectValue, Separator, } from "@rowsncolumns/ui";
|
|
2
|
+
import { AccessKeyLabel, Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogTitle, IconButton, Select, SelectContent, SelectItem, SelectPortal, SelectTrigger, SelectValue, Separator, } from "@rowsncolumns/ui";
|
|
3
3
|
import React, { memo, useCallback, useEffect, useMemo, useState } from "react";
|
|
4
4
|
import { getCfIcon } from "../../api/cf-icons";
|
|
5
5
|
import { CfIconPreview } from "../cf-icon-preview";
|
|
@@ -122,14 +122,17 @@ export const SortRangeDialog = memo(({ open, onOpenChange, columns, customLists,
|
|
|
122
122
|
if (lvl.sortIcon)
|
|
123
123
|
spec.sortIcon = lvl.sortIcon;
|
|
124
124
|
}
|
|
125
|
-
else if (lvl.customListIndex != null &&
|
|
126
|
-
lists[lvl.customListIndex]) {
|
|
125
|
+
else if (lvl.customListIndex != null && lists[lvl.customListIndex]) {
|
|
127
126
|
spec.customList = lists[lvl.customListIndex];
|
|
128
127
|
}
|
|
129
128
|
return spec;
|
|
130
129
|
});
|
|
131
130
|
onApply(specs, sortOptions
|
|
132
|
-
? {
|
|
131
|
+
? {
|
|
132
|
+
hasHeader: leftToRight ? false : hasHeader,
|
|
133
|
+
caseSensitive,
|
|
134
|
+
orientation,
|
|
135
|
+
}
|
|
133
136
|
: { hasHeader });
|
|
134
137
|
onOpenChange(false);
|
|
135
138
|
}, [
|
|
@@ -151,7 +154,7 @@ export const SortRangeDialog = memo(({ open, onOpenChange, columns, customLists,
|
|
|
151
154
|
React.createElement(DialogBody, { className: "flex flex-col gap-3" },
|
|
152
155
|
showHeaderToggle ? (React.createElement("label", { className: "font-system text-sm flex items-center gap-1" },
|
|
153
156
|
React.createElement("input", { type: "checkbox", name: "hasHeader", checked: hasHeader, onChange: (e) => setHasHeader(e.target.checked) }),
|
|
154
|
-
"My data has headers")) : null,
|
|
157
|
+
React.createElement(AccessKeyLabel, { accessKey: "h" }, "My data has headers"))) : null,
|
|
155
158
|
React.createElement("div", { className: "flex flex-col gap-2" }, levels.map((lvl, rowIndex) => {
|
|
156
159
|
const col = columnByIndex.get(lvl.dimensionIndex);
|
|
157
160
|
const cellColors = col?.availableCellColors ?? [];
|
|
@@ -235,21 +238,22 @@ export const SortRangeDialog = memo(({ open, onOpenChange, columns, customLists,
|
|
|
235
238
|
React.createElement("div", null,
|
|
236
239
|
React.createElement(Button, { variant: "outline", size: "sm", onClick: addLevel, className: "gap-1" },
|
|
237
240
|
React.createElement(PlusIcon, null),
|
|
238
|
-
"Add level"),
|
|
239
|
-
sortOptions ? (React.createElement(Button, { variant: "outline", size: "sm", className: "ml-2", "aria-expanded": optionsOpen, onClick: () => setOptionsOpen((was) => !was) },
|
|
241
|
+
React.createElement(AccessKeyLabel, { accessKey: "a" }, "Add level")),
|
|
242
|
+
sortOptions ? (React.createElement(Button, { variant: "outline", size: "sm", className: "ml-2", "aria-expanded": optionsOpen, onClick: () => setOptionsOpen((was) => !was) },
|
|
243
|
+
React.createElement(AccessKeyLabel, { accessKey: "o" }, "Options\u2026"))) : null),
|
|
240
244
|
sortOptions && optionsOpen ? (React.createElement("fieldset", { className: "flex flex-col gap-2 rounded border border-rnc-border p-2", "aria-label": "Sort Options" },
|
|
241
245
|
React.createElement("legend", { className: "px-1 text-xs font-medium" }, "Sort Options"),
|
|
242
246
|
React.createElement("label", { className: "font-system text-sm flex items-center gap-1" },
|
|
243
247
|
React.createElement("input", { type: "checkbox", name: "caseSensitive", checked: caseSensitive, onChange: (e) => setCaseSensitive(e.target.checked) }),
|
|
244
|
-
"Case sensitive"),
|
|
248
|
+
React.createElement(AccessKeyLabel, { accessKey: "c" }, "Case sensitive")),
|
|
245
249
|
canSortColumns ? (React.createElement("div", { role: "radiogroup", "aria-label": "Orientation", className: "flex flex-col gap-1" },
|
|
246
250
|
React.createElement("span", { className: "text-xs text-rnc-muted-foreground" }, "Orientation"),
|
|
247
251
|
React.createElement("label", { className: "font-system text-sm flex items-center gap-1" },
|
|
248
252
|
React.createElement("input", { type: "radio", name: "sortOrientation", checked: !leftToRight, onChange: () => changeOrientation("rows") }),
|
|
249
|
-
"Sort top to bottom"),
|
|
253
|
+
React.createElement(AccessKeyLabel, { accessKey: "t" }, "Sort top to bottom")),
|
|
250
254
|
React.createElement("label", { className: "font-system text-sm flex items-center gap-1" },
|
|
251
255
|
React.createElement("input", { type: "radio", name: "sortOrientation", checked: leftToRight, onChange: () => changeOrientation("columns") }),
|
|
252
|
-
"Sort left to right"))) : null)) : null,
|
|
256
|
+
React.createElement(AccessKeyLabel, { accessKey: "l" }, "Sort left to right")))) : null)) : null,
|
|
253
257
|
React.createElement(Separator, null),
|
|
254
258
|
React.createElement("div", { className: "flex justify-end gap-2" },
|
|
255
259
|
React.createElement(Button, { variant: "outline", size: "sm", onClick: () => onOpenChange(false) }, "Cancel"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/sparkline-dialog/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/sparkline-dialog/index.tsx"],"names":[],"mappings":"AAWA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EAGxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAiD,MAAM,OAAO,CAAC;AAUtE,MAAM,MAAM,oBAAoB,GAAG;IACjC,2BAA2B;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,2FAA2F;IAC3F,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,4FAA4F;IAC5F,OAAO,CAAC,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,GAAG,SAAS,CAAC;CACnF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,6GAQvB,oBAAoB,uBA+FxB,CAAC;AAIF,MAAM,MAAM,wBAAwB,GAAG;IACrC,iDAAiD;IACjD,sBAAsB,CAAC,IAAI,EAAE;QAC3B,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,kBAAkB,CAAC;QACzB,SAAS,EAAE,MAAM,CAAC;QAClB,aAAa,EAAE,MAAM,CAAC;KACvB,GAAG,kBAAkB,CAAC;IACvB,iDAAiD;IACjD,sBAAsB,CACpB,KAAK,EAAE,cAAc,EACrB,KAAK,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,GAClD,kBAAkB,CAAC;CACvB,CAAC;AAkCF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,qDAGjC,wBAAwB,6BAmC1B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogTitle, Input, Separator, } from "@rowsncolumns/ui";
|
|
1
|
+
import { AccessKeyLabel, Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogTitle, Input, Separator, } from "@rowsncolumns/ui";
|
|
2
2
|
import { defaultSparklineLocation, rangeToA1, sparklineGroupDataRange, sparklineGroupLocation, } from "@rowsncolumns/utils";
|
|
3
3
|
import React, { memo, useCallback, useEffect, useState } from "react";
|
|
4
4
|
import { getUserSelections } from "../../api/selections";
|
|
@@ -45,12 +45,14 @@ export const SparklineDialog = memo(({ open, onOpenChange, mode, initialDataRang
|
|
|
45
45
|
React.createElement("label", { className: "flex flex-col gap-1 text-xs" },
|
|
46
46
|
React.createElement("span", { className: "font-medium" }, "Choose the data that you want"),
|
|
47
47
|
React.createElement("span", { className: "flex items-center gap-2" },
|
|
48
|
-
React.createElement("span", { className: "w-[110px] shrink-0" },
|
|
48
|
+
React.createElement("span", { className: "w-[110px] shrink-0" },
|
|
49
|
+
React.createElement(AccessKeyLabel, { accessKey: "d" }, "Data Range:")),
|
|
49
50
|
React.createElement(Input, { autoFocus: true, value: dataRange, onChange: (e) => setDataRange(e.target.value), placeholder: "A2:E9", "aria-label": "Data Range" }))),
|
|
50
51
|
React.createElement("label", { className: "flex flex-col gap-1 text-xs" },
|
|
51
52
|
React.createElement("span", { className: "font-medium" }, "Choose where you want the sparklines to be placed"),
|
|
52
53
|
React.createElement("span", { className: "flex items-center gap-2" },
|
|
53
|
-
React.createElement("span", { className: "w-[110px] shrink-0" },
|
|
54
|
+
React.createElement("span", { className: "w-[110px] shrink-0" },
|
|
55
|
+
React.createElement(AccessKeyLabel, { accessKey: "l" }, "Location Range:")),
|
|
54
56
|
React.createElement(Input, { value: locationRange, onChange: (e) => setLocationRange(e.target.value), placeholder: "F2:F9", "aria-label": "Location Range" }))),
|
|
55
57
|
error ? (React.createElement("div", { role: "alert", className: "text-xs text-red-600" }, error)) : null,
|
|
56
58
|
React.createElement(Separator, null),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/subtotal-dialog/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/subtotal-dialog/index.tsx"],"names":[],"mappings":"AAYA,OAAO,KAA0D,MAAM,OAAO,CAAC;AAG/E,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EAG1B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAsB,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAExE,YAAY,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAYrE,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,2BAA2B;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,4CAA4C;IAC5C,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAChC,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,6EAA6E;IAC7E,OAAO,CAAC,OAAO,EAAE,qBAAqB,GAAG,IAAI,CAAC;CAC/C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,0FAOtB,mBAAmB,uBA8KvB,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;;;CAe9B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Cross1Icon } from "@rowsncolumns/icons";
|
|
2
|
-
import { Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogDescription, DialogTitle, Separator, } from "@rowsncolumns/ui";
|
|
2
|
+
import { AccessKeyLabel, Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogDescription, DialogTitle, Separator, } from "@rowsncolumns/ui";
|
|
3
3
|
import React, { memo, useCallback, useEffect, useMemo, useState } from "react";
|
|
4
4
|
import { useFocusSheet } from "../../atoms";
|
|
5
5
|
import { useRegisterSubtotalDialogHost, useSubtotalDialogState, } from "../../atoms/subtotal-dialog.atom";
|
|
@@ -86,21 +86,22 @@ export const SubtotalDialog = memo(({ open, onOpenChange, columns, initialHasHea
|
|
|
86
86
|
React.createElement(DialogBody, { className: "flex flex-col gap-3 font-system text-sm" },
|
|
87
87
|
React.createElement("label", { className: "flex items-center gap-1" },
|
|
88
88
|
React.createElement("input", { type: "checkbox", name: "hasHeader", checked: hasHeader, onChange: (e) => setHasHeader(e.target.checked) }),
|
|
89
|
-
"My data has headers"),
|
|
89
|
+
React.createElement(AccessKeyLabel, { accessKey: "h" }, "My data has headers")),
|
|
90
90
|
React.createElement("label", { className: "flex flex-col gap-1 text-xs font-medium" },
|
|
91
|
-
"At each change in:",
|
|
91
|
+
React.createElement(AccessKeyLabel, { accessKey: "a" }, "At each change in:"),
|
|
92
92
|
React.createElement("select", { className: "h-8 rounded border border-rnc-border bg-transparent px-2 text-sm", "aria-label": "At each change in", value: groupBy ?? "", onChange: (e) => setGroupBy(Number(e.target.value)) }, columns.map((column) => (React.createElement("option", { key: column.columnIndex, value: column.columnIndex }, labelOf(column)))))),
|
|
93
93
|
React.createElement("label", { className: "flex flex-col gap-1 text-xs font-medium" },
|
|
94
|
-
"Use function:",
|
|
94
|
+
React.createElement(AccessKeyLabel, { accessKey: "u" }, "Use function:"),
|
|
95
95
|
React.createElement("select", { className: "h-8 rounded border border-rnc-border bg-transparent px-2 text-sm", "aria-label": "Use function", value: fn, onChange: (e) => setFn(e.target.value) }, SUBTOTAL_FUNCTIONS.map((name) => (React.createElement("option", { key: name, value: name }, SUBTOTAL_FUNCTION_LABELS[name]))))),
|
|
96
96
|
React.createElement("div", { className: "flex flex-col gap-1" },
|
|
97
|
-
React.createElement("span", { className: "text-xs font-medium" },
|
|
97
|
+
React.createElement("span", { className: "text-xs font-medium" },
|
|
98
|
+
React.createElement(AccessKeyLabel, { accessKey: "d" }, "Add subtotal to:")),
|
|
98
99
|
React.createElement("div", { className: "flex flex-col gap-1 max-h-[180px] overflow-y-auto border border-rnc-border rounded p-2", role: "group", "aria-label": "Add subtotal to" }, columns.map((column) => (React.createElement("label", { key: column.columnIndex, className: "flex items-center gap-1" },
|
|
99
100
|
React.createElement("input", { type: "checkbox", name: `subtotal-column-${column.columnIndex}`, checked: aggregates.has(column.columnIndex), onChange: () => toggleAggregate(column.columnIndex) }),
|
|
100
101
|
React.createElement("span", { className: "truncate", title: labelOf(column) }, labelOf(column))))))),
|
|
101
102
|
React.createElement("label", { className: "flex items-center gap-1" },
|
|
102
103
|
React.createElement("input", { type: "checkbox", name: "replaceCurrent", checked: replaceCurrent, onChange: (e) => setReplaceCurrent(e.target.checked) }),
|
|
103
|
-
"Replace current subtotals"),
|
|
104
|
+
React.createElement(AccessKeyLabel, { accessKey: "c" }, "Replace current subtotals")),
|
|
104
105
|
React.createElement(Separator, null),
|
|
105
106
|
React.createElement("div", { className: "flex justify-end gap-2" },
|
|
106
107
|
React.createElement(Button, { variant: "outline", size: "sm", type: "button", onClick: () => onOpenChange(false) }, "Cancel"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/text-to-columns-dialog/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/text-to-columns-dialog/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA0D,MAAM,OAAO,CAAC;AAM/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,MAAM,MAAM,iBAAiB,GAAG,WAAW,GAAG,OAAO,CAAC;AAEtD,MAAM,MAAM,wBAAwB,GAAG;IACrC,2BAA2B;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,6EAA6E;IAC7E,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,wDAAwD;IACxD,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC;;;OAGG;IACH,OAAO,CAAC,OAAO,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,gBAAgB,GAAG,IAAI,CAAC;CAClE,CAAC;AAiCF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,qFAO3B,wBAAwB,uBAgO5B,CAAC;AAIF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB;;;CAenC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Cross1Icon } from "@rowsncolumns/icons";
|
|
2
|
-
import { Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogDescription, DialogTitle, Input, Separator, } from "@rowsncolumns/ui";
|
|
2
|
+
import { AccessKeyLabel, Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogDescription, DialogTitle, Input, Separator, } from "@rowsncolumns/ui";
|
|
3
3
|
import React, { memo, useCallback, useEffect, useMemo, useState } from "react";
|
|
4
4
|
import { useRegisterTextToColumnsDialogHost, useTextToColumnsDialogState, } from "../../atoms/text-to-columns-dialog.atom";
|
|
5
5
|
const DELIMITERS = [
|
|
@@ -82,10 +82,10 @@ export const TextToColumnsDialog = memo(({ open, onOpenChange, preview, initialM
|
|
|
82
82
|
React.createElement("div", { className: "flex gap-4", role: "radiogroup", "aria-label": "Original data type" },
|
|
83
83
|
React.createElement("label", { className: "flex items-center gap-1" },
|
|
84
84
|
React.createElement("input", { type: "radio", name: "text-to-columns-mode", value: "delimited", checked: mode === "delimited", onChange: () => setMode("delimited") }),
|
|
85
|
-
"Delimited"),
|
|
85
|
+
React.createElement(AccessKeyLabel, { accessKey: "d" }, "Delimited")),
|
|
86
86
|
React.createElement("label", { className: "flex items-center gap-1" },
|
|
87
87
|
React.createElement("input", { type: "radio", name: "text-to-columns-mode", value: "fixed", checked: mode === "fixed", onChange: () => setMode("fixed") }),
|
|
88
|
-
"Fixed width")),
|
|
88
|
+
React.createElement(AccessKeyLabel, { accessKey: "w" }, "Fixed width"))),
|
|
89
89
|
mode === "delimited" ? (React.createElement("div", { className: "flex flex-col gap-2" },
|
|
90
90
|
React.createElement("label", { className: "flex flex-col gap-1 text-xs font-medium" },
|
|
91
91
|
"Delimiter",
|
|
@@ -93,7 +93,7 @@ export const TextToColumnsDialog = memo(({ open, onOpenChange, preview, initialM
|
|
|
93
93
|
DELIMITERS.map((option) => (React.createElement("option", { key: option.value, value: option.value }, option.label))),
|
|
94
94
|
React.createElement("option", { value: "custom" }, "Other\u2026"))),
|
|
95
95
|
delimiter === "custom" ? (React.createElement("label", { className: "flex flex-col gap-1 text-xs font-medium" },
|
|
96
|
-
"Other delimiter",
|
|
96
|
+
React.createElement(AccessKeyLabel, { accessKey: "o" }, "Other delimiter"),
|
|
97
97
|
React.createElement(Input, { value: customDelimiter, maxLength: 5, "aria-label": "Other delimiter", onChange: (e) => setCustomDelimiter(e.target.value) }))) : null)) : (React.createElement("div", { className: "flex flex-col gap-2" },
|
|
98
98
|
React.createElement("div", { className: "text-xs text-rnc-foreground/70" }, "Click the ruler to create a break line; click it again to remove it."),
|
|
99
99
|
React.createElement("div", { className: "overflow-x-auto rounded border border-rnc-border p-2 font-mono text-xs leading-5", "data-testid": "fixed-width-ruler" },
|
|
@@ -126,7 +126,8 @@ export const TextToColumnsDialog = memo(({ open, onOpenChange, preview, initialM
|
|
|
126
126
|
React.createElement(Separator, null),
|
|
127
127
|
React.createElement("div", { className: "flex justify-end gap-2" },
|
|
128
128
|
React.createElement(Button, { variant: "outline", size: "sm", type: "button", onClick: () => onOpenChange(false) }, "Cancel"),
|
|
129
|
-
React.createElement(Button, { size: "sm", type: "button", onClick: commit, disabled: !canApply },
|
|
129
|
+
React.createElement(Button, { size: "sm", type: "button", onClick: commit, disabled: !canApply },
|
|
130
|
+
React.createElement(AccessKeyLabel, { accessKey: "f" }, "Finish")))))));
|
|
130
131
|
});
|
|
131
132
|
TextToColumnsDialog.displayName = "TextToColumnsDialog";
|
|
132
133
|
/**
|
|
@@ -142,6 +142,12 @@ export type UseEditableOptions<T extends CellData> = {
|
|
|
142
142
|
* what the sheet the entry is typed on had selected before any pick.
|
|
143
143
|
*/
|
|
144
144
|
navigationSelections?: SelectionArea[];
|
|
145
|
+
/**
|
|
146
|
+
* The same, asked when the commit key is pressed: what the host has selected
|
|
147
|
+
* on the typing sheet at that moment, when it can say.
|
|
148
|
+
* `navigationSelections` when omitted or when it returns nothing.
|
|
149
|
+
*/
|
|
150
|
+
getNavigationSelections?: () => SelectionArea[] | undefined;
|
|
145
151
|
/**
|
|
146
152
|
* Active selected cell. This can change, if the user is in formula mode
|
|
147
153
|
*/
|
|
@@ -413,7 +419,7 @@ export declare const areTextFormatRunsEqual: (a: TextFormatRun[] | undefined | n
|
|
|
413
419
|
*
|
|
414
420
|
* Moves to incorrect cell
|
|
415
421
|
*/
|
|
416
|
-
export declare const useEditable: <T extends CellData>({ getEditor, getValue, getTextFormatRuns, onChange, onSubmit, onCancel, onBlur, onDelete, sheetId, selections, navigationSelections, activeCell, canEdit, canView, frozenRows, frozenColumns, hideOnBlur, isHiddenRow, isHiddenColumn, rowCount, columnCount, selectionTopBound, selectionBottomBound, selectionLeftBound, selectionRightBound, enableEditOnEnterKey, keymap, clearSelections, onRequestCut, shouldHandleKeyDown, sticky, editorBorderColor, editorBorderOutlineColor, onBeforeEdit, onKeyDown, onEditorKeyDown, getCellOffsetFromCoords, getCellCoordsFromOffset, getCellBounds, focus, getActualCellCoords, scrollToCell, onChangeBatch, containerWidth, containerHeight, getScrollPosition, getColumnOffset, getEditorAlignment, getSheetRowCount, getSheetColumnCount, getBooleanValue, getDataValidation, setActiveCell, onCopy, onPaste, onCut, tables, onInsertTableRow, }: UseEditableOptions<T>) => {
|
|
422
|
+
export declare const useEditable: <T extends CellData>({ getEditor, getValue, getTextFormatRuns, onChange, onSubmit, onCancel, onBlur, onDelete, sheetId, selections, navigationSelections: navigationSelectionsGiven, getNavigationSelections, activeCell, canEdit, canView, frozenRows, frozenColumns, hideOnBlur, isHiddenRow, isHiddenColumn, rowCount, columnCount, selectionTopBound, selectionBottomBound, selectionLeftBound, selectionRightBound, enableEditOnEnterKey, keymap, clearSelections, onRequestCut, shouldHandleKeyDown, sticky, editorBorderColor, editorBorderOutlineColor, onBeforeEdit, onKeyDown, onEditorKeyDown, getCellOffsetFromCoords, getCellCoordsFromOffset, getCellBounds, focus, getActualCellCoords, scrollToCell, onChangeBatch, containerWidth, containerHeight, getScrollPosition, getColumnOffset, getEditorAlignment, getSheetRowCount, getSheetColumnCount, getBooleanValue, getDataValidation, setActiveCell, onCopy, onPaste, onCut, tables, onInsertTableRow, }: UseEditableOptions<T>) => {
|
|
417
423
|
editorComponent: React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
|
|
418
424
|
onDoubleClick: (e: React.MouseEvent<HTMLElement>) => void;
|
|
419
425
|
getNextFocusableCell: (sheetId: number, currentCell: CellInterface, direction?: Direction, restrictWithinSelection?: boolean) => CellInterface | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-editable.d.ts","sourceRoot":"","sources":["../../../hooks/use-editable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,aAAa,EACb,YAAY,EACZ,SAAS,EACT,UAAU,EACV,qBAAqB,EACrB,YAAY,EACZ,aAAa,EACd,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAEL,SAAS,EAIV,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMtD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAiB/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAIzE,OAAO,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAG7D;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,wDAAwD;IACxD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6EAA6E;IAC7E,eAAe,CAAC,EAAE,OAAO,CAA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,EAAE,u5BA4D7C,kBAAkB,CAAC,CAAC,CAAC;;uBAuThB,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC;oCAwUpB,MAAM,eACF,aAAa,cACf,SAAS,wCAEnB,aAAa,GAAG,IAAI;;;4BAnfZ,MAAM,QACT,aAAa,iBACJ,MAAM,YACX,mBAAmB;wBA09BpB,MAAM,QACT,aAAa,iBACJ,MAAM,YACX,mBAAmB;+BAlLnB,MAAM,kBACA,aAAa,EAAE,GAAG,SAAS,WAClC,MAAM,cACH,aAAa;;;6BAtKf,MAAM,kBACA,aAAa,EAAE,GAAG,SAAS,GAAG,IAAI,WACzC,MAAM,cACH,aAAa,kBACT,aAAa,GAAG,IAAI,GAAG,SAAS,uCAEtC,mBAAmB;uBA0D1B,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC;uBA0B1B,mBAAmB,KAAG,OAAO;qBA0BrC,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC;mBAtftE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC;CAgwB1C,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MouseButtonCodes } from "@rowsncolumns/grid";
|
|
2
2
|
import { clampIndex, Direction, findNextCellWithinBounds, isArrowKey, isEqualCells, } from "@rowsncolumns/grid";
|
|
3
3
|
import { isNil, PROTECTED_SHEET_EDIT_MESSAGE, SHEET_PROTECTION_ERROR_TITLE, } from "@rowsncolumns/utils";
|
|
4
|
-
import { useCallback, useMemo, useRef, useState } from "react";
|
|
4
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
5
5
|
import { first } from "rxjs";
|
|
6
6
|
import { isAFormulaWhileEditing } from "../api/editor-formula";
|
|
7
7
|
import { findActiveTableWithinCell, getNextCellInTable } from "../api/table";
|
|
@@ -141,7 +141,7 @@ const MEDIA_KEYS = new Set([
|
|
|
141
141
|
*
|
|
142
142
|
* Moves to incorrect cell
|
|
143
143
|
*/
|
|
144
|
-
export const useEditable = ({ getEditor = getDefaultEditor, getValue, getTextFormatRuns, onChange, onSubmit, onCancel, onBlur, onDelete, sheetId, selections = DEFAULT_ARRAY, navigationSelections = selections, activeCell, canEdit = defaultCanEdit, canView = defaultCanView, frozenRows = 0, frozenColumns = 0, hideOnBlur = true, isHiddenRow = defaultIsHidden, isHiddenColumn = defaultIsHidden, rowCount, columnCount, selectionTopBound = 0, selectionBottomBound = rowCount, selectionLeftBound = 0, selectionRightBound = columnCount, enableEditOnEnterKey = true, keymap = "sheets", clearSelections, onRequestCut, shouldHandleKeyDown, sticky, editorBorderColor, editorBorderOutlineColor, onBeforeEdit, onKeyDown, onEditorKeyDown, getCellOffsetFromCoords, getCellCoordsFromOffset, getCellBounds, focus, getActualCellCoords, scrollToCell, onChangeBatch, containerWidth = 0, containerHeight = 0, getScrollPosition, getColumnOffset, getEditorAlignment, getSheetRowCount, getSheetColumnCount, getBooleanValue, getDataValidation, setActiveCell, onCopy, onPaste, onCut, tables, onInsertTableRow, }) => {
|
|
144
|
+
export const useEditable = ({ getEditor = getDefaultEditor, getValue, getTextFormatRuns, onChange, onSubmit, onCancel, onBlur, onDelete, sheetId, selections = DEFAULT_ARRAY, navigationSelections: navigationSelectionsGiven = selections, getNavigationSelections, activeCell, canEdit = defaultCanEdit, canView = defaultCanView, frozenRows = 0, frozenColumns = 0, hideOnBlur = true, isHiddenRow = defaultIsHidden, isHiddenColumn = defaultIsHidden, rowCount, columnCount, selectionTopBound = 0, selectionBottomBound = rowCount, selectionLeftBound = 0, selectionRightBound = columnCount, enableEditOnEnterKey = true, keymap = "sheets", clearSelections, onRequestCut, shouldHandleKeyDown, sticky, editorBorderColor, editorBorderOutlineColor, onBeforeEdit, onKeyDown, onEditorKeyDown, getCellOffsetFromCoords, getCellCoordsFromOffset, getCellBounds, focus, getActualCellCoords, scrollToCell, onChangeBatch, containerWidth = 0, containerHeight = 0, getScrollPosition, getColumnOffset, getEditorAlignment, getSheetRowCount, getSheetColumnCount, getBooleanValue, getDataValidation, setActiveCell, onCopy, onPaste, onCut, tables, onInsertTableRow, }) => {
|
|
145
145
|
const editingCellCoordinate = useEditingCellCoordinate();
|
|
146
146
|
const [isEditorShown, setShowEditor] = useEditorVisibility();
|
|
147
147
|
const [value, setValue] = useCellEditorValue();
|
|
@@ -593,6 +593,14 @@ export const useEditable = ({ getEditor = getDefaultEditor, getValue, getTextFor
|
|
|
593
593
|
makeEditable(sheetId, { rowIndex, columnIndex }, initialValue, {
|
|
594
594
|
fromKeystroke: true,
|
|
595
595
|
});
|
|
596
|
+
/* A character the grid opened no entry for (a read-only grid, a
|
|
597
|
+
* locked or a pivot cell) is not left to the browser, which would
|
|
598
|
+
* type it into the closed editor, where it would begin the next
|
|
599
|
+
* entry. makeEditable sets the editing cell at once when it opens
|
|
600
|
+
* one. */
|
|
601
|
+
if (initialValue !== void 0 && !currentActiveCellRef.current) {
|
|
602
|
+
e.preventDefault();
|
|
603
|
+
}
|
|
596
604
|
}
|
|
597
605
|
}
|
|
598
606
|
}, [
|
|
@@ -621,11 +629,33 @@ export const useEditable = ({ getEditor = getDefaultEditor, getValue, getTextFor
|
|
|
621
629
|
shouldHandleKeyDown,
|
|
622
630
|
setFormulaMode,
|
|
623
631
|
]);
|
|
632
|
+
/**
|
|
633
|
+
* The grid holds the merges and the hidden rows and columns of the sheet in
|
|
634
|
+
* view only. While a formula takes a reference on another sheet, the sheet
|
|
635
|
+
* the entry is typed on is not that one: its own are kept from when it was
|
|
636
|
+
* last in view, for the commit key's move on it.
|
|
637
|
+
*/
|
|
638
|
+
const sheetInViewLayout = {
|
|
639
|
+
sheetId,
|
|
640
|
+
getCellBounds,
|
|
641
|
+
isHiddenRow,
|
|
642
|
+
isHiddenColumn,
|
|
643
|
+
};
|
|
644
|
+
const typingSheetLayout = useRef(sheetInViewLayout);
|
|
645
|
+
if (editingSheetId === undefined || editingSheetId === sheetId) {
|
|
646
|
+
typingSheetLayout.current = sheetInViewLayout;
|
|
647
|
+
}
|
|
648
|
+
const sheetInViewLayoutRef = useRef(sheetInViewLayout);
|
|
649
|
+
sheetInViewLayoutRef.current = sheetInViewLayout;
|
|
624
650
|
/**
|
|
625
651
|
* Get next focusable cell
|
|
626
652
|
* Respects selection bounds
|
|
627
653
|
*/
|
|
628
654
|
const getNextFocusableCell = useCallbackRef(useCallback((sheetId, currentCell, direction = Direction.Right, restrictWithinSelection = true) => {
|
|
655
|
+
const { getCellBounds, isHiddenRow, isHiddenColumn } = typingSheetLayout.current.sheetId === sheetId
|
|
656
|
+
? typingSheetLayout.current
|
|
657
|
+
: sheetInViewLayoutRef.current;
|
|
658
|
+
const navigationSelections = getNavigationSelections?.() ?? navigationSelectionsGiven;
|
|
629
659
|
/* Next immediate cell */
|
|
630
660
|
const bounds = getCellBounds(currentCell);
|
|
631
661
|
if (!bounds)
|
|
@@ -701,13 +731,14 @@ export const useEditable = ({ getEditor = getDefaultEditor, getValue, getTextFor
|
|
|
701
731
|
currentCell) {
|
|
702
732
|
const { range } = navigationSelections[navigationSelections.length - 1];
|
|
703
733
|
const activeCellBounds = getCellBounds(currentCell);
|
|
704
|
-
const nextCell = findNextCellWithinBounds(activeCellBounds, range, direction);
|
|
734
|
+
const nextCell = findNextCellWithinBounds(activeCellBounds, range, direction, { isHiddenRow, isHiddenColumn, getCellBounds });
|
|
705
735
|
if (nextCell)
|
|
706
736
|
nextActiveCell = nextCell;
|
|
707
737
|
}
|
|
708
738
|
return nextActiveCell;
|
|
709
739
|
}, [
|
|
710
|
-
|
|
740
|
+
navigationSelectionsGiven,
|
|
741
|
+
getNavigationSelections,
|
|
711
742
|
isHiddenRow,
|
|
712
743
|
isHiddenColumn,
|
|
713
744
|
selectionBottomBound,
|
|
@@ -894,6 +925,35 @@ export const useEditable = ({ getEditor = getDefaultEditor, getValue, getTextFor
|
|
|
894
925
|
}
|
|
895
926
|
onCut?.(e);
|
|
896
927
|
}, [onCut, isEditInProgress]);
|
|
928
|
+
/* Text also reaches the closed editor with no entry asked for at a keydown:
|
|
929
|
+
* a character typed with Option or AltGr (the keydown handler returns on a
|
|
930
|
+
* modifier), dictation, an input method's composition, none of which can
|
|
931
|
+
* always be cancelled. Where the grid would refuse the entry, that text is
|
|
932
|
+
* taken out again once the editor has read it, so it is not in the next
|
|
933
|
+
* entry. Where the grid would allow the entry the text is left alone. */
|
|
934
|
+
useEffect(() => {
|
|
935
|
+
const element = cellEditorInstance?.el();
|
|
936
|
+
if (!element)
|
|
937
|
+
return;
|
|
938
|
+
const emptyIfRefused = (event) => {
|
|
939
|
+
if (event.isComposing)
|
|
940
|
+
return;
|
|
941
|
+
queueMicrotask(() => {
|
|
942
|
+
if (!currentActiveCellRef.current &&
|
|
943
|
+
activeCell &&
|
|
944
|
+
cellEditorInstance?.getValue() &&
|
|
945
|
+
!canEdit(sheetId, activeCell)) {
|
|
946
|
+
cellEditorInstance.setValue("");
|
|
947
|
+
}
|
|
948
|
+
});
|
|
949
|
+
};
|
|
950
|
+
element.addEventListener("input", emptyIfRefused);
|
|
951
|
+
element.addEventListener("compositionend", emptyIfRefused);
|
|
952
|
+
return () => {
|
|
953
|
+
element.removeEventListener("input", emptyIfRefused);
|
|
954
|
+
element.removeEventListener("compositionend", emptyIfRefused);
|
|
955
|
+
};
|
|
956
|
+
}, [cellEditorInstance, sheetId, activeCell, canEdit]);
|
|
897
957
|
const editorComponent = getEditor({
|
|
898
958
|
sheetId,
|
|
899
959
|
cell: editingCell ?? DEFAULT_ACTIVE_CELL,
|
|
@@ -936,7 +996,11 @@ export const useEditable = ({ getEditor = getDefaultEditor, getValue, getTextFor
|
|
|
936
996
|
* `initialValue` (e.g. Insert Function inserts `=SUM(`).
|
|
937
997
|
*/
|
|
938
998
|
const editCell = useCallbackRef(useCallback((sheetId, cell, initialValue, options) => {
|
|
939
|
-
if (isEditInProgress &&
|
|
999
|
+
if (isEditInProgress &&
|
|
1000
|
+
// The render may be behind a `cancelEditor` of this tick.
|
|
1001
|
+
currentActiveCellRef.current &&
|
|
1002
|
+
cellEditorInstance &&
|
|
1003
|
+
initialValue != null) {
|
|
940
1004
|
// A read-only view takes no text.
|
|
941
1005
|
if (isViewOnlyRef.current) {
|
|
942
1006
|
return;
|