@viewkitjs/views 0.5.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 +620 -0
- package/README.md +4 -2
- 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 +2 -2
- package/dist/atoms/DrillRows.js +7 -5
- package/dist/atoms/Loading.d.ts +6 -0
- package/dist/atoms/Loading.js +4 -1
- package/dist/atoms/PanelRows.js +3 -5
- 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.js +5 -4
- package/dist/atoms/ToolbarButton.d.ts +2 -0
- package/dist/atoms/ToolbarButton.js +18 -0
- package/dist/atoms/defaults.js +10 -0
- package/dist/atoms/types.d.ts +141 -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 +351 -15
- package/dist/contract.js +482 -4
- 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/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 +4 -1
- package/dist/grid/chrome/GridColumnMenu.js +5 -3
- package/dist/grid/chrome/GridColumnSortSection.d.ts +20 -0
- 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 +5 -1
- 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 +19 -20
- package/dist/grid/useGridTablePrefs.js +6 -58
- package/dist/grid/useGridTableSettings.d.ts +60 -0
- package/dist/grid/useGridTableSettings.js +61 -0
- package/dist/internal/count.d.ts +3 -0
- package/dist/internal/count.js +3 -0
- 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-sort.d.ts +11 -0
- package/dist/model/column-sort.js +14 -0
- package/dist/model/one-value.d.ts +6 -0
- package/dist/model/one-value.js +5 -0
- 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/relation-filters.d.ts +13 -2
- package/dist/model/relation-filters.js +9 -4
- package/dist/model/row-icon.d.ts +16 -6
- 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.js +6 -2
- 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 +46 -6
- package/dist/provider/ViewsProvider.js +32 -2
- package/dist/provider/components.d.ts +258 -11
- package/dist/provider/context.d.ts +21 -2
- package/dist/react.d.ts +5 -2
- package/dist/selection/SelectionBar.js +13 -7
- package/dist/selection/bar-overflow.js +14 -1
- package/dist/selection/bar-parts.d.ts +4 -2
- package/dist/selection/bar-parts.js +5 -3
- package/dist/selection/useListSelectionShortcuts.d.ts +3 -2
- package/dist/selection/useListSelectionShortcuts.js +1 -1
- package/dist/selection/verbs.d.ts +7 -0
- package/docs/contract.md +307 -41
- package/docs/getting-started.md +1 -1
- package/docs/guides/atoms.md +37 -5
- 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 +4 -2
- package/docs/guides/the-grid.md +21 -11
- package/docs/guides/the-provider.md +22 -6
- package/docs/index.md +2 -2
- package/docs/install.md +2 -3
- 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 +8 -5
- package/docs/reference/panels-react.md +101 -0
- package/docs/reference/panels.md +123 -0
- package/docs/reference/react.md +39 -16
- package/docs/reference/selection.md +5 -5
- package/docs/reference/views.md +17 -12
- package/package.json +16 -6
- package/skills/views/SKILL.md +4 -3
|
@@ -9,17 +9,17 @@ Guide: [selection](../guides/selection.md).
|
|
|
9
9
|
- `useListSelection` — a list's selection: takes `orderedIds` (the ids in visual order, after filter, sort and grouping), an optional `retention` (`"ordered"` by default) and an optional `resetKey`, and returns a `UseListSelectionResult`. A new `resetKey` empties it. Turning rows on or off ticks the provider's `haptics.selection()`; selecting all gives a medium impact; `clear` is silent.
|
|
10
10
|
- `UseListSelectionResult` — what `useListSelection` returns: `selectedIds`, `count`, `isSelected(id)`, `anchorId`, `allSelected` and `someSelected` (some but not all, for an indeterminate box), and the verbs `toggle(id, next?)` (sets the range anchor), `toggleRange(id)` (adds the run from the anchor to `id`), `toggleMany(ids)` (selects them all, or clears them when all are selected), `selectAll()`, `clear()` (also resets the anchor) and `setSelected(ids)`.
|
|
11
11
|
- `SelectionRetention` — what happens to a selected id that leaves the visual order: `"ordered"` drops it; `"external"` keeps it, for a selection across a whole query whose rows need not all be loaded. Either way the range anchor must stay visible to count.
|
|
12
|
-
- `useEscapeToClear` — while `active` is true, Escape anywhere in the window calls `clear
|
|
12
|
+
- `useEscapeToClear` — while `active` is true, Escape anywhere in the window calls `clear`, unless something open already took it (`defaultPrevented`, as a menu or popover closing on it marks it).
|
|
13
13
|
- `ListSelectionConfig` — what a list or table takes to be selectable (the grid's `selection`): `resetKey` (the selection clears when it changes), with optional `renderBar` (draws the bar from the selection and, when the renderer can write, a `ListBatchApi`; left out, rows still tick and no bar is drawn), `orderedIds` and `retention`.
|
|
14
14
|
- `ListBatchApi` — the batch write a renderer with an editing model hands your bar: `setColumnValue(rowIds, columnId, value)`, resolving to whether the write landed. The grid's resolves `false` for a column it cannot write, and skips an id whose row is not loaded.
|
|
15
15
|
|
|
16
16
|
## The bar
|
|
17
17
|
|
|
18
|
-
- `SelectionBar` — the bar a selection opens, portalled to the body and placed by the provider's `selectionBar`. On a desktop, an island: the count chip (a press clears the selection; its tooltip names Escape), the first four verbs, the trash when `onDelete` is handed, a hairline and More, always drawn, holding the rest (a group or an options verb opening its rows beside it). On a phone, a pill reading the count, Actions and ✕; Actions opens the `SelectionSheet` atom. It draws nothing while `count` is zero.
|
|
18
|
+
- `SelectionBar` — the bar a selection opens, portalled to the body and placed by the provider's `selectionBar`. On a desktop, an island: the count chip (a press clears the selection; its tooltip names Escape; ViewKit's own, or your `Button` with `selectionBar`'s `chip: "button"`), the first four verbs, the trash when `onDelete` is handed, a hairline and More, always drawn (disabled when nothing spills into it), holding the rest (a group or an options verb opening its rows beside it). On a phone, a pill reading the count, Actions and ✕; Actions opens the `SelectionSheet` atom. It draws nothing while `count` is zero.
|
|
19
19
|
- `SelectionBarProps` — what `SelectionBar` takes: `count`, `onClear`, `verbs` (`SelectionVerb`s, in order), optional `busy` (disables every control), `onDelete` (the bar's own verb, the trailing trash; never a verb in `verbs`) and `deleteLabel` (the trash's name; default the `views.selection.delete` message).
|
|
20
|
-
- `SelectionVerb` — one verb, as data: `{ kind: "action" }` with a `SelectionVerbItem`'s fields; `{ kind: "group", label, icon?, disabled?, items }`, a button opening a menu of `SelectionVerbItem`s; or a `SelectionOptionsVerb`.
|
|
21
|
-
- `SelectionVerbItem` — an action: `label`, optional `icon` (your glyph), `onClick`, `destructive` (the danger colour) and `disabled
|
|
22
|
-
- `SelectionOptionsVerb` — one field set on every selected row: `{ kind: "options", label, icon?, disabled?, options, onSelect }`, its `options` `PickerOption`s drawn as the badges a cell shows, `onSelect` handed the value picked. It closes, then runs.
|
|
20
|
+
- `SelectionVerb` — one verb, as data: `{ kind: "action" }` with a `SelectionVerbItem`'s fields; `{ kind: "group", label, icon?, disabled?, disabledReason?, items }`, a button opening a menu of `SelectionVerbItem`s, whose rows that give no reason carry the group's; or a `SelectionOptionsVerb`.
|
|
21
|
+
- `SelectionVerbItem` — an action: `label`, optional `icon` (your glyph), `onClick`, `destructive` (the danger colour), `disabled`, and `disabledReason`, why it is disabled: More's row, the bar's button and the phone's sheet carry it.
|
|
22
|
+
- `SelectionOptionsVerb` — one field set on every selected row: `{ kind: "options", label, icon?, disabled?, disabledReason?, options, onSelect }`, its `options` `PickerOption`s drawn as the badges a cell shows, `onSelect` handed the value picked. It closes, then runs.
|
|
23
23
|
|
|
24
24
|
## Picking rows with the pointer
|
|
25
25
|
|
package/docs/reference/views.md
CHANGED
|
@@ -11,7 +11,7 @@ Guide: [the provider](../guides/the-provider.md).
|
|
|
11
11
|
- `VK_PREFIX` — the prefix `"vk"`, worn by everything that shares a global namespace: the CSS variables (`--vk-*`) and the `data-slot` values (`vk-grid-row`). States are bare `data-*` attributes, and message keys live under `views.*` ([the contract](../contract.md)).
|
|
12
12
|
- `GRID_SLOTS` — every `data-slot` value the grid draws, from `vk-grid` (the frame) to `vk-grid-aggregate-menu`, in the order of the [contract's Slots table](../contract.md#slots). A skin styles a part through its slot, never through a class name the package happens to use.
|
|
13
13
|
- `GridSlot` — one member of `GRID_SLOTS`.
|
|
14
|
-
- `GRID_STATES` — the flags the grid styles, each a `data-*` attribute present when true (`focused`, `selected`, `editing`, `in-range`, `range-edge`, `pending`, `invalid`, `dragging`, `empty`, `frozen`, `scrolled`, `parked`), as the [contract's States table](../contract.md#states) lists them with where each sits.
|
|
14
|
+
- `GRID_STATES` — the flags the grid styles, each a `data-*` attribute present when true (`focused`, `selected`, `editing`, `in-range`, `range-edge`, `pending`, `invalid`, `dragging`, `empty`, `frozen`, `scrolled`, `parked`, `collapsed`, `stuck`, `open`), as the [contract's States table](../contract.md#states) lists them with where each sits.
|
|
15
15
|
- `GridState` — one member of `GRID_STATES`.
|
|
16
16
|
- `VK_TOKENS` — the CSS variables the package owns and sets on the grid's frame: geometry and density (`--vk-scale`, `--vk-row-h`, the paddings, the text sizes, the 0-or-1 flags `--vk-scrolled`, `--vk-parked` and `--vk-frozen-on`). A skin reads them and an app overrides them on the frame ([Tokens](../contract.md#tokens)).
|
|
17
17
|
- `VkToken` — one member of `VK_TOKENS`.
|
|
@@ -19,14 +19,14 @@ Guide: [the provider](../guides/the-provider.md).
|
|
|
19
19
|
- `VkColour` — one member of `VK_COLOURS`.
|
|
20
20
|
- `VK_OPTIONAL_COLOURS` — the status hues (`--vk-success`, `--vk-warning`, `--vk-info`) and the category hues (`--vk-label-blue` to `--vk-label-teal`) the default atoms and the display read when your app declares them, each with a built-in fallback ([Tokens](../contract.md#tokens)).
|
|
21
21
|
- `VkOptionalColour` — one member of `VK_OPTIONAL_COLOURS`.
|
|
22
|
-
- `VK_OPTIONAL_LAYOUT` — the layout your app may declare, each read with a
|
|
22
|
+
- `VK_OPTIONAL_LAYOUT` — the layout your app may declare, each read with a fallback: `--vk-gutter` (`0px`), the side padding your page gives its content, which the grid's rows line their content up with; `--vk-scroll-inset-bottom` (`0px`), how much of the grid's foot your app covers with something it floats there (a phone's bottom bar), so the grid's scroll area runs underneath it and its last row scrolls clear of it; and `--vk-panel-padding` (`0.375rem`), the inset a panel's list keeps from the panel's edge ([Tokens](../contract.md#tokens)).
|
|
23
23
|
- `VkOptionalLayout` — one member of `VK_OPTIONAL_LAYOUT`.
|
|
24
24
|
- `VK_INTERNAL` — the grid's own variables, set and read by the grid alone: `--vk-drag-shift`, a header cell's offset while its column is dragged. Prefixed because they share the global namespace, and not public: your app neither sets nor reads them, and they may change in any release.
|
|
25
25
|
- `VkInternal` — one member of `VK_INTERNAL`.
|
|
26
26
|
- `VK_INTERNAL_FAMILIES` — the grid's internal variable families, a prefix with one variable per key after it: `--vk-col-w-<id>`, one column's resolved width, set on the grid's root for every visible column. Not public, like `VK_INTERNAL`.
|
|
27
27
|
- `COMPONENT_NAMES` — the primitives your app hands in through the provider: `Button`, `Popover`, `Tooltip`, `Checkbox`, `Menu`, `Collapse`, `Sheet`, `AppIcon` and `Markdown` ([the components map](../contract.md#the-components-map)).
|
|
28
28
|
- `ComponentName` — one member of `COMPONENT_NAMES`.
|
|
29
|
-
- `OPTIONAL_COMPONENT_NAMES` — the primitives your app may leave out: `Input` (a plain default), `Command` (reached without one, it throws an error naming it), `Picker` (without one, the lists draw from `Command`), `Calendar` (reached without one, it throws an error naming it)
|
|
29
|
+
- `OPTIONAL_COMPONENT_NAMES` — the primitives your app may leave out: `Input` (a plain default), `Command` (reached without one, it throws an error naming it), `Picker` (without one, the lists draw from `Command`), `Calendar` (reached without one, it throws an error naming it), `DateBody` (without one, the date editor draws its own around `Calendar`), `PartsBody` (without one, the name, place and range editors draw their own boxes), `ValuesBody` (without one, the value list editor draws its own rows), `TextBody` (without one, the text editors draw their own box) and `NumberBody` (without one, the number editors draw their own box) ([the components map](../contract.md#the-components-map)).
|
|
30
30
|
- `OptionalComponentName` — one member of `OPTIONAL_COMPONENT_NAMES`.
|
|
31
31
|
- `ATOM_NAMES` — the pieces the rendering is built from, and the pieces of your app's own it cannot draw itself (a command cell's verb menu, the row's right-click menu, where a relation goes, a wait, how a list asks for more), and the panels' rows. Each ships as a default, and your app swaps any of them through the provider's `atoms` ([the atoms](../contract.md#the-atoms)).
|
|
32
32
|
- `AtomName` — one member of `ATOM_NAMES`.
|
|
@@ -34,6 +34,8 @@ Guide: [the provider](../guides/the-provider.md).
|
|
|
34
34
|
- `AtomSlot` — one member of `ATOM_SLOTS`.
|
|
35
35
|
- `EDITOR_SLOTS` — the `data-slot` values the editor panel marks its parts with, prefixed like the grid's (`vk-editor-panel`, `vk-editor-bar`, `vk-editor-refusal`) ([the editor panel](../contract.md#the-editor-panel)).
|
|
36
36
|
- `EditorSlot` — one member of `EDITOR_SLOTS`.
|
|
37
|
+
- `EDITOR_STATES` — the states the editor panel's popover carries: `vk-body`, the app's own body it holds (`picker`, `parts` or `values`), set only when the provider's `bodyFrame` is `popover`.
|
|
38
|
+
- `EditorState` — one member of `EDITOR_STATES`.
|
|
37
39
|
- `SELECTION_SLOTS` — the `data-slot` values the selection bar marks its parts with, prefixed like the grid's (`vk-selection-bar`, `vk-selection-pill`, `vk-selection-chip`) ([slots](../contract.md#slots)).
|
|
38
40
|
- `SelectionSlot` — one member of `SELECTION_SLOTS`.
|
|
39
41
|
- `ATOM_STATES` — the default atoms' states: `chosen`, `disabled`, `muted`, `checked` and `open` are flags present when true, `status` carries the status slot's name and `platform` a link's platform key ([the atoms](../contract.md#the-atoms)).
|
|
@@ -122,7 +124,7 @@ What the machinery may do with each column type, declared once per type so a new
|
|
|
122
124
|
|
|
123
125
|
Three layers decide a write, and each may only take away from the one before: the column's declaration, the workspace's settings for the list (`ListSettingsConfig`), and a person's preferences. The `columnEffective…` and `gridColumnEffective…` answers apply the first two together, and are the ones a write gate asks.
|
|
124
126
|
|
|
125
|
-
- `gridEditorKind` — the editor a column mounts, or `null`: none unless the column is `editable` and typed. A `multiple` column mounts `values` for the four types that keep several values and nothing for any other; a `title` whose field is a name mounts `name`; a `location` column mounts `place` when its field is a place, whose parts the editor reads, and nothing without one; any other column mounts its type's editor.
|
|
127
|
+
- `gridEditorKind` — the editor a column mounts, or `null`: none unless the column is `editable` and typed. A `multiple` column mounts `values` for the four types that keep several values and nothing for any other; a single `email` or `domain` column mounts `values` where its optional second argument, the provider's `oneValue`, says `list` for its type; a `title` whose field is a name mounts `name`; a `location` column mounts `place` when its field is a place, whose parts the editor reads, and nothing without one; any other column mounts its type's editor.
|
|
126
128
|
- `gridColumnHasEditor` — whether a column mounts an editor: the question a click, a double-click, Enter or typing asks. A boolean answers false and is still writable, which is why `columnWritable` is a separate answer.
|
|
127
129
|
- `columnWritable` — whether a column can be written by any route (an editor, Delete, Clear, a fill, a paste), by its declaration alone: false for a derived (`custom`) or `command` column and for one not `editable`; otherwise true when it mounts an editor or is a boolean. Gate sites ask `columnEffectiveWritable`, which adds the workspace's locks.
|
|
128
130
|
- `gridBooleanMode` — a boolean column's write model: `marker` (one-way, true to false) for a `marker` display, `toggle` for every other; `null` for a column that is not a boolean.
|
|
@@ -147,7 +149,7 @@ Three layers decide a write, and each may only take away from the one before: th
|
|
|
147
149
|
- `isLongTextColumn` — whether a column holds a paragraph rather than a phrase: a `text` column with `format.long`, or a `rich_text` column. It reads and edits in the anchored long-text panel rather than the one-line input.
|
|
148
150
|
- `gridColumnInspectable` — whether a cell opens a panel to be read in full, whatever its write state, so a long text that can't be edited can still be read. Long text is the one kind that always does; a cut-off line does when its cell cuts it off (`isWholeTextColumn`).
|
|
149
151
|
- `isWholeTextColumn` — whether a column's text opens whole in that panel when its cell cuts it off: a plain `text` (not a paragraph) and a `title` that is text, not a person's name. Links, emails, phones and domains keep their one-line box.
|
|
150
|
-
- `gridTextOpensBox(column, whole)` — whether an open text cell is drawn in the panel over the cell rather than in the cell: a paragraph always, a line when it was opened `whole` (cut off when it opened).
|
|
152
|
+
- `gridTextOpensBox(column, whole, inCell?)` — whether an open text cell is drawn in the panel over the cell rather than in the cell: a paragraph always, a line when it was opened `whole` (cut off when it opened); never with `inCell` (an app's `TextBody` is handed and the cell is writable: the body stands in the cell).
|
|
151
153
|
|
|
152
154
|
## Column state
|
|
153
155
|
|
|
@@ -177,7 +179,9 @@ What a person changes about the columns (which are shown, in what order, at what
|
|
|
177
179
|
|
|
178
180
|
## Sorting and grouping
|
|
179
181
|
|
|
180
|
-
- `effectiveSortKey` — the key a column sorts by, or `undefined`. `sortable: false` offers none; a declared `sortKey` always wins. Without one, on a saved view (`viewBacked`), a bound column with an `accessor` sorts by its field's key, except a location or rich text, which
|
|
182
|
+
- `effectiveSortKey` — the key a column sorts by, or `undefined`. `sortable: false` offers none; a declared `sortKey` always wins. Without one, on a saved view (`viewBacked`), a bound column with an `accessor` sorts by its field's key, except a location, which sorts only by one of its parts (`columnSortParts`), or rich text, which has no order; off a saved view a column sorts only by a declared key, since your host owns the comparator there.
|
|
183
|
+
- `columnSortParts` — the parts a place column sorts by, from its header and the Sort panel: `city`, `region`, `countryCode` and `postalCode`, narrowed to the parts its field holds. Offered on the terms of a field's own sort (a saved view, an `accessor`, no declared `sortKey`, not `sortable: false`); `[]` for any other column. A sort by one is the part key `partKey(fieldKey, part)`.
|
|
184
|
+
- `sortPartOf` — the part a place column sorts by while a sort value is one of its part keys (`sortPartOf(value, fieldKey, parts)`), else `undefined`.
|
|
181
185
|
- `sortableColumns` — the Sort options a saved view offers, one per sort key in the columns' order (the first column that presents a key keeps it). With `parts: true`, each order of a value beyond its whole sort follows its column, keyed `partKey(fieldKey, by)`. Returns `SortableEntry` items.
|
|
182
186
|
- `SortableEntry` — one Sort option: its `key`, the `column` it sorts by and, for one order of a value, that order (`by`). The sort a host stores is `{ fieldKey, direction, by }`.
|
|
183
187
|
- `columnGroupable` — whether a column offers Group by on a saved view: it presents a field of a type that can split a list, and the list has not set `bucketable: false`.
|
|
@@ -195,10 +199,10 @@ The filter panel's rows come from the columns themselves: every column is listed
|
|
|
195
199
|
- Reading: `decimals` (what each number cell shows, so equality rounds as the eye does), `columnState` and `viewId` (what "hidden" means for this view), `icon` (each row's glyph), `messages` and `conventions`.
|
|
196
200
|
- `parts: true` adds one row per part of a value right under its column ("Location · Country"), keyed `partKey(columnId, part)`; a location's whole-value row gives way to its parts.
|
|
197
201
|
- `filterEditor` — the filter editor a column's type opens (`ListFilterEditor`), or `null` for an untyped column.
|
|
198
|
-
- `booleanFilterOptions` — a boolean column's two filter choices, worded as its cell is: a marker reads its `marker.label` (or its header) and "Not …", a `text` display reads its two option labels (True and False by default), and a checkbox reads Checked and Unchecked.
|
|
202
|
+
- `booleanFilterOptions` — a boolean column's two filter choices, worded as its cell is: a marker reads its `marker.label` (or its header) and "Not …", a `text` display reads its two option labels (`views.display.boolean`'s True and False by default), and a checkbox reads Checked and Unchecked. Its optional second argument, a `ViewsMessageResolver`, words them: `views.panels.boolean-checked`, `views.panels.boolean-unchecked` and `views.panels.boolean-not` (`{ label }`).
|
|
199
203
|
- `numberDecimals` — the decimals a number cell shows, so a filter's equality rounds to what is on screen: `0` on an integer field, else the override for its field key, else its `format.decimals`, else `2`.
|
|
200
204
|
- `rowMatchesRules` — whether one row satisfies every filter rule, reading each value through its column's `accessor`. Rules join with AND and an inactive rule matches everything. A column with no accessor is skipped, and a key that is no column's id is read as a part row's. An absent boolean counts as false; picked options join with OR, and a multiselect matches when any of its values was picked; a relation compares by id and an actor by its key. Takes the row, the rules, the columns, the decimals each cell shows and the conventions.
|
|
201
|
-
- `HIDDEN_COLUMN_SECTION` — the section label, "Hidden columns"
|
|
205
|
+
- `HIDDEN_COLUMN_SECTION` — the section label in the package's English, "Hidden columns". `buildColumnFilters` files a hidden column's row under `views.panels.hidden-columns`, worded by its `messages`, which this is without them.
|
|
202
206
|
|
|
203
207
|
## Declaration warnings
|
|
204
208
|
|
|
@@ -210,7 +214,8 @@ Mistakes a column declaration can make that nothing else catches, returned as li
|
|
|
210
214
|
## The row icon
|
|
211
215
|
|
|
212
216
|
- `ListRowIconAccessor` — what a list declares as `rowIcon` for the leading glyph in each row's title cell: a function from a row to an icon name for the neutral default, a `ListRowIcon` to tint it, or `null` to draw none for that row.
|
|
213
|
-
- `ListRowIcon` — a row icon as a descriptor: `icon`, your app's own name for the glyph, which your `AppIcon` draws, and an optional `tone`, a status slot asked for by name, because a coloured row icon says something about state. Without one the glyph draws in the secondary text colour. The grid owns its size and colour.
|
|
217
|
+
- `ListRowIcon` — a row icon as a descriptor: `icon`, your app's own name for the glyph, which your `AppIcon` draws, and an optional `tone`, a status slot asked for by name, because a coloured row icon says something about state. Without one the glyph draws in the secondary text colour. The grid owns its size and colour, and an optional `avatar`, a `ListRowAvatar`: with it the grid draws the row's picture through your `Avatar` atom at the glyph's size, the glyph its fallback.
|
|
218
|
+
- `ListRowAvatar` — a row's picture before its name, as data: `label` (whose picture it is), `avatarUrl` when there is one and `kind` (the record's kind as your app names it), handed to your `Avatar` atom.
|
|
214
219
|
- `normalizeRowIcon` — reads either answer a `ListRowIconAccessor` gives as a `ListRowIcon`: a bare name becomes `{ icon }`, a descriptor stays as it is, and `null` stays `null`.
|
|
215
220
|
|
|
216
221
|
## Render counting
|
|
@@ -432,7 +437,7 @@ Each rule is data, an operator and its values, so the same rule is judged in mem
|
|
|
432
437
|
One row of the Filter panel is one `FilterConfig`, the union of what each editor needs, told apart by `editor`. They are types and pure functions, safe on a server.
|
|
433
438
|
|
|
434
439
|
- `FilterConfig` — one Filter panel row: an option row picking one value or several (`editor` absent), or a text, number, date, range, relation or unavailable row. It is generic over the option value's type.
|
|
435
|
-
- `FilterConfigBase` — what every row carries: `key`, `label` and optionally `icon` and `kind`. `disabled` lists a row that cannot be opened, so a table's every column reads as one inventory; it is never active, counted or cleared. `section` puts the row under a labelled section, with unsectioned rows first. `valueLabel` replaces the derived summary on the right ("All types", "3 selected"). `onOpen` is called once each time the row's detail opens, so the host can fetch the values it offers. `countsAsFilter` is optional too.
|
|
440
|
+
- `FilterConfigBase` — what every row carries: `key`, `label` and optionally `icon` and `kind`. `disabled` lists a row that cannot be opened, with its `disabledReason` shown on the row, so a table's every column reads as one inventory; it is never active, counted or cleared. `section` puts the row under a labelled section, with unsectioned rows first. `valueLabel` replaces the derived summary on the right ("All types", "3 selected"). `onOpen` is called once each time the row's detail opens, so the host can fetch the values it offers. `countsAsFilter` is optional too.
|
|
436
441
|
- `FilterKind` — what a row filters, which its default icon is chosen by: `status`, `category`, `metric` or `entity`.
|
|
437
442
|
- `FilterOption` — one choice in an option row: its `value`, its `label` and optionally an `icon`.
|
|
438
443
|
- `FilterConfigSingle` — an option row with one choice: `value`, `onChange` and `options`. Optionally the value that means every value (`allValue`, `"all"` when unstated) and its label, whether that choice is hidden, render hooks for an option and its leading and trailing parts, and the list's class name.
|
|
@@ -466,8 +471,8 @@ A relation rule says which far records must match, any, none or every, and holds
|
|
|
466
471
|
|
|
467
472
|
One Filter panel row per relation the list's source can look across, under the section Related records, with the far fields as its Where rows. The Where rows are the column filter's own (`buildColumnFilters`) over columns made from the far fields, so a far status, number, date or text opens the editor it opens everywhere.
|
|
468
473
|
|
|
469
|
-
- `buildRelationFilters` — builds the Related records rows, one `FilterConfigRelation` per target. It takes `targets` keyed by the relation's field key, the current `rules`, `onRuleChange(fieldKey, rule)`, the `subject` (what the list's rows are, plural and lower case), optionally an `icon` for the rows and a `fieldIcon` for each Where row, and `
|
|
470
|
-
- `RelationFilterTarget` — one relation the list can filter across: the far entity's `kind` ("campaign"), the relation's own `label` on the list's entity ("Campaigns"), the far `fields` a Where rule may name,
|
|
474
|
+
- `buildRelationFilters` — builds the Related records rows, one `FilterConfigRelation` per target. It takes `targets` keyed by the relation's field key, the current `rules`, `onRuleChange(fieldKey, rule)`, the `subject` (what the list's rows are, plural and lower case), optionally an `icon` for the rows and a `fieldIcon` for each Where row, `farValues`, and `messages` and `conventions`, which word its Related records heading (`views.panels.related-records`) and reach its Where rows. A far relation, user or actor is offered only when its target names it and `farValues` answers it; without, it is listed greyed, as is a place and an option field that declares no options.
|
|
475
|
+
- `RelationFilterTarget` — one relation the list can filter across: the far entity's `kind` ("campaign"), the relation's own `label` on the list's entity ("Campaigns"), the far `fields` a Where rule may name, `named`, the far relations, users or actors whose values the host answers by name, and an optional `noun` (`{ one, many }`), the far record's noun in your words; absent, the kind with its hyphens as spaces and the label lower-cased in the conventions' locale. A far field it leaves out stays greyed.
|
|
471
476
|
- `FarValues` — the far values a host hands as `farValues`, keyed by `farPathOf`: `values`, each path's values; optionally `labels`, each path's values to their names; and `onWanted(path)`, called when a named far field's row opens, so the host can fetch its values.
|
|
472
477
|
- `farPathOf` — a far field's path, as the host keys its values: the relation's key (itself a two-hop path, `a.b`, for a rollup's second hop), `FAR_PATH_SEPARATOR` and the far field's key, such as `deals.owner`.
|
|
473
478
|
- `FAR_PATH_SEPARATOR` — `.`, what separates a far path's hops and its far field; a field key never holds one.
|
package/package.json
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viewkitjs/views",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "ViewKit views — the grid, board, calendar and list over typed fields: a headless engine and a default rendering written to skin discipline. By Sheaf.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": false,
|
|
8
8
|
"files": [
|
|
9
9
|
"dist",
|
|
10
|
-
"!dist/panels",
|
|
11
10
|
"skills",
|
|
12
11
|
"docs",
|
|
13
|
-
"!docs/reference/panels.md",
|
|
14
12
|
"README.md",
|
|
15
13
|
"CHANGELOG.md",
|
|
16
14
|
"LICENSE.md"
|
|
@@ -103,6 +101,14 @@
|
|
|
103
101
|
"types": "./dist/grid/index.d.ts",
|
|
104
102
|
"default": "./dist/grid/index.js"
|
|
105
103
|
},
|
|
104
|
+
"./panels": {
|
|
105
|
+
"types": "./dist/panels/index.d.ts",
|
|
106
|
+
"default": "./dist/panels/index.js"
|
|
107
|
+
},
|
|
108
|
+
"./panels/react": {
|
|
109
|
+
"types": "./dist/panels/react.d.ts",
|
|
110
|
+
"default": "./dist/panels/react.js"
|
|
111
|
+
},
|
|
106
112
|
"./package.json": "./package.json"
|
|
107
113
|
},
|
|
108
114
|
"publishConfig": {
|
|
@@ -113,7 +119,7 @@
|
|
|
113
119
|
"@dnd-kit/core": "^6.3.1",
|
|
114
120
|
"@dnd-kit/sortable": "^10.0.0",
|
|
115
121
|
"@dnd-kit/utilities": "^3.2.2",
|
|
116
|
-
"@viewkitjs/fields": "^0.
|
|
122
|
+
"@viewkitjs/fields": "^0.13.0",
|
|
117
123
|
"react": "^19.0.0",
|
|
118
124
|
"react-dom": "^19.0.0",
|
|
119
125
|
"zod": "^4.1.12"
|
|
@@ -147,13 +153,17 @@
|
|
|
147
153
|
"typescript": "^5",
|
|
148
154
|
"vitest": "^4.1.5",
|
|
149
155
|
"zod": "^4.1.12",
|
|
150
|
-
"@viewkitjs/fields": "0.
|
|
156
|
+
"@viewkitjs/fields": "0.13.0"
|
|
151
157
|
},
|
|
152
158
|
"scripts": {
|
|
153
159
|
"typecheck": "tsc -p tsconfig.json",
|
|
154
160
|
"build": "node ../../../scripts/clean-package-dist.mjs viewkit/views && tsc -p tsconfig.build.json && tsc -p tsconfig.types.json && node ../../../scripts/finalize-package-declarations.mjs viewkit/views",
|
|
155
161
|
"check": "node ../../../scripts/check-views-package.mjs",
|
|
156
162
|
"bench": "node bench/run.ts",
|
|
157
|
-
"bench:pin": "node bench/pin-check.ts"
|
|
163
|
+
"bench:pin": "node bench/pin-check.ts",
|
|
164
|
+
"bench:fill-width": "node bench/fill-width-check.ts",
|
|
165
|
+
"bench:pages": "node bench/pages-check.ts",
|
|
166
|
+
"bench:chip": "node bench/chip-check.ts",
|
|
167
|
+
"bench:shift": "node bench/shift-check.ts"
|
|
158
168
|
}
|
|
159
169
|
}
|
package/skills/views/SKILL.md
CHANGED
|
@@ -5,11 +5,12 @@ description: Mount and adapt @viewkitjs/views — the provider, the components m
|
|
|
5
5
|
|
|
6
6
|
# ViewKit views
|
|
7
7
|
|
|
8
|
-
Use the package through its twenty-
|
|
8
|
+
Use the package through its twenty-three declared doors only, never a deep path: `@viewkitjs/views` (the
|
|
9
9
|
contract and the model), `@viewkitjs/views/react` (the provider, the atoms, the adapter's types),
|
|
10
10
|
`/display`, `/editors`, `/editors/select`, `/editors/text`, `/editors/relation`, `/editors/number`, `/editors/range`,
|
|
11
11
|
`/editors/name`, `/editors/location`, `/editors/value-list`, `/editors/date`, `/editors/chips`,
|
|
12
|
-
`/editors/session`, `/editors/panel`, `/editors/open-values`, `/field-row`, `/cells`, `/selection
|
|
12
|
+
`/editors/session`, `/editors/panel`, `/editors/open-values`, `/field-row`, `/cells`, `/selection`, `/grid`,
|
|
13
|
+
`/panels` (what a list's panels read and say, no React) and `/panels/react` (the panels and the toolbar as they draw). The package's docs
|
|
13
14
|
start at `docs/index.md`: `docs/getting-started.md` goes from install to a grid on screen, a guide per
|
|
14
15
|
concept sits in `docs/guides/`, and `docs/reference/` names every export of each door.
|
|
15
16
|
|
|
@@ -58,7 +59,7 @@ export function AppViews({ children }: { children: ReactNode }) {
|
|
|
58
59
|
|
|
59
60
|
## Write the adapter against the contract
|
|
60
61
|
|
|
61
|
-
`docs/contract.md` lists the
|
|
62
|
+
`docs/contract.md` lists the nine required components and the optional `Input`, `Command`, `Picker`, `Calendar`, `DateBody`, `PartsBody`, `ValuesBody`, `TextBody` and `NumberBody`, the five ports (`confirm` optional) and the icon names. Implement
|
|
62
63
|
`ViewsComponents` over your own shadcn copies: a controlled `open` with `onOpenChange(open, details)`,
|
|
63
64
|
an `anchor` element or ref on the popover and the menu, and no `asChild`; `AppIcon` is your own
|
|
64
65
|
icon component by your own names. The shapes are Base UI's; `docs/contract.md`'s "Writing an
|