viewkitjs 0.37.0 → 0.39.0
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/CHANGELOG.md +95 -0
- package/MIGRATION.md +7 -0
- package/fields/dist/query/figure-kinds.d.ts +2 -2
- package/fields/dist/query/figure-kinds.js +3 -0
- package/fields/dist/query/figures.d.ts +5 -3
- package/fields/dist/query/figures.js +13 -0
- package/fields/docs/reference/query.md +3 -3
- package/package.json +1 -1
- package/postgres/docs/guides/field-map.md +1 -1
- package/views/dist/atoms/HeaderChrome.d.ts +7 -0
- package/views/dist/atoms/HeaderChrome.js +15 -0
- package/views/dist/atoms/ToolbarButton.d.ts +1 -1
- package/views/dist/atoms/ToolbarButton.js +2 -2
- package/views/dist/atoms/defaults.js +4 -0
- package/views/dist/atoms/types.d.ts +39 -2
- package/views/dist/contract.d.ts +25 -11
- package/views/dist/contract.js +41 -6
- package/views/dist/controls/field/looks.d.ts +1 -1
- package/views/dist/controls/field/looks.js +9 -3
- package/views/dist/controls/field/tokens.d.ts +4 -0
- package/views/dist/controls/field/tokens.js +1 -0
- package/views/dist/controls/field.css +93 -1
- package/views/dist/controls/filter-editor/block.d.ts +3 -1
- package/views/dist/controls/filter-editor/block.js +4 -3
- package/views/dist/controls/filter-editor/filter-editor.d.ts +13 -2
- package/views/dist/controls/filter-editor/filter-editor.js +45 -15
- package/views/dist/controls/filter-editor/how.d.ts +3 -1
- package/views/dist/controls/filter-editor/map-filter-body.js +5 -4
- package/views/dist/controls/filter-editor/map-rules.d.ts +2 -1
- package/views/dist/controls/filter-editor/map-rules.js +3 -3
- package/views/dist/controls/glyphs/glyphs.js +2 -0
- package/views/dist/controls/inline-input.css +3 -2
- package/views/dist/controls/internal/menu-items.d.ts +2 -0
- package/views/dist/controls/internal/menu-items.js +1 -1
- package/views/dist/controls/internal/part-slot.d.ts +1 -1
- package/views/dist/controls/internal/part-slot.js +1 -1
- package/views/dist/controls/internal/read-token.d.ts +2 -1
- package/views/dist/controls/internal/read-token.js +2 -1
- package/views/dist/controls/internal/row-actions.d.ts +33 -0
- package/views/dist/controls/internal/row-actions.js +28 -0
- package/views/dist/controls/menu/map-menu.js +1 -1
- package/views/dist/controls/number-editor/tokens.d.ts +8 -0
- package/views/dist/controls/number-editor/tokens.js +2 -0
- package/views/dist/controls/number-editor.css +20 -0
- package/views/dist/controls/popover/map-popover.d.ts +1 -1
- package/views/dist/controls/popover/map-popover.js +2 -2
- package/views/dist/controls/sheet/map-sheet.js +9 -6
- package/views/dist/controls/sort-editor/map-sort-body.js +1 -0
- package/views/dist/controls/sort-editor/sort-editor.d.ts +5 -1
- package/views/dist/controls/sort-editor/sort-editor.js +41 -13
- package/views/dist/controls/text-editor/tokens.d.ts +8 -0
- package/views/dist/controls/text-editor/tokens.js +2 -0
- package/views/dist/controls/text-editor.css +44 -2
- package/views/dist/controls/toolbar-button/atom-toolbar-button.d.ts +1 -1
- package/views/dist/controls/toolbar-button/atom-toolbar-button.js +2 -2
- package/views/dist/controls/tooltip/tooltip.js +2 -1
- package/views/dist/editors/EditorPanel.js +1 -1
- package/views/dist/field-row/FieldRow.js +46 -15
- package/views/dist/field-row/editors/RowChipsEditor.js +3 -1
- package/views/dist/field-row/editors/RowDateEditor.js +3 -1
- package/views/dist/field-row/editors/RowNameEditor.js +3 -1
- package/views/dist/field-row/editors/RowPlaceEditor.js +4 -2
- package/views/dist/field-row/editors/RowRangeEditor.js +3 -1
- package/views/dist/field-row/editors/RowRelationEditor.js +5 -2
- package/views/dist/field-row/editors/RowSelectEditor.js +3 -1
- package/views/dist/field-row/editors/RowTextEditor.d.ts +7 -1
- package/views/dist/field-row/editors/RowTextEditor.js +25 -4
- package/views/dist/field-row/editors/RowValueListEditor.js +4 -4
- package/views/dist/field-row/editors/row-place.d.ts +33 -0
- package/views/dist/field-row/editors/row-place.js +141 -0
- package/views/dist/field-row/field-row-button.d.ts +21 -6
- package/views/dist/field-row/field-row-button.js +8 -3
- package/views/dist/field-row/row-target.d.ts +4 -1
- package/views/dist/field-row/row-target.js +1 -1
- package/views/dist/fields/binding.d.ts +4 -0
- package/views/dist/grid/chrome/GridAggregateMenu.d.ts +12 -11
- package/views/dist/grid/chrome/GridAggregateMenu.js +4 -3
- package/views/dist/grid/chrome/GridCellEditors.d.ts +1 -1
- package/views/dist/grid/chrome/GridCellOutline.d.ts +13 -1
- package/views/dist/grid/chrome/GridCellOutline.js +17 -0
- package/views/dist/grid/chrome/GridFooter.d.ts +12 -4
- package/views/dist/grid/chrome/GridFooter.js +11 -9
- package/views/dist/grid/chrome/GridHeader.js +4 -3
- package/views/dist/grid/chrome/GridNumberEditor.js +2 -1
- package/views/dist/grid/chrome/GridResizeHandle.d.ts +7 -3
- package/views/dist/grid/chrome/GridResizeHandle.js +2 -3
- package/views/dist/grid/chrome/GridRowCells.js +1 -1
- package/views/dist/grid/chrome/GridStructure.js +3 -3
- package/views/dist/grid/chrome/GridTable.js +1 -1
- package/views/dist/grid/chrome/GridTableSurface.js +1 -1
- package/views/dist/grid/chrome/GridTextEditor.js +3 -1
- package/views/dist/grid/chrome/grid-body-place.d.ts +2 -4
- package/views/dist/grid/chrome/grid-body-place.js +4 -4
- package/views/dist/grid/chrome/grid-edit-session.d.ts +7 -3
- package/views/dist/grid/chrome/grid-edit-session.js +12 -3
- package/views/dist/grid/chrome/grid-editor-layer.d.ts +5 -4
- package/views/dist/grid/chrome/grid-figure-value.js +10 -4
- package/views/dist/grid/chrome/grid-row-props.d.ts +1 -1
- package/views/dist/grid/chrome/grid-table-props.d.ts +11 -3
- package/views/dist/grid/chrome/useGridKeyboard.d.ts +5 -1
- package/views/dist/grid/chrome/useGridKeyboard.js +9 -5
- package/views/dist/grid/chrome/useGridTableInteractionModel.d.ts +1 -1
- package/views/dist/grid/chrome/useGridTableInteractionModel.js +8 -3
- package/views/dist/grid/grid.css +7 -3
- package/views/dist/internal/length.d.ts +2 -0
- package/views/dist/internal/length.js +16 -0
- package/views/dist/internal/over-cell.d.ts +8 -0
- package/views/dist/internal/over-cell.js +5 -0
- package/views/dist/list/bar-keys.d.ts +5 -0
- package/views/dist/list/bar-keys.js +2 -0
- package/views/dist/list/bar-parts.d.ts +27 -0
- package/views/dist/list/bar-parts.js +38 -0
- package/views/dist/list/buttons/clear-save.d.ts +7 -0
- package/views/dist/list/buttons/clear-save.js +15 -0
- package/views/dist/list/buttons/customize.d.ts +28 -0
- package/views/dist/list/buttons/customize.js +31 -0
- package/views/dist/list/buttons/filter.d.ts +32 -0
- package/views/dist/list/buttons/filter.js +60 -0
- package/views/dist/list/buttons/new.d.ts +18 -0
- package/views/dist/list/buttons/new.js +9 -0
- package/views/dist/list/buttons/quick.d.ts +15 -0
- package/views/dist/list/buttons/quick.js +24 -0
- package/views/dist/list/buttons/search.d.ts +18 -0
- package/views/dist/list/buttons/search.js +17 -0
- package/views/dist/list/buttons/shared.d.ts +91 -0
- package/views/dist/list/buttons/shared.js +131 -0
- package/views/dist/list/buttons/sort-filter.d.ts +6 -0
- package/views/dist/list/buttons/sort-filter.js +16 -0
- package/views/dist/list/buttons/sort.d.ts +17 -0
- package/views/dist/list/buttons/sort.js +34 -0
- package/views/dist/list/buttons/views.d.ts +21 -0
- package/views/dist/list/buttons/views.js +36 -0
- package/views/dist/list/editor-menus.d.ts +13 -0
- package/views/dist/list/editor-menus.js +13 -0
- package/views/dist/list/index.d.ts +41 -0
- package/views/dist/list/index.js +19 -0
- package/views/dist/list/line.d.ts +55 -0
- package/views/dist/list/line.js +221 -0
- package/views/dist/list/pane-box.d.ts +6 -0
- package/views/dist/list/pane-box.js +15 -0
- package/views/dist/list/panels/customize.d.ts +8 -0
- package/views/dist/list/panels/customize.js +23 -0
- package/views/dist/list/panels/filter-bar.d.ts +12 -0
- package/views/dist/list/panels/filter-bar.js +67 -0
- package/views/dist/list/panels/filter.d.ts +8 -0
- package/views/dist/list/panels/filter.js +23 -0
- package/views/dist/list/panels/quick.d.ts +7 -0
- package/views/dist/list/panels/quick.js +16 -0
- package/views/dist/list/panels/shared.d.ts +25 -0
- package/views/dist/list/panels/shared.js +33 -0
- package/views/dist/list/panels/sort.d.ts +8 -0
- package/views/dist/list/panels/sort.js +19 -0
- package/views/dist/list/panels/views.d.ts +13 -0
- package/views/dist/list/panels/views.js +27 -0
- package/views/dist/list/ready.d.ts +35 -0
- package/views/dist/list/ready.js +7 -0
- package/views/dist/list/root-base.d.ts +17 -0
- package/views/dist/list/root-base.js +9 -1
- package/views/dist/list/root.js +2 -2
- package/views/dist/list/store.d.ts +19 -0
- package/views/dist/list/store.js +40 -1
- package/views/dist/list/toolbar-model.d.ts +95 -0
- package/views/dist/list/toolbar-model.js +177 -0
- package/views/dist/list/toolbar.js +140 -328
- package/views/dist/list/views-axis.js +15 -4
- package/views/dist/model/aggregates.d.ts +18 -8
- package/views/dist/model/aggregates.js +16 -22
- package/views/dist/panels/react/filter/FilterEditor.d.ts +3 -1
- package/views/dist/panels/react/filter/FilterEditor.js +2 -2
- package/views/dist/panels/react/filter/filter-body.d.ts +3 -1
- package/views/dist/panels/react/filter/filter-body.js +2 -2
- package/views/dist/panels/react/sort/SortEditor.d.ts +3 -1
- package/views/dist/panels/react/sort/SortEditor.js +4 -4
- package/views/dist/panels/react/toolbar/Toolbar.d.ts +80 -3
- package/views/dist/panels/react/toolbar/Toolbar.js +85 -52
- package/views/dist/panels/react/toolbar/ToolbarBarSorts.d.ts +9 -0
- package/views/dist/panels/react/toolbar/ToolbarBarSorts.js +57 -0
- package/views/dist/panels/react/toolbar/ToolbarFilterAdd.d.ts +4 -1
- package/views/dist/panels/react/toolbar/ToolbarFilterAdd.js +2 -2
- package/views/dist/panels/react/toolbar/ToolbarOptions.d.ts +30 -0
- package/views/dist/panels/react/toolbar/ToolbarOptions.js +6 -1
- package/views/dist/panels/react/toolbar/ToolbarSortPill.d.ts +5 -0
- package/views/dist/panels/react/toolbar/ToolbarSortPill.js +6 -4
- package/views/dist/panels/react/toolbar/ToolbarViews.d.ts +7 -1
- package/views/dist/panels/react/toolbar/ToolbarViews.js +4 -4
- package/views/dist/panels/react/toolbar/sheet-host.d.ts +3 -0
- package/views/dist/panels/react/toolbar/sheet-host.js +6 -0
- package/views/dist/panels/react/toolbar/use-give-way.d.ts +6 -0
- package/views/dist/panels/react/toolbar/use-give-way.js +8 -1
- package/views/dist/panels/react/views-row/ViewPicker.d.ts +8 -1
- package/views/dist/panels/react/views-row/ViewPicker.js +12 -7
- package/views/dist/panels/settings/filter-groups.js +7 -0
- package/views/dist/provider/components.d.ts +38 -3
- package/views/dist/react.d.ts +1 -1
- package/views/dist/selection/bar-overflow.d.ts +2 -0
- package/views/dist/selection/bar-overflow.js +2 -1
- package/views/dist/selection/bar-props.d.ts +1 -1
- package/views/dist/selection/verbs.d.ts +2 -2
- package/views/dist/styles.css +268 -5
- package/views/dist/styles.unlayered.css +268 -5
- package/views/docs/contract.md +29 -15
- package/views/docs/controls/field.md +1 -0
- package/views/docs/controls/filter-editor.md +1 -1
- package/views/docs/controls/menu.md +1 -1
- package/views/docs/controls/number-editor.md +2 -0
- package/views/docs/controls/sort-editor.md +1 -1
- package/views/docs/controls/text-editor.md +2 -0
- package/views/docs/guides/atoms.md +1 -0
- package/views/docs/guides/selection.md +1 -1
- package/views/docs/guides/the-grid.md +3 -3
- package/views/docs/reference/controls.md +3 -3
- package/views/docs/reference/field-row.md +1 -1
- package/views/docs/reference/grid.md +4 -4
- package/views/docs/reference/list.md +168 -6
- package/views/docs/reference/looks.md +1 -1
- package/views/docs/reference/panels-react.md +7 -7
- package/views/docs/reference/react.md +13 -10
- package/views/docs/reference/selection.md +1 -1
- package/views/docs/reference/views.md +9 -7
- package/views/skills/views/SKILL.md +2 -1
|
@@ -9,9 +9,10 @@ export function BlockHead({ id, label, items, value, onPick, size, step }) {
|
|
|
9
9
|
return (_jsxs("div", { className: "o-filter-editor-block-head", "data-slot": "vk-filter-group-head", "data-block-head": id, children: [_jsxs("span", { className: "o-filter-editor-relation", children: [label, ":"] }), _jsx(Select, { size: size, listWidth: "rows", "aria-label": label, "data-slot": "vk-filter-quantifier", items: items, value: value, ...(step ?? {}), onValueChange: (v) => { if (typeof v === "string" && v !== value)
|
|
10
10
|
onPick(v); } })] }));
|
|
11
11
|
}
|
|
12
|
-
export function GroupMenu({ entries, words }) {
|
|
13
|
-
const { Button, Menu } = usePanelControls();
|
|
14
|
-
|
|
12
|
+
export function GroupMenu({ entries, words, label = words.groupActions, disabled }) {
|
|
13
|
+
const { Button, Menu, Tooltip } = usePanelControls();
|
|
14
|
+
const trigger = _jsx(Button, { kind: "quiet", shape: "icon", size: "xs", look: MORE_LOOK, className: "o-filter-editor-more", "data-slot": "vk-filter-group-more", "aria-label": label, icon: glyph(DOTS_UP), ...(disabled && { disabled: true, focusableWhenDisabled: true }) });
|
|
15
|
+
return disabled ? _jsx(Tooltip, { label: disabled, reason: true, side: "top", children: trigger }) : _jsx(Menu, { label: words.groupActions, align: "end", entries: entries, trigger: trigger });
|
|
15
16
|
}
|
|
16
17
|
export function MenuStep({ label, entries, onClose, words }) {
|
|
17
18
|
const closing = (e) => {
|
|
@@ -14,19 +14,27 @@ export interface FilterOwn {
|
|
|
14
14
|
value: string | null;
|
|
15
15
|
body: React.ReactNode | null;
|
|
16
16
|
}
|
|
17
|
-
/** The filter editor's own menus' context (VK-1063): a rule's or a group's, by the editor's own ids. Its map hands the app the
|
|
17
|
+
/** The filter editor's own menus' context (VK-1063): a rule's or a group's, by the editor's own ids; a rule's end and a foot (VK-1065). Its map hands the app the
|
|
18
18
|
* ViewKit filter's public terms instead (`ViewsFilterEditorItemsContext`). */
|
|
19
19
|
export type FilterEditorItemsContext = ({
|
|
20
20
|
menu: "rule" | "aside";
|
|
21
21
|
rule: string;
|
|
22
|
+
} | {
|
|
23
|
+
menu: "row";
|
|
24
|
+
rule: string;
|
|
25
|
+
aside?: true;
|
|
22
26
|
} | {
|
|
23
27
|
menu: "group";
|
|
24
28
|
group: string;
|
|
29
|
+
} | {
|
|
30
|
+
menu: "foot";
|
|
31
|
+
group: string;
|
|
25
32
|
}) & {
|
|
26
33
|
form: "computer" | "phone";
|
|
27
34
|
};
|
|
28
35
|
export interface FilterEditorProps {
|
|
29
|
-
/** Its menus as data (VK-1063): a rule's ⋮, a set-aside rule's and a group's actions, handed their default items
|
|
36
|
+
/** Its menus as data (VK-1063): a rule's ⋮, a set-aside rule's and a group's actions, handed their default items; and (VK-1065) a
|
|
37
|
+
* rule's end (`row`) and each foot (`foot`, by its group). */
|
|
30
38
|
items?: (items: ViewsMenuItem[], ctx: FilterEditorItemsContext) => ViewsMenuItem[];
|
|
31
39
|
/** What it filters, as its shell names it ("Filter"): the Sheet's title on a phone, and the rules' name to a screen reader. */
|
|
32
40
|
label: string;
|
|
@@ -60,6 +68,9 @@ export interface FilterEditorProps {
|
|
|
60
68
|
excludable?: boolean;
|
|
61
69
|
/** Its words; English unless handed. */
|
|
62
70
|
words?: Partial<FilterEditorWords>;
|
|
71
|
+
/** What its computer form shows with nothing filtered (VK-1091): the fields, a pick adding its rule (`fields`, the default), or
|
|
72
|
+
* that nothing is filtered yet, with Add filter (`editor`), as its stacked forms do. */
|
|
73
|
+
empty?: "fields" | "editor";
|
|
63
74
|
}
|
|
64
75
|
export interface FilterEditorParts {
|
|
65
76
|
body: React.ReactNode;
|
|
@@ -8,6 +8,7 @@ import { PhoneHost, phoneMark, usePhone } from "../internal/phone.js";
|
|
|
8
8
|
import { usePanelControls } from "../internal/panel-controls.js";
|
|
9
9
|
import { openerAt, useStepReturn } from "../internal/step-return.js";
|
|
10
10
|
import { shapeMenu } from "../internal/menu-items.js";
|
|
11
|
+
import { shapeActions } from "../internal/row-actions.js";
|
|
11
12
|
import { Picker, usePicker } from "../picker/picker.js";
|
|
12
13
|
import { FieldsFrame } from "../picker/fields-frame.js";
|
|
13
14
|
import { itemLabel } from "../picker/rows.js";
|
|
@@ -37,6 +38,7 @@ function OwnValue({ name, own, open, onOpenChange, phone, size, placeholder }) {
|
|
|
37
38
|
} } }), !phone && takes && (_jsx(Popover, { open: open, onOpenChange: (o) => onOpenChange(o), anchor: box, className: "w-fit", "aria-label": name, children: own.body }))] }));
|
|
38
39
|
}
|
|
39
40
|
const RULE_KEYS = new Set(["convert", "relation", "delete", "why", "put-back"]), GROUP_KEYS = new Set(["exclude"]);
|
|
41
|
+
const ROW_KEYS = new Set(["more"]), FOOT_KEYS = new Set(["add", "clear", "delete", "more"]);
|
|
40
42
|
export function useFilterEditor(props) {
|
|
41
43
|
const { label, fields, filter, onFilterChange, onDone, standing = false, ids, levels, items } = props;
|
|
42
44
|
const deepest = levels ?? FILTER_DEPTH;
|
|
@@ -102,10 +104,10 @@ export function useFilterEditor(props) {
|
|
|
102
104
|
root?.focus({ preventScroll: true });
|
|
103
105
|
const next = removeRule(now.current, id);
|
|
104
106
|
change(next);
|
|
105
|
-
if (way === "computer" && !next.rules.length)
|
|
107
|
+
if (way === "computer" && !next.rules.length && props.empty !== "editor")
|
|
106
108
|
onDone?.();
|
|
107
109
|
};
|
|
108
|
-
const clear = () => { change(clearAll(now.current)); if (way === "computer")
|
|
110
|
+
const clear = () => { change(clearAll(now.current)); if (way === "computer" && props.empty !== "editor")
|
|
109
111
|
onDone?.(); };
|
|
110
112
|
const set = (id) => (v) => change(changeRule(now.current, id, { value: v }, fields));
|
|
111
113
|
const decide = useDecide(now, change, onDone, { close: w.close, save: w.save }), placed = decide.place;
|
|
@@ -113,13 +115,14 @@ export function useFilterEditor(props) {
|
|
|
113
115
|
const room = useStandingRoom(root, "[data-filter-shown]", phone, [standing, props.at]);
|
|
114
116
|
const [adding, setAdding] = React.useState(null);
|
|
115
117
|
const gone = filter.relation?.gone;
|
|
116
|
-
const addButton = (group, kind, size) => {
|
|
117
|
-
const
|
|
118
|
+
const addButton = (group, kind, size, shown) => {
|
|
119
|
+
const why = shown?.disabled ?? gone;
|
|
120
|
+
const add = (_jsx(Button, { kind: kind, size: size, icon: shown?.icon ?? glyph(PLUS), className: "o-filter-editor-add", "data-slot": "vk-filter-add", "data-add-to": group, "aria-haspopup": "dialog", "aria-disabled": why ? true : undefined, "aria-expanded": phone ? step?.list === "add" && step.group === group : adding?.group === group, onClick: (e) => { if (why)
|
|
118
121
|
return; const at = e.currentTarget; if (phone)
|
|
119
122
|
setStep({ list: "add", group });
|
|
120
123
|
else
|
|
121
|
-
setAdding((a) => (a?.group === group ? null : { group, at })); }, children: w.add }));
|
|
122
|
-
return
|
|
124
|
+
setAdding((a) => (a?.group === group ? null : { group, at })); }, children: shown?.label ?? w.add }));
|
|
125
|
+
return why ? _jsx(Tooltip, { label: why, reason: true, side: "bottom", children: _jsx("span", { className: "o-filter-editor-why", children: add }) }) : add;
|
|
123
126
|
};
|
|
124
127
|
const stepRule = step && "rule" in step ? rulesOf(filter).find((x) => x.id === step.rule) : undefined;
|
|
125
128
|
const stepField = stepRule ? fieldOf(fields, stepRule.field) : undefined;
|
|
@@ -175,7 +178,18 @@ export function useFilterEditor(props) {
|
|
|
175
178
|
: stepDate && stepRule ? _jsx(DateStep, { name: labelOf(stepRule), value: typeof stepRule.value === "string" ? stepRule.value : null, onValue: set(stepRule.id), onDone: back })
|
|
176
179
|
: stepList.body;
|
|
177
180
|
const size = phone ? "lg" : "sm";
|
|
178
|
-
const moreStep = (id, label, slot) => (_jsx(Button, { kind: "quiet", shape: "icon", size: "40x44", look: DOTS_LOOK, className: "o-filter-editor-more", "data-slot": slot, "data-more-of": id, "aria-label": label, "aria-haspopup": "dialog", icon: glyph(DOTS), onClick: () => setStep({ list: "menu", item: id }) }));
|
|
181
|
+
const moreStep = (id, label, slot, disabled) => (_jsx(Button, { kind: "quiet", shape: "icon", size: "40x44", look: DOTS_LOOK, className: "o-filter-editor-more", "data-slot": slot, "data-more-of": id, "aria-label": label, "aria-haspopup": "dialog", icon: glyph(DOTS), ...(disabled ? { disabled, focusableWhenDisabled: true } : { onClick: () => setStep({ list: "menu", item: id }) }) }));
|
|
182
|
+
const ctxForm = phone ? "phone" : "computer";
|
|
183
|
+
const rowLook = phone ? { slot: "vk-filter-row-action", size: "40x44", look: DOTS_LOOK } : { slot: "vk-filter-row-action", size: "xs", look: MORE_LOOK };
|
|
184
|
+
const footLook = { slot: "vk-filter-foot-action", size: phone ? "44" : "sm" };
|
|
185
|
+
const greyed = (why, node) => _jsx(Tooltip, { label: why, reason: true, side: "top", children: node });
|
|
186
|
+
const footOf = (group, own) => shapeActions(own.filter((o) => !!o), items, { menu: "foot", group, form: ctxForm }, FOOT_KEYS, footLook);
|
|
187
|
+
const addOwn = (group, kind, size) => ({ key: "add", label: w.add, icon: glyph(PLUS), ...(gone && { disabled: gone }), draw: (shown) => addButton(group, kind, size, shown) });
|
|
188
|
+
const quietOwn = (key, label, className, slot, size, onClick) => ({ key, label, draw: (shown) => {
|
|
189
|
+
const b = _jsx(Button, { kind: "quiet", size: size, className: className, "data-slot": slot, ...(shown?.disabled && { disabled: true, focusableWhenDisabled: true }), onClick: onClick, children: shown?.label ?? label });
|
|
190
|
+
return shown?.disabled ? greyed(shown.disabled, b) : b;
|
|
191
|
+
} });
|
|
192
|
+
const moreOwn = (g) => ({ key: "more", label: w.groupActions, icon: glyph(phone ? DOTS : DOTS_UP), draw: (shown) => groupMore(g, shown) });
|
|
179
193
|
const stepOf = (s) => (phone ? { open: false, onOpenChange: (o) => { if (o)
|
|
180
194
|
setStep(s); } } : {});
|
|
181
195
|
const valueBox = (r, field, takes, own) => {
|
|
@@ -225,28 +239,44 @@ export function useFilterEditor(props) {
|
|
|
225
239
|
const entries = ruleEntries(r), fieldItems = asSelect(fieldsIn(filter, r.id, fields, deepest));
|
|
226
240
|
const why = (node) => (aside ? _jsx(Tooltip, { label: aside.why, reason: true, side: "bottom", children: _jsx("span", { className: "o-filter-editor-why", children: node }) }) : node);
|
|
227
241
|
const wayPlaceholder = own && !kitWay ? own.way : w.way(r.how);
|
|
228
|
-
return (_jsxs("div", { className: "o-filter-editor-rule", "data-slot": "vk-filter-rule", "data-key": r.field, "data-rule": r.id, "data-whole": (field || own) && isWhole(r, fields) ? "" : undefined, "data-set-aside": aside || (!field && !own) ? "" : undefined, "data-aside": aside ? "" : undefined, children: [_jsxs("div", { className: "o-filter-editor-boxes", children: [_jsx("div", { className: "o-filter-editor-field", children: why(_jsx(Select, { size: size, listWidth: "rows", "aria-label": w.field, "data-slot": "vk-filter-field", items: fieldItems, value: field && !aside ? r.field : null, placeholder: name, search: w.search, ...stepOf({ list: "field", rule: r.id }), onValueChange: (v) => { if (typeof v === "string" && (v !== r.field || aside))
|
|
242
|
+
return (_jsxs("div", { className: "o-filter-editor-rule", "data-slot": "vk-filter-rule", "data-key": field?.key ?? r.field, "data-rule": r.id, "data-whole": (field || own) && isWhole(r, fields) ? "" : undefined, "data-set-aside": aside || (!field && !own) ? "" : undefined, "data-aside": aside ? "" : undefined, children: [_jsxs("div", { className: "o-filter-editor-boxes", children: [_jsx("div", { className: "o-filter-editor-field", children: why(_jsx(Select, { size: size, listWidth: "rows", "aria-label": w.field, "data-slot": "vk-filter-field", items: fieldItems, value: field && !aside ? r.field : null, placeholder: name, search: w.search, ...stepOf({ list: "field", rule: r.id }), onValueChange: (v) => { if (typeof v === "string" && (v !== r.field || aside))
|
|
229
243
|
pointAt(r.id, v); } })) }), _jsx("div", { className: "o-filter-editor-how", children: why(_jsx(Select, { size: size, listWidth: "rows", "aria-label": w.how, "data-slot": "vk-filter-how", items: ways, value: field && kitWay && !aside ? r.how : null, placeholder: wayPlaceholder, disabled: !!aside || (!field && !!own), ...(field || !own ? stepOf({ list: "how", rule: r.id }) : {}), onValueChange: (v) => { if (typeof v === "string" && v !== r.how)
|
|
230
|
-
change(changeRule(now.current, r.id, { how: v }, fields)); } })) }), aside && own?.value != null && (_jsx("div", { className: "o-filter-editor-value", "data-slot": "vk-filter-value", "data-value-of": r.id, "data-value-box": "own", children: why(_jsx(Input, { readOnly: true, disabled: true, size: size, "aria-label": name, value: own.value, className: "o-filter-editor-own-box" })) })), !aside && takes && takes !== "none" && (field || own) && (_jsx("div", { className: "o-filter-editor-value", "data-slot": "vk-filter-value", "data-value-of": r.id, "data-value-box": own ? "own" : field?.choices ? "choice" : takes === "two" ? "pair" : field?.type === "date" ? "date" : "typed", children: valueBox(r, field ?? { value: r.field, label: name, type: "text" }, takes, own) }))] }),
|
|
231
|
-
|
|
244
|
+
change(changeRule(now.current, r.id, { how: v }, fields)); } })) }), aside && own?.value != null && (_jsx("div", { className: "o-filter-editor-value", "data-slot": "vk-filter-value", "data-value-of": r.id, "data-value-box": "own", children: why(_jsx(Input, { readOnly: true, disabled: true, size: size, "aria-label": name, value: own.value, className: "o-filter-editor-own-box" })) })), !aside && takes && takes !== "none" && (field || own) && (_jsx("div", { className: "o-filter-editor-value", "data-slot": "vk-filter-value", "data-value-of": r.id, "data-value-box": own ? "own" : field?.choices ? "choice" : takes === "two" ? "pair" : field?.type === "date" ? "date" : "typed", children: valueBox(r, field ?? { value: r.field, label: name, type: "text" }, takes, own) }))] }), shapeActions([{ key: "more", label: w.ruleOf(name), icon: glyph(phone ? DOTS : DOTS_UP), draw: (shown) => {
|
|
245
|
+
const label = shown?.label ?? w.ruleOf(name);
|
|
246
|
+
if (phone)
|
|
247
|
+
return shown?.disabled ? greyed(shown.disabled, moreStep(r.id, label, "vk-filter-rule-more", true)) : moreStep(r.id, label, "vk-filter-rule-more");
|
|
248
|
+
const trigger = _jsx(Button, { kind: "quiet", shape: "icon", size: "xs", look: MORE_LOOK, className: "o-filter-editor-more", "data-slot": "vk-filter-rule-more", "aria-label": label, icon: glyph(DOTS_UP), ...(shown?.disabled && { disabled: true, focusableWhenDisabled: true }) });
|
|
249
|
+
return shown?.disabled ? greyed(shown.disabled, trigger) : _jsx(Menu, { label: w.ruleOf(name), align: "end", entries: entries, trigger: trigger });
|
|
250
|
+
} }], items, { menu: "row", rule: r.id, ...(r.aside && { aside: true }), form: ctxForm }, ROW_KEYS, rowLook)] }));
|
|
232
251
|
};
|
|
233
252
|
const lead = (g, i) => i === 0 ? _jsx("span", { className: "o-filter-editor-where", "data-slot": "vk-filter-where", children: w.where })
|
|
234
253
|
: i === 1 && !g.exclude ? _jsx(Button, { kind: "outline", size: "sm", className: "o-filter-editor-join", "data-slot": "vk-filter-join", iconEnd: glyph(TURNS), onClick: () => change(setJoin(now.current, g.id, g.join === "and" ? "or" : "and")), children: w.join(g.join) })
|
|
235
254
|
: _jsx("span", { className: "o-filter-editor-joined", "data-slot": "vk-filter-joined", children: w.join(g.join) });
|
|
236
255
|
const blockHead = (g) => g.relation && (_jsx(BlockHead, { id: g.id, label: blockLabel(g), items: quantifiersOf(g), value: g.relation.quantifier, size: size, onPick: (q) => change(setQuantifier(now.current, g.id, q)), ...(phone ? { step: { open: false, onOpenChange: (o) => { if (o)
|
|
237
256
|
setStep({ list: "quantifier", group: g.id }); } } } : {}) }));
|
|
238
|
-
const groupMore = (g
|
|
257
|
+
const groupMore = (g, shown) => {
|
|
258
|
+
const label = shown?.label ?? w.groupActions;
|
|
259
|
+
if (phone)
|
|
260
|
+
return shown?.disabled ? greyed(shown.disabled, moreStep(g.id, label, "vk-filter-group-more", true)) : moreStep(g.id, label, "vk-filter-group-more");
|
|
261
|
+
return _jsx(GroupMenu, { entries: groupEntries(g), words: w, ...(shown && { label }), ...(shown?.disabled && { disabled: shown.disabled }) });
|
|
262
|
+
};
|
|
239
263
|
const top = _jsxs(_Fragment, { children: [filter.exclude && _jsx("p", { className: "o-filter-editor-excluded", "data-slot": "vk-filter-excluded", children: w.excluded }), blockHead(filter)] });
|
|
240
|
-
const level = (g, depth) => (_jsx("div", { className: "o-filter-editor-rules", "data-slot": "vk-filter-rules", role: "list", "aria-label": depth ? w.group : label, children: g.rules.map((item, i) => (_jsxs("div", { role: "listitem", className: "o-filter-editor-item", "data-slot": "vk-filter-item", "data-index": i, children: [lead(g, i), isBlock(item) ? (_jsxs("div", { className: "o-filter-editor-group o-filter-editor-block", "data-slot": "vk-filter-group", "data-group": item.id, "data-block": item.id, children: [blockHead(item), level(item, depth + 1),
|
|
264
|
+
const level = (g, depth) => (_jsx("div", { className: "o-filter-editor-rules", "data-slot": "vk-filter-rules", role: "list", "aria-label": depth ? w.group : label, children: g.rules.map((item, i) => (_jsxs("div", { role: "listitem", className: "o-filter-editor-item", "data-slot": "vk-filter-item", "data-index": i, children: [lead(g, i), isBlock(item) ? (_jsxs("div", { className: "o-filter-editor-group o-filter-editor-block", "data-slot": "vk-filter-group", "data-group": item.id, "data-block": item.id, children: [blockHead(item), level(item, depth + 1), _jsx("div", { className: "o-filter-editor-foot", "data-slot": "vk-filter-foot", children: footOf(item.id, [addOwn(item.id, stacked ? "quiet" : "outline", phone ? "44" : "sm"),
|
|
265
|
+
quietOwn("delete", w.deleteRule, "o-filter-editor-delete", "vk-filter-delete", phone ? "44" : "sm", () => remove(item.id))]) })] })) : isGroup(item) ? (_jsxs("div", { className: "o-filter-editor-group", "data-slot": "vk-filter-group", "data-group": item.id, children: [item.exclude && _jsx("p", { className: "o-filter-editor-excluded", "data-slot": "vk-filter-excluded", children: w.excluded }), level(item, depth + 1), _jsx("div", { className: "o-filter-editor-foot", "data-slot": "vk-filter-foot", children: footOf(item.id, [addOwn(item.id, stacked ? "quiet" : "outline", phone ? "44" : "sm"),
|
|
266
|
+
quietOwn("delete", w.deleteGroup, "o-filter-editor-delete", "vk-filter-delete", phone ? "44" : "sm", () => remove(item.id)), moreOwn(item)]) })] })) : ruleRow(item)] }, item.id))) }));
|
|
241
267
|
const addingPopover = !standing && (_jsx(Popover, { open: !!adding, onOpenChange: (o) => { if (!o)
|
|
242
268
|
setAdding(null); }, anchor: adding?.at, className: "w-fit min-w-0", "aria-label": w.add, children: adding && _jsx(FieldsFrame, { children: _jsx(Picker, { label: w.add, items: fieldsIn(filter, adding.group, fields, deepest), value: null, onValueChange: (v) => add(adding.group, v), onDone: () => setAdding(null), search: w.search, searchShown: true, form: "computer", ...words }) }) }));
|
|
243
269
|
if (stacked) {
|
|
244
270
|
const body = (_jsx("div", { ref: placeRoot, className: "o-filter-editor", "data-slot": "vk-filter", "data-kit": "filter-editor", "data-filter-form": way, role: phone ? undefined : "group", "aria-label": phone ? undefined : label, tabIndex: -1, style: room ? { paddingBottom: room } : undefined, ...phoneMark(!!screen || small), "data-filter-step": stepTitle !== undefined ? step?.list : undefined, children: stepTitle !== undefined ? stepBody : _jsxs(_Fragment, { children: [top, filter.rules.length ? level(filter, 0)
|
|
245
|
-
: _jsxs("div", { className: "o-filter-editor-none", "data-slot": "vk-filter-none", children: [_jsx("p", { className: "o-filter-editor-none-head", children: w.none }), _jsx("p", { className: "o-filter-editor-none-line", children: w.noneLine })] }),
|
|
271
|
+
: _jsxs("div", { className: "o-filter-editor-none", "data-slot": "vk-filter-none", children: [_jsx("p", { className: "o-filter-editor-none-head", children: w.none }), _jsx("p", { className: "o-filter-editor-none-line", children: w.noneLine })] }), _jsx("div", { className: "o-filter-editor-acts", "data-slot": "vk-filter-foot", children: footOf(filter.id, [addOwn(filter.id, filter.rules.length ? "outline" : "primary", phone ? "44" : "sm"),
|
|
272
|
+
props.clearAll !== false && filter.rules.length > 0 && quietOwn("clear", w.clearAll, "o-filter-editor-clear", "vk-filter-clear", phone ? "44" : "sm", clear),
|
|
273
|
+
props.excludable && moreOwn(filter)]) }), !phone && addingPopover] }) }));
|
|
246
274
|
return { body, head: !phone ? {} : stepTitle !== undefined ? { onBack: back } : decide.head, ...(stepTitle !== undefined ? { title: stepTitle } : {}) };
|
|
247
275
|
}
|
|
248
|
-
const
|
|
249
|
-
const
|
|
276
|
+
const nothing = !filter.rules.length && !filter.relation;
|
|
277
|
+
const fieldsAlone = nothing && props.empty !== "editor";
|
|
278
|
+
const body = (_jsx("div", { ref: placeRoot, className: "o-filter-editor", "data-slot": "vk-filter", "data-kit": "filter-editor", "data-filter-form": "computer", role: "group", "aria-label": label, tabIndex: -1, "data-filter-fields": fieldsAlone ? "" : undefined, style: room ? { paddingBottom: room } : undefined, ...phoneMark(!!screen || small), children: nothing && !fieldsAlone ? _jsxs(_Fragment, { children: [top, _jsxs("div", { className: "o-filter-editor-none", "data-slot": "vk-filter-none", children: [_jsx("p", { className: "o-filter-editor-none-head", children: w.none }), _jsx("p", { className: "o-filter-editor-none-line", children: w.noneLine })] }), _jsx("div", { className: "o-filter-editor-foot", "data-slot": "vk-filter-foot", children: footOf(filter.id, [addOwn(filter.id, "primary", "sm")]) }), addingPopover] }) : !fieldsAlone ? _jsxs(_Fragment, { children: [top, level(filter, 0), _jsx("div", { className: "o-filter-editor-foot", "data-slot": "vk-filter-foot", children: footOf(filter.id, [addOwn(filter.id, "outline", "sm"), props.clearAll !== false && quietOwn("clear", w.clearAllFilters, "o-filter-editor-clear", "vk-filter-clear", "sm", clear),
|
|
279
|
+
props.excludable && moreOwn(filter)]) }), addingPopover] }) : (_jsx(FieldsFrame, { children: _jsx(Picker, { label: label, items: fields, value: null, onValueChange: (v) => add(filter.id, v), search: w.search, searchShown: true, form: "computer", ...words }) })) }));
|
|
250
280
|
return { body, head: {} };
|
|
251
281
|
}
|
|
252
282
|
export const useFilterEditorParts = useFilterEditor;
|
|
@@ -10,12 +10,14 @@ export interface FilterWay {
|
|
|
10
10
|
}
|
|
11
11
|
/** A field a list filters by: the Picker's item, with its type; a choice's values (a stage's, a person's, a record's), each a
|
|
12
12
|
* Picker's item with its mark; a related record's fields one level in (a deal's Company), each typed too; a number that
|
|
13
|
-
* holds whole numbers only (`integer`), whose box rounds what is typed
|
|
13
|
+
* holds whole numbers only (`integer`), whose box rounds what is typed; and its public name (`key`), the `data-key` a rule on
|
|
14
|
+
* it draws, where its `value` is no name a stylesheet can hold (absent, its `value`). */
|
|
14
15
|
export interface FilterField extends PickerItem {
|
|
15
16
|
type: FieldType;
|
|
16
17
|
choices?: PickerItem[];
|
|
17
18
|
level?: FilterField[];
|
|
18
19
|
integer?: boolean;
|
|
20
|
+
key?: string;
|
|
19
21
|
}
|
|
20
22
|
/** Each type's ways, in the order they are offered; the first is a new rule's. */
|
|
21
23
|
export declare const HOW: Record<FieldType, FilterWay[]>;
|
|
@@ -139,14 +139,15 @@ export function useMapFilterBody(p, words, say, AppIcon, wayWord) {
|
|
|
139
139
|
const publicOf = (ctx) => {
|
|
140
140
|
const paths = new Map();
|
|
141
141
|
viewKitFilterOf(read.filter, kit, read.kept, read.raw, paths);
|
|
142
|
-
if (ctx.menu === "group")
|
|
143
|
-
return { menu:
|
|
142
|
+
if (ctx.menu === "group" || ctx.menu === "foot")
|
|
143
|
+
return { menu: ctx.menu, path: paths.get(ctx.group) ?? [], form: ctx.form };
|
|
144
144
|
const rule = rulesOf(read.filter).find((r) => r.id === ctx.rule), place = rule && kit.at.get(rule.field), node = read.raw.get(ctx.rule);
|
|
145
145
|
const inner = node && (isRelation(node.node) ? node.node.where.items[0] : node.node);
|
|
146
146
|
const field = place?.fieldKey ?? inner?.fieldKey ?? (node && isRelation(node.node) ? node.node.fieldKey : "");
|
|
147
147
|
const part = place ? place.part : inner?.part;
|
|
148
148
|
const relation = place ? place.relation ?? within : node && isRelation(node.node) ? node.node.fieldKey : node?.relation ?? within;
|
|
149
|
-
|
|
149
|
+
const named = { field, ...(part != null && { part }), ...(relation !== undefined && relation !== field && { relation }), path: paths.get(ctx.rule) ?? [], form: ctx.form };
|
|
150
|
+
return ctx.menu === "row" ? { menu: "row", ...named, ...(ctx.aside && { aside: true }) } : { menu: ctx.menu, ...named };
|
|
150
151
|
};
|
|
151
152
|
const items = p.items && ((is, ctx) => p.items(is, publicOf(ctx)));
|
|
152
153
|
return { kit, filter: read.filter, change: (next) => write(next), own: ownOf, ...(items && { items }) };
|
|
@@ -161,7 +162,7 @@ function FilterBodyInner(props) {
|
|
|
161
162
|
const wayWord = (operator) => (views?.conventions ? views.conventions.messages({ key: "filter.operator", values: { operator } }) : operator.replace(/_/g, " "));
|
|
162
163
|
const map = useMapFilterBody(props, words, say, views?.components.AppIcon, wayWord);
|
|
163
164
|
const parts = useFilterEditor({ ...(map.items && { items: map.items }), label: props.label, fields: map.kit.fields, filter: map.filter, levels: props.levels, form: props.form, onDone: props.onDone,
|
|
164
|
-
onFilterChange: map.change, own: map.own, words, excludable: props.excludable });
|
|
165
|
+
onFilterChange: map.change, own: map.own, words, excludable: props.excludable, ...(props.empty && { empty: props.empty }) });
|
|
165
166
|
useToldStep(parts, props.onStepChange);
|
|
166
167
|
const { actions } = props;
|
|
167
168
|
if (!actions)
|
|
@@ -57,7 +57,8 @@ export type KitFields = {
|
|
|
57
57
|
export type ChoicesOf = (fieldKey: string, relation?: string, part?: string) => PickerItem[] | undefined;
|
|
58
58
|
/** The heading the related records stand under, ViewKit's own English (views.panels.related-records). */
|
|
59
59
|
export declare const RELATED = "Related records";
|
|
60
|
-
/** A related record's field as one value of the kit's: the relation's row and the far field's key; and back.
|
|
60
|
+
/** A related record's field as one value of the kit's: the relation's row and the far field's key; and back. Its public name, the
|
|
61
|
+
* `data-key` its rule draws, joins the two with a dot (`company.industry`), as the kit's own fields name a level (VK-1108). */
|
|
61
62
|
export declare const pathOf: (relationKey: string, farKey: string) => string;
|
|
62
63
|
export declare const pathParts: (value: string) => [string, string?];
|
|
63
64
|
/** The fields ViewKit hands as the kit's filter editor takes them: each of a type it draws, a part by its own type, a choice's values
|
|
@@ -28,7 +28,7 @@ export const pathParts = (value) => {
|
|
|
28
28
|
const placeOf = (a) => [a.relation ?? "", a.fieldKey, a.part ?? ""].join(SEP);
|
|
29
29
|
export function kitFieldsOf(fields, choices, relation) {
|
|
30
30
|
const at = new Map();
|
|
31
|
-
const field = (f, value, place, from) => {
|
|
31
|
+
const field = (f, value, place, from, key) => {
|
|
32
32
|
const type = kitPartTypeOf(f.type, f.part);
|
|
33
33
|
if (f.disabled !== undefined)
|
|
34
34
|
return [{ value, label: f.label, type: type ?? "text", disabled: true, line: f.disabled }];
|
|
@@ -39,7 +39,7 @@ export function kitFieldsOf(fields, choices, relation) {
|
|
|
39
39
|
}
|
|
40
40
|
const values = type === "checkbox" ? CHECKED : CHOICE.has(type) ? choices(f.fieldKey, from, f.part) : undefined;
|
|
41
41
|
at.set(value, place);
|
|
42
|
-
return [{ value, label: f.label, type, ...(values ? { choices: values } : {}), ...(f.integer ? { integer: true } : {}) }];
|
|
42
|
+
return [{ value, label: f.label, type, ...(values ? { choices: values } : {}), ...(f.integer ? { integer: true } : {}), ...(key !== undefined ? { key } : {}) }];
|
|
43
43
|
};
|
|
44
44
|
const own = (f, from) => field(f, f.key, { fieldKey: f.fieldKey, ...(f.part !== undefined ? { part: f.part } : {}) }, from);
|
|
45
45
|
const relations = new Map(), relationLabels = new Map();
|
|
@@ -47,7 +47,7 @@ export function kitFieldsOf(fields, choices, relation) {
|
|
|
47
47
|
return { fields: (fields.find((f) => f.far && f.fieldKey === relation)?.far ?? []).flatMap((f) => own(f, relation)), at, relations };
|
|
48
48
|
const list = fields.filter((f) => !f.far).flatMap((f) => own(f));
|
|
49
49
|
const related = fields.filter((f) => f.far).flatMap((r) => {
|
|
50
|
-
const level = (r.far ?? []).flatMap((f) => field(f, pathOf(r.key, f.key), { fieldKey: f.fieldKey, ...(f.part !== undefined ? { part: f.part } : {}), relation: r.fieldKey }, r.fieldKey));
|
|
50
|
+
const level = (r.far ?? []).flatMap((f) => field(f, pathOf(r.key, f.key), { fieldKey: f.fieldKey, ...(f.part !== undefined ? { part: f.part } : {}), relation: r.fieldKey }, r.fieldKey, `${r.key}.${f.key}`));
|
|
51
51
|
relations.set(r.fieldKey, r.key);
|
|
52
52
|
if (!level.length) {
|
|
53
53
|
relationLabels.set(r.fieldKey, r.label);
|
|
@@ -64,6 +64,7 @@ const IconCheck = glyph(["M5 12l5 5l10 -10"]);
|
|
|
64
64
|
const IconAlertTriangle = glyph(["M12 9v4", "M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0", "M12 16h.01"]);
|
|
65
65
|
const IconGripVertical = glyph(["M8 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "M8 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "M8 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "M14 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "M14 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", "M14 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"]);
|
|
66
66
|
const IconArrowUpRight = glyph(["M17 7l-10 10", "M8 7l9 0l0 9"]);
|
|
67
|
+
const IconArrowsDiagonal = glyph(["M16 4l4 0l0 4", "M14 10l6 -6", "M8 20l-4 0l0 -4", "M4 20l6 -6"]);
|
|
67
68
|
const IconSquareCheck = glyph(["M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14", "M9 12l2 2l4 -4"]);
|
|
68
69
|
const IconChevronDown = glyph(["M6 9l6 6l6 -6"]);
|
|
69
70
|
const IconChevronRight = glyph(["M9 6l6 6l-6 6"]);
|
|
@@ -131,6 +132,7 @@ export const CONTROL_ICONS = {
|
|
|
131
132
|
drag: IconGripVertical,
|
|
132
133
|
resize: IconArrowsHorizontal,
|
|
133
134
|
open: IconArrowUpRight,
|
|
135
|
+
expand: IconArrowsDiagonal,
|
|
134
136
|
selectRow: IconSquareCheck,
|
|
135
137
|
chevronDown: IconChevronDown,
|
|
136
138
|
chevronRight: IconChevronRight,
|
|
@@ -42,9 +42,10 @@
|
|
|
42
42
|
[data-inline-input-tint="10"] { --inline-input-tint: 100%; }
|
|
43
43
|
[data-inline-input-ground="none"] { --inline-input-ground: var(--vk-input); }
|
|
44
44
|
|
|
45
|
-
/* ── In a grid's cell:
|
|
45
|
+
/* ── In a grid's cell: the cell itself ────────────────────────────────────────────────────────────────────────────────────
|
|
46
46
|
Where the grid says its box stands in a cell (data-inline-input-place="cell", on its type-in's layer), the cell itself is the
|
|
47
|
-
box: no edge, no ring and no ground, whatever a frame picks, so the cell shows as it was
|
|
47
|
+
box: no edge, no ring and no ground of its own, whatever a frame picks, so the cell shows as it was, the grid's own selected
|
|
48
|
+
ring round it (the grid draws that ring on the box). Grown past its cell (data-grown, on
|
|
48
49
|
the body or the box that fits it), it takes the plain ground, so the values it stands over don't show through. */
|
|
49
50
|
[data-inline-input-place="cell"] { --inline-input-edge: 0px; --inline-input-ring: 0px; --inline-input-ground: transparent; }
|
|
50
51
|
[data-inline-input-place="cell"] [data-grown] { --inline-input-ground: var(--vk-overlay); }
|
|
@@ -5,5 +5,7 @@ import type { MenuEntry } from "../menu-list/menu-list.js";
|
|
|
5
5
|
export declare function itemsOfEntries(entries: readonly MenuEntry[], names?: Readonly<Record<string, string>>): ViewsMenuItem[];
|
|
6
6
|
/** The entries the items draw: disabled first, then a default key (ViewKit's entry), then the app's rows. */
|
|
7
7
|
export declare function entriesOfItems<E extends MenuEntry>(items: readonly ViewsMenuItem[], own: ReadonlyMap<string, E>, appSlot: string, defaults: ReadonlySet<string>): E[];
|
|
8
|
+
/** A key handed twice kept once (the first, at any depth). */
|
|
9
|
+
export declare function once(items: ViewsMenuItem[], seen?: Set<string>): ViewsMenuItem[];
|
|
8
10
|
/** A menu's entries through the app's function: none handed, the very entries. `defaults` names every key the menu can hold. */
|
|
9
11
|
export declare function shapeMenu<E extends MenuEntry, C>(entries: E[], fn: ((items: ViewsMenuItem[], ctx: C) => ViewsMenuItem[]) | undefined, ctx: C, appSlot: string, defaults: ReadonlySet<string>, names?: Readonly<Record<string, string>>): E[];
|
|
@@ -76,7 +76,7 @@ export function entriesOfItems(items, own, appSlot, defaults) {
|
|
|
76
76
|
}
|
|
77
77
|
return tidy(out);
|
|
78
78
|
}
|
|
79
|
-
function once(items, seen = new Set()) {
|
|
79
|
+
export function once(items, seen = new Set()) {
|
|
80
80
|
return items.flatMap((i) => {
|
|
81
81
|
if (seen.has(i.key))
|
|
82
82
|
return [];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const partAttrs = (p) => {
|
|
2
2
|
if (!p)
|
|
3
3
|
return {};
|
|
4
|
-
return { "data-slot": p.slot, ...(p.key !== undefined ? { "data-key": p.key } : {}), ...(p.index !== undefined ? { "data-index": String(p.index) } : {}) };
|
|
4
|
+
return { ...(p.slot !== undefined ? { "data-slot": p.slot } : {}), ...(p.key !== undefined ? { "data-key": p.key } : {}), ...(p.index !== undefined ? { "data-index": String(p.index) } : {}) };
|
|
5
5
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/** A time in milliseconds ("500ms" is 500, "4s" 4000), 0 where nothing declares it. */
|
|
2
2
|
export declare function msOf(el: Element | null | undefined, prop: `--${string}`): number;
|
|
3
|
-
/** A length in px ("1px" is 1
|
|
3
|
+
/** A length in px ("1px" is 1, "0.25rem" 4 under a 16px root: whatever unit the app declares it in), 0 where nothing
|
|
4
|
+
* declares it. */
|
|
4
5
|
export declare function pxOf(el: Element | null | undefined, prop: `--${string}`): number;
|
|
5
6
|
/** Steps of the spacing name, in px (1.5 steps is 6px at the default 4px), read off `el`; with no element (a popup outside any
|
|
6
7
|
* popup host), off the page's root, where the ready stylesheet declares it. */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { lengthPx } from "../../internal/length.js";
|
|
1
2
|
const read = (el, prop) => !el || typeof getComputedStyle === "undefined" ? "" : getComputedStyle(el).getPropertyValue(prop).trim();
|
|
2
3
|
export function msOf(el, prop) {
|
|
3
4
|
const v = read(el, prop), n = parseFloat(v);
|
|
@@ -6,6 +7,6 @@ export function msOf(el, prop) {
|
|
|
6
7
|
return /\dms$/.test(v) ? n : /\ds$/.test(v) ? n * 1000 : n;
|
|
7
8
|
}
|
|
8
9
|
export function pxOf(el, prop) {
|
|
9
|
-
return
|
|
10
|
+
return lengthPx(el, prop);
|
|
10
11
|
}
|
|
11
12
|
export const spacingPx = (steps, el) => pxOf(el ?? (typeof document === "undefined" ? undefined : document.documentElement), "--vk-spacing") * steps;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { ViewsMenuItem } from "../../provider/components.js";
|
|
3
|
+
import type { ButtonProps } from "../button/button.js";
|
|
4
|
+
import type { ButtonOwnLook } from "../button/own-look.js";
|
|
5
|
+
/** What a default draws: its words (a text button's text, an icon button's name), its icon, and why it is greyed. */
|
|
6
|
+
export type ActionShown = {
|
|
7
|
+
label: string;
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
disabled?: string;
|
|
10
|
+
};
|
|
11
|
+
/** One of a place's own buttons: its key, its words and icon as handed to the app, why it is greyed this time (Add sort at the most,
|
|
12
|
+
* handed to the app as `disabled`), and how it draws, `shown` absent with no function. */
|
|
13
|
+
export type OwnAction = {
|
|
14
|
+
key: string;
|
|
15
|
+
label: string;
|
|
16
|
+
icon?: React.ReactNode;
|
|
17
|
+
disabled?: string;
|
|
18
|
+
draw: (shown?: ActionShown) => React.ReactNode;
|
|
19
|
+
};
|
|
20
|
+
/** How an app's own button draws in this place. */
|
|
21
|
+
export type AppActionLook = {
|
|
22
|
+
slot: string;
|
|
23
|
+
size: ButtonProps["size"];
|
|
24
|
+
look?: ButtonOwnLook;
|
|
25
|
+
};
|
|
26
|
+
/** A place's buttons through the app's function: none handed, each default as it draws itself. `defaults` names every key the place
|
|
27
|
+
* can hold. */
|
|
28
|
+
export declare function shapeActions<C>(own: readonly OwnAction[], fn: ((items: ViewsMenuItem[], ctx: C) => ViewsMenuItem[]) | undefined, ctx: C, defaults: ReadonlySet<string>, app: AppActionLook): React.ReactNode[];
|
|
29
|
+
/** The app's own button in a rule's end or a foot: quiet, at the place's size; with an icon, an icon button named by its label. */
|
|
30
|
+
export declare function AppAction({ item, look }: {
|
|
31
|
+
item: ViewsMenuItem;
|
|
32
|
+
look: AppActionLook;
|
|
33
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { once } from "./menu-items.js";
|
|
5
|
+
import { usePanelControls } from "./panel-controls.js";
|
|
6
|
+
export function shapeActions(own, fn, ctx, defaults, app) {
|
|
7
|
+
if (!fn)
|
|
8
|
+
return own.map((o) => _jsx(React.Fragment, { children: o.draw() }, o.key));
|
|
9
|
+
const handed = once(fn(own.map(({ key, label, icon, disabled }) => ({ key, label, ...(icon != null && { icon }), ...(disabled && { disabled: true, disabledReason: disabled }) })), ctx));
|
|
10
|
+
return handed.flatMap((item) => {
|
|
11
|
+
if (item.children !== undefined || item.checked !== undefined)
|
|
12
|
+
return [];
|
|
13
|
+
const mine = own.find((o) => o.key === item.key);
|
|
14
|
+
if (mine) {
|
|
15
|
+
const shown = { label: item.label, icon: item.icon !== undefined ? item.icon : mine.icon, ...(item.disabled && { disabled: item.disabledReason || mine.disabled || item.label }) };
|
|
16
|
+
return [_jsx(React.Fragment, { children: mine.draw(shown) }, item.key)];
|
|
17
|
+
}
|
|
18
|
+
if (defaults.has(item.key))
|
|
19
|
+
return [];
|
|
20
|
+
return [_jsx(AppAction, { item: item, look: app }, item.key)];
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
export function AppAction({ item, look }) {
|
|
24
|
+
const { Button, Tooltip } = usePanelControls();
|
|
25
|
+
const icon = item.icon != null;
|
|
26
|
+
const button = (_jsx(Button, { kind: "quiet", size: look.size, "data-slot": look.slot, "data-key": item.key, ...(item.disabled && { disabled: true, focusableWhenDisabled: true }), ...(icon ? { shape: "icon", icon: item.icon, "aria-label": item.label, ...(look.look && { look: look.look }) } : {}), ...(item.onSelect && !item.disabled && { onClick: () => item.onSelect?.() }), children: icon ? null : item.label }));
|
|
27
|
+
return item.disabled ? _jsx(Tooltip, { label: item.disabledReason || item.label, reason: true, side: "top", children: button }) : button;
|
|
28
|
+
}
|
|
@@ -14,7 +14,7 @@ function choiceOf(run, rowSlot) {
|
|
|
14
14
|
onChoose: (key) => run.find((i) => i.key === key)?.onSelect?.(),
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
const named = (rowSlot, key, own) => (
|
|
17
|
+
const named = (rowSlot, key, own) => ({ slot: { ...((own ?? rowSlot) !== undefined && { slot: own ?? rowSlot }), key } });
|
|
18
18
|
const onlyTicks = (items) => (items.length > 0 && items.every(closingTick) && !items.slice(1).some((i) => i.separatorBefore) ? items : null);
|
|
19
19
|
export function menuEntries(items, notNow = NO_REASON, rowSlot) {
|
|
20
20
|
const out = [];
|
|
@@ -18,6 +18,14 @@ export declare const NUMBER_EDITOR_TOKENS: readonly [{
|
|
|
18
18
|
readonly name: "--vk-font-size-sm";
|
|
19
19
|
readonly kind: "size";
|
|
20
20
|
readonly outright: "--text-sm";
|
|
21
|
+
}, {
|
|
22
|
+
readonly name: "--vk-shadow-field-focus";
|
|
23
|
+
readonly kind: "shadow";
|
|
24
|
+
readonly outright: "--shadow-field-focus";
|
|
25
|
+
}, {
|
|
26
|
+
readonly name: "--vk-shadow-field-focus-danger";
|
|
27
|
+
readonly kind: "shadow";
|
|
28
|
+
readonly outright: "--shadow-field-focus-danger";
|
|
21
29
|
}, {
|
|
22
30
|
readonly name: "--vk-spacing";
|
|
23
31
|
readonly kind: "size";
|
|
@@ -4,6 +4,8 @@ export const NUMBER_EDITOR_TOKENS = [
|
|
|
4
4
|
{ name: "--vk-fg-subtle", kind: "colour", outright: "--text-subtle" },
|
|
5
5
|
{ name: "--vk-font-size-base", kind: "size", outright: "--text-base" },
|
|
6
6
|
{ name: "--vk-font-size-sm", kind: "size", outright: "--text-sm" },
|
|
7
|
+
{ name: "--vk-shadow-field-focus", kind: "shadow", outright: "--shadow-field-focus" },
|
|
8
|
+
{ name: "--vk-shadow-field-focus-danger", kind: "shadow", outright: "--shadow-field-focus-danger" },
|
|
7
9
|
{ name: "--vk-spacing", kind: "size", outright: "--spacing" },
|
|
8
10
|
];
|
|
9
11
|
export const NUMBER_EDITOR_PRIVATE = ["--number-editor-"];
|
|
@@ -24,6 +24,26 @@ span.o-number-editor-code { color: var(--vk-fg-subtle); }
|
|
|
24
24
|
.o-number-editor-sign, .o-number-editor-unit { flex: none; color: var(--vk-fg-subtle); }
|
|
25
25
|
.o-number-editor[data-number-form="computer"] .o-number-editor-sign { margin-right: auto; }
|
|
26
26
|
|
|
27
|
+
/* ── In a record's row that wears the Field's Box (data-field-row-box="box" on a frame round the rows; the row marks its open
|
|
28
|
+
editor data-field-row-editor): on a computer the number's box is the row's own, as the Text editor's is (text-editor.css):
|
|
29
|
+
where the row's hover and press drew it, as tall, its words as far in, no edge of its own, the row's ground, its ring
|
|
30
|
+
outside it, red when refused. ─────────────────────────────────────────────────────────────────────────────────────────── */
|
|
31
|
+
:where([data-field-row-box="box"] [data-field-row-editor]) .o-number-editor[data-number-form="computer"] {
|
|
32
|
+
--inline-input-row: var(--field-row-box-h); --inline-input-edge: 0px; --inline-input-ring: 0px;
|
|
33
|
+
width: calc(100% + var(--field-row-box-x) * 2); height: var(--field-row-box-h);
|
|
34
|
+
margin: calc(var(--field-row-box-y) * -1) calc(var(--field-row-box-x) * -1);
|
|
35
|
+
}
|
|
36
|
+
:where([data-field-row-box="box"] [data-field-row-editor]) .o-number-editor[data-number-form="computer"] :is(.o-number-editor-field, .o-number-editor-field > .o-inline-input-group) {
|
|
37
|
+
height: var(--field-row-box-h); min-height: var(--field-row-box-h);
|
|
38
|
+
}
|
|
39
|
+
:where([data-field-row-box="box"] [data-field-row-editor]) .o-number-editor[data-number-form="computer"] .o-inline-input {
|
|
40
|
+
--inline-input-words: var(--field-row-box-x); border-radius: var(--field-row-box-r); background-color: transparent;
|
|
41
|
+
box-shadow: 0 0 0 var(--vk-border-width) var(--inline-input-colour), var(--vk-shadow-field-focus);
|
|
42
|
+
}
|
|
43
|
+
:where([data-field-row-box="box"] [data-field-row-editor]) .o-number-editor[data-number-form="computer"] .o-inline-input:is([aria-invalid="true"], :has(.o-input-control[aria-invalid="true"])) {
|
|
44
|
+
box-shadow: 0 0 0 var(--vk-border-width) var(--inline-input-colour), var(--vk-shadow-field-focus-danger);
|
|
45
|
+
}
|
|
46
|
+
|
|
27
47
|
/* ── On a phone: the box and what is under it ───────────────────────────────────────────────────────────────────── */
|
|
28
48
|
.o-number-editor[data-number-form="phone"] { display: grid; gap: calc(var(--vk-spacing) * 2); }
|
|
29
49
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ViewsPopoverProps } from "../../provider/components.js";
|
|
2
2
|
/** ViewKit's popup, drawn as the kit's Popover. */
|
|
3
|
-
export declare function MapPopover({ open, onOpenChange, anchor, side, align, sideOffset, alignOffset, initialFocus, onOutsidePress, onEscape, chrome, onPanelClick, panelData, style, className, label, children }: ViewsPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function MapPopover({ open, onOpenChange, anchor, side, align, sideOffset, alignOffset, initialFocus, finalFocus, onOutsidePress, onEscape, chrome, onPanelClick, panelData, style, className, label, children }: ViewsPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Popover } from "./popover.js";
|
|
3
3
|
import { markOwnControl } from "../../provider/own-control.js";
|
|
4
|
-
export function MapPopover({ open, onOpenChange, anchor, side, align, sideOffset, alignOffset, initialFocus, onOutsidePress, onEscape, chrome, onPanelClick, panelData, style, className, label, children }) {
|
|
5
|
-
return (_jsx(Popover, { open: open, onOpenChange: (next, d) => onOpenChange(next, { reason: d.reason }), anchor: anchor, side: side, align: align, sideOffset: sideOffset, alignOffset: alignOffset, initialFocus: initialFocus, onOutsidePress: onOutsidePress, onEscape: onEscape, style: style, onPopupClick: onPanelClick, popupData: chrome === "menu" ? { ...panelData, "data-popover-chrome": "menu" } : panelData, className: className, "aria-label": label, children: children }));
|
|
4
|
+
export function MapPopover({ open, onOpenChange, anchor, side, align, sideOffset, alignOffset, initialFocus, finalFocus, onOutsidePress, onEscape, chrome, onPanelClick, panelData, style, className, label, children }) {
|
|
5
|
+
return (_jsx(Popover, { open: open, onOpenChange: (next, d) => onOpenChange(next, { reason: d.reason }), anchor: anchor, side: side, align: align, sideOffset: sideOffset, alignOffset: alignOffset, initialFocus: initialFocus, finalFocus: finalFocus, onOutsidePress: onOutsidePress, onEscape: onEscape, style: style, onPopupClick: onPanelClick, popupData: chrome === "menu" ? { ...panelData, "data-popover-chrome": "menu" } : panelData, className: className, "aria-label": label, children: children }));
|
|
6
6
|
}
|
|
7
7
|
markOwnControl(MapPopover);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { useViews } from "../../provider/context.js";
|
|
4
|
+
import { PhoneHost } from "../internal/phone.js";
|
|
5
|
+
import { usePopupHost } from "../internal/popup-host.js";
|
|
4
6
|
import { Sheet, SheetBody, SheetButton, SheetFoot, SheetHead } from "./bottom-sheet.js";
|
|
5
7
|
import { STOPS } from "./forms.js";
|
|
6
8
|
import { SheetPartsFrom } from "./sheet-parts.js";
|
|
@@ -13,14 +15,15 @@ export const SNAP_FORM = {
|
|
|
13
15
|
export function MapSheet({ open, onOpenChange, title, label, description, actions, snap, className, children }) {
|
|
14
16
|
const { icons, messages } = useViews();
|
|
15
17
|
const [parts, setParts] = React.useState(null);
|
|
18
|
+
const mark = React.useRef(null), host = usePopupHost(mark), screen = React.useContext(PhoneHost);
|
|
16
19
|
const words = { close: messages({ key: "views.panels.close" }), back: messages({ key: "views.panels.back" }) };
|
|
17
20
|
const name = label ?? "", shown = title ?? name;
|
|
18
21
|
const titleLabel = title != null && title !== name && label ? label : undefined;
|
|
19
22
|
const left = actions?.back ?? actions?.close;
|
|
20
23
|
const Back = icons.back, Close = icons.close, Check = icons.check;
|
|
21
|
-
return (_jsxs(Sheet, { open: open, onOpenChange: (next, d) => onOpenChange(next, { reason: d.reason }), label: name, ...SNAP_FORM[snap ?? "full"], className: className, children: [parts
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
return (_jsxs(_Fragment, { children: [_jsx("span", { ref: mark, hidden: true }), _jsxs(Sheet, { open: open, onOpenChange: (next, d) => onOpenChange(next, { reason: d.reason }), label: name, ...SNAP_FORM[snap ?? "full"], container: screen ?? host, standing: !!screen, className: className, children: [parts
|
|
25
|
+
? _jsx(SheetHead, { title: parts.title, ...parts.head, words: words })
|
|
26
|
+
: actions && left
|
|
27
|
+
? _jsx(SheetHead, { title: shown, titleLabel: titleLabel, description: description, left: _jsx(SheetButton, { "data-slot": actions.back ? "vk-editor-back" : "vk-editor-close", "aria-label": left.label, className: actions.back ? "o-sheet-back" : undefined, icon: actions.back ? _jsx(Back, {}) : _jsx(Close, {}), onClick: left.onPress }), right: actions.done ? _jsx(SheetButton, { "data-slot": "vk-editor-save", kind: "primary", "aria-label": actions.done.label, icon: _jsx(Check, {}), onClick: actions.done.onPress }) : _jsx("span", {}) })
|
|
28
|
+
: (title != null || description != null) && _jsx(SheetHead, { title: shown, titleLabel: titleLabel, description: description, words: words }), _jsx(SheetBody, { children: _jsx(SheetPartsFrom.Provider, { value: setParts, children: children }) }), parts?.foot && _jsx(SheetFoot, { children: parts.foot })] })] }));
|
|
26
29
|
}
|
|
@@ -42,9 +42,13 @@ export interface SortEditorProps {
|
|
|
42
42
|
fieldOf?: FieldOf;
|
|
43
43
|
/** On a computer, Add sort at the foot: what holds it has no + of its own to add a rule with. True unless said. */
|
|
44
44
|
addSort?: boolean;
|
|
45
|
+
/** What its computer form shows with no rule (VK-1091): nothing but its foot (`fields`, the default, for what opens the fields
|
|
46
|
+
* itself while none stands), or that nothing sorts yet, with Add sort (`editor`), as its stacked forms do. */
|
|
47
|
+
empty?: "fields" | "editor";
|
|
45
48
|
/** Its words; English unless handed. */
|
|
46
49
|
words?: Partial<SortEditorWords>;
|
|
47
|
-
/** Its menus as data (VK-1063): a rule's ⋯ (a phone's and the narrow form's) and a set-aside rule's, handed their default items
|
|
50
|
+
/** Its menus as data (VK-1063): a rule's ⋯ (a phone's and the narrow form's) and a set-aside rule's, handed their default items;
|
|
51
|
+
* and (VK-1065) a rule's end (`row`) and its foot (`foot`). */
|
|
48
52
|
items?: ViewsSortEditorItems;
|
|
49
53
|
}
|
|
50
54
|
export interface SortEditorParts {
|