@viewkitjs/views 0.4.0 → 0.6.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 +768 -0
- package/README.md +5 -3
- package/dist/atoms/Avatar.d.ts +2 -0
- package/dist/atoms/Avatar.js +13 -0
- package/dist/atoms/CellMore.d.ts +2 -0
- package/dist/atoms/CellMore.js +4 -0
- package/dist/atoms/DisabledReason.d.ts +11 -0
- package/dist/atoms/DisabledReason.js +10 -0
- package/dist/atoms/DrillRows.d.ts +3 -0
- package/dist/atoms/DrillRows.js +27 -0
- package/dist/atoms/Loading.d.ts +6 -0
- package/dist/atoms/Loading.js +4 -1
- package/dist/atoms/PanelRows.d.ts +5 -0
- package/dist/atoms/PanelRows.js +38 -0
- package/dist/atoms/PanelSearch.d.ts +2 -0
- package/dist/atoms/PanelSearch.js +21 -0
- package/dist/atoms/Pill.d.ts +2 -0
- package/dist/atoms/Pill.js +25 -0
- package/dist/atoms/RangeCalendar.d.ts +8 -0
- package/dist/atoms/RangeCalendar.js +30 -0
- package/dist/atoms/RelationRoles.js +2 -2
- package/dist/atoms/SelectionSheet.d.ts +3 -0
- package/dist/atoms/SelectionSheet.js +31 -0
- package/dist/atoms/ToolbarButton.d.ts +2 -0
- package/dist/atoms/ToolbarButton.js +18 -0
- package/dist/atoms/defaults.js +22 -0
- package/dist/atoms/types.d.ts +257 -1
- package/dist/cells/cell-format.d.ts +10 -1
- package/dist/cells/cell-title.d.ts +5 -1
- package/dist/cells/cell-title.js +2 -2
- package/dist/cells/cell-values.js +22 -7
- package/dist/cells/relation-wrap.js +1 -1
- package/dist/contract.d.ts +515 -18
- package/dist/contract.js +660 -5
- package/dist/display/actor.js +1 -1
- package/dist/display/boolean.js +5 -0
- package/dist/display/entity-chip.d.ts +12 -9
- package/dist/display/entity-chip.js +4 -5
- package/dist/display/fit-values.d.ts +34 -0
- package/dist/display/fit-values.js +45 -0
- package/dist/display/location.js +1 -1
- package/dist/display/multi-value.js +72 -8
- package/dist/display/options.d.ts +9 -1
- package/dist/display/relation.js +1 -1
- package/dist/display/rich-text.js +17 -6
- package/dist/display/select.js +6 -4
- package/dist/display/status-steps.d.ts +8 -0
- package/dist/display/status-steps.js +18 -0
- package/dist/display/viewer.js +1 -0
- package/dist/editors/BodyFrame.d.ts +29 -0
- package/dist/editors/BodyFrame.js +80 -0
- package/dist/editors/DateEditor.js +13 -17
- package/dist/editors/LocationEditor.d.ts +2 -0
- package/dist/editors/LocationEditor.js +29 -5
- package/dist/editors/NameEditor.d.ts +2 -0
- package/dist/editors/NameEditor.js +27 -7
- package/dist/editors/NumberEditor.d.ts +18 -0
- package/dist/editors/NumberEditor.js +29 -2
- package/dist/editors/RangeEditor.d.ts +2 -0
- package/dist/editors/RangeEditor.js +29 -4
- package/dist/editors/SelectEditor.d.ts +5 -0
- package/dist/editors/SelectEditor.js +3 -2
- package/dist/editors/TextEditor.d.ts +11 -1
- package/dist/editors/TextEditor.js +25 -8
- package/dist/editors/ValueListEditor.d.ts +7 -0
- package/dist/editors/ValueListEditor.js +60 -48
- package/dist/editors/body-panel.d.ts +7 -0
- package/dist/editors/body-panel.js +8 -0
- package/dist/editors/edit-session.d.ts +20 -3
- package/dist/editors/edit-session.js +43 -3
- package/dist/editors/leave-scope.d.ts +23 -0
- package/dist/editors/leave-scope.js +28 -0
- package/dist/editors/number-body.d.ts +29 -0
- package/dist/editors/number-body.js +37 -0
- package/dist/editors/parts-body.d.ts +66 -0
- package/dist/editors/parts-body.js +114 -0
- package/dist/editors/tab-ends.d.ts +5 -0
- package/dist/editors/tab-ends.js +7 -0
- package/dist/editors/text-body.d.ts +16 -0
- package/dist/editors/text-body.js +30 -0
- package/dist/editors/values-body.d.ts +47 -0
- package/dist/editors/values-body.js +140 -0
- package/dist/field-row/FieldRow.d.ts +7 -0
- package/dist/field-row/FieldRow.js +44 -24
- package/dist/field-row/FieldRowLane.js +12 -4
- package/dist/field-row/editors/RowChipsEditor.js +3 -1
- package/dist/field-row/editors/RowEditor.js +2 -1
- package/dist/field-row/editors/RowNameEditor.d.ts +5 -2
- package/dist/field-row/editors/RowNameEditor.js +12 -5
- package/dist/field-row/editors/RowNumberEditor.js +18 -2
- package/dist/field-row/editors/RowPlaceEditor.js +4 -2
- package/dist/field-row/editors/RowRangeEditor.d.ts +5 -2
- package/dist/field-row/editors/RowRangeEditor.js +13 -6
- package/dist/field-row/editors/RowRelationEditor.js +5 -2
- package/dist/field-row/editors/RowSelectEditor.js +4 -1
- package/dist/field-row/editors/RowTextEditor.d.ts +1 -1
- package/dist/field-row/editors/RowTextEditor.js +12 -3
- package/dist/field-row/editors/RowValueListEditor.d.ts +2 -1
- package/dist/field-row/editors/RowValueListEditor.js +17 -4
- package/dist/field-row/editors/host.d.ts +3 -0
- package/dist/field-row/editors/row-session.d.ts +12 -1
- package/dist/field-row/editors/row-session.js +52 -2
- package/dist/field-row/field-row-button.d.ts +40 -0
- package/dist/field-row/field-row-button.js +18 -0
- package/dist/field-row/field-row-checkbox.d.ts +9 -0
- package/dist/field-row/field-row-checkbox.js +7 -0
- package/dist/figures.d.ts +5 -48
- package/dist/figures.js +1 -63
- package/dist/filters/filter-model.d.ts +2 -0
- package/dist/grid/chrome/GridAddColumn.js +17 -3
- package/dist/grid/chrome/GridAggregateMenu.d.ts +2 -0
- package/dist/grid/chrome/GridAggregateMenu.js +2 -0
- package/dist/grid/chrome/GridCellEditors.js +16 -6
- package/dist/grid/chrome/GridCellOutline.d.ts +7 -4
- package/dist/grid/chrome/GridCellOutline.js +4 -2
- package/dist/grid/chrome/GridChipsEditor.js +3 -1
- package/dist/grid/chrome/GridColumnMenu.d.ts +7 -4
- package/dist/grid/chrome/GridColumnMenu.js +5 -3
- package/dist/grid/chrome/GridColumnSortSection.d.ts +23 -3
- package/dist/grid/chrome/GridColumnSortSection.js +18 -1
- package/dist/grid/chrome/GridFooter.d.ts +4 -1
- package/dist/grid/chrome/GridFooter.js +6 -4
- package/dist/grid/chrome/GridGroupMenu.d.ts +7 -3
- package/dist/grid/chrome/GridGroupMenu.js +30 -8
- package/dist/grid/chrome/GridHeader.d.ts +5 -1
- package/dist/grid/chrome/GridHeader.js +9 -5
- package/dist/grid/chrome/GridLongTextEditor.js +15 -11
- package/dist/grid/chrome/GridNameEditor.js +4 -2
- package/dist/grid/chrome/GridNumberEditor.d.ts +8 -1
- package/dist/grid/chrome/GridNumberEditor.js +15 -3
- package/dist/grid/chrome/GridPager.d.ts +7 -0
- package/dist/grid/chrome/GridPager.js +34 -0
- package/dist/grid/chrome/GridPlaceEditor.js +4 -2
- package/dist/grid/chrome/GridRangeEditor.js +12 -4
- package/dist/grid/chrome/GridRelationEditor.js +5 -2
- package/dist/grid/chrome/GridRow.js +18 -6
- package/dist/grid/chrome/GridRowActions.d.ts +8 -3
- package/dist/grid/chrome/GridRowActions.js +16 -6
- package/dist/grid/chrome/GridRowCells.js +23 -7
- package/dist/grid/chrome/GridRowGlyph.d.ts +3 -1
- package/dist/grid/chrome/GridRowGlyph.js +7 -2
- package/dist/grid/chrome/GridSelectEditor.js +6 -3
- package/dist/grid/chrome/GridStructure.d.ts +6 -1
- package/dist/grid/chrome/GridStructure.js +32 -8
- package/dist/grid/chrome/GridTable.js +36 -24
- package/dist/grid/chrome/GridTableSurface.d.ts +5 -1
- package/dist/grid/chrome/GridTableSurface.js +5 -2
- package/dist/grid/chrome/GridTextEditor.d.ts +5 -1
- package/dist/grid/chrome/GridTextEditor.js +13 -3
- package/dist/grid/chrome/GridValueListEditor.d.ts +12 -4
- package/dist/grid/chrome/GridValueListEditor.js +11 -3
- package/dist/grid/chrome/StuckMarker.d.ts +3 -1
- package/dist/grid/chrome/StuckMarker.js +6 -2
- package/dist/grid/chrome/cells.d.ts +4 -2
- package/dist/grid/chrome/cells.js +2 -2
- package/dist/grid/chrome/grid-add-column-items.d.ts +1 -1
- package/dist/grid/chrome/grid-add-column-items.js +8 -1
- package/dist/grid/chrome/grid-button.d.ts +32 -0
- package/dist/grid/chrome/grid-button.js +12 -0
- package/dist/grid/chrome/grid-cell-classes.d.ts +38 -0
- package/dist/grid/chrome/grid-cell-classes.js +30 -0
- package/dist/grid/chrome/grid-column-menu-items.d.ts +3 -0
- package/dist/grid/chrome/grid-column-menu-items.js +32 -3
- package/dist/grid/chrome/grid-columns-template.d.ts +27 -0
- package/dist/grid/chrome/grid-columns-template.js +13 -0
- package/dist/grid/chrome/grid-edit-session.d.ts +4 -1
- package/dist/grid/chrome/grid-edit-session.js +11 -1
- package/dist/grid/chrome/grid-group-menu-items.d.ts +8 -1
- package/dist/grid/chrome/grid-group-menu-items.js +17 -0
- package/dist/grid/chrome/grid-group-menu-parts.d.ts +10 -6
- package/dist/grid/chrome/grid-group-menu-parts.js +4 -2
- package/dist/grid/chrome/grid-hover.d.ts +4 -1
- package/dist/grid/chrome/grid-hover.js +16 -6
- package/dist/grid/chrome/grid-pages.d.ts +15 -0
- package/dist/grid/chrome/grid-pages.js +9 -0
- package/dist/grid/chrome/grid-row-menu-items.js +18 -10
- package/dist/grid/chrome/grid-row-props.d.ts +6 -2
- package/dist/grid/chrome/grid-row-window.d.ts +7 -0
- package/dist/grid/chrome/grid-row-window.js +35 -1
- package/dist/grid/chrome/grid-table-props.d.ts +38 -4
- package/dist/grid/chrome/useGridColumnLayout.d.ts +3 -1
- package/dist/grid/chrome/useGridColumnLayout.js +29 -9
- package/dist/grid/chrome/useGridPartColumns.js +1 -1
- package/dist/grid/chrome/useGridScrollArea.js +2 -0
- package/dist/grid/chrome/useGridTableInteractionModel.d.ts +1 -0
- package/dist/grid/chrome/useGridTableInteractionModel.js +5 -3
- package/dist/grid/chrome/useGridTableSelection.d.ts +3 -1
- package/dist/grid/chrome/useGridTableSelection.js +2 -2
- package/dist/grid/chrome/useHeaderDragReorder.js +2 -0
- package/dist/grid/core/editing-controller.d.ts +36 -11
- package/dist/grid/core/editing-controller.js +92 -25
- package/dist/grid/core/grid-aria.d.ts +4 -0
- package/dist/grid/core/grid-aria.js +6 -4
- package/dist/grid/core/grid-focus.d.ts +6 -0
- package/dist/grid/core/grid-focus.js +28 -5
- package/dist/grid/core/useGridEditing.d.ts +11 -2
- package/dist/grid/core/useGridEditing.js +9 -5
- package/dist/grid/core/write-states.d.ts +20 -0
- package/dist/grid/core/write-states.js +21 -0
- package/dist/grid/grid-format-props.d.ts +26 -0
- package/dist/grid/grid-format-props.js +65 -0
- package/dist/grid/index.d.ts +3 -1
- package/dist/grid/index.js +1 -0
- package/dist/grid/useGridTablePrefs.d.ts +20 -21
- package/dist/grid/useGridTablePrefs.js +6 -58
- package/dist/grid/useGridTableSettings.d.ts +60 -0
- package/dist/grid/useGridTableSettings.js +61 -0
- package/dist/grouping/sort-groups.d.ts +6 -7
- package/dist/internal/count.d.ts +3 -0
- package/dist/internal/count.js +3 -0
- package/dist/model/aggregates.d.ts +3 -3
- package/dist/model/aggregates.js +17 -71
- package/dist/model/body-frame.d.ts +16 -0
- package/dist/model/body-frame.js +5 -0
- package/dist/model/column-capabilities.d.ts +4 -1
- package/dist/model/column-capabilities.js +4 -1
- package/dist/model/column-filters.d.ts +7 -4
- package/dist/model/column-filters.js +26 -18
- package/dist/model/column-inspect.d.ts +3 -2
- package/dist/model/column-inspect.js +3 -1
- package/dist/model/column-order.d.ts +2 -2
- package/dist/model/column-schema.d.ts +6 -7
- package/dist/model/column-sort.d.ts +11 -0
- package/dist/model/column-sort.js +14 -0
- package/dist/model/column-state.d.ts +3 -20
- package/dist/model/column-state.js +1 -4
- package/dist/model/column-types.d.ts +1 -15
- package/dist/model/column-types.js +1 -1
- package/dist/model/one-value.d.ts +6 -0
- package/dist/model/one-value.js +5 -0
- package/dist/model/part-columns.d.ts +1 -6
- package/dist/model/part-columns.js +1 -1
- package/dist/model/part-rows.d.ts +2 -9
- package/dist/model/part-rows.js +1 -10
- package/dist/model/part-write.js +1 -1
- package/dist/model/place-parts.d.ts +6 -0
- package/dist/model/place-parts.js +14 -0
- package/dist/model/preferences.d.ts +3 -23
- package/dist/model/preferences.js +1 -17
- package/dist/model/prefs-buckets.d.ts +0 -27
- package/dist/model/prefs-buckets.js +1 -1
- package/dist/model/relation-filters.d.ts +13 -3
- package/dist/model/relation-filters.js +9 -4
- package/dist/model/row-icon.d.ts +17 -11
- package/dist/model/settings-columns.d.ts +34 -0
- package/dist/model/settings-columns.js +146 -0
- package/dist/model/settings-look.d.ts +17 -0
- package/dist/model/settings-look.js +23 -0
- package/dist/model/view-rules.d.ts +32 -6
- package/dist/model/view-rules.js +99 -23
- package/dist/panels/availability.d.ts +26 -0
- package/dist/panels/availability.js +28 -0
- package/dist/panels/filter/DateFilterBody.d.ts +42 -0
- package/dist/panels/filter/DateFilterBody.js +64 -0
- package/dist/panels/filter/DateFilterCalendar.d.ts +19 -0
- package/dist/panels/filter/DateFilterCalendar.js +37 -0
- package/dist/panels/filter/DateFilterInput.d.ts +16 -0
- package/dist/panels/filter/DateFilterInput.js +37 -0
- package/dist/panels/filter/FilterIcon.d.ts +7 -0
- package/dist/panels/filter/FilterIcon.js +15 -0
- package/dist/panels/filter/MenuSelect.d.ts +12 -0
- package/dist/panels/filter/MenuSelect.js +34 -0
- package/dist/panels/filter/NumberFilterBody.d.ts +21 -0
- package/dist/panels/filter/NumberFilterBody.js +76 -0
- package/dist/panels/filter/RangeFilterBody.d.ts +19 -0
- package/dist/panels/filter/RangeFilterBody.js +71 -0
- package/dist/panels/filter/RelationFilterBody.d.ts +17 -0
- package/dist/panels/filter/RelationFilterBody.js +20 -0
- package/dist/panels/filter/TextFilterBody.d.ts +31 -0
- package/dist/panels/filter/TextFilterBody.js +44 -0
- package/dist/panels/filter/TimeScopeDetail.d.ts +6 -0
- package/dist/panels/filter/TimeScopeDetail.js +47 -0
- package/dist/panels/filter/details.d.ts +17 -0
- package/dist/panels/filter/details.js +73 -0
- package/dist/panels/filter/filter-list.d.ts +23 -0
- package/dist/panels/filter/filter-list.js +38 -0
- package/dist/panels/group-sort.d.ts +24 -0
- package/dist/panels/group-sort.js +58 -0
- package/dist/panels/index.d.ts +24 -0
- package/dist/panels/index.js +17 -0
- package/dist/panels/labels.d.ts +37 -0
- package/dist/panels/labels.js +166 -0
- package/dist/panels/model.d.ts +343 -0
- package/dist/panels/model.js +77 -0
- package/dist/panels/react/GroupBucketsList.d.ts +16 -0
- package/dist/panels/react/GroupBucketsList.js +38 -0
- package/dist/panels/react/LayoutColumnsList.d.ts +24 -0
- package/dist/panels/react/LayoutColumnsList.js +71 -0
- package/dist/panels/react/PopoverColumnDetail.d.ts +11 -0
- package/dist/panels/react/PopoverColumnDetail.js +24 -0
- package/dist/panels/react/chrome.d.ts +17 -0
- package/dist/panels/react/chrome.js +8 -0
- package/dist/panels/react/column-refusals.d.ts +7 -0
- package/dist/panels/react/column-refusals.js +14 -0
- package/dist/panels/react/customize.d.ts +26 -0
- package/dist/panels/react/customize.js +98 -0
- package/dist/panels/react/drag.d.ts +2 -0
- package/dist/panels/react/drag.js +6 -0
- package/dist/panels/react/field-editor.d.ts +10 -0
- package/dist/panels/react/field-editor.js +1 -0
- package/dist/panels/react/filter-panel.d.ts +15 -0
- package/dist/panels/react/filter-panel.js +48 -0
- package/dist/panels/react/layout-detail.d.ts +4 -0
- package/dist/panels/react/layout-detail.js +21 -0
- package/dist/panels/react/order-details.d.ts +32 -0
- package/dist/panels/react/order-details.js +81 -0
- package/dist/panels/react/panel-header.d.ts +10 -0
- package/dist/panels/react/panel-header.js +12 -0
- package/dist/panels/react/panel-sheet.d.ts +19 -0
- package/dist/panels/react/panel-sheet.js +22 -0
- package/dist/panels/react/popover.d.ts +71 -0
- package/dist/panels/react/popover.js +47 -0
- package/dist/panels/react/root-list.d.ts +6 -0
- package/dist/panels/react/root-list.js +31 -0
- package/dist/panels/react/toolbar/ReadyToolbar.d.ts +42 -0
- package/dist/panels/react/toolbar/ReadyToolbar.js +92 -0
- package/dist/panels/react/toolbar/Toolbar.d.ts +16 -0
- package/dist/panels/react/toolbar/Toolbar.js +34 -0
- package/dist/panels/react/toolbar/ToolbarButton.d.ts +5 -0
- package/dist/panels/react/toolbar/ToolbarButton.js +9 -0
- package/dist/panels/react/toolbar/ToolbarFilter.d.ts +19 -0
- package/dist/panels/react/toolbar/ToolbarFilter.js +32 -0
- package/dist/panels/react/toolbar/ToolbarNew.d.ts +12 -0
- package/dist/panels/react/toolbar/ToolbarNew.js +21 -0
- package/dist/panels/react/toolbar/ToolbarOptions.d.ts +25 -0
- package/dist/panels/react/toolbar/ToolbarOptions.js +33 -0
- package/dist/panels/react/toolbar/ToolbarSearch.d.ts +9 -0
- package/dist/panels/react/toolbar/ToolbarSearch.js +41 -0
- package/dist/panels/react/toolbar/ToolbarSort.d.ts +12 -0
- package/dist/panels/react/toolbar/ToolbarSort.js +16 -0
- package/dist/panels/react/toolbar/ToolbarViews.d.ts +13 -0
- package/dist/panels/react/toolbar/ToolbarViews.js +24 -0
- package/dist/panels/react/toolbar/context.d.ts +29 -0
- package/dist/panels/react/toolbar/context.js +49 -0
- package/dist/panels/react/toolbar/panel-part.d.ts +37 -0
- package/dist/panels/react/toolbar/panel-part.js +37 -0
- package/dist/panels/react/toolbar/panel-state.d.ts +9 -0
- package/dist/panels/react/toolbar/panel-state.js +12 -0
- package/dist/panels/react/toolbar/use-box-narrow.d.ts +2 -0
- package/dist/panels/react/toolbar/use-box-narrow.js +18 -0
- package/dist/panels/react/toolbar/use-list-settings-state.d.ts +10 -0
- package/dist/panels/react/toolbar/use-list-settings-state.js +10 -0
- package/dist/panels/react/view-actions.d.ts +4 -0
- package/dist/panels/react/view-actions.js +37 -0
- package/dist/panels/react/view-footer.d.ts +16 -0
- package/dist/panels/react/view-footer.js +11 -0
- package/dist/panels/react/views-row/FoldingViewRow.d.ts +4 -0
- package/dist/panels/react/views-row/FoldingViewRow.js +105 -0
- package/dist/panels/react/views-row/HScrollRow.d.ts +7 -0
- package/dist/panels/react/views-row/HScrollRow.js +42 -0
- package/dist/panels/react/views-row/PillGroup.d.ts +30 -0
- package/dist/panels/react/views-row/PillGroup.js +86 -0
- package/dist/panels/react/views-row/ViewAxes.d.ts +6 -0
- package/dist/panels/react/views-row/ViewAxes.js +16 -0
- package/dist/panels/react/views-row/ViewCreatePill.d.ts +7 -0
- package/dist/panels/react/views-row/ViewCreatePill.js +11 -0
- package/dist/panels/react/views-row/ViewPicker.d.ts +5 -0
- package/dist/panels/react/views-row/ViewPicker.js +65 -0
- package/dist/panels/react/views-row/ViewPickerRow.d.ts +7 -0
- package/dist/panels/react/views-row/ViewPickerRow.js +18 -0
- package/dist/panels/react/views-row/ViewTabs.d.ts +31 -0
- package/dist/panels/react/views-row/ViewTabs.js +29 -0
- package/dist/panels/react/views-row/menu-classes.d.ts +6 -0
- package/dist/panels/react/views-row/menu-classes.js +3 -0
- package/dist/panels/react/views-row/use-anchored-toggle.d.ts +19 -0
- package/dist/panels/react/views-row/use-anchored-toggle.js +31 -0
- package/dist/panels/react.d.ts +51 -0
- package/dist/panels/react.js +43 -0
- package/dist/panels/settings/axes.d.ts +28 -0
- package/dist/panels/settings/axes.js +71 -0
- package/dist/panels/settings/filters.d.ts +5 -0
- package/dist/panels/settings/filters.js +62 -0
- package/dist/panels/settings/group-buckets.d.ts +23 -0
- package/dist/panels/settings/group-buckets.js +73 -0
- package/dist/panels/settings/input.d.ts +69 -0
- package/dist/panels/settings/input.js +1 -0
- package/dist/panels/settings/layout.d.ts +5 -0
- package/dist/panels/settings/layout.js +244 -0
- package/dist/panels/settings/order.d.ts +19 -0
- package/dist/panels/settings/order.js +271 -0
- package/dist/panels/settings/settings-panels.d.ts +17 -0
- package/dist/panels/settings/settings-panels.js +28 -0
- package/dist/panels/toolbar/clear.d.ts +9 -0
- package/dist/panels/toolbar/clear.js +26 -0
- package/dist/panels/toolbar/counts.d.ts +15 -0
- package/dist/panels/toolbar/counts.js +21 -0
- package/dist/panels/toolbar/edit-view.d.ts +5 -0
- package/dist/panels/toolbar/edit-view.js +18 -0
- package/dist/panels/toolbar/model.d.ts +34 -0
- package/dist/panels/toolbar/model.js +52 -0
- package/dist/panels/use-filter-opened.d.ts +8 -0
- package/dist/panels/use-filter-opened.js +11 -0
- package/dist/panels/view-state.d.ts +38 -0
- package/dist/panels/view-state.js +1 -0
- package/dist/panels/views-row/model.d.ts +131 -0
- package/dist/panels/views-row/model.js +14 -0
- package/dist/provider/ViewsProvider.d.ts +50 -6
- package/dist/provider/ViewsProvider.js +33 -2
- package/dist/provider/components.d.ts +274 -11
- package/dist/provider/context.d.ts +23 -2
- package/dist/provider/desktop.d.ts +3 -0
- package/dist/provider/desktop.js +7 -4
- package/dist/react.d.ts +5 -2
- package/dist/selection/SelectionBar.d.ts +18 -0
- package/dist/selection/SelectionBar.js +98 -0
- package/dist/selection/SelectionBarPhone.d.ts +3 -0
- package/dist/selection/SelectionBarPhone.js +14 -0
- package/dist/selection/bar-overflow.d.ts +12 -0
- package/dist/selection/bar-overflow.js +55 -0
- package/dist/selection/bar-parts.d.ts +17 -0
- package/dist/selection/bar-parts.js +19 -0
- package/dist/selection/index.d.ts +2 -0
- package/dist/selection/index.js +1 -0
- package/dist/selection/types.d.ts +3 -2
- package/dist/selection/useListSelectionShortcuts.d.ts +3 -2
- package/dist/selection/useListSelectionShortcuts.js +1 -1
- package/dist/selection/verbs.d.ts +41 -0
- package/dist/selection/verbs.js +1 -0
- package/docs/contract.md +355 -35
- package/docs/getting-started.md +1 -1
- package/docs/guides/atoms.md +39 -6
- package/docs/guides/columns.md +1 -1
- package/docs/guides/display.md +3 -2
- package/docs/guides/editors.md +4 -3
- package/docs/guides/selection.md +35 -21
- package/docs/guides/the-grid.md +24 -13
- package/docs/guides/the-provider.md +24 -6
- package/docs/index.md +2 -0
- package/docs/install.md +3 -1
- package/docs/reference/cells.md +1 -1
- package/docs/reference/display.md +5 -4
- package/docs/reference/editors-location.md +3 -1
- package/docs/reference/editors-name.md +3 -1
- package/docs/reference/editors-number.md +1 -0
- package/docs/reference/editors-range.md +3 -1
- package/docs/reference/editors-session.md +1 -0
- package/docs/reference/editors-text.md +2 -2
- package/docs/reference/editors-value-list.md +1 -1
- package/docs/reference/field-row.md +2 -2
- package/docs/reference/grid.md +10 -7
- package/docs/reference/panels-react.md +101 -0
- package/docs/reference/panels.md +123 -0
- package/docs/reference/react.md +45 -12
- package/docs/reference/selection.md +11 -3
- package/docs/reference/views.md +41 -38
- package/package.json +33 -4
- package/skills/views/SKILL.md +5 -4
package/docs/contract.md
CHANGED
|
@@ -25,18 +25,25 @@ use; the prefix keeps that selector from reaching an element of the app's own.
|
|
|
25
25
|
| `data-slot="vk-grid"` | the grid's frame: fills the box the app gives it |
|
|
26
26
|
| `data-slot="vk-grid-pan"` | the grid's sideways box, drawn only while the lab's lock is on and the screen is a touch screen: it scrolls the table sideways |
|
|
27
27
|
| `data-slot="vk-grid-scroll"` | the rows' box: the grid's one scroll area, both ways; up and down only inside `vk-grid-pan` while that is drawn |
|
|
28
|
-
| `data-slot="vk-grid-head"` | an ungrouped grid's pinned head
|
|
28
|
+
| `data-slot="vk-grid-head"` | an ungrouped grid's pinned head, or a grouped grid's with `oneHeader`: its header row |
|
|
29
29
|
| `data-slot="vk-grid-header"` | the header row |
|
|
30
30
|
| `data-slot="vk-grid-header-cell"` | one column's header |
|
|
31
31
|
| `data-slot="vk-grid-row"` | one record's row |
|
|
32
32
|
| `data-slot="vk-grid-rows"` | a group's rows: only those on screen are drawn |
|
|
33
33
|
| `data-slot="vk-grid-gap"` | the rows not drawn, as tall as they are |
|
|
34
34
|
| `data-slot="vk-grid-cell"` | one value |
|
|
35
|
+
| `data-slot="vk-grid-title"` | the name's link in a title cell: the words that open the row |
|
|
35
36
|
| `data-slot="vk-grid-group"` | one group's band and its rows |
|
|
36
|
-
| `data-slot="vk-grid-group-head"` | a group's pinned head: its name bar and its header row
|
|
37
|
+
| `data-slot="vk-grid-group-head"` | a group's pinned head: its name bar, and its header row unless `oneHeader` is on |
|
|
37
38
|
| `data-slot="vk-grid-group-header"` | a group's name and figures |
|
|
39
|
+
| `data-slot="vk-grid-group-count"` | a group's count, in its head |
|
|
40
|
+
| `data-slot="vk-grid-group-figure"` | one of a group's figures, in its head |
|
|
41
|
+
| `data-slot="vk-grid-group-dot"` | the · before a group's count or figure |
|
|
38
42
|
| `data-slot="vk-grid-footer"` | the footer row |
|
|
39
43
|
| `data-slot="vk-grid-footer-cell"` | one column's figure |
|
|
44
|
+
| `data-slot="vk-grid-figure-label"` | a footer figure's kind ("Sum"), drawn before its value; none on a figure the app draws |
|
|
45
|
+
| `data-slot="vk-grid-figure-value"` | a footer figure's value, its suffix inside it |
|
|
46
|
+
| `data-slot="vk-grid-figure-pick"` | an empty footer cell's offer of a figure, shown under the pointer |
|
|
40
47
|
| `data-slot="vk-grid-rail"` | the left rail: the checkbox lane |
|
|
41
48
|
| `data-slot="vk-grid-tail"` | the right tail: a row's ⋯, the header's + Add column |
|
|
42
49
|
| `data-slot="vk-grid-row-more"` | the row's ⋯ itself: it opens the row's menu |
|
|
@@ -47,15 +54,42 @@ use; the prefix keeps that selector from reaching an element of the app's own.
|
|
|
47
54
|
| `data-slot="vk-grid-flyout"` | a flyout a menu row opens beside its menu |
|
|
48
55
|
| `data-slot="vk-grid-group-menu"` | a group band's menu, on the `popover` route |
|
|
49
56
|
| `data-slot="vk-grid-aggregate-menu"` | the footer's figure picker, on the `popover` route |
|
|
57
|
+
| `data-slot="vk-grid-pager"` | the pager under a grid in pages (`pages`), a `<nav>` |
|
|
58
|
+
| `data-slot="vk-grid-pager-range"` | where you are among the rows ("26–50 of 213") |
|
|
59
|
+
| `data-slot="vk-grid-pager-size"` | the page-size pick, your `Button` opening your `Menu`; `data-open` while open |
|
|
60
|
+
| `data-slot="vk-grid-pager-previous"` | the previous page, your `Button` |
|
|
61
|
+
| `data-slot="vk-grid-pager-next"` | the next page, your `Button` |
|
|
62
|
+
|
|
63
|
+
ViewKit draws the name plain at rest and in the brand colour, underlined, under the pointer, on its own
|
|
64
|
+
classes. An app restyles it with a rule on `vk-grid-title` written outside any CSS layer or in a layer
|
|
65
|
+
after `utilities`, so it wins over those classes. Such a rule wins under the pointer too: an app that
|
|
66
|
+
colours the name at rest also writes its own `:hover` rule, or the name keeps the rest colour there.
|
|
67
|
+
Only the grid's titles carry the part; a title drawn on another surface names none.
|
|
68
|
+
|
|
69
|
+
Each of a group head's three parts carries `data-part="<part>"`, an identifier like `data-group-key="<key>"` rather than a state: the summary part it shows or stands before (`count`,
|
|
70
|
+
`total`, `total:<columnId>`), so an app hides one dot by it: a count in a chip with no dot is
|
|
71
|
+
`[data-slot="vk-grid-group-dot"][data-part="count"] { display: none; }` and a rule on `vk-grid-group-count`.
|
|
50
72
|
|
|
51
73
|
Board's slots (`vk-board`, `vk-board-lane`, `vk-board-lane-header`, `vk-board-card`,
|
|
52
74
|
`vk-board-add-card`) join this table when the board arrives.
|
|
53
75
|
|
|
76
|
+
The selection bar's parts (`SelectionBar`, `@viewkitjs/views/selection`):
|
|
77
|
+
|
|
78
|
+
| Slot | Part |
|
|
79
|
+
| ------------------------------------ | ---------------------------------------------------------- |
|
|
80
|
+
| `data-slot="vk-selection-bar"` | the fixed box the app places (the provider's `selectionBar`) |
|
|
81
|
+
| `data-slot="vk-selection-pill"` | the pill inside it: the count, the verbs, the trash, More |
|
|
82
|
+
| `data-slot="vk-selection-chip"` | the count that clears the selection, on the desktop |
|
|
83
|
+
|
|
54
84
|
## States
|
|
55
85
|
|
|
56
86
|
Flags the rendering styles, present as an attribute when true and absent when false, so a skin
|
|
57
|
-
writes `[data-selected]` and `data-[selected]:bg-…`.
|
|
58
|
-
`
|
|
87
|
+
writes `[data-selected]` and `data-[selected]:bg-…`. A flag is present with an empty value
|
|
88
|
+
(`data-focused=""`), with two exceptions: `data-range-edge` carries one or more of `top`, `right`,
|
|
89
|
+
`bottom`, `left`, space-separated, in that order; and `data-stuck` reads `"true"` while present, so a
|
|
90
|
+
skin written for 0.5.0's `[data-stuck="true"]` still matches (at rest it is absent). The states only
|
|
91
|
+
name what holds: ViewKit draws its own look for them on its own classes, and a skin dresses them by the
|
|
92
|
+
attribute.
|
|
59
93
|
|
|
60
94
|
| state | on | means |
|
|
61
95
|
| ----------------- | ----------------- | ------------------------------------------------------ |
|
|
@@ -66,11 +100,21 @@ writes `[data-selected]` and `data-[selected]:bg-…`. `data-range-edge` carries
|
|
|
66
100
|
| `data-range-edge` | cell | which edges of the range this cell draws |
|
|
67
101
|
| `data-pending` | cell | a write is in flight |
|
|
68
102
|
| `data-invalid` | cell | the last commit was refused |
|
|
69
|
-
| `data-dragging` | header cell
|
|
70
|
-
| `data-empty` | cell, grid
|
|
103
|
+
| `data-dragging` | header cell; a row where rows drag (the grid's don't) | being dragged |
|
|
104
|
+
| `data-empty` | cell, footer cell, grid | no value; no figure, and one can be picked; no rows |
|
|
71
105
|
| `data-frozen` | header cell, cell | pinned to the left edge |
|
|
72
|
-
| `data-scrolled` | grid | the
|
|
106
|
+
| `data-scrolled` | grid | the table has scrolled sideways (`--vk-scrolled`) |
|
|
73
107
|
| `data-parked` | grid | the identity columns are parked behind the frozen band |
|
|
108
|
+
| `data-collapsed` | group | folded: its rows are hidden |
|
|
109
|
+
| `data-stuck` | head, group head | pinned, with content passing under it |
|
|
110
|
+
| `data-open` | header cell, footer cell, "+ Add column", a cell's "+N" (`vk-cell-more`) | its menu, or the cell's whole list, is open (ViewKit draws no look for it) |
|
|
111
|
+
|
|
112
|
+
`data-pending` holds while any write to the cell is in flight, from its send to the app's answer.
|
|
113
|
+
`data-invalid` holds from the refusal of the latest write sent for the cell until the cell's next
|
|
114
|
+
write is sent; an undo or a redo is a write. `data-empty` on a cell reads the value it shows (a
|
|
115
|
+
pending value, else the row's): nothing, a blank text or an empty list; a value made of parts whose
|
|
116
|
+
parts are all empty (a money, a range) does not count as empty, and a column with no value of its
|
|
117
|
+
own (an action column) never is.
|
|
74
118
|
|
|
75
119
|
## Getters
|
|
76
120
|
|
|
@@ -116,7 +160,7 @@ frame from its scale and its state; a skin reads them and an app overrides them
|
|
|
116
160
|
| `--vk-text-xs` | small text size |
|
|
117
161
|
| `--vk-text-10` | the smallest text size |
|
|
118
162
|
| `--vk-head-text` | header text size |
|
|
119
|
-
| `--vk-scrolled` | 0 or 1:
|
|
163
|
+
| `--vk-scrolled` | 0 or 1: the table has scrolled sideways |
|
|
120
164
|
| `--vk-pin` | a row's frozen cells and rail: `relative` at rest, `sticky` once the rows' box is scrolled sideways |
|
|
121
165
|
| `--vk-stick` | 0 or 1: 1 while `--vk-pin` is `sticky`; it scales their sticky offsets |
|
|
122
166
|
| `--vk-parked` | 0 or 1: identity columns parked |
|
|
@@ -161,7 +205,25 @@ declares both wherever a ground declares its own, so a part takes the states of
|
|
|
161
205
|
The default atoms and the display also read `--vk-success`, `--vk-warning`, `--vk-info`,
|
|
162
206
|
`--vk-label-blue`, `--vk-label-green`, `--vk-label-amber`, `--vk-label-red`, `--vk-label-purple`,
|
|
163
207
|
`--vk-label-pink` and `--vk-label-teal` when the app declares them, each with a built-in fallback. The
|
|
164
|
-
|
|
208
|
+
selection bar reads `--vk-float-shadow`, a whole `box-shadow` value for what floats over a list, with a
|
|
209
|
+
built-in fallback. The views row (`/panels/react`) reads `--vk-selected`, the ground's selected state (the
|
|
210
|
+
active view's pill and the picker's chip), falling back to `--vk-neutral`; an app whose grounds tune
|
|
211
|
+
their states declares it beside `--vk-hovered` and `--vk-pressed`. The header's column glyphs ViewKit
|
|
212
|
+
draws (a field's or a type's, a binding's `AppIcon`) read `--vk-head-glyph-fg`, falling back to the
|
|
213
|
+
header's words' colour; they are drawn at 70% opacity either way, so a set colour shows at 70% of itself,
|
|
214
|
+
and an app that wants an exact colour sets it stronger. A column's own `icon` node is drawn as given. The corners come from the app's
|
|
215
|
+
Tailwind radius scale.
|
|
216
|
+
|
|
217
|
+
**The cell outlines are the app's to dress by four variables.** The line of the cell under the pointer and the
|
|
218
|
+
picked cell's ring share one geometry: `--vk-outline-radius` is the corners of both (undeclared, the app's
|
|
219
|
+
Tailwind small radius, exactly what `rounded-sm` drew), so an app that draws a picked cell straight declares `0` and the
|
|
220
|
+
hovered cell follows. Each line takes its own colour: `--vk-outline-hover` the hovered cell's (undeclared,
|
|
221
|
+
`--vk-border-bold`), `--vk-outline` the picked ring at rest (undeclared, `--vk-fg-subtle`) and
|
|
222
|
+
`--vk-outline-active` the picked ring under the pointer or while editing (undeclared, `--vk-border-brand`).
|
|
223
|
+
The hover is CSS: the hovered cell draws its line as its own `::after`, and nothing renders as the pointer moves.
|
|
224
|
+
A picked row's lines, over the first picked row of a run and under every picked row, are `--vk-selection-edge`
|
|
225
|
+
(undeclared, `--vk-brand`); an app that declares it `transparent` shows the cells' own line there, so a picked row
|
|
226
|
+
reads by its tint alone. Nothing else in the row reads it, so the brand stays on its focus ring and its checkbox.
|
|
165
227
|
|
|
166
228
|
**The page gutter is the app's, if it has one.** `--vk-gutter` is the side padding a page gives its
|
|
167
229
|
content: the grid's rows run edge to edge and line their content up with it. An app that pads its
|
|
@@ -169,12 +231,24 @@ pages declares it once, onto its own padding; undeclared, the grid reads `0px` a
|
|
|
169
231
|
container. `--vk-scroll-inset-bottom` is how much of the grid's foot the app covers with something it
|
|
170
232
|
floats there (a phone's bottom bar): the grid's scroll area runs underneath it, its last row scrolls
|
|
171
233
|
clear of it and a revealed cell stops above it. An app declares it on the grid's box or an ancestor;
|
|
172
|
-
undeclared, the grid reads `0px`.
|
|
234
|
+
undeclared, the grid reads `0px`. `--vk-panel-padding` is the inset a panel's list keeps from the
|
|
235
|
+
panel's edge, so a row's hover pill floats inside it; an app whose menus pad by a setting of their own
|
|
236
|
+
declares it onto that, and undeclared, a panel reads `0.375rem`. A row of pills on a scroll rail
|
|
237
|
+
(`HScrollRow`, `/panels/react`) is at most the viewport's width less `--vk-scroll-row-inset` (what of the
|
|
238
|
+
width is not the page's: a sidebar, undeclared `0px`), and leaves `--vk-scroll-row-end` after its last pill
|
|
239
|
+
(undeclared `1rem`).
|
|
240
|
+
|
|
241
|
+
**The gap between groups is the app's to declare.** Each group after the first stands `--vk-group-gap`
|
|
242
|
+
below the one before; undeclared, `calc(var(--spacing)*5)`, what `mt-5` drew. An app declares it on the grid
|
|
243
|
+
or an ancestor, or on one group: to stand the group after a folded one right under it,
|
|
244
|
+
`[data-slot="vk-grid-group"][data-collapsed] + [data-slot="vk-grid-group"] { --vk-group-gap: 0px; }`, which needs
|
|
245
|
+
no layer. A `margin-top` rule on the slot still works where it wins over the class (outside any layer, or in one
|
|
246
|
+
after `utilities`).
|
|
173
247
|
|
|
174
248
|
**The grid scrolls inside itself.** Its frame fills the box its app gives it: a definite height, or
|
|
175
249
|
a flex column (the frame is `height: 100%`, `flex: 1 1 0` and `min-height: 0`). Inside the frame the
|
|
176
|
-
rows' box holds the table, both ways, and each group's name bar and header row pin at its top
|
|
177
|
-
nothing the app pins above the grid concerns it. While the page's lab asks for the lock
|
|
250
|
+
rows' box holds the table, both ways, and each group's name bar and header row pin at its top (with
|
|
251
|
+
`oneHeader`, the one row of column names pins there and each bar under it), so nothing the app pins above the grid concerns it. While the page's lab asks for the lock
|
|
178
252
|
(`setGridLab({ boxes: 2 })`) on a touch screen, it scrolls up and down only, inside an outer box that
|
|
179
253
|
scrolls sideways only, so a flick moves the table one way, as the phone's own apps do. A box with no height gets a grid that grows
|
|
180
254
|
to its rows: the page scrolls it, and its heads don't pin. The grid's rows and frozen columns sit
|
|
@@ -184,8 +258,8 @@ inside your `Collapse`'s clip, so the clip must crop without scrolling (`overflo
|
|
|
184
258
|
**The grid's own variables are not public.** The grid sets `--vk-drag-shift` (a header cell's
|
|
185
259
|
offset while its column is dragged to a new place), `--vk-col-w-<id>` (one column's resolved
|
|
186
260
|
width, one per column), `--vk-cols` (the columns' template on its rows' box, which every row
|
|
187
|
-
reads
|
|
188
|
-
columns, the rail, a group's name and the empty message at the left while the table is scrolled
|
|
261
|
+
reads, and through which `GridTable`'s `fillWidth` has the columns share the grid's width), and
|
|
262
|
+
while the lab's lock is on `--vk-hold-x` and `--vk-sx` (the offsets that hold the frozen columns, the rail, a group's name and the empty message at the left while the table is scrolled
|
|
189
263
|
sideways) for itself. They carry the prefix because they share the global namespace;
|
|
190
264
|
an app neither sets nor reads them, and they may change in any release.
|
|
191
265
|
|
|
@@ -201,15 +275,26 @@ both fill every one.
|
|
|
201
275
|
|
|
202
276
|
`Button` · `Popover` · `Tooltip` · `Checkbox` · `Menu` · `Collapse` · `Sheet` · `AppIcon` · `Markdown`
|
|
203
277
|
|
|
204
|
-
`
|
|
278
|
+
`Button`: `ViewsButtonProps`, its children, `onClick`, `disabled`, `variant`, `size`, `type`, a class, `aria-label` and `title`, and, for the grid's own buttons when the provider's `gridButtons` is `button`, a `ref`, `tabIndex`, `aria-haspopup`, `aria-expanded`, `data-slot` and `data-open`, each forwarded to your element. A command cell's ▾ and trigger, under `gridButtons` too, and the selection chip, when the provider's `selectionBar`'s `chip` is `button`, are handed only the props named first, the chip also `data-slot`. A field row's own buttons, when the provider's `fieldRowButtons` is `button`, 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.
|
|
279
|
+
|
|
280
|
+
`Checkbox`: `ViewsCheckboxProps`. When the provider's `gridCheckboxes` is `checkbox`, 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. When `fieldRowCheckboxes` is `checkbox`, 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 the row's own 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.
|
|
281
|
+
|
|
282
|
+
`Input`, optional: a single-line text box, `ViewsInputProps`. Every editor's text box 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 nine optional slots apart from `COMPONENT_NAMES`, which lists the slots you must fill.
|
|
205
283
|
|
|
206
284
|
`Command`, optional: the command list's parts (`ViewsCommandParts`), through which the editors' lists and the grid's menus on the `popover` route draw. A list reached without one throws an error naming it. An app that hands `Picker` and sets `menus: "menu"` needs none.
|
|
207
285
|
|
|
208
|
-
`Picker`, optional: a whole pick list your app draws, `ViewsPickerProps`. Handed one, 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 `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. Left out, these editors draw from `Command`. 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. 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.
|
|
286
|
+
`Picker`, optional: a whole pick list your app draws, `ViewsPickerProps`. Handed one, 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 `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. Left out, these editors draw from `Command`. 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. 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 takes ViewKit's width and padding unless the provider's `bodyFrame` is `popover`, when it stands at your `Popover`'s own width, marked `data-vk-body="picker"`.
|
|
209
287
|
|
|
210
288
|
`Calendar`, optional: a calendar over ISO days, `ViewsCalendarProps`, which the date editor draws its month through, with its own typed line, quick days and time around it. Reached without one, it throws an error naming it. Handed `DateBody`, it is never reached.
|
|
211
289
|
|
|
212
|
-
`DateBody`, optional: a whole date body your app draws, `ViewsDateBodyProps`. Handed one, the date editor opens it in every host, handed the value on the local calendar (a day, or a day and a time), whether it holds a time, whether it may be emptied, the quick picks (`ViewsDatePick`), 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.
|
|
290
|
+
`DateBody`, optional: a whole date body your app draws, `ViewsDateBodyProps`. Handed one, the date editor opens it in every host, handed the value on the local calendar (a day, or a day and a time), 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.
|
|
291
|
+
|
|
292
|
+
`PartsBody`, optional: a whole body for a field made of parts your app draws, `ViewsPartsBodyProps`, by `kind`: `name`, `place` or `range`. Handed one, the name, place and range editors open it in the grid and in a field row, in a popover under the value 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 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. Enter is your body's. Its popover takes ViewKit's width and padding unless the provider's `bodyFrame` is `popover`, when it stands at your `Popover`'s own width, marked `data-vk-body="parts"`.
|
|
293
|
+
|
|
294
|
+
`ValuesBody`, optional: a whole body for a field holding several emails, phones, links or domains, which your app draws, `ViewsValuesBodyProps`. Handed one, the value list editor opens it in the grid and in a field row, in a popover under the values 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. Enter is your body's. Three things differ from the editor's own rows: a list the write check refuses is said once, under your body in the panel, rather than under each row; where Escape keeps, an Escape over a refused list shows the reason and a second Escape throws the edit away, where the editor's own rows hold Escape until every row reads; and focus leaving your body other than by Tab doesn't close the editor (a press outside does). Its popover takes ViewKit's width and padding unless the provider's `bodyFrame` is `popover`, when it stands at your `Popover`'s own width, marked `data-vk-body="values"`.
|
|
295
|
+
|
|
296
|
+
`TextBody`, optional: 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`. Handed one, 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), 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. 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.
|
|
297
|
+
`NumberBody`, optional: a whole body for a number, money or a percent, which your app draws, `ViewsNumberBodyProps`. Handed one, 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. 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.
|
|
213
298
|
|
|
214
299
|
The popover takes `alignOffset`, `initialFocus` (false keeps focus where it was when the popup
|
|
215
300
|
opens; the editor that then takes focus does so with `preventScroll`, so the package's own focus
|
|
@@ -234,7 +319,7 @@ words, always text; it may carry a `shortcut` hint and an `href`, and a `disable
|
|
|
234
319
|
`disabledReason`, why it can't be used, for you to show (a tooltip, a second line); a `checked` row is checkable and closes the menu like any row, unless it
|
|
235
320
|
carries `keepOpen`, a hint to leave the menu open so several can be ticked in turn; an
|
|
236
321
|
item's `children` are a group, its rows drawn in place under the item's label unless it carries `beside`, a hint to open them one level in, its row showing its label and `detail`, and
|
|
237
|
-
the group's own `onSelect`, `href` and `checked` are ignored, and a group marked `disabled` disables every row under it, at every depth: the provider hands your `Menu` those rows already `disabled`, each one that gives no reason carrying the group's `disabledReason`, so you draw each row by its own flag. Any row may carry `detail`, its current value in words, for its end. An adapter that draws none of the three keeps every row closing and every group in place, and loses nothing it needs. So an adapter needn't guess: a ticked row's `onSelect` fires on every pick, also when it is already ticked (a second pick of the ticked sort flips its direction), so an adapter that draws ticked rows as a radio value still calls it; ticked rows that close, inside a group, are one choice among several (a pick list), and ticked rows with `keepOpen` are separate ticks (checkboxes); a label is always text, so a swatch or a column's mark rides as the row's `icon` beside it. The sheet takes `label`, its title in words whenever the title is words (its accessible name, and the title of a head that takes only text), and, when the provider's `sheetActions` is `head`, `actions`: the editor panel's ✕ (`close`) and ✓ (`done`, absent where the body saves on its pick), each a `label` and an `onPress`, for your sheet's own head; with `bar`, the default, the panel draws them itself. `AppIcon` is the app's own icon component by the app's own names, for
|
|
322
|
+
the group's own `onSelect`, `href` and `checked` are ignored, and a group marked `disabled` disables every row under it, at every depth: the provider hands your `Menu` those rows already `disabled`, each one that gives no reason carrying the group's `disabledReason`, so you draw each row by its own flag. Any row may carry `detail`, its current value in words, for its end. An adapter that draws none of the three keeps every row closing and every group in place, and loses nothing it needs. So an adapter needn't guess: a ticked row's `onSelect` fires on every pick, also when it is already ticked (a second pick of the ticked sort flips its direction), so an adapter that draws ticked rows as a radio value still calls it; ticked rows that close, inside a group, are one choice among several (a pick list), and ticked rows with `keepOpen` are separate ticks (checkboxes); a label is always text, so a swatch or a column's mark rides as the row's `icon` beside it. The sheet takes `label`, its title in words whenever the title is words (its accessible name, and the title of a head that takes only text), and, when the provider's `sheetActions` is `head`, `actions`: the editor panel's ✕ (`close`) and ✓ (`done`, absent where the body saves on its pick), or a toolbar panel's ✕ alone (`close`, which closes it), each a `label` and an `onPress`, for your sheet's own head; with `bar`, the default, the panel draws them itself. `AppIcon` is the app's own icon component by the app's own names, for
|
|
238
323
|
the glyphs a host declares (a row's icon, a binding's icon, an option's icon), drawn on the first paint (rows are measured as they mount); the semantic glyphs the rendering itself
|
|
239
324
|
needs are a port, by meaning (below). `Markdown` is the app's markdown renderer, handed the stored text whole; the
|
|
240
325
|
package draws rich text through it and parses none.
|
|
@@ -263,7 +348,9 @@ first row, as your `Popover` does by default: a row's menu opened by a key start
|
|
|
263
348
|
**The sheet's head.** A sheet that draws a head of its own (a title with buttons beside it) sets the
|
|
264
349
|
provider's `sheetActions` to `head` and draws `actions.close` and, when handed, `actions.done` there,
|
|
265
350
|
with your own ✕ and ✓ glyphs; a close of your sheet's own (its ✕, a swipe) still reaches
|
|
266
|
-
`onOpenChange` and discards like `actions.close`.
|
|
351
|
+
`onOpenChange` and, for an editor, discards like `actions.close`. A toolbar panel's sheet (Options, Sort, Filter on a
|
|
352
|
+
phone) is handed only `actions.close`, which closes it, and its body draws no ✕ of its own; it is handed `label` and no
|
|
353
|
+
`title`, its own header titling it.
|
|
267
354
|
|
|
268
355
|
**`chrome: "menu"`.** It is your menu panel's surface: no inset, because the list inside carries its
|
|
269
356
|
own, and no card width: it is as wide as its list. Where your copy has only the card popover, lay your
|
|
@@ -305,11 +392,26 @@ contract doesn't name is `none`.
|
|
|
305
392
|
The pieces the rendering is built from, and the app's own pieces it cannot draw itself, typed in `src/atoms/types.ts`: `List` (the rows'
|
|
306
393
|
container: the inset a run of rows sits in, inside a panel or a command list's group), `Row` (a whole row,
|
|
307
394
|
a button or, with `interactive={false}`, a static line), `RowContent` (a row's inside, for inside a
|
|
308
|
-
command list's item, which owns the element and the highlight), `TickBox` (a paint-only tick box),
|
|
395
|
+
command list's item, which owns the element and the highlight), `TickBox` (a paint-only tick box), `Avatar` (a person's or a record's picture, `ViewsAvatarProps`: a user's, a relation's and an actor's chip draw it at `size="chip"`, and the name draws it at `size="glyph"`, sized by `--vk-glyph`, when the list's `rowIcon` hands the row's `avatar`; it is handed `label`, whose picture it is, `avatarUrl`, `kind`, the record's kind as the app names it (a relation's `entity`, `user` for a member, an actor's type), and `fallback`, the glyph the chip or the name draws without a picture; the default draws the picture, marked `data-slot="vk-avatar"`, and the fallback when there is none or it fails to load, so an app that hands none sees its chips and names as before; yours draws initials on a tone, a record in its own shape, or the fallback for a kind it doesn't dress),
|
|
309
396
|
`StatusBadge` (a pill by status slot), `StatusMarker` (an attention badge that opens its reason) and
|
|
310
|
-
`Tag` (a category chip, removable, with an optional leading glyph), `CommandMenu` (a `command` cell's verb menu, opened from the trigger the cell drew; the default is the components map's `Menu`), `RowMenu` (the rows' right-click menu, once around each section's rows' container and aimed at the row a press or a right-click came from, its props that row's: Open page, the rows the rendering builds, Delete; the default is the components map's `Menu` at the pointer, opened by a right-click or the row's ⋯ (`data-slot="vk-grid-row-more"`), wrapped in `data-slot="vk-row-menu"`; the grid's row-menu keys send a cell the same right-click, with no press before it, so a `RowMenu` of your own opens on any `contextmenu` and doesn't wait for a press; its Delete asks the `confirm` port with `views.menus.row-delete-confirm` (the browser's own confirm when you hand none), and a delete that rejects says so through the toast port's `error` with `views.menus.row-delete-failed`; a long-press on a phone opens nothing) and `RelationLink` (where a relation chip goes, around the chip the display drew; the default goes nowhere), `RelationRoles` (a link's roles, inside its chip after the record's name, on a `many` relation that declares `links`; the default draws their labels in the subtle colour after a middle dot, wrapped in `data-slot="vk-relation-roles"
|
|
397
|
+
`Tag` (a category chip, removable, with an optional leading glyph), `CommandMenu` (a `command` cell's verb menu, opened from the trigger the cell drew; the default is the components map's `Menu`), `RowMenu` (the rows' right-click menu, once around each section's rows' container and aimed at the row a press or a right-click came from, its props that row's: Open page, the rows the rendering builds, Delete; the default is the components map's `Menu` at the pointer, opened by a right-click or the row's ⋯ (`data-slot="vk-grid-row-more"`), wrapped in `data-slot="vk-row-menu"`; the grid's row-menu keys send a cell the same right-click, with no press before it, so a `RowMenu` of your own opens on any `contextmenu` and doesn't wait for a press; its Delete asks the `confirm` port with `views.menus.row-delete-confirm` (the browser's own confirm when you hand none), and a delete that rejects says so through the toast port's `error` with `views.menus.row-delete-failed`; a long-press on a phone opens nothing) and `RelationLink` (where a relation chip goes, around the chip the display drew; the default goes nowhere), `RelationRoles` (a link's roles, inside its chip after the record's name, on a `many` relation that declares `links`; the default draws their labels in the subtle colour after a middle dot, wrapped in `data-slot="vk-relation-roles"`, and in a narrow cell cuts them, down to nothing, before the name loses a letter), `Loading` (a wait: the list reloading, or more rows arriving; the default is a plain ring) `LoadMore` (how a list asks for its next page; the default watches a sentinel past the last row) and `PlatformMark` (a link's platform, drawn before it, read from its address with the conventions' platforms; the default draws nothing, so a link looks plain, and the package ships no brand art, so an app that wants marks draws its own by the platform's key into `data-slot="vk-platform"`), and the rows the panels (`/panels`) draw with: `ChoiceRow` (picks a value: its label, a second line, a right-hand meta, the check when chosen), `CheckRow` (toggles one of many, a tick box on the left), `RadioRow` (picks one of a set, its mark a check or, with `mark="box"`, a tick box; a disabled row's reason in your `Tooltip`), `DirectionButton` (a sort's direction arrow, named `views.panels.direction`), `MenuRow` (a drill-in row: a glyph, the section, where it stands, a chevron; a disabled row's reason in your `Tooltip`), `ToggleRow` (a boolean flipped in place, with a way back named `views.panels.toggle-reset`; a disabled row's reason in your `Tooltip`) and `PanelSearch` (a panel's text box, a filled well with a magnifier), and `Pill` (one option of a row of pills, the views row's and any tab row's: `active`, a `solid` or `plain` variant, a `default` or `sm` size, a leading glyph, the app's own active and hover classes for a status colour; with `menuOpen` it says it opens a menu, `aria-haspopup="menu"` and `aria-expanded`), and `ToolbarButton` (a toolbar's button, the one every toolbar part draws with: its glyph, its name, its word for a dress that shows words, a count in its corner, which becomes a ✕ badge that clears what it counts when handed `onClear`, a dot that says something is applied with no number, `open`, `changed`, `edge` for the row's outermost button, `disabled`, a `md` or `sm` size, and `popup` when it opens one). Each ships as a default, exported as `DEFAULT_VIEWS_ATOMS`, drawn
|
|
311
398
|
from the app's colours; an app swaps any of them through the provider's `atoms`, and the rest
|
|
312
|
-
stay the defaults.
|
|
399
|
+
stay the defaults. `SelectionSheet` is the phone's sheet of a selection's verbs, opened by the
|
|
400
|
+
selection bar's Actions: the default is the components map's `Sheet` holding the atoms' rows, a group's
|
|
401
|
+
or an options verb's rows opening in place under it and the delete last in words, a disabled verb's
|
|
402
|
+
`disabledReason` as its row's second line (none while `busy`); picking a row closes the sheet, then runs it. An app swaps in its own action sheet.
|
|
403
|
+
`RangeCalendar` is the filter panel's month: a date filter's day or its two ends, a date range and a custom
|
|
404
|
+
time scope, in ISO days, with the end being picked (`armed`), the days a press can't reach (`limit`), a
|
|
405
|
+
relative rule's window painted in place of the selection (`window`) and a footer. The default is the
|
|
406
|
+
components map's one-day `Calendar` on the end being picked, wrapped in `data-slot="vk-range-calendar"`, with
|
|
407
|
+
each press turned into the selection the editor reads; it paints no range. An app hands its own to paint one.
|
|
408
|
+
|
|
409
|
+
`StatusBadge` is handed `place` (`ViewsStatusPlace`) wherever a field's option is drawn: a cell, the select editor's
|
|
410
|
+
rows and the selection bar's options verb. It is where the status stands among the field's steps: `options`, the
|
|
411
|
+
field's active options in their order (archived ones out, the same array for every cell of a field; on the bar,
|
|
412
|
+
the verb's own options), and `index`, this one's place in them. A value that is no step (a stray value, an
|
|
413
|
+
archived one, the None row) and a badge that is no option (a boolean's marker, `StatusMarker`) are handed none.
|
|
414
|
+
The default draws no differently; yours reads it to show how far along a step is.
|
|
313
415
|
|
|
314
416
|
A row's `size` is `compact` (13px: a command list's rows, a list of values) or `regular` (the app's
|
|
315
417
|
menu size, the default). Its label truncates when it is text and is laid out in a row when it is a
|
|
@@ -323,10 +425,45 @@ since the flyout is the components map's `Popover`, a dialog of plain rows; and
|
|
|
323
425
|
and `open` while that flyout is up (`data-open`, the pressed ground).
|
|
324
426
|
|
|
325
427
|
The defaults mark themselves with `data-slot="vk-list"`, `data-slot="vk-row"`, `data-slot="vk-row-content"`,
|
|
326
|
-
`data-slot="vk-tick"`, `data-slot="vk-status"`, `data-slot="vk-marker"`, `data-slot="vk-tag"`, `data-slot="vk-command-menu"`, `data-slot="vk-relation-link"`, `data-slot="vk-relation-roles"`, `data-slot="vk-loading"`, `data-slot="vk-load-more"`, `data-slot="vk-platform"` and `data-slot="vk-row-menu"`, and
|
|
327
|
-
with the states `data-chosen`, `data-disabled`, `data-muted`, `data-checked`, `data-open` (flags),
|
|
428
|
+
`data-slot="vk-tick"`, `data-slot="vk-avatar"`, `data-slot="vk-status"`, `data-slot="vk-marker"`, `data-slot="vk-tag"`, `data-slot="vk-command-menu"`, `data-slot="vk-relation-link"`, `data-slot="vk-relation-roles"`, `data-slot="vk-loading"`, `data-slot="vk-load-more"`, `data-slot="vk-platform"`, `data-slot="vk-row-menu"` and `data-slot="vk-selection-sheet"`, the panels' rows with `data-slot="vk-choice-row"`, `data-slot="vk-check-row"`, `data-slot="vk-radio-row"`, `data-slot="vk-direction"`, `data-slot="vk-menu-row"`, `data-slot="vk-toggle-row"` and `data-slot="vk-panel-search"`, the pill with `data-slot="vk-pill"` (and `data-active="true"` on the current one), the filter panel's month with `data-slot="vk-range-calendar"`, the toolbar's button with `data-slot="vk-toolbar-button"` (its hidden word `data-slot="vk-toolbar-word"`, its count `data-slot="vk-toolbar-count"`, its dot `data-slot="vk-toolbar-dot"`), and
|
|
429
|
+
with the states `data-chosen`, `data-disabled`, `data-muted`, `data-checked`, `data-open`, `data-changed`, `data-edge` (flags),
|
|
328
430
|
`data-status` (the slot's name) and `data-platform` (a link's platform key). A swapped atom marks itself as its app does.
|
|
329
431
|
|
|
432
|
+
A cell of several values marks its count, the "+N" after its shown values, `data-slot="vk-cell-more"`: a button that
|
|
433
|
+
opens the whole list, with `data-open` while it is open, or plain text where the host owns the click. What it draws
|
|
434
|
+
inside is the `CellMore` atom (`ViewsCellMoreProps`: the `count`, and `inert` when the host owns the click). Only
|
|
435
|
+
ViewKit's own `CellMore` keeps its frame on that element, as on 0.5.0; with any other, wrapping `DefaultCellMore`
|
|
436
|
+
included, the element is bare, so the app's chip stands there alone.
|
|
437
|
+
|
|
438
|
+
Rich text folded in a field row marks its Show more and Show less `data-slot="vk-show-more"`; drawn only there, it is
|
|
439
|
+
your `Button` when the provider's `fieldRowButtons` is `button`. The relation chip a host's `onOpenRelation` makes
|
|
440
|
+
pressable carries `data-slot="vk-relation-link"`, as the default `RelationLink` does, and stays ViewKit's own, an app
|
|
441
|
+
dressing it by its slot: it reads as text, the same part whichever verb it has, so one rule reaches it in every list.
|
|
442
|
+
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
|
|
443
|
+
quote, the disclosure marked by its `[data-field-note]` attribute, and the retry line under a write that failed, `data-slot="vk-field-retry"`;
|
|
444
|
+
an app dresses them by those names. The panels' check and radio rows (`CheckRow`, and `RadioRow` with `mark="box"`)
|
|
445
|
+
draw the `TickBox` atom, a picture inside a row that is itself the control, so an app hands the picture of its box
|
|
446
|
+
there, never its `Checkbox`, which can't stand inside the row's button. The status
|
|
447
|
+
marker, a tag's ✕ and the "+N" are drawn inside the `StatusMarker`, `Tag` and `CellMore` atoms, which an app swaps.
|
|
448
|
+
|
|
449
|
+
The views row marks the pieces an app may dress with its pills, whichever `Pill` it hands in:
|
|
450
|
+
`data-slot="vk-views-row"` (the row of plain pills at their own size, whose gap an app may open),
|
|
451
|
+
`data-slot="vk-views-more"` (the "+N" chip that folds the views that don't fit),
|
|
452
|
+
`data-slot="vk-views-chip"` (the picker's chip, the active view with a chevron) and
|
|
453
|
+
`data-slot="vk-views-add"` (the + that creates a view). The chips carry `data-state="open"` while their
|
|
454
|
+
list is open; every glyph in them is drawn at `h-3.5 w-3.5`.
|
|
455
|
+
|
|
456
|
+
The toolbar (`/panels/react`'s `Toolbar`) marks its frame and its parts, whichever `ToolbarButton` it draws with:
|
|
457
|
+
`data-slot="vk-toolbar"` (the frame, its form in `data-form`: `row`, `narrow` or `phone`),
|
|
458
|
+
`data-slot="vk-toolbar-line"` (one line, its kind in `data-line`: `main`, `search`, `views` or `below`),
|
|
459
|
+
`data-slot="vk-toolbar-cluster"` (the row's end controls, floating over the views on a fade of `--vk-ground`),
|
|
460
|
+
`data-slot="vk-toolbar-search"` (Search, with `data-expanded` while its field shows), `data-slot="vk-toolbar-search-field"`
|
|
461
|
+
(the field, your `Input`), `data-slot="vk-toolbar-search-clear"` (its ✕), `data-slot="vk-toolbar-search-spinner"` (the ring that stands in for its glass while `searching`), `data-slot="vk-toolbar-new"` (New's place),
|
|
462
|
+
`data-slot="vk-toolbar-options"`, `data-slot="vk-toolbar-sort"` and `data-slot="vk-toolbar-filter"` (the panel parts'
|
|
463
|
+
places), each one's popover handed `data-slot="vk-toolbar-options-panel"`, `data-slot="vk-toolbar-sort-panel"` or
|
|
464
|
+
`data-slot="vk-toolbar-filter-panel"` through your `Popover`'s `panelData`; on a phone, where the panel opens in your
|
|
465
|
+
`Sheet`, the same slot marks the panel's box inside it.
|
|
466
|
+
|
|
330
467
|
Lists that scroll wear the class `scrollbar-overlay`, which an app may define (to show the OS
|
|
331
468
|
overlay scrollbar, say); without it the class does nothing.
|
|
332
469
|
|
|
@@ -364,6 +501,18 @@ The grid's menus: `moveLeft` `moveRight` `group` `clearSort` `sortRowsUp` `sortR
|
|
|
364
501
|
`sortRowsDown` are a menu's verbs, sorting the rows by a column; `sortAsc` and `sortDesc` are the mark a
|
|
365
502
|
sorted header wears.
|
|
366
503
|
|
|
504
|
+
The panels: `search` (a panel's text box, a magnifier) and `reset` (a setting's way back to the reader's default).
|
|
505
|
+
`options` (a layout setting's default glyph) and `person` (a For you setting's default glyph).
|
|
506
|
+
|
|
507
|
+
The views row: `moreVertical` (a picker row's `⋮`, the active view's verbs; `more` is the horizontal one).
|
|
508
|
+
|
|
509
|
+
The Customize panel: its root rows' `layout`, `columns` and `sort` (Filter and Group wear `filter` and `group`),
|
|
510
|
+
its header's `back` arrow, its actions' `copyLink`, `export` and `share`, and `loading`, the export's spinner,
|
|
511
|
+
a glyph that turns by itself (your app's spinner); the panel names it a status.
|
|
512
|
+
|
|
513
|
+
The filter panel: `filter` (a filter row with no glyph of its own), and a filter kind's glyph, `filterStatus`,
|
|
514
|
+
`filterCategory` and `filterMetric`.
|
|
515
|
+
|
|
367
516
|
An app maps its own icon names onto these in its adapter; a glyph the rendering needs that is not
|
|
368
517
|
here is added here first, with a changelog line.
|
|
369
518
|
|
|
@@ -372,7 +521,7 @@ here is added here first, with a changelog line.
|
|
|
372
521
|
The package words only its own strings; a string `@viewkitjs/fields` already keys stays a fields
|
|
373
522
|
message, read from the conventions the provider carries. The package's are a closed list of
|
|
374
523
|
`{ key, values }` messages under `views.grid.*`,
|
|
375
|
-
`views.editors.*`, `views.menus.*` and `views.
|
|
524
|
+
`views.editors.*`, `views.menus.*`, `views.display.*`, `views.selection.*` and `views.panels.*`: `views.editors.tag-remove` (`{ label }`),
|
|
376
525
|
`views.editors.marker-resolve`, `views.editors.marker-no-reason`, `views.editors.range-low` and
|
|
377
526
|
`views.editors.range-high` (a range editor's two boxes, "From" and "To"), and `views.editors.name-given`,
|
|
378
527
|
`views.editors.name-family` and `views.editors.name-full` (a name editor's three boxes); `views.editors.values-add` ("Add"), `views.editors.values-label` ("Label"), `views.editors.values-main` ("Main", the main value's mark), `views.editors.values-make-main` (`{ value }`, "Make {value} the main one") and `views.editors.values-remove` (`{ value }`, "Remove {value}") (a value list editor's rows); `views.editors.discard` ("Discard", the editor sheet's ✕) and `views.editors.save` ("Save", its ✓); `views.editors.open-email`, `views.editors.open-phone` and `views.editors.open-link` (`{ value }`, "Email {value}", "Call {value}", "Open {value}", the open action beside a stored value in a phone's sheet); the place editor's: `views.editors.place-country` ("Country"), `views.editors.place-country-search` ("Search countries"), `views.editors.place-change-country` ("Change country"), `views.editors.place-region-search` ("Search"), `views.editors.place-line1` ("Address line 1"), `views.editors.place-line2` ("Address line 2"), `views.editors.place-required` (`{ label }`, "{label} *", a part its country asks for), the region's words `views.editors.place-region-area`, `views.editors.place-region-county`, `views.editors.place-region-department`, `views.editors.place-region-district`, `views.editors.place-region-do-si`, `views.editors.place-region-emirate`, `views.editors.place-region-island`, `views.editors.place-region-oblast`, `views.editors.place-region-parish`, `views.editors.place-region-prefecture`, `views.editors.place-region-province` and `views.editors.place-region-state`, the city's `views.editors.place-city-city`, `views.editors.place-city-district`, `views.editors.place-city-post-town` and `views.editors.place-city-suburb`, and the postal code's `views.editors.place-postal-eircode`, `views.editors.place-postal-pin`, `views.editors.place-postal-postal` and `views.editors.place-postal-zip` (each its word in English: "County", "Do/Si", "Post town", "PIN code", "ZIP code"); `placeWordKey(kind, word)` gives the key for a word `placeFormat` names; `views.editors.place-region` ("Region") beside the place editor's `views.editors.place-country`,
|
|
@@ -388,7 +537,8 @@ row), `views.menus.date-style` (`{ style }`: `"short"`, `"long"`, `"numeric"` or
|
|
|
388
537
|
`"bar"`, `"ring"`), `views.menus.colour` (`{ colour }`, one of the eight option colours: "Gray" … "Teal") and
|
|
389
538
|
`views.menus.colours-reset` ("Reset colors"); a group's menu: `views.menus.group-options` (its button's label, and its menu's name on the `menu` route),
|
|
390
539
|
`views.menus.group-sort` ("Sort rows"), `views.menus.search`, `views.menus.group-show` ("Show"), `views.menus.group-count`
|
|
391
|
-
("Count")
|
|
540
|
+
("Count"), `views.menus.group-hide` ("Hide group") and `views.menus.group-select` (`{ selected }`: "Select all in group", and
|
|
541
|
+
"Deselect all in group" when `"true"`, every row of the group picked); "+ Add column": `views.grid.add-column` (its header
|
|
392
542
|
cell, and its menu's name on the `menu` route), `views.menus.add-column-search` ("Search columns…"), `views.menus.add-column-no-match` (`{ query }`) and `views.menus.add-column-all-shown`; a row's menu:
|
|
393
543
|
`views.menus.copy`, `views.menus.cut`, `views.menus.paste`, `views.menus.clear` and `views.menus.edit` (a cell's lane),
|
|
394
544
|
and the plain row menu's `views.menus.row-open` ("Open page"), `views.menus.row-select` (`{ selected }`, `"true"` is
|
|
@@ -399,8 +549,16 @@ delete the host ran rejects: "Failed to delete the row"), and `views.menus.row-m
|
|
|
399
549
|
and `views.menus.commands-unnamed` ("Actions", when its opener hands no field); `views.menus.figure-menu`
|
|
400
550
|
(`{ field }`: "Calculate Amount", the figure picker's name on the `menu` route) and `views.menus.column-menu`
|
|
401
551
|
(`{ field }`: "Options for Amount", a column menu's name on the `menu` route);
|
|
552
|
+
the reasons a disabled row the grid builds hands your `Menu` as its `disabledReason`, where no refusal below already says it:
|
|
553
|
+
`views.menus.range-not-clearable` (a selection's Cut and Clear: "Nothing in this selection can be emptied"),
|
|
554
|
+
`views.menus.add-column-all-shown-reason` ("+ Add column"'s all-shown row: "No hidden column to add") and
|
|
555
|
+
`views.menus.loading` (a field row's verbs while its record loads: "Wait for current data before editing");
|
|
402
556
|
the grid's own: `views.grid.figure` (`{ kind }`, a footer figure's name, `"none"` included: "None", "Sum", "Avg", "Min",
|
|
403
|
-
"Max", "Count", "Filled", "Unique", "Ratio"), `views.grid.figure-pick` ("Calculate", an empty footer cell),
|
|
557
|
+
"Max", "Count", "Filled", "Unique", "Ratio"), `views.grid.figure-pick` ("Calculate", the offer `vk-grid-figure-pick` in an empty footer cell),
|
|
558
|
+
the pager's `views.grid.pager` ("Pages", its name), `views.grid.pager-range` (`{ from, to, total, exact }`, `exact` `"true"` or `"false"`: "26–50 of 213",
|
|
559
|
+
"1–25 of 1,000+" under a capped count, "No rows"), `views.grid.pager-size` (`{ size }`: "25 per page"),
|
|
560
|
+
`views.grid.pager-sizes` ("Rows per page", the size menu's name), `views.grid.pager-previous` ("Previous") and
|
|
561
|
+
`views.grid.pager-next` ("Next"),
|
|
404
562
|
`views.grid.loading` ("Loading rows"), the labels `views.grid.select-row`, `views.grid.select-group`,
|
|
405
563
|
`views.grid.select-all`, `views.grid.row-menu`, `views.grid.group-expand`, `views.grid.group-collapse`,
|
|
406
564
|
`views.grid.change-value`, `views.grid.value` and `views.grid.edit-value` (a long text's box, read-only or not),
|
|
@@ -433,6 +591,91 @@ a batch, once, with the first refusal's words when it has any); and the warnings
|
|
|
433
591
|
(the title on a phone stored as typed), and `views.display.converted-from` (`{ code }`, "Converted from USD", the
|
|
434
592
|
title on a money figure shown in another currency than its record's) and `views.display.as-shown` ("as shown",
|
|
435
593
|
after that figure under a money editor).
|
|
594
|
+
And the panels' words: the "For you" heading, `views.panels.for-you`; the Group
|
|
595
|
+
panel's orders, `views.panels.group-order-most` ("Most first"), `views.panels.group-order-fewest`,
|
|
596
|
+
`views.panels.group-order-newest`, `views.panels.group-order-oldest`, `views.panels.group-order-alphabetical`,
|
|
597
|
+
`views.panels.group-order-reverse-alphabetical`, `views.panels.group-order-reversed` (`{ label }`, "Stage, reversed"),
|
|
598
|
+
`views.panels.group-order-default`, `views.panels.group-order-count`, `views.panels.group-order-name` and
|
|
599
|
+
`views.panels.group-order-manual`; a list's joins, `views.panels.join-or` (" or ") and `views.panels.join-and`
|
|
600
|
+
(" and "), which hand the keys below a list already joined, since a value is text or a number; a relation filter's:
|
|
601
|
+
`views.panels.quantifier` (`{ quantifier }`: `"any"`,
|
|
602
|
+
`"none"` or `"every"`), `views.panels.relation-condition-options` (`{ field, options }`: "status is Active or
|
|
603
|
+
Paused"), `views.panels.relation-condition` (`{ field, value }`), `views.panels.relation-sentence`
|
|
604
|
+
(`{ rule, subject, one, many, conditions }`, the whole sentence: "Clients with at least one campaign where status is Active.", its
|
|
605
|
+
`rule` `"all"`, `"any"`, `"none"`, `"every"` or `"every-unmatched"`), `views.panels.relation-value-one`
|
|
606
|
+
(`{ quantifier, field, value }`, "Any · Status: Active") and `views.panels.relation-value-many`
|
|
607
|
+
(`{ quantifier, count }`); a row's value: `views.panels.filter-unavailable` ("Saved filter unavailable"), `views.panels.filter-not-offered` (a filter row that can't be opened, its reason: "This column can't be filtered"), `views.panels.filter-all`
|
|
608
|
+
("All"), `views.panels.filter-all-of` (`{ field }`, "All owners"), `views.panels.filter-selected` (`{ count }`),
|
|
609
|
+
`views.panels.hidden-columns` ("Hidden columns", the heading a hidden column's Filter row sits under), `views.panels.related-records` ("Related records", the relation rows' heading), a yes/no column's choices
|
|
610
|
+
`views.panels.boolean-checked` ("Checked"), `views.panels.boolean-unchecked` ("Unchecked") and `views.panels.boolean-not`
|
|
611
|
+
(`{ label }`, "Not won"), and a relation's Where field page title `views.panels.where-field-title` (`{ relation, field }`,
|
|
612
|
+
"Campaigns · Status"),
|
|
613
|
+
`views.panels.date-range-all` ("All time"), `views.panels.date-range-between` (`{ from, to }`, "Jan 1 — Jan 9"),
|
|
614
|
+
`views.panels.date-range-from`, `views.panels.date-range-until`, `views.panels.time-scope-custom` ("Custom"),
|
|
615
|
+
`views.panels.sort-value` (`{ label, dir }`, "Name desc"), `views.panels.sort-none` ("None", a list with no
|
|
616
|
+
sort), `views.panels.group-none` ("None") and
|
|
617
|
+
`views.panels.filter-count` (`{ count }`: "None", "1 filter", "2 filters"); and the rows':
|
|
618
|
+
`views.panels.direction` (`{ dir }`, "Direction: ascending"), `views.panels.toggle-reset` (`{ label }`, "Reset
|
|
619
|
+
Wrap"), `views.panels.toggle-reset-hint` ("Back to your default") and `views.panels.search-clear` ("Clear"). The
|
|
620
|
+
panels' label functions take the resolver last; each defaults to `resolveViewsMessage`.
|
|
621
|
+
The views row's words: `views.panels.view-private` ("Only you", a private view's lock),
|
|
622
|
+
`views.panels.view-reorder` (`{ label }`, "Reorder Board", a pill's grip), `views.panels.view-count`
|
|
623
|
+
(`{ label, count }`, "Board · 12"), `views.panels.views-more` (`{ count }`, "3 more views", the "+N" chip),
|
|
624
|
+
`views.panels.views-more-list` ("More views", its list), `views.panels.view-change` ("Change view", the
|
|
625
|
+
picker's chip), `views.panels.view-fallback` ("View", the chip with no active view),
|
|
626
|
+
`views.panels.views-search` ("Search views…"), `views.panels.views-list` ("Views", the picker's list),
|
|
627
|
+
`views.panels.views-shared` ("Shared") and `views.panels.views-personal` ("Personal"), its two headings,
|
|
628
|
+
`views.panels.views-none` ("No view matches."), `views.panels.view-create` ("New view", the +),
|
|
629
|
+
`views.panels.view-create-row` (`{ label }`, "New view…", the picker's last row) and
|
|
630
|
+
`views.panels.view-menu` ("View menu", a picker row's `⋮`).
|
|
631
|
+
The toolbar's words: `views.panels.show-counts` ("Show counts", the toolbar's own toggle over the views' counts),
|
|
632
|
+
`views.panels.toolbar-new` ("New", the New button's name and word), `views.panels.toolbar-options` ("Customize",
|
|
633
|
+
the Options button's name and word), `views.panels.edit-view` ("Edit view…", the row the ready toolbar puts at the
|
|
634
|
+
head of the active view's menu) and `views.panels.toolbar-clear` ("Clear all",
|
|
635
|
+
a `ToolbarButton`'s ✕ badge, which clears what it counts); its Search button and field take `views.panels.search`,
|
|
636
|
+
its ✕ `views.panels.search-clear`, and its spinner `views.panels.searching` ("Searching").
|
|
637
|
+
The Sort and Group panels' words: `views.panels.search` ("Search", a long list's search box),
|
|
638
|
+
`views.panels.group-by` ("Group by"), `views.panels.sort` ("Sort"), `views.panels.date-by` ("Date by"),
|
|
639
|
+
`views.panels.hide-empty-groups` ("Hide empty groups"), `views.panels.groups` ("Groups", the heading over the
|
|
640
|
+
group order), `views.panels.groups-hide-all` ("Hide all"), `views.panels.groups-show-all` ("Show all"),
|
|
641
|
+
`views.panels.group-remove` ("Remove grouping") and `views.panels.group-empty` ("—", the empty group's name);
|
|
642
|
+
a dragging list's rows: `views.panels.move`, `views.panels.show` and `views.panels.hide` (`{ label }`, "Move
|
|
643
|
+
Status", "Show Status", "Hide Status"); the Columns list and one column's settings:
|
|
644
|
+
`views.panels.columns-reset` ("Reset columns"), `views.panels.column-visible` ("Visible"), the reasons a disabled Visible switch or eye gives, `views.panels.column-always-shown` ("This column always shows") and `views.panels.column-last-shown` ("One column must stay shown"),
|
|
645
|
+
`views.panels.new-line-first` ("The first field already starts the card"), `views.panels.new-line-on`
|
|
646
|
+
(`{ label }`, "Owner starts a new line"), `views.panels.new-line-start` (`{ label }`, "Start a new line at
|
|
647
|
+
Owner") and `views.panels.new-line-hidden` (a hidden field's new-line reason: "A hidden field isn't on the card"); the Layout panel's: `views.panels.layout-options` ("Options"), `views.panels.layout-density`
|
|
648
|
+
("Density") and `views.panels.personal-reset` ("Use what the view says").
|
|
649
|
+
The filter panel's own words (VK-392): `views.panels.filter-placeholder` (`{ field }`, "Filter by name…"), the
|
|
650
|
+
bounds' `views.panels.bound-value` ("Value"), `views.panels.bound-from` ("From") and `views.panels.bound-to`
|
|
651
|
+
("To"); a relation's `views.panels.relation-choice` (`{ quantifier, one }`: "Any campaign", "No campaign",
|
|
652
|
+
"Every campaign"), `views.panels.relation-every-needs-where` (`{ one }`, "Pick a campaign field under Where
|
|
653
|
+
first") and `views.panels.where` ("Where"); `views.panels.filter-clear-saved` ("Clear saved filter"); `views.panels.filter-no-options` ("Nothing to pick.", a filter with no options); a toggle's
|
|
654
|
+
`views.panels.toggle-on` ("On") and `views.panels.toggle-off` ("Off"); `views.panels.date-range-clear` ("Clear"),
|
|
655
|
+
`views.panels.date-range-label` ("Date Range") and `views.panels.time-scope-label` ("Time Range"); and the date's
|
|
656
|
+
`views.panels.date-start` ("Start date"), `views.panels.date-end` ("End date"), `views.panels.date-placeholder`
|
|
657
|
+
("dd/mm/yyyy"), `views.panels.date-relative-note` ("Filter will update with the current date"), and its menus'
|
|
658
|
+
names, `views.panels.date-operator` ("Date condition"), `views.panels.date-direction` ("Direction") and
|
|
659
|
+
`views.panels.date-unit` ("Unit"). The operators' own words are `@viewkitjs/fields`' English.
|
|
660
|
+
The Customize panel's words (VK-395): its title, `views.panels.customize-title` ("Customize view"); its header's
|
|
661
|
+
`views.panels.back` ("Back"), `views.panels.close` ("Close") and `views.panels.clear-all` ("Clear all"); its root
|
|
662
|
+
rows' and pages' names where the list names none, `views.panels.filter` ("Filter"), `views.panels.layout`
|
|
663
|
+
("Layout"), `views.panels.columns` ("Columns"), `views.panels.column` ("Column") and `views.panels.group`
|
|
664
|
+
("Group"), with `views.panels.sort`, `views.panels.group-by`, `views.panels.date-by`,
|
|
665
|
+
`views.panels.time-scope-label` and `views.panels.date-range-label` above, and the Columns row's value,
|
|
666
|
+
`views.panels.columns-shown` (`{ count }`, "3 shown"); its footer on a shared view, `views.panels.view-publish`
|
|
667
|
+
("Set default for everyone"), `views.panels.view-reset` ("Reset") and `views.panels.view-stale` ("Everyone's view
|
|
668
|
+
changed since you started."); and its actions, `views.panels.copy-link` ("Copy link to view"),
|
|
669
|
+
`views.panels.export-csv` ("Export CSV"), `views.panels.share` ("Share"), `views.panels.coming-soon` ("Coming
|
|
670
|
+
soon", a parked action's hint) and `views.panels.loading` ("Loading", the export's spinner).
|
|
671
|
+
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 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").
|
|
672
|
+
The selection bar's words are under `views.selection.*`: `views.selection.count` (`{ count }`, "3 selected",
|
|
673
|
+
the phone sheet's title), `views.selection.selected` (the word after the count the bar draws),
|
|
674
|
+
`views.selection.deselect-all` (the count chip), `views.selection.clear` (the phone's ✕),
|
|
675
|
+
`views.selection.delete` (the trash's default name), `views.selection.more` and
|
|
676
|
+
`views.selection.more-label` (More, and its accessible name), `views.selection.actions` (the phone's
|
|
677
|
+
Actions), `views.selection.sheet-label` (the sheet's accessible name) and `views.selection.escape`
|
|
678
|
+
(the key cap in the chip's tooltip).
|
|
436
679
|
A span behind now is fields' own `time.ago`. The provider's `messages` resolves them; it defaults to the
|
|
437
680
|
package's English, `resolveViewsMessage`; an app's resolver that words only some keys calls
|
|
438
681
|
`resolveViewsMessage` for the rest, since the provider does not fall back for it. A new key is a
|
|
@@ -479,7 +722,7 @@ A field whose changes are transitions with rules of their own (a lost deal needs
|
|
|
479
722
|
|
|
480
723
|
## The doors
|
|
481
724
|
|
|
482
|
-
Twenty-
|
|
725
|
+
Twenty-three doors in this version, and nothing else is importable but `./package.json`; the panels' two (`/panels` and `/panels/react`) are described last. What each holds is summarised here; each door's reference page names every export, one line each, starting at [`reference/views.md`](reference/views.md).
|
|
483
726
|
|
|
484
727
|
`@viewkitjs/views`, no React at runtime, holds two things. The rendering contract, every name listed:
|
|
485
728
|
the constants `VK_PREFIX`, `GRID_SLOTS`, `GRID_STATES`, `VK_TOKENS`, `VK_COLOURS`,
|
|
@@ -506,12 +749,12 @@ public; nothing else at the root door is.
|
|
|
506
749
|
`NOOP_PORTS`; the provider's types `ViewsProviderProps` and `ViewsContextValue`; the adapter's types
|
|
507
750
|
`ViewsComponents`, `ViewsResolvedComponents` (the map as `useViews()` hands it on, `Input`, `Command` and `Calendar` always there), `ViewsPorts`, `ViewsIcons` and `ViewsIconProps`; the components' props
|
|
508
751
|
`ViewsButtonProps`, `ViewsPopoverProps`, `ViewsTooltipProps`, `ViewsCheckboxProps`, `ViewsMenuProps`,
|
|
509
|
-
`ViewsMenuItem`, `ViewsCommandParts`, `ViewsPickerProps`, `ViewsPickerItem`, `ViewsPickerAction`, `ViewsCalendarProps`, `ViewsDateBodyProps`, `ViewsDatePick`, `ViewsCollapseProps`,
|
|
752
|
+
`ViewsMenuItem`, `ViewsCommandParts`, `ViewsPickerProps`, `ViewsPickerItem`, `ViewsPickerAction`, `ViewsCalendarProps`, `ViewsDateBodyProps`, `ViewsDatePick`, `ViewsDatePicks`, `ViewsPartsBodyProps`, `ViewsPlacePart`, `ViewsPlaceParts`, `ViewsValuesBodyProps`, `ViewsValueLine`, `ViewsTextBodyProps`, `ViewsNumberBodyProps`, `ViewsCollapseProps`,
|
|
510
753
|
`ViewsSheetProps` and `ViewsInputProps`, with their shared shapes `ViewsAnchor`, `ViewsSide`, `ViewsAlign`,
|
|
511
754
|
`ViewsCloseReason` and `ViewsOpenChange`; the ports' types `ViewsToastPort`, `ViewsHapticsPort`,
|
|
512
755
|
`ViewsClipboardPort`, `ViewsPrefsPort`, `ViewsConfirmPort`, `ViewsConfirmRequest` and `ViewsResolvedPorts` (the
|
|
513
756
|
ports `useViews()` hands on, `confirm` always there); the atoms' `DEFAULT_VIEWS_ATOMS` and types `ViewsAtoms`,
|
|
514
|
-
`ViewsListProps`, `ViewsRowProps`, `ViewsRowContentProps`, `ViewsTickBoxProps`, `ViewsStatusBadgeProps`,
|
|
757
|
+
`ViewsListProps`, `ViewsRowProps`, `ViewsRowContentProps`, `ViewsTickBoxProps`, `ViewsAvatarProps`, `ViewsStatusBadgeProps`,
|
|
515
758
|
`ViewsStatusMarkerProps`, `ViewsTagProps`, `ViewsCommandMenuProps`, `ViewsRowMenuProps`, `ViewsRowMenuItem`, `ViewsRelationLinkProps`, `ViewsRelationRolesProps`, `ViewsLoadingProps`, `ViewsLoadMoreProps` and `ViewsPlatformMarkProps`; and, re-exported from the root door, `ComponentName`,
|
|
516
759
|
`PortName`, `ViewsIconName`, `ViewsMessage` and `ViewsMessageResolver`. The provider takes an
|
|
517
760
|
optional `presentation`, `(defaults: FieldPresentation) => FieldPresentation`: how the app's numbers,
|
|
@@ -519,7 +762,7 @@ dates and durations read — given the package's defaults (in the conventions' l
|
|
|
519
762
|
app's. It is called where a value is drawn, so the app's provider imports none of the display.
|
|
520
763
|
It takes an optional `escape` (`ViewsEscapeRules`, `{ [type]: EditEscape }`, `EditEscape` being `"cancel"` or `"keep"`,
|
|
521
764
|
both types from `./react`): what Escape does in an editor of each field type, on a desktop. `keep` keeps what was
|
|
522
|
-
typed and closes, as a press outside does, and a value
|
|
765
|
+
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
|
|
523
766
|
out throws the edit away, the default. On a phone every way out of the sheet throws the edit away. An editor that
|
|
524
767
|
commits only on a pick (a select, a status, a single relation, a user) throws it away on Escape whatever the rule.
|
|
525
768
|
And an optional `sayRefusals` (default false): the grid says why the app refused an edit it sent, through the toast
|
|
@@ -530,6 +773,37 @@ option's colour a group beside it with its current choice as `detail`, and a gro
|
|
|
530
773
|
beside it with no search field, its figure toggles ticks that keep the menu open, and Hide, and the grid's own "+ Add
|
|
531
774
|
column" each hidden column a row and each field with parts a group beside it with its count as `detail`, with no
|
|
532
775
|
search field, on a phone too. The row menu and a command cell's menu always go through your `Menu`.
|
|
776
|
+
And an optional `gridButtons` (`ViewsGridButtons`, default `own`): who draws the buttons the grid draws itself, a
|
|
777
|
+
group's fold and ⋯, "+ Add column", a row's ⋯, the name's actions (the pencil and the app's `rowActions`), an action
|
|
778
|
+
column's buttons, a pick-list cell's ▾, and a command cell's ▾ and its trigger around a value (`ghost`, `icon` beside a
|
|
779
|
+
relation, user, link, email, phone or domain, `sm` around any other value, which keeps its line and the cell's own type
|
|
780
|
+
through `[font:inherit]`; these two are handed only `type`, `variant`, `size`, `className` and the column's name as
|
|
781
|
+
`aria-label`, and stay Tab stops as on 0.5.0). `own` draws ViewKit's own, as on 0.5.0; `button` draws your `Button`,
|
|
782
|
+
`variant` `ghost` (`outline` for the name's actions), `size` `icon` (`sm` for "+ Add column"), the grid's box (its
|
|
783
|
+
size, its place, its reveal on hover) in `className`, and the look yours. Each of the others is handed `tabIndex` -1 and its
|
|
784
|
+
`aria-label`; the ⋯ and "+ Add column" a ref they anchor their menus on, `aria-haspopup` and `aria-expanded`; the
|
|
785
|
+
fold `aria-expanded`; the row's ⋯ `data-slot="vk-grid-row-more"` and a `title`; "+ Add column" `data-open` while its
|
|
786
|
+
menu is open, with either value. Before you set `button`, your `Button` forwards the ref, `tabIndex`,
|
|
787
|
+
`aria-haspopup`, `aria-expanded`, `data-slot` and `data-open` to its element, hands `onClick` the click on that
|
|
788
|
+
element, and lets the `className` handed win over its own size.
|
|
789
|
+
And `selectionBar`'s `chip` (`ViewsSelectionChip`, default `own`): who draws the count chip that clears the selection
|
|
790
|
+
on the desktop. `own` draws ViewKit's own, as on 0.5.0; `button` draws your `Button`, `variant` `outline`, `size` `sm`,
|
|
791
|
+
its box in `className`, `data-slot="vk-selection-chip"`, `aria-label`, and `disabled` while a batch runs, inside the
|
|
792
|
+
same `Tooltip`.
|
|
793
|
+
And an optional `severalValues` (`ViewsSeveralValues`, from `./react`, default `first`): how a cell of several values
|
|
794
|
+
draws on one line, wherever it draws (a grid cell, a board or calendar card, a field row that doesn't wrap). `first`
|
|
795
|
+
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
|
|
796
|
+
the count, and follows a column resize; the first shows cut when even it doesn't fit, and a wrapped row shows three
|
|
797
|
+
either way. A cell measures its values once when it mounts or they change, and on a resize works from what it kept.
|
|
798
|
+
And an optional `gridCheckboxes` (`ViewsGridCheckboxes`, default `own`): who draws a yes/no cell's box in the grid, the checkbox style. `own` draws ViewKit's tick box in its own switch button, as on 0.5.0; `checkbox` draws 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.
|
|
799
|
+
And an optional `fieldRowButtons` (`ViewsFieldRowButtons`, default `own`): who draws a field row's own buttons, 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. `own` draws ViewKit's own, as on 0.5.0; `button` draws your `Button`, `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. Neither grid option reaches a field row.
|
|
800
|
+
And an optional `fieldRowCheckboxes` (`ViewsFieldRowCheckboxes`, default `own`): who draws a field row's yes/no box, the checkbox style. `own` draws ViewKit's tick box in its own switch button, as on 0.5.0; `checkbox` draws your `Checkbox`, a Tab stop, one press writing once; a row it can't write is handed `readOnly`.
|
|
801
|
+
And an optional `bodyFrame` (`ViewsBodyFrame`, from `./react`, default `views`): who sets the width and padding of the popover around a whole body the app hands (`Picker`, `PartsBody`, `ValuesBody`), in the grid and a field row alike. `views` keeps ViewKit's own, whether or not a body is handed. `popover` hands that popover 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 sets `data-vk-body` on it through `panelData`: `picker`, `parts` or `values`. An editor that draws ViewKit's own body keeps ViewKit's width at either; the phone's sheet takes no class and is unchanged.
|
|
802
|
+
And an optional `datePicks` (`ViewsDatePicks`, from `./react`): the quick days the date editors offer, in order, any of
|
|
803
|
+
`today`, `tomorrow`, `next-monday` (the Monday after today, a week on when today is one) and `in-a-week` (today + 7 on
|
|
804
|
+
the local calendar). ViewKit works out each day; the date editor hands exactly these to an app's `DateBody`, `none`
|
|
805
|
+
after them where the field may be emptied, and its own panel draws the same. Absent, `today`, `tomorrow` and
|
|
806
|
+
`next-monday`, as on 0.5.0.
|
|
533
807
|
|
|
534
808
|
`@viewkitjs/views/display`, no client directive on the door (a server module may reach its string
|
|
535
809
|
formatters), every rendering file behind it carrying its own: `renderFieldValue` and `DISPLAY_CORES`
|
|
@@ -564,7 +838,11 @@ messages, read from the provider's conventions unless the host hands `message`.
|
|
|
564
838
|
`EDITOR_EXIT_MS` — the one-answer guard and the exit gap every host that opens an editor over a value
|
|
565
839
|
shares; Escape discards through it unless its optional `escape` is `"keep"` (on a desktop, read once at open: the
|
|
566
840
|
editor is asked as for a press outside, and `EditSession.keeps` says so), and a refused attempt's reason comes back as
|
|
567
|
-
`refusal` (`EditSession`, `EditSessionAttempt`).
|
|
841
|
+
`refusal` (`EditSession`, `EditSessionAttempt`). A session still open when its page goes (`pagehide`), or when the grid or
|
|
842
|
+
field row around it goes, is left by its optional `leave`: `"outside"` asks the editor as for a press outside, `"discard"`
|
|
843
|
+
(the default) asks nothing; an answer waiting out its exit is finished at once, and the admitted mode's optional `onLeave`
|
|
844
|
+
is called first. The grid and the field row pass `"outside"` on a desktop and `"discard"` in a phone's sheet. A commit made
|
|
845
|
+
then reaches the host inside `pagehide`; a write that must outlive the page is the app's to send. `useEscapeRule(type)` and `EditEscape` come from it too: the
|
|
568
846
|
provider's `escape` for a field type, for a host to hand its session. Its own door, so a host that needs the session
|
|
569
847
|
does not load the six editors.
|
|
570
848
|
|
|
@@ -616,14 +894,56 @@ and `ROW_NO_TEXT_SELECT`, and the types `ListSelectionConfig`, `ListBatchApi`, `
|
|
|
616
894
|
|
|
617
895
|
`@viewkitjs/views/grid`, no client directive on the door, every rendering file behind it carrying its
|
|
618
896
|
own: `GridTable` and its props `GridTableProps` (flat, as a host's binding hands them),
|
|
619
|
-
`useGridTablePrefs` (a grid's personal preferences: the host's prefs and their setter in, the props to spread onto `GridTable` out), the types
|
|
897
|
+
`useGridTablePrefs` (a grid's personal preferences: the host's prefs and their setter in, the props to spread onto `GridTable` out), `useGridTableSettings` (the same props from a list's `ListSettings` and a person's `ListPersonalLayer`: a column hidden, moved or given a figure comes back as a `ListSettingsChange`, a resize as the person's width) with `GridFormatPrefs` (how the fields read, the app's), the types
|
|
620
898
|
an app writes its props against, `GridSortState`, `GridGroupSortOption`, `GridCellCommitFn` and
|
|
621
899
|
`GridCellsCommitFn`, and `GridGroupByState`, `GridGroupFigure` (a `GridDeclaredFigure` or a `GridDrawnFigure`), `GridGroupMenuPart`, `GridRowOpenedFrom` (what `onOpenRow` hands with the row) and `GroupCountNoun`; and the helpers a
|
|
622
900
|
host's binding shares with the grid: `GridCommitContext` and `GridCommitOutcome` (what a commit was and how it ended),
|
|
623
901
|
`deriveGridSelectValues` and `deriveGridRelationValues` (the values a column's filter offers),
|
|
624
902
|
`cellCopyText` and `cellEditBaseline` (a cell's copy text and the value an edit starts from, which a
|
|
625
|
-
CSV export reuses), and `GRID_TITLE_LINK_CLASS`. The
|
|
626
|
-
|
|
903
|
+
CSV export reuses), and `GRID_TITLE_LINK_CLASS`. The house menu rows, the group collapse and the type
|
|
904
|
+
icons are the app's; the selection bar is `SelectionBar`, on the selection door, drawn with the app's verbs.
|
|
905
|
+
|
|
906
|
+
`@viewkitjs/views/panels`, no client
|
|
907
|
+
directive on the door, the one hook behind it (`useFilterOpened`) carrying
|
|
908
|
+
its own: what a list's panels read and say. The settings they edit (`SortConfig`, `GroupConfig`, `ToggleConfig`,
|
|
909
|
+
`LayoutConfig` and its parts, `TimeScopeConfig`, `DateRangeConfig`, `ActivePanel`, `ViewOptionInputs`,
|
|
910
|
+
`CollectionViewState`, `CollectionExportCsv`) with their predicates and `clearViewOptions`; which sections exist on a viewport
|
|
911
|
+
(`getViewOptionAvailability`, `resolvePersonalSection`); the Group panel's orders (`groupSortChoices`); and every
|
|
912
|
+
row's value (`filterValueLabel`, `relationSentence`, `sortValueLabel` and their siblings), each worded through a
|
|
913
|
+
`views.panels.*` key, the resolver taken last; and the views row's axes (`ViewTabOption`, `CollectionViewsConfig`,
|
|
914
|
+
`CollectionViewsInput`, `CollectionChildAxis`, `ViewsLayout`, `PillOption`, `toViewAxes`, `splitViewAxes`); and
|
|
915
|
+
every panel built from a list's settings (`settingsPanels`, with `settingsFilters`, `settingsSort`, `settingsGroup`,
|
|
916
|
+
`settingsGroupBy`, `settingsLayout` and the columns' and look's translations), and the toolbar's arrangement (`toolbarForm`, `arrangeToolbar`, `ToolbarForm`, `ToolbarPlacement`, `ToolbarLine`, `ToolbarSlot`, `TOOLBAR_NARROW_BELOW`) with what the toolbar owns over a list's settings (`withCounts`, `countsToggle`, `SHOW_COUNTS_KEY`, `groupShown`,
|
|
917
|
+
`withEditView`, `settingsCleared`): a `ListSettings`, a person's
|
|
918
|
+
`ListPersonalLayer` and the list's columns in (`SettingsPanelsInput`), each panel's config out, and every change
|
|
919
|
+
handed back as a `ListSettingsChange` or a layer patch, so an app keeps both where it likes and never speaks
|
|
920
|
+
`ListViewPrefs` for a list on settings. It is
|
|
921
|
+
pure: a server or an agent reads it without React. The panels themselves draw from `/panels/react`. The panels'
|
|
922
|
+
rows are atoms.
|
|
923
|
+
|
|
924
|
+
`@viewkitjs/views/panels/react`, with the client directive: the panels as they draw, each under the app's
|
|
925
|
+
`ViewsProvider`. The filter panel: a body per filter type (`TextFilterBody`, `NumberFilterBody`,
|
|
926
|
+
`RangeFilterBody`, `RelationFilterBody`, `DateFilterBody` and its parts), the filter list (`CompactFilterList`,
|
|
927
|
+
`dimensionRows`) and the details (`CompactFilterDetail`, `CompactToggleDetail`, `CompactDateRangeDetail`,
|
|
928
|
+
`CompactTimeScopeDetail`), the date's month drawn through the `RangeCalendar` atom and its operator through the
|
|
929
|
+
map's `Menu`. The views row (`PillGroup`, `HScrollRow`, `ViewTabs`, `toPillOptions`, `FoldingViewRow`,
|
|
930
|
+
`ViewPicker`, `ViewPickerRow`, `ViewCreatePill`, `ViewAxes`), its pills drawn by the `Pill` atom and their verbs
|
|
931
|
+
through the map's `Menu`. The Sort and Group panels (`CompactSortDetail`, `CompactGroupDetail` and its Group by, Sort and
|
|
932
|
+
Date by pages), the Layout panel (`CompactLayoutDetail`), the Columns list (`LayoutColumnsList`), one column's
|
|
933
|
+
settings (`PopoverColumnDetail`) and the group order (`GroupBucketsList`); an app's field editor comes in as
|
|
934
|
+
`fieldEditor` (`PanelFieldEditor`). Customize, put together from them (`ViewOptionsPanelContent`, its root list
|
|
935
|
+
`PopoverRootList`, its `ViewFooter` and `ViewOptionsActions`), with its popover form (`ViewOptionsPopoverPanel`,
|
|
936
|
+
`useViewOptionsPopover`, `useViewActivePanel`, `viewOptionsPopoverClassName`, `keepPanelOpenForPortals`); the app
|
|
937
|
+
hosts it in a popover or a drawer of its own. The toolbar: its frame (`Toolbar`, `ToolbarPart`), which places the parts
|
|
938
|
+
in the row, the narrow panel or the phone's row and keeps one panel open at a time (`useToolbarPanel`), where a part
|
|
939
|
+
stands (`useToolbarSlot`, `ToolbarSlotState`), the parts that need no list settings (`ToolbarViews`, `ToolbarSearch`,
|
|
940
|
+
`ToolbarNew`) and the button they draw with (`ToolbarButton`, the atom at its line's size); the panel parts, each
|
|
941
|
+
opening its panel from its own button over the builder's panels (`ToolbarOptions`, `ToolbarSort`, `ToolbarFilter`,
|
|
942
|
+
`ToolbarPanelHost`, `useToolbarPanelState`, `ToolbarPanelState`, `FilterPanelContent`); and the ready toolbar over a
|
|
943
|
+
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`,
|
|
944
|
+
`@dnd-kit/sortable`, `@dnd-kit/utilities`), the package's optional peers, which the Columns list, the group
|
|
945
|
+
order and the view pills drag with: an app that takes only the grid, or only the panels' pure door, never installs them. It stays
|
|
946
|
+
apart from `/panels` so a server file can read the panels' settings and words without shipping a panel.
|
|
627
947
|
|
|
628
948
|
## Registry items
|
|
629
949
|
|