@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,25 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type ActivePanel, type ViewOptionInputs } from "../../model.js";
|
|
3
|
+
import type { CollectionViewState } from "../../view-state.js";
|
|
4
|
+
import type { PanelFieldEditor } from "../field-editor.js";
|
|
5
|
+
import { type ToolbarPanelHost } from "./panel-part.js";
|
|
6
|
+
export declare function ToolbarOptions({ view, fieldEditor, foldFilters, onClear, open, onOpenChange, page: pageIn, onPageChange, host, widthClassName, ...inputs }: ViewOptionInputs & {
|
|
7
|
+
/** The shared view this list shows: the drift dot, and the panel's footer (Reset, Set default for everyone). */
|
|
8
|
+
view?: CollectionViewState;
|
|
9
|
+
/** The list's field editor, for the Columns list and a column's settings. */
|
|
10
|
+
fieldEditor?: PanelFieldEditor | null;
|
|
11
|
+
/** The filter dimensions behind one Filter row (lists). Default true. */
|
|
12
|
+
foldFilters?: boolean;
|
|
13
|
+
/** The ✕'s clear (and the panel's Clear all); absent, each active option cleared through its own `onChange`, or
|
|
14
|
+
* Reset on a shared view (the builder's filter rows add up, so every filter clears). For one change, pass
|
|
15
|
+
* `settingsCleared(…, "options")`. */
|
|
16
|
+
onClear?: () => void;
|
|
17
|
+
open?: boolean;
|
|
18
|
+
onOpenChange?: (open: boolean) => void;
|
|
19
|
+
/** The page it is on, when the app holds it; absent, its own, forgotten when it closes. */
|
|
20
|
+
page?: ActivePanel;
|
|
21
|
+
onPageChange?: (page: ActivePanel) => void;
|
|
22
|
+
host?: ToolbarPanelHost;
|
|
23
|
+
/** The popover's width class. Default `w-60`. */
|
|
24
|
+
widthClassName?: string;
|
|
25
|
+
}): ReactNode;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { useViews } from "../../../provider/context.js";
|
|
5
|
+
import { getViewOptionAvailability } from "../../availability.js";
|
|
6
|
+
import { clearViewOptions, countActiveViewOptions, } from "../../model.js";
|
|
7
|
+
import { ViewOptionsPanelContent } from "../customize.js";
|
|
8
|
+
import { viewOptionsPopoverClassName } from "../popover.js";
|
|
9
|
+
import { ToolbarPanelPart } from "./panel-part.js";
|
|
10
|
+
export function ToolbarOptions({ view, fieldEditor, foldFilters = true, onClear, open, onOpenChange, page: pageIn, onPageChange, host, widthClassName, ...inputs }) {
|
|
11
|
+
const { icons, messages } = useViews();
|
|
12
|
+
const Glyph = icons.options;
|
|
13
|
+
const [ownOpen, setOwnOpen] = useState(false);
|
|
14
|
+
const [ownPage, setOwnPage] = useState(null);
|
|
15
|
+
const holdsOpen = open !== undefined && !!onOpenChange;
|
|
16
|
+
const holdsPage = pageIn !== undefined && !!onPageChange;
|
|
17
|
+
const page = holdsPage ? pageIn : ownPage;
|
|
18
|
+
const setPage = holdsPage ? onPageChange : setOwnPage;
|
|
19
|
+
if (!getViewOptionAvailability(inputs).desktop)
|
|
20
|
+
return null;
|
|
21
|
+
const name = messages({ key: "views.panels.toolbar-options" });
|
|
22
|
+
const count = view ? 0 : countActiveViewOptions(inputs);
|
|
23
|
+
const clear = onClear ?? (view ? view.onReset : () => clearViewOptions(inputs));
|
|
24
|
+
const handleOpenChange = (next) => {
|
|
25
|
+
if (!next && !holdsPage)
|
|
26
|
+
setOwnPage(null);
|
|
27
|
+
if (holdsOpen)
|
|
28
|
+
onOpenChange(next);
|
|
29
|
+
else
|
|
30
|
+
setOwnOpen(next);
|
|
31
|
+
};
|
|
32
|
+
return (_jsx(ToolbarPanelPart, { panelKey: "options", slot: "vk-toolbar-options", icon: _jsx(Glyph, { className: "h-4 w-4 shrink-0" }), label: name, word: name, count: count, onClear: clear, dot: !!view && view.changes > 0, open: holdsOpen ? open : ownOpen, onOpenChange: handleOpenChange, host: host, popoverClassName: viewOptionsPopoverClassName(page, widthClassName), children: ({ fill, close, closeButton }) => (_jsx(ViewOptionsPanelContent, { ...inputs, activePanel: page, onOpenPanel: setPage, anyActive: view ? view.changes > 0 : count > 0, clearAll: clear, foldFilters: foldFilters, onClose: close, closeButton: closeButton, fill: fill, view: view, fieldEditor: fieldEditor })) }));
|
|
33
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export declare function ToolbarSearch({ value, onChange, placeholder, searching, }: {
|
|
3
|
+
value: string;
|
|
4
|
+
onChange: (value: string) => void;
|
|
5
|
+
/** Default `views.panels.search`. */
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
/** The app's search is under way: a spinner stands where the glass is, and the field stays usable. */
|
|
8
|
+
searching?: boolean;
|
|
9
|
+
}): ReactNode;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useRef, useState } from "react";
|
|
4
|
+
import { cx } from "../../../internal/cx.js";
|
|
5
|
+
import { LoadingRing } from "../../../atoms/Loading.js";
|
|
6
|
+
import { ELEMENT_RESET } from "../../../internal/reset.js";
|
|
7
|
+
import { useViews } from "../../../provider/context.js";
|
|
8
|
+
import { useToolbarSlot } from "./context.js";
|
|
9
|
+
import { ToolbarButton } from "./ToolbarButton.js";
|
|
10
|
+
export function ToolbarSearch({ value, onChange, placeholder, searching = false, }) {
|
|
11
|
+
const { components, icons, messages } = useViews();
|
|
12
|
+
const { Input } = components;
|
|
13
|
+
const Glass = icons.search;
|
|
14
|
+
const Close = icons.close;
|
|
15
|
+
const slot = useToolbarSlot();
|
|
16
|
+
const name = messages({ key: "views.panels.search" });
|
|
17
|
+
const busy = messages({ key: "views.panels.searching" });
|
|
18
|
+
const [opened, setOpened] = useState(false);
|
|
19
|
+
const field = useRef(null);
|
|
20
|
+
const shown = slot.fill || opened || value !== "";
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (opened && !slot.fill)
|
|
23
|
+
field.current?.focus({ preventScroll: true });
|
|
24
|
+
}, [opened, slot.fill]);
|
|
25
|
+
const clear = () => {
|
|
26
|
+
onChange("");
|
|
27
|
+
setOpened(false);
|
|
28
|
+
};
|
|
29
|
+
if (!shown) {
|
|
30
|
+
return (_jsx("div", { "data-slot": "vk-toolbar-search", className: "relative flex flex-none items-center", children: _jsx(ToolbarButton, { icon: searching ? _jsx(LoadingRing, { label: busy, slot: "vk-toolbar-search-spinner", className: "h-4 w-4" }) : _jsx(Glass, { className: "h-4 w-4 shrink-0" }), label: name, word: null, onClick: () => setOpened(true) }) }));
|
|
31
|
+
}
|
|
32
|
+
return (_jsxs("div", { "data-slot": "vk-toolbar-search", "data-expanded": "", className: cx("relative flex min-w-0 items-center", slot.fill || slot.form === "phone" ? "flex-1" : "w-72 transition-[width] duration-150 ease-out"), children: [searching ? (_jsx(LoadingRing, { label: busy, slot: "vk-toolbar-search-spinner", className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2" })) : (_jsx(Glass, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-(color:--vk-fg-subtle)" })), _jsx(Input, { ref: field, type: "search", chrome: "bare", "data-slot": "vk-toolbar-search-field", "aria-label": name, "aria-busy": searching || undefined, value: value, placeholder: placeholder ?? name, onChange: (event) => onChange(event.target.value), onBlur: () => {
|
|
33
|
+
if (value === "")
|
|
34
|
+
setOpened(false);
|
|
35
|
+
}, onKeyDown: (event) => {
|
|
36
|
+
if (event.key !== "Escape")
|
|
37
|
+
return;
|
|
38
|
+
event.preventDefault();
|
|
39
|
+
clear();
|
|
40
|
+
}, className: cx("h-9 w-full min-w-0 rounded-full bg-transparent pl-9 text-base md:text-sm outline-none", value !== "" ? "pr-9" : "pr-3", "[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none") }), value !== "" && (_jsx("button", { type: "button", "data-slot": "vk-toolbar-search-clear", "aria-label": messages({ key: "views.panels.search-clear" }), onMouseDown: (event) => event.preventDefault(), onClick: clear, className: cx(ELEMENT_RESET, "absolute right-1.5 top-1/2 inline-flex h-6 w-6 -translate-y-1/2 items-center justify-center rounded-full text-(color:--vk-fg-subtlest) transition-colors hover:bg-(color:--vk-hovered) hover:text-(color:--vk-fg)"), children: _jsx(Close, { className: "h-3 w-3" }) }))] }));
|
|
41
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type SortConfig } from "../../model.js";
|
|
3
|
+
import { type ToolbarPanelHost } from "./panel-part.js";
|
|
4
|
+
export declare function ToolbarSort({ sort, open, onOpenChange, host, }: {
|
|
5
|
+
/** The builder's Sort: `settingsPanels(…).sort`. */
|
|
6
|
+
sort: SortConfig<string>;
|
|
7
|
+
/** Its open state, when the app holds it; absent, its own. */
|
|
8
|
+
open?: boolean;
|
|
9
|
+
onOpenChange?: (open: boolean) => void;
|
|
10
|
+
/** The app's drawer or sheet; absent, the map's `Popover` (on a phone, its `Sheet`). */
|
|
11
|
+
host?: ToolbarPanelHost;
|
|
12
|
+
}): ReactNode;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useViews } from "../../../provider/context.js";
|
|
4
|
+
import { isSortActive } from "../../model.js";
|
|
5
|
+
import { viewOptionsPopoverClassName } from "../popover.js";
|
|
6
|
+
import { CompactSortDetail } from "../order-details.js";
|
|
7
|
+
import { PanelHeader } from "../panel-header.js";
|
|
8
|
+
import { ToolbarPanelPart } from "./panel-part.js";
|
|
9
|
+
export function ToolbarSort({ sort, open, onOpenChange, host, }) {
|
|
10
|
+
const { icons, messages } = useViews();
|
|
11
|
+
const Glyph = icons.sort;
|
|
12
|
+
if (sort.options.length === 0)
|
|
13
|
+
return null;
|
|
14
|
+
const name = messages({ key: "views.panels.sort" });
|
|
15
|
+
return (_jsx(ToolbarPanelPart, { panelKey: "sort", slot: "vk-toolbar-sort", icon: _jsx(Glyph, { className: "h-4 w-4 shrink-0" }), label: name, word: name, changed: isSortActive(sort), open: open, onOpenChange: onOpenChange, host: host, popoverClassName: viewOptionsPopoverClassName(null), children: ({ fill, close, closeButton }) => (_jsxs("div", { className: fill ? "flex h-full min-h-0 flex-col" : "flex flex-col", children: [_jsx(PanelHeader, { title: sort.label ?? name, onClose: closeButton ? close : undefined }), _jsx("div", { className: fill ? "min-h-0 flex-1 overflow-y-auto overscroll-contain **:data-vs-detail:max-h-none" : undefined, children: _jsx(CompactSortDetail, { sort: sort }) })] })) }));
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type CollectionViewsInput, type ViewsLayout } from "../../views-row/model.js";
|
|
3
|
+
export declare function ToolbarViews({ views, viewsLayout, showCounts, as, stacked, }: {
|
|
4
|
+
views: CollectionViewsInput<string>;
|
|
5
|
+
/** How several axes stand: `stacked` (the default) puts every axis after the first on the line beneath. */
|
|
6
|
+
viewsLayout?: ViewsLayout;
|
|
7
|
+
/** The toolbar's own Show counts; absent, each axis's own `hideCounts` alone decides. */
|
|
8
|
+
showCounts?: boolean;
|
|
9
|
+
/** One axis as its pills or as one chip naming the active view. Several axes always draw as a row. */
|
|
10
|
+
as?: "row" | "picker";
|
|
11
|
+
/** This part is the second line's: the axes a stacked layout pushes beneath. */
|
|
12
|
+
stacked?: boolean;
|
|
13
|
+
}): ReactNode;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { withCounts } from "../../toolbar/counts.js";
|
|
4
|
+
import { splitViewAxes, toViewAxes } from "../../views-row/model.js";
|
|
5
|
+
import { ViewAxes } from "../views-row/ViewAxes.js";
|
|
6
|
+
import { ViewPicker } from "../views-row/ViewPicker.js";
|
|
7
|
+
import { useToolbarSlot } from "./context.js";
|
|
8
|
+
export function ToolbarViews({ views, viewsLayout, showCounts, as = "row", stacked = false, }) {
|
|
9
|
+
const { form } = useToolbarSlot();
|
|
10
|
+
const counted = showCounts === undefined ? views : (withCounts(views, showCounts) ?? views);
|
|
11
|
+
if (form === "phone") {
|
|
12
|
+
if (stacked)
|
|
13
|
+
return null;
|
|
14
|
+
return toViewAxes(counted)?.map((axis, i) => _jsx(ViewPicker, { axis: axis, className: "min-w-0" }, axis.key ?? i)) ?? null;
|
|
15
|
+
}
|
|
16
|
+
const { viewAxes, stackedAxes } = splitViewAxes(counted, viewsLayout);
|
|
17
|
+
if (stacked)
|
|
18
|
+
return stackedAxes ? _jsx(ViewAxes, { axes: stackedAxes, size: "sm" }) : null;
|
|
19
|
+
if (!viewAxes)
|
|
20
|
+
return null;
|
|
21
|
+
if (as === "picker" && viewAxes.length === 1 && !stackedAxes)
|
|
22
|
+
return _jsx(ViewPicker, { axis: viewAxes[0] });
|
|
23
|
+
return _jsx(ViewAxes, { axes: viewAxes });
|
|
24
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ToolbarForm, ToolbarLine } from "../../toolbar/model.js";
|
|
2
|
+
/** Where a part stands: the toolbar's form, whether it fills its line, its buttons' size, and its line's kind. */
|
|
3
|
+
export type ToolbarSlotState = {
|
|
4
|
+
form: ToolbarForm;
|
|
5
|
+
fill: boolean;
|
|
6
|
+
size: "md" | "sm";
|
|
7
|
+
line: ToolbarLine["kind"];
|
|
8
|
+
};
|
|
9
|
+
export declare const ToolbarSlotContext: import("react").Context<ToolbarSlotState>;
|
|
10
|
+
/** Where this part stands; outside a `Toolbar`, `{ form: "row", fill: false, size: "md", line: "main" }`. */
|
|
11
|
+
export declare function useToolbarSlot(): ToolbarSlotState;
|
|
12
|
+
/** The radio: each registered panel's closer, by its key. */
|
|
13
|
+
export type ToolbarRadio = {
|
|
14
|
+
register: (key: string, close: () => void) => () => void;
|
|
15
|
+
opened: (key: string) => void;
|
|
16
|
+
};
|
|
17
|
+
/** A fresh radio, held by the frame for its life. */
|
|
18
|
+
export declare function useToolbarRadioState(): ToolbarRadio;
|
|
19
|
+
export declare const ToolbarRadioContext: import("react").Context<ToolbarRadio | null>;
|
|
20
|
+
/** A part's open state, one of the toolbar's panels: when it opens, the toolbar closes every other. Handed
|
|
21
|
+
* `own`, it reads and changes that state (a panel the app holds, which may open itself); without, it holds its
|
|
22
|
+
* own. Outside a `Toolbar`, it is plain open state. */
|
|
23
|
+
export declare function useToolbarPanel(key: string, own?: {
|
|
24
|
+
open: boolean;
|
|
25
|
+
onOpenChange: (open: boolean) => void;
|
|
26
|
+
}): {
|
|
27
|
+
open: boolean;
|
|
28
|
+
onOpenChange: (open: boolean) => void;
|
|
29
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext, useCallback, useContext, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
|
|
3
|
+
const OUTSIDE = { form: "row", fill: false, size: "md", line: "main" };
|
|
4
|
+
export const ToolbarSlotContext = createContext(OUTSIDE);
|
|
5
|
+
export function useToolbarSlot() {
|
|
6
|
+
return useContext(ToolbarSlotContext);
|
|
7
|
+
}
|
|
8
|
+
export function useToolbarRadioState() {
|
|
9
|
+
const closers = useRef(new Map());
|
|
10
|
+
const register = useCallback((key, close) => {
|
|
11
|
+
closers.current.set(key, close);
|
|
12
|
+
return () => {
|
|
13
|
+
if (closers.current.get(key) === close)
|
|
14
|
+
closers.current.delete(key);
|
|
15
|
+
};
|
|
16
|
+
}, []);
|
|
17
|
+
const opened = useCallback((key) => {
|
|
18
|
+
for (const [other, close] of closers.current)
|
|
19
|
+
if (other !== key)
|
|
20
|
+
close();
|
|
21
|
+
}, []);
|
|
22
|
+
const [radio] = useState(() => ({ register, opened }));
|
|
23
|
+
return radio;
|
|
24
|
+
}
|
|
25
|
+
export const ToolbarRadioContext = createContext(null);
|
|
26
|
+
export function useToolbarPanel(key, own) {
|
|
27
|
+
const radio = useContext(ToolbarRadioContext);
|
|
28
|
+
const entry = `${key}:${useId()}`;
|
|
29
|
+
const [held, setHeld] = useState(false);
|
|
30
|
+
const open = own ? own.open : held;
|
|
31
|
+
const onOpenChange = own ? own.onOpenChange : setHeld;
|
|
32
|
+
const latest = useRef({ open, onOpenChange });
|
|
33
|
+
useLayoutEffect(() => {
|
|
34
|
+
latest.current = { open, onOpenChange };
|
|
35
|
+
});
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
if (!radio)
|
|
38
|
+
return;
|
|
39
|
+
return radio.register(entry, () => {
|
|
40
|
+
if (latest.current.open)
|
|
41
|
+
latest.current.onOpenChange(false);
|
|
42
|
+
});
|
|
43
|
+
}, [radio, entry]);
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
if (open)
|
|
46
|
+
radio?.opened(entry);
|
|
47
|
+
}, [open, radio, entry]);
|
|
48
|
+
return { open, onOpenChange };
|
|
49
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type ComponentType, type ReactNode } from "react";
|
|
2
|
+
/** Where a panel part hangs its panel instead of the map's `Popover`: the app's drawer, or its sheet on a phone.
|
|
3
|
+
* The panel draws full height inside it (`fill`). */
|
|
4
|
+
export type ToolbarPanelHost = ComponentType<{
|
|
5
|
+
open: boolean;
|
|
6
|
+
onOpenChange: (open: boolean) => void;
|
|
7
|
+
/** The panel's name in words: the button's label. */
|
|
8
|
+
title: string;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}>;
|
|
11
|
+
export declare function ToolbarPanelPart({ panelKey, slot, icon, label, word, count, onClear, dot, changed, open: openIn, onOpenChange: onOpenChangeIn, host: Host, popoverClassName, children, }: {
|
|
12
|
+
/** The radio's name for it. */
|
|
13
|
+
panelKey: string;
|
|
14
|
+
/** Its place's `data-slot`; the popover, or the panel's box in a sheet, is marked `${slot}-panel`. */
|
|
15
|
+
slot: string;
|
|
16
|
+
icon: ReactNode;
|
|
17
|
+
label: string;
|
|
18
|
+
word?: string | null;
|
|
19
|
+
count?: number;
|
|
20
|
+
onClear?: () => void;
|
|
21
|
+
dot?: boolean;
|
|
22
|
+
changed?: boolean;
|
|
23
|
+
open?: boolean;
|
|
24
|
+
onOpenChange?: (open: boolean) => void;
|
|
25
|
+
host?: ToolbarPanelHost;
|
|
26
|
+
popoverClassName?: string;
|
|
27
|
+
/** The panel. `close` dismisses it (its ✕, a column's Done); `closeButton` is false in a sheet whose head draws the
|
|
28
|
+
* ✕ (`sheetActions: "head"`), where the panel draws none of its own. */
|
|
29
|
+
children: (args: PanelArgs) => ReactNode;
|
|
30
|
+
}): ReactNode;
|
|
31
|
+
/** What a panel part hands its panel: whether it fills a host or a sheet, its dismissal, and whether it draws its ✕. */
|
|
32
|
+
type PanelArgs = {
|
|
33
|
+
fill: boolean;
|
|
34
|
+
close: () => void;
|
|
35
|
+
closeButton: boolean;
|
|
36
|
+
};
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useRef } from "react";
|
|
4
|
+
import { useViews } from "../../../provider/context.js";
|
|
5
|
+
import { PanelSheet, useSheetDrawsClose, useSheetPanels } from "../panel-sheet.js";
|
|
6
|
+
import { useToolbarPanel } from "./context.js";
|
|
7
|
+
import { ToolbarButton } from "./ToolbarButton.js";
|
|
8
|
+
export function ToolbarPanelPart({ panelKey, slot, icon, label, word, count, onClear, dot, changed, open: openIn, onOpenChange: onOpenChangeIn, host: Host, popoverClassName, children, }) {
|
|
9
|
+
const { components } = useViews();
|
|
10
|
+
const sheet = useSheetPanels();
|
|
11
|
+
const headCloses = useSheetDrawsClose();
|
|
12
|
+
const { Popover } = components;
|
|
13
|
+
const anchor = useRef(null);
|
|
14
|
+
const held = useToolbarPanel(panelKey, openIn === undefined || !onOpenChangeIn ? undefined : { open: openIn, onOpenChange: onOpenChangeIn });
|
|
15
|
+
const { open, onOpenChange } = held;
|
|
16
|
+
const openAtPress = useRef(false);
|
|
17
|
+
const close = () => {
|
|
18
|
+
onOpenChange(false);
|
|
19
|
+
if (!Host && !sheet)
|
|
20
|
+
anchor.current?.focus({ preventScroll: true });
|
|
21
|
+
};
|
|
22
|
+
return (_jsxs("span", { "data-slot": slot, className: "relative inline-flex shrink-0", children: [_jsx(ToolbarButton, { ref: anchor, icon: icon, label: label, word: word, count: count, onClear: onClear, dot: dot, changed: changed, popup: "dialog", open: open, onPointerDown: () => {
|
|
23
|
+
openAtPress.current = open;
|
|
24
|
+
}, onClick: (event) => {
|
|
25
|
+
const wasOpen = Host || sheet ? open : event.detail === 0 ? open : openAtPress.current;
|
|
26
|
+
openAtPress.current = false;
|
|
27
|
+
onOpenChange(!wasOpen);
|
|
28
|
+
} }), Host ? (_jsx(Host, { open: open, onOpenChange: onOpenChange, title: label, children: _jsx(PanelBody, { render: children, args: { fill: true, close, closeButton: true } }) })) : sheet ? (_jsx(PanelSheet, { open: open, onOpenChange: onOpenChange, title: label, snap: "full", slot: `${slot}-panel`, headed: true, children: _jsx(PanelBody, { render: children, args: { fill: true, close, closeButton: !headCloses } }) })) : (_jsx(Popover, { open: open, onOpenChange: (next, details) => {
|
|
29
|
+
onOpenChange(next);
|
|
30
|
+
const reason = details?.reason;
|
|
31
|
+
if (!next && reason !== "outside-press" && reason !== "focus-out")
|
|
32
|
+
anchor.current?.focus({ preventScroll: true });
|
|
33
|
+
}, anchor: anchor, align: "end", sideOffset: 8, chrome: "menu", className: popoverClassName, panelData: { "data-slot": `${slot}-panel` }, children: _jsx(PanelBody, { render: children, args: { fill: false, close, closeButton: true } }) }))] }));
|
|
34
|
+
}
|
|
35
|
+
function PanelBody({ render, args }) {
|
|
36
|
+
return render(args);
|
|
37
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ActivePanel } from "../../model.js";
|
|
2
|
+
/** A panel part's state: open, and the page a drill-in is on (`null`, its root). Closing forgets the page. */
|
|
3
|
+
export type ToolbarPanelState = {
|
|
4
|
+
open: boolean;
|
|
5
|
+
onOpenChange: (open: boolean) => void;
|
|
6
|
+
page: ActivePanel;
|
|
7
|
+
onPageChange: (page: ActivePanel) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare function useToolbarPanelState(): ToolbarPanelState;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback, useMemo, useState } from "react";
|
|
3
|
+
export function useToolbarPanelState() {
|
|
4
|
+
const [open, setOpen] = useState(false);
|
|
5
|
+
const [page, setPage] = useState(null);
|
|
6
|
+
const onOpenChange = useCallback((next) => {
|
|
7
|
+
if (!next)
|
|
8
|
+
setPage(null);
|
|
9
|
+
setOpen(next);
|
|
10
|
+
}, []);
|
|
11
|
+
return useMemo(() => ({ open, onOpenChange, page, onPageChange: setPage }), [open, onOpenChange, page]);
|
|
12
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useLayoutEffect, useState } from "react";
|
|
3
|
+
export function useBoxNarrow(ref, below) {
|
|
4
|
+
const [narrow, setNarrow] = useState(null);
|
|
5
|
+
useLayoutEffect(() => {
|
|
6
|
+
const box = ref.current;
|
|
7
|
+
if (!box)
|
|
8
|
+
return;
|
|
9
|
+
const measure = () => setNarrow(box.getBoundingClientRect().width < below);
|
|
10
|
+
measure();
|
|
11
|
+
if (typeof ResizeObserver === "undefined")
|
|
12
|
+
return;
|
|
13
|
+
const observer = new ResizeObserver(measure);
|
|
14
|
+
observer.observe(box);
|
|
15
|
+
return () => observer.disconnect();
|
|
16
|
+
}, [ref, below]);
|
|
17
|
+
return narrow;
|
|
18
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ListPersonalLayer, type ListSettings, type ListSettingsChange } from "@viewkitjs/fields/query";
|
|
2
|
+
export declare function useListSettingsState(initial: {
|
|
3
|
+
settings: ListSettings;
|
|
4
|
+
layer?: ListPersonalLayer;
|
|
5
|
+
}): {
|
|
6
|
+
settings: ListSettings;
|
|
7
|
+
layer: ListPersonalLayer;
|
|
8
|
+
onChange: (change: ListSettingsChange) => void;
|
|
9
|
+
onLayerChange: (patch: ListPersonalLayer) => void;
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { applySettingsChange, } from "@viewkitjs/fields/query";
|
|
3
|
+
import { useCallback, useState } from "react";
|
|
4
|
+
export function useListSettingsState(initial) {
|
|
5
|
+
const [settings, setSettings] = useState(initial.settings);
|
|
6
|
+
const [layer, setLayer] = useState(initial.layer ?? {});
|
|
7
|
+
const onChange = useCallback((change) => setSettings((held) => applySettingsChange(held, change)), []);
|
|
8
|
+
const onLayerChange = useCallback((patch) => setLayer((held) => ({ ...held, ...patch })), []);
|
|
9
|
+
return { settings, layer, onChange, onLayerChange };
|
|
10
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { 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
|
+
const ACTION_ROW_CLASS = "flex w-full items-center gap-2.5 px-3 py-2 text-left";
|
|
9
|
+
const ACTION_ICON_CLASS = "flex h-4 w-4 shrink-0 items-center justify-center text-(color:--vk-fg-subtle)";
|
|
10
|
+
const ACTION_LABEL_CLASS = "flex-1 whitespace-nowrap text-sm font-medium text-(color:--vk-fg)";
|
|
11
|
+
const GLYPH = "h-3.5 w-3.5";
|
|
12
|
+
export function ViewOptionsActions({ exportCsv }) {
|
|
13
|
+
const { icons, messages } = useViews();
|
|
14
|
+
const { copyLink: CopyLink, export: Export, share: Share } = icons;
|
|
15
|
+
return (_jsxs("div", { className: "shrink-0 border-t border-solid border-(color:--vk-border) py-1", children: [_jsx(ParkedActionRow, { icon: _jsx(CopyLink, { className: GLYPH }), label: messages({ key: "views.panels.copy-link" }) }), exportCsv ? (_jsx(ExportCsvRow, { exportCsv: exportCsv })) : (_jsx(ParkedActionRow, { icon: _jsx(Export, { className: GLYPH }), label: messages({ key: "views.panels.export-csv" }) })), _jsx(ParkedActionRow, { icon: _jsx(Share, { className: GLYPH }), label: messages({ key: "views.panels.share" }) })] }));
|
|
16
|
+
}
|
|
17
|
+
function ExportCsvRow({ exportCsv }) {
|
|
18
|
+
const { conventions, icons, messages } = useViews();
|
|
19
|
+
const { export: Export, loading: Loading } = icons;
|
|
20
|
+
const [running, setRunning] = useState(false);
|
|
21
|
+
const onClick = async () => {
|
|
22
|
+
if (running)
|
|
23
|
+
return;
|
|
24
|
+
setRunning(true);
|
|
25
|
+
try {
|
|
26
|
+
await exportCsv.run();
|
|
27
|
+
}
|
|
28
|
+
finally {
|
|
29
|
+
setRunning(false);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
return (_jsxs("button", { type: "button", "data-vs-row": true, onClick: onClick, disabled: running, className: cx(ELEMENT_RESET, ACTION_ROW_CLASS, "hover:bg-(color:--vk-hovered) disabled:pointer-events-none"), children: [_jsx("span", { className: ACTION_ICON_CLASS, children: running ? (_jsx("span", { role: "status", "aria-label": messages({ key: "views.panels.loading" }), className: "flex", children: _jsx(Loading, { className: "size-3.5" }) })) : (_jsx(Export, { className: GLYPH })) }), _jsx("span", { className: ACTION_LABEL_CLASS, children: messages({ key: "views.panels.export-csv" }) }), _jsx("span", { className: "shrink-0 text-xs tabular-nums text-(color:--vk-fg-subtle)", children: formatCount(exportCsv.count, conventions) })] }));
|
|
33
|
+
}
|
|
34
|
+
function ParkedActionRow({ icon, label }) {
|
|
35
|
+
const { messages } = useViews();
|
|
36
|
+
return (_jsxs("div", { "aria-disabled": true, "data-vs-row": true, title: messages({ key: "views.panels.coming-soon" }), className: cx(ACTION_ROW_CLASS, "cursor-default select-none opacity-40"), children: [_jsx("span", { className: ACTION_ICON_CLASS, children: icon }), _jsx("span", { className: ACTION_LABEL_CLASS, children: label })] }));
|
|
37
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CollectionViewState } from "../view-state.js";
|
|
2
|
+
/**
|
|
3
|
+
* Linear's footer, one for one: their "Set default for everyone" sits under the display options, and nothing
|
|
4
|
+
* anywhere else says "unsaved".
|
|
5
|
+
*
|
|
6
|
+
* Drawn only while `changes` is above zero: a panel over a view that matches everyone's has nothing to reset
|
|
7
|
+
* and nothing to publish, and an always-on footer would be the persistent prompt this replaces. A member sees
|
|
8
|
+
* Reset alone: a control that cannot be pressed teaches nothing, so the missing verb is simply not there.
|
|
9
|
+
*
|
|
10
|
+
* `className` replaces the footer's side inset (`px-3`, the rows' own), so a host with wider rows (a phone
|
|
11
|
+
* sheet's `px-4`) lines it up with them.
|
|
12
|
+
*/
|
|
13
|
+
export declare function ViewFooter({ view, className }: {
|
|
14
|
+
view: CollectionViewState;
|
|
15
|
+
className?: string;
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } 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 ViewFooter({ view, className }) {
|
|
7
|
+
const { messages } = useViews();
|
|
8
|
+
if (view.changes === 0)
|
|
9
|
+
return null;
|
|
10
|
+
return (_jsx("div", { "data-vs-footer": true, "data-vs-inset": true, className: cx(className ?? "px-3", "py-2"), children: _jsxs("div", { className: "flex min-w-0 flex-col items-start gap-1", children: [view.stale && (_jsx("p", { className: "m-0 text-xs text-(color:--vk-fg-subtle)", children: messages({ key: "views.panels.view-stale" }) })), _jsxs("div", { className: "flex items-center gap-4", children: [view.canPublish && (_jsx("button", { type: "button", disabled: view.pending, onClick: view.onPublish, className: cx(ELEMENT_RESET, "text-sm font-medium text-(color:--vk-fg-brand) transition-opacity hover:opacity-80 disabled:opacity-50"), children: messages({ key: "views.panels.view-publish" }) })), _jsx("button", { type: "button", disabled: view.pending, onClick: view.onReset, className: cx(ELEMENT_RESET, "text-sm text-(color:--vk-fg-subtle) transition-colors hover:text-(color:--vk-fg) disabled:opacity-50"), children: messages({ key: "views.panels.view-reset" }) })] })] }) }));
|
|
11
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useLayoutEffect, 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 } from "./menu-classes.js";
|
|
9
|
+
import { PillGroup } from "./PillGroup.js";
|
|
10
|
+
import { useAnchoredToggle } from "./use-anchored-toggle.js";
|
|
11
|
+
import { ViewCreatePill } from "./ViewCreatePill.js";
|
|
12
|
+
import { ViewPickerRow } from "./ViewPickerRow.js";
|
|
13
|
+
import { toPillOptions, usePillWords } from "./ViewTabs.js";
|
|
14
|
+
export function FoldingViewRow({ axis }) {
|
|
15
|
+
const hostRef = useRef(null);
|
|
16
|
+
const measureRef = useRef(null);
|
|
17
|
+
const [visible, setVisible] = useState(axis.options.length);
|
|
18
|
+
const words = usePillWords(axis.hideCounts);
|
|
19
|
+
const pills = useMemo(() => toPillOptions(axis.options, words), [axis.options, words]);
|
|
20
|
+
useLayoutEffect(() => {
|
|
21
|
+
const host = hostRef.current;
|
|
22
|
+
const measure = measureRef.current;
|
|
23
|
+
if (!host || !measure)
|
|
24
|
+
return;
|
|
25
|
+
const cluster = host.closest("[data-toolbar-row]")?.querySelector("[data-toolbar-cluster]");
|
|
26
|
+
const compute = () => {
|
|
27
|
+
const group = measure.querySelector("[data-measure-pills] > *");
|
|
28
|
+
const ghost = measure.querySelector("[data-measure-ghost]");
|
|
29
|
+
const more = measure.querySelector("[data-measure-more]");
|
|
30
|
+
if (!group)
|
|
31
|
+
return;
|
|
32
|
+
const widths = Array.from(group.children).map((child) => child.offsetWidth);
|
|
33
|
+
const room = host.clientWidth - (cluster?.offsetWidth ?? 0) - 12;
|
|
34
|
+
const gap = parseFloat(getComputedStyle(group).columnGap) || 2;
|
|
35
|
+
const ghostWidth = ghost ? ghost.offsetWidth + gap : 0;
|
|
36
|
+
const moreWidth = more ? more.offsetWidth + gap : 0;
|
|
37
|
+
if (widths.every((w) => w === 0)) {
|
|
38
|
+
setVisible(widths.length);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const all = widths.reduce((sum, w) => sum + w + gap, 0) - gap;
|
|
42
|
+
if (all + ghostWidth <= room) {
|
|
43
|
+
setVisible(widths.length);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
let used = 0;
|
|
47
|
+
let count = 0;
|
|
48
|
+
for (const w of widths) {
|
|
49
|
+
const next = used + (count ? gap : 0) + w;
|
|
50
|
+
if (next + moreWidth + ghostWidth > room)
|
|
51
|
+
break;
|
|
52
|
+
used = next;
|
|
53
|
+
count += 1;
|
|
54
|
+
}
|
|
55
|
+
setVisible(Math.max(1, count));
|
|
56
|
+
};
|
|
57
|
+
compute();
|
|
58
|
+
if (typeof ResizeObserver === "undefined")
|
|
59
|
+
return;
|
|
60
|
+
const observer = new ResizeObserver(compute);
|
|
61
|
+
observer.observe(host);
|
|
62
|
+
if (cluster)
|
|
63
|
+
observer.observe(cluster);
|
|
64
|
+
return () => observer.disconnect();
|
|
65
|
+
}, [pills]);
|
|
66
|
+
const { shown, folded } = useMemo(() => {
|
|
67
|
+
const count = Math.min(visible, pills.length);
|
|
68
|
+
const activeIndex = pills.findIndex((p) => p.value === axis.value);
|
|
69
|
+
if (count >= pills.length || activeIndex < 0 || activeIndex < count) {
|
|
70
|
+
return { shown: pills.slice(0, count), folded: pills.slice(count) };
|
|
71
|
+
}
|
|
72
|
+
const shown = [...pills.slice(0, count - 1), pills[activeIndex]];
|
|
73
|
+
const folded = pills.filter((p, i) => i >= count - 1 && i !== activeIndex);
|
|
74
|
+
return { shown, folded };
|
|
75
|
+
}, [pills, visible, axis.value]);
|
|
76
|
+
const foldedOptions = useMemo(() => axis.options.filter((option) => folded.some((p) => p.value === option.value)), [axis.options, folded]);
|
|
77
|
+
const onPillReorder = (orderedShown) => {
|
|
78
|
+
const changedAt = orderedShown.findIndex((value, i) => shown[i]?.value !== value);
|
|
79
|
+
if (changedAt < 0 || !axis.onReorder)
|
|
80
|
+
return;
|
|
81
|
+
const personal = shown[changedAt].private === true;
|
|
82
|
+
const inBlock = (pill) => (pill.private === true) === personal;
|
|
83
|
+
const visibleValues = new Set(shown.map((pill) => pill.value));
|
|
84
|
+
const dealt = orderedShown.filter((value) => inBlock(pills.find((pill) => pill.value === value)));
|
|
85
|
+
const ordered = pills.filter(inBlock).map((pill) => (visibleValues.has(pill.value) ? dealt.shift() : pill.value));
|
|
86
|
+
axis.onReorder(ordered);
|
|
87
|
+
};
|
|
88
|
+
return (_jsxs("div", { ref: hostRef, "data-slot": "vk-views-row", className: "relative flex min-w-0 flex-1 items-center gap-0.5", children: [_jsx(PillGroup, { value: axis.value, options: shown, onChange: axis.onChange, variant: "plain", onReorder: axis.onReorder ? onPillReorder : undefined, canDrag: axis.canDrag }), folded.length > 0 && _jsx(FoldedViews, { axis: axis, options: foldedOptions }), axis.onCreate && _jsx(ViewCreatePill, { label: axis.createLabel, onClick: axis.onCreate }), _jsxs("div", { ref: measureRef, "aria-hidden": true, inert: true, "data-slot": "vk-views-row", className: "pointer-events-none absolute left-0 top-0 flex items-center gap-0.5 whitespace-nowrap", style: { visibility: "hidden" }, children: [_jsx("div", { "data-measure-pills": true, className: "contents", children: _jsx(PillGroup, { value: axis.value, options: pills, onChange: () => { }, variant: "plain" }) }), _jsx("span", { "data-measure-more": true, "data-slot": "vk-views-more", className: MORE_CHIP_CLASS, children: _jsx(MoreChipInner, { count: 99 }) }), axis.onCreate && (_jsx("span", { "data-measure-ghost": true, children: _jsx(ViewCreatePill, { label: axis.createLabel, onClick: () => { } }) }))] })] }));
|
|
89
|
+
}
|
|
90
|
+
const MORE_CHIP_CLASS = "inline-flex h-8 shrink-0 items-center gap-0.5 whitespace-nowrap rounded-full px-2.5 text-sm font-medium text-(color:--vk-fg-subtle) transition-colors duration-150 hover:bg-(color:--vk-hovered) hover:text-(color:--vk-fg) data-[state=open]:bg-(color:--vk-pressed) data-[state=open]:text-(color:--vk-fg)";
|
|
91
|
+
function MoreChipInner({ count }) {
|
|
92
|
+
const { conventions, icons } = useViews();
|
|
93
|
+
const Chevron = icons.chevronDown;
|
|
94
|
+
return (_jsxs(_Fragment, { children: ["+", formatCount(count, conventions), _jsx(Chevron, { className: "h-3.5 w-3.5 shrink-0 opacity-70" })] }));
|
|
95
|
+
}
|
|
96
|
+
function FoldedViews({ axis, options, }) {
|
|
97
|
+
const { components, messages } = useViews();
|
|
98
|
+
const { Popover } = components;
|
|
99
|
+
const anchor = useRef(null);
|
|
100
|
+
const toggle = useAnchoredToggle(anchor);
|
|
101
|
+
return (_jsxs(_Fragment, { children: [_jsx("button", { ref: anchor, type: "button", "aria-label": messages({ key: "views.panels.views-more", values: { count: options.length } }), "aria-haspopup": "dialog", "aria-expanded": toggle.open, "data-slot": "vk-views-more", "data-state": toggle.open ? "open" : "closed", ...toggle.triggerProps, className: cx(ELEMENT_RESET, MORE_CHIP_CLASS), children: _jsx(MoreChipInner, { count: options.length }) }), _jsx(Popover, { open: toggle.open, onOpenChange: toggle.onOpenChange, anchor: anchor, align: "start", sideOffset: 6, chrome: "menu", className: "w-64", children: _jsx("div", { role: "listbox", "aria-label": messages({ key: "views.panels.views-more-list" }), className: VIEWS_LIST_CLASS, children: options.map((option) => (_jsx(ViewPickerRow, { option: option, active: option.value === axis.value, hideCounts: axis.hideCounts, onSelect: () => {
|
|
102
|
+
axis.onChange(option.value);
|
|
103
|
+
toggle.close();
|
|
104
|
+
} }, option.value))) }) })] }));
|
|
105
|
+
}
|