viewkitjs 0.28.0 → 0.30.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 +218 -0
- package/MIGRATION.md +181 -11
- package/fields/dist/derived.d.ts +2 -1
- package/fields/dist/derived.js +9 -3
- package/fields/dist/entities.js +41 -3
- package/fields/dist/index.d.ts +1 -1
- package/fields/dist/index.js +1 -1
- package/fields/dist/messages.d.ts +8 -2
- package/fields/dist/messages.js +3 -0
- package/fields/dist/range.d.ts +6 -0
- package/fields/dist/range.js +8 -0
- package/fields/dist/registry.js +11 -1
- package/fields/dist/spec-changes.js +1 -0
- package/fields/dist/types.d.ts +23 -1
- package/fields/docs/guides/derived-fields.md +7 -5
- package/fields/docs/guides/field-types.md +2 -2
- package/fields/docs/guides/the-index.md +1 -1
- package/fields/docs/reference/fields.md +3 -1
- package/fields/docs/reference/types.md +3 -1
- package/fields/skills/viewkit/SKILL.md +1 -1
- package/package.json +2 -1
- package/postgres/dist/definitions/build.js +29 -5
- package/postgres/dist/definitions/label.d.ts +7 -0
- package/postgres/dist/definitions/label.js +9 -1
- package/postgres/dist/definitions/lookup.js +6 -2
- package/postgres/dist/definitions/place.d.ts +6 -3
- package/postgres/dist/definitions/rollup.js +5 -1
- package/postgres/dist/definitions/storage.d.ts +15 -0
- package/postgres/dist/definitions/storage.js +52 -1
- package/postgres/dist/definitions/stored.js +21 -0
- package/postgres/dist/phone.d.ts +13 -1
- package/postgres/dist/phone.js +23 -3
- package/postgres/dist/search-indexes.d.ts +6 -1
- package/postgres/dist/search-indexes.js +71 -25
- package/postgres/dist/search.js +3 -3
- package/postgres/docs/guides/definitions.md +22 -5
- package/postgres/docs/guides/field-map.md +5 -4
- package/postgres/docs/reference/definitions.md +3 -3
- package/postgres/docs/reference/postgres.md +1 -1
- package/views/dist/cells/cell-format.d.ts +2 -2
- package/views/dist/cells/cell-format.js +2 -2
- package/views/dist/cells/cell-values.js +9 -12
- package/views/dist/contract.d.ts +161 -18
- package/views/dist/contract.js +170 -28
- package/views/dist/controls/bulk-bar/bulk-bar-of.d.ts +66 -0
- package/views/dist/controls/bulk-bar/bulk-bar-of.js +22 -0
- package/views/dist/controls/bulk-bar/bulk-bar.d.ts +40 -0
- package/views/dist/controls/bulk-bar/bulk-bar.js +278 -0
- package/views/dist/controls/bulk-bar/looks.d.ts +10 -0
- package/views/dist/controls/bulk-bar/looks.js +14 -0
- package/views/dist/controls/bulk-bar/map-selection-bar.d.ts +19 -0
- package/views/dist/controls/bulk-bar/map-selection-bar.js +57 -0
- package/views/dist/controls/bulk-bar/tokens.d.ts +136 -0
- package/views/dist/controls/bulk-bar/tokens.js +36 -0
- package/views/dist/controls/bulk-bar/words.d.ts +50 -0
- package/views/dist/controls/bulk-bar/words.js +19 -0
- package/views/dist/controls/bulk-bar.css +96 -0
- package/views/dist/controls/button/button.js +3 -1
- package/views/dist/controls/button.css +5 -4
- package/views/dist/controls/checkbox/checkbox.js +3 -1
- package/views/dist/controls/checkbox.css +1 -1
- package/views/dist/controls/choice/tokens.d.ts +79 -0
- package/views/dist/controls/choice/tokens.js +22 -0
- package/views/dist/controls/choice.css +31 -0
- package/views/dist/controls/compound-editor/looks.js +1 -1
- package/views/dist/controls/controls.d.ts +8 -0
- package/views/dist/controls/controls.js +8 -0
- package/views/dist/controls/customize/customize.d.ts +176 -0
- package/views/dist/controls/customize/customize.js +348 -0
- package/views/dist/controls/customize/glide.d.ts +10 -0
- package/views/dist/controls/customize/glide.js +55 -0
- package/views/dist/controls/customize/looks.d.ts +13 -0
- package/views/dist/controls/customize/looks.js +11 -0
- package/views/dist/controls/customize/map-customize-body.d.ts +15 -0
- package/views/dist/controls/customize/map-customize-body.js +195 -0
- package/views/dist/controls/customize/map-ranges.d.ts +23 -0
- package/views/dist/controls/customize/map-ranges.js +41 -0
- package/views/dist/controls/customize/rules.d.ts +39 -0
- package/views/dist/controls/customize/rules.js +21 -0
- package/views/dist/controls/customize/tokens.d.ts +40 -0
- package/views/dist/controls/customize/tokens.js +12 -0
- package/views/dist/controls/customize/words.d.ts +65 -0
- package/views/dist/controls/customize/words.js +42 -0
- package/views/dist/controls/customize.css +57 -0
- package/views/dist/controls/date-editor/looks.js +1 -1
- package/views/dist/controls/filter-editor/block.d.ts +31 -0
- package/views/dist/controls/filter-editor/block.js +27 -0
- package/views/dist/controls/filter-editor/filter-editor.d.ts +4 -0
- package/views/dist/controls/filter-editor/filter-editor.js +86 -43
- package/views/dist/controls/filter-editor/how.d.ts +1 -1
- package/views/dist/controls/filter-editor/how.js +1 -0
- package/views/dist/controls/filter-editor/map-filter-body.d.ts +16 -1
- package/views/dist/controls/filter-editor/map-filter-body.js +39 -13
- package/views/dist/controls/filter-editor/map-rules.d.ts +27 -11
- package/views/dist/controls/filter-editor/map-rules.js +73 -42
- package/views/dist/controls/filter-editor/rules.d.ts +42 -5
- package/views/dist/controls/filter-editor/rules.js +55 -2
- package/views/dist/controls/filter-editor/words.d.ts +15 -0
- package/views/dist/controls/filter-editor/words.js +6 -0
- package/views/dist/controls/filter-editor.css +18 -0
- package/views/dist/controls/index.d.ts +33 -9
- package/views/dist/controls/index.js +32 -9
- package/views/dist/controls/inline-input/looks.js +1 -1
- package/views/dist/controls/input/input.js +10 -4
- package/views/dist/controls/internal/phone.d.ts +5 -4
- package/views/dist/controls/internal/phone.js +7 -7
- package/views/dist/controls/internal/scroll.js +5 -1
- package/views/dist/controls/internal/typed-run.d.ts +2 -0
- package/views/dist/controls/internal/typed-run.js +5 -0
- package/views/dist/controls/menu/map-menu.js +2 -2
- package/views/dist/controls/menu-list/menu-list.d.ts +16 -1
- package/views/dist/controls/menu-list/menu-list.js +26 -8
- package/views/dist/controls/menu-list.css +8 -0
- package/views/dist/controls/number-editor/looks.js +1 -1
- package/views/dist/controls/option/option.js +3 -1
- package/views/dist/controls/option.css +1 -1
- package/views/dist/controls/pane/pane.d.ts +4 -0
- package/views/dist/controls/pane/pane.js +2 -1
- package/views/dist/controls/picker/looks.js +1 -1
- package/views/dist/controls/picker/map-picker.d.ts +6 -2
- package/views/dist/controls/picker/map-picker.js +4 -2
- package/views/dist/controls/picker/picker.d.ts +7 -0
- package/views/dist/controls/picker/picker.js +57 -8
- package/views/dist/controls/popover/map-popover.d.ts +1 -1
- package/views/dist/controls/popover/map-popover.js +2 -2
- package/views/dist/controls/popover/popover.js +2 -1
- package/views/dist/controls/popover.css +3 -0
- package/views/dist/controls/ports-host/map-ports-host.d.ts +7 -0
- package/views/dist/controls/ports-host/map-ports-host.js +43 -0
- package/views/dist/controls/press/tokens.d.ts +8 -0
- package/views/dist/controls/press/tokens.js +4 -0
- package/views/dist/controls/press.css +44 -0
- package/views/dist/controls/quick-filters/looks.d.ts +11 -0
- package/views/dist/controls/quick-filters/looks.js +9 -0
- package/views/dist/controls/quick-filters/map-quick-filters-body.d.ts +31 -0
- package/views/dist/controls/quick-filters/map-quick-filters-body.js +59 -0
- package/views/dist/controls/quick-filters/quick-filters.d.ts +37 -0
- package/views/dist/controls/quick-filters/quick-filters.js +89 -0
- package/views/dist/controls/quick-filters/reminder.d.ts +18 -0
- package/views/dist/controls/quick-filters/reminder.js +41 -0
- package/views/dist/controls/quick-filters/rules.d.ts +89 -0
- package/views/dist/controls/quick-filters/rules.js +52 -0
- package/views/dist/controls/quick-filters/tokens.d.ts +112 -0
- package/views/dist/controls/quick-filters/tokens.js +30 -0
- package/views/dist/controls/quick-filters/words.d.ts +25 -0
- package/views/dist/controls/quick-filters/words.js +13 -0
- package/views/dist/controls/quick-filters.css +118 -0
- package/views/dist/controls/sheet/bottom-sheet.d.ts +9 -4
- package/views/dist/controls/sheet/bottom-sheet.js +4 -4
- package/views/dist/controls/sheet/map-sheet.d.ts +4 -1
- package/views/dist/controls/sheet/map-sheet.js +19 -6
- package/views/dist/controls/sheet/sheet-parts.d.ts +10 -0
- package/views/dist/controls/sheet/sheet-parts.js +2 -0
- package/views/dist/controls/switch-row/switch-row.d.ts +15 -0
- package/views/dist/controls/switch-row/switch-row.js +9 -0
- package/views/dist/controls/switch-row/tokens.d.ts +51 -0
- package/views/dist/controls/switch-row/tokens.js +15 -0
- package/views/dist/controls/switch-row.css +39 -0
- package/views/dist/controls/switch.css +1 -1
- package/views/dist/controls/tag/tag.js +3 -1
- package/views/dist/controls/tag-field/tag-field.d.ts +20 -0
- package/views/dist/controls/tag-field/tag-field.js +19 -0
- package/views/dist/controls/tag-field/tokens.d.ts +7 -0
- package/views/dist/controls/tag-field/tokens.js +4 -0
- package/views/dist/controls/tag-field.css +13 -0
- package/views/dist/controls/text-editor/looks.js +1 -1
- package/views/dist/controls/text-editor/map-text-body.d.ts +1 -1
- package/views/dist/controls/text-editor/map-text-body.js +2 -2
- package/views/dist/controls/text-editor/text-editor.d.ts +3 -0
- package/views/dist/controls/text-editor/text-editor.js +17 -7
- package/views/dist/controls/text-editor.css +11 -0
- package/views/dist/controls/toast/toast.d.ts +5 -1
- package/views/dist/controls/toast/toast.js +5 -3
- package/views/dist/controls/tokens.js +18 -0
- package/views/dist/controls/toolbar/keys.d.ts +3 -0
- package/views/dist/controls/toolbar/keys.js +11 -0
- package/views/dist/controls/toolbar/looks.d.ts +10 -0
- package/views/dist/controls/toolbar/looks.js +40 -0
- package/views/dist/controls/toolbar/tokens.d.ts +28 -0
- package/views/dist/controls/toolbar/tokens.js +9 -0
- package/views/dist/controls/toolbar/toolbar.d.ts +111 -0
- package/views/dist/controls/toolbar/toolbar.js +370 -0
- package/views/dist/controls/toolbar/words.d.ts +28 -0
- package/views/dist/controls/toolbar/words.js +17 -0
- package/views/dist/controls/toolbar-button/looks.d.ts +4 -0
- package/views/dist/controls/toolbar-button/looks.js +21 -0
- package/views/dist/controls/toolbar-button/tokens.d.ts +103 -0
- package/views/dist/controls/toolbar-button/tokens.js +28 -0
- package/views/dist/controls/toolbar-button/toolbar-button.d.ts +66 -0
- package/views/dist/controls/toolbar-button/toolbar-button.js +51 -0
- package/views/dist/controls/toolbar-button.css +75 -0
- package/views/dist/controls/toolbar.css +65 -0
- package/views/dist/controls/tooltip/map-tooltip.d.ts +1 -1
- package/views/dist/controls/tooltip/map-tooltip.js +2 -2
- package/views/dist/controls/tooltip/tooltip.d.ts +3 -1
- package/views/dist/controls/tooltip/tooltip.js +2 -2
- package/views/dist/controls/values-editor/looks.js +1 -1
- package/views/dist/controls/values-editor/values.js +6 -2
- package/views/dist/controls/views-list/map-views-list-body.d.ts +4 -1
- package/views/dist/controls/views-list/map-views-list-body.js +128 -4
- package/views/dist/controls/views-list/rules.d.ts +26 -0
- package/views/dist/controls/views-list/rules.js +63 -0
- package/views/dist/controls/views-list/view-menu.d.ts +84 -0
- package/views/dist/controls/views-list/view-menu.js +201 -0
- package/views/dist/controls/views-list/views-list.d.ts +8 -1
- package/views/dist/controls/views-list/views-list.js +18 -3
- package/views/dist/controls/views-list/words.d.ts +54 -0
- package/views/dist/controls/views-list/words.js +10 -1
- package/views/dist/controls/views-list.css +5 -1
- package/views/dist/display/date.js +3 -3
- package/views/dist/display/format.d.ts +6 -0
- package/views/dist/display/format.js +3 -0
- package/views/dist/display/index.d.ts +1 -1
- package/views/dist/display/index.js +1 -1
- package/views/dist/display/options.d.ts +1 -1
- package/views/dist/display/range.d.ts +2 -1
- package/views/dist/display/range.js +4 -1
- package/views/dist/display/rich-text.js +0 -1
- package/views/dist/editors/ChipsEditor.d.ts +4 -5
- package/views/dist/editors/ChipsEditor.js +12 -78
- package/views/dist/editors/DateEditor.d.ts +12 -16
- package/views/dist/editors/DateEditor.js +40 -191
- package/views/dist/editors/EditorPanel.d.ts +2 -6
- package/views/dist/editors/EditorPanel.js +2 -2
- package/views/dist/editors/LocationEditor.d.ts +11 -19
- package/views/dist/editors/LocationEditor.js +19 -211
- package/views/dist/editors/NameEditor.d.ts +8 -16
- package/views/dist/editors/NameEditor.js +11 -100
- package/views/dist/editors/NumberEditor.d.ts +14 -21
- package/views/dist/editors/NumberEditor.js +22 -49
- package/views/dist/editors/RangeEditor.d.ts +9 -33
- package/views/dist/editors/RangeEditor.js +12 -97
- package/views/dist/editors/RelationEditor.d.ts +6 -9
- package/views/dist/editors/RelationEditor.js +11 -30
- package/views/dist/editors/RelationSetEditor.d.ts +13 -24
- package/views/dist/editors/RelationSetEditor.js +33 -101
- package/views/dist/editors/SelectEditor.d.ts +15 -17
- package/views/dist/editors/SelectEditor.js +15 -94
- package/views/dist/editors/TextEditor.d.ts +23 -26
- package/views/dist/editors/TextEditor.js +11 -48
- package/views/dist/editors/ValueListEditor.d.ts +14 -23
- package/views/dist/editors/ValueListEditor.js +16 -202
- package/views/dist/editors/body-panel.d.ts +13 -7
- package/views/dist/editors/body-panel.js +3 -7
- package/views/dist/editors/edit-cores.d.ts +15 -15
- package/views/dist/editors/edit-cores.js +14 -14
- package/views/dist/editors/number-body.d.ts +1 -1
- package/views/dist/editors/number-step.d.ts +0 -34
- package/views/dist/editors/number-step.js +0 -37
- package/views/dist/editors/option-add-flow.d.ts +1 -13
- package/views/dist/editors/option-add-flow.js +0 -22
- package/views/dist/editors/relation-links-body.d.ts +2 -3
- package/views/dist/editors/relation-picker.d.ts +13 -3
- package/views/dist/editors/relation-source.d.ts +0 -22
- package/views/dist/editors/relation-source.js +0 -21
- package/views/dist/field-row/FieldRow.js +5 -6
- package/views/dist/field-row/FieldRowLane.js +0 -1
- package/views/dist/field-row/editors/RowChipsEditor.js +2 -2
- package/views/dist/field-row/editors/RowDateEditor.d.ts +2 -2
- package/views/dist/field-row/editors/RowDateEditor.js +2 -2
- package/views/dist/field-row/editors/RowNameEditor.d.ts +2 -5
- package/views/dist/field-row/editors/RowNameEditor.js +7 -12
- package/views/dist/field-row/editors/RowNumberEditor.d.ts +1 -1
- package/views/dist/field-row/editors/RowNumberEditor.js +4 -4
- package/views/dist/field-row/editors/RowPlaceEditor.js +3 -3
- package/views/dist/field-row/editors/RowRangeEditor.d.ts +2 -5
- package/views/dist/field-row/editors/RowRangeEditor.js +7 -14
- package/views/dist/field-row/editors/RowRelationEditor.js +3 -3
- package/views/dist/field-row/editors/RowSelectEditor.js +2 -2
- package/views/dist/field-row/editors/RowTextEditor.d.ts +1 -1
- package/views/dist/field-row/editors/RowTextEditor.js +3 -4
- package/views/dist/field-row/editors/RowValueListEditor.js +5 -5
- package/views/dist/field-row/field-row-button.d.ts +6 -9
- package/views/dist/field-row/field-row-button.js +1 -6
- package/views/dist/field-row/field-row-checkbox.d.ts +1 -1
- package/views/dist/field-row/row-target.d.ts +0 -7
- package/views/dist/field-row/row-target.js +0 -2
- package/views/dist/grid/chrome/GridAddColumn.d.ts +2 -1
- package/views/dist/grid/chrome/GridAddColumn.js +8 -66
- package/views/dist/grid/chrome/GridAggregateMenu.d.ts +5 -7
- package/views/dist/grid/chrome/GridAggregateMenu.js +20 -39
- package/views/dist/grid/chrome/GridCellEditors.d.ts +2 -2
- package/views/dist/grid/chrome/GridCellEditors.js +12 -12
- package/views/dist/grid/chrome/GridChipsEditor.js +3 -3
- package/views/dist/grid/chrome/GridColumnMenu.d.ts +11 -12
- package/views/dist/grid/chrome/GridColumnMenu.js +32 -93
- package/views/dist/grid/chrome/GridDateEditor.d.ts +6 -6
- package/views/dist/grid/chrome/GridDateEditor.js +3 -3
- package/views/dist/grid/chrome/GridGroupMenu.d.ts +4 -6
- package/views/dist/grid/chrome/GridGroupMenu.js +21 -62
- package/views/dist/grid/chrome/GridHeader.d.ts +1 -2
- package/views/dist/grid/chrome/GridHeader.js +3 -2
- package/views/dist/grid/chrome/GridLongTextEditor.d.ts +17 -38
- package/views/dist/grid/chrome/GridLongTextEditor.js +6 -7
- package/views/dist/grid/chrome/GridNameEditor.js +4 -4
- package/views/dist/grid/chrome/GridNumberEditor.d.ts +4 -5
- package/views/dist/grid/chrome/GridNumberEditor.js +5 -6
- package/views/dist/grid/chrome/GridPlaceEditor.d.ts +2 -5
- package/views/dist/grid/chrome/GridPlaceEditor.js +5 -5
- package/views/dist/grid/chrome/GridRangeEditor.d.ts +6 -12
- package/views/dist/grid/chrome/GridRangeEditor.js +7 -15
- package/views/dist/grid/chrome/GridRelationEditor.js +5 -5
- package/views/dist/grid/chrome/GridRow.js +0 -3
- package/views/dist/grid/chrome/GridRowActions.d.ts +1 -1
- package/views/dist/grid/chrome/GridRowActions.js +0 -5
- package/views/dist/grid/chrome/GridRowCells.js +11 -7
- package/views/dist/grid/chrome/GridSelectEditor.js +3 -3
- package/views/dist/grid/chrome/GridStructure.js +0 -1
- package/views/dist/grid/chrome/GridTable.js +1 -1
- package/views/dist/grid/chrome/GridTextEditor.d.ts +5 -7
- package/views/dist/grid/chrome/GridTextEditor.js +5 -18
- package/views/dist/grid/chrome/GridValueListEditor.js +4 -4
- package/views/dist/grid/chrome/grid-body-place.d.ts +2 -3
- package/views/dist/grid/chrome/grid-body-place.js +4 -8
- package/views/dist/grid/chrome/grid-button.d.ts +7 -10
- package/views/dist/grid/chrome/grid-button.js +1 -6
- package/views/dist/grid/chrome/grid-cell-classes.js +1 -1
- package/views/dist/grid/chrome/grid-column-menu-items.d.ts +4 -4
- package/views/dist/grid/chrome/grid-column-menu-items.js +10 -6
- package/views/dist/grid/chrome/grid-editor-layer.d.ts +5 -1
- package/views/dist/grid/chrome/grid-editor-layer.js +1 -0
- package/views/dist/grid/chrome/grid-fitted-box.d.ts +7 -1
- package/views/dist/grid/chrome/grid-fitted-box.js +4 -4
- package/views/dist/grid/chrome/grid-group-menu-parts.d.ts +5 -9
- package/views/dist/grid/chrome/grid-group-menu-parts.js +1 -3
- package/views/dist/grid/chrome/grid-hover.js +0 -1
- package/views/dist/grid/chrome/grid-menu-focus.d.ts +7 -31
- package/views/dist/grid/chrome/grid-menu-focus.js +7 -47
- package/views/dist/grid/chrome/grid-styles.d.ts +0 -3
- package/views/dist/grid/chrome/grid-styles.js +0 -1
- package/views/dist/grid/chrome/grid-table-props.d.ts +6 -10
- package/views/dist/grid/chrome/useGridTableInteractionModel.js +2 -4
- package/views/dist/grid/core/clipboard-model.js +9 -4
- package/views/dist/grid/core/editing-controller.d.ts +2 -1
- package/views/dist/grid/core/editing-controller.js +10 -2
- package/views/dist/grid/core/refusal-sentence.d.ts +3 -0
- package/views/dist/grid/core/refusal-sentence.js +2 -2
- package/views/dist/grid/core/write-states.d.ts +3 -1
- package/views/dist/grid/core/write-states.js +6 -2
- package/views/dist/grid/grid.css +240 -0
- package/views/dist/grid/looks.d.ts +5 -1
- package/views/dist/grid/looks.js +20 -12
- package/views/dist/grid-tokens.d.ts +109 -0
- package/views/dist/grid-tokens.js +29 -0
- package/views/dist/looks/index.d.ts +5 -0
- package/views/dist/looks/index.js +5 -0
- package/views/dist/looks/pieces.js +10 -0
- package/views/dist/model/body-frame.d.ts +0 -32
- package/views/dist/model/body-frame.js +1 -15
- package/views/dist/model/column-capabilities.d.ts +2 -0
- package/views/dist/model/column-filters.d.ts +2 -1
- package/views/dist/model/column-from.js +2 -2
- package/views/dist/model/column-inspect.d.ts +5 -5
- package/views/dist/model/column-inspect.js +2 -2
- package/views/dist/model/relation-filters.d.ts +2 -0
- package/views/dist/panels/customize-body.d.ts +1 -10
- package/views/dist/panels/customize-body.js +0 -3
- package/views/dist/panels/filter/MenuSelect.js +0 -5
- package/views/dist/panels/filter/RangeFilterBody.js +0 -1
- package/views/dist/panels/filter/details.d.ts +1 -5
- package/views/dist/panels/filter/details.js +0 -13
- package/views/dist/panels/filter/filter-list.d.ts +0 -1
- package/views/dist/panels/filter/filter-list.js +1 -1
- package/views/dist/panels/index.d.ts +2 -2
- package/views/dist/panels/index.js +2 -2
- package/views/dist/panels/labels.d.ts +4 -0
- package/views/dist/panels/labels.js +8 -0
- package/views/dist/panels/model.d.ts +10 -2
- package/views/dist/panels/panel-button.d.ts +10 -12
- package/views/dist/panels/panel-button.js +1 -6
- package/views/dist/panels/quick/model.d.ts +4 -0
- package/views/dist/panels/react/chrome.d.ts +0 -17
- package/views/dist/panels/react/chrome.js +0 -8
- package/views/dist/panels/react/customize-body.d.ts +14 -12
- package/views/dist/panels/react/customize-body.js +93 -19
- package/views/dist/panels/react/customize.d.ts +16 -12
- package/views/dist/panels/react/customize.js +4 -110
- package/views/dist/panels/react/filter/FilterEditor.d.ts +4 -18
- package/views/dist/panels/react/filter/FilterEditor.js +6 -330
- package/views/dist/panels/react/filter/FilterFieldList.d.ts +1 -1
- package/views/dist/panels/react/filter/FilterFieldList.js +27 -51
- package/views/dist/panels/react/filter/PhoneFilterEditor.d.ts +1 -11
- package/views/dist/panels/react/filter/PhoneFilterEditor.js +8 -144
- package/views/dist/panels/react/filter/editor-ctx.d.ts +1 -33
- package/views/dist/panels/react/filter/editor-ctx.js +5 -33
- package/views/dist/panels/react/filter/filter-body.js +5 -2
- package/views/dist/panels/react/filter/filter-part-body.d.ts +3 -6
- package/views/dist/panels/react/filter/filter-part-body.js +0 -5
- package/views/dist/panels/react/filter/rule-writes.d.ts +1 -26
- package/views/dist/panels/react/filter/rule-writes.js +4 -95
- package/views/dist/panels/react/order-details.d.ts +1 -26
- package/views/dist/panels/react/order-details.js +3 -69
- package/views/dist/panels/react/panel-header.js +0 -1
- package/views/dist/panels/react/panel-step.d.ts +3 -0
- package/views/dist/panels/react/panel-step.js +2 -1
- package/views/dist/panels/react/popover.d.ts +4 -7
- package/views/dist/panels/react/quick/QuickFiltersPanel.d.ts +2 -4
- package/views/dist/panels/react/quick/QuickFiltersPanel.js +16 -136
- package/views/dist/panels/react/sort/SortEditor.d.ts +4 -4
- package/views/dist/panels/react/sort/SortEditor.js +8 -245
- package/views/dist/panels/react/sort/SortFieldList.d.ts +1 -1
- package/views/dist/panels/react/sort/SortFieldList.js +11 -25
- package/views/dist/panels/react/toolbar/ReadyToolbar.d.ts +13 -3
- package/views/dist/panels/react/toolbar/ReadyToolbar.js +10 -3
- package/views/dist/panels/react/toolbar/Toolbar.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarAdvancedFilters.js +2 -2
- package/views/dist/panels/react/toolbar/ToolbarAsideFilter.js +2 -2
- package/views/dist/panels/react/toolbar/ToolbarBarFilter.js +16 -18
- package/views/dist/panels/react/toolbar/ToolbarFilterAdd.js +2 -1
- package/views/dist/panels/react/toolbar/ToolbarFilters.js +3 -3
- package/views/dist/panels/react/toolbar/ToolbarOptions.d.ts +12 -4
- package/views/dist/panels/react/toolbar/ToolbarOptions.js +6 -2
- package/views/dist/panels/react/toolbar/ToolbarQuickFilters.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarSave.js +0 -4
- package/views/dist/panels/react/toolbar/ToolbarSearch.js +0 -1
- package/views/dist/panels/react/toolbar/ToolbarSortPill.js +3 -3
- package/views/dist/panels/react/view-actions.js +0 -1
- package/views/dist/panels/react/views-row/FoldingViewRow.js +2 -5
- package/views/dist/panels/react/views-row/ViewCreatePill.js +0 -1
- package/views/dist/panels/react/views-row/ViewPicker.js +30 -45
- package/views/dist/panels/react/views-row/ViewPickerRow.js +0 -2
- package/views/dist/panels/react/views-row/menu-classes.d.ts +0 -4
- package/views/dist/panels/react/views-row/menu-classes.js +0 -2
- package/views/dist/panels/react.d.ts +5 -12
- package/views/dist/panels/react.js +5 -12
- package/views/dist/panels/settings/filter-groups.d.ts +3 -0
- package/views/dist/panels/settings/filter-groups.js +40 -9
- package/views/dist/panels/settings/filters.d.ts +5 -0
- package/views/dist/panels/settings/filters.js +12 -6
- package/views/dist/panels/views-row/model.d.ts +10 -1
- package/views/dist/provider/ViewsProvider.d.ts +2 -46
- package/views/dist/provider/ViewsProvider.js +31 -27
- package/views/dist/provider/components.d.ts +295 -107
- package/views/dist/provider/context.d.ts +7 -21
- package/views/dist/provider/missing-slot.d.ts +3 -7
- package/views/dist/provider/missing-slot.js +2 -9
- package/views/dist/provider/ports.d.ts +18 -6
- package/views/dist/provider/ports.js +2 -1
- package/views/dist/react.d.ts +2 -3
- package/views/dist/react.js +1 -1
- package/views/dist/selection/SelectionBar.d.ts +2 -16
- package/views/dist/selection/SelectionBar.js +6 -4
- package/views/dist/selection/bar-props.d.ts +26 -0
- package/views/dist/selection/bar-props.js +1 -0
- package/views/dist/selection/index.d.ts +1 -1
- package/views/dist/selection/verbs.d.ts +32 -5
- package/views/dist/styles.css +694 -191
- package/views/dist/styles.unlayered.css +691 -188
- package/views/docs/contract.md +133 -130
- package/views/docs/controls/bulk-bar.md +41 -0
- package/views/docs/controls/choice.md +25 -0
- package/views/docs/controls/customize.md +17 -0
- package/views/docs/controls/popover.md +2 -0
- package/views/docs/controls/press.md +9 -0
- package/views/docs/controls/quick-filters.md +35 -0
- package/views/docs/controls/radio.md +1 -1
- package/views/docs/controls/switch-row.md +18 -0
- package/views/docs/controls/tag-field.md +7 -0
- package/views/docs/controls/toolbar-button.md +31 -0
- package/views/docs/controls/toolbar.md +14 -0
- package/views/docs/getting-started.md +222 -2
- package/views/docs/guides/atoms.md +2 -2
- package/views/docs/guides/cells.md +224 -4
- package/views/docs/guides/display.md +3 -3
- package/views/docs/guides/editors.md +235 -20
- package/views/docs/guides/looks.md +8 -2
- package/views/docs/guides/ports.md +7 -7
- package/views/docs/guides/selection.md +5 -1
- package/views/docs/guides/the-grid.md +15 -17
- package/views/docs/guides/the-provider.md +9 -15
- package/views/docs/install.md +4 -1
- package/views/docs/reference/cells.md +2 -2
- package/views/docs/reference/controls.md +215 -21
- package/views/docs/reference/display.md +1 -0
- package/views/docs/reference/editors-chips.md +2 -2
- package/views/docs/reference/editors-date.md +4 -4
- package/views/docs/reference/editors-location.md +4 -7
- package/views/docs/reference/editors-name.md +3 -5
- package/views/docs/reference/editors-number.md +10 -10
- package/views/docs/reference/editors-panel.md +3 -3
- package/views/docs/reference/editors-range.md +3 -5
- package/views/docs/reference/editors-relation.md +4 -4
- package/views/docs/reference/editors-select.md +3 -3
- package/views/docs/reference/editors-text.md +3 -4
- package/views/docs/reference/editors-value-list.md +3 -3
- package/views/docs/reference/field-row.md +1 -1
- package/views/docs/reference/grid.md +2 -2
- package/views/docs/reference/looks.md +25 -11
- package/views/docs/reference/panels-react.md +23 -37
- package/views/docs/reference/panels.md +8 -6
- package/views/docs/reference/react.md +24 -24
- package/views/docs/reference/selection.md +4 -2
- package/views/docs/reference/views.md +12 -11
- package/views/skills/views/SKILL.md +2 -2
- package/views/dist/editors/relation-panel.d.ts +0 -69
- package/views/dist/editors/relation-panel.js +0 -46
- package/views/dist/grid/chrome/GridColumnColorSection.d.ts +0 -13
- package/views/dist/grid/chrome/GridColumnColorSection.js +0 -40
- package/views/dist/grid/chrome/GridColumnDateSection.d.ts +0 -28
- package/views/dist/grid/chrome/GridColumnDateSection.js +0 -23
- package/views/dist/grid/chrome/GridColumnDurationSection.d.ts +0 -23
- package/views/dist/grid/chrome/GridColumnDurationSection.js +0 -24
- package/views/dist/grid/chrome/GridColumnNumberSection.d.ts +0 -29
- package/views/dist/grid/chrome/GridColumnNumberSection.js +0 -27
- package/views/dist/grid/chrome/GridColumnPercentSection.d.ts +0 -16
- package/views/dist/grid/chrome/GridColumnPercentSection.js +0 -16
- package/views/dist/grid/chrome/GridColumnSortSection.d.ts +0 -38
- package/views/dist/grid/chrome/GridColumnSortSection.js +0 -33
- package/views/dist/grid/chrome/GridFlyout.d.ts +0 -44
- package/views/dist/grid/chrome/GridFlyout.js +0 -80
- package/views/dist/grid/chrome/GridMenuRow.d.ts +0 -15
- package/views/dist/grid/chrome/GridMenuRow.js +0 -15
- package/views/dist/grid/chrome/grid-menu-search.d.ts +0 -7
- package/views/dist/grid/chrome/grid-menu-search.js +0 -7
- package/views/dist/panels/react/GroupBucketsList.d.ts +0 -16
- package/views/dist/panels/react/GroupBucketsList.js +0 -44
- package/views/dist/panels/react/LayoutColumnsList.d.ts +0 -24
- package/views/dist/panels/react/LayoutColumnsList.js +0 -101
- package/views/dist/panels/react/PopoverColumnDetail.d.ts +0 -11
- package/views/dist/panels/react/PopoverColumnDetail.js +0 -24
- package/views/dist/panels/react/drag.d.ts +0 -2
- package/views/dist/panels/react/drag.js +0 -5
- package/views/dist/panels/react/layout-detail.d.ts +0 -4
- package/views/dist/panels/react/layout-detail.js +0 -29
- package/views/dist/panels/react/root-list.d.ts +0 -6
- package/views/dist/panels/react/root-list.js +0 -31
- package/views/dist/panels/react/sort/use-sort-drag.d.ts +0 -17
- package/views/dist/panels/react/sort/use-sort-drag.js +0 -39
- package/views/dist/panels/react/view-footer.d.ts +0 -20
- package/views/dist/panels/react/view-footer.js +0 -41
|
@@ -79,6 +79,9 @@ export type FilterEditorField = {
|
|
|
79
79
|
far?: readonly FilterEditorField[];
|
|
80
80
|
/** How its field is marked, as the grid's header marks its column (`columnMark`); a relation has none. */
|
|
81
81
|
mark?: FieldMark;
|
|
82
|
+
/** Why no rule can be made on it, in the app's words (an unavailable capability's reason, else
|
|
83
|
+
* `views.panels.filter-not-offered`); absent, it can. Only in `FilterTreeConfig.listed`: a field list draws it greyed. */
|
|
84
|
+
disabled?: string;
|
|
82
85
|
};
|
|
83
86
|
/** A field the list no longer shows (an archived one, say), by its key, with its label and its options' labels: a
|
|
84
87
|
* set-aside filter on it is named by them, never by its key and stored value. Nothing is stored in the rule. */
|
|
@@ -96,7 +99,11 @@ export type FilterGoneField = {
|
|
|
96
99
|
/** A list's filter as a tree the filter editor changes (`settingsPanels(…).filterTree`, with `filterGroups`). */
|
|
97
100
|
export type FilterTreeConfig = {
|
|
98
101
|
tree: FilterTree;
|
|
102
|
+
/** The fields a rule may name. */
|
|
99
103
|
fields: readonly FilterEditorField[];
|
|
104
|
+
/** What a field list shows, in the person's column order: `fields`, and in their places the columns the list can't
|
|
105
|
+
* filter, greyed (`disabled`), never picked. Absent: `fields` (`listedFieldsOf`). */
|
|
106
|
+
listed?: readonly FilterEditorField[];
|
|
100
107
|
/** The fields the list no longer shows, so a set-aside filter on one is named as a person knows it. */
|
|
101
108
|
gone?: readonly FilterGoneField[];
|
|
102
109
|
/** Each change, as it is made: the whole tree. */
|
|
@@ -105,8 +112,9 @@ export type FilterTreeConfig = {
|
|
|
105
112
|
* read from `rule` and each change handed to `write` as the rule with its new value; null for a rule no body
|
|
106
113
|
* edits (a set-aside rule, an operator taking no value). `relation`: the relation's field key, for a far rule. */
|
|
107
114
|
valueOf: (rule: FilterRule, write: (next: FilterRule) => void, relation?: string) => FilterConfig<string> | null;
|
|
108
|
-
/** A choice field's values as the Picker draws them,
|
|
109
|
-
* demand or the field is no choice. `relation`: the relation's field key, for a
|
|
115
|
+
/** A choice field's values as the Picker draws them, or a place's country's names (`part` `countryCode`), where they are known as
|
|
116
|
+
* the list opens; undefined where they are read on demand or the field is no choice. `relation`: the relation's field key, for a
|
|
117
|
+
* far field. */
|
|
110
118
|
optionsOf?: (fieldKey: string, part?: string, relation?: string) => readonly ViewsPickerItem[] | undefined;
|
|
111
119
|
label?: string;
|
|
112
120
|
};
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import type { MouseEvent as ReactMouseEvent, ReactElement, ReactNode, Ref } from "react";
|
|
2
2
|
import type { ViewsContextValue } from "../provider/context.js";
|
|
3
|
-
/** What a panel's button reads from the provider: the app's `Button
|
|
4
|
-
export type PanelButtonViews = Pick<ViewsContextValue, "components"
|
|
3
|
+
/** What a panel's button reads from the provider: the app's `Button`. */
|
|
4
|
+
export type PanelButtonViews = Pick<ViewsContextValue, "components">;
|
|
5
5
|
/** One button a panel draws itself, as each of its places describes it. */
|
|
6
6
|
export type PanelButtonDraw = {
|
|
7
|
-
/** Today's classes, without `ELEMENT_RESET`: drawn on ViewKit's own `<button>`. */
|
|
8
|
-
own: string;
|
|
9
7
|
/** The box ViewKit keeps on the app's `Button`: its size, its place. The look is the app's. */
|
|
10
8
|
frame: string;
|
|
11
9
|
variant: "ghost" | "outline" | "secondary";
|
|
@@ -21,15 +19,15 @@ export type PanelButtonDraw = {
|
|
|
21
19
|
"aria-selected"?: boolean;
|
|
22
20
|
"data-slot"?: string;
|
|
23
21
|
"data-state"?: "open" | "closed";
|
|
24
|
-
/** An actions row a host's inset well sizes: on
|
|
22
|
+
/** An actions row a host's inset well sizes: on the app's button itself, never a wrapper. */
|
|
25
23
|
"data-vs-row"?: boolean;
|
|
26
|
-
/** A press noted before its click: on
|
|
24
|
+
/** A press noted before its click: on a `display: contents` span around the app's button. */
|
|
27
25
|
onPointerDown?: () => void;
|
|
28
26
|
onPointerDownCapture?: () => void;
|
|
29
|
-
/** The search's ✕ keeps the field's caret: on
|
|
27
|
+
/** The search's ✕ keeps the field's caret: on a `display: contents` span around the app's button. */
|
|
30
28
|
onMouseDown?: (event: ReactMouseEvent<HTMLElement>) => void;
|
|
31
|
-
/** A reveal on hover on a computer:
|
|
32
|
-
*
|
|
29
|
+
/** A reveal on hover on a computer: a span around the app's button carrying `data-desktop`, `data-state` and these
|
|
30
|
+
* classes. */
|
|
33
31
|
reveal?: {
|
|
34
32
|
desktop: boolean;
|
|
35
33
|
classes: string;
|
|
@@ -38,10 +36,10 @@ export type PanelButtonDraw = {
|
|
|
38
36
|
children: ReactNode;
|
|
39
37
|
};
|
|
40
38
|
/**
|
|
41
|
-
* Draws a button a panel draws itself:
|
|
42
|
-
*
|
|
39
|
+
* Draws a button a panel draws itself: the app's `Button`, handed the panel's box in its class. A plain function,
|
|
40
|
+
* never a hook.
|
|
43
41
|
*/
|
|
44
|
-
export declare function drawPanelButton(views: PanelButtonViews, {
|
|
42
|
+
export declare function drawPanelButton(views: PanelButtonViews, { frame, variant, size, onPointerDown, onPointerDownCapture, onMouseDown, reveal, children, ...props }: PanelButtonDraw): ReactElement;
|
|
45
43
|
/** `drawPanelButton` as a component, for a place that draws it on one branch of a choice (VK-621): a ref handed in its
|
|
46
44
|
* `draw` reaches the button as JSX props do. */
|
|
47
45
|
export declare function PanelButton({ views, draw }: {
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
import { ELEMENT_RESET } from "../internal/reset.js";
|
|
5
|
-
export function drawPanelButton(views, { own, frame, variant, size, onPointerDown, onPointerDownCapture, onMouseDown, reveal, children, ...props }) {
|
|
6
|
-
if (views.panelButtons !== "button") {
|
|
7
|
-
return (_jsx("button", { type: "button", ...props, "data-desktop": reveal?.desktop ? "" : undefined, onPointerDown: onPointerDown, onPointerDownCapture: onPointerDownCapture, onMouseDown: onMouseDown, className: cx(ELEMENT_RESET, own), children: children }));
|
|
8
|
-
}
|
|
3
|
+
export function drawPanelButton(views, { frame, variant, size, onPointerDown, onPointerDownCapture, onMouseDown, reveal, children, ...props }) {
|
|
9
4
|
const { Button } = views.components;
|
|
10
5
|
let drawn = (_jsx(Button, { type: "button", variant: variant, size: size, className: frame, ...props, children: children }));
|
|
11
6
|
if (onPointerDown || onPointerDownCapture || onMouseDown) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ListHold } from "viewkitjs/fields/query";
|
|
2
|
+
import type { ViewsPickerItem } from "../../provider/components.js";
|
|
2
3
|
/** A field's values past this many show a search over them. */
|
|
3
4
|
export declare const QUICK_SEARCH_AFTER = 8;
|
|
4
5
|
/** A value a field offers: its key as the hold keeps it (an option, an id, "true" or "false", "" for none) and its
|
|
@@ -20,6 +21,9 @@ export type QuickFilterField = {
|
|
|
20
21
|
counts?: Readonly<Record<string, number>> | null;
|
|
21
22
|
/** What its search says; absent, "Search {label}". */
|
|
22
23
|
searchPlaceholder?: string;
|
|
24
|
+
/** How its values draw: a choice field's every option as the Picker draws it (a status's step, a person's or a
|
|
25
|
+
* company's face), where the app holds them. A value's mark is its option's; absent, no marks. */
|
|
26
|
+
options?: readonly ViewsPickerItem[];
|
|
23
27
|
};
|
|
24
28
|
/** The words of a field the hold holds, for what the fields offered don't list: a field the strip doesn't offer and a
|
|
25
29
|
* value no option lists any more (a deleted record, a retired option). */
|
|
@@ -1,20 +1,3 @@
|
|
|
1
1
|
/** A panel's list that scrolls: its inset (`--vk-panel-padding`), its own scroll, and the bounce kept from
|
|
2
2
|
* dragging the page behind it. Its height cap is the caller's: `cx("max-h-64", PANEL_LIST_CLASS)`. */
|
|
3
3
|
export declare const PANEL_LIST_CLASS = "overflow-y-auto overscroll-contain p-(--vk-panel-padding,0.375rem)";
|
|
4
|
-
/** The hairline between two runs of rows, as far off a row as the list's inset keeps it from the edge. */
|
|
5
|
-
export declare const PANEL_SEPARATOR_CLASS = "-mx-1 my-1.5 h-px bg-(color:--vk-border)";
|
|
6
|
-
/** A row richer than a menu item (a grip, an eye, a switch): the panel row's inset, radius, gutter and hover. */
|
|
7
|
-
export declare const PANEL_ROW_CLASS = "flex w-full items-center gap-2.5 rounded-lg px-2 py-1.5 text-left transition-colors hover:bg-(color:--vk-hovered)";
|
|
8
|
-
/** The phone sheet's taller row (a list's `comfortable` variant), without its ground: the ground is
|
|
9
|
-
* `SHEET_ROW_GROUND_CLASS` at rest and `DRAGGING_CLASS` while dragged, never both. */
|
|
10
|
-
export declare const SHEET_ROW_CLASS = "w-full flex items-center gap-2.5 px-4 py-2.5 text-left transition-colors";
|
|
11
|
-
export declare const SHEET_ROW_GROUND_CLASS = "bg-(color:--vk-neutral) active:bg-(color:--vk-pressed)";
|
|
12
|
-
/** A row while it is dragged: lifted over its neighbours on the panel's own ground. */
|
|
13
|
-
export declare const DRAGGING_CLASS = "z-50 bg-(color:--vk-overlay) shadow-lg";
|
|
14
|
-
/** The rule over a labelled section of a panel. */
|
|
15
|
-
export declare const SECTION_RULE_CLASS = "my-1 border-t border-solid border-(color:--vk-border)";
|
|
16
|
-
/** A section's label: small capitals in the quietest colour. */
|
|
17
|
-
export declare const SECTION_HEADING_CLASS = "px-3 pt-1.5 pb-1 text-(length:--vk-caption-text,10px) font-bold uppercase tracking-(--vk-caps-tracking,0.15em) text-(color:--vk-fg-subtlest)";
|
|
18
|
-
/** A set-aside rule's or sort's field box: dashed in the warning colour, as the toolbar button's `aside` draws it
|
|
19
|
-
* (`atoms/ToolbarButton.tsx`), its fallback where an app declares no `--vk-warning`. */
|
|
20
|
-
export declare const ASIDE_CLASS = "border border-dashed border-[color:var(--vk-warning,hsl(38_92%_50%))] text-[color:var(--vk-warning,hsl(38_92%_50%))]";
|
|
@@ -1,9 +1 @@
|
|
|
1
1
|
export const PANEL_LIST_CLASS = "overflow-y-auto overscroll-contain p-(--vk-panel-padding,0.375rem)";
|
|
2
|
-
export const PANEL_SEPARATOR_CLASS = "-mx-1 my-1.5 h-px bg-(color:--vk-border)";
|
|
3
|
-
export const PANEL_ROW_CLASS = "flex w-full items-center gap-2.5 rounded-lg px-2 py-1.5 text-left transition-colors hover:bg-(color:--vk-hovered)";
|
|
4
|
-
export const SHEET_ROW_CLASS = "w-full flex items-center gap-2.5 px-4 py-2.5 text-left transition-colors";
|
|
5
|
-
export const SHEET_ROW_GROUND_CLASS = "bg-(color:--vk-neutral) active:bg-(color:--vk-pressed)";
|
|
6
|
-
export const DRAGGING_CLASS = "z-50 bg-(color:--vk-overlay) shadow-lg";
|
|
7
|
-
export const SECTION_RULE_CLASS = "my-1 border-t border-solid border-(color:--vk-border)";
|
|
8
|
-
export const SECTION_HEADING_CLASS = "px-3 pt-1.5 pb-1 text-(length:--vk-caption-text,10px) font-bold uppercase tracking-(--vk-caps-tracking,0.15em) text-(color:--vk-fg-subtlest)";
|
|
9
|
-
export const ASIDE_CLASS = "border border-dashed border-[color:var(--vk-warning,hsl(38_92%_50%))] text-[color:var(--vk-warning,hsl(38_92%_50%))]";
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type {
|
|
3
|
-
import
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { ViewsCustomizeBodyProps, ViewsCustomizeFields } from "../../provider/components.js";
|
|
3
|
+
import { useViews } from "../../provider/context.js";
|
|
4
4
|
import type { ViewOptionsPanelContentProps } from "./customize.js";
|
|
5
|
-
/**
|
|
6
|
-
*
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
/** A list's per-field filters, its time range and its date ranges as a Customize body's `fields` (VK-891), as ViewKit's own
|
|
6
|
+
* Customize lists them: each filter (none where the list has a filter tree, which holds them), the time range, each date range;
|
|
7
|
+
* folded behind Filter where the list folds them. A choice of one or several is handed as its options; any other kind as ViewKit's
|
|
8
|
+
* own body for its value. Each writes through its config's own change; the time range's Custom keeps the older page's rule: a press
|
|
9
|
+
* after a whole range starts a new one, and the first press stays a partial range. */
|
|
10
|
+
export declare function customizeFieldsOf(props: Pick<ViewOptionsPanelContentProps, "filters" | "filterTree" | "timeScopeConfig" | "dateRangeConfigs" | "foldFilters">, { icons, messages, conventions }: Pick<ReturnType<typeof useViews>, "icons" | "messages" | "conventions">): ViewsCustomizeFields | undefined;
|
|
11
|
+
/** Customize's own props as a body is handed them: the view's settings as data, the page mapped onto the body's, the ✕ on a
|
|
12
|
+
* phone only where the sheet's head doesn't draw it. */
|
|
13
|
+
export declare function customizeBodyPropsOf(props: ViewOptionsPanelContentProps & {
|
|
9
14
|
form: "computer" | "phone";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}): ReactNode;
|
|
13
|
-
/** The app's `CustomizeBody` over Customize's own props: the view's settings as data, the page mapped onto the body's,
|
|
14
|
-
* the ✕ on a phone only where the sheet's head doesn't draw it. Null without the slot. */
|
|
15
|
+
}, { components, icons, messages, conventions }: Pick<ReturnType<typeof useViews>, "components" | "icons" | "messages" | "conventions">): ViewsCustomizeBodyProps;
|
|
16
|
+
/** The app's `CustomizeBody` over Customize's own props (customizeBodyPropsOf). */
|
|
15
17
|
export declare function AppCustomizeBody(props: ViewOptionsPanelContentProps & {
|
|
16
18
|
form: "computer" | "phone";
|
|
17
19
|
}): ReactNode;
|
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { FILTER_TREE_MAX_UI_DEPTH } from "viewkitjs/fields/query";
|
|
3
|
+
import { FILTER_TREE_MAX_UI_DEPTH, fromDayKey, toDayKey } from "viewkitjs/fields/query";
|
|
4
|
+
import { useContext } from "react";
|
|
5
|
+
import { isDateFilter, isFilterActive, isNumberFilter, isRangeFilter, isRelationFilter, isTextFilter, isUnavailableFilter } from "../../filters/filter-model.js";
|
|
6
|
+
import { dateRangeValueLabel, filterValueLabel, timeScopeRowValueLabel } from "../labels.js";
|
|
7
|
+
import { isDateRangeActive } from "../model.js";
|
|
8
|
+
import { FilterIcon } from "../filter/FilterIcon.js";
|
|
4
9
|
import { useViews } from "../../provider/context.js";
|
|
5
10
|
import { activePanelOf, customizeColumnsOf, customizeLayoutOf, customizePageOf, customizeSortOf, customizeToggleOf, groupBodyProps, } from "../customize-body.js";
|
|
6
|
-
import { filterBodyChangeFits, takesValue } from "../settings/filter-groups.js";
|
|
11
|
+
import { filterBodyChangeFits, listedFieldsOf, takesValue } from "../settings/filter-groups.js";
|
|
7
12
|
import { sortBodyOptions } from "../sort-body-options.js";
|
|
13
|
+
import { PanelStepHold } from "./panel-step.js";
|
|
8
14
|
import { filterBodyFields } from "./filter/filter-body.js";
|
|
9
15
|
import { FilterValueBody } from "./filter/FilterValueBody.js";
|
|
10
|
-
export function AppGroupBody({ group, form, onDone, onStepChange, }) {
|
|
11
|
-
const { components, messages } = useViews();
|
|
12
|
-
const GroupBody = components.GroupBody;
|
|
13
|
-
if (!GroupBody)
|
|
14
|
-
return null;
|
|
15
|
-
return _jsx(GroupBody, { ...groupBodyProps(group, messages), form: form, onDone: onDone, ...(onStepChange && { onStepChange }) });
|
|
16
|
-
}
|
|
17
16
|
function customizeFilterOf(filterTree, messages) {
|
|
18
17
|
const level = { op: filterTree.tree.op, items: filterTree.tree.items };
|
|
19
18
|
const levels = FILTER_TREE_MAX_UI_DEPTH;
|
|
20
19
|
return {
|
|
21
20
|
label: filterTree.label ?? messages({ key: "views.panels.filter" }),
|
|
22
|
-
fields: filterBodyFields(filterTree
|
|
21
|
+
fields: filterBodyFields(listedFieldsOf(filterTree), filterTree.optionsOf),
|
|
23
22
|
filter: level,
|
|
24
23
|
levels,
|
|
25
24
|
excludable: false,
|
|
@@ -36,19 +35,76 @@ function customizeFilterOf(filterTree, messages) {
|
|
|
36
35
|
},
|
|
37
36
|
};
|
|
38
37
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
const dayOf = (date) => (date ? toDayKey(date) : null);
|
|
39
|
+
const dateOf = (day) => (day ? fromDayKey(day) : null);
|
|
40
|
+
export function customizeFieldsOf(props, { icons, messages, conventions }) {
|
|
41
|
+
const { filters, filterTree, timeScopeConfig: time, dateRangeConfigs } = props;
|
|
42
|
+
const fieldOf = (f) => {
|
|
43
|
+
const base = {
|
|
44
|
+
key: f.key, label: f.label, icon: _jsx(FilterIcon, { filter: f, className: "h-3.5 w-3.5" }),
|
|
45
|
+
...(f.section !== undefined && { section: f.section }),
|
|
46
|
+
says: filterValueLabel(f, conventions, messages), inForce: (f.countsAsFilter ?? true) && isFilterActive(f),
|
|
47
|
+
...(f.disabled && { disabled: f.disabledReason ?? "" }), place: "filters", ...(f.onOpen && { onOpen: f.onOpen }),
|
|
48
|
+
};
|
|
49
|
+
if (isTextFilter(f) || isNumberFilter(f) || isRangeFilter(f) || isDateFilter(f) || isRelationFilter(f) || isUnavailableFilter(f)
|
|
50
|
+
|| f.renderOption || f.renderTrailing)
|
|
51
|
+
return { ...base, body: _jsx(FilterValueBody, { filter: f }) };
|
|
52
|
+
const options = f.options.map((o) => ({ value: o.value, label: o.label, ...(f.renderLeading && { mark: f.renderLeading(o) }) }));
|
|
53
|
+
if (f.multi)
|
|
54
|
+
return { ...base, check: { value: f.value, options, onChange: (v) => f.onChange([...v]) } };
|
|
55
|
+
const all = f.hideAllOption ? [] : [{ value: f.allValue ?? "all", label: f.allLabel ?? messages({ key: "views.panels.filter-all-of", values: { field: f.label } }) }];
|
|
56
|
+
return { ...base, pick: { value: f.value, options: [...all, ...options], onChange: (v) => f.onChange(v) } };
|
|
57
|
+
};
|
|
58
|
+
const items = [
|
|
59
|
+
...(filterTree ? [] : (filters ?? []).map((f) => fieldOf(f))),
|
|
60
|
+
...(time ? [{
|
|
61
|
+
key: "time-scope", label: time.label ?? messages({ key: "views.panels.time-scope-label" }), icon: _jsx(icons.time, { className: "h-3.5 w-3.5" }),
|
|
62
|
+
says: timeScopeRowValueLabel(time, messages, conventions), inForce: false, place: "after",
|
|
63
|
+
time: {
|
|
64
|
+
value: time.value, options: time.options, onChange: (v) => time.onChange(v),
|
|
65
|
+
...(time.enableCustom === true && time.customValue !== undefined && { custom: {
|
|
66
|
+
label: time.customLabel ?? messages({ key: "views.panels.time-scope-custom" }),
|
|
67
|
+
...(time.value === time.customValue && { says: timeScopeRowValueLabel(time, messages, conventions) }),
|
|
68
|
+
on: time.value === time.customValue, from: dayOf(time.customRange?.from ?? null), to: dayOf(time.customRange?.to ?? null),
|
|
69
|
+
onPress: (next, day) => {
|
|
70
|
+
const now = time.customRange ?? { from: null, to: null };
|
|
71
|
+
if (now.from && now.to && day)
|
|
72
|
+
time.onCustomRangeChange?.({ from: dateOf(day), to: null });
|
|
73
|
+
else
|
|
74
|
+
time.onCustomRangeChange?.({ from: dateOf(next.from), to: dateOf(next.to) });
|
|
75
|
+
},
|
|
76
|
+
} }),
|
|
77
|
+
},
|
|
78
|
+
}] : []),
|
|
79
|
+
...(dateRangeConfigs ?? []).map((d) => ({
|
|
80
|
+
key: `date-range:${d.key}`, label: d.label ?? messages({ key: "views.panels.date-range-label" }), icon: _jsx(icons.date, { className: "h-3.5 w-3.5" }),
|
|
81
|
+
says: dateRangeValueLabel(d, messages, conventions), inForce: isDateRangeActive(d), place: "after",
|
|
82
|
+
dates: { from: dayOf(d.value.from), to: dayOf(d.value.to), onChange: (next) => d.onChange({ from: dateOf(next.from), to: dateOf(next.to) }) },
|
|
83
|
+
})),
|
|
84
|
+
];
|
|
85
|
+
return items.length ? { folded: props.foldFilters ?? true, items } : undefined;
|
|
86
|
+
}
|
|
87
|
+
export function customizeBodyPropsOf(props, { components, icons, messages, conventions }) {
|
|
88
|
+
const { layout, filterTree, group, toggles, activePanel, onOpenPanel, anyActive, clearAll, onClose, closeButton = true, view, viewFoot, footClear, fieldEditor, form, viewName, onRenameView, onCopyLink, onExport, exportCount, } = props;
|
|
45
89
|
const columns = layout ? customizeColumnsOf(layout, fieldEditor, messages) : undefined;
|
|
90
|
+
const fields = customizeFieldsOf(props, { icons, messages, conventions });
|
|
46
91
|
const unmarked = customizeSortOf(props, messages);
|
|
47
92
|
const sort = unmarked && {
|
|
48
93
|
...unmarked,
|
|
49
94
|
options: sortBodyOptions(unmarked.options, { icons, AppIcon: components.AppIcon }),
|
|
50
95
|
};
|
|
51
|
-
return
|
|
96
|
+
return {
|
|
97
|
+
label: messages({ key: "views.panels.customize-title" }),
|
|
98
|
+
page: customizePageOf(activePanel),
|
|
99
|
+
onPageChange: (page) => onOpenPanel(activePanelOf(page)),
|
|
100
|
+
...(layout && { layout: customizeLayoutOf(layout, messages) }),
|
|
101
|
+
...(columns && { columns }),
|
|
102
|
+
...(filterTree && { filter: customizeFilterOf(filterTree, messages) }),
|
|
103
|
+
...(fields && { fields }),
|
|
104
|
+
...(sort && { sort }),
|
|
105
|
+
...(group && { group: groupBodyProps(group, messages) }),
|
|
106
|
+
toggles: (toggles ?? []).map(customizeToggleOf),
|
|
107
|
+
...(view && {
|
|
52
108
|
view: {
|
|
53
109
|
changes: view.changes,
|
|
54
110
|
stale: view.stale,
|
|
@@ -57,7 +113,25 @@ export function AppCustomizeBody(props) {
|
|
|
57
113
|
onReset: view.onReset,
|
|
58
114
|
onPublish: view.onPublish,
|
|
59
115
|
},
|
|
60
|
-
}),
|
|
116
|
+
}),
|
|
117
|
+
...(viewFoot && { foot: viewFoot }),
|
|
118
|
+
...(!view && footClear && { onClear: footClear }),
|
|
119
|
+
...(!view && anyActive && { clearAll }),
|
|
120
|
+
form,
|
|
121
|
+
onDone: onClose ?? (() => undefined),
|
|
122
|
+
...(form === "phone" &&
|
|
61
123
|
closeButton &&
|
|
62
|
-
onClose && { actions: { close: { label: messages({ key: "views.panels.close" }), onPress: onClose } } })
|
|
124
|
+
onClose && { actions: { close: { label: messages({ key: "views.panels.close" }), onPress: onClose } } }),
|
|
125
|
+
...(viewName !== undefined && { name: viewName }),
|
|
126
|
+
...(onRenameView && { onRename: onRenameView }),
|
|
127
|
+
...(onCopyLink && { onCopyLink }),
|
|
128
|
+
...(onExport && { onExport }),
|
|
129
|
+
...(exportCount !== undefined && { exportCount }),
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
export function AppCustomizeBody(props) {
|
|
133
|
+
const views = useViews();
|
|
134
|
+
const step = useContext(PanelStepHold);
|
|
135
|
+
const CustomizeBody = views.components.CustomizeBody;
|
|
136
|
+
return _jsx(CustomizeBody, { ...customizeBodyPropsOf(props, views), ...(props.form === "phone" && step && { onStepChange: step.onStepChange }) });
|
|
63
137
|
}
|
|
@@ -7,27 +7,31 @@ export type ViewOptionsPanelContentProps<S extends string = string, G extends st
|
|
|
7
7
|
onOpenPanel: (p: ActivePanel) => void;
|
|
8
8
|
anyActive: boolean;
|
|
9
9
|
clearAll: () => void;
|
|
10
|
-
/** The shared view this list shows, when it shows one
|
|
11
|
-
*
|
|
10
|
+
/** The shared view this list shows, when it shows one, handed to the body as `view` (its Reset and Publish); present,
|
|
11
|
+
* the body is handed no Clear all. See `CollectionViewState`. */
|
|
12
12
|
view?: CollectionViewState;
|
|
13
13
|
/** The foot's words: `kit` for Clear and Save, `none` for no foot (they stand elsewhere, on a toolbar's bar);
|
|
14
|
-
* absent, Reset and
|
|
14
|
+
* absent, Reset and Save for everyone. */
|
|
15
15
|
viewFoot?: "kit" | "none";
|
|
16
16
|
/** With no shared view, the foot's Clear, taking the list back to its default; absent, no foot. */
|
|
17
17
|
footClear?: () => void;
|
|
18
|
-
/**
|
|
19
|
-
* dimension is a root row (dashboards). */
|
|
18
|
+
/** The body's `fields` folded behind one Filter row (list pages); off, each is a row of its own (dashboards). */
|
|
20
19
|
foldFilters?: boolean;
|
|
21
|
-
/** Dismisses the whole panel
|
|
22
|
-
* renders no ✕ rather than a dead one. */
|
|
20
|
+
/** Dismisses the whole panel: the body's `onDone`, and on a phone its ✕. */
|
|
23
21
|
onClose?: () => void;
|
|
24
|
-
/** Whether
|
|
25
|
-
* dismisses the panel from inside
|
|
22
|
+
/** Whether a phone's body is handed its ✕ (default true): false in a sheet whose own head draws it, where `onClose` still
|
|
23
|
+
* dismisses the panel from inside. */
|
|
26
24
|
closeButton?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* their content. */
|
|
25
|
+
/** @deprecated Read by nothing: the app's body sizes itself in its host. It drew ViewKit's older Customize full height. */
|
|
29
26
|
fill?: boolean;
|
|
30
|
-
/** The list's field editor (Add field, Edit field), handed to the
|
|
27
|
+
/** The list's field editor (Add field, Edit field), handed to the body's columns as `columnMenu` and `footer`. */
|
|
31
28
|
fieldEditor?: PanelFieldEditor | null;
|
|
29
|
+
/** What an app hands Customize through the toolbar, each drawn by a `CustomizeBody` only where handed: the view's name with
|
|
30
|
+
* its rename, Copy link, and Export CSV with its count. */
|
|
31
|
+
viewName?: string;
|
|
32
|
+
onRenameView?: (name: string) => void;
|
|
33
|
+
onCopyLink?: () => void;
|
|
34
|
+
onExport?: () => void;
|
|
35
|
+
exportCount?: string;
|
|
32
36
|
};
|
|
33
37
|
export declare function ViewOptionsPanelContent<S extends string = string, G extends string = string, T extends string = string>(props: ViewOptionsPanelContentProps<S, G, T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,115 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as _jsx
|
|
3
|
-
import {
|
|
4
|
-
import { isRelationFilter } from "../../filters/filter-model.js";
|
|
5
|
-
import { cx } from "../../internal/cx.js";
|
|
6
|
-
import { useViews } from "../../provider/context.js";
|
|
7
|
-
import { CompactDateRangeDetail, CompactFilterDetail, CompactToggleDetail } from "../filter/details.js";
|
|
8
|
-
import { CompactFilterList } from "../filter/filter-list.js";
|
|
9
|
-
import { CompactTimeScopeDetail } from "../filter/TimeScopeDetail.js";
|
|
10
|
-
import { customizePageOf, perFieldFiltersOnly } from "../customize-body.js";
|
|
11
|
-
import { drawPanelButton } from "../panel-button.js";
|
|
12
|
-
import { PANEL_LIST_CLASS } from "./chrome.js";
|
|
13
|
-
import { AppCustomizeBody, AppGroupBody } from "./customize-body.js";
|
|
14
|
-
import { CompactLayoutDetail } from "./layout-detail.js";
|
|
15
|
-
import { LayoutColumnsList } from "./LayoutColumnsList.js";
|
|
16
|
-
import { PanelHeader } from "./panel-header.js";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { AppCustomizeBody } from "./customize-body.js";
|
|
17
4
|
import { useSheetPanels } from "./panel-sheet.js";
|
|
18
|
-
import { usePanelStep } from "./panel-step.js";
|
|
19
|
-
import { CompactGroupByDetail, CompactGroupDateByDetail, CompactGroupDetail, CompactGroupSortDetail, CompactSortDetail, } from "./order-details.js";
|
|
20
|
-
import { PopoverColumnDetail } from "./PopoverColumnDetail.js";
|
|
21
|
-
import { PopoverRootList } from "./root-list.js";
|
|
22
|
-
import { ViewFooter } from "./view-footer.js";
|
|
23
5
|
export function ViewOptionsPanelContent(props) {
|
|
24
|
-
const { filters, sort, group, timeScopeConfig, dateRangeConfigs, toggles, layout, activePanel, onOpenPanel, anyActive, clearAll, foldFilters = true, onClose, closeButton = true, fill = false, view, viewFoot, footClear, fieldEditor, } = props;
|
|
25
|
-
const views = useViews();
|
|
26
|
-
const { messages } = views;
|
|
27
6
|
const sheet = useSheetPanels();
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
const setBackHandler = useCallback((fn) => {
|
|
31
|
-
setBackHandlerRaw(fn ? { fn } : null);
|
|
32
|
-
}, []);
|
|
33
|
-
const isFilterDimension = activePanel?.type === "filter" || activePanel?.type === "timeScope" || activePanel?.type === "dateRange";
|
|
34
|
-
const onBackClick = () => {
|
|
35
|
-
if (backHandler?.fn())
|
|
36
|
-
return;
|
|
37
|
-
if (activePanel?.type === "filter" && activePanel.field) {
|
|
38
|
-
onOpenPanel({ type: "filter", key: activePanel.key });
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
if (foldFilters && isFilterDimension) {
|
|
42
|
-
onOpenPanel({ type: "filters" });
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
if (activePanel?.type === "column") {
|
|
46
|
-
onOpenPanel({ type: "columns" });
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
if (activePanel?.type === "groupBy" || activePanel?.type === "groupSort" || activePanel?.type === "groupDateBy") {
|
|
50
|
-
onOpenPanel(views.components.GroupBody ? null : { type: "group" });
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
onOpenPanel(null);
|
|
54
|
-
};
|
|
55
|
-
const activeFilter = activePanel?.type === "filter" ? (filters?.find((f) => f.key === activePanel.key) ?? null) : null;
|
|
56
|
-
const activeField = activePanel?.type === "filter" && activePanel.field && activeFilter && isRelationFilter(activeFilter)
|
|
57
|
-
? (activeFilter.where.find((w) => w.key === activePanel.field) ?? null)
|
|
58
|
-
: null;
|
|
59
|
-
const activeToggle = activePanel?.type === "toggle" ? (toggles?.find((t) => t.key === activePanel.key) ?? null) : null;
|
|
60
|
-
const activeDateRange = activePanel?.type === "dateRange" ? (dateRangeConfigs?.find((d) => d.key === activePanel.key) ?? null) : null;
|
|
61
|
-
const activeColumn = activePanel?.type === "column" ? (layout?.columns?.items.find((c) => c.id === activePanel.key) ?? null) : null;
|
|
62
|
-
const panelTitle = activePanel?.type === "filters"
|
|
63
|
-
? messages({ key: "views.panels.filter" })
|
|
64
|
-
: activePanel?.type === "columns"
|
|
65
|
-
? (layout?.columnsLabelByView?.[layout.value] ?? messages({ key: "views.panels.columns" }))
|
|
66
|
-
: activePanel?.type === "column"
|
|
67
|
-
? (activeColumn?.label ?? messages({ key: "views.panels.column" }))
|
|
68
|
-
: activePanel?.type === "layout"
|
|
69
|
-
? (layout?.label ?? messages({ key: "views.panels.layout" }))
|
|
70
|
-
: activeField && activeFilter
|
|
71
|
-
? messages({
|
|
72
|
-
key: "views.panels.where-field-title",
|
|
73
|
-
values: { relation: activeFilter.label, field: activeField.label },
|
|
74
|
-
})
|
|
75
|
-
: activePanel?.type === "filter" && activeFilter
|
|
76
|
-
? activeFilter.label
|
|
77
|
-
: activePanel?.type === "sort"
|
|
78
|
-
? (sort?.label ?? messages({ key: "views.panels.sort" }))
|
|
79
|
-
: activePanel?.type === "group"
|
|
80
|
-
? (group?.label ?? messages({ key: "views.panels.group" }))
|
|
81
|
-
: activePanel?.type === "groupBy"
|
|
82
|
-
? messages({ key: "views.panels.group-by" })
|
|
83
|
-
: activePanel?.type === "groupSort"
|
|
84
|
-
? messages({ key: "views.panels.sort" })
|
|
85
|
-
: activePanel?.type === "groupDateBy"
|
|
86
|
-
? messages({ key: "views.panels.date-by" })
|
|
87
|
-
: activePanel?.type === "timeScope"
|
|
88
|
-
? (timeScopeConfig?.label ?? messages({ key: "views.panels.time-scope-label" }))
|
|
89
|
-
: activeDateRange
|
|
90
|
-
? (activeDateRange.label ?? messages({ key: "views.panels.date-range-label" }))
|
|
91
|
-
: activePanel?.type === "toggle" && activeToggle
|
|
92
|
-
? activeToggle.label
|
|
93
|
-
: null;
|
|
94
|
-
const panelKey = activePanel?.type === "filter"
|
|
95
|
-
? `filter-${activePanel.key}${activePanel.field ? `-${activePanel.field}` : ""}`
|
|
96
|
-
: activePanel?.type === "toggle"
|
|
97
|
-
? `toggle-${activePanel.key}`
|
|
98
|
-
: activePanel?.type === "dateRange"
|
|
99
|
-
? `dateRange-${activePanel.key}`
|
|
100
|
-
: activePanel?.type === "column"
|
|
101
|
-
? `column-${activePanel.key}`
|
|
102
|
-
: (activePanel?.type ?? "root");
|
|
103
|
-
if (views.components.CustomizeBody && !perFieldFiltersOnly(props))
|
|
104
|
-
return _jsx(AppCustomizeBody, { ...props, form: sheet ? "phone" : "computer" });
|
|
105
|
-
return (_jsxs("div", { className: cx("flex flex-col", fill && "h-full min-h-0"), children: [_jsx(PanelHeader, { title: activePanel ? (groupStep.title ?? panelTitle) : messages({ key: "views.panels.customize-title" }), onBack: activePanel ? (groupStep.back ?? onBackClick) : undefined, onClose: closeButton ? onClose : undefined, trailing: !activePanel &&
|
|
106
|
-
!view &&
|
|
107
|
-
anyActive && (drawPanelButton(views, {
|
|
108
|
-
own: "shrink-0 text-xs text-(color:--vk-fg-brand) transition-colors",
|
|
109
|
-
frame: "h-auto shrink-0 p-0",
|
|
110
|
-
variant: "ghost",
|
|
111
|
-
size: "sm",
|
|
112
|
-
onClick: clearAll,
|
|
113
|
-
children: messages({ key: "views.panels.clear-all" }),
|
|
114
|
-
})) }), _jsx("div", { className: cx("animate-in fade-in-0 slide-in-from-right-2 duration-(--vk-duration,150ms)", fill && "flex-1 min-h-0 overflow-y-auto overscroll-contain **:data-vs-detail:max-h-none"), children: activePanel?.type === "layout" && layout ? (_jsx(CompactLayoutDetail, { layout: layout })) : views.components.GroupBody && group && customizePageOf(activePanel) === "group" ? (_jsx(AppGroupBody, { group: group, form: sheet ? "phone" : "computer", onDone: () => onOpenPanel(null), onStepChange: groupStep.onStepChange })) : activePanel?.type === "group" && group ? (_jsx(CompactGroupDetail, { group: group, onOpenPanel: onOpenPanel })) : activePanel?.type === "groupBy" && group ? (_jsx(CompactGroupByDetail, { group: group, onBack: () => onOpenPanel({ type: "group" }) })) : activePanel?.type === "groupSort" && group ? (_jsx(CompactGroupSortDetail, { group: group, onBack: () => onOpenPanel({ type: "group" }) })) : activePanel?.type === "groupDateBy" && group ? (_jsx(CompactGroupDateByDetail, { group: group, onBack: () => onOpenPanel({ type: "group" }) })) : activePanel?.type === "sort" && sort ? (_jsx(CompactSortDetail, { sort: sort })) : activePanel?.type === "timeScope" && timeScopeConfig ? (_jsx(CompactTimeScopeDetail, { timeScopeConfig: timeScopeConfig, onBack: () => onOpenPanel(null), registerBackHandler: setBackHandler })) : activeDateRange ? (_jsx(CompactDateRangeDetail, { dateRangeConfig: activeDateRange })) : activeToggle ? (_jsx(CompactToggleDetail, { toggle: activeToggle, onBack: () => onOpenPanel(null) })) : activeField ? (_jsx(CompactFilterDetail, { filter: activeField })) : activeFilter ? (_jsx(CompactFilterDetail, { filter: activeFilter, onOpenField: (field) => onOpenPanel({ type: "filter", key: activeFilter.key, field }), onConverted: sheet ? undefined : () => onOpenPanel({ type: "filters" }) })) : activePanel?.type === "columns" && layout?.columns ? (_jsx("div", { "data-vs-detail": true, className: cx("max-h-96", PANEL_LIST_CLASS), children: _jsx(LayoutColumnsList, { columns: layout.columns, showNewLine: !!layout.columns.newLine?.views.includes(layout.value), onOpenColumn: (id) => onOpenPanel({ type: "column", key: id }), fieldEditor: fieldEditor }) })) : activeColumn && layout?.columns ? (_jsx(PopoverColumnDetail, { column: activeColumn, columns: layout.columns, onDone: onClose ?? (() => onOpenPanel({ type: "columns" })), fieldEditor: fieldEditor })) : activePanel?.type === "filters" ? (_jsx(CompactFilterList, { filters: filters, timeScopeConfig: timeScopeConfig, dateRangeConfigs: dateRangeConfigs, onOpenPanel: onOpenPanel })) : (_jsx(PopoverRootList, { filters: filters, sort: sort, group: group, timeScopeConfig: timeScopeConfig, dateRangeConfigs: dateRangeConfigs, toggles: toggles, layout: layout, onOpenPanel: onOpenPanel, foldFilters: foldFilters })) }, panelKey), !activePanel && viewFoot !== "none" && (view || footClear) && (_jsx(ViewFooter, { view: view, onClear: view ? undefined : footClear, words: viewFoot === "kit" ? "kit" : undefined }))] }));
|
|
7
|
+
const bodyProps = props;
|
|
8
|
+
return _jsx(AppCustomizeBody, { ...bodyProps, form: sheet ? "phone" : "computer" });
|
|
115
9
|
}
|
|
@@ -1,24 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { type Ctx } from "./editor-ctx.js";
|
|
6
|
-
export declare function FilterEditor({ filterTree, at, onDone, onRemoved, }: {
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { FilterPath } from "../../../filters/filter-tree.js";
|
|
3
|
+
import type { FilterTreeConfig } from "../../model.js";
|
|
4
|
+
export declare function FilterEditorHost({ filterTree, at, onDone, onRemoved, }: {
|
|
7
5
|
filterTree: FilterTreeConfig;
|
|
8
6
|
at: FilterPath;
|
|
9
7
|
onDone?: () => void;
|
|
10
8
|
/** A delete took a node away: the outermost one that went, so the pills' keys follow. */
|
|
11
9
|
onRemoved?: (removed: FilterPath) => void;
|
|
12
10
|
}): ReactNode;
|
|
13
|
-
export declare function Excluded(): ReactNode;
|
|
14
|
-
/** A level of rules: the editor's own, a group's or a relation's where; a pending rule held at its end. On a phone
|
|
15
|
-
* each rule stands under its lead, a line between rules. */
|
|
16
|
-
export declare function Level({ ctx, items, rel, join, relation, onAdd, }: {
|
|
17
|
-
ctx: Ctx;
|
|
18
|
-
items: readonly FilterNode[];
|
|
19
|
-
rel: FilterPath;
|
|
20
|
-
join: "and" | "or" | "not";
|
|
21
|
-
/** The relation whose where this level is: its rules name its far fields. */
|
|
22
|
-
relation?: FilterEditorField;
|
|
23
|
-
onAdd: (id: string) => void;
|
|
24
|
-
}): ReactNode;
|