@viewkitjs/views 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +768 -0
- package/README.md +5 -3
- package/dist/atoms/Avatar.d.ts +2 -0
- package/dist/atoms/Avatar.js +13 -0
- package/dist/atoms/CellMore.d.ts +2 -0
- package/dist/atoms/CellMore.js +4 -0
- package/dist/atoms/DisabledReason.d.ts +11 -0
- package/dist/atoms/DisabledReason.js +10 -0
- package/dist/atoms/DrillRows.d.ts +3 -0
- package/dist/atoms/DrillRows.js +27 -0
- package/dist/atoms/Loading.d.ts +6 -0
- package/dist/atoms/Loading.js +4 -1
- package/dist/atoms/PanelRows.d.ts +5 -0
- package/dist/atoms/PanelRows.js +38 -0
- package/dist/atoms/PanelSearch.d.ts +2 -0
- package/dist/atoms/PanelSearch.js +21 -0
- package/dist/atoms/Pill.d.ts +2 -0
- package/dist/atoms/Pill.js +25 -0
- package/dist/atoms/RangeCalendar.d.ts +8 -0
- package/dist/atoms/RangeCalendar.js +30 -0
- package/dist/atoms/RelationRoles.js +2 -2
- package/dist/atoms/SelectionSheet.d.ts +3 -0
- package/dist/atoms/SelectionSheet.js +31 -0
- package/dist/atoms/ToolbarButton.d.ts +2 -0
- package/dist/atoms/ToolbarButton.js +18 -0
- package/dist/atoms/defaults.js +22 -0
- package/dist/atoms/types.d.ts +257 -1
- package/dist/cells/cell-format.d.ts +10 -1
- package/dist/cells/cell-title.d.ts +5 -1
- package/dist/cells/cell-title.js +2 -2
- package/dist/cells/cell-values.js +22 -7
- package/dist/cells/relation-wrap.js +1 -1
- package/dist/contract.d.ts +515 -18
- package/dist/contract.js +660 -5
- package/dist/display/actor.js +1 -1
- package/dist/display/boolean.js +5 -0
- package/dist/display/entity-chip.d.ts +12 -9
- package/dist/display/entity-chip.js +4 -5
- package/dist/display/fit-values.d.ts +34 -0
- package/dist/display/fit-values.js +45 -0
- package/dist/display/location.js +1 -1
- package/dist/display/multi-value.js +72 -8
- package/dist/display/options.d.ts +9 -1
- package/dist/display/relation.js +1 -1
- package/dist/display/rich-text.js +17 -6
- package/dist/display/select.js +6 -4
- package/dist/display/status-steps.d.ts +8 -0
- package/dist/display/status-steps.js +18 -0
- package/dist/display/viewer.js +1 -0
- package/dist/editors/BodyFrame.d.ts +29 -0
- package/dist/editors/BodyFrame.js +80 -0
- package/dist/editors/DateEditor.js +13 -17
- package/dist/editors/LocationEditor.d.ts +2 -0
- package/dist/editors/LocationEditor.js +29 -5
- package/dist/editors/NameEditor.d.ts +2 -0
- package/dist/editors/NameEditor.js +27 -7
- package/dist/editors/NumberEditor.d.ts +18 -0
- package/dist/editors/NumberEditor.js +29 -2
- package/dist/editors/RangeEditor.d.ts +2 -0
- package/dist/editors/RangeEditor.js +29 -4
- package/dist/editors/SelectEditor.d.ts +5 -0
- package/dist/editors/SelectEditor.js +3 -2
- package/dist/editors/TextEditor.d.ts +11 -1
- package/dist/editors/TextEditor.js +25 -8
- package/dist/editors/ValueListEditor.d.ts +7 -0
- package/dist/editors/ValueListEditor.js +60 -48
- package/dist/editors/body-panel.d.ts +7 -0
- package/dist/editors/body-panel.js +8 -0
- package/dist/editors/edit-session.d.ts +20 -3
- package/dist/editors/edit-session.js +43 -3
- package/dist/editors/leave-scope.d.ts +23 -0
- package/dist/editors/leave-scope.js +28 -0
- package/dist/editors/number-body.d.ts +29 -0
- package/dist/editors/number-body.js +37 -0
- package/dist/editors/parts-body.d.ts +66 -0
- package/dist/editors/parts-body.js +114 -0
- package/dist/editors/tab-ends.d.ts +5 -0
- package/dist/editors/tab-ends.js +7 -0
- package/dist/editors/text-body.d.ts +16 -0
- package/dist/editors/text-body.js +30 -0
- package/dist/editors/values-body.d.ts +47 -0
- package/dist/editors/values-body.js +140 -0
- package/dist/field-row/FieldRow.d.ts +7 -0
- package/dist/field-row/FieldRow.js +44 -24
- package/dist/field-row/FieldRowLane.js +12 -4
- package/dist/field-row/editors/RowChipsEditor.js +3 -1
- package/dist/field-row/editors/RowEditor.js +2 -1
- package/dist/field-row/editors/RowNameEditor.d.ts +5 -2
- package/dist/field-row/editors/RowNameEditor.js +12 -5
- package/dist/field-row/editors/RowNumberEditor.js +18 -2
- package/dist/field-row/editors/RowPlaceEditor.js +4 -2
- package/dist/field-row/editors/RowRangeEditor.d.ts +5 -2
- package/dist/field-row/editors/RowRangeEditor.js +13 -6
- package/dist/field-row/editors/RowRelationEditor.js +5 -2
- package/dist/field-row/editors/RowSelectEditor.js +4 -1
- package/dist/field-row/editors/RowTextEditor.d.ts +1 -1
- package/dist/field-row/editors/RowTextEditor.js +12 -3
- package/dist/field-row/editors/RowValueListEditor.d.ts +2 -1
- package/dist/field-row/editors/RowValueListEditor.js +17 -4
- package/dist/field-row/editors/host.d.ts +3 -0
- package/dist/field-row/editors/row-session.d.ts +12 -1
- package/dist/field-row/editors/row-session.js +52 -2
- package/dist/field-row/field-row-button.d.ts +40 -0
- package/dist/field-row/field-row-button.js +18 -0
- package/dist/field-row/field-row-checkbox.d.ts +9 -0
- package/dist/field-row/field-row-checkbox.js +7 -0
- package/dist/figures.d.ts +5 -48
- package/dist/figures.js +1 -63
- package/dist/filters/filter-model.d.ts +2 -0
- package/dist/grid/chrome/GridAddColumn.js +17 -3
- package/dist/grid/chrome/GridAggregateMenu.d.ts +2 -0
- package/dist/grid/chrome/GridAggregateMenu.js +2 -0
- package/dist/grid/chrome/GridCellEditors.js +16 -6
- package/dist/grid/chrome/GridCellOutline.d.ts +7 -4
- package/dist/grid/chrome/GridCellOutline.js +4 -2
- package/dist/grid/chrome/GridChipsEditor.js +3 -1
- package/dist/grid/chrome/GridColumnMenu.d.ts +7 -4
- package/dist/grid/chrome/GridColumnMenu.js +5 -3
- package/dist/grid/chrome/GridColumnSortSection.d.ts +23 -3
- package/dist/grid/chrome/GridColumnSortSection.js +18 -1
- package/dist/grid/chrome/GridFooter.d.ts +4 -1
- package/dist/grid/chrome/GridFooter.js +6 -4
- package/dist/grid/chrome/GridGroupMenu.d.ts +7 -3
- package/dist/grid/chrome/GridGroupMenu.js +30 -8
- package/dist/grid/chrome/GridHeader.d.ts +5 -1
- package/dist/grid/chrome/GridHeader.js +9 -5
- package/dist/grid/chrome/GridLongTextEditor.js +15 -11
- package/dist/grid/chrome/GridNameEditor.js +4 -2
- package/dist/grid/chrome/GridNumberEditor.d.ts +8 -1
- package/dist/grid/chrome/GridNumberEditor.js +15 -3
- package/dist/grid/chrome/GridPager.d.ts +7 -0
- package/dist/grid/chrome/GridPager.js +34 -0
- package/dist/grid/chrome/GridPlaceEditor.js +4 -2
- package/dist/grid/chrome/GridRangeEditor.js +12 -4
- package/dist/grid/chrome/GridRelationEditor.js +5 -2
- package/dist/grid/chrome/GridRow.js +18 -6
- package/dist/grid/chrome/GridRowActions.d.ts +8 -3
- package/dist/grid/chrome/GridRowActions.js +16 -6
- package/dist/grid/chrome/GridRowCells.js +23 -7
- package/dist/grid/chrome/GridRowGlyph.d.ts +3 -1
- package/dist/grid/chrome/GridRowGlyph.js +7 -2
- package/dist/grid/chrome/GridSelectEditor.js +6 -3
- package/dist/grid/chrome/GridStructure.d.ts +6 -1
- package/dist/grid/chrome/GridStructure.js +32 -8
- package/dist/grid/chrome/GridTable.js +36 -24
- package/dist/grid/chrome/GridTableSurface.d.ts +5 -1
- package/dist/grid/chrome/GridTableSurface.js +5 -2
- package/dist/grid/chrome/GridTextEditor.d.ts +5 -1
- package/dist/grid/chrome/GridTextEditor.js +13 -3
- package/dist/grid/chrome/GridValueListEditor.d.ts +12 -4
- package/dist/grid/chrome/GridValueListEditor.js +11 -3
- package/dist/grid/chrome/StuckMarker.d.ts +3 -1
- package/dist/grid/chrome/StuckMarker.js +6 -2
- package/dist/grid/chrome/cells.d.ts +4 -2
- package/dist/grid/chrome/cells.js +2 -2
- package/dist/grid/chrome/grid-add-column-items.d.ts +1 -1
- package/dist/grid/chrome/grid-add-column-items.js +8 -1
- package/dist/grid/chrome/grid-button.d.ts +32 -0
- package/dist/grid/chrome/grid-button.js +12 -0
- package/dist/grid/chrome/grid-cell-classes.d.ts +38 -0
- package/dist/grid/chrome/grid-cell-classes.js +30 -0
- package/dist/grid/chrome/grid-column-menu-items.d.ts +3 -0
- package/dist/grid/chrome/grid-column-menu-items.js +32 -3
- package/dist/grid/chrome/grid-columns-template.d.ts +27 -0
- package/dist/grid/chrome/grid-columns-template.js +13 -0
- package/dist/grid/chrome/grid-edit-session.d.ts +4 -1
- package/dist/grid/chrome/grid-edit-session.js +11 -1
- package/dist/grid/chrome/grid-group-menu-items.d.ts +8 -1
- package/dist/grid/chrome/grid-group-menu-items.js +17 -0
- package/dist/grid/chrome/grid-group-menu-parts.d.ts +10 -6
- package/dist/grid/chrome/grid-group-menu-parts.js +4 -2
- package/dist/grid/chrome/grid-hover.d.ts +4 -1
- package/dist/grid/chrome/grid-hover.js +16 -6
- package/dist/grid/chrome/grid-pages.d.ts +15 -0
- package/dist/grid/chrome/grid-pages.js +9 -0
- package/dist/grid/chrome/grid-row-menu-items.js +18 -10
- package/dist/grid/chrome/grid-row-props.d.ts +6 -2
- package/dist/grid/chrome/grid-row-window.d.ts +7 -0
- package/dist/grid/chrome/grid-row-window.js +35 -1
- package/dist/grid/chrome/grid-table-props.d.ts +38 -4
- package/dist/grid/chrome/useGridColumnLayout.d.ts +3 -1
- package/dist/grid/chrome/useGridColumnLayout.js +29 -9
- package/dist/grid/chrome/useGridPartColumns.js +1 -1
- package/dist/grid/chrome/useGridScrollArea.js +2 -0
- package/dist/grid/chrome/useGridTableInteractionModel.d.ts +1 -0
- package/dist/grid/chrome/useGridTableInteractionModel.js +5 -3
- package/dist/grid/chrome/useGridTableSelection.d.ts +3 -1
- package/dist/grid/chrome/useGridTableSelection.js +2 -2
- package/dist/grid/chrome/useHeaderDragReorder.js +2 -0
- package/dist/grid/core/editing-controller.d.ts +36 -11
- package/dist/grid/core/editing-controller.js +92 -25
- package/dist/grid/core/grid-aria.d.ts +4 -0
- package/dist/grid/core/grid-aria.js +6 -4
- package/dist/grid/core/grid-focus.d.ts +6 -0
- package/dist/grid/core/grid-focus.js +28 -5
- package/dist/grid/core/useGridEditing.d.ts +11 -2
- package/dist/grid/core/useGridEditing.js +9 -5
- package/dist/grid/core/write-states.d.ts +20 -0
- package/dist/grid/core/write-states.js +21 -0
- package/dist/grid/grid-format-props.d.ts +26 -0
- package/dist/grid/grid-format-props.js +65 -0
- package/dist/grid/index.d.ts +3 -1
- package/dist/grid/index.js +1 -0
- package/dist/grid/useGridTablePrefs.d.ts +20 -21
- package/dist/grid/useGridTablePrefs.js +6 -58
- package/dist/grid/useGridTableSettings.d.ts +60 -0
- package/dist/grid/useGridTableSettings.js +61 -0
- package/dist/grouping/sort-groups.d.ts +6 -7
- package/dist/internal/count.d.ts +3 -0
- package/dist/internal/count.js +3 -0
- package/dist/model/aggregates.d.ts +3 -3
- package/dist/model/aggregates.js +17 -71
- package/dist/model/body-frame.d.ts +16 -0
- package/dist/model/body-frame.js +5 -0
- package/dist/model/column-capabilities.d.ts +4 -1
- package/dist/model/column-capabilities.js +4 -1
- package/dist/model/column-filters.d.ts +7 -4
- package/dist/model/column-filters.js +26 -18
- package/dist/model/column-inspect.d.ts +3 -2
- package/dist/model/column-inspect.js +3 -1
- package/dist/model/column-order.d.ts +2 -2
- package/dist/model/column-schema.d.ts +6 -7
- package/dist/model/column-sort.d.ts +11 -0
- package/dist/model/column-sort.js +14 -0
- package/dist/model/column-state.d.ts +3 -20
- package/dist/model/column-state.js +1 -4
- package/dist/model/column-types.d.ts +1 -15
- package/dist/model/column-types.js +1 -1
- package/dist/model/one-value.d.ts +6 -0
- package/dist/model/one-value.js +5 -0
- package/dist/model/part-columns.d.ts +1 -6
- package/dist/model/part-columns.js +1 -1
- package/dist/model/part-rows.d.ts +2 -9
- package/dist/model/part-rows.js +1 -10
- package/dist/model/part-write.js +1 -1
- package/dist/model/place-parts.d.ts +6 -0
- package/dist/model/place-parts.js +14 -0
- package/dist/model/preferences.d.ts +3 -23
- package/dist/model/preferences.js +1 -17
- package/dist/model/prefs-buckets.d.ts +0 -27
- package/dist/model/prefs-buckets.js +1 -1
- package/dist/model/relation-filters.d.ts +13 -3
- package/dist/model/relation-filters.js +9 -4
- package/dist/model/row-icon.d.ts +17 -11
- package/dist/model/settings-columns.d.ts +34 -0
- package/dist/model/settings-columns.js +146 -0
- package/dist/model/settings-look.d.ts +17 -0
- package/dist/model/settings-look.js +23 -0
- package/dist/model/view-rules.d.ts +32 -6
- package/dist/model/view-rules.js +99 -23
- package/dist/panels/availability.d.ts +26 -0
- package/dist/panels/availability.js +28 -0
- package/dist/panels/filter/DateFilterBody.d.ts +42 -0
- package/dist/panels/filter/DateFilterBody.js +64 -0
- package/dist/panels/filter/DateFilterCalendar.d.ts +19 -0
- package/dist/panels/filter/DateFilterCalendar.js +37 -0
- package/dist/panels/filter/DateFilterInput.d.ts +16 -0
- package/dist/panels/filter/DateFilterInput.js +37 -0
- package/dist/panels/filter/FilterIcon.d.ts +7 -0
- package/dist/panels/filter/FilterIcon.js +15 -0
- package/dist/panels/filter/MenuSelect.d.ts +12 -0
- package/dist/panels/filter/MenuSelect.js +34 -0
- package/dist/panels/filter/NumberFilterBody.d.ts +21 -0
- package/dist/panels/filter/NumberFilterBody.js +76 -0
- package/dist/panels/filter/RangeFilterBody.d.ts +19 -0
- package/dist/panels/filter/RangeFilterBody.js +71 -0
- package/dist/panels/filter/RelationFilterBody.d.ts +17 -0
- package/dist/panels/filter/RelationFilterBody.js +20 -0
- package/dist/panels/filter/TextFilterBody.d.ts +31 -0
- package/dist/panels/filter/TextFilterBody.js +44 -0
- package/dist/panels/filter/TimeScopeDetail.d.ts +6 -0
- package/dist/panels/filter/TimeScopeDetail.js +47 -0
- package/dist/panels/filter/details.d.ts +17 -0
- package/dist/panels/filter/details.js +73 -0
- package/dist/panels/filter/filter-list.d.ts +23 -0
- package/dist/panels/filter/filter-list.js +38 -0
- package/dist/panels/group-sort.d.ts +24 -0
- package/dist/panels/group-sort.js +58 -0
- package/dist/panels/index.d.ts +24 -0
- package/dist/panels/index.js +17 -0
- package/dist/panels/labels.d.ts +37 -0
- package/dist/panels/labels.js +166 -0
- package/dist/panels/model.d.ts +343 -0
- package/dist/panels/model.js +77 -0
- package/dist/panels/react/GroupBucketsList.d.ts +16 -0
- package/dist/panels/react/GroupBucketsList.js +38 -0
- package/dist/panels/react/LayoutColumnsList.d.ts +24 -0
- package/dist/panels/react/LayoutColumnsList.js +71 -0
- package/dist/panels/react/PopoverColumnDetail.d.ts +11 -0
- package/dist/panels/react/PopoverColumnDetail.js +24 -0
- package/dist/panels/react/chrome.d.ts +17 -0
- package/dist/panels/react/chrome.js +8 -0
- package/dist/panels/react/column-refusals.d.ts +7 -0
- package/dist/panels/react/column-refusals.js +14 -0
- package/dist/panels/react/customize.d.ts +26 -0
- package/dist/panels/react/customize.js +98 -0
- package/dist/panels/react/drag.d.ts +2 -0
- package/dist/panels/react/drag.js +6 -0
- package/dist/panels/react/field-editor.d.ts +10 -0
- package/dist/panels/react/field-editor.js +1 -0
- package/dist/panels/react/filter-panel.d.ts +15 -0
- package/dist/panels/react/filter-panel.js +48 -0
- package/dist/panels/react/layout-detail.d.ts +4 -0
- package/dist/panels/react/layout-detail.js +21 -0
- package/dist/panels/react/order-details.d.ts +32 -0
- package/dist/panels/react/order-details.js +81 -0
- package/dist/panels/react/panel-header.d.ts +10 -0
- package/dist/panels/react/panel-header.js +12 -0
- package/dist/panels/react/panel-sheet.d.ts +19 -0
- package/dist/panels/react/panel-sheet.js +22 -0
- package/dist/panels/react/popover.d.ts +71 -0
- package/dist/panels/react/popover.js +47 -0
- package/dist/panels/react/root-list.d.ts +6 -0
- package/dist/panels/react/root-list.js +31 -0
- package/dist/panels/react/toolbar/ReadyToolbar.d.ts +42 -0
- package/dist/panels/react/toolbar/ReadyToolbar.js +92 -0
- package/dist/panels/react/toolbar/Toolbar.d.ts +16 -0
- package/dist/panels/react/toolbar/Toolbar.js +34 -0
- package/dist/panels/react/toolbar/ToolbarButton.d.ts +5 -0
- package/dist/panels/react/toolbar/ToolbarButton.js +9 -0
- package/dist/panels/react/toolbar/ToolbarFilter.d.ts +19 -0
- package/dist/panels/react/toolbar/ToolbarFilter.js +32 -0
- package/dist/panels/react/toolbar/ToolbarNew.d.ts +12 -0
- package/dist/panels/react/toolbar/ToolbarNew.js +21 -0
- package/dist/panels/react/toolbar/ToolbarOptions.d.ts +25 -0
- package/dist/panels/react/toolbar/ToolbarOptions.js +33 -0
- package/dist/panels/react/toolbar/ToolbarSearch.d.ts +9 -0
- package/dist/panels/react/toolbar/ToolbarSearch.js +41 -0
- package/dist/panels/react/toolbar/ToolbarSort.d.ts +12 -0
- package/dist/panels/react/toolbar/ToolbarSort.js +16 -0
- package/dist/panels/react/toolbar/ToolbarViews.d.ts +13 -0
- package/dist/panels/react/toolbar/ToolbarViews.js +24 -0
- package/dist/panels/react/toolbar/context.d.ts +29 -0
- package/dist/panels/react/toolbar/context.js +49 -0
- package/dist/panels/react/toolbar/panel-part.d.ts +37 -0
- package/dist/panels/react/toolbar/panel-part.js +37 -0
- package/dist/panels/react/toolbar/panel-state.d.ts +9 -0
- package/dist/panels/react/toolbar/panel-state.js +12 -0
- package/dist/panels/react/toolbar/use-box-narrow.d.ts +2 -0
- package/dist/panels/react/toolbar/use-box-narrow.js +18 -0
- package/dist/panels/react/toolbar/use-list-settings-state.d.ts +10 -0
- package/dist/panels/react/toolbar/use-list-settings-state.js +10 -0
- package/dist/panels/react/view-actions.d.ts +4 -0
- package/dist/panels/react/view-actions.js +37 -0
- package/dist/panels/react/view-footer.d.ts +16 -0
- package/dist/panels/react/view-footer.js +11 -0
- package/dist/panels/react/views-row/FoldingViewRow.d.ts +4 -0
- package/dist/panels/react/views-row/FoldingViewRow.js +105 -0
- package/dist/panels/react/views-row/HScrollRow.d.ts +7 -0
- package/dist/panels/react/views-row/HScrollRow.js +42 -0
- package/dist/panels/react/views-row/PillGroup.d.ts +30 -0
- package/dist/panels/react/views-row/PillGroup.js +86 -0
- package/dist/panels/react/views-row/ViewAxes.d.ts +6 -0
- package/dist/panels/react/views-row/ViewAxes.js +16 -0
- package/dist/panels/react/views-row/ViewCreatePill.d.ts +7 -0
- package/dist/panels/react/views-row/ViewCreatePill.js +11 -0
- package/dist/panels/react/views-row/ViewPicker.d.ts +5 -0
- package/dist/panels/react/views-row/ViewPicker.js +65 -0
- package/dist/panels/react/views-row/ViewPickerRow.d.ts +7 -0
- package/dist/panels/react/views-row/ViewPickerRow.js +18 -0
- package/dist/panels/react/views-row/ViewTabs.d.ts +31 -0
- package/dist/panels/react/views-row/ViewTabs.js +29 -0
- package/dist/panels/react/views-row/menu-classes.d.ts +6 -0
- package/dist/panels/react/views-row/menu-classes.js +3 -0
- package/dist/panels/react/views-row/use-anchored-toggle.d.ts +19 -0
- package/dist/panels/react/views-row/use-anchored-toggle.js +31 -0
- package/dist/panels/react.d.ts +51 -0
- package/dist/panels/react.js +43 -0
- package/dist/panels/settings/axes.d.ts +28 -0
- package/dist/panels/settings/axes.js +71 -0
- package/dist/panels/settings/filters.d.ts +5 -0
- package/dist/panels/settings/filters.js +62 -0
- package/dist/panels/settings/group-buckets.d.ts +23 -0
- package/dist/panels/settings/group-buckets.js +73 -0
- package/dist/panels/settings/input.d.ts +69 -0
- package/dist/panels/settings/input.js +1 -0
- package/dist/panels/settings/layout.d.ts +5 -0
- package/dist/panels/settings/layout.js +244 -0
- package/dist/panels/settings/order.d.ts +19 -0
- package/dist/panels/settings/order.js +271 -0
- package/dist/panels/settings/settings-panels.d.ts +17 -0
- package/dist/panels/settings/settings-panels.js +28 -0
- package/dist/panels/toolbar/clear.d.ts +9 -0
- package/dist/panels/toolbar/clear.js +26 -0
- package/dist/panels/toolbar/counts.d.ts +15 -0
- package/dist/panels/toolbar/counts.js +21 -0
- package/dist/panels/toolbar/edit-view.d.ts +5 -0
- package/dist/panels/toolbar/edit-view.js +18 -0
- package/dist/panels/toolbar/model.d.ts +34 -0
- package/dist/panels/toolbar/model.js +52 -0
- package/dist/panels/use-filter-opened.d.ts +8 -0
- package/dist/panels/use-filter-opened.js +11 -0
- package/dist/panels/view-state.d.ts +38 -0
- package/dist/panels/view-state.js +1 -0
- package/dist/panels/views-row/model.d.ts +131 -0
- package/dist/panels/views-row/model.js +14 -0
- package/dist/provider/ViewsProvider.d.ts +50 -6
- package/dist/provider/ViewsProvider.js +33 -2
- package/dist/provider/components.d.ts +274 -11
- package/dist/provider/context.d.ts +23 -2
- package/dist/provider/desktop.d.ts +3 -0
- package/dist/provider/desktop.js +7 -4
- package/dist/react.d.ts +5 -2
- package/dist/selection/SelectionBar.d.ts +18 -0
- package/dist/selection/SelectionBar.js +98 -0
- package/dist/selection/SelectionBarPhone.d.ts +3 -0
- package/dist/selection/SelectionBarPhone.js +14 -0
- package/dist/selection/bar-overflow.d.ts +12 -0
- package/dist/selection/bar-overflow.js +55 -0
- package/dist/selection/bar-parts.d.ts +17 -0
- package/dist/selection/bar-parts.js +19 -0
- package/dist/selection/index.d.ts +2 -0
- package/dist/selection/index.js +1 -0
- package/dist/selection/types.d.ts +3 -2
- package/dist/selection/useListSelectionShortcuts.d.ts +3 -2
- package/dist/selection/useListSelectionShortcuts.js +1 -1
- package/dist/selection/verbs.d.ts +41 -0
- package/dist/selection/verbs.js +1 -0
- package/docs/contract.md +355 -35
- package/docs/getting-started.md +1 -1
- package/docs/guides/atoms.md +39 -6
- package/docs/guides/columns.md +1 -1
- package/docs/guides/display.md +3 -2
- package/docs/guides/editors.md +4 -3
- package/docs/guides/selection.md +35 -21
- package/docs/guides/the-grid.md +24 -13
- package/docs/guides/the-provider.md +24 -6
- package/docs/index.md +2 -0
- package/docs/install.md +3 -1
- package/docs/reference/cells.md +1 -1
- package/docs/reference/display.md +5 -4
- package/docs/reference/editors-location.md +3 -1
- package/docs/reference/editors-name.md +3 -1
- package/docs/reference/editors-number.md +1 -0
- package/docs/reference/editors-range.md +3 -1
- package/docs/reference/editors-session.md +1 -0
- package/docs/reference/editors-text.md +2 -2
- package/docs/reference/editors-value-list.md +1 -1
- package/docs/reference/field-row.md +2 -2
- package/docs/reference/grid.md +10 -7
- package/docs/reference/panels-react.md +101 -0
- package/docs/reference/panels.md +123 -0
- package/docs/reference/react.md +45 -12
- package/docs/reference/selection.md +11 -3
- package/docs/reference/views.md +41 -38
- package/package.json +33 -4
- package/skills/views/SKILL.md +5 -4
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import type { StatusSlot } from "@viewkitjs/fields/design/status-slots";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
import type { ViewsMenuItem } from "../../provider/components.js";
|
|
4
|
+
export type ViewTabOption<V extends string> = {
|
|
5
|
+
value: V;
|
|
6
|
+
label: string;
|
|
7
|
+
count?: number;
|
|
8
|
+
/** Optional slot — tints the active pill using the shared status palette. */
|
|
9
|
+
slot?: StatusSlot;
|
|
10
|
+
/** Manual override — if both slot and activeClassName are set, this wins. */
|
|
11
|
+
activeClassName?: string;
|
|
12
|
+
/**
|
|
13
|
+
* What this option DRAWS, ahead of its label — a saved view's layout glyph, by your own icon's
|
|
14
|
+
* name, as `AppIcon` draws it. The row knows nothing about views; it draws a glyph when handed one.
|
|
15
|
+
*/
|
|
16
|
+
icon?: string;
|
|
17
|
+
/** Only this reader sees it — a lock after the label. */
|
|
18
|
+
private?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The option's own verbs. Reached from the ACTIVE option only — a click on
|
|
21
|
+
* the pill you are already on, a right-click, the picker row's `⋮` — because
|
|
22
|
+
* every verb acts on the view the list is showing.
|
|
23
|
+
*/
|
|
24
|
+
menu?: ViewsMenuItem[];
|
|
25
|
+
};
|
|
26
|
+
/** One option of a `PillGroup`: any row of pills, a views row's or a tab row's. */
|
|
27
|
+
export type PillOption<T extends string = string> = {
|
|
28
|
+
value: T;
|
|
29
|
+
label: string;
|
|
30
|
+
badge?: number;
|
|
31
|
+
/** Override the default active styling for this option (e.g. status-colored pills). */
|
|
32
|
+
activeClassName?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Override the hover styling while this option is INACTIVE — `hover:` classes
|
|
35
|
+
* only. Used by the plain variant to tint the hover with the option's status
|
|
36
|
+
* color; background-only, so the label keeps its muted color.
|
|
37
|
+
*/
|
|
38
|
+
hoverClassName?: string;
|
|
39
|
+
/** A glyph ahead of the label — sized by the caller (`h-3.5 w-3.5`). */
|
|
40
|
+
leading?: ReactNode;
|
|
41
|
+
/** A lock after the label: only this reader sees this option. It is also
|
|
42
|
+
* the option's BLOCK when the row reorders: a private pill moves among the
|
|
43
|
+
* private ones, a shared pill among the shared. */
|
|
44
|
+
private?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* The option's own verbs. Nothing is drawn for them: the ACTIVE pill opens
|
|
47
|
+
* its menu when clicked again, or on a right-click — the pill is the
|
|
48
|
+
* trigger, so the row carries no button that grows on hover.
|
|
49
|
+
*/
|
|
50
|
+
menu?: ViewsMenuItem[];
|
|
51
|
+
};
|
|
52
|
+
export type CollectionViewsConfig<V extends string = string> = {
|
|
53
|
+
/** Stable identity for this axis — required when several axes are passed. */
|
|
54
|
+
key?: string;
|
|
55
|
+
value: V;
|
|
56
|
+
options: ViewTabOption<V>[];
|
|
57
|
+
onChange: (value: V) => void;
|
|
58
|
+
hideCounts?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* The axis can GROW: a "New view" + closes the row, and the
|
|
61
|
+
* picker's list ends in "New view…". The row draws the
|
|
62
|
+
* affordance; what creating means is the caller's.
|
|
63
|
+
*/
|
|
64
|
+
onCreate?: () => void;
|
|
65
|
+
/** The word on that affordance. Default `views.panels.view-create`. */
|
|
66
|
+
createLabel?: string;
|
|
67
|
+
/**
|
|
68
|
+
* The pills can be DRAGGED into a new order. Called with one kind-block —
|
|
69
|
+
* the shared views or the personal ones (`ViewTabOption.private`) — in its
|
|
70
|
+
* new order, visible and folded alike (`FoldingViewRow` stitches the folded
|
|
71
|
+
* tail behind the visible pills). The row draws the handle and the drag;
|
|
72
|
+
* what the order means is the caller's.
|
|
73
|
+
*/
|
|
74
|
+
onReorder?: (orderedIds: V[]) => void;
|
|
75
|
+
/** Which pills may be picked up — a member cannot move the views everyone sees. Default: all. */
|
|
76
|
+
canDrag?: (value: V) => boolean;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* `views` in either arity. One config is the common case; an ARRAY declares
|
|
80
|
+
* peer axes — independent single-selects that both always apply — and the
|
|
81
|
+
* toolbar renders them as pill groups on ONE row.
|
|
82
|
+
*
|
|
83
|
+
* The decision test for a second axis: does it mean the same thing whatever
|
|
84
|
+
* the first one says? Peers (deals' ownership × outcome, executions' module ×
|
|
85
|
+
* status) → this array. A child axis whose options depend on the primary
|
|
86
|
+
* selection (leads' pipeline sub-phases) → a child row, which stays for nesting.
|
|
87
|
+
*/
|
|
88
|
+
export type CollectionViewsInput<V extends string = string> = CollectionViewsConfig<V> | CollectionViewsConfig<string>[];
|
|
89
|
+
/**
|
|
90
|
+
* How several peer axes are LAID OUT — a separate question from whether they
|
|
91
|
+
* are peers, which is what the array itself declares.
|
|
92
|
+
*
|
|
93
|
+
* `stacked` (the default) gives each axis after the first its own row beneath.
|
|
94
|
+
* `inline` puts them on one row, which only suits axes whose labels are short
|
|
95
|
+
* and few. Declared per list because a wrap heuristic would reflow the toolbar
|
|
96
|
+
* as counts change.
|
|
97
|
+
*/
|
|
98
|
+
export type ViewsLayout = "inline" | "stacked";
|
|
99
|
+
/**
|
|
100
|
+
* A CHILD axis — one whose options depend on the primary selection — in the
|
|
101
|
+
* structured form a phone's sheet needs: the sheet has to know the options of
|
|
102
|
+
* parents it is not currently on, so it can expand one without selecting it.
|
|
103
|
+
*/
|
|
104
|
+
export type CollectionChildAxis<V extends string = string> = {
|
|
105
|
+
/** The selected child, or null for "the whole parent". */
|
|
106
|
+
value: string | null;
|
|
107
|
+
/**
|
|
108
|
+
* Options under `parent`, or undefined when that parent has no child axis at
|
|
109
|
+
* all — undefined renders a plain, unexpandable row. A function, not a map,
|
|
110
|
+
* so the per-parent logic stays with the caller.
|
|
111
|
+
*/
|
|
112
|
+
optionsFor: (parent: V) => ViewTabOption<string>[] | undefined;
|
|
113
|
+
/** Applies BOTH levels, in one commit. */
|
|
114
|
+
onChange: (parent: V, child: string | null) => void;
|
|
115
|
+
/**
|
|
116
|
+
* Row that selects the parent with no child chosen. Defaults to "All"; pass
|
|
117
|
+
* `null` where the child is not optional.
|
|
118
|
+
*/
|
|
119
|
+
allLabel?: string | null;
|
|
120
|
+
};
|
|
121
|
+
/** The array form, whichever arity the caller passed. */
|
|
122
|
+
export declare function toViewAxes<V extends string>(views: CollectionViewsInput<V> | undefined): CollectionViewsConfig<string>[] | undefined;
|
|
123
|
+
/**
|
|
124
|
+
* The axes split by where they render: the primary row, and whatever a stacked
|
|
125
|
+
* layout pushes to the row beneath. `inline` leaves everything on the first
|
|
126
|
+
* row; a single axis is unaffected by either layout.
|
|
127
|
+
*/
|
|
128
|
+
export declare function splitViewAxes<V extends string>(views: CollectionViewsInput<V> | undefined, layout: ViewsLayout | undefined): {
|
|
129
|
+
viewAxes: CollectionViewsConfig<string>[] | undefined;
|
|
130
|
+
stackedAxes: CollectionViewsConfig<string>[] | undefined;
|
|
131
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export function toViewAxes(views) {
|
|
2
|
+
if (!views)
|
|
3
|
+
return undefined;
|
|
4
|
+
if (Array.isArray(views))
|
|
5
|
+
return views.length > 0 ? views : undefined;
|
|
6
|
+
return [views];
|
|
7
|
+
}
|
|
8
|
+
export function splitViewAxes(views, layout) {
|
|
9
|
+
const axes = toViewAxes(views);
|
|
10
|
+
if (!axes || layout === "inline" || axes.length < 2) {
|
|
11
|
+
return { viewAxes: axes, stackedAxes: undefined };
|
|
12
|
+
}
|
|
13
|
+
return { viewAxes: axes.slice(0, 1), stackedAxes: axes.slice(1) };
|
|
14
|
+
}
|
|
@@ -3,9 +3,12 @@ import type { FieldConventions } from "@viewkitjs/fields";
|
|
|
3
3
|
import { type ViewsMessageResolver } from "../contract.js";
|
|
4
4
|
import type { ViewsAtoms } from "../atoms/types.js";
|
|
5
5
|
import type { FieldPresentation } from "../display/options.js";
|
|
6
|
-
import type { ViewsComponents, ViewsMenuRoute, ViewsSheetActionsPlace } from "./components.js";
|
|
6
|
+
import type { ViewsComponents, ViewsDatePicks, ViewsGridButtons, ViewsGridCheckboxes, ViewsFieldRowButtons, ViewsFieldRowCheckboxes, ViewsMenuRoute, ViewsSelectionBarSettings, ViewsSheetActionsPlace } from "./components.js";
|
|
7
7
|
import type { ViewsIcons } from "./icons.js";
|
|
8
8
|
import type { ViewsEscapeRules } from "../editors/escape-rule.js";
|
|
9
|
+
import type { ViewsOneValueEditors } from "../model/one-value.js";
|
|
10
|
+
import type { ViewsBodyFrame } from "../model/body-frame.js";
|
|
11
|
+
import type { ViewsSeveralValues } from "../display/fit-values.js";
|
|
9
12
|
import { type ViewsPorts } from "./ports.js";
|
|
10
13
|
export { useViews, type ViewsContextValue } from "./context.js";
|
|
11
14
|
export type ViewsProviderProps = {
|
|
@@ -23,17 +26,22 @@ export type ViewsProviderProps = {
|
|
|
23
26
|
* display. Absent, the package's defaults in the conventions' locale. */
|
|
24
27
|
presentation?: (defaults: FieldPresentation) => FieldPresentation;
|
|
25
28
|
/** The media query that means a desktop, so an editor opens as a popover there and as a sheet
|
|
26
|
-
* elsewhere
|
|
29
|
+
* elsewhere, as do the toolbar's panels and the views picker outside a `Toolbar`. Hand in the one your own shell
|
|
30
|
+
* switches on. Default `DEFAULT_DESKTOP_QUERY`,
|
|
27
31
|
* `(min-width: 1024px)`. */
|
|
28
32
|
desktopQuery?: string;
|
|
29
|
-
/** Where the editor panel's ✕ and ✓ stand on a phone. `bar` (the default): the panel
|
|
30
|
-
*
|
|
31
|
-
* the panel draws
|
|
33
|
+
/** Where the editor panel's ✕ and ✓ (and a toolbar panel's ✕) stand on a phone. `bar` (the default): the panel
|
|
34
|
+
* draws its own inside your `Sheet`. `head`: your `Sheet` is handed them as `actions`, for its own head, and
|
|
35
|
+
* the panel draws none. */
|
|
32
36
|
sheetActions?: ViewsSheetActionsPlace;
|
|
33
37
|
/** What Escape does in an editor of each field type: `keep` keeps what was typed and closes, as a press
|
|
34
38
|
* outside does; a type left out throws the edit away. Desktop only: on a phone every way out of the
|
|
35
39
|
* sheet throws it away. Pass a module-level object. */
|
|
36
40
|
escape?: ViewsEscapeRules;
|
|
41
|
+
/** Whether a field holding one email or one domain opens the text box in its cell (`text`, the default) or the value
|
|
42
|
+
* list holding one value (`list`: one line, no label, no main mark, no line to add another), in the grid and in a
|
|
43
|
+
* field row alike. It writes the same string the text box writes. Pass a module-level object. */
|
|
44
|
+
oneValue?: ViewsOneValueEditors;
|
|
37
45
|
/** The grid says, through the toast port's `error`, why your app refused an edit it sent. Default false:
|
|
38
46
|
* your app says it. */
|
|
39
47
|
sayRefusals?: boolean;
|
|
@@ -41,6 +49,42 @@ export type ViewsProviderProps = {
|
|
|
41
49
|
* your `Menu`, handed its rows as data, with the three hints a row may carry (`beside`, `keepOpen`,
|
|
42
50
|
* `detail`). */
|
|
43
51
|
menus?: ViewsMenuRoute;
|
|
52
|
+
/** Who draws the buttons the grid draws itself: a group's fold and ⋯, "+ Add column", a row's ⋯, the name's
|
|
53
|
+
* actions, an action column's buttons and a pick-list cell's ▾. `own` (the default): ViewKit's, as on 0.5.0.
|
|
54
|
+
* `button`: your `Button`, handed the grid's box in `className`, and a ref, `tabIndex`, `aria-haspopup`,
|
|
55
|
+
* `aria-expanded`, `data-slot` and `data-open` to forward to its element. */
|
|
56
|
+
gridButtons?: ViewsGridButtons;
|
|
57
|
+
/** How a cell of several values draws on one line: a multiselect's options, several emails, phones, links or
|
|
58
|
+
* domains, several records, a lookup's names or places. `first` (the default): its first value and a count, at any
|
|
59
|
+
* width, as on 0.5.0. `fit`: as many whole values as fit its width, then a count, following a column resize; the
|
|
60
|
+
* first shows cut when even it doesn't fit. A wrapped row shows three either way. */
|
|
61
|
+
severalValues?: ViewsSeveralValues;
|
|
62
|
+
/** Who draws a yes/no cell's box in the grid (the checkbox style). `own` (the default): ViewKit's tick box in its
|
|
63
|
+
* own button, as on 0.5.0. `checkbox`: your `Checkbox`, the box your rail draws, handed `checked`, the column's
|
|
64
|
+
* name, `tabIndex` -1 and `onCheckedChange`; a cell the grid can't write is handed `readOnly` instead. */
|
|
65
|
+
gridCheckboxes?: ViewsGridCheckboxes;
|
|
66
|
+
/** Who draws a field row's own buttons: its edit target, the verb trigger around a value, the lane's ▾ and rich
|
|
67
|
+
* text's Show more. `own` (the default): ViewKit's, as on 0.5.0. `button`: your `Button`, `ghost`, handed ViewKit's
|
|
68
|
+
* box in `className`, and the edit target a ref and `aria-disabled` while its write is pending. The grid's
|
|
69
|
+
* `gridButtons` doesn't reach a field row. */
|
|
70
|
+
fieldRowButtons?: ViewsFieldRowButtons;
|
|
71
|
+
/** Who draws a field row's yes/no box (the checkbox style). `own` (the default): ViewKit's tick box in its own
|
|
72
|
+
* button, as on 0.5.0. `checkbox`: your `Checkbox`, handed `checked`, the field's name and `onCheckedChange`, and
|
|
73
|
+
* no `tabIndex`, so it stays a Tab stop; a row it can't write is handed `readOnly` instead. */
|
|
74
|
+
fieldRowCheckboxes?: ViewsFieldRowCheckboxes;
|
|
75
|
+
/** Who sets the width and padding of the popover around a whole body your app hands (`Picker`, `PartsBody`,
|
|
76
|
+
* `ValuesBody`). `views` (the default): ViewKit's own, as for its own lists. `popover`: none of ViewKit's, so your
|
|
77
|
+
* `Popover` stands at its own width, and the popover carries `data-vk-body` (`picker`, `parts` or `values`). An
|
|
78
|
+
* editor that draws ViewKit's own body keeps ViewKit's width either way. */
|
|
79
|
+
bodyFrame?: ViewsBodyFrame;
|
|
80
|
+
/** Where the selection bar sits: its bottom, its layer and its classes on the desktop and on the phone,
|
|
81
|
+
* and the media query that makes it the phone's pill. Pass a module-level object. Default: 1rem above
|
|
82
|
+
* the screen's foot, layer 50, the pill wherever `desktopQuery` does not match. */
|
|
83
|
+
selectionBar?: ViewsSelectionBarSettings;
|
|
84
|
+
/** The quick days the date editors offer, in order: any of `today`, `tomorrow`, `next-monday` and `in-a-week` (a
|
|
85
|
+
* week from today). The date editor hands exactly these to your `DateBody`, and its own panel draws the same.
|
|
86
|
+
* Default: `today`, `tomorrow` and `next-monday`, as on 0.5.0. Pass a module-level array. */
|
|
87
|
+
datePicks?: ViewsDatePicks;
|
|
44
88
|
children: ReactNode;
|
|
45
89
|
};
|
|
46
|
-
export declare function ViewsProvider({ children, components, conventions, icons, ports, atoms, messages, presentation, desktopQuery, sheetActions, escape, sayRefusals, menus, }: ViewsProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
90
|
+
export declare function ViewsProvider({ children, components, conventions, icons, ports, atoms, messages, presentation, desktopQuery, sheetActions, escape, oneValue, sayRefusals, menus, gridButtons, severalValues, gridCheckboxes, fieldRowButtons, fieldRowCheckboxes, bodyFrame, selectionBar, datePicks, }: ViewsProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -12,7 +12,7 @@ import { browserConfirm } from "./ports.js";
|
|
|
12
12
|
export { useViews } from "./context.js";
|
|
13
13
|
const MISSING_COMMAND_PARTS = missingParts("Command");
|
|
14
14
|
const MISSING_CALENDAR_COMPONENT = missingComponent("Calendar");
|
|
15
|
-
export function ViewsProvider({ children, components, conventions, icons, ports, atoms, messages = resolveViewsMessage, presentation, desktopQuery = DEFAULT_DESKTOP_QUERY, sheetActions = "bar", escape, sayRefusals = false, menus = "popover", }) {
|
|
15
|
+
export function ViewsProvider({ children, components, conventions, icons, ports, atoms, messages = resolveViewsMessage, presentation, desktopQuery = DEFAULT_DESKTOP_QUERY, sheetActions = "bar", escape, oneValue, sayRefusals = false, menus = "popover", gridButtons = "own", severalValues = "first", gridCheckboxes = "own", fieldRowButtons = "own", fieldRowCheckboxes = "own", bodyFrame = "views", selectionBar, datePicks, }) {
|
|
16
16
|
const merged = useMemo(() => ({ ...DEFAULT_VIEWS_ATOMS, ...atoms }), [atoms]);
|
|
17
17
|
const settled = useMemo(() => ({
|
|
18
18
|
...components,
|
|
@@ -33,8 +33,39 @@ export function ViewsProvider({ children, components, conventions, icons, ports,
|
|
|
33
33
|
desktopQuery,
|
|
34
34
|
sheetActions,
|
|
35
35
|
escape,
|
|
36
|
+
oneValue,
|
|
36
37
|
sayRefusals,
|
|
37
38
|
menus,
|
|
38
|
-
|
|
39
|
+
gridButtons,
|
|
40
|
+
severalValues,
|
|
41
|
+
gridCheckboxes,
|
|
42
|
+
fieldRowButtons,
|
|
43
|
+
fieldRowCheckboxes,
|
|
44
|
+
bodyFrame,
|
|
45
|
+
selectionBar,
|
|
46
|
+
datePicks,
|
|
47
|
+
}), [
|
|
48
|
+
settled,
|
|
49
|
+
merged,
|
|
50
|
+
conventions,
|
|
51
|
+
icons,
|
|
52
|
+
resolved,
|
|
53
|
+
messages,
|
|
54
|
+
presentation,
|
|
55
|
+
desktopQuery,
|
|
56
|
+
sheetActions,
|
|
57
|
+
escape,
|
|
58
|
+
oneValue,
|
|
59
|
+
sayRefusals,
|
|
60
|
+
menus,
|
|
61
|
+
gridButtons,
|
|
62
|
+
severalValues,
|
|
63
|
+
gridCheckboxes,
|
|
64
|
+
fieldRowButtons,
|
|
65
|
+
fieldRowCheckboxes,
|
|
66
|
+
bodyFrame,
|
|
67
|
+
selectionBar,
|
|
68
|
+
datePicks,
|
|
69
|
+
]);
|
|
39
70
|
return _jsx(ViewsContext.Provider, { value: value, children: children });
|
|
40
71
|
}
|
|
@@ -24,6 +24,19 @@ export type ViewsButtonProps = {
|
|
|
24
24
|
className?: string;
|
|
25
25
|
"aria-label"?: string;
|
|
26
26
|
title?: string;
|
|
27
|
+
/** The element, for a menu that anchors on the button: forward it to your `<button>`. */
|
|
28
|
+
ref?: Ref<HTMLButtonElement>;
|
|
29
|
+
/** -1 for a button the grid reaches by its arrows, never a Tab stop. */
|
|
30
|
+
tabIndex?: number;
|
|
31
|
+
"aria-haspopup"?: "menu" | "dialog";
|
|
32
|
+
"aria-expanded"?: boolean;
|
|
33
|
+
/** The part's name, `vk-grid-row-more` on a row's ⋯. */
|
|
34
|
+
"data-slot"?: string;
|
|
35
|
+
/** A state flag: `""` (present, no value) while the menu this button opens is open; absent when closed. */
|
|
36
|
+
"data-open"?: "";
|
|
37
|
+
/** True while a field row's write is pending: the button keeps its focus and takes no press. Forward it to your
|
|
38
|
+
* element. */
|
|
39
|
+
"aria-disabled"?: boolean;
|
|
27
40
|
};
|
|
28
41
|
export type ViewsPopoverProps = {
|
|
29
42
|
open: boolean;
|
|
@@ -82,6 +95,10 @@ export type ViewsCheckboxProps = {
|
|
|
82
95
|
* whose partial state is a live selection. */
|
|
83
96
|
partialTone?: "muted" | "brand";
|
|
84
97
|
disabled?: boolean;
|
|
98
|
+
/** Shown as it is and not pressable, unlike `disabled`, which greys it: a yes/no cell the grid can't write while
|
|
99
|
+
* the provider's `gridCheckboxes` is `checkbox`, or a field row's yes/no it can't write while `fieldRowCheckboxes` is
|
|
100
|
+
* `checkbox`. Forward it to your control; absent means false. */
|
|
101
|
+
readOnly?: boolean;
|
|
85
102
|
className?: string;
|
|
86
103
|
tabIndex?: number;
|
|
87
104
|
"aria-label"?: string;
|
|
@@ -291,8 +308,13 @@ export type ViewsCalendarProps = {
|
|
|
291
308
|
locale: string;
|
|
292
309
|
className?: string;
|
|
293
310
|
};
|
|
294
|
-
/** A quick pick a date body offers: a day the editor names, or `none`, which empties the field.
|
|
295
|
-
|
|
311
|
+
/** A quick pick a date body offers: a day the editor names, or `none`, which empties the field. `next-monday` is the
|
|
312
|
+
* Monday after today (a week on when today is one); `in-a-week` is a week from today (today + 7 on the local
|
|
313
|
+
* calendar). */
|
|
314
|
+
export type ViewsDatePick = "today" | "tomorrow" | "next-monday" | "in-a-week" | "none";
|
|
315
|
+
/** The quick days an app's date editors offer, in order (the provider's `datePicks`): any of `today`, `tomorrow`,
|
|
316
|
+
* `next-monday` and `in-a-week`. ViewKit works out each day; `none` follows where a field may be emptied. */
|
|
317
|
+
export type ViewsDatePicks = readonly Exclude<ViewsDatePick, "none">[];
|
|
296
318
|
/** A whole date body your app draws: its typed line, its days, its quick picks and its time. The editor
|
|
297
319
|
* around it keeps the draft, Tab, Escape, the save and the phone's ✕ and ✓. */
|
|
298
320
|
export type ViewsDateBodyProps = {
|
|
@@ -310,7 +332,9 @@ export type ViewsDateBodyProps = {
|
|
|
310
332
|
time: boolean;
|
|
311
333
|
/** It may be emptied: offer the `none` pick. */
|
|
312
334
|
empty: boolean;
|
|
313
|
-
/** The quick picks, in order:
|
|
335
|
+
/** The quick picks, in order: the provider's `datePicks` (absent, `today`, `tomorrow` and `next-monday`), then
|
|
336
|
+
* `none` where it may be emptied. `next-monday` is the Monday after today (a week on when today is one);
|
|
337
|
+
* `in-a-week` is today + 7. */
|
|
314
338
|
picks: ViewsDatePick[];
|
|
315
339
|
/** Today, on the local calendar ("YYYY-MM-DD"). */
|
|
316
340
|
today: string;
|
|
@@ -322,6 +346,197 @@ export type ViewsDateBodyProps = {
|
|
|
322
346
|
* through `onValueChange` as it is made. */
|
|
323
347
|
form: "computer" | "phone";
|
|
324
348
|
};
|
|
349
|
+
/** A box of a place, besides its country and its region's code. */
|
|
350
|
+
export type ViewsPlacePart = "line1" | "line2" | "postalCode" | "city" | "region";
|
|
351
|
+
/** A place's parts as a parts body holds them: a part's text where it has one. */
|
|
352
|
+
export type ViewsPlaceParts = Partial<Record<ViewsPlacePart | "regionCode" | "countryCode", string>>;
|
|
353
|
+
type ViewsPartsBodyCommon = {
|
|
354
|
+
/** The field's name: the body's accessible name, a sheet's title. */
|
|
355
|
+
label: string;
|
|
356
|
+
/** The edit is finished: the editor closes and saves what was handed. With no argument it closes as Enter does
|
|
357
|
+
* (the grid moves one row down); `"pick"` closes as a pick (a band picked), which moves nowhere. */
|
|
358
|
+
onDone: (how?: "pick") => void;
|
|
359
|
+
/** It may be emptied: every box cleared is a clear. */
|
|
360
|
+
empty: boolean;
|
|
361
|
+
/** What was typed on what opened it, already the first part's value where it reads as one. */
|
|
362
|
+
typed?: string;
|
|
363
|
+
/** Put the focus on the first box (or the country list it opens on) as it opens, without scrolling the page. */
|
|
364
|
+
autoFocus: boolean;
|
|
365
|
+
/** `phone`: draw no ✕, ✓ or Cancel of your own (the editor's panel holds them). */
|
|
366
|
+
form: "computer" | "phone";
|
|
367
|
+
};
|
|
368
|
+
/** A whole body for a field made of parts that your app draws: a name, a place or a range. The editor
|
|
369
|
+
* around it keeps the draft, the full name's rebuild, a place's region code, Tab, Escape, the save and
|
|
370
|
+
* the phone's ✕ and ✓. Hand every change through `onValueChange` as it is made. */
|
|
371
|
+
export type ViewsPartsBodyProps = ViewsPartsBodyCommon & ({
|
|
372
|
+
kind: "name";
|
|
373
|
+
/** The draft: `full` as the editor's rule shows it (it follows the parts until a name of its own is typed). */
|
|
374
|
+
value: {
|
|
375
|
+
given: string;
|
|
376
|
+
family: string;
|
|
377
|
+
full: string;
|
|
378
|
+
};
|
|
379
|
+
/** Hand `full` back as handed unless the person typed one. */
|
|
380
|
+
onValueChange: (value: {
|
|
381
|
+
given: string;
|
|
382
|
+
family: string;
|
|
383
|
+
full: string;
|
|
384
|
+
}) => void;
|
|
385
|
+
} | {
|
|
386
|
+
kind: "place";
|
|
387
|
+
value: ViewsPlaceParts;
|
|
388
|
+
/** `regionCode` is the editor's: it is read from the region, never taken as handed. */
|
|
389
|
+
onValueChange: (value: ViewsPlaceParts) => void;
|
|
390
|
+
/** The boxes the field takes, in the generic order. */
|
|
391
|
+
parts: readonly ViewsPlacePart[];
|
|
392
|
+
/** Those boxes in the country's own order, a row per line. */
|
|
393
|
+
rows: readonly (readonly ViewsPlacePart[])[];
|
|
394
|
+
/** Each box's words for the country. */
|
|
395
|
+
words: Readonly<Record<ViewsPlacePart, string>>;
|
|
396
|
+
/** The boxes the country asks for: mark them, never refuse. */
|
|
397
|
+
required: readonly ViewsPlacePart[];
|
|
398
|
+
/** Every country, by name, when the field takes the country. */
|
|
399
|
+
countries?: readonly {
|
|
400
|
+
code: string;
|
|
401
|
+
name: string;
|
|
402
|
+
}[];
|
|
403
|
+
/** The country's regions, once loaded, when it has a list: the region is picked from it. */
|
|
404
|
+
regions?: readonly {
|
|
405
|
+
code: string | null;
|
|
406
|
+
name: string;
|
|
407
|
+
}[];
|
|
408
|
+
/** It opens on the country list: the field takes a country and the place had none as the editor opened. Read once, it
|
|
409
|
+
* stays as handed while the editor is open. */
|
|
410
|
+
opens?: "countries";
|
|
411
|
+
} | {
|
|
412
|
+
kind: "range";
|
|
413
|
+
value: {
|
|
414
|
+
low: number | null;
|
|
415
|
+
high: number | null;
|
|
416
|
+
};
|
|
417
|
+
onValueChange: (value: {
|
|
418
|
+
low: number | null;
|
|
419
|
+
high: number | null;
|
|
420
|
+
}) => void;
|
|
421
|
+
/** The decimals the editor keeps: it rounds to them as it closes. */
|
|
422
|
+
decimals: number;
|
|
423
|
+
/** A unit drawn after the ends: "%", a currency code. */
|
|
424
|
+
unit?: string;
|
|
425
|
+
/** The field's bands: draw them as picks, each handing its two ends, then `onDone("pick")`. */
|
|
426
|
+
bands?: readonly {
|
|
427
|
+
key: string;
|
|
428
|
+
label: string;
|
|
429
|
+
low: number | null;
|
|
430
|
+
high: number | null;
|
|
431
|
+
}[];
|
|
432
|
+
});
|
|
433
|
+
/** One value of a list a values body holds: its text, its label where it has one, and whether it is the main one. */
|
|
434
|
+
export type ViewsValueLine = {
|
|
435
|
+
value: string;
|
|
436
|
+
label?: string;
|
|
437
|
+
main: boolean;
|
|
438
|
+
};
|
|
439
|
+
/** A whole body for a field holding several emails, phones, links or domains that your app draws. The editor around it
|
|
440
|
+
* keeps the draft, which value is kept as stored, Tab, Escape, the check before the save, the save and the phone's ✕ and ✓.
|
|
441
|
+
* Hand every change through `onValueChange` as it is made. */
|
|
442
|
+
export type ViewsValuesBodyProps = {
|
|
443
|
+
/** The field's name: the body's accessible name, a sheet's title. */
|
|
444
|
+
label: string;
|
|
445
|
+
/** The field's type: each value is read by its rule. */
|
|
446
|
+
kind: "email" | "phone" | "url" | "domain";
|
|
447
|
+
/** The draft, in its order: the main one first as it opens, and where a change put it after. An empty list is `[]`:
|
|
448
|
+
* draw your own line for adding one. */
|
|
449
|
+
value: readonly ViewsValueLine[];
|
|
450
|
+
/** Every change as it is made, the whole list each time. A line handed as it was drawn keeps what is stored. */
|
|
451
|
+
onValueChange: (value: readonly ViewsValueLine[]) => void;
|
|
452
|
+
/** The edit is finished: the editor closes as Enter does (the grid moves one row down) and saves what was handed. */
|
|
453
|
+
onDone: () => void;
|
|
454
|
+
/** Why a value would be refused, in the app's words, or null when it reads: check each value as it is added or changed. */
|
|
455
|
+
check: (value: string) => string | null;
|
|
456
|
+
/** A value carries a label: offer your own. False: draw no label, and none is saved. */
|
|
457
|
+
labels: boolean;
|
|
458
|
+
/** `one`: the field holds one value: one line, no label, no main mark, no line to add another while it holds one. */
|
|
459
|
+
holds: "one" | "several";
|
|
460
|
+
/** A phone's country, where a number typed without its country code is read (RO). */
|
|
461
|
+
region?: string;
|
|
462
|
+
/** It may be emptied: every value removed is a clear. */
|
|
463
|
+
empty: boolean;
|
|
464
|
+
/** What was typed on what opened it, already the one line's value. */
|
|
465
|
+
typed?: string;
|
|
466
|
+
/** Put the focus inside as it opens, without scrolling the page. */
|
|
467
|
+
autoFocus: boolean;
|
|
468
|
+
/** `phone`: draw no ✕, ✓ or Cancel of your own (the editor's panel holds them). */
|
|
469
|
+
form: "computer" | "phone";
|
|
470
|
+
};
|
|
471
|
+
/** A whole body for a field typed as one string (a line of text, an email, a phone, a link, a domain, long or rich
|
|
472
|
+
* text) that your app draws. The editor around it keeps the draft, Tab, Escape, ⌘ or Ctrl Enter, the check before the
|
|
473
|
+
* save, the save and the phone's ✕ and ✓. Hand every change through `onValueChange` as it is made. */
|
|
474
|
+
export type ViewsTextBodyProps = {
|
|
475
|
+
/** The field's name: the box's accessible name. */
|
|
476
|
+
label: string;
|
|
477
|
+
/** The field's text type: its keyboard and its reading. */
|
|
478
|
+
kind: "text" | "url" | "domain" | "email" | "phone" | "rich_text";
|
|
479
|
+
/** A paragraph (long text, rich text): Enter and Shift Enter make a newline. False: a line, where they call `onDone()`. */
|
|
480
|
+
paragraph: boolean;
|
|
481
|
+
/** The draft. */
|
|
482
|
+
value: string;
|
|
483
|
+
/** Every change as it is made, the whole text each time. */
|
|
484
|
+
onValueChange: (value: string) => void;
|
|
485
|
+
/** The edit is finished: the editor closes as Enter does (the grid moves one row down) and saves what was handed. */
|
|
486
|
+
onDone: () => void;
|
|
487
|
+
/** Why a value would be refused, in the app's words, or null when it reads. The editor checks again at the close. */
|
|
488
|
+
check: (value: string) => string | null;
|
|
489
|
+
/** A phone's country, where a number typed without its country code is read (RO). */
|
|
490
|
+
region?: string;
|
|
491
|
+
/** What was typed on what opened it, already the value. */
|
|
492
|
+
typed?: string;
|
|
493
|
+
/** Put the focus inside as it opens, without scrolling the page. */
|
|
494
|
+
autoFocus: boolean;
|
|
495
|
+
/** `phone`: it stands in a sheet; draw no ✕, ✓ or Cancel of your own (the sheet holds them). */
|
|
496
|
+
form: "computer" | "phone";
|
|
497
|
+
};
|
|
498
|
+
/** A whole body for a number, money or a percent that your app draws. The editor around it keeps the draft, the rounding
|
|
499
|
+
* to the field's decimals, Tab, Escape, ⌘ or Ctrl Enter, the check before the save, the save and the phone's ✕ and ✓.
|
|
500
|
+
* Hand every change through `onValueChange` as it is made. */
|
|
501
|
+
export type ViewsNumberBodyProps = {
|
|
502
|
+
/** The field's name: the box's accessible name. */
|
|
503
|
+
label: string;
|
|
504
|
+
/** A number, money (its unit is its currency) or a percent (0 to 100: the value is the percent). */
|
|
505
|
+
kind: "number" | "money" | "percent";
|
|
506
|
+
/** The draft: a number, null when empty, `NaN` when what is in the box reads as no number (a typed letter). */
|
|
507
|
+
value: number | null;
|
|
508
|
+
/** The unit the value is in: money's currency code, or a number's unit. Shown; changed only to one of `units`. */
|
|
509
|
+
unit?: string;
|
|
510
|
+
/** The units it may be put in. Absent: the unit is shown with nothing to press. */
|
|
511
|
+
units?: readonly string[];
|
|
512
|
+
/** Every change as it is made: the number, null when emptied, `NaN` for text that reads as no number (a close on it
|
|
513
|
+
* changes nothing); and the unit when it is one of `units`. */
|
|
514
|
+
onValueChange: (value: number | null, unit?: string) => void;
|
|
515
|
+
/** The edit is finished: the editor closes as Enter does (the grid moves one row down) and saves what was handed. */
|
|
516
|
+
onDone: () => void;
|
|
517
|
+
/** Why a value would be refused, in the app's words, or null when it reads. The editor checks again at the close. */
|
|
518
|
+
check: (value: number | null, unit?: string) => string | null;
|
|
519
|
+
/** The digits after the point the field keeps: the editor rounds to them. */
|
|
520
|
+
decimals: number;
|
|
521
|
+
/** The lowest it may hold, where the field says (a percent 0 unless widened). */
|
|
522
|
+
min?: number;
|
|
523
|
+
/** The highest it may hold, where the field says (a percent 100 unless widened). */
|
|
524
|
+
max?: number;
|
|
525
|
+
/** How your people write a number: the locale (BCP 47). */
|
|
526
|
+
locale: string;
|
|
527
|
+
/** The decimal separator, where your app states one; absent, either reads. */
|
|
528
|
+
decimal?: "." | ",";
|
|
529
|
+
/** It may be emptied: `null` is a value. False: an empty close changes nothing. */
|
|
530
|
+
empty: boolean;
|
|
531
|
+
/** Where the figure stands: `end` in a column, `start` in a row read left to right. */
|
|
532
|
+
align: "start" | "end";
|
|
533
|
+
/** What was typed on what opened it; `value` is its reading, or `NaN` where it reads as no number. */
|
|
534
|
+
typed?: string;
|
|
535
|
+
/** Put the focus inside as it opens, without scrolling the page. */
|
|
536
|
+
autoFocus: boolean;
|
|
537
|
+
/** `phone`: it stands in a sheet; draw no ✕, ✓ or Cancel of your own (the sheet holds them). */
|
|
538
|
+
form: "computer" | "phone";
|
|
539
|
+
};
|
|
325
540
|
export type ViewsCollapseProps = {
|
|
326
541
|
open: boolean;
|
|
327
542
|
children: ReactNode;
|
|
@@ -330,25 +545,60 @@ export type ViewsCollapseProps = {
|
|
|
330
545
|
clipClassName?: string;
|
|
331
546
|
durationMs?: number;
|
|
332
547
|
};
|
|
333
|
-
/** One of the editor panel's buttons, handed to a Sheet that draws them in its own head:
|
|
334
|
-
* accessible name and what a press does. The glyph is the app's (✕, ✓). */
|
|
548
|
+
/** One of the editor panel's buttons (or a toolbar panel's ✕), handed to a Sheet that draws them in its own head:
|
|
549
|
+
* its accessible name and what a press does. The glyph is the app's (✕, ✓). */
|
|
335
550
|
export type ViewsSheetAction = {
|
|
336
551
|
label: string;
|
|
337
552
|
onPress: () => void;
|
|
338
553
|
};
|
|
339
554
|
/** The editor panel's ✕ and ✓. `close` throws the edit away, as a swipe does; `done` closes it as
|
|
340
|
-
* done, and is absent where the body saves on its pick (a pick of one), which needs no ✓.
|
|
555
|
+
* done, and is absent where the body saves on its pick (a pick of one), which needs no ✓. A toolbar panel's sheet
|
|
556
|
+
* is handed `close` alone, which closes it. */
|
|
341
557
|
export type ViewsSheetActions = {
|
|
342
558
|
close: ViewsSheetAction;
|
|
343
559
|
done?: ViewsSheetAction;
|
|
344
560
|
};
|
|
345
|
-
/** Where the editor panel's ✕ and
|
|
346
|
-
* `head`, handed to the Sheet as `actions` for its own head, with
|
|
561
|
+
/** Where the editor panel's ✕ and ✓, and a toolbar panel's ✕, stand on a phone: `bar`, the panel's own inside the
|
|
562
|
+
* Sheet; `head`, handed to the Sheet as `actions` for its own head, with none drawn inside. */
|
|
347
563
|
export type ViewsSheetActionsPlace = "bar" | "head";
|
|
348
564
|
/** How the grid opens its own menus (a column's, a footer's figure picker, a group's ⋯, Add column):
|
|
349
565
|
* `popover`, ViewKit's rows in your `Popover`; `menu`, your `Menu`, handed rows as data. The row menu and
|
|
350
566
|
* a command cell's menu always go through your `Menu`. */
|
|
351
567
|
export type ViewsMenuRoute = "popover" | "menu";
|
|
568
|
+
/** Who draws the buttons the grid draws itself (a group's fold and ⋯, "+ Add column", a row's ⋯, the name's actions,
|
|
569
|
+
* an action column's buttons, a pick-list cell's ▾): `own`, ViewKit's, as on 0.5.0; `button`, your `Button`. */
|
|
570
|
+
export type ViewsGridButtons = "own" | "button";
|
|
571
|
+
/** Who draws a yes/no cell's box in the grid (the checkbox style): `own`, ViewKit's tick box in its own button, as
|
|
572
|
+
* on 0.5.0; `checkbox`, your `Checkbox`, the box your rail draws. */
|
|
573
|
+
export type ViewsGridCheckboxes = "own" | "checkbox";
|
|
574
|
+
/** Who draws a field row's own buttons (its edit target, the verb trigger around a value, the lane's ▾, rich text's
|
|
575
|
+
* Show more): `own`, ViewKit's, as on 0.5.0; `button`, your `Button`. */
|
|
576
|
+
export type ViewsFieldRowButtons = "own" | "button";
|
|
577
|
+
/** Who draws a field row's yes/no box (the checkbox style): `own`, ViewKit's tick box in its own button, as on 0.5.0;
|
|
578
|
+
* `checkbox`, your `Checkbox`, a Tab stop as the row's own switch is. */
|
|
579
|
+
export type ViewsFieldRowCheckboxes = "own" | "checkbox";
|
|
580
|
+
/** Where the selection bar's fixed box sits on one form. `bottom` is a CSS length (default
|
|
581
|
+
* `calc(1rem + env(safe-area-inset-bottom))`), `zIndex` its layer (default 50), and `className` the app's
|
|
582
|
+
* own classes on the box (a hook its CSS reads, a rule that hides the bar). */
|
|
583
|
+
export type ViewsBarPlacement = {
|
|
584
|
+
bottom?: string;
|
|
585
|
+
zIndex?: number;
|
|
586
|
+
className?: string;
|
|
587
|
+
};
|
|
588
|
+
/** The selection bar, as the app places it: on the desktop an island, on the phone a pill whose Actions
|
|
589
|
+
* open a sheet. `phoneQuery`, when handed, is the media query under which the bar is the phone's pill;
|
|
590
|
+
* without it the bar is the pill wherever the provider's `desktopQuery` does not match. */
|
|
591
|
+
export type ViewsSelectionBarSettings = {
|
|
592
|
+
phoneQuery?: string;
|
|
593
|
+
desktop?: ViewsBarPlacement;
|
|
594
|
+
phone?: ViewsBarPlacement;
|
|
595
|
+
/** Who draws the count chip that clears the selection on the desktop: `own` (the default), ViewKit's, as on 0.5.0;
|
|
596
|
+
* `button`, your `Button`. */
|
|
597
|
+
chip?: ViewsSelectionChip;
|
|
598
|
+
};
|
|
599
|
+
/** Who draws the selection bar's count chip (`selectionBar`'s `chip`): `own`, ViewKit's, as on 0.5.0; `button`, your
|
|
600
|
+
* `Button`, handed `outline`, `sm`, its box in `className`, `data-slot`, `aria-label` and `disabled` while busy. */
|
|
601
|
+
export type ViewsSelectionChip = "own" | "button";
|
|
352
602
|
/** A phone sheet. `snap` is a hint: an app whose sheet has no snap points ignores it. */
|
|
353
603
|
export type ViewsSheetProps = {
|
|
354
604
|
open: boolean;
|
|
@@ -358,8 +608,8 @@ export type ViewsSheetProps = {
|
|
|
358
608
|
* a head that takes only text. Absent for a title that is something else (a header with a glyph). */
|
|
359
609
|
label?: string;
|
|
360
610
|
description?: string;
|
|
361
|
-
/** The editor panel's ✕ and
|
|
362
|
-
* in the sheet's head (no `done`, no ✓). With `bar`, the default, the panel draws them itself. */
|
|
611
|
+
/** The editor panel's ✕ and ✓ (a toolbar panel's ✕ alone), handed only when the provider's `sheetActions` is
|
|
612
|
+
* `head`: draw them in the sheet's head (no `done`, no ✓). With `bar`, the default, the panel draws them itself. */
|
|
363
613
|
actions?: ViewsSheetActions;
|
|
364
614
|
snap?: "full" | "half" | "peek" | "auto";
|
|
365
615
|
className?: string;
|
|
@@ -410,11 +660,24 @@ export type ViewsComponents = {
|
|
|
410
660
|
/** Optional: a whole date body your app draws. Handed one, the date editor opens it; left out, it draws
|
|
411
661
|
* its own line, quick days and time around `Calendar`. */
|
|
412
662
|
DateBody?: ComponentType<ViewsDateBodyProps>;
|
|
663
|
+
/** Optional: a whole body for a field made of parts your app draws. Handed one, the name, place and range
|
|
664
|
+
* editors open it; left out, they draw their own boxes. */
|
|
665
|
+
PartsBody?: ComponentType<ViewsPartsBodyProps>;
|
|
666
|
+
/** Optional: a whole body for a field holding several emails, phones, links or domains, which your app draws. Handed
|
|
667
|
+
* one, the value list editor opens it; left out, it draws its own rows. */
|
|
668
|
+
ValuesBody?: ComponentType<ViewsValuesBodyProps>;
|
|
669
|
+
/** Optional: a whole body for a field typed as one string, which your app draws. Handed one, the text editors open
|
|
670
|
+
* it; left out, they draw their own box. */
|
|
671
|
+
TextBody?: ComponentType<ViewsTextBodyProps>;
|
|
672
|
+
/** Optional: a whole body for a number, money or a percent, which your app draws. Handed one, the number editors open
|
|
673
|
+
* it; left out, they draw their own box. */
|
|
674
|
+
NumberBody?: ComponentType<ViewsNumberBodyProps>;
|
|
413
675
|
};
|
|
414
676
|
/** The map as the views read it: `Input`, `Command` and `Calendar` always filled, the app's or the
|
|
415
|
-
* package's own; `Picker` and `
|
|
677
|
+
* package's own; `Picker`, `DateBody`, `PartsBody`, `ValuesBody`, `TextBody` and `NumberBody` as the app handed them. */
|
|
416
678
|
export type ViewsResolvedComponents = ViewsComponents & {
|
|
417
679
|
Input: ComponentType<ViewsInputProps>;
|
|
418
680
|
Command: ViewsCommandParts;
|
|
419
681
|
Calendar: ComponentType<ViewsCalendarProps>;
|
|
420
682
|
};
|
|
683
|
+
export {};
|