@viewkitjs/views 0.1.0 → 0.3.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 +767 -1
- package/README.md +92 -41
- package/dist/atoms/LoadMore.js +11 -1
- package/dist/atoms/Row.js +1 -1
- package/dist/atoms/RowMenu.d.ts +1 -1
- package/dist/atoms/RowMenu.js +20 -6
- package/dist/atoms/types.d.ts +4 -4
- package/dist/cells/cell-format.d.ts +3 -3
- package/dist/cells/cell-title.d.ts +1 -2
- package/dist/cells/cell-title.js +2 -2
- package/dist/cells/cell-values.js +6 -3
- package/dist/contract.d.ts +79 -8
- package/dist/contract.js +55 -8
- package/dist/display/converted.d.ts +19 -0
- package/dist/display/converted.js +12 -0
- package/dist/display/format.d.ts +16 -1
- package/dist/display/format.js +10 -1
- package/dist/display/index.d.ts +2 -1
- package/dist/display/index.js +2 -1
- package/dist/display/link-click.d.ts +11 -0
- package/dist/display/link-click.js +3 -0
- package/dist/display/link.js +12 -6
- package/dist/display/location.d.ts +4 -3
- package/dist/display/location.js +12 -5
- package/dist/display/multi-value.d.ts +1 -1
- package/dist/display/multi-value.js +1 -1
- package/dist/display/options.d.ts +8 -2
- package/dist/display/percent.js +10 -3
- package/dist/display/phone.d.ts +2 -1
- package/dist/display/phone.js +11 -2
- package/dist/display/relation.js +1 -1
- package/dist/editors/ChipsEditor.d.ts +9 -4
- package/dist/editors/ChipsEditor.js +7 -3
- package/dist/editors/DateEditor.d.ts +21 -6
- package/dist/editors/DateEditor.js +118 -30
- package/dist/editors/EditorPanel.d.ts +61 -0
- package/dist/editors/EditorPanel.js +54 -0
- package/dist/editors/LocationEditor.d.ts +3 -0
- package/dist/editors/LocationEditor.js +28 -21
- package/dist/editors/NameEditor.d.ts +3 -0
- package/dist/editors/NameEditor.js +15 -10
- package/dist/editors/NumberEditor.d.ts +3 -0
- package/dist/editors/NumberEditor.js +7 -7
- package/dist/editors/RangeEditor.d.ts +16 -1
- package/dist/editors/RangeEditor.js +22 -6
- package/dist/editors/RelationEditor.d.ts +13 -28
- package/dist/editors/RelationEditor.js +17 -40
- package/dist/editors/RelationSetEditor.d.ts +53 -0
- package/dist/editors/RelationSetEditor.js +112 -0
- package/dist/editors/SelectEditor.d.ts +21 -3
- package/dist/editors/SelectEditor.js +55 -9
- package/dist/editors/TextEditor.d.ts +51 -0
- package/dist/editors/TextEditor.js +81 -0
- package/dist/editors/ValueListEditor.d.ts +5 -2
- package/dist/editors/ValueListEditor.js +11 -9
- package/dist/editors/edit-cores.d.ts +13 -10
- package/dist/editors/edit-cores.js +7 -6
- package/dist/editors/edit-session.d.ts +21 -11
- package/dist/editors/edit-session.js +19 -5
- package/dist/editors/keep-inside.d.ts +12 -0
- package/dist/editors/keep-inside.js +20 -0
- package/dist/editors/open-value.d.ts +21 -0
- package/dist/editors/open-value.js +36 -0
- package/dist/editors/open-values.d.ts +4 -0
- package/dist/editors/open-values.js +7 -0
- package/dist/editors/relation-kinds.d.ts +7 -0
- package/dist/editors/relation-kinds.js +21 -0
- package/dist/editors/relation-panel.d.ts +69 -0
- package/dist/editors/relation-panel.js +40 -0
- package/dist/field-row/FieldNoteLine.d.ts +14 -0
- package/dist/field-row/FieldNoteLine.js +14 -0
- package/dist/field-row/FieldRow.d.ts +73 -0
- package/dist/field-row/FieldRow.js +157 -0
- package/dist/field-row/FieldRowLane.d.ts +19 -0
- package/dist/field-row/FieldRowLane.js +11 -0
- package/dist/field-row/editors/RowChipsEditor.d.ts +11 -0
- package/dist/field-row/editors/RowChipsEditor.js +25 -0
- package/dist/field-row/editors/RowDateEditor.d.ts +16 -0
- package/dist/field-row/editors/RowDateEditor.js +18 -0
- package/dist/field-row/editors/RowEditor.d.ts +39 -0
- package/dist/field-row/editors/RowEditor.js +64 -0
- package/dist/field-row/editors/RowNameEditor.d.ts +4 -0
- package/dist/field-row/editors/RowNameEditor.js +15 -0
- package/dist/field-row/editors/RowNumberEditor.d.ts +12 -0
- package/dist/field-row/editors/RowNumberEditor.js +18 -0
- package/dist/field-row/editors/RowPlaceEditor.d.ts +8 -0
- package/dist/field-row/editors/RowPlaceEditor.js +18 -0
- package/dist/field-row/editors/RowRangeEditor.d.ts +4 -0
- package/dist/field-row/editors/RowRangeEditor.js +15 -0
- package/dist/field-row/editors/RowRelationEditor.d.ts +20 -0
- package/dist/field-row/editors/RowRelationEditor.js +77 -0
- package/dist/field-row/editors/RowSelectEditor.d.ts +13 -0
- package/dist/field-row/editors/RowSelectEditor.js +23 -0
- package/dist/field-row/editors/RowTextEditor.d.ts +15 -0
- package/dist/field-row/editors/RowTextEditor.js +16 -0
- package/dist/field-row/editors/RowValueListEditor.d.ts +4 -0
- package/dist/field-row/editors/RowValueListEditor.js +21 -0
- package/dist/field-row/editors/host.d.ts +59 -0
- package/dist/field-row/editors/host.js +1 -0
- package/dist/field-row/editors/row-session.d.ts +49 -0
- package/dist/field-row/editors/row-session.js +49 -0
- package/dist/field-row/index.d.ts +5 -0
- package/dist/field-row/index.js +5 -0
- package/dist/field-row/row-target.d.ts +20 -0
- package/dist/field-row/row-target.js +3 -0
- package/dist/field-row/useFieldWrite.d.ts +45 -0
- package/dist/field-row/useFieldWrite.js +190 -0
- package/dist/field-row/useRowSettlement.d.ts +33 -0
- package/dist/field-row/useRowSettlement.js +23 -0
- package/dist/fields/binding.d.ts +7 -2
- package/dist/fields/binding.js +13 -6
- package/dist/fields/currency.d.ts +0 -10
- package/dist/fields/currency.js +0 -14
- package/dist/fields/edit-core-types.d.ts +9 -9
- package/dist/fields/edit-core-types.js +6 -6
- package/dist/fields/money.d.ts +6 -0
- package/dist/fields/money.js +11 -0
- package/dist/fields/number-edit.d.ts +6 -0
- package/dist/fields/number-edit.js +4 -0
- package/dist/fields/prepare-write.js +6 -1
- package/dist/fields/relation-source-types.d.ts +12 -0
- package/dist/fields/write-target.d.ts +50 -0
- package/dist/fields/write-target.js +10 -0
- package/dist/filters/filter-model.d.ts +0 -1
- package/dist/filters/registry.d.ts +3 -36
- package/dist/filters/registry.js +0 -38
- package/dist/grid/chrome/GridAddColumn.d.ts +11 -0
- package/dist/grid/chrome/GridAddColumn.js +29 -0
- package/dist/grid/chrome/GridAggregateMenu.d.ts +31 -0
- package/dist/grid/chrome/GridAggregateMenu.js +29 -0
- package/dist/grid/chrome/GridCellEditors.d.ts +71 -0
- package/dist/grid/chrome/GridCellEditors.js +126 -0
- package/dist/grid/chrome/GridCellOutline.d.ts +49 -0
- package/dist/grid/chrome/GridCellOutline.js +16 -0
- package/dist/grid/chrome/GridChipsEditor.d.ts +38 -0
- package/dist/grid/chrome/GridChipsEditor.js +35 -0
- package/dist/grid/chrome/GridColumnColorSection.d.ts +11 -0
- package/dist/grid/chrome/GridColumnColorSection.js +40 -0
- package/dist/grid/chrome/GridColumnDateSection.d.ts +23 -0
- package/dist/grid/chrome/GridColumnDateSection.js +23 -0
- package/dist/grid/chrome/GridColumnDurationSection.d.ts +19 -0
- package/dist/grid/chrome/GridColumnDurationSection.js +24 -0
- package/dist/grid/chrome/GridColumnMenu.d.ts +101 -0
- package/dist/grid/chrome/GridColumnMenu.js +103 -0
- package/dist/grid/chrome/GridColumnNumberSection.d.ts +25 -0
- package/dist/grid/chrome/GridColumnNumberSection.js +27 -0
- package/dist/grid/chrome/GridColumnPercentSection.d.ts +15 -0
- package/dist/grid/chrome/GridColumnPercentSection.js +16 -0
- package/dist/grid/chrome/GridColumnSortSection.d.ts +18 -0
- package/dist/grid/chrome/GridColumnSortSection.js +16 -0
- package/dist/grid/chrome/GridDateEditor.d.ts +34 -0
- package/dist/grid/chrome/GridDateEditor.js +19 -0
- package/dist/grid/chrome/GridFlyout.d.ts +44 -0
- package/dist/grid/chrome/GridFlyout.js +80 -0
- package/dist/grid/chrome/GridFooter.d.ts +33 -0
- package/dist/grid/chrome/GridFooter.js +85 -0
- package/dist/grid/chrome/GridGroupMenu.d.ts +37 -0
- package/dist/grid/chrome/GridGroupMenu.js +64 -0
- package/dist/grid/chrome/GridHeader.d.ts +66 -0
- package/dist/grid/chrome/GridHeader.js +42 -0
- package/dist/grid/chrome/GridLongTextEditor.d.ts +55 -0
- package/dist/grid/chrome/GridLongTextEditor.js +69 -0
- package/dist/grid/chrome/GridMenuRow.d.ts +15 -0
- package/dist/grid/chrome/GridMenuRow.js +15 -0
- package/dist/grid/chrome/GridNameEditor.d.ts +24 -0
- package/dist/grid/chrome/GridNameEditor.js +21 -0
- package/dist/grid/chrome/GridNumberEditor.d.ts +49 -0
- package/dist/grid/chrome/GridNumberEditor.js +51 -0
- package/dist/grid/chrome/GridPlaceEditor.d.ts +26 -0
- package/dist/grid/chrome/GridPlaceEditor.js +22 -0
- package/dist/grid/chrome/GridRangeEditor.d.ts +30 -0
- package/dist/grid/chrome/GridRangeEditor.js +21 -0
- package/dist/grid/chrome/GridRelationEditor.d.ts +45 -0
- package/dist/grid/chrome/GridRelationEditor.js +92 -0
- package/dist/grid/chrome/GridResizeHandle.d.ts +19 -0
- package/dist/grid/chrome/GridResizeHandle.js +19 -0
- package/dist/grid/chrome/GridRow.d.ts +31 -0
- package/dist/grid/chrome/GridRow.js +179 -0
- package/dist/grid/chrome/GridRowActions.d.ts +32 -0
- package/dist/grid/chrome/GridRowActions.js +25 -0
- package/dist/grid/chrome/GridRowCells.d.ts +4 -0
- package/dist/grid/chrome/GridRowCells.js +128 -0
- package/dist/grid/chrome/GridRowGlyph.d.ts +12 -0
- package/dist/grid/chrome/GridRowGlyph.js +13 -0
- package/dist/grid/chrome/GridSelectEditor.d.ts +33 -0
- package/dist/grid/chrome/GridSelectEditor.js +43 -0
- package/dist/grid/chrome/GridStructure.d.ts +47 -0
- package/dist/grid/chrome/GridStructure.js +41 -0
- package/dist/grid/chrome/GridTable.d.ts +4 -0
- package/dist/grid/chrome/GridTable.js +192 -0
- package/dist/grid/chrome/GridTableSurface.d.ts +52 -0
- package/dist/grid/chrome/GridTableSurface.js +15 -0
- package/dist/grid/chrome/GridTextEditor.d.ts +45 -0
- package/dist/grid/chrome/GridTextEditor.js +38 -0
- package/dist/grid/chrome/GridValueListEditor.d.ts +30 -0
- package/dist/grid/chrome/GridValueListEditor.js +19 -0
- package/dist/grid/chrome/StuckMarker.d.ts +16 -0
- package/dist/grid/chrome/StuckMarker.js +34 -0
- package/dist/grid/chrome/cell-clipboard.d.ts +9 -0
- package/dist/grid/chrome/cell-clipboard.js +28 -0
- package/dist/grid/chrome/cell-cut-off.d.ts +11 -0
- package/dist/grid/chrome/cell-cut-off.js +20 -0
- package/dist/grid/chrome/cells.d.ts +21 -0
- package/dist/grid/chrome/cells.js +19 -0
- package/dist/grid/chrome/checks.d.ts +32 -0
- package/dist/grid/chrome/checks.js +32 -0
- package/dist/grid/chrome/column-glyph.d.ts +14 -0
- package/dist/grid/chrome/column-glyph.js +44 -0
- package/dist/grid/chrome/editors.d.ts +9 -0
- package/dist/grid/chrome/editors.js +10 -0
- package/dist/grid/chrome/grid-cell-classes.d.ts +53 -0
- package/dist/grid/chrome/grid-cell-classes.js +32 -0
- package/dist/grid/chrome/grid-cell-link.d.ts +13 -0
- package/dist/grid/chrome/grid-cell-link.js +9 -0
- package/dist/grid/chrome/grid-edit-session.d.ts +63 -0
- package/dist/grid/chrome/grid-edit-session.js +118 -0
- package/dist/grid/chrome/grid-hover.d.ts +60 -0
- package/dist/grid/chrome/grid-hover.js +81 -0
- package/dist/grid/chrome/grid-menu-focus.d.ts +43 -0
- package/dist/grid/chrome/grid-menu-focus.js +93 -0
- package/dist/grid/chrome/grid-menu-search.d.ts +7 -0
- package/dist/grid/chrome/grid-menu-search.js +7 -0
- package/dist/grid/chrome/grid-row-menu-key.d.ts +15 -0
- package/dist/grid/chrome/grid-row-menu-key.js +36 -0
- package/dist/grid/chrome/grid-row-props.d.ts +143 -0
- package/dist/grid/chrome/grid-row-props.js +1 -0
- package/dist/grid/chrome/grid-row-window.d.ts +61 -0
- package/dist/grid/chrome/grid-row-window.js +212 -0
- package/dist/grid/chrome/grid-scroll-owner.d.ts +38 -0
- package/dist/grid/chrome/grid-scroll-owner.js +75 -0
- package/dist/grid/chrome/grid-styles.d.ts +40 -0
- package/dist/grid/chrome/grid-styles.js +9 -0
- package/dist/grid/chrome/grid-table-props.d.ts +172 -0
- package/dist/grid/chrome/grid-table-props.js +1 -0
- package/dist/grid/chrome/useGridBatchApi.d.ts +34 -0
- package/dist/grid/chrome/useGridBatchApi.js +35 -0
- package/dist/grid/chrome/useGridColumnLayout.d.ts +30 -0
- package/dist/grid/chrome/useGridColumnLayout.js +206 -0
- package/dist/grid/chrome/useGridFocus.d.ts +45 -0
- package/dist/grid/chrome/useGridFocus.js +122 -0
- package/dist/grid/chrome/useGridHeaderDrag.d.ts +20 -0
- package/dist/grid/chrome/useGridHeaderDrag.js +37 -0
- package/dist/grid/chrome/useGridKeyboard.d.ts +64 -0
- package/dist/grid/chrome/useGridKeyboard.js +450 -0
- package/dist/grid/chrome/useGridPendingReconciliation.d.ts +12 -0
- package/dist/grid/chrome/useGridPendingReconciliation.js +32 -0
- package/dist/grid/chrome/useGridRailReveal.d.ts +57 -0
- package/dist/grid/chrome/useGridRailReveal.js +67 -0
- package/dist/grid/chrome/useGridRangeActions.d.ts +51 -0
- package/dist/grid/chrome/useGridRangeActions.js +195 -0
- package/dist/grid/chrome/useGridRangeGestures.d.ts +32 -0
- package/dist/grid/chrome/useGridRangeGestures.js +237 -0
- package/dist/grid/chrome/useGridRowContextMenu.d.ts +37 -0
- package/dist/grid/chrome/useGridRowContextMenu.js +153 -0
- package/dist/grid/chrome/useGridScaleStyles.d.ts +3 -0
- package/dist/grid/chrome/useGridScaleStyles.js +28 -0
- package/dist/grid/chrome/useGridScrollArea.d.ts +21 -0
- package/dist/grid/chrome/useGridScrollArea.js +65 -0
- package/dist/grid/chrome/useGridTableInteractionModel.d.ts +78 -0
- package/dist/grid/chrome/useGridTableInteractionModel.js +249 -0
- package/dist/grid/chrome/useGridTableSelection.d.ts +29 -0
- package/dist/grid/chrome/useGridTableSelection.js +55 -0
- package/dist/grid/chrome/useHeaderDragReorder.d.ts +21 -0
- package/dist/grid/chrome/useHeaderDragReorder.js +216 -0
- package/dist/grid/core/clipboard-model.d.ts +83 -0
- package/dist/grid/core/clipboard-model.js +291 -0
- package/dist/grid/core/column-values.d.ts +27 -0
- package/dist/grid/core/column-values.js +76 -0
- package/dist/grid/core/commit-model.d.ts +41 -0
- package/dist/grid/core/commit-model.js +3 -0
- package/dist/grid/core/coordinates.d.ts +48 -0
- package/dist/grid/core/coordinates.js +27 -0
- package/dist/grid/core/edge-scroll.d.ts +21 -0
- package/dist/grid/core/edge-scroll.js +23 -0
- package/dist/grid/core/edit-values.d.ts +9 -0
- package/dist/grid/core/edit-values.js +1 -0
- package/dist/grid/core/editing-controller.d.ts +60 -0
- package/dist/grid/core/editing-controller.js +266 -0
- package/dist/grid/core/editing-model.d.ts +87 -0
- package/dist/grid/core/editing-model.js +148 -0
- package/dist/grid/core/flat-rows.d.ts +35 -0
- package/dist/grid/core/flat-rows.js +20 -0
- package/dist/grid/core/grid-aria.d.ts +27 -0
- package/dist/grid/core/grid-aria.js +39 -0
- package/dist/grid/core/grid-focus.d.ts +54 -0
- package/dist/grid/core/grid-focus.js +148 -0
- package/dist/grid/core/grid-scale.d.ts +14 -0
- package/dist/grid/core/grid-scale.js +8 -0
- package/dist/grid/core/nav.d.ts +94 -0
- package/dist/grid/core/nav.js +92 -0
- package/dist/grid/core/pending-reconciliation.d.ts +53 -0
- package/dist/grid/core/pending-reconciliation.js +51 -0
- package/dist/grid/core/range-model.d.ts +25 -0
- package/dist/grid/core/range-model.js +59 -0
- package/dist/grid/core/row-window.d.ts +40 -0
- package/dist/grid/core/row-window.js +43 -0
- package/dist/grid/core/spreadsheet-operations.d.ts +101 -0
- package/dist/grid/core/spreadsheet-operations.js +280 -0
- package/dist/grid/core/useGridEditing.d.ts +46 -0
- package/dist/grid/core/useGridEditing.js +93 -0
- package/dist/grid/core/useGridRange.d.ts +20 -0
- package/dist/grid/core/useGridRange.js +24 -0
- package/dist/grid/core/value-equality.d.ts +54 -0
- package/dist/grid/core/value-equality.js +80 -0
- package/dist/grid/index.d.ts +18 -0
- package/dist/grid/index.js +5 -0
- package/dist/grid/useGridTablePrefs.d.ts +49 -0
- package/dist/grid/useGridTablePrefs.js +99 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/viewport.d.ts +3 -0
- package/dist/internal/viewport.js +15 -0
- package/dist/model/column-capabilities.d.ts +3 -2
- package/dist/model/column-capabilities.js +28 -8
- package/dist/model/column-from.js +3 -0
- package/dist/model/column-inspect.d.ts +10 -2
- package/dist/model/column-inspect.js +9 -0
- package/dist/model/column-schema.d.ts +6 -1
- package/dist/model/column-state.d.ts +1 -1
- package/dist/model/column-types.d.ts +3 -1
- package/dist/model/column-types.js +1 -1
- package/dist/model/density.js +3 -3
- package/dist/model/filter-capabilities.d.ts +1 -1
- package/dist/model/filter-capabilities.js +1 -1
- package/dist/model/index.d.ts +4 -6
- package/dist/model/index.js +0 -1
- package/dist/model/preferences.d.ts +7 -7
- package/dist/model/preferences.js +0 -1
- package/dist/model/prefs-buckets.d.ts +0 -1
- package/dist/model/prefs-buckets.js +0 -3
- package/dist/model/render-count.d.ts +6 -0
- package/dist/model/render-count.js +11 -0
- package/dist/provider/ViewsProvider.d.ts +6 -2
- package/dist/provider/ViewsProvider.js +12 -2
- package/dist/provider/components.d.ts +35 -9
- package/dist/provider/components.js +4 -2
- package/dist/provider/context.d.ts +8 -4
- package/dist/provider/desktop.d.ts +9 -0
- package/dist/provider/desktop.js +22 -0
- package/dist/provider/menu-groups.d.ts +8 -0
- package/dist/provider/menu-groups.js +38 -0
- package/dist/provider/plain-input.d.ts +8 -0
- package/dist/provider/plain-input.js +5 -0
- package/dist/provider/ports.d.ts +22 -0
- package/dist/provider/ports.js +1 -0
- package/dist/react.d.ts +3 -2
- package/dist/react.js +1 -0
- package/dist/selection/SelectCheckbox.d.ts +3 -1
- package/dist/selection/SelectCheckbox.js +2 -2
- package/dist/selection/useCheckDragSelect.js +6 -5
- package/docs/contract.md +202 -72
- package/docs/getting-started.md +250 -0
- package/docs/guides/atoms.md +245 -0
- package/docs/guides/cells.md +302 -0
- package/docs/guides/columns.md +413 -0
- package/docs/guides/display.md +204 -0
- package/docs/guides/editors.md +462 -0
- package/docs/guides/ports.md +246 -0
- package/docs/guides/selection.md +270 -0
- package/docs/guides/the-grid.md +696 -0
- package/docs/guides/the-provider.md +448 -0
- package/docs/index.md +52 -0
- package/docs/install.md +9 -47
- package/docs/reference/cells.md +28 -0
- package/docs/reference/display.md +44 -0
- package/docs/reference/editors-chips.md +6 -0
- package/docs/reference/editors-date.md +6 -0
- package/docs/reference/editors-location.md +10 -0
- package/docs/reference/editors-name.md +6 -0
- package/docs/reference/editors-number.md +11 -0
- package/docs/reference/editors-open-values.md +10 -0
- package/docs/reference/editors-panel.md +12 -0
- package/docs/reference/editors-range.md +6 -0
- package/docs/reference/editors-relation.md +12 -0
- package/docs/reference/editors-select.md +9 -0
- package/docs/reference/editors-session.md +11 -0
- package/docs/reference/editors-text.md +9 -0
- package/docs/reference/editors-value-list.md +6 -0
- package/docs/reference/editors.md +5 -0
- package/docs/reference/field-row.md +16 -0
- package/docs/reference/grid.md +39 -0
- package/docs/reference/react.md +89 -0
- package/docs/reference/selection.md +33 -0
- package/docs/reference/views.md +622 -0
- package/package.json +27 -4
- package/skills/views/SKILL.md +20 -5
- package/dist/filters/types.d.ts +0 -27
- package/dist/filters/types.js +0 -1
- package/dist/model/filter-pushdown.d.ts +0 -106
- package/dist/model/filter-pushdown.js +0 -147
package/docs/contract.md
CHANGED
|
@@ -22,17 +22,22 @@ use; the prefix keeps that selector from reaching an element of the app's own.
|
|
|
22
22
|
|
|
23
23
|
| slot | the element |
|
|
24
24
|
| ------------------------------------ | --------------------------------------------------------- |
|
|
25
|
-
| `data-slot="vk-grid"` | the grid's frame: the
|
|
25
|
+
| `data-slot="vk-grid"` | the grid's frame: fills the box the app gives it |
|
|
26
|
+
| `data-slot="vk-grid-scroll"` | the grid's one scroll area, both ways |
|
|
27
|
+
| `data-slot="vk-grid-head"` | an ungrouped grid's pinned head: its header row |
|
|
26
28
|
| `data-slot="vk-grid-header"` | the header row |
|
|
27
29
|
| `data-slot="vk-grid-header-cell"` | one column's header |
|
|
28
30
|
| `data-slot="vk-grid-row"` | one record's row |
|
|
31
|
+
| `data-slot="vk-grid-rows"` | a group's rows: only those on screen are drawn |
|
|
32
|
+
| `data-slot="vk-grid-gap"` | the rows not drawn, as tall as they are |
|
|
29
33
|
| `data-slot="vk-grid-cell"` | one value |
|
|
30
34
|
| `data-slot="vk-grid-group"` | one group's band and its rows |
|
|
35
|
+
| `data-slot="vk-grid-group-head"` | a group's pinned head: its name bar and its header row |
|
|
31
36
|
| `data-slot="vk-grid-group-header"` | a group's name and figures |
|
|
32
37
|
| `data-slot="vk-grid-footer"` | the footer row |
|
|
33
38
|
| `data-slot="vk-grid-footer-cell"` | one column's figure |
|
|
34
|
-
| `data-slot="vk-grid-rail"` | the left rail: the checkbox
|
|
35
|
-
| `data-slot="vk-grid-tail"` | the right tail:
|
|
39
|
+
| `data-slot="vk-grid-rail"` | the left rail: the checkbox lane |
|
|
40
|
+
| `data-slot="vk-grid-tail"` | the right tail: a row's ⋯, the header's + Add column |
|
|
36
41
|
| `data-slot="vk-grid-row-more"` | the row's ⋯ itself: it opens the row's menu |
|
|
37
42
|
| `data-slot="vk-grid-editor"` | the open editor over a cell |
|
|
38
43
|
| `data-slot="vk-grid-outline"` | the outline around the focused cell or the selected range |
|
|
@@ -88,36 +93,37 @@ changes and at no other time.
|
|
|
88
93
|
**The package owns geometry and density.** Each is a CSS variable the grid sets on its
|
|
89
94
|
frame from its scale and its state; a skin reads them and an app overrides them on the frame.
|
|
90
95
|
|
|
91
|
-
| token |
|
|
92
|
-
| ----------------- |
|
|
93
|
-
| `--vk-scale` |
|
|
94
|
-
| `--vk-row-h` |
|
|
95
|
-
| `--vk-head-h` |
|
|
96
|
-
| `--vk-footer-h` |
|
|
97
|
-
| `--vk-label-h` |
|
|
98
|
-
| `--vk-line-h` |
|
|
99
|
-
| `--vk-
|
|
100
|
-
| `--vk-
|
|
101
|
-
| `--vk-
|
|
102
|
-
| `--vk-
|
|
103
|
-
| `--vk-
|
|
104
|
-
| `--vk-
|
|
105
|
-
| `--vk-
|
|
106
|
-
| `--vk-
|
|
107
|
-
| `--vk-
|
|
108
|
-
| `--vk-
|
|
109
|
-
| `--vk-
|
|
110
|
-
| `--vk-
|
|
111
|
-
| `--vk-text
|
|
112
|
-
| `--vk-
|
|
113
|
-
| `--vk-
|
|
114
|
-
| `--vk-
|
|
115
|
-
| `--vk-
|
|
116
|
-
| `--vk-
|
|
117
|
-
| `--vk-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
96
|
+
| token | what it is |
|
|
97
|
+
| ----------------- | ----------------------------------------- |
|
|
98
|
+
| `--vk-scale` | the density multiplier |
|
|
99
|
+
| `--vk-row-h` | row height |
|
|
100
|
+
| `--vk-head-h` | header height |
|
|
101
|
+
| `--vk-footer-h` | footer height |
|
|
102
|
+
| `--vk-label-h` | group band height |
|
|
103
|
+
| `--vk-line-h` | a cell's line height |
|
|
104
|
+
| `--vk-px` | horizontal cell padding |
|
|
105
|
+
| `--vk-tail-pl` | the tail button's left padding |
|
|
106
|
+
| `--vk-rail-w` | the left rail's width |
|
|
107
|
+
| `--vk-rail-gap` | the gap between rail and first cell |
|
|
108
|
+
| `--vk-tail-w` | the right tail's width |
|
|
109
|
+
| `--vk-indent` | the group indent |
|
|
110
|
+
| `--vk-frozen-w` | the frozen band's width |
|
|
111
|
+
| `--vk-scroll-mt` | scroll-margin-top for a focused row |
|
|
112
|
+
| `--vk-glyph` | glyph size in cells |
|
|
113
|
+
| `--vk-head-glyph` | glyph size in the header |
|
|
114
|
+
| `--vk-text` | cell text size |
|
|
115
|
+
| `--vk-text-xs` | small text size |
|
|
116
|
+
| `--vk-text-10` | the smallest text size |
|
|
117
|
+
| `--vk-head-text` | header text size |
|
|
118
|
+
| `--vk-scrolled` | 0 or 1: content scrolled under the header |
|
|
119
|
+
| `--vk-parked` | 0 or 1: identity columns parked |
|
|
120
|
+
| `--vk-frozen-on` | 0 or 1: the frozen band is on |
|
|
121
|
+
| `--vk-row-py` | a rows view's vertical row padding |
|
|
122
|
+
| `--vk-head-mb` | the space under a rows view's header |
|
|
123
|
+
| `--vk-row-gap` | the gap inside a rows view's row |
|
|
124
|
+
|
|
125
|
+
`densityStyle(density)` writes the last three on the root of a rows view an app draws itself; its
|
|
126
|
+
rows read them.
|
|
121
127
|
|
|
122
128
|
**Colour is the app's, by the package's names.** The rendering paints every colour through a CSS
|
|
123
129
|
variable the app declares, spelled in a class as `text-(color:--vk-fg)` and in a value as
|
|
@@ -157,7 +163,24 @@ corners come from the app's Tailwind radius scale.
|
|
|
157
163
|
**The page gutter is the app's, if it has one.** `--vk-gutter` is the side padding a page gives its
|
|
158
164
|
content: the grid's rows run edge to edge and line their content up with it. An app that pads its
|
|
159
165
|
pages declares it once, onto its own padding; undeclared, the grid reads `0px` and sits flush with its
|
|
160
|
-
container.
|
|
166
|
+
container. `--vk-scroll-inset-bottom` is how much of the grid's foot the app covers with something it
|
|
167
|
+
floats there (a phone's bottom bar): the grid's scroll area runs underneath it, its last row scrolls
|
|
168
|
+
clear of it and a revealed cell stops above it. An app declares it on the grid's box or an ancestor;
|
|
169
|
+
undeclared, the grid reads `0px`.
|
|
170
|
+
|
|
171
|
+
**The grid scrolls inside itself.** Its frame fills the box its app gives it: a definite height, or
|
|
172
|
+
a flex column (the frame is `height: 100%`, `flex: 1 1 0` and `min-height: 0`). Inside the frame one
|
|
173
|
+
scroll area holds the table both ways, and each group's name bar and header row pin at the area's
|
|
174
|
+
top, so nothing the app pins above the grid concerns it. A box with no height gets a grid that grows
|
|
175
|
+
to its rows: the page scrolls it, and its heads don't pin. The grid's rows and frozen columns sit
|
|
176
|
+
inside your `Collapse`'s clip, so the clip must crop without scrolling (`overflow: clip`, never
|
|
177
|
+
`hidden`): a clip that scrolls takes the frozen columns' sticky edge with it.
|
|
178
|
+
|
|
179
|
+
**The grid's own variables are not public.** The grid sets `--vk-drag-shift` (a header cell's
|
|
180
|
+
offset while its column is dragged to a new place), `--vk-col-w-<id>` (one column's resolved
|
|
181
|
+
width, one per column) and `--vk-cols` (the columns' template on its scroll area, which every row
|
|
182
|
+
reads) for itself. They carry the prefix because they share the global namespace;
|
|
183
|
+
an app neither sets nor reads them, and they may change in any release.
|
|
161
184
|
|
|
162
185
|
## The components map
|
|
163
186
|
|
|
@@ -171,15 +194,19 @@ both fill every one.
|
|
|
171
194
|
|
|
172
195
|
`Button` · `Popover` · `Tooltip` · `Checkbox` · `Menu` · `Command` · `Calendar` · `Collapse` · `Sheet` · `AppIcon` · `Markdown`
|
|
173
196
|
|
|
197
|
+
`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 it apart from `COMPONENT_NAMES`, which lists the slots you must fill.
|
|
198
|
+
|
|
174
199
|
The popover takes `alignOffset`, `initialFocus` (false keeps focus where it was when the popup
|
|
175
|
-
opens
|
|
176
|
-
|
|
200
|
+
opens; the editor that then takes focus does so with `preventScroll`, so the package's own focus
|
|
201
|
+
never moves the page while your popup is placed; what your `Command` does as it mounts is yours, in
|
|
202
|
+
"Writing an adapter"), and two vetoes, `onOutsidePress`
|
|
203
|
+
and `onEscape`, each returning `false` to keep it open. `onOutsidePress` is handed the pointer press, its `target` where the press landed, also when the
|
|
177
204
|
focus that press moves is what would close the popup: a vetoed press holds against its focus too,
|
|
178
205
|
and focus leaving by keyboard (a Tab out) closes without asking. Its
|
|
179
206
|
`chrome` is `panel` (the app's card popover) or `menu` (the app's menu panel, for a list); a panel
|
|
180
207
|
click reaches `onPanelClick`, and `panelData` sets `data-*` attributes on the popup; its `style` carries what a class cannot say, a width that follows a cell. The command
|
|
181
|
-
list's root takes `shouldFilter`, `filter
|
|
182
|
-
|
|
208
|
+
list's root takes `shouldFilter`, `filter`, `loop` (the arrows wrap) and `defaultValue` (the value of the item highlighted as the list opens, and none while no item has it; the relation editor opens on the linked record through it, and a list that ignores it opens on its first row); an item takes `chosen`: the app colours the item as
|
|
209
|
+
its chosen row, and the package's row inside draws the check, so the item draws no tick of its own; its input takes a `ref` (the place editor focuses its search through it), `onKeyDown`, and `chrome`
|
|
183
210
|
`search` or `bare` (the input without the search row); its empty state and groups take a class. The
|
|
184
211
|
calendar takes a controlled `month` (`YYYY-MM`) with `onMonthChange`, a `dropdown` caption, and the
|
|
185
212
|
`startMonth` and `endMonth` its pickers offer, and `locale`, the conventions' locale, in which it
|
|
@@ -189,8 +216,8 @@ ticked partly (some, not all), `indeterminate`, a press on which hands `true` wh
|
|
|
189
216
|
one tooltip provider above the views, and a tooltip never mounts its own. A menu item may carry a
|
|
190
217
|
`shortcut` hint and an `href`; a `checked` row is checkable and closes the menu like any row; an
|
|
191
218
|
item's `children` are a group, its rows drawn in place under the item's label, never a flyout, and
|
|
192
|
-
the group's own `onSelect`, `href` and `checked` are ignored. `AppIcon` is the app's own icon component by the app's own names, for
|
|
193
|
-
the glyphs a host declares (a row's icon, a binding's icon, an option's icon); the semantic glyphs the rendering itself
|
|
219
|
+
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`, so you draw each row by its own flag. `AppIcon` is the app's own icon component by the app's own names, for
|
|
220
|
+
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
|
|
194
221
|
needs are a port, by meaning (below). `Markdown` is the app's markdown renderer, handed the stored text whole; the
|
|
195
222
|
package draws rich text through it and parses none.
|
|
196
223
|
|
|
@@ -208,13 +235,26 @@ What a Base UI adapter over shadcn copies does where its copies stop short of a
|
|
|
208
235
|
|
|
209
236
|
**The menu.** The map's `Menu` has an anchor and no trigger, and no flyouts. Build it from the menu
|
|
210
237
|
library's root, positioner and popup, handing the anchor to the positioner, where your copy's content
|
|
211
|
-
doesn't forward one; with no flyouts, a root needs no trigger of its own.
|
|
238
|
+
doesn't forward one; with no flyouts, a root needs no trigger of its own. Opened, it puts focus on its
|
|
239
|
+
first row, as your `Popover` does by default: a row's menu opened by a key starts there.
|
|
240
|
+
|
|
241
|
+
**A disabled group.** Nothing to do: its rows reach you already `disabled`.
|
|
212
242
|
|
|
213
243
|
**`chrome: "menu"`.** It is your menu panel's surface: no inset, because the list inside carries its
|
|
214
|
-
own. Where your copy has only the card popover, lay your
|
|
244
|
+
own, and no card width: it is as wide as its list. Where your copy has only the card popover, lay your
|
|
245
|
+
menu classes over it.
|
|
246
|
+
|
|
247
|
+
**The command item's chosen mark.** Colour the item as your chosen row; the row inside draws the
|
|
248
|
+
check. Where your copy's item draws a tick of its own, hide it.
|
|
215
249
|
|
|
216
|
-
**
|
|
217
|
-
|
|
250
|
+
**A command list that scrolls as it mounts.** The chips, select and relation editors, and the grid's
|
|
251
|
+
Add column and group menu, mount a `Command.Root` with its rows in the frame the popover opens, before
|
|
252
|
+
your popover has placed its popup. A command library that scrolls its selected item into view on mount
|
|
253
|
+
(cmdk does, with `scrollIntoView`) scrolls the page towards the popup's unplaced spot, which at a
|
|
254
|
+
library's default positioning can be the page's top, and `preventScroll` on the focus doesn't reach
|
|
255
|
+
that scroll. Keep such a popover `fixed`, where the unplaced popup already sits inside the viewport, or
|
|
256
|
+
stop your `Command` scrolling on mount. Your library's default positioning is safe only for a
|
|
257
|
+
`Command` that doesn't.
|
|
218
258
|
|
|
219
259
|
**`chrome: "bare"`.** The input alone, without the search row's glyph and divider. Where your copy
|
|
220
260
|
has only the search row, reach the command library's own input.
|
|
@@ -242,7 +282,7 @@ container: the inset a run of rows sits in, inside a panel or a command list's g
|
|
|
242
282
|
a button or, with `interactive={false}`, a static line), `RowContent` (a row's inside, for inside a
|
|
243
283
|
command list's item, which owns the element and the highlight), `TickBox` (a paint-only tick box),
|
|
244
284
|
`StatusBadge` (a pill by status slot), `StatusMarker` (an attention badge that opens its reason) and
|
|
245
|
-
`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 row's right-click menu, around the row: 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"`; its Delete asks the browser's own confirm with `views.menus.row-delete-
|
|
285
|
+
`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 row's right-click menu, around the row: 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), `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"`). Each ships as a default, exported as `DEFAULT_VIEWS_ATOMS`, drawn
|
|
246
286
|
from the app's colours; an app swaps any of them through the provider's `atoms`, and the rest
|
|
247
287
|
stay the defaults.
|
|
248
288
|
|
|
@@ -253,16 +293,29 @@ A row in the default tone takes its colour from what it sits in, so a command it
|
|
|
253
293
|
highlight read through it; a `muted` row brightens on hover when it is itself the button.
|
|
254
294
|
A row's `detail` is what it says at its right edge, in the subtle colour: a setting's current choice,
|
|
255
295
|
or a live sample; a chosen row draws its detail in the brand colour and no check, so a column of
|
|
256
|
-
samples stays in line. A row that opens a flyout beside its menu takes `opens` (`aria-haspopup="
|
|
257
|
-
|
|
296
|
+
samples stays in line. A row that opens a flyout beside its menu takes `opens` (`aria-haspopup="dialog"`,
|
|
297
|
+
since the flyout is the components map's `Popover`, a dialog of plain rows; and `aria-expanded` from `open`),
|
|
298
|
+
and `open` while that flyout is up (`data-open`, the pressed ground).
|
|
258
299
|
|
|
259
300
|
The defaults mark themselves with `data-slot="vk-list"`, `data-slot="vk-row"`, `data-slot="vk-row-content"`,
|
|
260
301
|
`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-loading"`, `data-slot="vk-load-more"`, `data-slot="vk-platform"` and `data-slot="vk-row-menu"`, and
|
|
261
302
|
with the states `data-chosen`, `data-disabled`, `data-muted`, `data-checked`, `data-open` (flags),
|
|
262
303
|
`data-status` (the slot's name) and `data-platform` (a link's platform key). A swapped atom marks itself as its app does.
|
|
263
304
|
|
|
264
|
-
Lists that scroll wear the class `scrollbar-overlay`, which an app may define (the
|
|
265
|
-
|
|
305
|
+
Lists that scroll wear the class `scrollbar-overlay`, which an app may define (to show the OS
|
|
306
|
+
overlay scrollbar, say); without it the class does nothing.
|
|
307
|
+
|
|
308
|
+
## The editor panel
|
|
309
|
+
|
|
310
|
+
`EditorPanel` (`@viewkitjs/views/editors/panel`) opens an editor in the components map's `Popover` on
|
|
311
|
+
a desktop and its `Sheet` on a phone, and marks its parts with these slots:
|
|
312
|
+
|
|
313
|
+
| slot | the element |
|
|
314
|
+
| ---------------------------------- | ------------------------------------------------------------- |
|
|
315
|
+
| `data-slot="vk-editor-panel"` | the popover's panel, or the sheet's body, an editor sits in |
|
|
316
|
+
| `data-slot="vk-editor-bar"` | the sheet's bar: its ✕ and its ✓ |
|
|
317
|
+
| `data-slot="vk-editor-refusal"` | the reason a refused value gave, under the editor |
|
|
318
|
+
| `data-slot="vk-text-editor"` | the text editor's box (`@viewkitjs/views/editors/text`), unless its host names its own |
|
|
266
319
|
|
|
267
320
|
## Ports
|
|
268
321
|
|
|
@@ -271,7 +324,8 @@ Runtime services the app hands in through the provider, typed in `src/provider/p
|
|
|
271
324
|
- `toast` — `success(message)`, `error(message)`, `info(message)`, `warning(message, { description })` (a change the person did not make).
|
|
272
325
|
- `haptics` — `selection()`, `impact(style)`, `notification(type)`; an app without a device hands in no-ops.
|
|
273
326
|
- `clipboard` — `writeText(text)` resolving to whether it succeeded; `readText()` resolving to the text or `null`.
|
|
274
|
-
- `viewPrefs` — `get(key)`, `set(key, value)`, `subscribe(key, listener)`: per-device state
|
|
327
|
+
- `viewPrefs` — `get(key)`, `set(key, value)`, `subscribe(key, listener)`: a per-device store for state a view keeps between visits. No view in this release reads it; the grid's preferences come in through `useGridTablePrefs`, from wherever the host keeps them.
|
|
328
|
+
- `confirm` — `confirm({ message, confirmLabel, subject, destructive })` resolving to whether the person said yes; asked before a row's Delete, `subject` being the host's `deleteLabel`. Optional: an app that hands none gets the browser's own confirm with `message`, and a rejection or a throw counts as no. `useViews().ports.confirm` is always a function.
|
|
275
329
|
|
|
276
330
|
## Icons
|
|
277
331
|
|
|
@@ -296,7 +350,7 @@ message, read from the conventions the provider carries. The package's are a clo
|
|
|
296
350
|
`views.editors.*`, `views.menus.*` and `views.display.*`: `views.editors.tag-remove` (`{ label }`),
|
|
297
351
|
`views.editors.marker-resolve`, `views.editors.marker-no-reason`, `views.editors.range-low` and
|
|
298
352
|
`views.editors.range-high` (a range editor's two boxes, "From" and "To"), and `views.editors.name-given`,
|
|
299
|
-
`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); 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`,
|
|
353
|
+
`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`,
|
|
300
354
|
`views.editors.place-city-city` and `views.editors.place-postal-postal`, a place's parts in a panel;
|
|
301
355
|
`views.menus.part-row` (`{ field, part }`, one part's row in a panel: "Location · Country");
|
|
302
356
|
the grid's column menu: `views.menus.sort-asc` ("Sort ascending"), `views.menus.sort-desc`, `views.menus.sort-clear`
|
|
@@ -313,8 +367,9 @@ row), `views.menus.date-style` (`{ style }`: `"short"`, `"long"`, `"numeric"` or
|
|
|
313
367
|
cell), `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:
|
|
314
368
|
`views.menus.copy`, `views.menus.cut`, `views.menus.paste`, `views.menus.clear` and `views.menus.edit` (a cell's lane),
|
|
315
369
|
and the plain row menu's `views.menus.row-open` ("Open page"), `views.menus.row-select` (`{ selected }`, `"true"` is
|
|
316
|
-
"Deselect", as text for a catalog's `select`), `views.menus.row-delete
|
|
317
|
-
browser's confirm before a delete: "Delete this row?")
|
|
370
|
+
"Deselect", as text for a catalog's `select`), `views.menus.row-delete`, `views.menus.row-delete-confirm` (the
|
|
371
|
+
browser's confirm before a delete: "Delete this row?") and `views.menus.row-delete-failed` (the error toast when the
|
|
372
|
+
delete the host ran rejects: "Failed to delete the row");
|
|
318
373
|
the grid's own: `views.grid.figure` (`{ kind }`, a footer figure's name, `"none"` included: "None", "Sum", "Avg", "Min",
|
|
319
374
|
"Max", "Count", "Filled", "Unique", "Ratio"), `views.grid.figure-pick` ("Calculate", an empty footer cell),
|
|
320
375
|
`views.grid.loading` ("Loading rows"), the labels `views.grid.select-row`, `views.grid.select-group`,
|
|
@@ -322,12 +377,16 @@ the grid's own: `views.grid.figure` (`{ kind }`, a footer figure's name, `"none"
|
|
|
322
377
|
`views.grid.change-value`, `views.grid.value` and `views.grid.edit-value` (a long text's box, read-only or not),
|
|
323
378
|
`views.grid.read-only` and `views.grid.read-only-why` (a locked list's badge and its title); its refusals
|
|
324
379
|
`views.grid.locked` (`{ field }`), `views.grid.not-clearable`, `views.grid.computed` (`{ from }`),
|
|
325
|
-
`views.grid.cell-read-only
|
|
380
|
+
`views.grid.cell-read-only`, `views.grid.clear-none` and `views.grid.clear-required` (`{ fields }`, the fields a clear
|
|
381
|
+
over several cells left because they can't be empty, already joined in the viewer's locale); its write gate's `views.grid.write-not-list`,
|
|
326
382
|
`views.grid.write-not-boolean`, `views.grid.write-marker`, `views.grid.write-not-email`, `views.grid.write-not-url`, `views.grid.write-not-link` and
|
|
327
383
|
`views.grid.write-not-linkable`; a paste's `views.grid.paste-refused`, `views.grid.paste-empty`,
|
|
328
384
|
`views.grid.paste-not-number`, `views.grid.paste-not-duration`, `views.grid.paste-not-date`,
|
|
329
|
-
`views.grid.paste-not-option`, `views.grid.paste-
|
|
330
|
-
|
|
385
|
+
`views.grid.paste-not-option`, `views.grid.paste-ambiguous-option` (a label two options share),
|
|
386
|
+
`views.grid.paste-pick` and `views.grid.paste-not-linkable` (each `{ value }`, the pasted text), `views.grid.paste-other-currency` (`{ currency }`, the record's own: an amount pasted or filled into a
|
|
387
|
+
record in another currency) and `views.grid.paste-not-range`; a paste or a fill that refused cells,
|
|
388
|
+
`views.grid.paste-skipped` and `views.grid.fill-skipped` (each `{ count, reason }`: one toast per reason, its
|
|
389
|
+
`reason` one of the refusals above in the app's words; an operation of one cell says the reason alone); and the warnings
|
|
331
390
|
`views.grid.changed-elsewhere` (`{ field }`), `views.grid.changed-elsewhere-cells` (`{ count }`),
|
|
332
391
|
`views.grid.saved-value`, `views.grid.saved-values` and `views.grid.row-left`. The functions that word a refusal
|
|
333
392
|
(`gridClearRefusal`, `columnClearRefusal`, `columnEditRefusal`, `gridEditRefusal`) take the resolver last, and
|
|
@@ -339,23 +398,63 @@ pasted text), `views.grid.paste-not-range` and `views.grid.paste-failed` (`{ cou
|
|
|
339
398
|
(`{ value }`, `"true"` or `"false"` as text so a catalog's `select` reads it: a text boolean with no words of its own), `views.display.show-all` (`{ count }`), and
|
|
340
399
|
`views.display.show-more` and `views.display.show-less` (rich text folded in a drawer), and
|
|
341
400
|
`views.display.phone-extension` (`{ extension }`, "ext. 12" after a phone) and `views.display.phone-as-typed`
|
|
342
|
-
(the title on a phone stored as typed).
|
|
401
|
+
(the title on a phone stored as typed), and `views.display.converted-from` (`{ code }`, "Converted from USD", the
|
|
402
|
+
title on a money figure shown in another currency than its record's) and `views.display.as-shown` ("as shown",
|
|
403
|
+
after that figure under a money editor).
|
|
343
404
|
A span behind now is fields' own `time.ago`. The provider's `messages` resolves them; it defaults to the
|
|
344
405
|
package's English, `resolveViewsMessage`; an app's resolver that words only some keys calls
|
|
345
406
|
`resolveViewsMessage` for the rest, since the provider does not fall back for it. A new key is a
|
|
346
407
|
change to the list and a compile error in every exhaustive resolver (a `switch` with no default)
|
|
347
408
|
that has not worded it.
|
|
348
409
|
|
|
410
|
+
## Four shapes of a value
|
|
411
|
+
|
|
412
|
+
A value takes up to four shapes on its way through a view: **stored** (what the row holds), **draft** (what an editor holds while it is open), **commit** (what the editor hands its host when it closes) and **display** (what a surface draws). Stored and commit differ on purpose, and the binding's `write` is where a host maps one onto the other.
|
|
413
|
+
|
|
414
|
+
| type | stored | draft | commit | display |
|
|
415
|
+
| -------------------------------------------- | --------------------------------------------------------- | ---------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------- |
|
|
416
|
+
| `text` | a string | the text editor's box | a string | the text; a long text folds |
|
|
417
|
+
| `url`, `domain`, `email`, `phone` | a string (a phone `{ number, extension }`) | the text editor's box | the typed text, which fields' `acceptFieldCommit` reads | a link (`tel:` for a phone) |
|
|
418
|
+
| the same, `multiple` | `{ value, label, main }[]`, the main one first | a row each | the whole list (`editors/value-list`) | the main value, and the rest on demand |
|
|
419
|
+
| `number`, `percent`, `currency` | a number (a currency's code fixed, or in a sibling field) | the typed text | `NumberCommit`: `{ value, unit? }` | the figure in the conventions' locale; a percent appended, never multiplied |
|
|
420
|
+
| `date` | `"2026-09-15"` | the picked day | `"2026-09-15"` | the day in the column's style |
|
|
421
|
+
| `datetime` | an ISO instant | the local day and time | `"2026-09-15T14:30"`, local: the host merges it onto the stored instant | the day and time |
|
|
422
|
+
| `boolean` | a boolean | none | a boolean, from the display control itself | a checkbox, an icon, a marker or text |
|
|
423
|
+
| `select`, `status` | the option's code | none: a pick commits | the option's code, or `""` for None on a field that may be emptied | a badge, a status by its semantic slot |
|
|
424
|
+
| `multiselect` | the codes | the chosen codes | the whole set | badges |
|
|
425
|
+
| `relation`, `user` | an id or null (ids for a many relation) | the picked id; a many relation's set | an id, a ref `{ kind, id }`, or `null` for unlinked; a many relation's whole set as stored | a chip `{ id, label, entity, avatarUrl }` the host resolves |
|
|
426
|
+
| `range` | `{ low, high }` | two boxes | `{ low, high }`, an empty box an open end | "11–50" with its unit and period |
|
|
427
|
+
| `name` | `{ full, given, family }` | three boxes | `{ full, given, family }`, or `null` | the full name, else the parts, else the host's fallback |
|
|
428
|
+
| `location` | the place's parts in its country's order | the country, then its parts | the place, or `null` | the place written whole |
|
|
429
|
+
| `rich_text` | a markdown string | the host's own input; in the grid, the long-text panel | the markdown string | folded text |
|
|
430
|
+
| `actor`, `lookup`, `rollup`, `formula` | set by the system, or derived | none | none: no editor opens | a chip, the far field, the result |
|
|
431
|
+
|
|
432
|
+
A clear is the one exception to the commit column. Delete, Cut, the grid row menu's Clear and a clear over a range commit `""` for every type above but three, on a field that may be emptied: a relation (and a member) commits `null` and a multiselect `[]`, and a boolean commits `false`, whether or not it may be emptied. So a cleared number, date, name, range, select or text reaches the binding's `write` as `""`, and the `write` maps it to what the row stores for nothing.
|
|
433
|
+
|
|
434
|
+
A derived field (a lookup, a rollup, a formula) has no commit at all: no edit core, and fields' `zodFor` refuses it. `EDIT_CORES` (`@viewkitjs/views/editors`) answers which types open an edit core; `null` is the answer for a type with none, such as `boolean`, which its display control flips. The text-like types (`text`, `rich_text`, `url`, `domain`, `email`, `phone`) share one, `TextEditor`.
|
|
435
|
+
|
|
436
|
+
## What an edit core never does
|
|
437
|
+
|
|
438
|
+
An editor owns its panel and what a close means. Everything else is its host's, so the same core runs in a grid cell, a drawer row, a card or a form. An edit core never:
|
|
439
|
+
|
|
440
|
+
- calls a mutation or fetches on its own (its host writes, and its host hands it candidates; the relation editor's remote search calls the host's own `search`);
|
|
441
|
+
- closes itself or owns the exit timer (the host's popover closes it, and the edit session holds the gap);
|
|
442
|
+
- reads a form library, the grid's focus or selection, or a host's list.
|
|
443
|
+
|
|
444
|
+
## A command field
|
|
445
|
+
|
|
446
|
+
A field whose changes are transitions with rules of their own (a lost deal needs a reason, a reassigned record moves what is filed against it) declares `edit.mutability: "command"` in `@viewkitjs/fields`. It is edited by verbs, never by an editor: its binding takes no `write` (`checkBinding` refuses one), `bindingWritable` answers false, and `columnFrom` marks the column `command` and never `editable`. The grid cell, the drawer row and the card each open the same menu, shaped by `FieldMenus` (field key → menu items), and the host supplies the verbs; what a verb writes goes through the host's own route for that transition. The cell opens the app's `CommandMenu` atom with the host's items, where an editable cell would open an editor, so the field does not read as frozen; handed no verbs, it is a read-only value.
|
|
447
|
+
|
|
349
448
|
## The doors
|
|
350
449
|
|
|
351
|
-
|
|
450
|
+
Twenty-one doors, and nothing else is importable but `./package.json`. 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).
|
|
352
451
|
|
|
353
452
|
`@viewkitjs/views`, no React at runtime, holds two things. The rendering contract, every name listed:
|
|
354
453
|
the constants `VK_PREFIX`, `GRID_SLOTS`, `GRID_STATES`, `VK_TOKENS`, `VK_COLOURS`,
|
|
355
|
-
`VK_OPTIONAL_COLOURS`, `VK_OPTIONAL_LAYOUT`, `COMPONENT_NAMES`, `ATOM_NAMES`, `ATOM_SLOTS`, `ATOM_STATES`, `PORT_NAMES`,
|
|
454
|
+
`VK_OPTIONAL_COLOURS`, `VK_OPTIONAL_LAYOUT`, `COMPONENT_NAMES`, `OPTIONAL_COMPONENT_NAMES`, `ATOM_NAMES`, `ATOM_SLOTS`, `ATOM_STATES`, `EDITOR_SLOTS`, `PORT_NAMES`,
|
|
356
455
|
`ICON_NAMES`, `MESSAGE_NAMESPACES` and `VIEWS_MESSAGE_KEYS`; the functions `resolveViewsMessage` and `placeWordKey`; and
|
|
357
|
-
the types `GridSlot`, `GridState`, `VkToken`, `VkColour`, `VkOptionalColour`, `VkOptionalLayout`, `ComponentName`,
|
|
358
|
-
`AtomName`, `AtomSlot`, `AtomState`, `PortName`, `ViewsIconName`, `ViewsMessageNamespace`,
|
|
456
|
+
the types `GridSlot`, `GridState`, `VkToken`, `VkColour`, `VkOptionalColour`, `VkOptionalLayout`, `ComponentName`, `OptionalComponentName`,
|
|
457
|
+
`AtomName`, `AtomSlot`, `AtomState`, `EditorSlot`, `PortName`, `ViewsIconName`, `ViewsMessageNamespace`,
|
|
359
458
|
`ViewsMessageKey`, `ViewsMessage`, `ViewsMessageResolver` and `PlaceWordKey`.
|
|
360
459
|
|
|
361
460
|
And the model, by module: every export of `model/index.ts` (the column vocabulary — what a column is,
|
|
@@ -365,18 +464,21 @@ of the five model modules that barrel does not carry (`card-density`, `card-layo
|
|
|
365
464
|
money reading),
|
|
366
465
|
`filters/` (the filter registry and its types, the text, number and date rules, the filter config
|
|
367
466
|
types and their guards), `figures.ts`, `grouping/` (`ListGroup` and the group sort) and `fields/`
|
|
368
|
-
(the binding, money and currency, denomination, the write preparation, the
|
|
467
|
+
(the binding, money and currency, denomination, the write preparation, the write target (`EntityWriteTarget`,
|
|
468
|
+
`EntityWriteReceipt`, `FieldWriteAdmission`, `FieldWriteAdmissionGuard`, `LockedResolver`, `FieldNote`,
|
|
469
|
+
`FieldWriteReconciliationRequired`), the edit-core types, number
|
|
369
470
|
edit, the format knobs and the relation source types, the host's verb-menu types (`FieldMenus`, `FieldRowMenuItem`)). A name exported by one of those modules is
|
|
370
471
|
public; nothing else at the root door is.
|
|
371
472
|
|
|
372
473
|
`@viewkitjs/views/react`, which opens with the client directive: `ViewsProvider`, `useViews()` and
|
|
373
474
|
`NOOP_PORTS`; the provider's types `ViewsProviderProps` and `ViewsContextValue`; the adapter's types
|
|
374
|
-
`ViewsComponents`, `ViewsPorts`, `ViewsIcons` and `ViewsIconProps`; the components' props
|
|
475
|
+
`ViewsComponents`, `ViewsResolvedComponents` (the map as `useViews()` hands it on, `Input` always there), `ViewsPorts`, `ViewsIcons` and `ViewsIconProps`; the components' props
|
|
375
476
|
`ViewsButtonProps`, `ViewsPopoverProps`, `ViewsTooltipProps`, `ViewsCheckboxProps`, `ViewsMenuProps`,
|
|
376
|
-
`ViewsMenuItem`, `ViewsCommandParts`, `ViewsCalendarProps`, `ViewsCollapseProps
|
|
377
|
-
`ViewsSheetProps`, with their shared shapes `ViewsAnchor`, `ViewsSide`, `ViewsAlign`,
|
|
477
|
+
`ViewsMenuItem`, `ViewsCommandParts`, `ViewsCalendarProps`, `ViewsCollapseProps`,
|
|
478
|
+
`ViewsSheetProps` and `ViewsInputProps`, with their shared shapes `ViewsAnchor`, `ViewsSide`, `ViewsAlign`,
|
|
378
479
|
`ViewsCloseReason` and `ViewsOpenChange`; the ports' types `ViewsToastPort`, `ViewsHapticsPort`,
|
|
379
|
-
`ViewsClipboardPort
|
|
480
|
+
`ViewsClipboardPort`, `ViewsPrefsPort`, `ViewsConfirmPort`, `ViewsConfirmRequest` and `ViewsResolvedPorts` (the
|
|
481
|
+
ports `useViews()` hands on, `confirm` always there); the atoms' `DEFAULT_VIEWS_ATOMS` and types `ViewsAtoms`,
|
|
380
482
|
`ViewsListProps`, `ViewsRowProps`, `ViewsRowContentProps`, `ViewsTickBoxProps`, `ViewsStatusBadgeProps`,
|
|
381
483
|
`ViewsStatusMarkerProps`, `ViewsTagProps`, `ViewsCommandMenuProps`, `ViewsRowMenuProps`, `ViewsRowMenuItem`, `ViewsRelationLinkProps`, `ViewsLoadingProps`, `ViewsLoadMoreProps` and `ViewsPlatformMarkProps`; and, re-exported from the root door, `ComponentName`,
|
|
382
484
|
`PortName`, `ViewsIconName`, `ViewsMessage` and `ViewsMessageResolver`. The provider takes an
|
|
@@ -387,16 +489,18 @@ app's. It is called where a value is drawn, so the app's provider imports none o
|
|
|
387
489
|
`@viewkitjs/views/display`, no client directive on the door (a server module may reach its string
|
|
388
490
|
formatters), every rendering file behind it carrying its own: `renderFieldValue` and `DISPLAY_CORES`
|
|
389
491
|
(one renderer per storage type, a plain function that answers `null` for an empty value), the string
|
|
390
|
-
formatters `formatDateValue` and `
|
|
492
|
+
formatters `formatDateValue`, `formatNumberValue` and `formatMoney`, `DEFAULT_FIELD_PRESENTATION`, `viewerFrom`,
|
|
391
493
|
`CellSuffix`, `cellTextClass`, `MultiValueCell`, `CHIP_BASE`, `CHIP_INTERACTIVE`, and the types
|
|
392
494
|
`DisplayCore`, `DisplayOptions`, `FieldPresentation`, `FieldViewerContext`, `NumberLikeFormat` and
|
|
393
495
|
`RelationWrap`. A rendered value reads the provider's conventions, wording and presentation; a string
|
|
394
496
|
formatter handed no viewer reads the neutral conventions, never the runtime's.
|
|
395
497
|
|
|
396
498
|
`@viewkitjs/views/editors`, no client directive on the door: `EDIT_CORES` (one editor per storage
|
|
397
|
-
type, `null` where a type has
|
|
499
|
+
type, `null` where a type has none of its own) and `hasEditCore`. One door per editor, each opening with the
|
|
398
500
|
client directive: `@viewkitjs/views/editors/select` (`SelectEditor`, `SelectEditorHandle`,
|
|
399
|
-
`pickerOptionsFromField`, `PickerOption`), `@viewkitjs/views/editors/
|
|
501
|
+
`pickerOptionsFromField`, `PickerOption`, `SELECT_SEARCH_PAST`), `@viewkitjs/views/editors/text` (`TextEditor`,
|
|
502
|
+
`TextEditorHandle`, `TextEditorProps`, `TextEditorType`, `TEXT_INPUT_TYPE`: one box for text, a link, an email,
|
|
503
|
+
a phone, a domain, long text and rich text), `@viewkitjs/views/editors/relation` (`RelationEditor`,
|
|
400
504
|
`RelationEditorHandle`, `RelationCreate`, `RELATION_PAGE_SIZE`, `RELATION_SEARCH_DEBOUNCE_MS`, and
|
|
401
505
|
the relation source types), `@viewkitjs/views/editors/number` (`NumberEditor`, `NumberEditorHandle`,
|
|
402
506
|
`NumberEditValue`), `@viewkitjs/views/editors/range` (`RangeEditor`, `RangeEditorHandle`: two boxes,
|
|
@@ -412,15 +516,30 @@ messages, read from the provider's conventions unless the host hands `message`.
|
|
|
412
516
|
|
|
413
517
|
`@viewkitjs/views/editors/session`, opening with the client directive: `useAnchoredEditSession` and
|
|
414
518
|
`EDITOR_EXIT_MS` — the one-answer guard and the exit gap every host that opens an editor over a value
|
|
415
|
-
shares
|
|
519
|
+
shares; Escape always discards through it, and a refused attempt's reason comes back as `refusal`
|
|
520
|
+
(`EditSession`, `EditSessionAttempt`). Its own door, so a host that needs the session does not load the six editors.
|
|
521
|
+
|
|
522
|
+
`@viewkitjs/views/editors/panel`, opening with the client directive: `EditorPanel`, `EditorPanelProps`
|
|
523
|
+
and `EditorSurface` — an editor opened as the components map's `Popover` on a desktop and its `Sheet`
|
|
524
|
+
on a phone, by the provider's `desktopQuery`, chosen once when the session opens.
|
|
416
525
|
|
|
417
526
|
`@viewkitjs/views/editors/open-values`, opening with the client directive: `OpenValuesProvider`,
|
|
418
|
-
`useOpenValues(field)
|
|
527
|
+
`useOpenValues(field)`, `offeredValues(field, known, seen)` and `takesNewValues(field)`. An open field's values (what its records
|
|
419
528
|
hold, which the app's list answers) reach every editor of it: the app provides them above a surface, and
|
|
420
529
|
a host reads them, asking once for a field's values when its editor mounts. A closed field, or no
|
|
421
530
|
provider, reads none and asks nothing. `offeredValues` is what a host offers: the declared options, then
|
|
422
531
|
the known values, then those seen, each once. `useOpenValuesContext()` reads the nearest provider whole: what a host
|
|
423
|
-
hands `buildRelationFilters` as `farValues
|
|
532
|
+
hands `buildRelationFilters` as `farValues`.
|
|
533
|
+
|
|
534
|
+
`@viewkitjs/views/field-row`, opening with the client directive: `FieldRow` (`FieldRowProps`), one field of a
|
|
535
|
+
record drawn as its label, its value and, on a click, its type's editor in place, with `RowEditor` and `ROW_HOSTS`
|
|
536
|
+
(`RowEditorProps`, `RowEditorAttempt`, `RowClosed`, `RowHostProps`), the host each type mounts; and
|
|
537
|
+
`useFieldWrite` (`FieldWriteOptions`, `EditTiming`), the write path that admits a commit at once, queues one
|
|
538
|
+
record's writes, settles each on the save's receipt and rolls a failure back, with `FieldWriteRefusal`,
|
|
539
|
+
and, re-exported from the root door that holds them as the model, `FieldWriteReconciliationRequired` and the shapes it
|
|
540
|
+
writes through (`EntityWriteTarget`, `EntityWriteReceipt`, `FieldWriteAdmission`, `FieldWriteAdmissionGuard`,
|
|
541
|
+
`LockedResolver`, `FieldNote`). The panel around the rows
|
|
542
|
+
(its sections, its related records) is the app's.
|
|
424
543
|
|
|
425
544
|
A relation's Related records row (`buildRelationFilters`) offers a far relation, user or actor by name
|
|
426
545
|
only when its target names it (`RelationFilterTarget.named`, from the host's builder) and the host hands
|
|
@@ -446,6 +565,17 @@ rules `selectFromClick`, `preventShiftTextSelect`, `ROW_INTERACTIVE_SELECTOR`, `
|
|
|
446
565
|
and `ROW_NO_TEXT_SELECT`, and the types `ListSelectionConfig`, `ListBatchApi`, `SelectionRetention` and
|
|
447
566
|
`UseListSelectionResult`. The bar the selection opens is the app's.
|
|
448
567
|
|
|
568
|
+
`@viewkitjs/views/grid`, no client directive on the door, every rendering file behind it carrying its
|
|
569
|
+
own: `GridTable` and its props `GridTableProps` (flat, as a host's binding hands them),
|
|
570
|
+
`useGridTablePrefs` (a grid's personal preferences: the host's prefs and their setter in, the props to spread onto `GridTable` out), the types
|
|
571
|
+
an app writes its props against, `GridSortState`, `GridGroupSortOption`, `GridCellCommitFn` and
|
|
572
|
+
`GridCellsCommitFn`, and `GridGroupByState`, `GridGroupFigure` and `GroupCountNoun`; and the helpers a
|
|
573
|
+
host's binding shares with the grid: `GridCommitContext` and `GridCommitOutcome` (what a commit was and how it ended),
|
|
574
|
+
`deriveGridSelectValues` and `deriveGridRelationValues` (the values a column's filter offers),
|
|
575
|
+
`cellCopyText` and `cellEditBaseline` (a cell's copy text and the value an edit starts from, which a
|
|
576
|
+
CSV export reuses), and `GRID_TITLE_LINK_CLASS`. The selection bar, the house menu rows, the group
|
|
577
|
+
collapse and the type icons are the app's.
|
|
578
|
+
|
|
449
579
|
## Registry items
|
|
450
580
|
|
|
451
581
|
When the copy mode ships, each view's default rendering is one registry item, tagged by the package
|