viewkitjs 0.29.0 → 0.30.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 +111 -0
- package/MIGRATION.md +97 -8
- package/package.json +1 -1
- package/views/dist/cells/cell-format.d.ts +2 -2
- package/views/dist/cells/cell-values.js +0 -2
- package/views/dist/contract.d.ts +15 -18
- package/views/dist/contract.js +13 -27
- package/views/dist/controls/controls.d.ts +2 -4
- package/views/dist/controls/controls.js +2 -2
- package/views/dist/controls/customize/customize.d.ts +51 -0
- package/views/dist/controls/customize/customize.js +128 -23
- package/views/dist/controls/customize/map-customize-body.d.ts +0 -3
- package/views/dist/controls/customize/map-customize-body.js +46 -11
- package/views/dist/controls/customize/map-ranges.d.ts +23 -0
- package/views/dist/controls/customize/map-ranges.js +41 -0
- package/views/dist/controls/customize/rules.d.ts +17 -1
- package/views/dist/controls/customize/rules.js +2 -0
- package/views/dist/controls/customize/words.d.ts +7 -0
- package/views/dist/controls/customize/words.js +5 -0
- package/views/dist/controls/customize.css +3 -0
- package/views/dist/controls/filter-editor/filter-editor.d.ts +2 -0
- package/views/dist/controls/filter-editor/filter-editor.js +1 -0
- package/views/dist/controls/filter-editor/rules.d.ts +1 -2
- package/views/dist/controls/index.d.ts +8 -8
- package/views/dist/controls/index.js +8 -8
- package/views/dist/controls/menu-list/menu-list.d.ts +16 -1
- package/views/dist/controls/menu-list/menu-list.js +26 -8
- package/views/dist/controls/menu-list.css +8 -0
- package/views/dist/controls/quick-filters/map-quick-filters-body.d.ts +1 -1
- package/views/dist/controls/quick-filters/map-quick-filters-body.js +6 -3
- package/views/dist/controls/sheet/map-sheet.js +1 -1
- package/views/dist/controls/text-editor/map-text-body.d.ts +1 -1
- package/views/dist/controls/text-editor/map-text-body.js +2 -2
- package/views/dist/controls/text-editor/text-editor.d.ts +3 -0
- package/views/dist/controls/text-editor/text-editor.js +16 -2
- package/views/dist/controls/text-editor.css +11 -0
- package/views/dist/controls/values-editor/values.js +6 -2
- package/views/dist/display/options.d.ts +1 -1
- package/views/dist/display/rich-text.js +0 -1
- package/views/dist/editors/ChipsEditor.d.ts +4 -5
- package/views/dist/editors/ChipsEditor.js +12 -78
- package/views/dist/editors/DateEditor.d.ts +12 -16
- package/views/dist/editors/DateEditor.js +40 -191
- package/views/dist/editors/EditorPanel.d.ts +2 -6
- package/views/dist/editors/EditorPanel.js +2 -2
- package/views/dist/editors/LocationEditor.d.ts +11 -19
- package/views/dist/editors/LocationEditor.js +19 -211
- package/views/dist/editors/NameEditor.d.ts +8 -16
- package/views/dist/editors/NameEditor.js +11 -100
- package/views/dist/editors/NumberEditor.d.ts +14 -21
- package/views/dist/editors/NumberEditor.js +22 -49
- package/views/dist/editors/RangeEditor.d.ts +9 -33
- package/views/dist/editors/RangeEditor.js +12 -97
- package/views/dist/editors/RelationEditor.d.ts +6 -9
- package/views/dist/editors/RelationEditor.js +11 -30
- package/views/dist/editors/RelationSetEditor.d.ts +13 -24
- package/views/dist/editors/RelationSetEditor.js +33 -101
- package/views/dist/editors/SelectEditor.d.ts +15 -17
- package/views/dist/editors/SelectEditor.js +15 -94
- package/views/dist/editors/TextEditor.d.ts +23 -26
- package/views/dist/editors/TextEditor.js +11 -48
- package/views/dist/editors/ValueListEditor.d.ts +14 -23
- package/views/dist/editors/ValueListEditor.js +16 -202
- package/views/dist/editors/body-panel.d.ts +13 -7
- package/views/dist/editors/body-panel.js +3 -7
- package/views/dist/editors/edit-cores.d.ts +15 -15
- package/views/dist/editors/edit-cores.js +14 -14
- package/views/dist/editors/number-body.d.ts +1 -1
- package/views/dist/editors/number-step.d.ts +0 -34
- package/views/dist/editors/number-step.js +0 -37
- package/views/dist/editors/option-add-flow.d.ts +1 -13
- package/views/dist/editors/option-add-flow.js +0 -22
- package/views/dist/editors/relation-links-body.d.ts +2 -3
- package/views/dist/editors/relation-picker.d.ts +13 -3
- package/views/dist/editors/relation-source.d.ts +0 -22
- package/views/dist/editors/relation-source.js +0 -21
- package/views/dist/field-row/FieldRow.js +5 -6
- package/views/dist/field-row/FieldRowLane.js +0 -1
- package/views/dist/field-row/editors/RowChipsEditor.js +2 -2
- package/views/dist/field-row/editors/RowDateEditor.d.ts +2 -2
- package/views/dist/field-row/editors/RowDateEditor.js +2 -2
- package/views/dist/field-row/editors/RowNameEditor.d.ts +2 -5
- package/views/dist/field-row/editors/RowNameEditor.js +7 -12
- package/views/dist/field-row/editors/RowNumberEditor.d.ts +1 -1
- package/views/dist/field-row/editors/RowNumberEditor.js +4 -4
- package/views/dist/field-row/editors/RowPlaceEditor.js +3 -3
- package/views/dist/field-row/editors/RowRangeEditor.d.ts +2 -5
- package/views/dist/field-row/editors/RowRangeEditor.js +7 -14
- package/views/dist/field-row/editors/RowRelationEditor.js +3 -3
- package/views/dist/field-row/editors/RowSelectEditor.js +2 -2
- package/views/dist/field-row/editors/RowTextEditor.d.ts +1 -1
- package/views/dist/field-row/editors/RowTextEditor.js +3 -4
- package/views/dist/field-row/editors/RowValueListEditor.js +5 -5
- package/views/dist/field-row/field-row-button.d.ts +6 -9
- package/views/dist/field-row/field-row-button.js +1 -6
- package/views/dist/field-row/field-row-checkbox.d.ts +1 -1
- package/views/dist/field-row/row-target.d.ts +0 -7
- package/views/dist/field-row/row-target.js +0 -2
- package/views/dist/grid/chrome/GridAddColumn.d.ts +2 -1
- package/views/dist/grid/chrome/GridAddColumn.js +8 -66
- package/views/dist/grid/chrome/GridAggregateMenu.d.ts +5 -7
- package/views/dist/grid/chrome/GridAggregateMenu.js +20 -39
- package/views/dist/grid/chrome/GridCellEditors.d.ts +2 -2
- package/views/dist/grid/chrome/GridCellEditors.js +12 -12
- package/views/dist/grid/chrome/GridChipsEditor.js +3 -3
- package/views/dist/grid/chrome/GridColumnMenu.d.ts +11 -12
- package/views/dist/grid/chrome/GridColumnMenu.js +32 -93
- package/views/dist/grid/chrome/GridDateEditor.d.ts +6 -6
- package/views/dist/grid/chrome/GridDateEditor.js +3 -3
- package/views/dist/grid/chrome/GridGroupMenu.d.ts +4 -6
- package/views/dist/grid/chrome/GridGroupMenu.js +21 -62
- package/views/dist/grid/chrome/GridHeader.d.ts +1 -2
- package/views/dist/grid/chrome/GridHeader.js +2 -2
- package/views/dist/grid/chrome/GridLongTextEditor.d.ts +17 -38
- package/views/dist/grid/chrome/GridLongTextEditor.js +6 -7
- package/views/dist/grid/chrome/GridNameEditor.js +4 -4
- package/views/dist/grid/chrome/GridNumberEditor.d.ts +4 -5
- package/views/dist/grid/chrome/GridNumberEditor.js +3 -4
- package/views/dist/grid/chrome/GridPlaceEditor.d.ts +2 -5
- package/views/dist/grid/chrome/GridPlaceEditor.js +5 -5
- package/views/dist/grid/chrome/GridRangeEditor.d.ts +6 -12
- package/views/dist/grid/chrome/GridRangeEditor.js +7 -15
- package/views/dist/grid/chrome/GridRelationEditor.js +5 -5
- package/views/dist/grid/chrome/GridRow.js +0 -3
- package/views/dist/grid/chrome/GridRowActions.d.ts +1 -1
- package/views/dist/grid/chrome/GridRowActions.js +0 -5
- package/views/dist/grid/chrome/GridRowCells.js +9 -6
- package/views/dist/grid/chrome/GridSelectEditor.js +3 -3
- package/views/dist/grid/chrome/GridStructure.js +0 -1
- package/views/dist/grid/chrome/GridTable.js +1 -1
- package/views/dist/grid/chrome/GridTextEditor.d.ts +5 -7
- package/views/dist/grid/chrome/GridTextEditor.js +4 -17
- package/views/dist/grid/chrome/GridValueListEditor.js +4 -4
- package/views/dist/grid/chrome/grid-body-place.d.ts +2 -3
- package/views/dist/grid/chrome/grid-body-place.js +4 -8
- package/views/dist/grid/chrome/grid-button.d.ts +7 -10
- package/views/dist/grid/chrome/grid-button.js +1 -6
- package/views/dist/grid/chrome/grid-cell-classes.js +1 -1
- package/views/dist/grid/chrome/grid-column-menu-items.d.ts +4 -4
- package/views/dist/grid/chrome/grid-column-menu-items.js +10 -6
- package/views/dist/grid/chrome/grid-group-menu-parts.d.ts +5 -9
- package/views/dist/grid/chrome/grid-group-menu-parts.js +1 -3
- package/views/dist/grid/chrome/grid-hover.js +0 -1
- package/views/dist/grid/chrome/grid-menu-focus.d.ts +7 -31
- package/views/dist/grid/chrome/grid-menu-focus.js +7 -47
- package/views/dist/grid/chrome/grid-styles.d.ts +0 -3
- package/views/dist/grid/chrome/grid-styles.js +0 -1
- package/views/dist/grid/chrome/grid-table-props.d.ts +6 -10
- package/views/dist/grid/chrome/useGridTableInteractionModel.js +2 -4
- package/views/dist/grid/core/editing-controller.d.ts +2 -1
- package/views/dist/grid/core/editing-controller.js +10 -2
- package/views/dist/grid/core/refusal-sentence.d.ts +3 -0
- package/views/dist/grid/core/refusal-sentence.js +2 -2
- package/views/dist/grid/core/write-states.d.ts +3 -1
- package/views/dist/grid/core/write-states.js +6 -2
- package/views/dist/grid/grid.css +1 -1
- package/views/dist/model/body-frame.d.ts +0 -32
- package/views/dist/model/body-frame.js +1 -15
- package/views/dist/model/column-inspect.d.ts +5 -5
- package/views/dist/model/column-inspect.js +2 -2
- package/views/dist/panels/customize-body.d.ts +1 -10
- package/views/dist/panels/customize-body.js +0 -3
- package/views/dist/panels/filter/MenuSelect.js +0 -5
- package/views/dist/panels/filter/RangeFilterBody.js +0 -1
- package/views/dist/panels/filter/details.d.ts +1 -5
- package/views/dist/panels/filter/details.js +0 -13
- package/views/dist/panels/filter/filter-list.d.ts +0 -1
- package/views/dist/panels/filter/filter-list.js +1 -1
- package/views/dist/panels/panel-button.d.ts +10 -12
- package/views/dist/panels/panel-button.js +1 -6
- package/views/dist/panels/react/chrome.d.ts +0 -17
- package/views/dist/panels/react/chrome.js +0 -8
- package/views/dist/panels/react/customize-body.d.ts +9 -12
- package/views/dist/panels/react/customize-body.js +57 -11
- package/views/dist/panels/react/customize.d.ts +9 -12
- package/views/dist/panels/react/customize.js +3 -112
- package/views/dist/panels/react/filter/FilterEditor.d.ts +4 -18
- package/views/dist/panels/react/filter/FilterEditor.js +6 -330
- package/views/dist/panels/react/filter/FilterFieldList.d.ts +1 -1
- package/views/dist/panels/react/filter/FilterFieldList.js +27 -59
- package/views/dist/panels/react/filter/PhoneFilterEditor.d.ts +1 -11
- package/views/dist/panels/react/filter/PhoneFilterEditor.js +8 -144
- package/views/dist/panels/react/filter/editor-ctx.d.ts +1 -33
- package/views/dist/panels/react/filter/editor-ctx.js +5 -33
- package/views/dist/panels/react/filter/filter-part-body.d.ts +3 -6
- package/views/dist/panels/react/filter/filter-part-body.js +0 -5
- package/views/dist/panels/react/filter/rule-writes.d.ts +1 -26
- package/views/dist/panels/react/filter/rule-writes.js +4 -95
- package/views/dist/panels/react/order-details.d.ts +1 -26
- package/views/dist/panels/react/order-details.js +3 -69
- package/views/dist/panels/react/panel-header.js +0 -1
- package/views/dist/panels/react/popover.d.ts +4 -7
- package/views/dist/panels/react/quick/QuickFiltersPanel.d.ts +2 -4
- package/views/dist/panels/react/quick/QuickFiltersPanel.js +16 -137
- package/views/dist/panels/react/sort/SortEditor.d.ts +4 -4
- package/views/dist/panels/react/sort/SortEditor.js +8 -245
- package/views/dist/panels/react/sort/SortFieldList.d.ts +1 -1
- package/views/dist/panels/react/sort/SortFieldList.js +11 -25
- package/views/dist/panels/react/toolbar/ToolbarAdvancedFilters.js +2 -2
- package/views/dist/panels/react/toolbar/ToolbarBarFilter.js +4 -16
- package/views/dist/panels/react/toolbar/ToolbarQuickFilters.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarSave.js +0 -4
- package/views/dist/panels/react/toolbar/ToolbarSearch.js +0 -1
- package/views/dist/panels/react/toolbar/ToolbarSortPill.js +3 -3
- package/views/dist/panels/react/view-actions.js +0 -1
- package/views/dist/panels/react/views-row/FoldingViewRow.js +2 -5
- package/views/dist/panels/react/views-row/ViewCreatePill.js +0 -1
- package/views/dist/panels/react/views-row/ViewPicker.js +7 -43
- package/views/dist/panels/react/views-row/ViewPickerRow.js +0 -2
- package/views/dist/panels/react/views-row/menu-classes.d.ts +0 -4
- package/views/dist/panels/react/views-row/menu-classes.js +0 -2
- package/views/dist/panels/react.d.ts +5 -12
- package/views/dist/panels/react.js +5 -12
- package/views/dist/provider/ViewsProvider.d.ts +2 -46
- package/views/dist/provider/ViewsProvider.js +2 -22
- package/views/dist/provider/components.d.ts +153 -106
- package/views/dist/provider/context.d.ts +1 -21
- package/views/dist/provider/missing-slot.d.ts +3 -7
- package/views/dist/provider/missing-slot.js +2 -9
- package/views/dist/react.d.ts +1 -2
- package/views/dist/selection/SelectionBar.js +2 -3
- package/views/dist/styles.css +40 -168
- package/views/dist/styles.unlayered.css +40 -168
- package/views/docs/contract.md +99 -123
- package/views/docs/getting-started.md +222 -2
- package/views/docs/guides/cells.md +222 -2
- package/views/docs/guides/display.md +1 -1
- package/views/docs/guides/editors.md +235 -20
- package/views/docs/guides/ports.md +1 -1
- package/views/docs/guides/selection.md +1 -1
- package/views/docs/guides/the-grid.md +14 -16
- package/views/docs/guides/the-provider.md +9 -15
- package/views/docs/reference/cells.md +1 -1
- package/views/docs/reference/controls.md +26 -13
- package/views/docs/reference/editors-chips.md +2 -2
- package/views/docs/reference/editors-date.md +4 -4
- package/views/docs/reference/editors-location.md +4 -7
- package/views/docs/reference/editors-name.md +3 -5
- package/views/docs/reference/editors-number.md +10 -10
- package/views/docs/reference/editors-panel.md +3 -3
- package/views/docs/reference/editors-range.md +3 -5
- package/views/docs/reference/editors-relation.md +4 -4
- package/views/docs/reference/editors-select.md +3 -3
- package/views/docs/reference/editors-text.md +3 -4
- package/views/docs/reference/editors-value-list.md +3 -3
- package/views/docs/reference/field-row.md +1 -1
- package/views/docs/reference/grid.md +2 -2
- package/views/docs/reference/panels-react.md +20 -34
- package/views/docs/reference/react.md +11 -18
- package/views/docs/reference/views.md +5 -5
- package/views/skills/views/SKILL.md +1 -1
- package/views/dist/editors/relation-panel.d.ts +0 -69
- package/views/dist/editors/relation-panel.js +0 -46
- package/views/dist/grid/chrome/GridColumnColorSection.d.ts +0 -13
- package/views/dist/grid/chrome/GridColumnColorSection.js +0 -40
- package/views/dist/grid/chrome/GridColumnDateSection.d.ts +0 -28
- package/views/dist/grid/chrome/GridColumnDateSection.js +0 -23
- package/views/dist/grid/chrome/GridColumnDurationSection.d.ts +0 -23
- package/views/dist/grid/chrome/GridColumnDurationSection.js +0 -24
- package/views/dist/grid/chrome/GridColumnNumberSection.d.ts +0 -29
- package/views/dist/grid/chrome/GridColumnNumberSection.js +0 -27
- package/views/dist/grid/chrome/GridColumnPercentSection.d.ts +0 -16
- package/views/dist/grid/chrome/GridColumnPercentSection.js +0 -16
- package/views/dist/grid/chrome/GridColumnSortSection.d.ts +0 -38
- package/views/dist/grid/chrome/GridColumnSortSection.js +0 -33
- package/views/dist/grid/chrome/GridFlyout.d.ts +0 -44
- package/views/dist/grid/chrome/GridFlyout.js +0 -80
- package/views/dist/grid/chrome/GridMenuRow.d.ts +0 -15
- package/views/dist/grid/chrome/GridMenuRow.js +0 -15
- package/views/dist/grid/chrome/grid-menu-search.d.ts +0 -7
- package/views/dist/grid/chrome/grid-menu-search.js +0 -7
- package/views/dist/panels/react/GroupBucketsList.d.ts +0 -16
- package/views/dist/panels/react/GroupBucketsList.js +0 -44
- package/views/dist/panels/react/LayoutColumnsList.d.ts +0 -24
- package/views/dist/panels/react/LayoutColumnsList.js +0 -101
- package/views/dist/panels/react/PopoverColumnDetail.d.ts +0 -11
- package/views/dist/panels/react/PopoverColumnDetail.js +0 -24
- package/views/dist/panels/react/drag.d.ts +0 -2
- package/views/dist/panels/react/drag.js +0 -5
- package/views/dist/panels/react/layout-detail.d.ts +0 -4
- package/views/dist/panels/react/layout-detail.js +0 -29
- package/views/dist/panels/react/root-list.d.ts +0 -6
- package/views/dist/panels/react/root-list.js +0 -31
- package/views/dist/panels/react/sort/use-sort-drag.d.ts +0 -17
- package/views/dist/panels/react/sort/use-sort-drag.js +0 -39
- package/views/dist/panels/react/view-footer.d.ts +0 -20
- package/views/dist/panels/react/view-footer.js +0 -41
package/views/docs/contract.md
CHANGED
|
@@ -77,13 +77,9 @@ use; the prefix keeps that selector from reaching an element of the app's own.
|
|
|
77
77
|
| `data-slot="vk-grid-name-check"` | a row's or a titles row's box inside the name column, before the picture, on a phone with `phonePicking` |
|
|
78
78
|
| `data-slot="vk-grid-tail"` | the right tail: a row's ⋯, the header's + Add column (unless `addColumnAt` stands it in the title column's header) |
|
|
79
79
|
| `data-slot="vk-grid-row-more"` | the row's ⋯ itself: it opens the row's menu |
|
|
80
|
-
| `data-slot="vk-grid-editor"` | the open editor over a cell;
|
|
80
|
+
| `data-slot="vk-grid-editor"` | the open editor over a cell; the `TextBody` or `NumberBody` stands in a layer over the whole cell on a computer, 1px past each edge so it covers the cell's lines, the cell keeping its padding |
|
|
81
81
|
| `data-slot="vk-grid-outline"` | the outline around the focused cell or the selected range |
|
|
82
82
|
| `data-slot="vk-grid-resize-handle"` | a column's resize handle |
|
|
83
|
-
| `data-slot="vk-grid-column-menu"` | the header menu, on the `popover` route |
|
|
84
|
-
| `data-slot="vk-grid-flyout"` | a flyout a menu row opens beside its menu |
|
|
85
|
-
| `data-slot="vk-grid-group-menu"` | a group band's menu, on the `popover` route |
|
|
86
|
-
| `data-slot="vk-grid-aggregate-menu"` | the footer's figure picker, on the `popover` route |
|
|
87
83
|
| `data-slot="vk-grid-pager"` | the pager under a grid in pages (`pages`), a `<nav>` |
|
|
88
84
|
| `data-slot="vk-grid-pager-range"` | where you are among the rows ("26–50 of 213") |
|
|
89
85
|
| `data-slot="vk-grid-pager-size"` | the page-size pick, your `Button` opening your `Menu`; `data-open` while open |
|
|
@@ -130,7 +126,7 @@ attribute.
|
|
|
130
126
|
| `data-in-range` | cell | inside the selected range |
|
|
131
127
|
| `data-range-edge` | cell | which edges of the range this cell draws |
|
|
132
128
|
| `data-pending` | cell | a write is in flight |
|
|
133
|
-
| `data-invalid` | cell | the last commit was refused
|
|
129
|
+
| `data-invalid` | cell | the last commit was refused; the cell's title and accessible description say why |
|
|
134
130
|
| `data-dragging` | header cell; a row where rows drag (the grid's don't) | being dragged |
|
|
135
131
|
| `data-empty` | cell, footer cell, grid | no value; no figure, and one can be picked; no rows |
|
|
136
132
|
| `data-frozen` | header cell, cell, footer cell | pinned to the left edge |
|
|
@@ -151,7 +147,10 @@ name and two are pinned.
|
|
|
151
147
|
|
|
152
148
|
`data-pending` holds while any write to the cell is in flight, from its send to the app's answer.
|
|
153
149
|
`data-invalid` holds from the refusal of the latest write sent for the cell until the cell's next
|
|
154
|
-
write is sent; an undo or a redo is a write.
|
|
150
|
+
write is sent; an undo or a redo is a write. While it holds, the cell's `title` and `aria-description` are the
|
|
151
|
+
refusal's own words (the rejected error's message, or each refused cell's own in a batch's outcomes), else "Couldn't
|
|
152
|
+
save {field}." (`views.grid.commit-refused`), and the cell's own classes draw the danger line inside its edge
|
|
153
|
+
(`--vk-border-danger`, undeclared `--vk-danger`). `data-empty` on a cell reads the value it shows (a
|
|
155
154
|
pending value, else the row's): nothing, a blank text or an empty list; a value made of parts whose
|
|
156
155
|
parts are all empty (a money, a range) does not count as empty, and a column with no value of its
|
|
157
156
|
own (an action column) never is.
|
|
@@ -334,7 +333,7 @@ that kind takes it.
|
|
|
334
333
|
| `--vk-caption-text` | text under the app's smallest step: the small capitals over a panel's sections and in the group menu, the `+N` count, a candidate's badge, the selection bar's Esc, the layout's choice labels, a relation's lead mark, the date filter's note | `10px`; the group menu, the lead mark and the date note `11px` |
|
|
335
334
|
| `--vk-caption-leading` | the `+N` count's line height | `0.9rem` |
|
|
336
335
|
| `--vk-caps-tracking` | the letter spacing of a panel's section label | `0.15em` |
|
|
337
|
-
| `--vk-input-text` |
|
|
336
|
+
| `--vk-input-text` | nothing ViewKit draws reads it now (its search boxes went with its older lists); kept until a later change takes it out | `13px` |
|
|
338
337
|
| `--vk-panel-title-text` | a panel's title | `15px` |
|
|
339
338
|
| `--vk-sheet-text` | a phone sheet's row text | `15px` |
|
|
340
339
|
| `--vk-underline-offset` | how far a link's or a chip's underline sits below its text | `3px`; a field note and a title's open link `2px` |
|
|
@@ -435,50 +434,50 @@ the Outright kit's, on Base UI: its controls (the Button, the Popover, the Sheet
|
|
|
435
434
|
(`components={{ ...CONTROLS, ...own }}`), so whatever it hands wins. That door alone needs `@base-ui/react`, an optional
|
|
436
435
|
peer; the provider and every other door import neither library, so an app that hands every control never installs it.
|
|
437
436
|
|
|
438
|
-
`Button` · `Popover` · `Tooltip` · `Checkbox` · `Menu` · `Collapse` · `Sheet` · `AppIcon` · `Markdown`
|
|
437
|
+
`Button` · `Popover` · `Tooltip` · `Checkbox` · `Menu` · `Collapse` · `Sheet` · `AppIcon` · `Markdown` · `TextBody` · `NumberBody` · `Picker` · `LinksBody` · `DateBody` · `PartsBody` · `ValuesBody`
|
|
439
438
|
|
|
440
|
-
`Button`: `ViewsButtonProps`, its children, `onClick`, `disabled`, `variant`, `size`, `type`, a class, `aria-label` and `title
|
|
439
|
+
`Button`: `ViewsButtonProps`, its children, `onClick`, `disabled`, `variant`, `size`, `type`, a class, `aria-label` and `title`. It draws every button ViewKit draws itself, handed ViewKit's box in its one class. The grid's own buttons are handed a `ref`, `tabIndex`, `aria-haspopup`, `aria-expanded`, `data-slot` and `data-open`, each forwarded to your element; a command cell's ▾ and trigger, and the selection chip, only the props named first, the chip also `data-slot`. A field row's own buttons are handed `type`, `variant`, `size`, `className`, `aria-label`, `disabled` and `onClick` (the ▾ and the verb trigger no `onClick`: the menu opens on them), Show more also `data-slot`, and the edit target also a ref and `aria-disabled` while its write is pending, each forwarded to your element. The panels' own buttons are handed `type`, `variant` (`ghost`, `outline` or `secondary`), `size`, `className` and their children, each with what it needs of `onClick`, `disabled`, `aria-label`, `title`, a ref, `aria-haspopup`, `aria-expanded`, `aria-pressed`, `role`, `aria-selected`, `aria-disabled` and `aria-describedby` (a button that can't be used, described by why), `data-slot`, `data-state="open"` or `data-state="closed"` and `data-vs-row="true"`, each forwarded to your element.
|
|
441
440
|
|
|
442
|
-
`Checkbox`: `ViewsCheckboxProps`.
|
|
441
|
+
`Checkbox`: `ViewsCheckboxProps`. A yes/no cell in the grid draws it, handed `checked`, the column's name as `aria-label`, `tabIndex` -1 and `onCheckedChange`; a cell the grid can't write is handed `readOnly` and a press that writes nothing. A field row's yes/no draws it, handed `checked`, the field's name as `aria-label` and `onCheckedChange`, and no `tabIndex`, so it stays a Tab stop as a switch is; a row it can't write is handed `readOnly`, and a value inside the row's own button keeps the tick box. Forward `readOnly` to your control.
|
|
443
442
|
|
|
444
|
-
`Input`, optional: a single-line text box, `ViewsInputProps`.
|
|
443
|
+
`Input`, optional: a single-line text box, `ViewsInputProps`. The editors' own single-line box (a duration's, the one number no body has a form for) draws through it; without it the editors draw a plain `<input>`. Forward every prop to your element, `ref` included. `chrome` is `bare` (the default: a grid cell, a panel that frames the box) or `field` (your field's frame). `OPTIONAL_COMPONENT_NAMES` lists the fourteen optional slots apart from `COMPONENT_NAMES`, which lists the slots you must fill.
|
|
445
444
|
|
|
446
|
-
`Command`, optional: the command list's parts (`ViewsCommandParts`)
|
|
445
|
+
`Command`, optional and deprecated: the command list's parts (`ViewsCommandParts`). Nothing reads it: the grid's menus are your `Menu` and the editors' lists your `Picker`. Leave it out; it goes at a later minor.
|
|
447
446
|
|
|
448
|
-
`Picker`,
|
|
447
|
+
`Picker`, required: a whole pick list your app draws, `ViewsPickerProps`. The select, several-values, place and relation editors open it, handed their rows as `ViewsPickerItem` data (a value, its words, a status slot or a colour, a glyph, a line, a group), what is held, the empty row's words, the search's words, create (`onCreate`, handed what was typed, returning the value it makes), and where your app adds options from a cell, the add (`onAdd`, handed what was typed, with `adding` while your app answers and `addRefused` for its refusal, and no `onCreate`; `CONTROLS.Picker` doesn't draw it yet), and `form`. The body hands back `onValueChange` (the pick, or the whole new list) and `onDone` (a pick of one is made). The editor keeps the draft, what each close means, Tab, Escape, the save and, on a phone, the panel's ✕ and ✓: at `form: "phone"` your body draws none of its own and hands every change as it is made. Tab is taken before your body hears it. `CONTROLS.Picker` is ViewKit's own, the Picker. A status field's editor hands its active steps by value (`steps`): a row on a step between that isn't one (an archived option held) is placed nowhere, as a cell places it. A relation's list is filtered (a static source, by label) or fetched (a remote one, a page at a time) by the editor, never by your body: it hands every typed query to `onSearch` and draws `items` as handed, with `doing` (`searching` or `failed`), `onRetry` and `onMore` for a remote one; `doing` is `searching` from the keystroke until the typed query answers, and the `items` meanwhile are the held records that match it alone: no row of the last answer is handed, and none can be picked. A relation's rows may carry a `badge` (a word telling kinds apart), a `glyph` (the record's own, unsized), an `avatarUrl` and the record's `kind`; its create rows come as `actions` (`ViewsPickerAction`), after the rows, and picking one closes the editor before it runs; a set whose field leads hands `lead` (which value leads, `onLead`, and its words). Held records come first while nothing is typed, and by the same search once something is. Its popover stands at your `Popover`'s own width, marked `data-vk-body="picker"`.
|
|
449
448
|
|
|
450
|
-
`LinksBody`,
|
|
449
|
+
`LinksBody`, required: a whole links body your app draws, `ViewsLinksBodyProps`, for a relation holding several records whose field declares `links` (each link may carry roles, and one may lead). The set editor opens it in the grid and in a field row, in a popover on a computer and the sheet on a phone, in place of your `Picker`; a relation with no `links` still opens your `Picker`. It hands the field's name (`label`), the records as `ViewsPickerItem` data (`items`: the linked ones first, in the links' order, then the ones to add, filtered or fetched by the editor as for `Picker`, with `search`, `onSearch`, `doing`, `onRetry`, `onMore` and the create rows as `actions`), the links (`links`: `ViewsLink`s, `{ value, roles }`, in the order they stand), the field's roles in its order (`roles`: `ViewsLinkRole`s, `{ value, label, archived? }`; an archived one is handed so a link holding it shows its words and can let it go, and you offer it on that link alone), where the field leads `lead` (which value leads, `onLead`, and its words: making another lead never moves a line), what was typed on what opened it (`typed`), `autoFocus` and `form`, and in the phone's sheet `onStepChange`. The body hands back `onLinksChange` (the whole list, every change as it is made: a record linked, last and holding no role, or unlinked, a link's roles set) and `onDone` (it closes and saves the set). The editor drops from what comes back a value it never handed, a repeated link, a role the field doesn't declare, an archived role on a link that didn't hold it as the editor opened, and a role repeated; `onLead` with a value no link holds changes nothing. Unlinking the lead passes it to the first link left. The set saves with the lead first and, on each link, its roles in the key it was stored with: a link stored with `role` keeps `role` (its first role, or null), one stored with `roles` keeps `roles`, one stored with `role` alone gains `roles` beside it once it holds two or more, and a new link writes `roles` alone; a link whose roles didn't change is written as it was stored. Escape and Tab from inside your body's element are taken before your body hears them (Escape throws the set away; Tab walks your controls and closes from either end, which saves); a key in a popup your body draws outside its element, or in a level you mark `EDITOR_INNER_ESCAPE` inside it, is your body's. Its popover stands at your `Popover`'s own width, marked `data-vk-body="links"`. `CONTROLS.LinksBody` is ViewKit's own, the Links editor: the search on top, the linked records as rows under the field's name, Roles and Lead (a link's roles ticked in the Picker under its button, the lead a radio, ✕ to unlink), the records to add under Add; on a phone a card per link, its roles a step of the sheet with Back (`onStepChange`). It hands every query back (`onSearch`), draws the records as handed, and draws `doing`, `onMore` and the create rows.
|
|
451
450
|
|
|
452
|
-
`Calendar`, optional: a calendar over ISO days, `ViewsCalendarProps`, which the
|
|
451
|
+
`Calendar`, optional: a calendar over ISO days, `ViewsCalendarProps`, which the default `RangeCalendar` atom draws the filter panel's month through (the date filter, its date ranges and its custom time scope). Reached without one, it throws an error naming it. The date editor never reaches it (it opens your `DateBody`); the filter panel does, unless the app hands its own `RangeCalendar` atom. `CONTROLS.Calendar` is ViewKit's own: a month of the Date editor's days, one day a press, so an app that spreads `CONTROLS` needs no `Calendar` of its own.
|
|
453
452
|
|
|
454
|
-
`DateBody`,
|
|
453
|
+
`DateBody`, required: a whole date body your app draws, `ViewsDateBodyProps`. `CONTROLS.DateBody` is ViewKit's own, the Date editor. The date editor opens it in every host, handed the value on the conventions' calendar (a day, or a day and a time; a date-only field's stored instant on the browser's calendar, as its cell shows it), whether it holds a time, whether it may be emptied, the quick picks (`ViewsDatePick`: the provider's `datePicks`, by default today, tomorrow and next Monday, then `none` where it may be emptied; an app asks for a week from today by naming `in-a-week` there), today, what was typed on what opened it, `autoFocus` and `form`. The body hands back `onValueChange` (every change as it is made, a typed day once it reads as one) and `onDone` (a pick that finishes the edit). The editor keeps the draft, what each close means (Escape's keep or throw-away by field type), the save and, on a phone, the panel's ✕ and ✓: at `form: "phone"` your body draws none of its own. Escape is taken before your body hears it, so a popover of your own inside the body never hears Escape either; Tab walks your body's controls and closes from either end. An `onDone` after a plain Enter from inside your body closes the edit as Enter does (in a grid the next key lands the write first, ⌘Z included); after anything else it is a pick.
|
|
455
454
|
|
|
456
|
-
`PartsBody`,
|
|
455
|
+
`PartsBody`, required: a whole body for a field made of parts your app draws, `ViewsPartsBodyProps`, by `kind`: `name`, `place` or `range`; `CONTROLS.PartsBody` is ViewKit's own, the Compound editor. The name, place and range editors open it in the grid and in a field row, in a popover under the value (over the cell, in the grid) on a computer and the sheet on a phone, handed the field's name, the draft as its parts, whether it may be emptied, what was typed on what opened it (already the first part's value where it reads as one), `autoFocus` and `form`. A name is handed `{ given, family, full }`, `full` as the editor's rule shows it: hand it back as handed unless the person typed one, and the editor keeps the full name following the parts until a name of its own is typed; a full name handed back as the parts joined follows them again. A place is handed its parts (`ViewsPlaceParts`), the boxes the field takes (`parts`, `ViewsPlacePart`s), those boxes in the country's own order (`rows`), each box's words for that country (`words`), the boxes it asks for (`required`), every country by name where the field takes the country (`countries`), the country's regions once loaded (`regions`), and `opens: "countries"` where the field takes a country and the place has none as the editor opens (read once, it stays as handed); the next render hands a new country's rows, words and regions. Its `regionCode` is the editor's, read from the region: a region named in the list (by its code, its name, its Latin name or its label, in any case) takes that region's label and code, any other has none, and a new country clears both. A range is handed its ends, the `decimals` the editor rounds to as it closes, its `unit` and its `bands`, which your body draws as picks. The body hands back `onValueChange` (the whole value, every change as it is made) and `onDone` (with no argument it closes as Enter does; `onDone("pick")` closes as a pick, a band picked). The editor keeps the draft, Escape's keep or throw-away by field type, the write check and the save and, on a phone, the panel's ✕ and ✓: at `form: "phone"` your body draws none of its own. Escape and Tab from inside your body's element are taken before your body hears them (Tab walks your controls and closes from either end); a key that starts in a popup your body draws outside its element (a list in a portal) is left to your body, and that popup carries `EDITOR_INNER_ESCAPE` on its root (from `viewkitjs/views/editors/panel`), so a popover that hears Escape on the document first leaves it to your popup. A level you draw inside your element (a list in your boxes' place) may carry `EDITOR_INNER_ESCAPE` too: its Escape is your body's, and the editor stays open. Call `preventDefault()` on that Escape as you close your level, so nothing around the editor takes it too (a list's Escape that clears its selection). Enter is your body's. In the phone's sheet your body is handed `onStepChange`: hand it a step of your own (`ViewsBodyStep`, its `title` and `onBack`) while you stand on one, and `null` once you are back (*The sheet's head*). Its popover stands at your `Popover`'s own width, marked `data-vk-body="parts"`.
|
|
457
456
|
|
|
458
|
-
`ValuesBody`,
|
|
457
|
+
`ValuesBody`, required: a whole body for a field holding several emails, phones, links or domains, which your app draws, `ViewsValuesBodyProps`; `CONTROLS.ValuesBody` is ViewKit's own, the Values editor. The value list editor opens it in the grid and in a field row, in a popover under the values (over the cell, in the grid) on a computer and the sheet on a phone, handed the field's name (`label`), its type (`kind`: `email`, `phone`, `url` or `domain`), the draft as lines (`ViewsValueLine`: `{ value, label?, main }`, the main one first; `[]` when there are none, so your body draws its own line for adding one), whether a value carries a label (`labels`; false, draw none and none is saved), `holds` (`one` where the field holds one value: one line, no label, no main mark, no line to add another while it holds one), a phone's country (`region`, where a number typed without its code is read), whether it may be emptied, what was typed on what opened it (already the one line's value), `autoFocus` and `form`, and `check`, the field's own reading of a value: its reason in your app's words, or null when it reads, for your body to say as a value is added or changed. The body hands back `onValueChange` (the whole list, every change as it is made) and `onDone` (it closes as Enter does: the grid moves one row down). A line handed back as it was drawn keeps what is stored, so a phone or a link is not rewritten by opening the editor. The editor keeps the draft, Escape's keep or throw-away by field type, the write check and the save and, on a phone, the panel's ✕ and ✓: at `form: "phone"` your body draws none of its own. Escape and Tab from inside your body's element are taken before your body hears them (Tab walks your controls and closes from either end); a key that starts in a popup your body draws outside its element (a label list in a portal) is left to your body, and that popup carries `EDITOR_INNER_ESCAPE` on its root. A level you draw inside your element (a list in your rows' place) may carry `EDITOR_INNER_ESCAPE` too: its Escape is your body's, and the editor stays open. Call `preventDefault()` on that Escape as you close your level, so nothing around the editor takes it too (a list's Escape that clears its selection). Enter is your body's. In the phone's sheet your body is handed `onStepChange`: hand it a step of your own (`ViewsBodyStep`, its `title` and `onBack`) while you stand on one, and `null` once you are back (*The sheet's head*). A list the write check refuses is said once, under your body in the panel; where Escape keeps, an Escape over a refused list shows the reason and a second Escape throws the edit away; and focus leaving your body other than by Tab doesn't close the editor (a press outside does). Its popover stands at your `Popover`'s own width, marked `data-vk-body="values"`.
|
|
459
458
|
|
|
460
|
-
`TextBody`,
|
|
461
|
-
`NumberBody`,
|
|
459
|
+
`TextBody`, required: a whole body for a field typed as one string (a line of text, an email, a phone, a link, a domain, long text or rich text), which your app draws, `ViewsTextBodyProps`; `CONTROLS.TextBody` is ViewKit's own, the Text editor. The grid's and a field row's text editors open it: in a grid cell on a computer, every text the person may write, long text and a line the cell cut off included (lifted over the rows below and the frozen columns as ViewKit's own grown editor is; a body growing past the scroll box at the last row is your body's to handle: open upward, or scroll inside), in the sheet on a phone, and in place in a field row at every width. A text opened only to be read keeps the editor's own panel. It is handed the field's name (`label`), its text type (`kind`: `text`, `url`, `domain`, `email`, `phone` or `rich_text`), whether it is a paragraph (`paragraph`: long text and rich text), the draft (`value`, a string), a phone's country (`region`, where a number typed without its code is read; the phone opens written out), what was typed on what opened it (`typed`, already the draft), `autoFocus`, `form` (`phone` in the sheet, `computer` anywhere in place), `place` (`cell` in a grid cell, where your box may grow over the rows below; `row` in a field row, where it stands in the row's flow, so the row grows with it and a section that clips the row never cuts it; absent, `cell`), and `check`, the host's own reading of a value: its reason in your app's words, or null when it reads, for your body to say as it is typed. The body hands back `onValueChange` (the whole text, every change as it is made) and `onDone` (it closes as Enter does: the grid moves one row down). The editor keeps the draft, Escape's keep or throw-away by field type, Tab, the close's tidy (a line's line breaks become a space; a phone handed back that reads as the stored number writes nothing), the write check and the save, and it draws the reason a value is refused (under the cell, in the sheet, under a field row's box): draw none of your own at the close. Escape, Tab and ⌘ or Ctrl Enter from inside your body's element are taken before your body hears them (Tab walks your controls and closes from either end; ⌘ or Ctrl Enter closes as Enter; in place, a Tab between your controls moves the focus but your own key handlers don't hear it). Enter and Shift Enter are your body's and do what the editor's own do: on a line they call `onDone()`, in a paragraph they make a new line; a step of your own that lists choices (a phone's countries) may take Enter for its pick. A key that starts in a popup your body draws outside its element (a country list in a portal) is left to your body; that popup carries `EDITOR_INNER_ESCAPE` on its root, takes the focus while it is open, and hands it back to your body when it closes. A level you draw inside your element (a list in your box's place) may carry `EDITOR_INNER_ESCAPE` too: its Escape is your body's, and the editor stays open. Call `preventDefault()` on that Escape as you close your level, so nothing around the editor takes it too (a list's Escape that clears its selection). In place, the focus leaving your body for anywhere else closes the editor as a press outside does; a press on your body's own surface doesn't. At `form: "phone"` your body draws no ✕, ✓ or Cancel of its own: the sheet holds them. In the phone's sheet your body is handed `onStepChange`: hand it a step of your own (`ViewsBodyStep`, its `title` and `onBack`, as for a phone's countries) while you stand on one, and `null` once you are back (*The sheet's head*).
|
|
460
|
+
`NumberBody`, required: a whole body for a number, money or a percent, which your app draws, `ViewsNumberBodyProps`; `CONTROLS.NumberBody` is ViewKit's own, the Number editor. The grid's and a field row's number editors open it: in the grid cell on a computer (lifted over the rows below and the frozen columns as ViewKit's own grown editor is; a body growing past the scroll box at the last row is your body's to handle), in the sheet on a phone, and in place in a field row at every width. A number formatted as a duration keeps the editor's own box. It is handed the field's name (`label`), its kind (`kind`: `number`, `money` or `percent`; a percent is stored 0 to 100, the value is the percent), the draft (`value`: a number, `null` when empty, `NaN` when what is in the box reads as no number), its unit (`unit`: money's currency code or a number's unit) and the units it may be put in (`units`; absent, the unit is shown with nothing to press), the digits the field keeps (`decimals`), its limits (`min`, `max`; a percent 0 and 100 unless the field widens them), how your people write a number (`locale`, and `decimal`, the separator where your app states one), whether it may be emptied (`empty`), where the figure stands (`align`: `end` in the grid, `start` in a field row), what was typed on what opened it (`typed`; `value` is its reading, or `NaN`), `autoFocus`, `form` (`phone` in the sheet, `computer` anywhere in place), and `check`, the host's own reading of a value and its unit, asked with the value rounded to `decimals`: its reason in your app's words, or null. The body hands back `onValueChange` (a number, never text: `null` when its box is emptied, `NaN` for text that reads as no number, and the unit when it is one of `units`; every change as it is made) and `onDone` (it closes as Enter does: the grid moves one row down). Read what is typed in your box with `locale` and `decimal`; the editor rounds to `decimals`, so hand what was typed. The editor keeps the draft, the rounding, Escape's keep or throw-away by field type, Tab, the close (`NaN` writes nothing; empty clears only where it may be emptied; a value that rounds to the stored one writes nothing), the write check and the save, and it draws the reason a value is refused: draw none of your own at the close. A unit handed back that isn't one of `units` is ignored. Escape, Tab and ⌘ or Ctrl Enter from inside your body's element are taken before your body hears them (Tab walks your controls and closes from either end; ⌘ or Ctrl Enter closes as Enter). Enter, Shift Enter and Alt Enter are your body's and call `onDone()`, as the editor's own box closes on Enter with any modifier; your own unit list may take Enter for its pick. A key that starts in a popup your body draws outside its element (a unit list in a portal) is left to your body; that popup carries `EDITOR_INNER_ESCAPE` on its root, takes the focus while it is open, and hands it back to your body when it closes. A level you draw inside your element may carry `EDITOR_INNER_ESCAPE` too: its Escape is your body's, and the editor stays open. Call `preventDefault()` on that Escape as you close your level, so nothing around the editor takes it too (a list's Escape that clears its selection). In place, the focus leaving your body for anywhere else closes the editor as a press outside does; a press on your body's own surface doesn't. At `form: "phone"` your body draws no ✕, ✓ or Cancel of its own: the sheet holds them. In the phone's sheet your body is handed `onStepChange`: hand it a step of your own (`ViewsBodyStep`, its `title` and `onBack`, as for money's currencies) while you stand on one, and `null` once you are back (*The sheet's head*).
|
|
462
461
|
|
|
463
|
-
`SortBody`,
|
|
462
|
+
`SortBody`, required: the sort editor's whole body, which your app draws, `ViewsSortBodyProps`; `CONTROLS.SortBody` is ViewKit's own. The sort pill opens it: in its popover on a computer (or your `host`, where the toolbar is handed one) and in the Sheet on a phone, and so does anything else that opens `SortEditor` or `useSortEditor`'s body. It is handed the sort's name (`label`), the fields the list sorts by (`options`, each its sort key, its words and the direction a new rule takes, and, marked as the grid's header marks its column, its field's `type`, the `part` it sorts by and the header's `glyph`, drawn with your icons; the three absent for an option your app built with no column behind it), the rules in order, the first sorting first (`rules`, each a sort key and `asc` or `desc`), the sorts set aside after them (`setAside`, each holding one of the places until it is put back or deleted; `[]` when there are none), how many rules at most (`max`, a set-aside sort holding one of the places), `form`, and `addSort`, true on a computer where what holds it has no + of its own (the dashed Sort, while only set-aside sorts stand, and a pill handed `addAfter={false}`), so Add sort stands at your body's foot; a phone's body always has one. The body hands back `onRulesChange` (the whole rules in order and, when handed, the set-aside sorts kept, any left out deleted, absent keeping every one; every change as it is made: a move, a direction, a removal, an added rule, a set-aside sort put back or deleted) and `onDone` (the job is done and what holds it closes). On a phone where the sheet's head doesn't draw them (the provider's `sheetActions` at `bar`), it is handed `actions`, the ✕ (`close`, which takes the rules and the set-aside sorts back to what they were as the sheet opened) and ✓ (`done`, which keeps them) for its own head; on a computer, and under `head`, where the sheet holds them, it is handed none. On a phone it is handed `onStepChange`: hand it a step of your own (`ViewsBodyStep`, its `title` and `onBack`: Add sort's fields, a rule's direction) while you stand on one, and `null` once you are back; under `head` the sheet's head shows the step's title and Back in ✕'s place, under `bar` your own head does, and the sheet's Escape goes back a step instead of closing it (a swipe still closes the sheet, keeping the rules). ViewKit keeps the rest: it checks each list against the rules (each rule one of `options`, each field sorted once, each set-aside sort one the list holds, `max` at most, a set-aside sort counted) and writes nothing when one breaks them; it keeps the latest rules between renders, so two changes before the next render both land; on a computer it closes the popover when the last rule goes with no set-aside sort left; and it keeps what ✕ takes back to. The + after the pill, the empty Sort and Sort on the row's right open your `FieldsBody`. A body that ignores `setAside` shows an empty panel at the dashed Sort, where only set-aside sorts stand. `CONTROLS.SortBody` is ViewKit's own, the sort editor: on a computer each rule its grip, its field's and its direction's Select, and ×, then Add sort where `addSort` and Clear all sorts; the set-aside sorts after the rules, each its field's box dashed with why, re-pointed, put back or deleted; on a phone a card per rule, and Add sort, a rule's direction and a set-aside sort's field as a step of the same sheet (`onStepChange`), with its own head under `bar`.
|
|
464
463
|
|
|
465
|
-
`FilterBody`,
|
|
464
|
+
`FilterBody`, required: the filter editor's whole body, which your app draws, `ViewsFilterBodyProps`; `CONTROLS.FilterBody` is ViewKit's own. An advanced filter's pill opens it on a computer (in its popover, or your `host`), and Filter opens it in the Sheet on a phone, and so does anything else that opens `FilterEditor`. It is handed the filter's name (`label`), the fields a rule may name (`fields`, each its key, words, `fieldKey`, `part` and `type`, a relation with its `far` fields one level in; and, in its place in the column order, each column the list can't filter, why in `disabled`, for your body to draw greyed and never name in a rule or put a set-aside rule back on), the level it is open on (`filter`, `viewkitjs/fields/query`'s `FilterGroup`: on a computer the advanced filter's own group, a top joined by Or as one group of its own; on a phone the whole filter; its items rules, groups and relation rules, a rule or relation rule set aside kept where it sits), how many levels deep its rules may stand (`levels`, its own the first: 2 for an advanced filter's group, 3 on a phone, so the view never stands more than 3 deep), whether it may exclude its matches (`excludable`, `op: "not"`: an advanced filter's own group, never a top or a where), `relation` where the level is a relation rule's where edited in place (its field key, words and quantifier; its rules name its far fields; and `gone`, present only where the list no longer lists the relation: why, in words, "Its relation is no longer in this list", for your Add filter's disabled reason), `form`, and `ruleValue`, a rule's value in ViewKit's own body for its type, for your body to place where a rule's value opens, each change handed back as the rule with its new value (null for a rule set aside or a way taking no value). The body hands back `onFilterChange` (the whole level and, at a relation edited in place, its quantifier; every change as it is made: a rule added, changed or removed, a join turned, a group made, matches excluded) and `onDone` (the job is done and what holds it closes). A rule held until whole is your body's to hold: hand it back once whole. On a phone where the sheet's head doesn't draw them (the provider's `sheetActions` at `bar`), it is handed `actions`, the ✕ (`close`, which takes the filter back to what it was as the sheet opened) and ✓ (`done`, which keeps it); on a computer, and under `head`, it is handed none. ViewKit keeps the rest: it checks each level against the rules (its join `and` or `or`, `not` only where `excludable`; `levels` deep at most; 50 items at most in each container; each rule a field it may name and a way that field offers, with a value that way stores; each relation rule one of the relations, never inside another, `any`, `none` or `every`; each rule still set aside one the level held, unchanged; under a relation the list no longer lists, each rule one the level held, unchanged, so its rules may be deleted and never added or changed) and writes nothing when one breaks them; it writes through its own editor's state, so the first edit in a top joined by Or wraps it into one advanced filter and the pills' keys follow; a level handed back empty on a computer takes its advanced filter away and closes the popover, and on a phone the sheet stays on it; and it keeps what ✕ takes back to. Beside the level it is handed each choice field's values, and a place's country's names (`options` on a field, each as the Picker draws it: a status's step, a person's or a record's avatar, a record's kind), only where ViewKit holds the field's whole list as it opens (its values read on demand and not yet handed by your app, it is absent: open `ruleValue` there; `[]` is a whole list that is empty), ViewKit's own words for a rule (`ruleWords(rule, relation?)`: its field, way and value as the bar words them, for a rule your body has no words of its own for), and, on a phone, `onStepChange`: hand it a step of your own (`ViewsBodyStep`: a box's list, Add filter's fields) while you stand on one, and `null` once you are back; under `head` the sheet's head shows the step's title and Back in ✕'s place, under `bar` your own head does, and the sheet's Escape goes back a step instead of closing it. `CONTROLS.FilterBody` is ViewKit's own, the filter editor: each rule Where or its join, its field, how it compares and its value in its type's own box (a choice's values from `options`), ⋮ to make a group or delete it, groups 3 deep, Add filter and Clear all filters; a relation rule's block (its relation, `any`, `none` or `every` where, its rules on that relation's fields), which a related rule's ⋮ makes with None or Every; a group's ⋮ with Exclude matches, and the level's own where `excludable`; a rule set aside in its place, its field's box dashed saying why, re-pointed, put back where its field is back, or deleted, and a relation rule set aside, or on a relation the list no longer lists, one row in its words; ViewKit's own words and value body (`ruleWords`, `ruleValue`) for a way the kit has no word for, a field it has no type for or a choice with no values, so nothing the level holds is out of sight; open on a relation's where, its relation and quantifier over the rules, the quantifier handed back with the level; on a phone each box's list, a date, a value ViewKit draws, Add filter, a block's quantifier and a rule's or a group's ⋯ as a step of the same sheet (`onStepChange`), with its own head under `bar`.
|
|
466
465
|
|
|
467
|
-
`FieldsBody`,
|
|
466
|
+
`FieldsBody`, required: the field list's whole body, which your app draws, `ViewsFieldsBodyProps`; `CONTROLS.FieldsBody` is ViewKit's own. ViewKit opens it wherever it opens a sort or filter field list: for a sort, the empty Sort, Sort on the row's right and the + after the sort pill; for a filter, Filter and the + on the bar, a filter's field on the bar and a set-aside filter's field. It stands in the popover under what opened it on a computer, and on a phone on a page of the sheet, under the sheet's own head, so it takes no `actions`. It is handed what the pick is for (`purpose`: `sort` or `filter`), the list's name (`label`), its search's words (`search`), the fields in order as `ViewsFieldsBodyField` data (each its `key`, its words, its field's `type`, the `part` it reads and its column's `glyph`, all three as the grid's header marks its column, and, where it can't be picked, why, in `disabled`: a field another rule sorts says "Sorted", and, for a filter, a column the list can't filter says why in your words; for a filter, each relation with its `far` fields one level in, where a rule can name one), the field being changed (`own`, absent where a pick adds) and `form`. It hands back one pick through `onPick` (the field's key, and for a far field the far field's key too), and `onDone` closes what holds it with no pick. ViewKit writes the pick as its own list's would, and writes nothing for a key it didn't hand or handed `disabled`. `CONTROLS.FieldsBody` is ViewKit's own, the Picker.
|
|
468
467
|
|
|
469
|
-
`FilterPartBody`,
|
|
468
|
+
`FilterPartBody`, required: a filter rule's way and value, which your app draws, `ViewsFilterPartBodyProps`; `CONTROLS.FilterPartBody` is ViewKit's own. A filter's way and its value on the bar open it, in a popover (no `actions`, as `FieldsBody`). It never opens inside `FilterBody`'s `ruleValue`, which stays ViewKit's own value body. It is handed which part opened it (`part`: `way` or `value`), the part's name (`label`), the rule as data (`rule`: its field key, part, way and value; one waiting for its value holds its way's empty value), the field it names (`field`, a far field for a far rule, its `type` saying the ways and the value each stores), the ways its field offers (`ways`, each its operator and its words), ViewKit's own value body (`own`, for a type your body doesn't draw; null at `way`) and `form`. It hands back the rule changed through `onRuleChange`: a new way is written as ViewKit's own writes one, its value kept where it still fits and emptied where not, whatever value comes with it; a value is written once its way can hold it, or emptied (the rule then waits for its value). ViewKit writes nothing for a rule naming another field or part, a way its field doesn't offer or a value its way can't hold, and keeps a rule held until whole, the Or top's wrap and the bar's keys. `onDone` closes what holds it. Its `field` carries the field's values (`options`) as `FilterBody`'s fields do. `CONTROLS.FilterPartBody` is ViewKit's own, the filter part: a rule's way in the kit's ways, its value in its type's own (a choice's values from `options`), and ViewKit's ways and `own` for a rule the kit draws no part of.
|
|
470
469
|
|
|
471
470
|
`SearchField`, optional: the toolbar's search box, which your app draws, `ViewsSearchFieldProps`. Handed one, the search opens it wherever it opens its own field, in place of its frame's glass, field and ✕, on a computer and on a phone: from its button on the row and beside the phone's views, and filling its line in the narrow panel and on a phone with no views. It is handed the value, `onChange` (every keystroke), the placeholder, its name (`label`), `searching` and its words (`searchingLabel`), the clear (`onClear`, its name in `clearLabel`, and `closes`: opened from its button, your clear stands while it is open, empty or not, and closes it; filling its line, show it only while it holds a value), `form` (`computer` or `phone`) and `fill`. ViewKit keeps its button while shut, whether it is open, the caret on a press (in the first `input` inside your box), Escape and a blur with nothing typed, caught on its frame around your box: an Escape your box keeps for itself, `preventDefault` it, and a button of your own inside the box `preventDefault`s its `mousedown`, as ViewKit's ✕ does, so the box keeps its focus (a browser that doesn't focus a button on a click gives the blur no target). Fill the frame's width; on a phone, a text of 16px keeps iOS from zooming the page.
|
|
472
471
|
|
|
473
472
|
`PortsHost`, optional: what draws the ports an app leaves out, `ViewsPortsHostProps`: `toast` and `confirm` (which of them to draw) and `onReady` (hand it the ports once they stand). The provider mounts it once, after it first renders in the browser, so a server render draws neither, and only when the app hands no `toast` or no `confirm`; an app's own port always wins. Left out, a missing `toast` draws nothing and a missing `confirm` is the browser's. `CONTROLS.PortsHost` reports in ViewKit's Toast (Undo where `success` hands one) and asks in ViewKit's alert dialog, the question held in its own state, so an app's own `AlertDialogHost` never shows it twice; its words are your messages' (`views.panels.toast-undo`, `views.panels.close`, `views.panels.toast-region`, `views.panels.alert-failed`, `views.picker.retry`, `views.picker.cancel`).
|
|
474
473
|
|
|
475
|
-
`SelectionBar`, optional: the selection bar, which your app draws, `ViewsSelectionBarProps`, the props of ViewKit's `SelectionBar`. Handed one, ViewKit's `SelectionBar`, wherever your `renderBar` calls it, draws yours in its own place, in the box that holds it (a grid's frame), at every count, zero included, so it can leave as it chooses; left out, ViewKit draws its own bar, portalled to the screen's foot, placed by the provider's `selectionBar`. Beside the count, the clear, the verbs, `busy`, `onDelete` and `deleteLabel`, it is handed what ViewKit's own bar doesn't read: `noun` (what a row is, one and many), `deleteLine` (the line under Delete's question), and on each verb `more` (kept off the bar, in More), on an options verb `value` (what every picked row holds, null when every one is empty), `empty` (the empty row's words; a pick of it hands `null`) and `search`, its `options` ViewKit's picker items (a person by `avatarUrl` and `kind`), and a press (`onClick`, `onSelect`, `onDelete`) may hand back a `SelectionDone`, `{ words, undo }`, or a promise of one, which yours shows. `CONTROLS.SelectionBar` is the Outright bulk bar (`BulkBar`): on a computer a surface floating at the foot of the box that holds it, centred, its count (which clears), the verbs as outlined buttons, Delete in More or its own (its option `delete`, `BULK_BAR_LOOKS`), and More, holding what is kept off and what doesn't fit; on a phone, or in a `PhoneHost` screen, the tray, its verbs at 44 with Delete among them, or the pill (its option `phone`); one Tab stop with the arrows; Escape from the box clears; an options verb's values in the Picker (in the one Sheet on a phone); Delete asked first in ViewKit's alert dialog, then called, so your `onDelete` asks nothing of its own; what a press hands back said in its own Toast, just above it, with Undo; a press that throws said as one that didn't go through. It hands the box that holds it the room it takes, which a list that scrolls in it pads its foot by ([its tokens](controls/bulk-bar.md)). The provider's `selectionBar` placement
|
|
474
|
+
`SelectionBar`, optional: the selection bar, which your app draws, `ViewsSelectionBarProps`, the props of ViewKit's `SelectionBar`. Handed one, ViewKit's `SelectionBar`, wherever your `renderBar` calls it, draws yours in its own place, in the box that holds it (a grid's frame), at every count, zero included, so it can leave as it chooses; left out, ViewKit draws its own bar, portalled to the screen's foot, placed by the provider's `selectionBar`. Beside the count, the clear, the verbs, `busy`, `onDelete` and `deleteLabel`, it is handed what ViewKit's own bar doesn't read: `noun` (what a row is, one and many), `deleteLine` (the line under Delete's question), and on each verb `more` (kept off the bar, in More), on an options verb `value` (what every picked row holds, null when every one is empty), `empty` (the empty row's words; a pick of it hands `null`) and `search`, its `options` ViewKit's picker items (a person by `avatarUrl` and `kind`), and a press (`onClick`, `onSelect`, `onDelete`) may hand back a `SelectionDone`, `{ words, undo }`, or a promise of one, which yours shows. `CONTROLS.SelectionBar` is the Outright bulk bar (`BulkBar`): on a computer a surface floating at the foot of the box that holds it, centred, its count (which clears), the verbs as outlined buttons, Delete in More or its own (its option `delete`, `BULK_BAR_LOOKS`), and More, holding what is kept off and what doesn't fit; on a phone, or in a `PhoneHost` screen, the tray, its verbs at 44 with Delete among them, or the pill (its option `phone`); one Tab stop with the arrows; Escape from the box clears; an options verb's values in the Picker (in the one Sheet on a phone); Delete asked first in ViewKit's alert dialog, then called, so your `onDelete` asks nothing of its own; what a press hands back said in its own Toast, just above it, with Undo; a press that throws said as one that didn't go through. It hands the box that holds it the room it takes, which a list that scrolls in it pads its foot by ([its tokens](controls/bulk-bar.md)). The provider's `selectionBar` placement and query are ViewKit's own bar's. Every word is your messages'.
|
|
476
475
|
|
|
477
|
-
`ViewsListBody`,
|
|
476
|
+
`ViewsListBody`, required: the views list's whole body, which your app draws, `ViewsViewsListBodyProps`; `CONTROLS.ViewsListBody` is ViewKit's own. The view picker's chip opens it: in its popover on a computer and in the Sheet on a phone. The row's pills and its "+N" list stay ViewKit's. It is handed the list's name (`label`), the axis's views in its order (`views`, each its `value`, its words, its `icon`, its `count` (absent while the list's counts are hidden), `private` for one of the reader's own, and `menu`, the view's own verbs as your app gave them), the view in use (`value`), `form`, and, where the axis has them, `onCreate` with its word (`createLabel`; what holds the list closes first, then the axis's own create runs) and `onReorder` with `canDrag`. The body hands back `onViewChange` (a view picked; it closes nothing, so call `onDone` after it, as `CONTROLS.ViewsListBody` closes on a pick), `onReorder` (one whole block, the shared views or the reader's own, in its new order, each once) and `onDone` (what holds it closes). On a phone where the sheet's head doesn't draw it (the provider's `sheetActions` at `bar`), it is handed `actions`, the ✕ (`close`, which closes the list) and, while it stands on a step, Back (`back`); on a computer, and under `head`, it is handed none. On a computer it is handed `onHold`: while the body holds, a press outside the list and Escape close nothing (it asks a question outside the list, your `confirm` port's dialog), so the list stays when the question is answered. On a phone it is handed `onStepChange`: a body standing on a step of its own (a view's menu, Rename) tells it, and the sheet shows the step's title and Back and its Escape goes back a step. Where the axis hands `verbs` (`ViewsViewVerbs`: the `layouts` a new view can take, each its glyph by your `AppIcon`, the `records`' noun, a board's `columns` and `onChange`, which takes every change a view's menu makes, `ViewsViewChange`: rename, create, duplicate, delete, restore, save, reset, edit, link, favorite, private), the body is handed them, and each view its `layout`, `changed` and `favorite`. ViewKit checks each value before it is written: a pick that isn't one of `views`, and an order that isn't one whole block, write nothing. What creating, reordering and a view's verbs mean stays your app's, as the axis says. `CONTROLS.ViewsListBody` is ViewKit's own, the views list: a search over the views (at the Sheet's foot on a phone), each with its glyph, its count and its ⋮ where you hand it a menu, Shared and the reader's own under their headings with a lock on each of the reader's own, a view moved by a drag or ⌥↑ ⌥↓ within its block (never one `canDrag` refuses, nor a view dropped past one), ↓ and ↑ going on from the view in use, and New view where the axis grows. It draws no ✕ of its own: the Sheet's head draws it, and `actions` goes unread but for Back on a step. On a phone a view's ⋯ turns the one Sheet into its menu, with Back, never a sheet on top (VK-823). Handed `verbs`, a view's menu is the Outright kit's (`useViewMenu`): Rename… and New view in the Modal (New view where the axis grows, as without verbs, its create handed to `verbs.onChange`), Edit view, Private view, Save for everyone, Reset and Save as new view, Copy link, Favorite, Duplicate, and Delete, asked on a computer through the `confirm` port (ViewKit's alert dialog where your app hands none and `PortsHost` stands; the menu's own dialog where neither does, never the browser's) and said through the `toast` port's `success` with its `undo`. ViewKit moves no view itself: your `verbs.onChange` opens the right one, the first listed when the open one is deleted, the view again on a restore with `open`, the new one on a create or a duplicate (whose ids your app makes); `viewsAfter`, from `viewkitjs/views/controls`, does all of it over your views; on a phone each a step of the one Sheet, the delete question the Alert in its sheet form. Every word is your messages'.
|
|
478
477
|
|
|
479
|
-
`GroupBody`, optional:
|
|
478
|
+
`GroupBody`, optional and deprecated: read by nothing. Only ViewKit's own Customize opened it, and that Customize is gone; a `CustomizeBody` holds its group editor inside it, handed the same props as its `group`. A map that names it still compiles; it leaves in a later release. Its props, `ViewsGroupBodyProps`, are what a `CustomizeBody`'s `group` is handed: it is handed the group's name (`label`), the fields the list can be grouped by (`dimensions`, each its `value`, its words, its `orderOptions` with the direction each opens in, its `defaultOrder`, and a date's `granularities` with its `defaultGranularity`), the group as one value (`group`, a `ViewsGroupValue`: the dimension grouped by or `none`, the active dimension's `order` (`mode` and `dir`), its date step (`granularity`), `hideEmpty` while grouped where the list offers it, and `groups` while grouped where the list hands them, in the order the list shows them, each its `key`, its words, `empty`, `hidden`, and its `count` where the list counts it), `manualOrder` (your own order, `manual`, may be picked) and `form`. The body hands back `onGroupChange` (the whole group, every change as it is made) and `onDone` (inside Customize, back to its list). ViewKit makes one write for each change, in this order: a new Group by, order or date step is written alone, the rest of the value (about the old field's groups) set aside; else Hide empty groups; else the groups: the same groups in a new order (your own order), one group shown or hidden, every group hidden, or every group shown. A new Group by keeps the order and step handed with it only where the new field offers them, else takes the field's own. A value that changes two of those at once, names a field the list doesn't offer, names an order or step the field grouped by doesn't offer, or adds or loses a group writes nothing. It is handed no `actions`. It is handed `onStepChange`, on a computer and a phone: hand it a level of your own (`ViewsBodyStep`, its `title` and `onBack`: Group by's fields, an order's choices) while you stand on one, and `null` once you are back; what holds it shows the level's name in its head and its Back calls `onBack`. `CONTROLS.GroupBody`, kept so a map that names it compiles, is ViewKit's own, the group editor: Group by, Order, Direction, a date field's Date step and Hide empty groups, each opening its choices in place; the groups with their Switch, dragged into your own order, Hide all and Show all; Remove grouping; each change one write, Count ordered by each group's `count`, its level told through `onStepChange`.
|
|
480
479
|
|
|
481
|
-
`CustomizeBody`,
|
|
480
|
+
`CustomizeBody`, required: Customize's whole body, which your app draws, `ViewsCustomizeBodyProps` (`CONTROLS.CustomizeBody`, or your own). ViewKit draws no Customize of its own: Options opens it in your `host`, the map's `Popover` or, on a phone, the `Sheet`, and so does everything else that draws Customize (`ViewOptionsPanelContent`, the ready toolbar's Options, `ViewOptionsPopoverPanel`). One body holds the whole of Customize: its sections stand where your body puts them. It is handed Customize's name (`label`), the page it stands on (`page`: `list`, `layout`, `columns`, `filter`, `sort` or `group`, held by your app where it holds Options' page, so it survives the toolbar changing form) with `onPageChange`, and the view's settings as data: `layout` (the layouts, the one in use, those refused with their reasons, `onLayoutChange`, and the layout in use's own toggles, choices, density and the reader's own settings, offered where ViewKit's own Layout page offers them), `columns` (every column in the view's order, hidden or not, `hideable`, `fixed`, a card's `startsLine` and each column's own settings; `onColumnsChange` with every column in its order, written one change at a time, a reorder or columns shown or hidden, several at once in one write (your Hide all and Show all), a column that can't hide (fixed, not hideable) staying shown and a Hide all of every column leaving the first one shown, a reorder with a column shown or hidden writing nothing; with the panels' builder's `parts`, the table's columns include each part column the view places, so a Hide all reaches it; `onStartsLineChange`, `reset` while the columns differ from the view's, and your field editor's rows as `columnMenu` and `footer`), the sort as `SortBody` is handed it (`sort`; a list with one sort as one rule, `max` 1), the filter as `FilterBody` is handed it on a phone (`filter`: the whole filter, 3 levels deep), the group as `GroupBody` is handed it (`group`), `toggles` (Show counts among them, read from the view, each written through its own `onChange`), and, on a shared view, `view` (`changes`, `stale`, `canPublish`, `pending`, `onReset`, `onPublish`). With no shared view it is handed the foot's Clear (`onClear`) where the holder offers one and Clear all (`clearAll`) while anything is set; `foot` says the foot's words (`kit` for Clear and Save, `none` where they stand elsewhere). It hands back `onDone` (what holds it closes); on a phone where the sheet's head doesn't draw it, it is handed `actions`, the ✕ alone. The sort, filter and group are written as their own slots' are, through ViewKit's checks. A list's per-field filters (a field's values, as ViewKit's own Filter page drew them), its time range and its date ranges are handed as `fields` (`ViewsCustomizeFields`): `folded` (behind one Filter row, as a list folds them, or each its own row, as a dashboard lists them) and `items`, each with its words, what it holds (`says`, `inForce`), where its row stands (`place`), why it can't open (`disabled`), `onOpen` (asked as its screen opens), and its screen's content: `pick` (one value, its All choice first), `check` (several), `time` (presets, and `custom` with its days and each press), `dates` (a range of days) or `body` (ViewKit's own body for any other kind). Each writes through its own change. The view's name with its rename (`name`, `onRename`), Copy link (`onCopyLink`) and Export CSV with its count (`onExport`, `exportCount`) are handed where your app hands them to the toolbar (`ToolbarOptions`' and `ReadyToolbar`'s `viewName`, `onRenameView`, `onCopyLink`, `onExport`, `exportCount`); draw each only where handed. On a phone it may tell the level of its own it stands on inside a section (`onStepChange`), and the sheet's Escape goes back a level instead of closing. Your body draws everything else a list hands it: a column's own settings, your field editor's rows (`columnMenu`, `footer`) and a card layout's line breaks (`onStartsLineChange`) included.
|
|
482
481
|
|
|
483
482
|
`RowsWait`, optional: wraps a grid's rows, `ViewsRowsWaitProps`: `pending` and `children`. Handed one, a grid that has settled always draws its rows as its children, so they stay mounted as a wait starts and ends. It stands inside the grid's scroll area, where the rows are: an ungrouped grid's column names stand above it and its footer below it, and a grouped grid's one row of column names (`oneHeader`) above it, every group inside it with its bar, column names and footer. The column names and the footer stay as they are, and take no press while the rows wait. While new rows load (`transitionPending`, or the one commit after `transitionKey` changes) and the grid already shows rows, it keeps the old ones on screen as they were drawn, inert, and hands `pending: true`: draw how they wait (a bar along the top, the rows dimmed). When the wait ends the new rows mount fresh and `pending` is false: draw `children` as they are. A grid with no rows yet, a first load or an empty grid, draws Loading in place of its body either way, and without `RowsWait` every wait does. Draw it as a block in flow that neither scrolls nor clips (no `overflow` of its own) and is no size container (no `container-type`), so the heads inside it still pin, the group labels and the empty message keep to the scroll area's width, and the rows scroll with the grid. Its top scrolls with the rows: a bar along it lies along the first row's top and leaves sight once the grid is scrolled, so a bar meant to stay in sight pins itself, sticky at `top: var(--vk-head-h)` under the column names. The slot mounts afresh when the grid changes shape (empty to rows, grouped to ungrouped, `oneHeader`), never during a wait. An editor open as the wait starts writes its draft then, as the grid going would; a draft your app refuses there keeps its refusal under the inert cell and is said in a toast when the rows mount fresh. A popup the grid opened outside its box (a column's or a row's menu, a phone's sheet) is not inert and stays as it was; what is typed in a sheet during the wait is thrown away when the rows mount fresh. The grid's paste, undo and redo wait with the rows.
|
|
484
483
|
|
|
@@ -491,8 +490,8 @@ focus that press moves is what would close the popup: a vetoed press holds again
|
|
|
491
490
|
and focus leaving by keyboard (a Tab out) closes without asking. Its
|
|
492
491
|
`chrome` is `panel` (the app's card popover) or `menu` (the app's menu panel, for a list); a panel
|
|
493
492
|
click reaches `onPanelClick`, and `panelData` sets `data-*` attributes on the popup; its `style` carries what a class cannot say, a width that follows a cell. The command
|
|
494
|
-
list's root takes `shouldFilter`, `filter`, `loop` (the arrows wrap) and `defaultValue` (the value of the item highlighted as the list opens, and none while no item has it;
|
|
495
|
-
its chosen row, and the package's row inside draws the check, so the item draws no tick of its own; its input takes a `ref
|
|
493
|
+
list's root takes `shouldFilter`, `filter`, `loop` (the arrows wrap) and `defaultValue` (the value of the item highlighted as the list opens, and none while no item has it; a list that ignores it opens on its first row); an item takes `chosen`: the app colours the item as
|
|
494
|
+
its chosen row, and the package's row inside draws the check, so the item draws no tick of its own; its input takes a `ref`, `onKeyDown`, and `chrome`
|
|
496
495
|
`search` or `bare` (the input without the search row); its empty state and groups take a class. The
|
|
497
496
|
calendar takes a controlled `month` (`YYYY-MM`) with `onMonthChange`, a `dropdown` caption, and the
|
|
498
497
|
`startMonth` and `endMonth` its pickers offer, and `locale`, the conventions' locale, in which it
|
|
@@ -520,13 +519,13 @@ The package ships none of them and depends on neither library.
|
|
|
520
519
|
|
|
521
520
|
### A panel's body
|
|
522
521
|
|
|
523
|
-
A toolbar panel's body slot (`SortBody` the first, then `FilterBody`, `ViewsListBody`, `GroupBody` and `CustomizeBody`) follows one pattern, which every panel's body copies. It is
|
|
522
|
+
A toolbar panel's body slot (`SortBody` the first, then `FilterBody`, `ViewsListBody`, `GroupBody` and `CustomizeBody`) follows one pattern, which every panel's body copies. It is named `<Panel>Body` and required, `CONTROLS` handing ViewKit's own (`GroupBody`, read by nothing, is deprecated): ViewKit opens it wherever the panel opens, on a computer and in the phone's Sheet. It is typed `Views<Panel>BodyProps` (`ViewsSortBodyProps`, `ViewsFilterBodyProps`, `ViewsViewsListBodyProps`, `ViewsGroupBodyProps`, `ViewsCustomizeBodyProps`) and handed the panel's state as plain data, `form` (`computer` or `phone`), `onDone` (the job is done and what holds it closes), and, on a phone, `actions` (the ✕ and ✓, `ViewsSheetActions`) only where the sheet's head doesn't draw them. It hands back the whole new value on every change, as it is made, through one `on<Value>Change` (`onRulesChange`, `onFilterChange`, `onViewChange`, `onGroupChange`), never a step to apply. A body that holds several values, as Customize's does, is handed each section as data with its own change (a layout's `onLayoutChange`, the columns' `onColumnsChange`, each toggle's `onChange`), and a section that has a slot of its own (the sort, the filter, the group) as that slot's props without the chrome, so each type is written once. One contract serves the computer and the phone: `form` tells them apart. ViewKit checks each value against the panel's own rules and writes nothing when one breaks them, and it keeps the save, the latest value between renders and what ✕ takes back to. The group's and the columns' changes are the exception: their writes rebuild from the settings ViewKit last drew, so each change is checked against the last render, and a second one handed before ViewKit draws again writes nothing; hand one change for each press.
|
|
524
523
|
|
|
525
|
-
`QuickFiltersBody` (`ViewsQuickFiltersBodyProps`) is the quick filters' body: handed the fields as the strip shows them (`quickFieldsShown`: those the app offers, then each other field the hold holds a value on, named by the app's `heldLabels` else its key, listing only its held values), each with its values in the order to show them (their counts, and the held values drawn from the hold and worded by the app's `heldLabels` else their key, so a value no row holds any more, a deleted record say, can still be named and let go), the hold, `several` and `showCounts`, it hands back the whole hold through `onHoldChange`. ViewKit writes nothing for a hold that holds a field twice, holds more than one value where `several` is false, or adds a value on a field the strip doesn't offer (one already held there may stay or go). On a phone its `actions` is the ✕ alone, which closes it.
|
|
524
|
+
`QuickFiltersBody` (`ViewsQuickFiltersBodyProps`) is the quick filters' body: handed the fields as the strip shows them (`quickFieldsShown`: those the app offers, then each other field the hold holds a value on, named by the app's `heldLabels` else its key, listing only its held values), each with its values in the order to show them (their counts, and the held values drawn from the hold and worded by the app's `heldLabels` else their key, so a value no row holds any more, a deleted record say, can still be named and let go), the hold, `several` and `showCounts`, it hands back the whole hold through `onHoldChange`. ViewKit writes nothing for a hold that holds a field twice, holds more than one value where `several` is false, or adds a value on a field the strip doesn't offer (one already held there may stay or go). On a phone its `actions` is the ✕ alone, which closes it. On a phone, a press closes the Sheet when one value is held at a time (`quickPressCloses`): your body does so by calling `onDone`. Each field may carry its `options` as the app hands them on the quick filter field (`ViewsPickerItem`s), so a value draws its option's mark (a status's step, a face). `CONTROLS.QuickFiltersBody` is ViewKit's own, the Outright kit's quick filters.
|
|
526
525
|
|
|
527
|
-
`FieldsBody` (`ViewsFieldsBodyProps`) is the field list's body: ViewKit opens it wherever it opens
|
|
526
|
+
`FieldsBody` (`ViewsFieldsBodyProps`) is the field list's body: ViewKit opens it wherever it opens a sort or filter field list (the empty Sort, Sort on the row's right, the + after the sort pill, Filter, the bar's +, a filter's field and a set-aside rule's field). It is handed `purpose` (`sort` or `filter`), the fields as data, each with its mark (`type`, `part`, `glyph`, as the grid's header marks its column) and, where it can't be picked, why (`disabled`: "Sorted" for a field another rule sorts, a filter's column the list can't filter its reason), for a filter a relation's `far` fields one level in, `own` (the field being changed) and `form`. A pick is one value, so it hands back `onPick` (the key, and a far field's key for a far field) rather than an `on<Value>Change`; ViewKit writes it as its own list's pick and writes nothing for a key it didn't hand or handed `disabled`. Its search, its rows and Related records are your body's; ViewKit's own stay the fallback.
|
|
528
527
|
|
|
529
|
-
`FilterPartBody` (`ViewsFilterPartBodyProps`) is a filter rule's part: a
|
|
528
|
+
`FilterPartBody` (`ViewsFilterPartBodyProps`) is a filter rule's part: a filter's way and its value on the bar open it, never inside `FilterBody`'s `ruleValue`. It is handed `part` (`way` or `value`), the rule as data, its field, its ways and ViewKit's own value body (`own`) for a type your body doesn't draw, and hands back the rule through `onRuleChange`: a new way is written as ViewKit's own writes one, its value kept where it still fits and emptied where not; a value is written once its way holds it, or emptied. ViewKit writes nothing for another field or part, a way its field doesn't offer or a value its way can't hold. Neither body takes `actions`: each stands in a popover, or on a phone on a page of the sheet, under the sheet's own head.
|
|
530
529
|
|
|
531
530
|
### Writing an adapter
|
|
532
531
|
|
|
@@ -541,7 +540,12 @@ first row, as your `Popover` does by default: a row's menu opened by a key start
|
|
|
541
540
|
|
|
542
541
|
**A disabled group.** Nothing to do: its rows reach you already `disabled`, with the group's reason where they give none.
|
|
543
542
|
|
|
544
|
-
**The sheet's
|
|
543
|
+
**The sheet's body.** The Sheet pads its body; a body draws no side inset of its own. Stand what your `Sheet` holds in
|
|
544
|
+
your phone's side padding, as `CONTROLS.Sheet` does with its page padding: ViewKit's bodies (the editors, the panels) draw
|
|
545
|
+
from edge to edge of what they are handed.
|
|
546
|
+
|
|
547
|
+
**The sheet's head.** A sheet handed `label` alone, no `title`, holds a body that heads itself: draw no title or close of
|
|
548
|
+
your own over it, or it stands under two heads. A sheet that draws a head of its own (a title with buttons beside it) sets the
|
|
545
549
|
provider's `sheetActions` to `head` and draws `actions.close` and, when handed, `actions.done` there,
|
|
546
550
|
with your own ✕ and ✓ glyphs; a close of your sheet's own (its ✕, a swipe) still reaches
|
|
547
551
|
`onOpenChange` and, for an editor, discards like `actions.close`. A toolbar panel's sheet (Options, Sort, Filter on a
|
|
@@ -568,15 +572,6 @@ menu classes over it.
|
|
|
568
572
|
**The command item's chosen mark.** Colour the item as your chosen row; the row inside draws the
|
|
569
573
|
check. Where your copy's item draws a tick of its own, hide it.
|
|
570
574
|
|
|
571
|
-
**A command list that scrolls as it mounts.** The chips, select and relation editors, and the grid's
|
|
572
|
-
Add column (on the `popover` route) and group menu (on the `popover` route: past eight sort choices, or at any count when the app names its parts with `groupMenu`), mount a `Command.Root` with its rows in the frame the popover opens, before
|
|
573
|
-
your popover has placed its popup. A command library that scrolls its selected item into view on mount
|
|
574
|
-
(cmdk does, with `scrollIntoView`) scrolls the page towards the popup's unplaced spot, which at a
|
|
575
|
-
library's default positioning can be the page's top, and `preventScroll` on the focus doesn't reach
|
|
576
|
-
that scroll. Keep such a popover `fixed`, where the unplaced popup already sits inside the viewport, or
|
|
577
|
-
stop your `Command` scrolling on mount. Your library's default positioning is safe only for a
|
|
578
|
-
`Command` that doesn't.
|
|
579
|
-
|
|
580
575
|
**`chrome: "bare"`.** The input alone, without the search row's glyph and divider. Where your copy
|
|
581
576
|
has only the search row, reach the command library's own input.
|
|
582
577
|
|
|
@@ -669,7 +664,7 @@ whose press is its own, not the row's (a link, the "+N" that opens the list, a f
|
|
|
669
664
|
ViewKit's own; an app neither sets, reads nor styles them, and they may change in any release.
|
|
670
665
|
|
|
671
666
|
Rich text folded in a field row marks its Show more and Show less `data-slot="vk-show-more"`; drawn only there, it is
|
|
672
|
-
your `Button
|
|
667
|
+
your `Button`. The relation chip a host's `onOpenRelation` makes
|
|
673
668
|
pressable carries `data-slot="vk-relation-link"`, as the default `RelationLink` does, and stays ViewKit's own, an app
|
|
674
669
|
dressing it by its slot: it reads as text, the same part whichever verb it has, so one rule reaches it in every list.
|
|
675
670
|
Two of a field row's controls stay ViewKit's own for the same reason, each being the sentence it says: a note with a
|
|
@@ -684,7 +679,7 @@ The views row marks the pieces an app may dress with its pills, whichever `Pill`
|
|
|
684
679
|
`data-slot="vk-views-more"` (the "+N" chip that folds the views that don't fit),
|
|
685
680
|
`data-slot="vk-views-chip"` (the picker's chip, the active view with a chevron) and
|
|
686
681
|
`data-slot="vk-views-add"` (the + that creates a view). The chips carry `data-state="open"` while their
|
|
687
|
-
list is open; every glyph in them is drawn at `h-3.5 w-3.5`.
|
|
682
|
+
list is open; every glyph in them is drawn at `h-3.5 w-3.5`. The "+N"
|
|
688
683
|
chip, the picker's chip and the + are your `Button`: the two chips carry their slots and `data-state="open"`, and the +
|
|
689
684
|
keeps `vk-views-add`. As the Views part (`ToolbarViews`) of your own toolbar frame (`ToolbarSlotProvider`, `appFrame`),
|
|
690
685
|
the picker's chip, each view tab, the "+N" chip and the + are your `ToolbarButton` instead, handed `part` (`views-chip`,
|
|
@@ -699,7 +694,7 @@ The toolbar (`/panels/react`'s `Toolbar`) marks its frame and its parts, whichev
|
|
|
699
694
|
`data-slot="vk-toolbar-line"` (one line, its kind in `data-line`: `main`, `search`, `views` or `below`),
|
|
700
695
|
`data-slot="vk-toolbar-cluster"` (the row's end controls, floating over the views on a fade of `--vk-ground`),
|
|
701
696
|
`data-slot="vk-toolbar-search"` (Search, with `data-expanded` while its field shows), `data-slot="vk-toolbar-search-field"`
|
|
702
|
-
(the field, your `Input`), `data-slot="vk-toolbar-search-clear"` (its ✕, your `Button`
|
|
697
|
+
(the field, your `Input`), `data-slot="vk-toolbar-search-clear"` (its ✕, your `Button`), `data-slot="vk-toolbar-search-spinner"` (the ring that stands in for its glass while `searching`), `data-slot="vk-toolbar-new"` (New's place),
|
|
703
698
|
`data-slot="vk-toolbar-options"`, `data-slot="vk-toolbar-sort"` and `data-slot="vk-toolbar-filter"` (the panel parts'
|
|
704
699
|
places), each one's popover handed `data-slot="vk-toolbar-options-panel"`, `data-slot="vk-toolbar-sort-panel"` or
|
|
705
700
|
`data-slot="vk-toolbar-filter-panel"` through your `Popover`'s `panelData`; on a phone, where the panel opens in your
|
|
@@ -719,38 +714,26 @@ a round + fixed at the screen's bottom-end corner over the list, its button mark
|
|
|
719
714
|
`--vk-toolbar-foot` (undeclared, `1rem`) above the safe area, so an app with a bar at its foot declares the bar's
|
|
720
715
|
height there. `data-slot="vk-toolbar-save"` holds Clear and Save at the bar's end while what the list shows differs:
|
|
721
716
|
`data-slot="vk-toolbar-clear"` (Clear, no ground) and `data-slot="vk-toolbar-save-button"` (Save, in the field's look,
|
|
722
|
-
only where the person may publish),
|
|
717
|
+
only where the person may publish), your `Button`; inside your
|
|
723
718
|
own frame, your `ToolbarButton`, `part` `clear` and `save`, while the search's ✕ stays the field's.
|
|
724
719
|
|
|
725
720
|
The sort's parts, with several sorts (VK-188): `data-slot="vk-toolbar-sort-pill"` (the sort pill's place: "Sorted by" its
|
|
726
721
|
first rule and +N, or the empty Sort, which carries `data-aside` and opens the sort editor while only set-aside sorts
|
|
727
|
-
stand)
|
|
728
|
-
`data-slot="vk-sort-
|
|
729
|
-
`data-slot="vk-sort-rule"` (one rule in it: its grip, its field, its direction, ×; on a phone its row),
|
|
730
|
-
`data-slot="vk-sort-aside"` (a set-aside sort's row after the rules, `data-aside`: its field dashed in the warning colour,
|
|
731
|
-
its direction disabled with why, its ⋯ holding why, Put back once it fits, and Delete) and
|
|
732
|
-
`data-slot="vk-sort-fields"` (the fields a rule is picked from, a field already sorted greyed "Sorted").
|
|
733
|
-
`CONTROLS.SortBody`'s own: `data-slot="vk-sort-head"` (its head under `bar`: ✕, the title, ✓, or on a step Back and the
|
|
722
|
+
stand) and `data-slot="vk-toolbar-sort-add"` (the + after it, which opens the fields); the sort editor and the fields
|
|
723
|
+
are your `SortBody` and `FieldsBody`. `CONTROLS.SortBody`'s own: `data-slot="vk-sort-head"` (its head under `bar`: ✕, the title, ✓, or on a step Back and the
|
|
734
724
|
step's title) and `data-sort-step` on `.o-sort-editor` (`add`, `direction` or `repoint`, while a phone's step stands).
|
|
735
725
|
`CONTROLS.FilterBody`'s own: `data-slot="vk-filter-head"` (its head under `bar`: ✕, the title, ✓, or on a step Back and the
|
|
736
726
|
step's title) and `data-filter-step` on `.o-filter-editor` (`field`, `how`, `value` or `add`, while a phone's step stands).
|
|
737
727
|
|
|
738
728
|
The quick filters' parts (VK-563): `data-slot="vk-toolbar-quick"` (the quick filters' button, lit while a value is
|
|
739
|
-
held)
|
|
740
|
-
`data-slot="vk-quick-filters-field"` (one field in its strip, `aria-pressed` while open),
|
|
741
|
-
`data-slot="vk-quick-filters-value"` (one of the open field's values, `data-chosen` while held) and
|
|
742
|
-
`data-slot="vk-quick-filters-none"` (what a search that finds nothing says). On a phone, ViewKit's own panel carries
|
|
743
|
-
`data-form="phone"`. The reminder (`QuickFiltersReminder`, VK-566): `data-slot="vk-quick-filters-reminder"` (its box,
|
|
729
|
+
held) and its popover handed `data-slot="vk-toolbar-quick-panel"`; the panel is your `QuickFiltersBody`. The reminder (`QuickFiltersReminder`, VK-566): `data-slot="vk-quick-filters-reminder"` (its box,
|
|
744
730
|
portalled to the body where the selection bar's phone pill stands), `data-slot="vk-quick-filters-reminder-open"` (its
|
|
745
731
|
names, which open the quick filters) and `data-slot="vk-quick-filters-reminder-clear"` (its ✕, letting every hold go).
|
|
746
732
|
|
|
747
733
|
The filter's parts, with and/or groups (VK-531): `data-slot="vk-toolbar-advanced-filter"` (an advanced filter's pill:
|
|
748
|
-
"Advanced filter" with its rules counted), its popover handed `data-slot="vk-toolbar-advanced-filter-panel"
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
(a relation rule, "any where", its own rules inside), `data-slot="vk-filter-fields"` (the fields a rule names, a
|
|
752
|
-
relation's far fields one level in) and `data-slot="vk-filter-convert"` (Convert to advanced filter, at the foot of a
|
|
753
|
-
filter's page in the Filter panel). In a folding line an advanced filter's pill carries `data-open` while it is open.
|
|
734
|
+
"Advanced filter" with its rules counted), its popover handed `data-slot="vk-toolbar-advanced-filter-panel"` (the
|
|
735
|
+
filter editor in it is your `FilterBody`, the fields your `FieldsBody`), and `data-slot="vk-filter-convert"` (Convert
|
|
736
|
+
to advanced filter, at the foot of a filter's page in the Filter panel). In a folding line an advanced filter's pill carries `data-open` while it is open.
|
|
754
737
|
|
|
755
738
|
The filters on the bar, where the toolbar stands each filter on its filter bar: `data-slot="vk-toolbar-filters"` (the
|
|
756
739
|
part's place), `data-slot="vk-toolbar-filter-rule"` (one filter, a group named by its words, holding its four joined
|
|
@@ -777,7 +760,7 @@ a desktop and its `Sheet` on a phone, and marks its parts with these slots:
|
|
|
777
760
|
| `data-slot="vk-editor-panel"` | the popover's panel, or the sheet's body, an editor sits in |
|
|
778
761
|
| `data-slot="vk-editor-bar"` | the sheet's bar: its ✕ and its ✓ (none with `sheetActions: "head"`) |
|
|
779
762
|
| `data-slot="vk-editor-refusal"` | the reason a refused value gave, under the editor; in a popover that scrolls, pinned to its bottom edge |
|
|
780
|
-
| `data-slot="vk-text-editor"` |
|
|
763
|
+
| `data-slot="vk-text-editor"` | a read-only text's box (`viewkitjs/views/editors/text`), unless its host names its own |
|
|
781
764
|
|
|
782
765
|
## Ports
|
|
783
766
|
|
|
@@ -835,11 +818,11 @@ row), `views.menus.date-style` (`{ style }`: `"short"`, `"long"`, `"numeric"` or
|
|
|
835
818
|
`views.menus.automatic` (the field's own decimals, an option's own colour), `views.menus.currency`,
|
|
836
819
|
`views.menus.percent-display` ("Display"), `views.menus.percent-display-option` (`{ display }`: `"text"` is "Number",
|
|
837
820
|
`"bar"`, `"ring"`), `views.menus.colour` (`{ colour }`, one of the eight option colours: "Gray" … "Teal") and
|
|
838
|
-
`views.menus.colours-reset` ("Reset colors"); a group's menu: `views.menus.group-options` (its button's label, and its menu's name
|
|
839
|
-
`views.menus.group-sort` ("Sort rows"), `views.menus.search
|
|
821
|
+
`views.menus.colours-reset` ("Reset colors"); a group's menu: `views.menus.group-options` (its button's label, and its menu's name),
|
|
822
|
+
`views.menus.group-sort` ("Sort rows"), `views.menus.search` (the words of a level's search in ViewKit's own Menu on a phone), `views.menus.not-now` ("Not now", a row that can't be used and says no why), `views.menus.group-show` ("Show"), `views.menus.group-count`
|
|
840
823
|
("Count"), `views.menus.group-hide` ("Hide group") and `views.menus.group-select` (`{ selected }`: "Select all in group", and
|
|
841
824
|
"Deselect all in group" when `"true"`, every row of the group picked); "+ Add column": `views.grid.add-column` (its header
|
|
842
|
-
cell, and its menu's name
|
|
825
|
+
cell, and its menu's name), `views.menus.add-column-all-shown`, and `views.menus.add-column-search` and `views.menus.add-column-no-match` (`{ query }`), both deprecated and read by nothing since the menu has no search; a row's menu:
|
|
843
826
|
`views.menus.copy`, `views.menus.cut`, `views.menus.paste`, `views.menus.clear` and `views.menus.edit` (a cell's lane),
|
|
844
827
|
and the plain row menu's `views.menus.row-open` ("Open page"), `views.menus.row-select` (`{ selected }`, `"true"` is
|
|
845
828
|
"Deselect", as text for a catalog's `select`), `views.menus.row-delete`, `views.menus.row-delete-confirm` (the
|
|
@@ -847,8 +830,8 @@ browser's confirm before a delete: "Delete this row?") and `views.menus.row-dele
|
|
|
847
830
|
delete the host ran rejects: "Failed to delete the row"), and `views.menus.row-menu` (its name, handed to your `Menu` as
|
|
848
831
|
`label`: "Row actions"); a `command` field's verb menu's name: `views.menus.commands` (`{ field }`: "Actions for Stage")
|
|
849
832
|
and `views.menus.commands-unnamed` ("Actions", when its opener hands no field); `views.menus.figure-menu`
|
|
850
|
-
(`{ field }`: "Calculate Amount", the figure picker's name
|
|
851
|
-
(`{ field }`: "Options for Amount", a column menu's name
|
|
833
|
+
(`{ field }`: "Calculate Amount", the figure picker's name) and `views.menus.column-menu`
|
|
834
|
+
(`{ field }`: "Options for Amount", a column menu's name);
|
|
852
835
|
the reasons a disabled row the grid builds hands your `Menu` as its `disabledReason`, where no refusal below already says it:
|
|
853
836
|
`views.menus.range-not-clearable` (a selection's Cut and Clear: "Nothing in this selection can be emptied"),
|
|
854
837
|
`views.menus.add-column-all-shown-reason` ("+ Add column"'s all-shown row: "No hidden column to add") and
|
|
@@ -874,7 +857,7 @@ over several cells left because they can't be empty, already joined in the viewe
|
|
|
874
857
|
record in another currency) and `views.grid.paste-not-range`; a paste or a fill that refused cells,
|
|
875
858
|
`views.grid.paste-skipped` and `views.grid.fill-skipped` (each `{ count, reason }`: one toast per reason, its
|
|
876
859
|
`reason` one of the refusals above in the app's words; an operation of one cell says the reason alone); a write the app
|
|
877
|
-
refused, said
|
|
860
|
+
refused, said through the toast port's `error`, `views.grid.commit-refused` (`{ field }`, the field's name, for a
|
|
878
861
|
refusal whose error carries no words: "Couldn't save Amount.") and `views.grid.commit-refused-many` (`{ count, reason? }`,
|
|
879
862
|
a batch, once, with the first refusal's words when it has any); and the warnings
|
|
880
863
|
`views.grid.changed-elsewhere` (`{ field }`), `views.grid.changed-elsewhere-cells` (`{ count }`),
|
|
@@ -979,7 +962,7 @@ rows' and pages' names where the list names none, `views.panels.filter` ("Filter
|
|
|
979
962
|
changed since you started."); and its actions, `views.panels.copy-link` ("Copy link to view"),
|
|
980
963
|
`views.panels.export-csv` ("Export CSV"), `views.panels.share` ("Share"), `views.panels.coming-soon` ("Coming
|
|
981
964
|
soon", a parked action's hint) and `views.panels.loading` ("Loading", the export's spinner).
|
|
982
|
-
The words the panels' builder writes into its configs (`settingsPanels`, `/panels`): the layouts, `views.panels.layout-table` ("Table"), `views.panels.layout-list` ("List"), `views.panels.layout-board` ("Board"), `views.panels.layout-calendar` ("Calendar"), with `views.panels.layout-rows` ("Rows", the list as the phone choice names it), and the reasons one is refused, `views.panels.layout-refused-calendar` ("No date field") and `views.panels.layout-refused-board` ("No field to lay a board out by"); the look, `views.panels.look-vertical-borders` ("Vertical borders"), `views.panels.look-row-icon` ("Row icon"), `views.panels.look-freeze-identity` ("Freeze identity columns"), `views.panels.look-always-checkboxes` ("Show checkboxes always"); the densities, `views.panels.density-compact` ("Compact"), `views.panels.density-default` ("Default"), `views.panels.density-spacious` ("Spacious"); the Layout panel's choices, `views.panels.board-field` ("Board by"), `views.panels.calendar-field` ("Date field"), `views.panels.card-fields` ("Fields") (a card's Columns row) and `views.panels.phone-layout` ("On your phone"); Sort's `views.panels.sort-manual` ("Manual"); the sort pill and the sort editor's (VK-188), `views.panels.sorted-by` ("Sorted by", before the first rule's field), `views.panels.sort-more` (`{ count }`, "+{count}"), `views.panels.sort-add-one` ("Add a sort", the +'s name), `views.panels.sort-add` ("Add sort"), `views.panels.sort-clear-all` ("Clear all"), `views.panels.sort-sorted` ("Sorted", a field already sorted), `views.panels.sort-max` (`{ max }`, "Three at most"), `views.panels.sort-empty` ("No sorting set up yet") and `views.panels.sort-empty-line` ("Choose a field to sort by"), `views.panels.sort-ascending` ("Ascending") and `views.panels.sort-descending` ("Descending"), `views.panels.sort-direction` ("Direction", its menu's name), with `views.panels.sort-field-named` and `views.panels.sort-direction-named` (`{ label }`, "Field: {label}", "Direction: {label}", a rule's two boxes named with what they hold), `views.panels.sort-delete` ("Delete"), `views.panels.sort-move` (`{ label }`, "Move {label}", a rule's grip), `views.panels.sort-remove` (`{ label }`, "Remove the sort by {label}"), `views.panels.sort-actions` (`{ label }`, "Actions for the sort by {label}", a phone's ⋯), `views.panels.sort-search` ("Search fields") and `views.panels.sort-done` ("Done", the phone sheet's ✓), and `CONTROLS.SortBody`'s own (VK-721), `views.panels.sort-field` ("Field", a rule's field box), `views.panels.sort-clear-all-sorts` ("Clear all sorts", a computer's foot) and `views.panels.sort-by-named` (`{ label }`, "the sort by {label}", a rule's ⋯ menu); `CONTROLS.FilterBody`'s and `CONTROLS.FilterPartBody`'s own (VK-720), `views.panels.filter-group-list` ("Group", a group's rules to a screen reader), `views.panels.filter-rule-named` (`{ label }`, "{label}'s rule", a rule's ⋮), `views.panels.filter-way-named` (`{ label }`, "How {label} compares", a way's list and its step), `views.panels.filter-choose-date` ("Choose a date"), `views.panels.filter-type-number` ("Type a number") and `views.panels.filter-type-value` ("Type a value"), a value's placeholders, `views.panels.filter-from-named` and `views.panels.filter-to-named` (`{ label }`, "{label} from", "{label} to", a range's two ends), `views.panels.filter-checked` ("Checked") and `views.panels.filter-unchecked` ("Unchecked"), a yes/no's two values, and `views.panels.filter-kit-way` (`{ way }`, the kit's ways in their words: "is any of", "less than", "any part between"); `CONTROLS.GroupBody`'s own (VK-839), `views.panels.group-order` ("Order", the group's order setting), `views.panels.group-date-step` ("Date step", a date field's step setting), `views.panels.group-order-own` ("Your own", your own order), `views.panels.group-own-no-direction` ("Your own order has no direction", why Direction is greyed), `views.panels.group-no-value` ("No value", the empty group), and its rows' own, `views.panels.list-move-keys` ("Left arrow for its grip, then up or down arrow to move it", how a computer's rows move), `views.panels.list-move-hold` ("Hold, then drag to move it", a phone's) and `views.panels.list-moved` (`{ label, at, of }`, "{label}, {at} of {of}", a move said), a grip named by `views.panels.sort-move` and a Switch's words by `views.panels.toggle-on` and `views.panels.toggle-off`; `CONTROLS.CustomizeBody`'s own (VK-840), `views.panels.customize-list` ("Customize", its list to a screen reader), `views.panels.customize-shown` ("Shown in the table", on a table), `views.panels.customize-shown-fields` ("Shown", on another layout) and `views.panels.customize-hidden` ("Hidden"), Columns' headings, `views.panels.customize-search` ("Search columns", a computer's) and `views.panels.customize-find` ("Find a column", a phone's), `views.panels.customize-no-column` (`{ words }`, "No column is named “{words}”"), `views.panels.customize-always-shown` ("Always shown", why the first column can't hide), `views.panels.customize-view-name` ("The view's name", its box), `views.panels.customize-layout-button` (`{ name }`, "Layout: {name}", the layout's button beside the name), `views.panels.customize-layout-settings` (`{ name }`, "{name} settings", a layout's settings to a screen reader) and `views.panels.customize-share` ("Share the view", its footer); the quick filters' (VK-563), `views.panels.quick-filters` ("Quick filters", the button and its panel), `views.panels.quick-fields` ("Fields", the strip's name), `views.panels.quick-search` (`{ field }`, "Search {field}"), `views.panels.quick-none` ("Nothing matches."), `views.panels.quick-value` (`{ label, count }`, "{label}, {count}", a value with its count to a screen reader, the count already in the reader's digits), `views.panels.quick-empty` ("No value", a held empty value no value lists), `CONTROLS.QuickFiltersBody`'s own (VK-724), `views.panels.quick-clear-value` ("Clear filter", a held value's words before its count), and the reminder's on a phone (VK-566), `views.panels.quick-reminder` (`{ names }`, "Quick filters: {names}", its names to a screen reader, every held value named once), `views.panels.quick-more` (`{ count }`, "+{count}", the names it doesn't show) and `views.panels.quick-clear` ("Clear quick filters", its ✕); the advanced filter and the filter editor's (VK-531), `views.panels.advanced-filter` ("Advanced filter", its pill), `views.panels.advanced-filter-set-aside` ("Its rules are set aside", why a pill whose rules are all set aside is drawn set aside), `views.panels.filter-join` (`{ join }`, "And" or "Or"), `views.panels.filter-add` ("Add filter"), `views.panels.filter-clear-all-filters` ("Clear all filters"), `views.panels.filter-to-group` ("Convert to group"), `views.panels.filter-delete-rule` ("Delete condition"), `views.panels.filter-delete-group` ("Delete group"), `views.panels.filter-exclude` ("Exclude matches"), `views.panels.filter-exclude-needs-and` ("Join by And to exclude matches"), `views.panels.filter-excluded` ("Not all of these", heading a group that excludes its matches), `views.panels.filter-to-advanced` ("Convert to advanced filter", a filter's page in the Filter panel, and a row of a filter's ⋯ on the bar), `views.panels.filter-field` ("Field"), `views.panels.filter-way` ("How it compares") and `views.panels.filter-value` ("Value"), a rule's three boxes and a bar filter's three parts, `views.panels.filter-choose` ("Choose", drawn nowhere: a value waiting says `views.panels.filter-waits`), `views.panels.filter-search` ("Filter by…"), `views.panels.filter-relation-way` (`{ quantifier }`, "any where", "none where", "every where"), `views.panels.filter-rule-actions` (`{ label }`, "Actions for the filter on {label}", a rule's ⋮), `views.panels.filter-group-actions` ("Actions for this group"), `views.panels.filter-set-aside-why` (`{ reason }`, a set-aside filter's why: "Set aside: its field is no longer in this list", "Set aside: its field no longer compares this way", "Set aside: its field no longer has this part"), `views.panels.sort-set-aside-why` (`{ reason }`, a set-aside sort's: "Set aside: its field is no longer in this list", else "Set aside: its field no longer sorts this way"), `views.panels.filter-set-aside-back` and `views.panels.sort-set-aside-back` (a set-aside filter's or sort's why once its field is listed again: "Set aside: its field is back in this list, and Put back filters by it again", "… and Put back sorts by it again"), `views.panels.put-back` ("Put back"), `views.panels.filter-or-full` ("This view's filter joins by Or and is three levels deep: change it in its advanced filter", the rows' reason), `views.panels.filter-too-deep` ("Three levels at most"), `views.panels.filter-too-many` ("Fifty filters at most in one group") and `views.panels.filter-relation-gone` ("Its relation is no longer in this list", Add filter's reason under a relation the list no longer lists); the filter editor on a phone's (VK-532), `views.panels.filter-empty` ("No filtering set up yet") and `views.panels.filter-empty-line` ("Choose a field to filter by"), `views.panels.filter-clear-all` ("Clear all") and `views.panels.filter-done` ("Done", the phone sheet's ✓); the filters on the toolbar's bar, `views.panels.filter-waits` (`{ type }`, what a filter's value waits for, on the bar and in the filter editor's value box: "Choose" for a choice, "Type a number", "Choose a date", "Type a value"), `views.panels.filter-way-words` (`{ label }`, how it compares as the bar says it, the way's label with its first letter in lower case, "is any of"), `views.panels.filter-far-field` (`{ relation, field }`, "Company › Industry", a related record's field), `views.panels.filter-rule-words` (`{ field, way, value }`, "Stage is any of Talking", the sentence that names a filter), `views.panels.filter-add-one` ("Add a filter", the +'s name), `views.panels.filter-delete` ("Delete filter"), `views.panels.filter-more` (`{ count }`, "+1 filter", "+{count} filters") and `views.panels.filter-more-named` (`{ count }`, "1 more filter", "{count} more filters", its name); what a screen reader hears of a drag in the parts that drag (VK-401), each row by its label, `views.panels.drag-instructions` ("To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel."), `views.panels.drag-picked-up` (`{ label }`, "Picked up draggable item {label}."), `views.panels.drag-over` (`{ label, over }`, "Draggable item {label} was moved over droppable area {over}."), `views.panels.drag-not-over` (`{ label }`, "Draggable item {label} is no longer over a droppable area."), `views.panels.drag-dropped-over` (`{ label, over }`, "Draggable item {label} was dropped over droppable area {over}"), `views.panels.drag-dropped` (`{ label }`, "Draggable item {label} was dropped.") and `views.panels.drag-cancelled` (`{ label }`, "Dragging was cancelled. Draggable item {label} was dropped."); the Group panel's orders `views.panels.group-order-date` ("Date") and `views.panels.group-order-lifecycle` ("Lifecycle"); and a date's granularities, `views.panels.granularity-relative` ("Relative"), `views.panels.granularity-due` ("Due"), `views.panels.granularity-day` ("Day"), `views.panels.granularity-week` ("Week"), `views.panels.granularity-month` ("Month"), `views.panels.granularity-year` ("Year").
|
|
965
|
+
The words the panels' builder writes into its configs (`settingsPanels`, `/panels`): the layouts, `views.panels.layout-table` ("Table"), `views.panels.layout-list` ("List"), `views.panels.layout-board` ("Board"), `views.panels.layout-calendar` ("Calendar"), with `views.panels.layout-rows` ("Rows", the list as the phone choice names it), and the reasons one is refused, `views.panels.layout-refused-calendar` ("No date field") and `views.panels.layout-refused-board` ("No field to lay a board out by"); the look, `views.panels.look-vertical-borders` ("Vertical borders"), `views.panels.look-row-icon` ("Row icon"), `views.panels.look-freeze-identity` ("Freeze identity columns"), `views.panels.look-always-checkboxes` ("Show checkboxes always"); the densities, `views.panels.density-compact` ("Compact"), `views.panels.density-default` ("Default"), `views.panels.density-spacious` ("Spacious"); the Layout panel's choices, `views.panels.board-field` ("Board by"), `views.panels.calendar-field` ("Date field"), `views.panels.card-fields` ("Fields") (a card's Columns row) and `views.panels.phone-layout` ("On your phone"); Sort's `views.panels.sort-manual` ("Manual"); the sort pill and the sort editor's (VK-188), `views.panels.sorted-by` ("Sorted by", before the first rule's field), `views.panels.sort-more` (`{ count }`, "+{count}"), `views.panels.sort-add-one` ("Add a sort", the +'s name), `views.panels.sort-add` ("Add sort"), `views.panels.sort-clear-all` ("Clear all"), `views.panels.sort-sorted` ("Sorted", a field already sorted), `views.panels.sort-max` (`{ max }`, "Three at most"), `views.panels.sort-empty` ("No sorting set up yet") and `views.panels.sort-empty-line` ("Choose a field to sort by"), `views.panels.sort-ascending` ("Ascending") and `views.panels.sort-descending` ("Descending"), `views.panels.sort-direction` ("Direction", its menu's name), with `views.panels.sort-field-named` and `views.panels.sort-direction-named` (`{ label }`, "Field: {label}", "Direction: {label}", a rule's two boxes named with what they hold), `views.panels.sort-delete` ("Delete"), `views.panels.sort-move` (`{ label }`, "Move {label}", a rule's grip), `views.panels.sort-remove` (`{ label }`, "Remove the sort by {label}"), `views.panels.sort-actions` (`{ label }`, "Actions for the sort by {label}", a phone's ⋯), `views.panels.sort-search` ("Search fields") and `views.panels.sort-done` ("Done", the phone sheet's ✓), and `CONTROLS.SortBody`'s own (VK-721), `views.panels.sort-field` ("Field", a rule's field box), `views.panels.sort-clear-all-sorts` ("Clear all sorts", a computer's foot) and `views.panels.sort-by-named` (`{ label }`, "the sort by {label}", a rule's ⋯ menu); `CONTROLS.FilterBody`'s and `CONTROLS.FilterPartBody`'s own (VK-720), `views.panels.filter-group-list` ("Group", a group's rules to a screen reader), `views.panels.filter-rule-named` (`{ label }`, "{label}'s rule", a rule's ⋮), `views.panels.filter-way-named` (`{ label }`, "How {label} compares", a way's list and its step), `views.panels.filter-choose-date` ("Choose a date"), `views.panels.filter-type-number` ("Type a number") and `views.panels.filter-type-value` ("Type a value"), a value's placeholders, `views.panels.filter-from-named` and `views.panels.filter-to-named` (`{ label }`, "{label} from", "{label} to", a range's two ends), `views.panels.filter-checked` ("Checked") and `views.panels.filter-unchecked` ("Unchecked"), a yes/no's two values, and `views.panels.filter-kit-way` (`{ way }`, the kit's ways in their words: "is any of", "less than", "any part between"); `CONTROLS.GroupBody`'s own (VK-839), `views.panels.group-order` ("Order", the group's order setting), `views.panels.group-date-step` ("Date step", a date field's step setting), `views.panels.group-order-own` ("Your own", your own order), `views.panels.group-own-no-direction` ("Your own order has no direction", why Direction is greyed), `views.panels.group-no-value` ("No value", the empty group), and its rows' own, `views.panels.list-move-keys` ("Left arrow for its grip, then up or down arrow to move it", how a computer's rows move), `views.panels.list-move-hold` ("Hold, then drag to move it", a phone's) and `views.panels.list-moved` (`{ label, at, of }`, "{label}, {at} of {of}", a move said), a grip named by `views.panels.sort-move` and a Switch's words by `views.panels.toggle-on` and `views.panels.toggle-off`; `CONTROLS.CustomizeBody`'s own (VK-840), `views.panels.customize-list` ("Customize", its list to a screen reader), `views.panels.customize-shown` ("Shown in the table", on a table), `views.panels.customize-shown-fields` ("Shown", on another layout) and `views.panels.customize-hidden` ("Hidden"), Columns' headings, `views.panels.customize-search` ("Search columns", a computer's) and `views.panels.customize-find` ("Find a column", a phone's), `views.panels.customize-no-column` (`{ words }`, "No column is named “{words}”"), `views.panels.customize-always-shown` ("Always shown", why the first column can't hide), `views.panels.customize-view-name` ("The view's name", its box), `views.panels.customize-layout-button` (`{ name }`, "Layout: {name}", the layout's button beside the name), `views.panels.customize-layout-settings` (`{ name }`, "{name} settings", a layout's settings to a screen reader), `views.panels.customize-share` ("Share the view", its footer) and `views.panels.column-settings` (`{ label }`, "{label} settings", the › opening a column's own settings); the quick filters' (VK-563), `views.panels.quick-filters` ("Quick filters", the button and its panel), `views.panels.quick-fields` ("Fields", the strip's name), `views.panels.quick-search` (`{ field }`, "Search {field}"), `views.panels.quick-none` ("Nothing matches."), `views.panels.quick-value` (`{ label, count }`, "{label}, {count}", a value with its count to a screen reader, the count already in the reader's digits), `views.panels.quick-empty` ("No value", a held empty value no value lists), `CONTROLS.QuickFiltersBody`'s own (VK-724), `views.panels.quick-clear-value` ("Clear filter", a held value's words before its count), and the reminder's on a phone (VK-566), `views.panels.quick-reminder` (`{ names }`, "Quick filters: {names}", its names to a screen reader, every held value named once), `views.panels.quick-more` (`{ count }`, "+{count}", the names it doesn't show) and `views.panels.quick-clear` ("Clear quick filters", its ✕); the advanced filter and the filter editor's (VK-531), `views.panels.advanced-filter` ("Advanced filter", its pill), `views.panels.advanced-filter-set-aside` ("Its rules are set aside", why a pill whose rules are all set aside is drawn set aside), `views.panels.filter-join` (`{ join }`, "And" or "Or"), `views.panels.filter-add` ("Add filter"), `views.panels.filter-clear-all-filters` ("Clear all filters"), `views.panels.filter-to-group` ("Convert to group"), `views.panels.filter-delete-rule` ("Delete condition"), `views.panels.filter-delete-group` ("Delete group"), `views.panels.filter-exclude` ("Exclude matches"), `views.panels.filter-exclude-needs-and` ("Join by And to exclude matches"), `views.panels.filter-excluded` ("Not all of these", heading a group that excludes its matches), `views.panels.filter-to-advanced` ("Convert to advanced filter", a filter's page in the Filter panel, and a row of a filter's ⋯ on the bar), `views.panels.filter-field` ("Field"), `views.panels.filter-way` ("How it compares") and `views.panels.filter-value` ("Value"), a rule's three boxes and a bar filter's three parts, `views.panels.filter-choose` ("Choose", drawn nowhere: a value waiting says `views.panels.filter-waits`), `views.panels.filter-search` ("Filter by…"), `views.panels.filter-relation-way` (`{ quantifier }`, "any where", "none where", "every where"), `views.panels.filter-rule-actions` (`{ label }`, "Actions for the filter on {label}", a rule's ⋮), `views.panels.filter-group-actions` ("Actions for this group"), `views.panels.filter-set-aside-why` (`{ reason }`, a set-aside filter's why: "Set aside: its field is no longer in this list", "Set aside: its field no longer compares this way", "Set aside: its field no longer has this part"), `views.panels.sort-set-aside-why` (`{ reason }`, a set-aside sort's: "Set aside: its field is no longer in this list", else "Set aside: its field no longer sorts this way"), `views.panels.filter-set-aside-back` and `views.panels.sort-set-aside-back` (a set-aside filter's or sort's why once its field is listed again: "Set aside: its field is back in this list, and Put back filters by it again", "… and Put back sorts by it again"), `views.panels.put-back` ("Put back"), `views.panels.filter-or-full` ("This view's filter joins by Or and is three levels deep: change it in its advanced filter", the rows' reason), `views.panels.filter-too-deep` ("Three levels at most"), `views.panels.filter-too-many` ("Fifty filters at most in one group") and `views.panels.filter-relation-gone` ("Its relation is no longer in this list", Add filter's reason under a relation the list no longer lists); the filter editor on a phone's (VK-532), `views.panels.filter-empty` ("No filtering set up yet") and `views.panels.filter-empty-line` ("Choose a field to filter by"), `views.panels.filter-clear-all` ("Clear all") and `views.panels.filter-done` ("Done", the phone sheet's ✓); the filters on the toolbar's bar, `views.panels.filter-waits` (`{ type }`, what a filter's value waits for, on the bar and in the filter editor's value box: "Choose" for a choice, "Type a number", "Choose a date", "Type a value"), `views.panels.filter-way-words` (`{ label }`, how it compares as the bar says it, the way's label with its first letter in lower case, "is any of"), `views.panels.filter-far-field` (`{ relation, field }`, "Company › Industry", a related record's field), `views.panels.filter-rule-words` (`{ field, way, value }`, "Stage is any of Talking", the sentence that names a filter), `views.panels.filter-add-one` ("Add a filter", the +'s name), `views.panels.filter-delete` ("Delete filter"), `views.panels.filter-more` (`{ count }`, "+1 filter", "+{count} filters") and `views.panels.filter-more-named` (`{ count }`, "1 more filter", "{count} more filters", its name); what a screen reader hears of a drag in the parts that drag (VK-401), each row by its label, `views.panels.drag-instructions` ("To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel."), `views.panels.drag-picked-up` (`{ label }`, "Picked up draggable item {label}."), `views.panels.drag-over` (`{ label, over }`, "Draggable item {label} was moved over droppable area {over}."), `views.panels.drag-not-over` (`{ label }`, "Draggable item {label} is no longer over a droppable area."), `views.panels.drag-dropped-over` (`{ label, over }`, "Draggable item {label} was dropped over droppable area {over}"), `views.panels.drag-dropped` (`{ label }`, "Draggable item {label} was dropped.") and `views.panels.drag-cancelled` (`{ label }`, "Dragging was cancelled. Draggable item {label} was dropped."); the Group panel's orders `views.panels.group-order-date` ("Date") and `views.panels.group-order-lifecycle` ("Lifecycle"); and a date's granularities, `views.panels.granularity-relative` ("Relative"), `views.panels.granularity-due` ("Due"), `views.panels.granularity-day` ("Day"), `views.panels.granularity-week` ("Week"), `views.panels.granularity-month` ("Month"), `views.panels.granularity-year` ("Year").
|
|
983
966
|
The selection bar's words are under `views.selection.*`: `views.selection.count` (`{ count }`, "3 selected",
|
|
984
967
|
the phone sheet's title), `views.selection.selected` (the word after the count the bar draws),
|
|
985
968
|
`views.selection.deselect-all` (the count chip), `views.selection.clear` (the phone's ✕),
|
|
@@ -1068,7 +1051,7 @@ public; nothing else at the root door is.
|
|
|
1068
1051
|
|
|
1069
1052
|
`viewkitjs/views/react`, which opens with the client directive: `ViewsProvider`, `useViews()` and
|
|
1070
1053
|
`NOOP_PORTS`; the provider's types `ViewsProviderProps` and `ViewsContextValue`; the adapter's types
|
|
1071
|
-
`ViewsComponents`, `ViewsResolvedComponents` (the map as `useViews()` hands it on, `Input
|
|
1054
|
+
`ViewsComponents`, `ViewsResolvedComponents` (the map as `useViews()` hands it on, `Input` and `Calendar` always there), `ViewsPorts`, `ViewsIcons` and `ViewsIconProps`; the components' props
|
|
1072
1055
|
`ViewsButtonProps`, `ViewsPopoverProps`, `ViewsTooltipProps`, `ViewsCheckboxProps`, `ViewsMenuProps`,
|
|
1073
1056
|
`ViewsMenuItem`, `ViewsCommandParts`, `ViewsPickerProps`, `ViewsPickerItem`, `ViewsPickerAction`, `ViewsLinksBodyProps`, `ViewsLink`, `ViewsLinkRole`, `ViewsCalendarProps`, `ViewsDateBodyProps`, `ViewsDatePick`, `ViewsDatePicks`, `ViewsPartsBodyProps`, `ViewsPlacePart`, `ViewsPlaceParts`, `ViewsValuesBodyProps`, `ViewsValueLine`, `ViewsTextBodyProps`, `ViewsNumberBodyProps`, `ViewsRowsWaitProps`, `ViewsCollapseProps`,
|
|
1074
1057
|
`ViewsSheetProps` and `ViewsInputProps`, with their shared shapes `ViewsAnchor`, `ViewsSide`, `ViewsAlign`,
|
|
@@ -1090,43 +1073,39 @@ was typed in several phones and emails and throws it away in a single one. `keep
|
|
|
1090
1073
|
typed and closes, as a press outside does, and a value the editor or the app refuses on the spot stays open with its reason, until a second Escape throws the edit away; a refusal the server sends after the save arrives once the editor has closed, as after Enter (on the cell in the grid, under the row in a field row, whose editor reopens on the refused value with that reason until the value changes); a type left
|
|
1091
1074
|
out throws the edit away, the default. On a phone every way out of the sheet throws the edit away. An editor that
|
|
1092
1075
|
commits only on a pick (a select, a status, a single relation, a user) throws it away on Escape whatever the rule.
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
`
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
`
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
on the desktop. `own` draws ViewKit's own, as on 0.5.0; `button` draws your `Button`, `variant` `outline`, `size` `sm`,
|
|
1117
|
-
its box in `className`, `data-slot="vk-selection-chip"`, `aria-label`, and `disabled` while a batch runs, inside the
|
|
1118
|
-
same `Tooltip`.
|
|
1076
|
+
The grid says why the app refused an edit it sent, through the toast port's `error`; the app doesn't say it again. The
|
|
1077
|
+
grid opens its own menus in your `Menu`, handed their rows as data: the footer's figure picker one ticked row per
|
|
1078
|
+
figure; a column's header menu its rows, each format setting and each option's colour a group beside it with its
|
|
1079
|
+
current choice as `detail`, the app's rows (`columnMenuItems`) above Hide; a group's ⋯ its sort choices a group
|
|
1080
|
+
beside it, its figure toggles ticks that keep the menu open, and Hide; and the grid's own "+ Add column" each hidden
|
|
1081
|
+
column a row and each field with parts a group beside it with its count as `detail`, on a phone too. None has a
|
|
1082
|
+
search field. The row menu and a command cell's menu go through your `Menu` too.
|
|
1083
|
+
The buttons the grid draws itself are your `Button` (the provider takes no option for them): a group's fold and ⋯,
|
|
1084
|
+
"+ Add column", a row's ⋯, the name's actions (the pencil and the app's `rowActions`), an action column's buttons, a
|
|
1085
|
+
pick-list cell's ▾, and a command cell's ▾ and its trigger around a value (`ghost`, `icon` beside a relation, link,
|
|
1086
|
+
email, phone or domain, `sm` around any other value, which keeps its line and the cell's own type through
|
|
1087
|
+
`[font:inherit]`; these two are handed only `type`, `variant`, `size`, `className` and the column's name as
|
|
1088
|
+
`aria-label`, and stay Tab stops). The others are `variant` `ghost` (`outline` for the name's actions), `size` `icon`
|
|
1089
|
+
(`sm` for "+ Add column" at the header's end; `icon`, with its name as `aria-label` and `title`, where `addColumnAt`
|
|
1090
|
+
stands it in the title column's header), the grid's box (its size, its place, its reveal on hover) in `className`, and
|
|
1091
|
+
the look yours. Each is handed `tabIndex` -1 and its `aria-label`; the ⋯ and "+ Add column" a ref they anchor their
|
|
1092
|
+
menus on, `aria-haspopup` and `aria-expanded`; the fold `aria-expanded`; the row's ⋯ `data-slot="vk-grid-row-more"`
|
|
1093
|
+
and a `title`; "+ Add column" `data-open` while its menu is open, with either value. Your `Button` forwards the ref,
|
|
1094
|
+
`tabIndex`, `aria-haspopup`, `aria-expanded`, `data-slot` and `data-open` to its element, hands `onClick` the click on
|
|
1095
|
+
that element, and lets the `className` handed win over its own size.
|
|
1096
|
+
The count chip that clears the selection on the desktop, in ViewKit's own selection bar, is your `Button`, `variant`
|
|
1097
|
+
`outline`, `size` `sm`, its box in `className`, `data-slot="vk-selection-chip"`, `aria-label`, and `disabled` while a
|
|
1098
|
+
batch runs, inside the same `Tooltip`.
|
|
1119
1099
|
And an optional `severalValues` (`ViewsSeveralValues`, from `./react`, default `fit`): how a cell of several values
|
|
1120
1100
|
draws on one line, wherever it draws (a grid cell, a board or calendar card, a field row that doesn't wrap). `first`
|
|
1121
1101
|
draws its first value and a count at any width, as on 0.5.0. `fit` draws as many whole values as fit its width, then
|
|
1122
1102
|
the count, and follows a column resize; the first shows cut when even it doesn't fit, and a wrapped row shows three
|
|
1123
1103
|
either way. A cell measures its values once when it mounts or they change, and on a resize works from what it kept.
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
And an optional `gridBodyPlace` (`ViewsGridBodyPlace`, from `./react`, default `under`): where a grid editor opens the popover around a whole body your app hands (`Picker`, `DateBody`, `PartsBody`, `ValuesBody`, `LinksBody`) on a computer. `under` hands your `Popover` a `sideOffset` of 4, as on 0.7.0. `over` hands it minus the cell's height, measured as the editor opens, so a popover placed under its anchor stands with its top on the cell's top, as long text opens. Give that popover at least the cell's width, so a press where the cell was lands inside it, and don't let it flip above its anchor: a flipped one takes the same offset, its bottom on the cell's bottom. An editor drawing ViewKit's own body stays under the cell either way; a field row and the phone's sheet don't read it.
|
|
1104
|
+
A yes/no cell in the grid, the checkbox style, is your `Checkbox`, the box your rail draws, alone in the cell: `checked`, the column's name, `tabIndex` -1 and `onCheckedChange`, the press the toggle; a cell the grid can't write is handed `readOnly` and a press that writes nothing. Enter on the cell still flips it, through the grid. Your Checkbox's element, or one around it, is a `button`, an `input`, a `label` or carries `role="checkbox"`, so the row's own click stands aside for it.
|
|
1105
|
+
A field row's own buttons are your `Button`: its edit target in its three shapes (around the value, beside a link's open action, under a rich text), the verb trigger around a value, the lane's ▾ and rich text's Show more, `variant` `ghost`, `size` `sm` (`icon` for the ▾), ViewKit's box in `className` (the target's with `[font:inherit]`, so a value keeps the row's type, and a height that grows with a wrapped value), the look yours.
|
|
1106
|
+
A field row's yes/no, the checkbox style, is your `Checkbox`, a Tab stop, one press writing once; a row it can't write is handed `readOnly`.
|
|
1107
|
+
The buttons ViewKit draws itself in the toolbar's panels, the search's ✕ and the views row are your `Button`: a filter's select, a range's presets, a stale filter's and a date range's Clear, the Columns list's eyes, new-line marks and a column's opener, the group list's eyes, Clear all, the layout's Reset, show or hide every group, a panel header's back and ✕, Export, Publish and Reset, the "+N" chip, the + and the views picker's chip (outside your own toolbar frame; inside one they are your `ToolbarButton`), a view's row and its ⋯, and the quick filters' fields: `variant` `ghost` (`outline` for a range's presets and the date filter's framed select, `secondary` for the views picker's chip, a filled chip with no border), `size` `icon` or `sm`, ViewKit's box in `className` (a row's with `[font:inherit]` or its own type, so it reads as the rows beside it), the look yours. A trigger is handed a ref it anchors its menu or popover on, `aria-haspopup` and `aria-expanded`; the views row's chips and a view's ⋯ `data-state="open"` or `data-state="closed"`; the new-line mark and a quick filters' field `aria-pressed`; a view's row `role="option"` and `aria-selected`; Export `data-vs-row="true"`, so a host's `[data-vs-row]` insets it as it does Copy link and Share; the search's ✕ and the chips their `data-slot`. A press note and the search's caret ride a `display: contents` span around your `Button`, and a view's ⋯ waits for the pointer on a computer through a span around it carrying `data-desktop`. Your `Button` draws `secondary` and forwards each of those to its element. The `ToolbarButton` atom's parts stay the atom's.
|
|
1108
|
+
The popover around a whole body the app hands (`Picker`, `PartsBody`, `ValuesBody`, `LinksBody`), in the grid and a field row alike, takes only its layer (and, in a field row, a cap at the screen's width less 2rem), so the app's `Popover` stands at its own width, and `data-vk-body` on it through `panelData`: `picker`, `parts`, `values` or `links`. The phone's sheet takes no class. A grid editor opening a whole body your app hands (`Picker`, `DateBody`, `PartsBody`, `ValuesBody`, `LinksBody`) on a computer hands your `Popover` a `sideOffset` of minus the cell's height, measured as the editor opens, so a popover placed under its anchor stands with its top on the cell's top, as long text opens. Give that popover at least the cell's width, so a press where the cell was lands inside it, and don't let it flip above its anchor: a flipped one takes the same offset, its bottom on the cell's bottom. A field row and the phone's sheet open as before.
|
|
1130
1109
|
And an optional `datePicks` (`ViewsDatePicks`, from `./react`): the quick days the date editors offer, in order, any of
|
|
1131
1110
|
`today`, `tomorrow`, `next-monday` (the Monday after today, a week on when today is one) and `in-a-week` (today + 7 on
|
|
1132
1111
|
the conventions' calendar). ViewKit works out each day; the date editor hands exactly these to an app's `DateBody`, `none`
|
|
@@ -1145,11 +1124,11 @@ formatter handed no viewer reads the neutral conventions, never the runtime's.
|
|
|
1145
1124
|
`viewkitjs/views/editors`, no client directive on the door: `EDIT_CORES` (one editor per storage
|
|
1146
1125
|
type, `null` where a type has none of its own) and `hasEditCore`. One door per editor, each opening with the
|
|
1147
1126
|
client directive: `viewkitjs/views/editors/select` (`SelectEditor`, `SelectEditorHandle`,
|
|
1148
|
-
`pickerOptionsFromField`, `PickerOption`, `SELECT_SEARCH_PAST`), `viewkitjs/views/editors/text` (`
|
|
1149
|
-
`TextEditorHandle`, `
|
|
1150
|
-
|
|
1127
|
+
`pickerOptionsFromField`, `PickerOption`, `SELECT_SEARCH_PAST`), `viewkitjs/views/editors/text` (`TextEditorHost`,
|
|
1128
|
+
`TextEditorHandle`, `TextEditorHostProps`, `TextEditorType`: one editor for text, a link, an email, a phone, a domain,
|
|
1129
|
+
long text and rich text, opening your `TextBody`), `viewkitjs/views/editors/relation` (`RelationEditor`,
|
|
1151
1130
|
`RelationEditorHandle`, `RelationCreate`, `RELATION_PAGE_SIZE`, `RELATION_SEARCH_DEBOUNCE_MS`, and
|
|
1152
|
-
the relation source types), `viewkitjs/views/editors/number` (`
|
|
1131
|
+
the relation source types), `viewkitjs/views/editors/number` (`NumberEditorHost`, `NumberEditorHandle`,
|
|
1153
1132
|
`NumberEditValue`), `viewkitjs/views/editors/range` (`RangeEditor`, `RangeEditorHandle`: two boxes,
|
|
1154
1133
|
low and high, an empty box an open end), `viewkitjs/views/editors/location` (`LocationEditor`,
|
|
1155
1134
|
`LocationEditorHandle`: the country first, then its parts in its order, a region from its list),
|
|
@@ -1157,7 +1136,7 @@ low and high, an empty box an open end), `viewkitjs/views/editors/location` (`Lo
|
|
|
1157
1136
|
domains, a row each with its label and a main mark, committed as one list of `{ value, label, main }`, the main one
|
|
1158
1137
|
first; `labels: false` for a host that keeps only the values; `escapeKeeps` for a host whose session keeps on
|
|
1159
1138
|
Escape, `EditSession.keeps`: its rows are checked first, as on Enter),
|
|
1160
|
-
`viewkitjs/views/editors/date` (`
|
|
1139
|
+
`viewkitjs/views/editors/date` (`DateEditorHost`, `DateEditorHandle`) and
|
|
1161
1140
|
`viewkitjs/views/editors/chips` (`ChipsEditor`, `ChipsEditorHandle`). An editor owns its panel and
|
|
1162
1141
|
what a close means; its host owns the popover, the anchor and the write. Its words are fields'
|
|
1163
1142
|
messages, read from the provider's conventions unless the host hands `message`.
|
|
@@ -1262,16 +1241,13 @@ rows are atoms.
|
|
|
1262
1241
|
|
|
1263
1242
|
`viewkitjs/views/panels/react`, with the client directive: the panels as they draw, each under the app's
|
|
1264
1243
|
`ViewsProvider`. The filter panel: a body per filter type (`TextFilterBody`, `NumberFilterBody`,
|
|
1265
|
-
`RangeFilterBody`, `RelationFilterBody`, `DateFilterBody` and its parts), the filter list (`CompactFilterList
|
|
1266
|
-
|
|
1267
|
-
`CompactTimeScopeDetail`), the date's month drawn through the `RangeCalendar` atom and its operator through the
|
|
1244
|
+
`RangeFilterBody`, `RelationFilterBody`, `DateFilterBody` and its parts), the filter list (`CompactFilterList`)
|
|
1245
|
+
and the details (`CompactFilterDetail`, `CompactDateRangeDetail`, `CompactTimeScopeDetail`), the date's month drawn through the `RangeCalendar` atom and its operator through the
|
|
1268
1246
|
map's `Menu`. The views row (`PillGroup`, `HScrollRow`, `ViewTabs`, `toPillOptions`, `FoldingViewRow`,
|
|
1269
1247
|
`ViewPicker`, `ViewPickerRow`, `ViewCreatePill`, `ViewAxes`), its pills drawn by the `Pill` atom and their verbs
|
|
1270
|
-
through the map's `Menu`. The Sort
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
`fieldEditor` (`PanelFieldEditor`). Customize, put together from them (`ViewOptionsPanelContent`, its root list
|
|
1274
|
-
`PopoverRootList`, its `ViewFooter` and `ViewOptionsActions`), with its popover form (`ViewOptionsPopoverPanel`,
|
|
1248
|
+
through the map's `Menu`. The Sort panel (`CompactSortDetail`); an app's field editor comes in as `fieldEditor`
|
|
1249
|
+
(`PanelFieldEditor`). Customize, the map's `CustomizeBody` over the builder's panels (`ViewOptionsPanelContent`, and
|
|
1250
|
+
`ViewOptionsActions`), with its popover form (`ViewOptionsPopoverPanel`,
|
|
1275
1251
|
`useViewOptionsPopover`, `useViewActivePanel`, `viewOptionsPopoverClassName`, `keepPanelOpenForPortals`); the app
|
|
1276
1252
|
hosts it in a popover or a drawer of its own. The toolbar: its frame (`Toolbar`, `ToolbarPart`, `ToolbarSeparator`), which places the parts
|
|
1277
1253
|
in the row, the narrow panel or the phone's row, or with `fold` in the kit's row and filter bar, folding as they narrow, and keeps one panel open at a time (`useToolbarPanel`), where a part
|
|
@@ -1280,8 +1256,8 @@ stands (`useToolbarSlot`, `ToolbarSlotState`), what an app's own frame hands the
|
|
|
1280
1256
|
opening its panel from its own button over the builder's panels (`ToolbarOptions`, `ToolbarSort`, `ToolbarFilter`,
|
|
1281
1257
|
`ToolbarPanelHost`, handed the part's button as `opener` to give the focus back to as it closes from inside, ViewKit
|
|
1282
1258
|
giving it back on the panel's own ✕, `useToolbarPanelState`, `ToolbarPanelState`, `FilterPanelContent`); the sort as up to three rules
|
|
1283
|
-
(`ToolbarSortPill`, the sort editor `
|
|
1284
|
-
and/or groups (`ToolbarAdvancedFilters`, the filter editor
|
|
1259
|
+
(`ToolbarSortPill`, the sort editor's host `SortEditorHost` with `useSortEditorHost` and `SortEditorOptions`, and `SortFieldList`); the
|
|
1260
|
+
and/or groups (`ToolbarAdvancedFilters`, the filter editor's host `FilterEditorHost`, `FilterFieldList` and `FilterValueBody`); and the ready toolbar over a
|
|
1285
1261
|
list's settings (`ReadyToolbar`, `ReadyToolbarProps`) with a list held in memory (`useListSettingsState`). It is the one door that may reach dnd-kit (`@dnd-kit/core`,
|
|
1286
1262
|
`@dnd-kit/sortable`, `@dnd-kit/utilities`), the package's optional peers, which the Columns list, the group
|
|
1287
1263
|
order, the view pills and the sort editor's rules drag with. It reaches them only through `import()`, started
|