@rowsncolumns/spreadsheet 10.19.3 → 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 +91 -0
- package/dist/cjs/api/entry-selections.d.ts.map +1 -0
- package/dist/cjs/api/entry-selections.js +132 -0
- package/dist/cjs/atoms/cell-input-context.atom.d.ts.map +1 -1
- package/dist/cjs/atoms/entry-selections.atom.d.ts +11 -0
- package/dist/cjs/atoms/entry-selections.atom.d.ts.map +1 -0
- package/dist/cjs/atoms/entry-selections.atom.js +11 -0
- 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 +243 -75
- 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 +10 -3
- 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-change.d.ts +7 -3
- package/dist/cjs/hooks/use-editor-change.d.ts.map +1 -1
- package/dist/cjs/hooks/use-editor-change.js +12 -14
- package/dist/cjs/hooks/use-editor-submit.d.ts +10 -3
- package/dist/cjs/hooks/use-editor-submit.d.ts.map +1 -1
- package/dist/cjs/hooks/use-editor-submit.js +19 -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/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/esm/api/entry-selections.d.ts +91 -0
- package/dist/esm/api/entry-selections.d.ts.map +1 -0
- package/dist/esm/api/entry-selections.js +98 -0
- package/dist/esm/atoms/cell-input-context.atom.d.ts.map +1 -1
- package/dist/esm/atoms/entry-selections.atom.d.ts +11 -0
- package/dist/esm/atoms/entry-selections.atom.d.ts.map +1 -0
- package/dist/esm/atoms/entry-selections.atom.js +8 -0
- 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 +208 -42
- 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 +10 -3
- 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-change.d.ts +7 -3
- package/dist/esm/hooks/use-editor-change.d.ts.map +1 -1
- package/dist/esm/hooks/use-editor-change.js +10 -12
- package/dist/esm/hooks/use-editor-submit.d.ts +10 -3
- package/dist/esm/hooks/use-editor-submit.d.ts.map +1 -1
- package/dist/esm/hooks/use-editor-submit.js +19 -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/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogTitle, Separator, } from "@rowsncolumns/ui";
|
|
1
|
+
import { AccessKeyLabel, Button, Dialog, DialogBody, DialogCloseButton, DialogContent, DialogTitle, Separator, } from "@rowsncolumns/ui";
|
|
2
2
|
import React, { memo, useCallback, useState } from "react";
|
|
3
3
|
import { usePasteSpecialDialogState, useRegisterPasteSpecialDialogHost, } from "../../atoms/paste-special-dialog.atom";
|
|
4
4
|
/**
|
|
@@ -7,22 +7,23 @@ import { usePasteSpecialDialogState, useRegisterPasteSpecialDialogHost, } from "
|
|
|
7
7
|
*/
|
|
8
8
|
const PASTE_MODE_COLUMNS = [
|
|
9
9
|
[
|
|
10
|
-
{ value: "all", label: "All" },
|
|
11
|
-
{ value: "formulas", label: "Formulas" },
|
|
12
|
-
{ value: "values", label: "Values" },
|
|
13
|
-
{ value: "formats", label: "Formats" },
|
|
14
|
-
{ value: "commentsAndNotes", label: "Comments and Notes" },
|
|
15
|
-
{ value: "validation", label: "Validation" },
|
|
10
|
+
{ value: "all", label: "All", accessKey: "a" },
|
|
11
|
+
{ value: "formulas", label: "Formulas", accessKey: "f" },
|
|
12
|
+
{ value: "values", label: "Values", accessKey: "v" },
|
|
13
|
+
{ value: "formats", label: "Formats", accessKey: "t" },
|
|
14
|
+
{ value: "commentsAndNotes", label: "Comments and Notes", accessKey: "c" },
|
|
15
|
+
{ value: "validation", label: "Validation", accessKey: "n" },
|
|
16
16
|
],
|
|
17
17
|
[
|
|
18
|
-
{ value: "allUsingSourceTheme", label: "All using Source theme" },
|
|
19
|
-
{ value: "allExceptBorders", label: "All except borders" },
|
|
20
|
-
{ value: "columnWidths", label: "Column widths" },
|
|
21
|
-
{ value: "formulasAndNumberFormats", label: "Formulas and number formats" },
|
|
22
|
-
{ value: "valuesAndNumberFormats", label: "Values and number formats" },
|
|
18
|
+
{ value: "allUsingSourceTheme", label: "All using Source theme", accessKey: "h" },
|
|
19
|
+
{ value: "allExceptBorders", label: "All except borders", accessKey: "x" },
|
|
20
|
+
{ value: "columnWidths", label: "Column widths", accessKey: "w" },
|
|
21
|
+
{ value: "formulasAndNumberFormats", label: "Formulas and number formats", accessKey: "r" },
|
|
22
|
+
{ value: "valuesAndNumberFormats", label: "Values and number formats", accessKey: "u" },
|
|
23
23
|
{
|
|
24
24
|
value: "allMergingConditionalFormats",
|
|
25
25
|
label: "All merging conditional formats",
|
|
26
|
+
accessKey: "g",
|
|
26
27
|
},
|
|
27
28
|
],
|
|
28
29
|
];
|
|
@@ -34,15 +35,15 @@ const NO_OPERATION_MODES = new Set([
|
|
|
34
35
|
"columnWidths",
|
|
35
36
|
]);
|
|
36
37
|
const OPERATIONS = [
|
|
37
|
-
{ value: "none", label: "None" },
|
|
38
|
-
{ value: "add", label: "Add" },
|
|
39
|
-
{ value: "subtract", label: "Subtract" },
|
|
40
|
-
{ value: "multiply", label: "Multiply" },
|
|
41
|
-
{ value: "divide", label: "Divide" },
|
|
38
|
+
{ value: "none", label: "None", accessKey: "o" },
|
|
39
|
+
{ value: "add", label: "Add", accessKey: "d" },
|
|
40
|
+
{ value: "subtract", label: "Subtract", accessKey: "s" },
|
|
41
|
+
{ value: "multiply", label: "Multiply", accessKey: "m" },
|
|
42
|
+
{ value: "divide", label: "Divide", accessKey: "i" },
|
|
42
43
|
];
|
|
43
44
|
const RadioOption = ({ name, option, checked, disabled, onChange, }) => (React.createElement("label", { className: "flex items-center gap-2 text-xs py-0.5 cursor-pointer" },
|
|
44
45
|
React.createElement("input", { type: "radio", name: name, value: option.value, checked: checked, disabled: disabled, onChange: () => onChange(option.value) }),
|
|
45
|
-
option.label));
|
|
46
|
+
React.createElement(AccessKeyLabel, { accessKey: option.accessKey }, option.label)));
|
|
46
47
|
const RadioGroup = ({ name, legend, value, columns, onChange, disabled, }) => (React.createElement("fieldset", { className: "flex flex-col gap-1 min-w-0 disabled:opacity-50", disabled: disabled },
|
|
47
48
|
React.createElement("legend", { className: "text-xs font-medium mb-1" }, legend),
|
|
48
49
|
React.createElement("div", { className: "grid grid-flow-col auto-cols-fr gap-x-4" }, columns.map((column, index) => (React.createElement("div", { key: index, className: "flex flex-col gap-1 min-w-0" }, column.map((option) => (React.createElement(RadioOption, { key: option.value, name: name, option: option, checked: value === option.value, disabled: disabled, onChange: onChange })))))))));
|
|
@@ -93,13 +94,14 @@ export const PasteSpecialDialog = memo(({ open, onOpenChange, onApply }) => {
|
|
|
93
94
|
React.createElement("div", { className: "grid grid-cols-2 gap-x-4" },
|
|
94
95
|
React.createElement("label", { className: "flex items-center gap-2 text-xs py-0.5 cursor-pointer" },
|
|
95
96
|
React.createElement("input", { type: "checkbox", checked: skipBlanks, onChange: (e) => setSkipBlanks(e.target.checked) }),
|
|
96
|
-
"Skip blanks"),
|
|
97
|
+
React.createElement(AccessKeyLabel, { accessKey: "b" }, "Skip blanks")),
|
|
97
98
|
React.createElement("label", { className: "flex items-center gap-2 text-xs py-0.5 cursor-pointer" },
|
|
98
99
|
React.createElement("input", { type: "checkbox", checked: transpose, onChange: (e) => setTranspose(e.target.checked) }),
|
|
99
|
-
"Transpose")),
|
|
100
|
+
React.createElement(AccessKeyLabel, { accessKey: "e" }, "Transpose"))),
|
|
100
101
|
React.createElement(Separator, null),
|
|
101
102
|
React.createElement("div", { className: "flex justify-between gap-2" },
|
|
102
|
-
React.createElement(Button, { variant: "outline", size: "sm", onClick: commitLink },
|
|
103
|
+
React.createElement(Button, { variant: "outline", size: "sm", onClick: commitLink },
|
|
104
|
+
React.createElement(AccessKeyLabel, { accessKey: "l" }, "Paste Link")),
|
|
103
105
|
React.createElement("div", { className: "flex gap-2" },
|
|
104
106
|
React.createElement(Button, { size: "sm", onClick: commit }, "OK"),
|
|
105
107
|
React.createElement(Button, { variant: "outline", size: "sm", onClick: () => onOpenChange(false) }, "Cancel")))))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/protect-sheet-dialog/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/protect-sheet-dialog/index.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAyB,MAAM,OAAO,CAAC;AAE9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnD,iFAAiF;AACjF,MAAM,MAAM,wBAAwB,GAChC,mBAAmB,GACnB,qBAAqB,GACrB,aAAa,GACb,eAAe,GACf,YAAY,GACZ,eAAe,GACf,YAAY,GACZ,kBAAkB,GAClB,eAAe,GACf,YAAY,GACZ,MAAM,GACN,YAAY,GACZ,aAAa,GACb,SAAS,GACT,WAAW,CAAC;AAEhB;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,EAAE,aAAa,CAAC;IACzD,IAAI,EAAE,wBAAwB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,OAAO,CAAC;CACzB,CAgBA,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,MAAM,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;AAElF,iFAAiF;AACjF,eAAO,MAAM,2BAA2B,GACtC,aAAa,eAAe,GAAG,IAAI,KAClC,yBAOF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,GACtC,OAAO,yBAAyB,KAC/B,IAAI,CACL,eAAe,EACf,UAAU,GAAG,eAAe,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAOvE,CAAC;AAEF,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACxD,cAAc,4BAA4B,CAAC;AA4D3C,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,gEAAgE;IAChE,OAAO,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACjC;;;;OAIG;IACH,SAAS,CAAC,OAAO,EAAE;QACjB,eAAe,EAAE,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAAC;QAChE,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,GAAG,IAAI,CAAC;CACV,CAAC;AAEF,4EAA4E;AAC5E,eAAO,MAAM,kBAAkB,yEACgB,uBAAuB,uBAoErE,CAAC;AAIF,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,uEAAuE;IACvE,SAAS,CAAC,OAAO,EAAE;QAAE,aAAa,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CACzE,CAAC;AAEF,8EAA8E;AAC9E,eAAO,MAAM,qBAAqB,gEACI,0BAA0B,uBAwD/D,CAAC;AAIF,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACnC,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,eAAe,uEACiB,oBAAoB,uBAmChE,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 React, { memo, useState } from "react";
|
|
3
3
|
import { CONFIRM_PASSWORD_MISMATCH } from "./constants";
|
|
4
4
|
/**
|
|
@@ -89,7 +89,8 @@ export const ProtectSheetDialog = memo(({ open, onOpenChange, initial, onConfirm
|
|
|
89
89
|
setMismatch(false);
|
|
90
90
|
} }),
|
|
91
91
|
React.createElement("fieldset", { className: "flex flex-col gap-1" },
|
|
92
|
-
React.createElement("legend", { className: "mb-1 text-xs font-medium" },
|
|
92
|
+
React.createElement("legend", { className: "mb-1 text-xs font-medium" },
|
|
93
|
+
React.createElement(AccessKeyLabel, { accessKey: "o" }, "Allow all users of this worksheet to:")),
|
|
93
94
|
React.createElement("div", { className: "flex max-h-56 flex-col gap-1 overflow-y-auto rounded border p-2" }, SHEET_PROTECTION_ALLOW_OPTIONS.map(({ flag, label }) => (React.createElement("label", { key: flag, className: "flex items-center gap-2 text-xs" },
|
|
94
95
|
React.createElement("input", { type: "checkbox", checked: allow[flag], "data-testid": `protect-allow-${flag}`, onChange: (e) => setAllow((prev) => ({ ...prev, [flag]: e.target.checked })) }),
|
|
95
96
|
label))))),
|
|
@@ -121,7 +122,7 @@ export const ProtectWorkbookDialog = memo(({ open, onOpenChange, onConfirm }) =>
|
|
|
121
122
|
} },
|
|
122
123
|
React.createElement("label", { className: "flex items-center gap-2 text-xs font-medium" },
|
|
123
124
|
React.createElement("input", { type: "checkbox", checked: structure, "data-testid": "protect-workbook-structure", onChange: (e) => setStructure(e.target.checked) }),
|
|
124
|
-
"Structure"),
|
|
125
|
+
React.createElement(AccessKeyLabel, { accessKey: "s" }, "Structure")),
|
|
125
126
|
React.createElement(PasswordFields, { label: "Password (optional):", password: password, confirm: confirm, mismatch: mismatch, onPassword: (v) => {
|
|
126
127
|
setPassword(v);
|
|
127
128
|
setMismatch(false);
|
|
@@ -147,7 +148,7 @@ export const UnprotectDialog = memo(({ open, onOpenChange, title, onConfirm }) =
|
|
|
147
148
|
onOpenChange(false);
|
|
148
149
|
} },
|
|
149
150
|
React.createElement("label", { className: "flex flex-col gap-1 text-xs font-medium" },
|
|
150
|
-
"Password:",
|
|
151
|
+
React.createElement(AccessKeyLabel, { accessKey: "p" }, "Password:"),
|
|
151
152
|
React.createElement(Input, { type: "password", autoComplete: "current-password", autoFocus: true, value: password, onChange: (e) => setPassword(e.target.value), "data-testid": "unprotect-password" })),
|
|
152
153
|
React.createElement(Separator, null),
|
|
153
154
|
React.createElement(DialogButtons, { onCancel: () => onOpenChange(false) }))))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/remove-duplicates-dialog/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/remove-duplicates-dialog/index.tsx"],"names":[],"mappings":"AAYA,OAAO,KAA0D,MAAM,OAAO,CAAC;AAE/E,OAAO,EACL,KAAK,4BAA4B,EAGlC,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAE3D,YAAY,EAAE,4BAA4B,EAAE,CAAC;AAE7C,MAAM,MAAM,2BAA2B,GAAG;IACxC,2BAA2B;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,+DAA+D;IAC/D,OAAO,EAAE,4BAA4B,EAAE,CAAC;IACxC,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;OAGG;IACH,OAAO,CAAC,OAAO,EAAE,uBAAuB,GAAG,IAAI,CAAC;CACjD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,0FAO9B,2BAA2B,uBAqI/B,CAAC;AAIF;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B;;;CAetC,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 { 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,MAAM,GAAG,IAAI,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,2BAA2B;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,oCAAoC;IACpC,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;IACzB;;;;OAIG;IACH,YAAY,CAAC,EAAE,SAAS,EAAE,CAAC;IAC3B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC1B,wCAAwC;IACxC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,qCAAqC;IACrC,kBAAkB,CAAC,EAAE,eAAe,CAAC;IACrC;;;;;;;OAOG;IACH,OAAO,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,OAAO,EAAE,sBAAsB,GAAG,IAAI,CAAC;CACpE,CAAC;AAEF,2FAA2F;AAC3F,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,CAAC;AAEjD,8DAA8D;AAC9D,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,EAAE,OAAO,CAAC;IACnB,oEAAoE;IACpE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,oEAAoE;IACpE,WAAW,CAAC,EAAE,eAAe,CAAC;CAC/B,CAAC;AAEF,yGAAyG;AACzG,eAAO,MAAM,eAAe,GAC1B,QAAQ,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,QAAQ,CAAC,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
|
/**
|
|
@@ -137,10 +137,17 @@ export type UseEditableOptions<T extends CellData> = {
|
|
|
137
137
|
/**
|
|
138
138
|
* The selections a commit key moves the active cell inside
|
|
139
139
|
* (`getNextFocusableCell`). `selections` when omitted. While a formula is
|
|
140
|
-
* taking picks, `selections` holds the range being picked,
|
|
141
|
-
*
|
|
140
|
+
* taking picks, `selections` holds the range being picked, or is another
|
|
141
|
+
* sheet's altogether when the pick is made there; the move belongs inside
|
|
142
|
+
* what the sheet the entry is typed on had selected before any pick.
|
|
142
143
|
*/
|
|
143
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;
|
|
144
151
|
/**
|
|
145
152
|
* Active selected cell. This can change, if the user is in formula mode
|
|
146
153
|
*/
|
|
@@ -412,7 +419,7 @@ export declare const areTextFormatRunsEqual: (a: TextFormatRun[] | undefined | n
|
|
|
412
419
|
*
|
|
413
420
|
* Moves to incorrect cell
|
|
414
421
|
*/
|
|
415
|
-
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>) => {
|
|
416
423
|
editorComponent: React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
|
|
417
424
|
onDoubleClick: (e: React.MouseEvent<HTMLElement>) => void;
|
|
418
425
|
getNextFocusableCell: (sheetId: number, currentCell: CellInterface, direction?: Direction, restrictWithinSelection?: boolean) => CellInterface | null;
|