@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,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useLayoutEffect, useRef } from "react";
|
|
4
|
+
export function HScrollRow({ children, gap = "6px" }) {
|
|
5
|
+
const scrollRef = useRef(null);
|
|
6
|
+
useLayoutEffect(() => {
|
|
7
|
+
const container = scrollRef.current;
|
|
8
|
+
if (!container)
|
|
9
|
+
return;
|
|
10
|
+
const active = container.querySelector('[data-active="true"]');
|
|
11
|
+
if (!active)
|
|
12
|
+
return;
|
|
13
|
+
const scrollLeft = container.scrollLeft;
|
|
14
|
+
const containerWidth = container.clientWidth;
|
|
15
|
+
const childWidth = active.offsetWidth;
|
|
16
|
+
const childLeft = active.offsetLeft;
|
|
17
|
+
const childRight = childLeft + childWidth;
|
|
18
|
+
if (childLeft >= scrollLeft && childRight <= scrollLeft + containerWidth) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const target = childLeft - (containerWidth - childWidth) / 2;
|
|
22
|
+
container.scrollLeft = Math.max(0, target);
|
|
23
|
+
});
|
|
24
|
+
return (_jsx("div", { ref: scrollRef, onTouchMove: (e) => e.stopPropagation(), style: {
|
|
25
|
+
marginLeft: "-1rem",
|
|
26
|
+
marginRight: "-1rem",
|
|
27
|
+
maxWidth: "calc(100vw - var(--vk-scroll-row-inset, 0px))",
|
|
28
|
+
overflowX: "scroll",
|
|
29
|
+
overflowY: "hidden",
|
|
30
|
+
WebkitOverflowScrolling: "touch",
|
|
31
|
+
scrollbarWidth: "none",
|
|
32
|
+
msOverflowStyle: "none",
|
|
33
|
+
WebkitMaskImage: "linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 24px), transparent 100%)",
|
|
34
|
+
maskImage: "linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 24px), transparent 100%)",
|
|
35
|
+
}, children: _jsx("div", { style: {
|
|
36
|
+
display: "inline-flex",
|
|
37
|
+
gap,
|
|
38
|
+
whiteSpace: "nowrap",
|
|
39
|
+
paddingLeft: "1rem",
|
|
40
|
+
paddingRight: "var(--vk-scroll-row-end, 1rem)",
|
|
41
|
+
}, children: children }) }));
|
|
42
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { PillOption } from "../../views-row/model.js";
|
|
2
|
+
/** Which look a pill row wears. See the `variant` prop below. */
|
|
3
|
+
type PillVariant = "solid" | "plain";
|
|
4
|
+
type PillGroupProps<T extends string = string> = {
|
|
5
|
+
value: T;
|
|
6
|
+
options: PillOption<T>[];
|
|
7
|
+
onChange: (value: T) => void;
|
|
8
|
+
className?: string;
|
|
9
|
+
/** "sm" = smaller pills for secondary/child tab rows. Default = top-level pills. */
|
|
10
|
+
size?: "default" | "sm";
|
|
11
|
+
/**
|
|
12
|
+
* "solid" (default) = every pill is a filled chip, active tinted.
|
|
13
|
+
* "plain" = no chip on inactive pills; the active one is a neutral wash of
|
|
14
|
+
* the same color, taller and tighter. `ViewTabs` always renders plain; rows
|
|
15
|
+
* that reach for PillGroup directly keep the solid default.
|
|
16
|
+
*/
|
|
17
|
+
variant?: PillVariant;
|
|
18
|
+
/**
|
|
19
|
+
* The row can be REORDERED by dragging. Each pill's glyph becomes a grip
|
|
20
|
+
* under the pointer; the drop hands back every option's value in the new
|
|
21
|
+
* order. A drop that would carry a pill across the private/shared line is
|
|
22
|
+
* refused — the pill springs back and nothing is called. Absent, the row
|
|
23
|
+
* is exactly the row it always was: no handles, no drag context.
|
|
24
|
+
*/
|
|
25
|
+
onReorder?: (orderedValues: T[]) => void;
|
|
26
|
+
/** Which pills may be picked up. Default: all of them, once `onReorder` is set. */
|
|
27
|
+
canDrag?: (value: T) => boolean;
|
|
28
|
+
};
|
|
29
|
+
export declare function PillGroup<T extends string = string>({ value, options, onChange, className, size, variant, onReorder, canDrag, }: PillGroupProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useRef, useSyncExternalStore, } from "react";
|
|
4
|
+
import { DndContext, KeyboardSensor, MouseSensor, closestCenter, useSensor, useSensors, } from "@dnd-kit/core";
|
|
5
|
+
import { SortableContext, arrayMove, horizontalListSortingStrategy, sortableKeyboardCoordinates, useSortable, } from "@dnd-kit/sortable";
|
|
6
|
+
import { CSS } from "@dnd-kit/utilities";
|
|
7
|
+
import { cx } from "../../../internal/cx.js";
|
|
8
|
+
import { useViews } from "../../../provider/context.js";
|
|
9
|
+
import { useAnchoredToggle } from "./use-anchored-toggle.js";
|
|
10
|
+
function useDndReady() {
|
|
11
|
+
return useSyncExternalStore(() => () => undefined, () => true, () => false);
|
|
12
|
+
}
|
|
13
|
+
export function PillGroup({ value, options, onChange, className, size = "default", variant = "solid", onReorder, canDrag, }) {
|
|
14
|
+
const { icons, messages } = useViews();
|
|
15
|
+
const Lock = icons.lock;
|
|
16
|
+
const plain = variant === "plain";
|
|
17
|
+
const dressed = plain && size !== "sm";
|
|
18
|
+
const dndReady = useDndReady();
|
|
19
|
+
const sortable = onReorder !== undefined && dndReady;
|
|
20
|
+
const sensors = useSensors(useSensor(MouseSensor, { activationConstraint: { distance: 6 } }), useSensor(KeyboardSensor, { coordinateGetter: sortableKeyboardCoordinates }));
|
|
21
|
+
const handleDragEnd = (event) => {
|
|
22
|
+
const { active, over } = event;
|
|
23
|
+
if (!onReorder || !over || active.id === over.id)
|
|
24
|
+
return;
|
|
25
|
+
const values = options.map((option) => option.value);
|
|
26
|
+
const from = values.indexOf(active.id);
|
|
27
|
+
const to = values.indexOf(over.id);
|
|
28
|
+
if (from < 0 || to < 0)
|
|
29
|
+
return;
|
|
30
|
+
if (Boolean(options[from].private) !== Boolean(options[to].private))
|
|
31
|
+
return;
|
|
32
|
+
onReorder(arrayMove(values, from, to));
|
|
33
|
+
};
|
|
34
|
+
const row = (_jsx("div", { "data-slot": dressed ? "vk-views-row" : undefined, className: cx("flex items-center", plain ? "gap-0.5" : "gap-2", className), children: options.map((option) => {
|
|
35
|
+
const active = value === option.value;
|
|
36
|
+
const menu = active && option.menu?.length ? option.menu : undefined;
|
|
37
|
+
const draggable = sortable && (canDrag?.(option.value) ?? true);
|
|
38
|
+
const body = (_jsxs(_Fragment, { children: [_jsx("span", { children: option.label }), option.badge != null && option.badge > 0 && (_jsxs("span", { className: "ml-1 opacity-70 tabular-nums", children: ["(", option.badge, ")"] })), option.private && (_jsx("span", { role: "img", "aria-label": messages({ key: "views.panels.view-private" }), className: "inline-flex", children: _jsx(Lock, { className: "h-3 w-3 shrink-0 opacity-60" }) }))] }));
|
|
39
|
+
const shared = {
|
|
40
|
+
active,
|
|
41
|
+
menu,
|
|
42
|
+
label: option.label,
|
|
43
|
+
onSelect: () => onChange(option.value),
|
|
44
|
+
variant,
|
|
45
|
+
size,
|
|
46
|
+
activeClassName: option.activeClassName,
|
|
47
|
+
hoverClassName: option.hoverClassName,
|
|
48
|
+
};
|
|
49
|
+
return sortable ? (_jsx(SortablePill, { ...shared, id: option.value, leading: option.leading, draggable: draggable, children: body }, option.value)) : (_jsx(Pill, { ...shared, leading: option.leading, children: body }, option.value));
|
|
50
|
+
}) }));
|
|
51
|
+
if (!sortable)
|
|
52
|
+
return row;
|
|
53
|
+
return (_jsx(DndContext, { sensors: sensors, collisionDetection: closestCenter, onDragEnd: handleDragEnd, children: _jsx(SortableContext, { items: options.map((option) => option.value), strategy: horizontalListSortingStrategy, children: row }) }));
|
|
54
|
+
}
|
|
55
|
+
function Pill({ menu, label, onSelect, children, ...pill }) {
|
|
56
|
+
const { atoms, components } = useViews();
|
|
57
|
+
const { Menu } = components;
|
|
58
|
+
const anchor = useRef(null);
|
|
59
|
+
const toggle = useAnchoredToggle(anchor);
|
|
60
|
+
const button = (_jsx(atoms.Pill, { ...pill, ref: anchor, menuOpen: menu ? toggle.open : undefined, onPointerDown: menu ? toggle.triggerProps.onPointerDown : undefined, onClick: menu ? toggle.triggerProps.onClick : onSelect, onContextMenu: menu
|
|
61
|
+
? (event) => {
|
|
62
|
+
event.preventDefault();
|
|
63
|
+
toggle.setOpen(true);
|
|
64
|
+
}
|
|
65
|
+
: undefined, children: children }));
|
|
66
|
+
if (!menu)
|
|
67
|
+
return button;
|
|
68
|
+
return (_jsxs(_Fragment, { children: [button, _jsx(Menu, { open: toggle.open, onOpenChange: toggle.onOpenChange, anchor: anchor, align: "start", label: label, items: menu })] }));
|
|
69
|
+
}
|
|
70
|
+
function SortablePill({ id, draggable, leading, children, ...pill }) {
|
|
71
|
+
const { icons, messages } = useViews();
|
|
72
|
+
const Grip = icons.drag;
|
|
73
|
+
const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({
|
|
74
|
+
id,
|
|
75
|
+
disabled: !draggable,
|
|
76
|
+
});
|
|
77
|
+
const style = {
|
|
78
|
+
transform: CSS.Translate.toString(transform ? { ...transform, y: 0 } : null),
|
|
79
|
+
transition,
|
|
80
|
+
};
|
|
81
|
+
const slot = draggable ? (_jsxs("span", { className: "relative flex h-3.5 w-3.5 shrink-0 items-center justify-center", children: [_jsx("span", { "aria-hidden": true, className: "absolute inset-0 flex items-center justify-center transition-opacity duration-150 md:group-hover:opacity-0 md:group-has-[:focus-visible]:opacity-0", children: leading }), _jsx("span", { ...attributes, ...listeners, "aria-label": messages({ key: "views.panels.view-reorder", values: { label: pill.label } }), onPointerDown: (event) => {
|
|
82
|
+
event.stopPropagation();
|
|
83
|
+
listeners?.onPointerDown?.(event);
|
|
84
|
+
}, onClick: (event) => event.stopPropagation(), className: "absolute inset-0 hidden md:flex cursor-grab touch-none items-center justify-center rounded-sm opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-has-[:focus-visible]:opacity-100 active:cursor-grabbing focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-(color:--vk-border-brand)", style: { touchAction: "none" }, children: _jsx(Grip, { className: "h-3.5 w-3.5" }) })] })) : (leading);
|
|
85
|
+
return (_jsx("span", { ref: setNodeRef, style: style, className: cx("inline-flex", draggable && "group", isDragging && "z-50 opacity-60"), children: _jsx(Pill, { ...pill, leading: slot, leadingSlot: draggable, children: children }) }));
|
|
86
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CollectionViewsConfig } from "../../views-row/model.js";
|
|
2
|
+
export declare function ViewAxes({ axes, size, }: {
|
|
3
|
+
axes: CollectionViewsConfig<string>[];
|
|
4
|
+
/** `sm` for a row sitting beneath another — the secondary-row pill size. */
|
|
5
|
+
size?: "default" | "sm";
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { FoldingViewRow } from "./FoldingViewRow.js";
|
|
4
|
+
import { HScrollRow } from "./HScrollRow.js";
|
|
5
|
+
import { PillGroup } from "./PillGroup.js";
|
|
6
|
+
import { ViewCreatePill } from "./ViewCreatePill.js";
|
|
7
|
+
import { toPillOptions, usePillWords } from "./ViewTabs.js";
|
|
8
|
+
const AXIS_GAP = "0.5rem";
|
|
9
|
+
const AXIS_TRACK_CLASS = "rounded-full bg-(color:--vk-neutral) p-0.5";
|
|
10
|
+
export function ViewAxes({ axes, size, }) {
|
|
11
|
+
const words = usePillWords();
|
|
12
|
+
const grouped = axes.length > 1;
|
|
13
|
+
if (!grouped && size !== "sm")
|
|
14
|
+
return _jsx(FoldingViewRow, { axis: axes[0] });
|
|
15
|
+
return (_jsxs(HScrollRow, { gap: AXIS_GAP, children: [axes.map((axis, i) => (_jsx(PillGroup, { value: axis.value, options: toPillOptions(axis.options, { ...words, hideCounts: axis.hideCounts }), onChange: axis.onChange, size: size, variant: "plain", className: grouped ? AXIS_TRACK_CLASS : undefined }, axis.key ?? i))), axes.map((axis, i) => axis.onCreate ? (_jsx(ViewCreatePill, { label: axis.createLabel, onClick: axis.onCreate, size: size }, `create-${axis.key ?? i}`)) : null)] }));
|
|
16
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cx } from "../../../internal/cx.js";
|
|
4
|
+
import { ELEMENT_RESET } from "../../../internal/reset.js";
|
|
5
|
+
import { useViews } from "../../../provider/context.js";
|
|
6
|
+
export function ViewCreatePill({ label, onClick, size = "default", className, }) {
|
|
7
|
+
const { icons, messages } = useViews();
|
|
8
|
+
const Add = icons.add;
|
|
9
|
+
const name = label ?? messages({ key: "views.panels.view-create" });
|
|
10
|
+
return (_jsx("button", { type: "button", "aria-label": name, title: name, onClick: onClick, "data-slot": size === "sm" ? undefined : "vk-views-add", className: cx(ELEMENT_RESET, "inline-flex shrink-0 items-center justify-center rounded-full text-(color:--vk-fg-subtle) transition-colors duration-150 hover:bg-(color:--vk-hovered) hover:text-(color:--vk-fg)", size === "sm" ? "h-6 w-6" : "h-8 w-8", className), children: _jsx(Add, { className: "h-3.5 w-3.5 shrink-0" }) }));
|
|
11
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo, useRef, useState } from "react";
|
|
4
|
+
import { cx } from "../../../internal/cx.js";
|
|
5
|
+
import { ELEMENT_RESET } from "../../../internal/reset.js";
|
|
6
|
+
import { useViews } from "../../../provider/context.js";
|
|
7
|
+
import { formatCount } from "../../../internal/count.js";
|
|
8
|
+
import { VIEWS_LIST_CLASS, VIEWS_LIST_LABEL_CLASS, VIEWS_LIST_SEPARATOR_CLASS } from "./menu-classes.js";
|
|
9
|
+
import { PanelSheet, useSheetPanels } from "../panel-sheet.js";
|
|
10
|
+
import { useAnchoredToggle } from "./use-anchored-toggle.js";
|
|
11
|
+
import { ViewCreatePill } from "./ViewCreatePill.js";
|
|
12
|
+
import { ViewPickerRow } from "./ViewPickerRow.js";
|
|
13
|
+
const SEARCH_FROM = 6;
|
|
14
|
+
export function ViewPicker({ axis, className }) {
|
|
15
|
+
const { atoms, components, conventions, icons, messages } = useViews();
|
|
16
|
+
const { AppIcon, Popover } = components;
|
|
17
|
+
const Chevron = icons.chevronDown;
|
|
18
|
+
const Add = icons.add;
|
|
19
|
+
const anchor = useRef(null);
|
|
20
|
+
const toggle = useAnchoredToggle(anchor);
|
|
21
|
+
const sheet = useSheetPanels();
|
|
22
|
+
const [query, setQuery] = useState("");
|
|
23
|
+
const active = axis.options.find((option) => option.value === axis.value);
|
|
24
|
+
const { shared, personal } = useMemo(() => {
|
|
25
|
+
const q = query.trim().toLowerCase();
|
|
26
|
+
const seen = q ? axis.options.filter((o) => o.label.toLowerCase().includes(q)) : axis.options;
|
|
27
|
+
return {
|
|
28
|
+
shared: seen.filter((o) => !o.private),
|
|
29
|
+
personal: seen.filter((o) => o.private),
|
|
30
|
+
};
|
|
31
|
+
}, [axis.options, query]);
|
|
32
|
+
const onOpenChange = (next, details) => {
|
|
33
|
+
toggle.onOpenChange(next, details);
|
|
34
|
+
if (!next)
|
|
35
|
+
setQuery("");
|
|
36
|
+
};
|
|
37
|
+
const close = () => {
|
|
38
|
+
toggle.close();
|
|
39
|
+
setQuery("");
|
|
40
|
+
};
|
|
41
|
+
const pick = (option) => {
|
|
42
|
+
axis.onChange(option.value);
|
|
43
|
+
close();
|
|
44
|
+
};
|
|
45
|
+
if (axis.options.length === 0) {
|
|
46
|
+
return axis.onCreate ? _jsx(ViewCreatePill, { label: axis.createLabel, onClick: axis.onCreate, className: className }) : null;
|
|
47
|
+
}
|
|
48
|
+
const rows = (views) => views.map((option) => (_jsx(ViewPickerRow, { option: option, active: option.value === axis.value, onSelect: () => pick(option), hideCounts: axis.hideCounts }, option.value)));
|
|
49
|
+
const list = (_jsxs(_Fragment, { children: [axis.options.length >= SEARCH_FROM && (_jsx("div", { className: "px-1.5 pt-1.5", children: _jsx(atoms.PanelSearch, { value: query, onChange: setQuery, placeholder: messages({ key: "views.panels.views-search" }), autoFocus: !sheet }) })), _jsxs("div", { role: "listbox", "aria-label": messages({ key: "views.panels.views-list" }), className: VIEWS_LIST_CLASS, children: [shared.length > 0 && personal.length > 0 && (_jsx("div", { className: VIEWS_LIST_LABEL_CLASS, children: messages({ key: "views.panels.views-shared" }) })), rows(shared), personal.length > 0 && (_jsxs(_Fragment, { children: [shared.length > 0 && (_jsx("div", { className: VIEWS_LIST_LABEL_CLASS, children: messages({ key: "views.panels.views-personal" }) })), rows(personal)] })), shared.length + personal.length === 0 && (_jsx("div", { className: "px-2 py-3 text-sm text-(color:--vk-fg-subtle)", children: messages({ key: "views.panels.views-none" }) })), axis.onCreate && (_jsxs(_Fragment, { children: [_jsx("div", { className: VIEWS_LIST_SEPARATOR_CLASS }), _jsx(atoms.ChoiceRow, { label: messages({
|
|
50
|
+
key: "views.panels.view-create-row",
|
|
51
|
+
values: { label: axis.createLabel ?? messages({ key: "views.panels.view-create" }) },
|
|
52
|
+
}), leading: _jsx(Add, { className: "h-4 w-4 shrink-0 text-(color:--vk-fg-subtle)" }), onClick: () => {
|
|
53
|
+
close();
|
|
54
|
+
axis.onCreate?.();
|
|
55
|
+
} })] }))] })] }));
|
|
56
|
+
return (_jsxs(_Fragment, { children: [_jsxs("button", { ref: anchor, type: "button", "aria-label": messages({ key: "views.panels.view-change" }), "aria-haspopup": "dialog", "aria-expanded": toggle.open, "data-slot": "vk-views-chip", "data-state": toggle.open ? "open" : "closed", onPointerDown: toggle.triggerProps.onPointerDown, onClick: (event) => {
|
|
57
|
+
toggle.triggerProps.onClick(event);
|
|
58
|
+
if (toggle.open)
|
|
59
|
+
setQuery("");
|
|
60
|
+
}, className: cx(ELEMENT_RESET, "inline-flex h-8 max-w-full items-center gap-1.5 rounded-full bg-(color:--vk-selected,var(--vk-neutral)) pl-2.5 pr-2.5 text-sm font-medium text-(color:--vk-fg) transition-colors duration-150 data-[state=open]:bg-(color:--vk-pressed)", className), children: [active?.icon && _jsx(AppIcon, { name: active.icon, className: "h-3.5 w-3.5 shrink-0" }), _jsx("span", { className: "truncate", children: active?.label ?? messages({ key: "views.panels.view-fallback" }) }), active && !axis.hideCounts && typeof active.count === "number" && (_jsxs("span", { className: "font-medium opacity-70 tabular-nums", children: ["\u00B7 ", formatCount(active.count, conventions)] })), _jsx(Chevron, { className: "h-3.5 w-3.5 shrink-0 opacity-60" })] }), sheet ? (_jsx(PanelSheet, { open: toggle.open, onOpenChange: (next) => {
|
|
61
|
+
toggle.setOpen(next);
|
|
62
|
+
if (!next)
|
|
63
|
+
setQuery("");
|
|
64
|
+
}, title: messages({ key: "views.panels.views-list" }), snap: "auto", children: list })) : (_jsx(Popover, { open: toggle.open, onOpenChange: onOpenChange, anchor: anchor, align: "start", sideOffset: 6, chrome: "menu", className: "w-72", children: list }))] }));
|
|
65
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ViewTabOption } from "../../views-row/model.js";
|
|
2
|
+
export declare function ViewPickerRow({ option, active, onSelect, hideCounts, }: {
|
|
3
|
+
option: ViewTabOption<string>;
|
|
4
|
+
active: boolean;
|
|
5
|
+
onSelect: () => void;
|
|
6
|
+
hideCounts?: boolean;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useRef } from "react";
|
|
4
|
+
import { cx } from "../../../internal/cx.js";
|
|
5
|
+
import { ELEMENT_RESET } from "../../../internal/reset.js";
|
|
6
|
+
import { useViews } from "../../../provider/context.js";
|
|
7
|
+
import { formatCount } from "../../../internal/count.js";
|
|
8
|
+
import { useAnchoredToggle } from "./use-anchored-toggle.js";
|
|
9
|
+
export function ViewPickerRow({ option, active, onSelect, hideCounts, }) {
|
|
10
|
+
const { components, conventions, icons, messages } = useViews();
|
|
11
|
+
const { AppIcon, Menu } = components;
|
|
12
|
+
const Lock = icons.lock;
|
|
13
|
+
const More = icons.moreVertical;
|
|
14
|
+
const anchor = useRef(null);
|
|
15
|
+
const toggle = useAnchoredToggle(anchor);
|
|
16
|
+
const count = !hideCounts && typeof option.count === "number" ? option.count : null;
|
|
17
|
+
return (_jsxs("div", { className: cx("group flex items-center rounded-lg transition-colors", active ? "bg-(color:--vk-neutral)" : "hover:bg-(color:--vk-hovered)"), children: [_jsxs("button", { type: "button", role: "option", "aria-selected": active, onClick: onSelect, className: cx(ELEMENT_RESET, "flex h-8 min-w-0 flex-1 items-center gap-2.5 px-2 text-left text-sm"), children: [option.icon && (_jsx(AppIcon, { name: option.icon, className: cx("h-4 w-4 shrink-0", active ? "text-(color:--vk-fg)" : "text-(color:--vk-fg-subtle)") })), _jsx("span", { className: cx("min-w-0 flex-1 truncate", active && "[-webkit-text-stroke:0.4px_currentColor]"), children: option.label }), option.private && _jsx(Lock, { className: "h-3 w-3 shrink-0 text-(color:--vk-fg-subtle) opacity-70" }), count !== null && _jsx("span", { className: "shrink-0 text-xs tabular-nums text-(color:--vk-fg-subtle)", children: formatCount(count, conventions) })] }), option.menu?.length ? (_jsxs(_Fragment, { children: [_jsx("button", { ref: anchor, type: "button", "aria-label": messages({ key: "views.panels.view-menu" }), "aria-haspopup": "menu", "aria-expanded": toggle.open, "data-state": toggle.open ? "open" : "closed", ...toggle.triggerProps, className: cx(ELEMENT_RESET, "mr-1 inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-(color:--vk-fg-subtle) transition-opacity hover:text-(color:--vk-fg) md:opacity-0 md:group-hover:opacity-100 md:group-focus-within:opacity-100 data-[state=open]:text-(color:--vk-fg) data-[state=open]:opacity-100"), children: _jsx(More, { className: "h-3.5 w-3.5" }) }), _jsx(Menu, { open: toggle.open, onOpenChange: toggle.onOpenChange, anchor: anchor, align: "end", label: option.label, items: option.menu })] })) : null] }));
|
|
18
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type ComponentType } from "react";
|
|
2
|
+
import type { ViewsMessageResolver } from "../../../contract.js";
|
|
3
|
+
import type { PillOption, ViewTabOption } from "../../views-row/model.js";
|
|
4
|
+
type PillWords = {
|
|
5
|
+
hideCounts?: boolean;
|
|
6
|
+
messages: ViewsMessageResolver;
|
|
7
|
+
AppIcon: ComponentType<{
|
|
8
|
+
name: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
}>;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* `ViewTabOption` → `PillGroup` options — the one place the label/count join
|
|
14
|
+
* and the slot → class mapping live. `ViewAxes` renders through this too, so
|
|
15
|
+
* a slotted option looks identical whichever component draws the row.
|
|
16
|
+
*
|
|
17
|
+
* Slotted options carry their status color: the active tab takes the solid
|
|
18
|
+
* fill, and hovering an inactive one washes it with the same color's pastel.
|
|
19
|
+
* Rows whose options declare no slot stay neutral.
|
|
20
|
+
*/
|
|
21
|
+
export declare function toPillOptions<V extends string>(options: ViewTabOption<V>[], { hideCounts, messages, AppIcon }: PillWords): PillOption<V>[];
|
|
22
|
+
/** The pill words a row reads from the provider: one object while they hold, so a row's memo holds. */
|
|
23
|
+
export declare function usePillWords(hideCounts?: boolean): PillWords;
|
|
24
|
+
type Props<V extends string> = {
|
|
25
|
+
value: V;
|
|
26
|
+
options: ViewTabOption<V>[];
|
|
27
|
+
onChange: (value: V) => void;
|
|
28
|
+
size?: "default" | "sm";
|
|
29
|
+
};
|
|
30
|
+
export declare function ViewTabs<V extends string>({ value, options, onChange, size }: Props<V>): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { STATUS_SLOT_CLASSES } from "@viewkitjs/fields/design/status-slots";
|
|
4
|
+
import { useMemo } from "react";
|
|
5
|
+
import { useViews } from "../../../provider/context.js";
|
|
6
|
+
import { HScrollRow } from "./HScrollRow.js";
|
|
7
|
+
import { PillGroup } from "./PillGroup.js";
|
|
8
|
+
export function toPillOptions(options, { hideCounts, messages, AppIcon }) {
|
|
9
|
+
return options.map((o) => ({
|
|
10
|
+
value: o.value,
|
|
11
|
+
label: !hideCounts && typeof o.count === "number"
|
|
12
|
+
? messages({ key: "views.panels.view-count", values: { label: o.label, count: o.count } })
|
|
13
|
+
: o.label,
|
|
14
|
+
activeClassName: o.activeClassName ?? (o.slot ? STATUS_SLOT_CLASSES[o.slot].pillActive : undefined),
|
|
15
|
+
hoverClassName: o.slot ? STATUS_SLOT_CLASSES[o.slot].pillPlainHover : undefined,
|
|
16
|
+
leading: o.icon ? _jsx(AppIcon, { name: o.icon, className: "h-3.5 w-3.5 shrink-0" }) : undefined,
|
|
17
|
+
private: o.private,
|
|
18
|
+
menu: o.menu,
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
export function usePillWords(hideCounts) {
|
|
22
|
+
const { messages, components } = useViews();
|
|
23
|
+
const AppIcon = components.AppIcon;
|
|
24
|
+
return useMemo(() => ({ hideCounts, messages, AppIcon }), [hideCounts, messages, AppIcon]);
|
|
25
|
+
}
|
|
26
|
+
export function ViewTabs({ value, options, onChange, size }) {
|
|
27
|
+
const words = usePillWords();
|
|
28
|
+
return (_jsx(HScrollRow, { children: _jsx(PillGroup, { value: value, options: toPillOptions(options, words), onChange: onChange, size: size, variant: "plain" }) }));
|
|
29
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** The list's own inset, a panel's (`--vk-panel-padding`, 6px undeclared), as a menu's. */
|
|
2
|
+
export declare const VIEWS_LIST_CLASS = "p-(--vk-panel-padding,0.375rem)";
|
|
3
|
+
/** A heading over a run of rows: Shared, Personal. */
|
|
4
|
+
export declare const VIEWS_LIST_LABEL_CLASS = "px-2 py-1.5 text-xs font-semibold text-(color:--vk-fg-subtle)";
|
|
5
|
+
/** The hairline between two runs of rows, 6px off the row on either side. */
|
|
6
|
+
export declare const VIEWS_LIST_SEPARATOR_CLASS = "-mx-1 my-1.5 h-px bg-(color:--vk-border)";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
2
|
+
import type { ViewsCloseReason } from "../../../provider/components.js";
|
|
3
|
+
export declare function useAnchoredToggle(anchor: RefObject<HTMLElement | null>): {
|
|
4
|
+
open: boolean;
|
|
5
|
+
/** Open or close with no focus move: the right-click that opens, the popup's own report. */
|
|
6
|
+
setOpen: (open: boolean) => void;
|
|
7
|
+
/** The popup's `onOpenChange`: a close from inside gives focus back to the anchor. */
|
|
8
|
+
onOpenChange: (open: boolean, details?: {
|
|
9
|
+
reason?: ViewsCloseReason;
|
|
10
|
+
}) => void;
|
|
11
|
+
/** Close after a pick inside the popup, focus back on the anchor. */
|
|
12
|
+
close: () => void;
|
|
13
|
+
triggerProps: {
|
|
14
|
+
onPointerDown: () => void;
|
|
15
|
+
onClick: (event?: {
|
|
16
|
+
detail: number;
|
|
17
|
+
}) => void;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useRef, useState } from "react";
|
|
3
|
+
export function useAnchoredToggle(anchor) {
|
|
4
|
+
const [open, setOpen] = useState(false);
|
|
5
|
+
const openAtPress = useRef(false);
|
|
6
|
+
const restore = () => anchor.current?.focus({ preventScroll: true });
|
|
7
|
+
return {
|
|
8
|
+
open,
|
|
9
|
+
setOpen,
|
|
10
|
+
onOpenChange: (next, details) => {
|
|
11
|
+
setOpen(next);
|
|
12
|
+
const reason = details?.reason;
|
|
13
|
+
if (!next && reason !== "outside-press" && reason !== "focus-out")
|
|
14
|
+
restore();
|
|
15
|
+
},
|
|
16
|
+
close: () => {
|
|
17
|
+
setOpen(false);
|
|
18
|
+
restore();
|
|
19
|
+
},
|
|
20
|
+
triggerProps: {
|
|
21
|
+
onPointerDown: () => {
|
|
22
|
+
openAtPress.current = open;
|
|
23
|
+
},
|
|
24
|
+
onClick: (event) => {
|
|
25
|
+
const wasOpen = event?.detail === 0 ? false : openAtPress.current;
|
|
26
|
+
openAtPress.current = false;
|
|
27
|
+
setOpen(wasOpen ? false : !open);
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export { PillGroup } from "./react/views-row/PillGroup.js";
|
|
2
|
+
export { HScrollRow } from "./react/views-row/HScrollRow.js";
|
|
3
|
+
export { ViewTabs, toPillOptions } from "./react/views-row/ViewTabs.js";
|
|
4
|
+
export { FoldingViewRow } from "./react/views-row/FoldingViewRow.js";
|
|
5
|
+
export { ViewPicker } from "./react/views-row/ViewPicker.js";
|
|
6
|
+
export { ViewPickerRow } from "./react/views-row/ViewPickerRow.js";
|
|
7
|
+
export { ViewCreatePill } from "./react/views-row/ViewCreatePill.js";
|
|
8
|
+
export { ViewAxes } from "./react/views-row/ViewAxes.js";
|
|
9
|
+
export { TextFilterBody } from "./filter/TextFilterBody.js";
|
|
10
|
+
export { NumberFilterBody } from "./filter/NumberFilterBody.js";
|
|
11
|
+
export { RangeFilterBody } from "./filter/RangeFilterBody.js";
|
|
12
|
+
export { RelationFilterBody } from "./filter/RelationFilterBody.js";
|
|
13
|
+
export { DateFilterInput } from "./filter/DateFilterInput.js";
|
|
14
|
+
export { DateFilterBody, DateFilterFields, useDateFilterEditor } from "./filter/DateFilterBody.js";
|
|
15
|
+
export type { DateFilterEditor } from "./filter/DateFilterBody.js";
|
|
16
|
+
export { DateFilterCalendar } from "./filter/DateFilterCalendar.js";
|
|
17
|
+
export type { DateFilterEditingEnd } from "./filter/DateFilterCalendar.js";
|
|
18
|
+
export { FilterIcon } from "./filter/FilterIcon.js";
|
|
19
|
+
export { CompactFilterList, FilterSectionHeading, dimensionRows } from "./filter/filter-list.js";
|
|
20
|
+
export { CompactDateRangeDetail, CompactFilterDetail, CompactToggleDetail } from "./filter/details.js";
|
|
21
|
+
export { CompactTimeScopeDetail } from "./filter/TimeScopeDetail.js";
|
|
22
|
+
export type { PanelFieldEditor } from "./react/field-editor.js";
|
|
23
|
+
export { GroupBucketsList } from "./react/GroupBucketsList.js";
|
|
24
|
+
export { LayoutColumnsList } from "./react/LayoutColumnsList.js";
|
|
25
|
+
export { CompactGroupByDetail, CompactGroupDateByDetail, CompactGroupDetail, CompactGroupSortDetail, CompactSortDetail, } from "./react/order-details.js";
|
|
26
|
+
export { CompactLayoutDetail } from "./react/layout-detail.js";
|
|
27
|
+
export { PopoverColumnDetail } from "./react/PopoverColumnDetail.js";
|
|
28
|
+
export { ViewOptionsPanelContent } from "./react/customize.js";
|
|
29
|
+
export { PopoverRootList } from "./react/root-list.js";
|
|
30
|
+
export { ViewFooter } from "./react/view-footer.js";
|
|
31
|
+
export { ViewOptionsActions } from "./react/view-actions.js";
|
|
32
|
+
export { ViewOptionsPopoverPanel, keepPanelOpenForPortals, useViewActivePanel, useViewOptionsPopover, viewOptionsPopoverClassName, } from "./react/popover.js";
|
|
33
|
+
export type { ViewOptionsPopoverState } from "./react/popover.js";
|
|
34
|
+
export { Toolbar } from "./react/toolbar/Toolbar.js";
|
|
35
|
+
export type { ToolbarPart } from "./react/toolbar/Toolbar.js";
|
|
36
|
+
export { ToolbarButton } from "./react/toolbar/ToolbarButton.js";
|
|
37
|
+
export { useToolbarPanel, useToolbarSlot } from "./react/toolbar/context.js";
|
|
38
|
+
export type { ToolbarSlotState } from "./react/toolbar/context.js";
|
|
39
|
+
export { ToolbarSearch } from "./react/toolbar/ToolbarSearch.js";
|
|
40
|
+
export { ToolbarNew } from "./react/toolbar/ToolbarNew.js";
|
|
41
|
+
export { ToolbarViews } from "./react/toolbar/ToolbarViews.js";
|
|
42
|
+
export { ToolbarOptions } from "./react/toolbar/ToolbarOptions.js";
|
|
43
|
+
export { ToolbarSort } from "./react/toolbar/ToolbarSort.js";
|
|
44
|
+
export { ToolbarFilter } from "./react/toolbar/ToolbarFilter.js";
|
|
45
|
+
export type { ToolbarPanelHost } from "./react/toolbar/panel-part.js";
|
|
46
|
+
export { useToolbarPanelState } from "./react/toolbar/panel-state.js";
|
|
47
|
+
export type { ToolbarPanelState } from "./react/toolbar/panel-state.js";
|
|
48
|
+
export { FilterPanelContent } from "./react/filter-panel.js";
|
|
49
|
+
export { ReadyToolbar } from "./react/toolbar/ReadyToolbar.js";
|
|
50
|
+
export type { ReadyToolbarProps } from "./react/toolbar/ReadyToolbar.js";
|
|
51
|
+
export { useListSettingsState } from "./react/toolbar/use-list-settings-state.js";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export { PillGroup } from "./react/views-row/PillGroup.js";
|
|
3
|
+
export { HScrollRow } from "./react/views-row/HScrollRow.js";
|
|
4
|
+
export { ViewTabs, toPillOptions } from "./react/views-row/ViewTabs.js";
|
|
5
|
+
export { FoldingViewRow } from "./react/views-row/FoldingViewRow.js";
|
|
6
|
+
export { ViewPicker } from "./react/views-row/ViewPicker.js";
|
|
7
|
+
export { ViewPickerRow } from "./react/views-row/ViewPickerRow.js";
|
|
8
|
+
export { ViewCreatePill } from "./react/views-row/ViewCreatePill.js";
|
|
9
|
+
export { ViewAxes } from "./react/views-row/ViewAxes.js";
|
|
10
|
+
export { TextFilterBody } from "./filter/TextFilterBody.js";
|
|
11
|
+
export { NumberFilterBody } from "./filter/NumberFilterBody.js";
|
|
12
|
+
export { RangeFilterBody } from "./filter/RangeFilterBody.js";
|
|
13
|
+
export { RelationFilterBody } from "./filter/RelationFilterBody.js";
|
|
14
|
+
export { DateFilterInput } from "./filter/DateFilterInput.js";
|
|
15
|
+
export { DateFilterBody, DateFilterFields, useDateFilterEditor } from "./filter/DateFilterBody.js";
|
|
16
|
+
export { DateFilterCalendar } from "./filter/DateFilterCalendar.js";
|
|
17
|
+
export { FilterIcon } from "./filter/FilterIcon.js";
|
|
18
|
+
export { CompactFilterList, FilterSectionHeading, dimensionRows } from "./filter/filter-list.js";
|
|
19
|
+
export { CompactDateRangeDetail, CompactFilterDetail, CompactToggleDetail } from "./filter/details.js";
|
|
20
|
+
export { CompactTimeScopeDetail } from "./filter/TimeScopeDetail.js";
|
|
21
|
+
export { GroupBucketsList } from "./react/GroupBucketsList.js";
|
|
22
|
+
export { LayoutColumnsList } from "./react/LayoutColumnsList.js";
|
|
23
|
+
export { CompactGroupByDetail, CompactGroupDateByDetail, CompactGroupDetail, CompactGroupSortDetail, CompactSortDetail, } from "./react/order-details.js";
|
|
24
|
+
export { CompactLayoutDetail } from "./react/layout-detail.js";
|
|
25
|
+
export { PopoverColumnDetail } from "./react/PopoverColumnDetail.js";
|
|
26
|
+
export { ViewOptionsPanelContent } from "./react/customize.js";
|
|
27
|
+
export { PopoverRootList } from "./react/root-list.js";
|
|
28
|
+
export { ViewFooter } from "./react/view-footer.js";
|
|
29
|
+
export { ViewOptionsActions } from "./react/view-actions.js";
|
|
30
|
+
export { ViewOptionsPopoverPanel, keepPanelOpenForPortals, useViewActivePanel, useViewOptionsPopover, viewOptionsPopoverClassName, } from "./react/popover.js";
|
|
31
|
+
export { Toolbar } from "./react/toolbar/Toolbar.js";
|
|
32
|
+
export { ToolbarButton } from "./react/toolbar/ToolbarButton.js";
|
|
33
|
+
export { useToolbarPanel, useToolbarSlot } from "./react/toolbar/context.js";
|
|
34
|
+
export { ToolbarSearch } from "./react/toolbar/ToolbarSearch.js";
|
|
35
|
+
export { ToolbarNew } from "./react/toolbar/ToolbarNew.js";
|
|
36
|
+
export { ToolbarViews } from "./react/toolbar/ToolbarViews.js";
|
|
37
|
+
export { ToolbarOptions } from "./react/toolbar/ToolbarOptions.js";
|
|
38
|
+
export { ToolbarSort } from "./react/toolbar/ToolbarSort.js";
|
|
39
|
+
export { ToolbarFilter } from "./react/toolbar/ToolbarFilter.js";
|
|
40
|
+
export { useToolbarPanelState } from "./react/toolbar/panel-state.js";
|
|
41
|
+
export { FilterPanelContent } from "./react/filter-panel.js";
|
|
42
|
+
export { ReadyToolbar } from "./react/toolbar/ReadyToolbar.js";
|
|
43
|
+
export { useListSettingsState } from "./react/toolbar/use-list-settings-state.js";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type ListSettings } from "@viewkitjs/fields/query";
|
|
2
|
+
import type { ListColumn } from "../../model/column-schema.js";
|
|
3
|
+
/** The columns a board can be laid out by: a field the board rule allows (`canBoardBy`), a value to read, and not
|
|
4
|
+
* switched off for this list (`bucketable: false`). In column order, the order "Board by" lists them. */
|
|
5
|
+
export declare function boardFieldCandidates<Row>(columns: readonly ListColumn<Row>[]): ListColumn<Row>[];
|
|
6
|
+
/** The column the board is laid out by: the settings' field while it is a candidate and not set aside, else the
|
|
7
|
+
* list's preferred field, else the type rule's (`defaultBoardField`). A stored field this list lacks falls back
|
|
8
|
+
* silently and stays in the settings. */
|
|
9
|
+
export declare function boardFieldOf<Row>(settings: ListSettings, columns: readonly ListColumn<Row>[], preferred?: string): ListColumn<Row> | undefined;
|
|
10
|
+
/** The columns a calendar can be laid out by: a date or a date and time, with a value to read and a field behind it
|
|
11
|
+
* (the settings keep the calendar's date as a field key). Hidden columns stay in. */
|
|
12
|
+
export declare function calendarFieldCandidates<Row>(columns: readonly ListColumn<Row>[]): ListColumn<Row>[];
|
|
13
|
+
/** The calendar's date column when the settings name none: the preferred field, else the first a person can edit (a
|
|
14
|
+
* business date rather than a stamp the system writes), else the first. */
|
|
15
|
+
export declare function defaultCalendarField<Row>(columns: readonly ListColumn<Row>[], preferred?: string): ListColumn<Row> | undefined;
|
|
16
|
+
/** The column the calendar is laid out by: the settings' field while it is a candidate, else the default. A stored
|
|
17
|
+
* field this list lacks falls back silently and stays in the settings, until a switch to Calendar writes the
|
|
18
|
+
* default (`settingsLayout`). */
|
|
19
|
+
export declare function calendarFieldOf<Row>(settings: ListSettings, columns: readonly ListColumn<Row>[], preferred?: string): ListColumn<Row> | undefined;
|
|
20
|
+
/** The settings with the calendar's date field set, or taken out (`null`); its end field stays. No `calendar` when
|
|
21
|
+
* it names neither. */
|
|
22
|
+
export declare function withCalendarField(settings: ListSettings, fieldKey: string | null): ListSettings;
|
|
23
|
+
/** The settings with the board laid out by `fieldKey`, its lanes kept. */
|
|
24
|
+
export declare function withBoardField(settings: ListSettings, fieldKey: string): ListSettings;
|
|
25
|
+
/** The settings with one of the board's lanes shown or hidden. The lanes of `fieldKey` are written in `laneOrder`
|
|
26
|
+
* (the lane named last when the order lacks it), each keeping its place, a new one placed at (i + 1) * 1000; the
|
|
27
|
+
* lanes of other fields stay as they are. */
|
|
28
|
+
export declare function withLaneVisible(settings: ListSettings, fieldKey: string, laneKey: string, visible: boolean, laneOrder: readonly string[]): ListSettings;
|