viewkitjs 0.27.0 → 0.29.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 +178 -0
- package/MIGRATION.md +123 -5
- 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 +3 -1
- package/views/dist/cells/cell-format.js +3 -3
- package/views/dist/cells/cell-values.js +9 -10
- package/views/dist/cells/use-cell-format.d.ts +8 -1
- package/views/dist/cells/use-cell-format.js +13 -2
- package/views/dist/contract.d.ts +218 -5
- package/views/dist/contract.js +233 -1
- package/views/dist/controls/alert/alert.d.ts +46 -0
- package/views/dist/controls/alert/alert.js +11 -0
- package/views/dist/controls/alert/looks.d.ts +4 -0
- package/views/dist/controls/alert/looks.js +19 -0
- package/views/dist/controls/alert/tokens.d.ts +92 -0
- package/views/dist/controls/alert/tokens.js +25 -0
- package/views/dist/controls/alert-dialog/alert-dialog.d.ts +50 -0
- package/views/dist/controls/alert-dialog/alert-dialog.js +67 -0
- package/views/dist/controls/alert-dialog/confirm.d.ts +13 -0
- package/views/dist/controls/alert-dialog/confirm.js +11 -0
- package/views/dist/controls/alert-dialog/looks.d.ts +4 -0
- package/views/dist/controls/alert-dialog/looks.js +17 -0
- package/views/dist/controls/alert-dialog/tokens.d.ts +119 -0
- package/views/dist/controls/alert-dialog/tokens.js +32 -0
- package/views/dist/controls/alert-dialog.css +95 -0
- package/views/dist/controls/alert.css +51 -0
- 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/collapsible/collapsible.d.ts +39 -0
- package/views/dist/controls/collapsible/collapsible.js +18 -0
- package/views/dist/controls/collapsible/looks.d.ts +4 -0
- package/views/dist/controls/collapsible/looks.js +5 -0
- package/views/dist/controls/collapsible/map-collapse.d.ts +2 -0
- package/views/dist/controls/collapsible/map-collapse.js +6 -0
- package/views/dist/controls/collapsible/tokens.d.ts +68 -0
- package/views/dist/controls/collapsible/tokens.js +19 -0
- package/views/dist/controls/collapsible.css +83 -0
- package/views/dist/controls/compound-editor/looks.js +1 -1
- package/views/dist/controls/compound-editor/place-parts.js +5 -1
- package/views/dist/controls/controls.d.ts +19 -0
- package/views/dist/controls/controls.js +17 -0
- package/views/dist/controls/customize/customize.d.ts +125 -0
- package/views/dist/controls/customize/customize.js +243 -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 +18 -0
- package/views/dist/controls/customize/map-customize-body.js +160 -0
- package/views/dist/controls/customize/rules.d.ts +23 -0
- package/views/dist/controls/customize/rules.js +19 -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 +58 -0
- package/views/dist/controls/customize/words.js +37 -0
- package/views/dist/controls/customize.css +54 -0
- package/views/dist/controls/date-editor/date-editor.d.ts +2 -1
- package/views/dist/controls/date-editor/looks.js +1 -1
- package/views/dist/controls/date-editor/map-calendar.js +3 -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 +58 -0
- package/views/dist/controls/filter-editor/filter-editor.js +250 -0
- package/views/dist/controls/filter-editor/how.d.ts +23 -0
- package/views/dist/controls/filter-editor/how.js +14 -0
- package/views/dist/controls/filter-editor/map-filter-body.d.ts +33 -0
- package/views/dist/controls/filter-editor/map-filter-body.js +190 -0
- package/views/dist/controls/filter-editor/map-rules.d.ts +101 -0
- package/views/dist/controls/filter-editor/map-rules.js +304 -0
- package/views/dist/controls/filter-editor/parts.d.ts +46 -0
- package/views/dist/controls/filter-editor/parts.js +75 -0
- package/views/dist/controls/filter-editor/rules.d.ts +142 -0
- package/views/dist/controls/filter-editor/rules.js +201 -0
- package/views/dist/controls/filter-editor/tokens.d.ts +83 -0
- package/views/dist/controls/filter-editor/tokens.js +23 -0
- package/views/dist/controls/filter-editor/words.d.ts +74 -0
- package/views/dist/controls/filter-editor/words.js +46 -0
- package/views/dist/controls/filter-editor.css +142 -0
- package/views/dist/controls/group-editor/group-editor.d.ts +56 -0
- package/views/dist/controls/group-editor/group-editor.js +126 -0
- package/views/dist/controls/group-editor/map-group-body.d.ts +19 -0
- package/views/dist/controls/group-editor/map-group-body.js +106 -0
- package/views/dist/controls/group-editor/rules.d.ts +48 -0
- package/views/dist/controls/group-editor/rules.js +41 -0
- package/views/dist/controls/group-editor/tokens.d.ts +15 -0
- package/views/dist/controls/group-editor/tokens.js +6 -0
- package/views/dist/controls/group-editor/words.d.ts +39 -0
- package/views/dist/controls/group-editor/words.js +21 -0
- package/views/dist/controls/group-editor.css +20 -0
- package/views/dist/controls/index.d.ts +45 -3
- package/views/dist/controls/index.js +44 -3
- package/views/dist/controls/inline-input/looks.js +1 -1
- package/views/dist/controls/input/input.js +10 -4
- package/views/dist/controls/internal/editor-parts.d.ts +8 -1
- package/views/dist/controls/internal/editor-parts.js +5 -0
- 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/step-return.d.ts +9 -0
- package/views/dist/controls/internal/step-return.js +27 -0
- 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/links-editor/links-editor.d.ts +5 -3
- package/views/dist/controls/links-editor/links-editor.js +38 -17
- package/views/dist/controls/links-editor/map-links-body.js +4 -1
- package/views/dist/controls/links-editor.css +1 -1
- package/views/dist/controls/menu/map-menu.js +2 -2
- package/views/dist/controls/menu-list/menu-list.d.ts +17 -2
- package/views/dist/controls/menu-list/menu-list.js +25 -16
- package/views/dist/controls/modal/looks.d.ts +4 -0
- package/views/dist/controls/modal/looks.js +25 -0
- package/views/dist/controls/modal/modal.d.ts +69 -0
- package/views/dist/controls/modal/modal.js +62 -0
- package/views/dist/controls/modal/tokens.d.ts +192 -0
- package/views/dist/controls/modal/tokens.js +50 -0
- package/views/dist/controls/modal.css +130 -0
- package/views/dist/controls/notice/notice.d.ts +49 -0
- package/views/dist/controls/notice/notice.js +35 -0
- package/views/dist/controls/notice/tokens.d.ts +99 -0
- package/views/dist/controls/notice/tokens.js +27 -0
- package/views/dist/controls/notice.css +100 -0
- package/views/dist/controls/number-editor/looks.js +1 -1
- package/views/dist/controls/number-editor/number-editor.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/looks.d.ts +4 -0
- package/views/dist/controls/pane/looks.js +11 -0
- package/views/dist/controls/pane/pane.d.ts +67 -0
- package/views/dist/controls/pane/pane.js +99 -0
- package/views/dist/controls/pane/state.d.ts +14 -0
- package/views/dist/controls/pane/state.js +7 -0
- package/views/dist/controls/pane/tokens.d.ts +79 -0
- package/views/dist/controls/pane/tokens.js +22 -0
- package/views/dist/controls/pane.css +104 -0
- 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/picker/rows.d.ts +4 -2
- package/views/dist/controls/picker/rows.js +4 -3
- 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 +56 -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/sort-editor/map-sort-body.d.ts +9 -0
- package/views/dist/controls/sort-editor/map-sort-body.js +81 -0
- package/views/dist/controls/sort-editor/rules.d.ts +48 -0
- package/views/dist/controls/sort-editor/rules.js +24 -0
- package/views/dist/controls/sort-editor/sort-editor.d.ts +58 -0
- package/views/dist/controls/sort-editor/sort-editor.js +180 -0
- package/views/dist/controls/sort-editor/tokens.d.ts +79 -0
- package/views/dist/controls/sort-editor/tokens.js +22 -0
- package/views/dist/controls/sort-editor/words.d.ts +48 -0
- package/views/dist/controls/sort-editor/words.js +25 -0
- package/views/dist/controls/sort-editor.css +96 -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/text-editor.js +1 -5
- package/views/dist/controls/toast/toast.d.ts +79 -0
- package/views/dist/controls/toast/toast.js +101 -0
- package/views/dist/controls/toast/tokens.d.ts +100 -0
- package/views/dist/controls/toast/tokens.js +27 -0
- package/views/dist/controls/toast.css +93 -0
- package/views/dist/controls/tokens.js +38 -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-editor.js +7 -1
- 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 +5 -5
- package/views/dist/display/format.d.ts +6 -0
- package/views/dist/display/format.js +13 -2
- package/views/dist/display/index.d.ts +1 -1
- package/views/dist/display/index.js +1 -1
- package/views/dist/display/options.d.ts +3 -1
- package/views/dist/display/range.d.ts +2 -1
- package/views/dist/display/range.js +4 -1
- package/views/dist/display/use-display-options.d.ts +3 -0
- package/views/dist/display/use-display-options.js +10 -2
- package/views/dist/display/viewer.d.ts +1 -1
- package/views/dist/display/viewer.js +1 -1
- package/views/dist/editors/DateEditor.js +11 -9
- package/views/dist/editors/relation-panel.js +7 -1
- package/views/dist/editors/relation-picker.d.ts +2 -1
- package/views/dist/editors/relation-picker.js +4 -3
- package/views/dist/editors/relation-source.d.ts +4 -1
- package/views/dist/editors/relation-source.js +5 -2
- package/views/dist/field-row/editors/RowNumberEditor.js +2 -2
- package/views/dist/fields/number-edit.d.ts +6 -0
- package/views/dist/fields/number-edit.js +8 -1
- package/views/dist/grid/chrome/GridCellEditors.js +2 -2
- package/views/dist/grid/chrome/GridColumnDateSection.d.ts +4 -3
- package/views/dist/grid/chrome/GridColumnDateSection.js +4 -4
- package/views/dist/grid/chrome/GridColumnDurationSection.js +2 -2
- package/views/dist/grid/chrome/GridColumnMenu.js +6 -4
- package/views/dist/grid/chrome/GridFooter.js +2 -2
- package/views/dist/grid/chrome/GridHeader.js +2 -1
- package/views/dist/grid/chrome/GridNumberEditor.js +2 -2
- package/views/dist/grid/chrome/GridRowCells.js +2 -1
- package/views/dist/grid/chrome/GridTextEditor.js +2 -2
- package/views/dist/grid/chrome/grid-column-menu-items.js +4 -2
- 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/useGridBandFigures.js +2 -2
- package/views/dist/grid/chrome/useGridFittedWidths.d.ts +3 -0
- package/views/dist/grid/chrome/useGridFittedWidths.js +9 -3
- package/views/dist/grid/chrome/useGridKeyboard.d.ts +4 -1
- package/views/dist/grid/chrome/useGridKeyboard.js +5 -2
- package/views/dist/grid/chrome/useGridTableInteractionModel.js +2 -1
- package/views/dist/grid/core/clipboard-model.js +9 -4
- package/views/dist/grid/core/commit-model.d.ts +7 -0
- package/views/dist/grid/core/commit-model.js +5 -1
- package/views/dist/grid/core/editing-controller.js +10 -2
- package/views/dist/grid/core/editing-model.js +3 -7
- package/views/dist/grid/core/undo-owner.d.ts +6 -0
- package/views/dist/grid/core/undo-owner.js +13 -0
- package/views/dist/grid/core/useGridEditing.d.ts +2 -0
- package/views/dist/grid/core/useGridEditing.js +4 -0
- 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 +10 -0
- package/views/dist/looks/index.js +10 -0
- package/views/dist/looks/pieces.js +20 -0
- 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/relation-filters.d.ts +2 -0
- 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 +14 -1
- package/views/dist/panels/quick/model.d.ts +4 -0
- package/views/dist/panels/react/customize-body.d.ts +12 -5
- package/views/dist/panels/react/customize-body.js +41 -13
- package/views/dist/panels/react/customize.d.ts +8 -1
- package/views/dist/panels/react/customize.js +11 -6
- package/views/dist/panels/react/filter/FilterEditor.js +6 -6
- package/views/dist/panels/react/filter/FilterFieldList.js +10 -2
- package/views/dist/panels/react/filter/PhoneFilterEditor.d.ts +8 -2
- package/views/dist/panels/react/filter/PhoneFilterEditor.js +12 -9
- package/views/dist/panels/react/filter/filter-body.d.ts +8 -5
- package/views/dist/panels/react/filter/filter-body.js +21 -7
- package/views/dist/panels/react/filter/filter-part-body.d.ts +4 -1
- package/views/dist/panels/react/filter/filter-part-body.js +3 -1
- package/views/dist/panels/react/panel-sheet.d.ts +5 -1
- package/views/dist/panels/react/panel-sheet.js +6 -2
- package/views/dist/panels/react/panel-step.d.ts +15 -0
- package/views/dist/panels/react/panel-step.js +27 -0
- package/views/dist/panels/react/quick/QuickFiltersPanel.js +1 -0
- package/views/dist/panels/react/sort/SortEditor.d.ts +4 -0
- package/views/dist/panels/react/sort/SortEditor.js +5 -2
- package/views/dist/panels/react/toolbar/ReadyToolbar.d.ts +18 -0
- package/views/dist/panels/react/toolbar/ReadyToolbar.js +93 -4
- package/views/dist/panels/react/toolbar/Toolbar.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarAsideFilter.js +2 -2
- package/views/dist/panels/react/toolbar/ToolbarBarFilter.js +15 -5
- package/views/dist/panels/react/toolbar/ToolbarFilterAdd.d.ts +16 -0
- package/views/dist/panels/react/toolbar/ToolbarFilterAdd.js +50 -0
- package/views/dist/panels/react/toolbar/ToolbarFilterSheet.js +3 -1
- package/views/dist/panels/react/toolbar/ToolbarFilters.d.ts +4 -1
- package/views/dist/panels/react/toolbar/ToolbarFilters.js +38 -23
- 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.d.ts +4 -1
- package/views/dist/panels/react/toolbar/ToolbarQuickFilters.js +2 -2
- package/views/dist/panels/react/toolbar/ToolbarSortPill.d.ts +5 -0
- package/views/dist/panels/react/toolbar/ToolbarSortPill.js +15 -6
- package/views/dist/panels/react/toolbar/panel-part.d.ts +5 -1
- package/views/dist/panels/react/toolbar/panel-part.js +2 -2
- package/views/dist/panels/react/toolbar/use-filter-add.d.ts +16 -0
- package/views/dist/panels/react/toolbar/use-filter-add.js +32 -0
- package/views/dist/panels/react/view-footer.d.ts +1 -1
- package/views/dist/panels/react/views-row/ViewPicker.js +25 -4
- package/views/dist/panels/react.d.ts +1 -0
- package/views/dist/panels/react.js +1 -0
- package/views/dist/panels/settings/filter-groups.d.ts +3 -0
- package/views/dist/panels/settings/filter-groups.js +72 -7
- package/views/dist/panels/settings/filters.d.ts +5 -0
- package/views/dist/panels/settings/filters.js +12 -6
- package/views/dist/panels/settings/group-buckets.js +1 -0
- package/views/dist/panels/views-row/model.d.ts +10 -1
- package/views/dist/provider/ViewsProvider.d.ts +7 -1
- package/views/dist/provider/ViewsProvider.js +50 -6
- package/views/dist/provider/components.d.ts +178 -11
- package/views/dist/provider/context.d.ts +6 -0
- package/views/dist/provider/moment.d.ts +6 -0
- package/views/dist/provider/moment.js +10 -0
- package/views/dist/provider/ports.d.ts +18 -6
- package/views/dist/provider/ports.js +2 -1
- package/views/dist/react.d.ts +2 -2
- package/views/dist/react.js +1 -1
- package/views/dist/selection/SelectionBar.d.ts +2 -16
- package/views/dist/selection/SelectionBar.js +4 -1
- 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 +1499 -73
- package/views/dist/styles.unlayered.css +1497 -70
- package/views/docs/contract.md +56 -23
- package/views/docs/controls/alert-dialog.md +37 -0
- package/views/docs/controls/alert.md +30 -0
- package/views/docs/controls/bulk-bar.md +41 -0
- package/views/docs/controls/choice.md +25 -0
- package/views/docs/controls/collapsible.md +22 -0
- package/views/docs/controls/customize.md +17 -0
- package/views/docs/controls/filter-editor.md +28 -0
- package/views/docs/controls/group-editor.md +11 -0
- package/views/docs/controls/modal.md +55 -0
- package/views/docs/controls/notice.md +32 -0
- package/views/docs/controls/pane.md +25 -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/sort-editor.md +27 -0
- package/views/docs/controls/switch-row.md +18 -0
- package/views/docs/controls/tag-field.md +7 -0
- package/views/docs/controls/toast.md +32 -0
- package/views/docs/controls/toolbar-button.md +31 -0
- package/views/docs/controls/toolbar.md +14 -0
- package/views/docs/guides/atoms.md +2 -2
- package/views/docs/guides/cells.md +3 -3
- package/views/docs/guides/display.md +3 -3
- package/views/docs/guides/looks.md +8 -2
- package/views/docs/guides/ports.md +6 -6
- package/views/docs/guides/selection.md +5 -1
- package/views/docs/guides/the-grid.md +2 -2
- package/views/docs/guides/the-provider.md +21 -2
- package/views/docs/install.md +4 -1
- package/views/docs/reference/cells.md +3 -3
- package/views/docs/reference/controls.md +403 -16
- package/views/docs/reference/display.md +3 -2
- package/views/docs/reference/editors-relation.md +1 -1
- package/views/docs/reference/looks.md +35 -11
- package/views/docs/reference/panels-react.md +11 -10
- package/views/docs/reference/panels.md +9 -7
- package/views/docs/reference/react.md +20 -13
- package/views/docs/reference/selection.md +4 -2
- package/views/docs/reference/views.md +8 -6
- package/views/skills/views/SKILL.md +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,184 @@ Until 0.19.0 ViewKit shipped as three packages; their changes are in [fields/CHA
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [0.29.0] — 2026-11-30
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- `viewkitjs/views/display`: `timeShown(declared?, chosen?)`, whether a date-and-time shows its time: the reader's choice, else the declared `withTime`, else yes. An app drawing its own date line reads the same rule.
|
|
13
|
+
- `viewkitjs/fields`: `exactPresetOf(field, value)`, the preset whose two ends are exactly a range value's, and `rangeShownText(field, value, conventions?)`, the value as a cell shows it: that preset's label, else its numbers as `rangeText` writes them.
|
|
14
|
+
- `viewkitjs/views/controls`: `CONTROLS.QuickFiltersBody`, the Outright quick filters: a strip of the fields, a search past eight values, each value with its mark and its count, one Tab stop over the values, in the one sheet on a phone. Their option Holds (`data-quick-filters-holds`, `one` or `several`) is `QUICK_FILTERS_LOOKS` in `viewkitjs/views/looks`. The body itself is `QuickFilters`, with its rules as `QUICK_FILTERS_RULES`, and its stylesheet `viewkitjs/views/controls/quick-filters.css`.
|
|
15
|
+
- `viewkitjs/views/panels`: a quick filter field may hand its `options` (`ViewsPickerItem`s), and a quick filters' body is handed them, so each value draws its option's mark (a status's step, a person's or a company's face).
|
|
16
|
+
- The message key `views.panels.quick-clear-value`, "Clear filter": what a held value says before its count.
|
|
17
|
+
- `viewkitjs/views/controls`: `BulkBar`, the Outright bulk bar: on a computer a surface floating at the foot of the list that holds it, its count, its verbs as outlined buttons, Delete and More; on a phone the tray, or the pill. Its options (`delete`, `phone`, `picked`) and its look are `BULK_BAR_LOOKS` in `viewkitjs/views/looks`, its stylesheet `viewkitjs/views/controls/bulk-bar.css`.
|
|
18
|
+
- The components map's optional `SelectionBar`, and `CONTROLS.SelectionBar`, which draws the Outright bulk bar wherever ViewKit's `SelectionBar` is called.
|
|
19
|
+
- `viewkitjs/views/selection`: `SelectionBar`'s optional `noun` and `deleteLine`; a verb's optional `more`; an options verb's optional `value`, `empty`, `onEmpty` and `search`, and its `options` may be `ViewsPickerItem`s; a press may hand back `{ words, undo }` (`SelectionDone`) or a promise of one, which the Outright bulk bar says in its Toast.
|
|
20
|
+
- The message keys `views.selection.many` ("{count} {one}" or "{count} {other}"), `views.selection.bar-label` ("{many} selected"), `views.selection.delete-many` ("Delete {many}"), `views.selection.delete-ask` ("Delete {many}?"), `views.selection.noun-one` ("row"), `views.selection.noun-other` ("rows"), `views.selection.bar-count` ("Selected"), `views.selection.clear-the` ("Clear the selection"), `views.selection.delete-button` ("Delete"), `views.selection.cant-use` ("Can't be used now") and `views.panels.toast-region` ("Notifications").
|
|
21
|
+
- `viewkitjs/views/grid.css`: the grid's look stylesheet, which draws the grid's options (`GRID_LOOKS`) worn on a frame round the grid as `data-grid-*`: the header's words, the column lines' pinned edge, the pinned edge's fade, line or divider, the rows' lines, a picked cell's wash, the cell frames' corners and colours, picked rows' tint, compact groups, names underlined, phones as links, a phone kept as typed, the footer's figures value first, and a header, footer or + Add column cell pressed while its menu is open. A grid with no frame round it wears each option's default. Where ViewKit's own Text, Number, Picker, Compound, Values or Date editor draws its own edge, the edited cell's outline stands down. Plain CSS on the contract's names; an app that imports ViewKit's stylesheets one by one imports it after ViewKit's own classes.
|
|
22
|
+
- `viewkitjs/views`: `VK_GRID_TOKENS`, every name the grid's look reads beside the grid's own geometry, each with its kind and the Outright token it stands for. One is new, `--vk-frozen-fade`: the shade a pinned column casts over the columns scrolling under it.
|
|
23
|
+
- `viewkitjs/postgres/definitions`: `buildFieldMap` takes `readUnder`, by kind and field, the name of a condition a lookup or a rollup reads its far records under. Such a field reads through tables keyed `far:<kind>:<name>`, which `reads` names, so you hand it a condition and a list of readable fields of its own: a list can show a related record's name to everyone who sees the row and its other fields only to readers who may see that record. Fields given one name share their tables. A map that names no field is built as before.
|
|
24
|
+
- `viewkitjs/postgres/definitions`: a storage keeps a select, a status or a text of one value as another kind's record, `{ column, from: { kind, value } }`: `column` holds that record's key and the field's value is its `value` column (a status kept as a code table's row id, valued by its code). The code table is declared as a kind, read as `far:<kind>` under the condition you hand for it; the field filters, sorts, groups and counts by that value, and an empty, unmatched, hidden or trashed id reads as no value. A field you declared `notKept` for this reason can now be kept.
|
|
25
|
+
- `viewkitjs/views/controls`: the pressing area, `viewkitjs/views/controls/press.css`, in the ready stylesheet. On a phone a Button under 44px, a Checkbox's box, a Radio's ring, a Tag's remove button, a Switch and an Option drawn as a link take taps from an invisible area 44px round them, never overlapping a neighbour's; on a computer the Switch, the Checkbox's box and the Radio's ring take a little room round them.
|
|
26
|
+
|
|
27
|
+
- `viewkitjs/views/controls`: the TagField, tags typed into the Input's field (Enter or a comma adds one, Backspace on an empty box takes the last off), and the SwitchRow and SwitchRows, a settings list's rows, each with its stylesheet (`tag-field.css`, `switch-row.css`), in the ready stylesheet.
|
|
28
|
+
- `viewkitjs/views/controls`: the Tooltip's and the Sheet's `className`, a class on the tooltip or the sheet itself; a Sheet's head takes a title that isn't words.
|
|
29
|
+
- `viewkitjs/views/controls`: `PickerProps.menuWords`, the words of the Picker's own menus (a row's menu, and on a phone the ⋯ beside its search): a level's search, a sheet's ✕ and Back, the Close row. A level's list in them takes the Picker's own `words`.
|
|
30
|
+
- `CONTROLS.FilterBody` draws a relation rule as a block in the kit's look, on a computer and on a phone: its relation, Any, None or Every where (Every waiting, saying why, until a rule in it narrows), its rules on that relation's fields, Add filter listing those alone, and Delete condition. A rule on a related field's ⋮ offers Any, None and Every; None or Every turns it into the block. Opened on a relation's where, the same head stands over its rules and hands the quantifier back with the level.
|
|
31
|
+
- A group's ⋮ offers Exclude matches (a group joined by And), and an excluded group says so. `FilterEditorProps.excludable`: the filter itself may exclude its matches, an advanced filter's own group.
|
|
32
|
+
- Nothing a filter holds is out of sight in `CONTROLS.FilterBody`: a `not` group, every relation rule, and a rule on a field the kit has no type for (in ViewKit's own words). Created by is a person in the kit's filter editor, and a long text compares by contains, does not contain, empty and not empty.
|
|
33
|
+
- A place's Country in the kit's filter editor, with `parts: true`: a choice of country names, handed as the field's `options` where ViewKit holds the list (VK-735).
|
|
34
|
+
- `viewkitjs/views/controls`: Customize (`useCustomize`, with its rules, words and options). `CONTROLS.CustomizeBody` draws ViewKit's Customize body with it: the view's sections (Layout, Columns, Filter, Sort, Group) as rows saying where they stand, each opening its screen in place; Layout's cards and the layout's own settings (its density and pick-one settings as rows whose choices open in place, its toggles under their sections with a toggle's way back, For you with its own); Columns with a search, shown and hidden, dragged into place, with Reset columns; Filter, Sort and Group drawing the filter, sort and group editors; the shared view's stale note in a Notice. On a computer it stands in the Pane where your app hands a Pane host, and in the toolbar's popover otherwise; on a phone it heads the one sheet, each section's step under its head. Its stylesheet is `viewkitjs/views/controls/customize.css`.
|
|
35
|
+
- `viewkitjs/views/looks`: `CUSTOMIZE_LOOKS`, its options Its head and Columns.
|
|
36
|
+
- `SheetPartsFrom`: a body in the controls' Sheet may hand it the sheet's head and foot.
|
|
37
|
+
- `ViewsComponents.CustomizeBody.stepsAside`: a Customize body may say which lists it can't draw; for those ViewKit draws its own Customize. `CONTROLS.CustomizeBody` steps aside for a column with its own settings, your field editor's rows and a card layout's line breaks.
|
|
38
|
+
- `viewkitjs/views/controls`: the toolbar button, `ToolbarButtonControl`, a default control on Base UI. It is the Button: its ground (ghost, bordered, filled), its words (icon and word, icon, word), its size and its corners are read from the frame around it, a computer's or a phone's, and follow it as it changes, and it says a count, a dot, an empty place, lit, set aside, joined to its neighbours, or a view tab. Inside a toolbar (`InToolbar`) it takes the row's size and form and is one of the toolbar's stops; `useToolbarButtonWorn` reads its options as worn. Its options and looks are `TOOLBAR_BUTTON_LOOKS` on `viewkitjs/views/looks` (nothing set: bordered, 32, icon and word on a computer; filled, 36, round, its icon alone on a phone), its stylesheet `viewkitjs/views/controls/toolbar-button.css`, in the ready stylesheet too. ViewKit's own toolbar still draws its `ToolbarButton` atom: nothing an app draws changes.
|
|
39
|
+
- `ReadyToolbar` and `ToolbarOptions` take `viewName`, `onRenameView`, `onCopyLink`, `onExport` and `exportCount`, handed on to Customize: `CONTROLS.CustomizeBody` draws the view's name (where its head is the view's name, renamed in place where `onRenameView` is handed), Copy link to view, and Export CSV with its count, each only where handed. An app's own `CustomizeBody` is handed them as `name`, `onRename`, `onCopyLink`, `onExport` and `exportCount` on `ViewsCustomizeBodyProps`.
|
|
40
|
+
- `ViewsCustomizeBodyProps.onStepChange`: on a phone, a body tells the level of its own it stands on inside a section, and the sheet's Escape goes back a level.
|
|
41
|
+
- `viewkitjs/views/controls`: `ToolbarControl`, the Outright Toolbar: the row and the filter bar under it, a phone's one line, a list's places standing where its options pick, folding as it narrows (words to icons, view tabs into "+N", filters into "+N filters", the rest into ⋯), one Tab stop with the arrows, Home and End. With it `ToolbarSeparatorControl`, `ToolbarSpacer`, `ToolbarInput`, `ToolbarFolds` and its words (`TOOLBAR_WORDS`). Its 14 options and four looks (Outright, Attio, Attio with the buttons on the right, and the portal's) are `TOOLBAR_LOOKS` in `viewkitjs/views/looks`, and its stylesheet `viewkitjs/views/controls/toolbar.css`.
|
|
42
|
+
- `viewkitjs/views/controls`: `QuickFiltersReminderControl`, the quick filters' reminder at a phone list's foot, drawn in the Toolbar, with its words (`QUICK_FILTERS_REMINDER_WORDS`); its rules join `quick-filters.css`, which reads one new name, `--vk-layer-sticky`.
|
|
43
|
+
- `viewkitjs/postgres`: `SEARCH_INDEX_REASONS.notImmutable`, for a searched field read with a function Postgres won't index (such as `concat_ws`, `concat`, `to_char`, `unaccent` or `now()`), and `SEARCH_INDEX_REASONS.farLabel`, for a relation whose far table's label no index can hold.
|
|
44
|
+
- `viewkitjs/fields`: the message `field.label` (`{ entity, field, label }`), a field a lookup's or a rollup's note names, before it goes into the note. Its English is the label. An app whose labels are its own catalog's keys words them here; an app whose `messages` handles every key exhaustively adds this one.
|
|
45
|
+
- `viewkitjs/fields`: `defineIndex` stamps each lookup and rollup with `names` (`DerivedNames`): the relation, the hops and the far field its note names, each a `NamedField` as the index found it. Like a lookup's `target`, it is never written in a registry.
|
|
46
|
+
- `viewkitjs/views/panels`: the builder's `filterTree.listed`, what a field list shows: its `fields` and, in their places in the person's column order, each column the list can't filter, carrying `disabled` (why, in your words: your capability's reason, a column with no field's, else `views.panels.filter-not-offered`). `listedFieldsOf(filterTree)` reads it, `fields` where it is absent. `FilterEditorField.disabled`.
|
|
47
|
+
- The components map's `ViewsFilterBodyField.disabled`: why no rule can be made on that field. Your `FilterBody` draws it greyed and never writes a rule on it nor puts one back; ViewKit refuses a level that does.
|
|
48
|
+
- The message key `views.panels.filter-fieldless` ("Not a field of this list; a view cannot filter on it."): why a saved view can't filter a column with no field, in the Filter rows and the filter editor's field lists.
|
|
49
|
+
- `CONTROLS.PortsHost` answers the ports an app leaves out: an app that spreads `CONTROLS` and hands no `confirm` asks a row's Delete, and every question ViewKit asks, in ViewKit's alert dialog, not the browser's; one that hands no `toast` sees what ViewKit reports in ViewKit's Toast. An app's own `toast` or `confirm` still wins, and a server render draws neither. This is a new default every app that spreads `CONTROLS` sees.
|
|
50
|
+
- The `PortsHost` slot (`ViewsPortsHostProps`), for an app that draws the missing ports its own way.
|
|
51
|
+
- The toast port's `success(message, { undo })`: a report that can be taken back, shown with Undo in ViewKit's Toast. The confirm request's `detail`: one line under the question.
|
|
52
|
+
- A view's menu is ViewKit's: `useViewMenu` (with `ViewMenuProps`, `ViewMenuShows`, `ViewMenuParts`, `ViewMenuStep`, `ViewMenuWords`) and the rules an app keeping its views uses, `ViewsState`, `viewsAfter`, `copyName`, `canDelete`, `deleteLine` and `columnsLabel`, from `viewkitjs/views/controls`, for an app that draws its own menu. Handed `ask` and `report` it asks and says through your ports; handed `steps`, a phone's menu and what it opens are steps of one Sheet.
|
|
53
|
+
- The views axis's `verbs` (`ViewsViewVerbs`: layouts, the records' noun, a board's columns and one `onChange` taking every `ViewsViewChange`), and each view's `layout`, `changed` and `favorite`. Handed them, `CONTROLS.ViewsListBody` draws a view's whole menu in the Outright look: Rename and New view in the Modal, Edit view, Private view, Save for everyone, Reset, Save as new view, Copy link, Favorite, Duplicate, and Delete, asked through your `confirm` port and said through your `toast` port with Undo. Every word is your messages'. ViewKit moves no view itself: your `onChange` opens the right one (after a delete, an Undo, a create or a duplicate), and `viewsAfter` does it over your views. New view stands only where the axis grows (`onCreate`).
|
|
54
|
+
- `ViewsViewsListBodyProps` gains `verbs`, `onStepChange` and `onHold` (the list holds open while the body asks outside it, the `confirm` port's dialog), and `actions.back` on a step.
|
|
55
|
+
|
|
56
|
+
### Changed
|
|
57
|
+
|
|
58
|
+
- A date-and-time now shows its time by default ("20 Nov, 14:30"): in a grid cell, a field row, a column's printed value and its column menu's Show time, wherever the field's `format.withTime` is left unset. This changes what every app draws for such a field. A field that wants the day alone sets `format: { withTime: false }`; a reader's Show time, and the `withTime` display option, still win over the field. `columnFrom` now carries a field's `withTime: false` onto its column.
|
|
59
|
+
- A range cell and a range field row read as the band's name when the value's ends are exactly one of the field's `presets` ("Small"), with the numbers on hover; any other value still reads as its numbers. The grid's copy writes what the cell shows, and a paste reads a band's name back, in any case (a name two bands share is refused). On hover a band shows its whole value, its code and period included. `rangeText` still writes the numbers.
|
|
60
|
+
- An app that spreads `CONTROLS` now opens these quick filters from the quick filters' button, in place of ViewKit's plain panel. An app that hands its own `QuickFiltersBody` after `CONTROLS` keeps its own.
|
|
61
|
+
- An app that spreads `CONTROLS` now draws the Outright bulk bar where it calls `SelectionBar`, in place of ViewKit's own: in the box that holds the list, at its foot, rather than portalled to the screen's foot; its Delete asks first, then calls `onDelete`; the provider's `selectionBar` placement, `phoneQuery` and `chip` apply to ViewKit's own bar alone. An app that wants ViewKit's own leaves the slot out: `{ ...CONTROLS, SelectionBar: undefined }`.
|
|
62
|
+
- ViewKit's Toast names the region its toasts stand in with the app's words (`views.panels.toast-region`), where Base UI said "Notifications" in English.
|
|
63
|
+
- The ready stylesheet (`viewkitjs/views/styles.css` and `styles.unlayered.css`) now carries the grid's look, after ViewKit's own classes, and declares `--vk-frozen-fade` at the Outright look's value. This changes what every app on the ready stylesheet draws for its grid; the `portal` look's picks, worn on a frame round it (`lookAttrs(GRID_LOOKS, lookPicks(GRID_LOOKS, "portal"))`), come closest to the grid as it was. An app that imports ViewKit's stylesheets one by one sees no change until it imports `viewkitjs/views/grid.css`.
|
|
64
|
+
- `viewkitjs/views/looks`: the grid's option defaults are now the Outright look's: column lines `all`, pinned edge `line`, checkboxes `always`, picked rows `line`, cell corners `round`, hover frame `strong`, groups `titles`, names `hover`, phones `text` and figures `word`. A grid that wears no picks, and `gridLookWorn()` with none, take them; the `attio` look keeps its own picks.
|
|
65
|
+
- Every app on the ready stylesheet: on a phone the small targets above take taps from 44px round them.
|
|
66
|
+
- Every app on the ready stylesheet: the words beside a Checkbox, a Radio and a Switch draw with the label type styles (`viewkitjs/views/controls/choice.css`, now in the ready stylesheet): the label in the small text and the text colour, a note under it in the extra-small text and the subtle colour, and a choice drawn as a card takes its edge and ground.
|
|
67
|
+
- An app that imports ViewKit's control stylesheets one by one adds `viewkitjs/views/controls/press.css` and `viewkitjs/views/controls/choice.css` to get them.
|
|
68
|
+
- The Button, the Checkbox, a Tag's remove button and an Option drawn as a link carry `data-vk-phone` on a phone, as the Switch and the Radio do: an app's own phone rule written as ViewKit's are (`:where([data-vk-phone], [data-vk-phone] *)`) now reaches one of them standing outside any panel too.
|
|
69
|
+
- A Button's own-look dot (`dot: "brand"`) is drawn with `::before`, so on a phone it stays at its top end corner and the Button keeps its pressing area.
|
|
70
|
+
- `viewkitjs/views/looks`: every look named "Mihai's" is named "Outright": the inline input's, the Text editor's, the Values editor's, the Compound editor's, the Number editor's, the Date editor's and the Picker's. Their ids (`mihais`, `mihai`) are unchanged, so a saved pick still finds its look.
|
|
71
|
+
- Every app on `CONTROLS`: a tooltip takes the side, the alignment, the wait (`delayMs`; 0 opens it at once) and the class ViewKit asks for, a date's one second and its start alignment among them.
|
|
72
|
+
- Every app on `CONTROLS`: a popup that holds a list carries `data-popover-chrome="menu"`, which your styles may draw otherwise; it draws as before.
|
|
73
|
+
- An app on the default Sheet (`CONTROLS.Sheet`): it now opens at the height `snap` asks for (`auto` as tall as its content, which an editor's sheet and the selection's ask; `half` at half, with a drag to the top; `peek` low; `full` to the top), and takes its title (words of its own, or words with a mark), named to screen readers by its label where the two differ, a description under its title, and its class.
|
|
74
|
+
- On the bar's part body (`CONTROLS.FilterPartBody`), an actor's rule and a place's Country now open the kit's ways and values, not ViewKit's.
|
|
75
|
+
- On a phone, a rule's ⋯ in the kit's filter editor opens as a step of the same sheet with Back, not a menu sheet on top (one sheet, never a sheet on top).
|
|
76
|
+
- In an app that spreads `CONTROLS`, View settings now opens the kit's Customize in place of ViewKit's own. To keep ViewKit's own:
|
|
77
|
+
|
|
78
|
+
Before: `components={CONTROLS}`
|
|
79
|
+
After: `components={{ ...CONTROLS, CustomizeBody: undefined }}`
|
|
80
|
+
- Customize's popover is 300 px wide by default (`w-75`, was `w-60`, 240 px), the Pane it was designed in: every app that hands `ToolbarOptions` no `widthClassName` sees it, `ReadyToolbar`'s included. Sort's and Filter's popovers keep their width.
|
|
81
|
+
- On a phone, Escape on Customize's group level (Group by's fields, an order's choices) goes back a level instead of closing Customize, in ViewKit's own Customize and in `CONTROLS.CustomizeBody`, whose sort and filter levels go back too.
|
|
82
|
+
- The Toolbar wearing none of its options draws the Outright look: one row at rest, the sort and Filter on its right with their words, the filter bar once a filter is added, the quick filters' button, and on a phone the sort, Filter and View settings on the right of the views. An app that wants Attio's two lines wears the look `attio` (`lookAttrs(TOOLBAR_LOOKS, lookPicks(TOOLBAR_LOOKS, "attio"))`). The looks list Outright first.
|
|
83
|
+
- `viewkitjs/views`: the default English for `views.panels.view-publish` is now "Save for everyone", where it was "Set default for everyone". Customize's foot on a shared view says Reset · Save for everyone, as do `ViewFooter` and `CONTROLS.CustomizeBody`. Every app without its own word for this key sees the new word; an app whose catalog words it keeps its own.
|
|
84
|
+
- `ReadyToolbar`: in Mihai's look, where Clear and Save don't stand on the bar (on a phone, or with no filter), Customize's foot on a shared view now says Reset · Save for everyone, where it said Clear · Save. With no shared view it still offers Clear alone.
|
|
85
|
+
- `viewkitjs/views`: a `command` cell holding a member opens its verbs on one click on the name, as a select's does: the member's chip is drawn inert inside the one trigger, so it no longer opens the member there (`onOpenRelation` and the `RelationLink` atom stand aside in a command cell). A relation, link, email, phone or domain keeps its own control and the ▾ beside it.
|
|
86
|
+
- `viewkitjs/views`: an empty `command` cell handed `commandItems` draws a ▾ that opens its verbs, where it drew nothing before. Without `commandItems` an empty cell still draws nothing.
|
|
87
|
+
- `viewkitjs/postgres`: `searchIndexes` no longer prints an index on an expression that calls a function it knows Postgres won't index; it names the field in `unserved` with `notImmutable`. A relation whose far label no index can hold is now named in `unserved` with `farLabel`, its own column's index still printed; a relation to one record through a link table's lead row names `farLabel` where it named `otherTable`.
|
|
88
|
+
- `viewkitjs/postgres`: a search word reaches a phone through arms an index serves: an international phone whose number holds it, or any other phone whose text as typed holds it, in place of a choice made on each row, which no index served and which made a whole search read every row. A word holding anything but digits and `+` reaches the typed text alone. What a search finds on a phone is unchanged.
|
|
89
|
+
- `viewkitjs/postgres`: `searchIndexes` prints a trigram index on a phone's folded number (when its `parts` keep one) and on its folded text as typed, on the record or on its row's own table, with their statistics, where it named every phone in `unserved`. Run `searchIndexes` again and add them: a search naming a phone then reads through them and the other fields' indexes. `SEARCH_INDEX_REASONS.phone` is no longer given and stays exported.
|
|
90
|
+
- `viewkitjs/postgres`: on a page, a search word on a phone kept in a row of its own, three characters or more, counts its rows through those indexes first, as a text kept in a row does.
|
|
91
|
+
- `viewkitjs/fields`: a lookup's and a rollup's note (`derivedReason`, and `lockReason` for them) names its fields by their labels, through `field.label`, where the field came through the index: "From the linked Company: Country" where it read "From the linked company: country", and "The latest Scheduled start over Calls" where it read "The latest scheduledStartAt over calls". A field outside the index, or a part it couldn't reach, keeps the words it had. This changes the lock's hover and the grid's refusal for every app whose fields come through `defineIndex`.
|
|
92
|
+
- The filter editor's field lists (Filter, +, a filter's field, the advanced filter's editor and the phone's sheet) show a column the list can't filter greyed with its reason, in its place, as the Filter panel's rows do, where they left it out. A press on it picks nothing. Your `FieldsBody` and `FilterBody` are handed it with `disabled`, and a pick of it writes nothing. `filterEditorFields` and `filterTree.fields`, what a rule may name, are unchanged.
|
|
93
|
+
- A filter on the bar whose one value it can only draw by its stored key (a person, an actor or a record your app hasn't named yet, such as after a reload) asks your `filterData.onValuesWanted` once for that field, as opening its filter row does (a related record's field: `relationFilters.farValues.onWanted`), and draws the name once you hand the value in `knownValues` and its name in `knownLabels` (a related record's field: `farValues.values` and `labels`). An app that hands no `onValuesWanted` sees no change.
|
|
94
|
+
- `viewkitjs/views/panels`: `drawsUnnamedValue(filter)`, whether `filterValueLabel` draws a filter's value by its stored key.
|
|
95
|
+
- The builder words that reason through your messages (`filterData.messages`, else your resolver), where it drew `VIEW_FIELDLESS_FILTER_REASON`'s English in every language. The constant stays, as the key's English.
|
|
96
|
+
- `toast` is an optional port. `useViews().ports.toast` is always there: ViewKit's Toast through `PortsHost`, or one that draws nothing.
|
|
97
|
+
- An app that hands its own `toast` and `confirm` (Atlas) sees no change. The portal hands a `toast`, no `confirm`, and doesn't spread `CONTROLS`, so it sees no change either: a row's Delete still asks in the browser's confirm, as before. An app's own toast that ignores `success`'s `{ undo }` shows the report without Undo.
|
|
98
|
+
- On a phone, a view's ⋯ in `CONTROLS.ViewsListBody` opens its menu as a step of the same sheet with Back, not a menu sheet on top (one sheet, never a sheet on top), and Rename, New view and the delete question opened from it turn the same sheet.
|
|
99
|
+
|
|
100
|
+
### Fixed
|
|
101
|
+
|
|
102
|
+
- `viewkitjs/views/controls`: the Picker's search box and rows, and the Clear all of a several-values Picker, no longer throw on open where the page or a test (Testing Library's `user-event`) made `HTMLElement.prototype.focus` a getter with no setter.
|
|
103
|
+
- `viewkitjs/views/controls`: one ⌘Z (Ctrl+Z) takes back a typed run in the Input's long text (`multiline`), where it took back one letter a press in Chromium when the box was handed a `value`: a place's street lines in `CONTROLS.PartsBody`, and every long-text Input your app draws. A value set from outside still draws in the box. The box's default value now stays what it was first drawn with, which only a form's reset reads: an app that resets an uncontrolled long-text Input by changing its `defaultValue` sets `value` instead.
|
|
104
|
+
- A view's menu in `CONTROLS.ViewsListBody`, and the ⋯ beside the search of `CONTROLS.Picker` on a phone, now say your app's words where they said ViewKit's English: the Close row, a sheet's ✕ and Back and a level's search, from `views.panels.close`, `views.panels.back` and `views.menus.search`. It showed where your app turns on the menu list's Close row. No new message key.
|
|
105
|
+
- `viewkitjs/views/controls`: in the Picker on a computer, ↓ and ↑ pass a greyed row by, as a greyed row promises. A bare ↓ in a list whose first row can't be picked (a sorted field in the sort's fields) lit that row, and Enter then picked nothing; it now lights the first row that can be picked. This changes every Picker an app draws, `CONTROLS`' included.
|
|
106
|
+
- A click on a date in the grid selects its cell even when the press comes in the same moment the pointer jumps onto the date. The date's full form, shown on a slow hover, could replace the date's element mid-press, and the browser then fired no click.
|
|
107
|
+
- `viewkitjs/views/controls`: on a phone, a rule's ⋯ and a group's ⋯ in `CONTROLS.FilterBody` turn the sheet to a step whose rows stand in its body, under its head, on the sheet's ground, drawn as the sheet's card rows like Customize's. They drew as a floating menu's rows, so the sheet lost its ground and the first row ran up under its head: Convert to group, and a group's only choice, Exclude matches, couldn't be seen or pressed. This changes the filter editor on a phone for every app that draws `CONTROLS.FilterBody`.
|
|
108
|
+
- `viewkitjs/postgres`: `searchIndexes` names a lookup read through a relation in `unserved`, with the `otherTable` reason, where it threw ("render: a fragment asks for a part its statement doesn't write") and printed nothing. The other searched fields' indexes and statistics print as they would without it.
|
|
109
|
+
- `viewkitjs/postgres`: a kind whose label is a name kept in parts (full, given, family) has its label written in functions Postgres can index, so the trigram index `searchIndexes` prints for a relation to that kind is one `CREATE INDEX` accepts, and a search through the relation reads the far table through it instead of whole for each word. The label reads as before: the full name, else the given and family names that aren't blank, joined by one space. A lookup of a name sorts by the same text, written the same way.
|
|
110
|
+
- The filter editor's field list names a place's parts ("Location · Country") in your words where you hand them as the panels' resolver (the ready toolbar's `resolve`, or the provider's messages), not only in `filterData.messages`.
|
|
111
|
+
- The ready toolbar's kit arrangement contains its own inline size: its width comes from where it stands, never from what its lines hold. Inside a holder sized from its content (an app's main beside a sidebar, a flex item with no `min-width: 0`) its row now gives way as the page narrows (words to icons, view tabs into "+N", the rest into ⋯) instead of holding its whole width and pushing the page sideways. An app that wrapped the ready toolbar in its own `contain: inline-size` box can drop it. The row arrangement (`arrangement: "row"`) is unchanged, and so is `ToolbarControl`, whose holder gives it its width.
|
|
112
|
+
- A money or phone cell edited through `CONTROLS.NumberBody` or `CONTROLS.TextBody` in a narrow column now grows past the cell, as ViewKit's own editor does, so the currency or the country and the whole figure typed show together; an empty amount keeps room to type in. A right-aligned column grows leftward. A cell wide enough opens exactly as before.
|
|
113
|
+
- In the Picker on a computer, a typed search lights its first match that can be picked, so Enter takes it: a greyed first match is passed over, and where nothing matches, Enter creates the typed value as a press on Create does.
|
|
114
|
+
|
|
115
|
+
## [0.28.0] — 2026-11-29
|
|
116
|
+
|
|
117
|
+
### Added
|
|
118
|
+
|
|
119
|
+
- `ToolbarSortPill`'s `row`: Sort on a toolbar row, holding the sort (lit, counted, opening the sort editor).
|
|
120
|
+
- `ToolbarFilterAdd`: Filter on a toolbar row's right. It opens your field list (`FieldsBody`) as Filter on the bar does, and a pick adds the filter to the bar, or holds a yes/no until its value is picked.
|
|
121
|
+
- `ReadyToolbarProps.sortFilter` (`"right" | "bar"`): where the sort and Filter stand in the kit arrangement.
|
|
122
|
+
- `ReadyToolbarProps.bar` (`"added" | "always"`): when the kit arrangement's filter bar shows.
|
|
123
|
+
- `ToolbarFilters`' `emptyPlace` (`false`: nothing until a filter is set or held, where Filter stands on the row).
|
|
124
|
+
- `ToolbarQuickFilters`' `word` (`null`: its icon alone).
|
|
125
|
+
- `viewkitjs/views/controls`: the filter editor (`useFilterEditorParts`, `FilterPartBody`, with its rules, ways and words). `CONTROLS.FilterBody` draws ViewKit's filter body with it: each rule Where or its join, its field, how it compares and its value in its type's own box, ⋮ to make a group or delete it; groups three deep; Add filter and Clear all filters; a set-aside rule in its place, saying why; ViewKit's own words and value body for a way the kit has no word for; on a phone, each box's list, a date and Add filter as a step of the same sheet. `CONTROLS.FilterPartBody` draws a filter's way and value on the bar. Its stylesheet is `viewkitjs/views/controls/filter-editor.css`.
|
|
126
|
+
- `ViewsFilterBodyField.options`: a choice field's values, where ViewKit holds them, for a filter body or part to list.
|
|
127
|
+
- `ViewsFilterBodyProps.ruleWords`: ViewKit's own words for a rule's field, way and value.
|
|
128
|
+
- `ViewsFilterBodyProps.onStepChange`: on a phone, a filter body may tell the sheet it stands on a step of its own; the sheet's head shows the step's title and Back, and Escape goes back a step.
|
|
129
|
+
- `viewkitjs/views/controls`: the sort editor (`useSortEditorParts`, `sortableFields`, with its rules and words). `CONTROLS.SortBody` draws ViewKit's sort body with it: the rules in order, each its grip, its field and its direction in a Select, and ×; Add sort at the foot where the pill has no +, and Clear all sorts; the set-aside sorts after the rules, each re-pointed, put back or deleted; on a phone, a card per rule, and Add sort, a rule's direction and a set-aside sort's field as a step of the same sheet. Its stylesheet is `viewkitjs/views/controls/sort-editor.css`.
|
|
130
|
+
- `ViewsSortBodyProps.onStepChange`: on a phone, a sort body may tell the sheet it stands on a step of its own; the sheet's head shows the step's title and Back, and Escape goes back a step.
|
|
131
|
+
- `useSortEditor` (`viewkitjs/views/panels/react`) also returns `title` and `escapeBack()`, and its `head` gains `back` while an app's `SortBody` stands on a step: a holder of its own draws the step's title and Back, and calls `escapeBack()` on Escape before closing.
|
|
132
|
+
- `ViewsProvider`'s `now`: the moment every date counts from (relative dates, a short date's year, the column menu's date samples, the date editors' quick days and today). Hand the server's, and the server and the browser draw the same text on first load. Absent, the provider reads the clock after mount, then once a minute and when the tab comes back into view, never while rendering; until the first read a date that needs it draws its full form. A handed moment is kept as it is. A new moment redraws only what draws a date (the date cells, the column menu's date samples, the date editors and the calendar), never the rest of a view, and `useViews()` doesn't carry it.
|
|
133
|
+
- `formatDate` (`viewkitjs/views/cells`) takes the app's presentation as an optional sixth argument.
|
|
134
|
+
- `viewkitjs/views/controls`: the Notice (`Notice`, `NOTICE_ICONS`), a sentence set into the page on its meaning's ground, with its actions, a title, Retry and a ×; its root marks a phone (`data-vk-phone`).
|
|
135
|
+
- `viewkitjs/views/controls`: the Alert (`Alert`), what an app asks before something happens, and the alert dialog it stands in (`AlertDialog`, `AlertDialogPanel`), the Sheet on a phone where the Alert's Opens as is `sheet`. `confirm()` asks from anywhere through the one `AlertDialogHost`, one question at a time: a newer one answers the older one no.
|
|
136
|
+
- `viewkitjs/views/controls`: the Modal (`Modal`), what holds a form, a quick create or a long read: every way out asks first while something typed is unsaved, nothing closes it while it saves, and on a phone it is the Sheet at full height.
|
|
137
|
+
- `viewkitjs/views/controls`: the Toast (`Toast`, `useToast`, `createToastManager`, `ToastShown`), one at a time, a working toast turned into its result where it stands, Undo and ⌘Z while it shows. It stays `--vk-toast-duration`, four seconds where nothing declares it.
|
|
138
|
+
- Each control that draws a word takes `words`, the English as its defaults: `NOTICE_WORDS`, `ALERT_WORDS`, `ALERT_DIALOG_WORDS`, `MODAL_WORDS`, `TOAST_WORDS` (`ToastShown`'s as its `said`, since its `words` are what it says).
|
|
139
|
+
- The stylesheets `notice.css`, `alert.css`, `alert-dialog.css`, `modal.css` and `toast.css`; new names `--vk-backdrop-modal-*`, `--vk-backdrop-modal-veil-*`, `--vk-backdrop-alert-*`, `--vk-backdrop-veil*`, `--vk-border-modal-edge`, `--vk-border-modal-ring`, `--vk-blur-lg` and `--vk-container-*`.
|
|
140
|
+
- `viewkitjs/views/looks`: `ALERT_LOOKS` (with its looks Even, Plain and Marked), `ALERT_DIALOG_LOOKS` and `MODAL_LOOKS` (with its looks Framed and Outlined). The Alert's buttons stand at the end by default, and the alert dialog's corners are smooth.
|
|
141
|
+
- `viewkitjs/views/controls`: the Pane, a list's panel at its right edge on a computer (`Pane`, `PaneHead`, `PaneBody`, `PaneFoot`, `PaneTitle`, `PaneClose`, and its holder `usePane` with `paneAfter`), and the Collapsible (`Collapsible`, `CollapsibleTrigger`, `CollapsiblePanel`), with their stylesheets `pane.css` and `collapsible.css`. An app that imports the controls' stylesheets one by one adds both.
|
|
142
|
+
- `viewkitjs/views/controls`: `CONTROLS.Collapse` draws the Collapsible, so an app that spreads `CONTROLS` hands no `Collapse` of its own. Its content fades in and out with its height by default. An app's own `Collapse`, spread after `CONTROLS`, still wins.
|
|
143
|
+
- `viewkitjs/views/looks`: `PANE_LOOKS` (where it stands, its corners, smoothing, shadow, edge, gap (8 by default) and padding) and `COLLAPSIBLE_LOOKS` (its content, fading by default, and its curve).
|
|
144
|
+
- `viewkitjs/views`: `numberEditInitial`, what a number editor opens on: the number, or a stored decimal's text read as one (`"120.50"` → 120.5); anything else opens empty.
|
|
145
|
+
- `viewkitjs/views/controls`: `PickerItem.also`, words the Picker's search finds a row by besides its name, never drawn; an exact one comes first.
|
|
146
|
+
- `viewkitjs/views/controls`: the group editor (`useGroupEditor`, with its rules and words). `CONTROLS.GroupBody` draws ViewKit's group body with it: Group by, Order, Direction, a date field's Date step and Hide empty groups, each opening its choices in place; the groups with their Switch, dragged into your own order; Remove grouping. On a phone each level is a step of the same sheet. Its stylesheet is `viewkitjs/views/controls/group-editor.css`.
|
|
147
|
+
- `ViewsGroupEntry.count`: how many records a group holds, where the list counts them.
|
|
148
|
+
- `ViewsGroupBodyProps.onStepChange`: a group body may tell what holds it the level it stands on; ViewKit's Customize shows its name and Back in its head.
|
|
149
|
+
- The menu list's rows (`MenuList`, `MenuListPanelRows`) take `words` (`MenuListWords`): a grip's name, how the rows move, a move said, and a Switch's two words.
|
|
150
|
+
|
|
151
|
+
### Changed
|
|
152
|
+
|
|
153
|
+
- The ready toolbar handed no arrangement draws one row at rest, the views and Customize at its start, then Sort and Filter on its right with their words, the quick filters' button and the search, each its icon alone, and New. Sort holds the list's sort: lit while one stands, a view's saved one included, it opens the sort editor to change or remove the rules, and with none, the fields. The filter bar is the filters' line: it comes under the row only while a filter stands or waits for its value, holding the filters, + and Clear and Save; while it doesn't, an unsaved change waits in Customize's foot (Clear and Save; on a shared view, with Customize's dot), as on a phone. With `severalSorts={false}`, Sort keeps its one-rule list. On a phone, in either form, the quick filters' button stands after Filter and before Customize (it stood after Customize). A second axis of views stands on the bar's line, which then always shows. To keep the old two lines, the filter bar always drawn with its empty Sort and Filter:
|
|
154
|
+
|
|
155
|
+
```tsx
|
|
156
|
+
<ReadyToolbar {...list} columns={columns} /> // now: one row, the bar for the filters
|
|
157
|
+
<ReadyToolbar {...list} columns={columns} sortFilter="bar" bar="always" /> // the old two lines
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
The `row` arrangement is unchanged.
|
|
161
|
+
- `FieldViewerContext.now` is optional: old `context.now: Date` → new `context.now?: Date`, absent until the provider has a moment. A `presentation` whose `calendarDay` or `instant` reads it handles a viewer with none; its relative formatters are only called with one. To keep a fixed moment, hand it as `<ViewsProvider now={…}>`, not through `presentation`.
|
|
162
|
+
- `viewerFrom`'s third argument also takes `null`: a viewer with no moment yet. Left out, it is still the current moment.
|
|
163
|
+
- With no `now` handed, the provider keeps a one-minute timer and a `visibilitychange` listener while mounted. A test that runs every timer (`vi.runAllTimers()`) under a provider with no `now` never ends, and one that counts document listeners sees the provider's: hand `now` in such tests. A test that counts renders sees the provider's first read of the clock, and each minute's, redraw the dates and nothing else.
|
|
164
|
+
- `viewkitjs/views/controls`: on a phone, the Links editor opens a link's roles, and a link's fields, as a step of its own Sheet with Back, never a second Sheet on top. `useLinksEditor`'s parts hand the step's `title` and a `head` with `onBack`; a shell that draws the Sheet itself shows them, and takes Escape on a step as Back (`head.onBack`). `CONTROLS.LinksBody` tells ViewKit's sheet of the step (`onStepChange`).
|
|
165
|
+
- In an app that spreads `CONTROLS`, Customize's Group now draws the group editor in place of ViewKit's own group pages. To keep ViewKit's own pages:
|
|
166
|
+
|
|
167
|
+
Before: `components={CONTROLS}`
|
|
168
|
+
|
|
169
|
+
After: `components={{ ...CONTROLS, GroupBody: undefined }}`
|
|
170
|
+
|
|
171
|
+
### Fixed
|
|
172
|
+
|
|
173
|
+
- With two editable grids on one page, ⌘Z undoes only in the grid holding the focus, or, with the focus in neither, in the one edited last. A grid inside a drawer or a sheet still leaves ⌘Z to the dialog, as before.
|
|
174
|
+
- A column whose id holds `:` shows its pending value on its own row: a cell's key is read back whole, never split at a character.
|
|
175
|
+
- The controls' date body (`useDateEditor`, its `<piece>/date-editor.tsx`) imports nothing from the provider again: ViewKit's own date body is handed `today` from the provider's moment by the date editor, through its map, and a page that draws the body itself and hands no `today` takes the browser's day. A design app that builds the controls' bodies alone (its `tsc` rooted at the views source) no longer reaches the contract and fields' source through it.
|
|
176
|
+
- Nothing in the grid reads the clock while rendering, so a fresh Next.js app (Cache Components on) builds a page with the grid and no `<Suspense>`.
|
|
177
|
+
- The column menu's date samples go through the app's `presentation` and count from the provider's moment, as the cells do.
|
|
178
|
+
- The date editors' quick days and today, and the calendar's today, count from the provider's moment.
|
|
179
|
+
- A number, money or percent field stored as decimal text (`"120.50"`) opens its editor on the amount in a grid cell and a field row, where it opened empty; closing it untouched writes nothing.
|
|
180
|
+
- `viewkitjs/views/editors/relation`: a remote list says it is searching from the keystroke, not when the search leaves after its pause, so an Enter pressed before the typed query answers picks or links nothing from the last query's rows. In `CONTROLS`' Picker and links body, the list shows Searching… with no rows from the keystroke, 200 ms sooner than before; ViewKit's own list keeps the last rows under Searching… and Enter there picks nothing until the answer. No next page is asked for a query not yet answered.
|
|
181
|
+
- The Number editor's currency and unit lists find a currency or a unit by its code (GBP) as by its name.
|
|
182
|
+
- `viewkitjs/views`: while a remote relation list searches, an app's own Picker and Links body are handed only the held records that match the typed query, never a row of the last answer, and a pick of any other record is refused.
|
|
183
|
+
- `viewkitjs/views/controls`: on a phone, leaving a list step (Back, Escape, or a pick that ends the list) puts the focus back on the row or button that opened it, in the Links, Values and Compound editors and the sort, filter and group editors.
|
|
184
|
+
- `viewkitjs/views`: the Links editor shows no record to add and lights none while a remote list searches, so its "Searching…" stands right under the linked records, on a computer and a phone; a press on a phone can no longer link a record of the last answer.
|
|
185
|
+
|
|
8
186
|
## [0.27.0] — 2026-11-27
|
|
9
187
|
|
|
10
188
|
### Added
|
package/MIGRATION.md
CHANGED
|
@@ -252,15 +252,15 @@ import { CONTROLS } from "viewkitjs/views/controls";
|
|
|
252
252
|
It holds `Button`, `Tooltip`, `Popover`, `Sheet`, `Input`, `Checkbox` and `Menu`; the Text editor
|
|
253
253
|
(`TextBody`); the Picker (`Picker`, and `FieldsBody`, the sort's and the filter's field lists); the Date editor
|
|
254
254
|
(`DateBody`); the month the filter panel picks a day in (`Calendar`); the Compound editor (`PartsBody`) for
|
|
255
|
-
a name, a place and a range; the Number editor (`NumberBody`) for a number, money or a percent; the Values editor (`ValuesBody`) for several emails, phones, links or domains; the Links editor (`LinksBody`) for a relation whose field declares `links`, where an app that hands none edits it in the Picker;
|
|
255
|
+
a name, a place and a range; the Number editor (`NumberBody`) for a number, money or a percent; the Values editor (`ValuesBody`) for several emails, phones, links or domains; the Links editor (`LinksBody`) for a relation whose field declares `links`, where an app that hands none edits it in the Picker; the views list (`ViewsListBody`), what the view switcher opens, where an app that hands none keeps ViewKit's own list; and the group editor (`GroupBody`), what Customize's Group opens, where an app that hands none keeps ViewKit's own group pages; and the Collapsible (`Collapse`), the fold a grid's group, a field's note and the selection sheet open in; and `PortsHost`, which answers the `toast` and `confirm` ports an app leaves out with ViewKit's Toast and alert dialog. **An app that spreads it hands no `Calendar`:** the filter panel's date, its date
|
|
256
256
|
ranges and its custom time scope open ViewKit's own month. An app's own `Calendar` or `RangeCalendar` atom is
|
|
257
|
-
kept. You still hand `
|
|
257
|
+
kept. You still hand `AppIcon` and `Markdown`, and `Command` unless you set `menus: "menu"`: the
|
|
258
258
|
grid's + Add column and a group's menu search still draw through it. `CONTROL_ATOMS` (0.23) does the same for the atoms
|
|
259
259
|
(`Tag`, `StatusBadge`, `CellMore`): `atoms={{ ...CONTROL_ATOMS, ...ownAtoms }}`.
|
|
260
260
|
|
|
261
261
|
The controls' stylesheet is in `viewkitjs/views/styles.css` (step 9). An app that imports the controls'
|
|
262
262
|
stylesheets one by one instead imports `smooth.css` first, then each control's own, and now adds
|
|
263
|
-
`picker.css`, `text-editor.css`, `date-editor.css`, `compound-editor.css`, `flag.css`, `number-editor.css`, `values-editor.css`, `radio.css`, `links-editor.css`
|
|
263
|
+
`picker.css`, `text-editor.css`, `date-editor.css`, `compound-editor.css`, `flag.css`, `number-editor.css`, `values-editor.css`, `radio.css`, `links-editor.css`, `sort-editor.css`, `views-list.css`, `filter-editor.css`, `group-editor.css`, `pane.css`, `collapsible.css` and `toolbar-button.css`.
|
|
264
264
|
|
|
265
265
|
What an app meets when it moves from its own editors, or ViewKit's older ones, to these:
|
|
266
266
|
|
|
@@ -347,6 +347,9 @@ hydrates.
|
|
|
347
347
|
|
|
348
348
|
**Toolbar and panels**
|
|
349
349
|
|
|
350
|
+
- An app that spreads `CONTROLS` and hands no `confirm` asks a row's Delete in ViewKit's alert dialog, not the
|
|
351
|
+
browser's, and one that hands no `toast` sees ViewKit's reports in ViewKit's Toast. `toast` is optional now. An
|
|
352
|
+
app's own ports win.
|
|
350
353
|
- Inside `ToolbarSlotProvider`, the views part and Save draw through your `ToolbarButton` (views 0.10).
|
|
351
354
|
`slot={{ appFrame: false }}` keeps the old way.
|
|
352
355
|
- Drag announcements come from your messages and name a row by its label (views 0.10).
|
|
@@ -403,8 +406,8 @@ Every word the default controls draw is a message, so an app whose catalog words
|
|
|
403
406
|
from them. The one exception is Base UI's own: its combobox carries a hidden "Dismiss" button for screen
|
|
404
407
|
readers, which ViewKit can't word.
|
|
405
408
|
|
|
406
|
-
|
|
407
|
-
what the new editors say:
|
|
409
|
+
Five keys kept their names and changed their English: four so the older editors and a field's part rows
|
|
410
|
+
say what the new editors say, and Customize's save so every Customize's foot says Reset · Save for everyone:
|
|
408
411
|
|
|
409
412
|
| Key | Was | Is |
|
|
410
413
|
| --- | --- | --- |
|
|
@@ -412,6 +415,7 @@ what the new editors say:
|
|
|
412
415
|
| `views.editors.name-family` | Family name | Last name |
|
|
413
416
|
| `views.editors.place-country-search` | Search countries | Search for a country |
|
|
414
417
|
| `type.label` (fields 0.16) | Rich text, Percentage, User, Location | Long text, Percent, Member, Place |
|
|
418
|
+
| `views.panels.view-publish` | Set default for everyone | Save for everyone |
|
|
415
419
|
|
|
416
420
|
The keys added since views 0.9 and fields 0.15, with their English. A word in braces is a value ViewKit hands
|
|
417
421
|
the message.
|
|
@@ -531,12 +535,124 @@ The Links editor (`CONTROLS.LinksBody`):
|
|
|
531
535
|
| `views.editors.links-all-linked` | Everything is linked. |
|
|
532
536
|
| `views.editors.links-done` | Done |
|
|
533
537
|
|
|
538
|
+
The sort editor (`CONTROLS.SortBody`):
|
|
539
|
+
|
|
540
|
+
| Key | English |
|
|
541
|
+
| --- | --- |
|
|
542
|
+
| `views.panels.sort-field` | Field |
|
|
543
|
+
| `views.panels.sort-clear-all-sorts` | Clear all sorts |
|
|
544
|
+
| `views.panels.sort-by-named` | the sort by {label} |
|
|
545
|
+
|
|
534
546
|
The views list (`CONTROLS.ViewsListBody`; its other words are ViewKit's own list's keys, worded already):
|
|
535
547
|
|
|
536
548
|
| Key | English |
|
|
537
549
|
| --- | --- |
|
|
538
550
|
| `views.panels.views-find` | Find a view |
|
|
539
551
|
|
|
552
|
+
The ports' own (`CONTROLS.PortsHost`):
|
|
553
|
+
|
|
554
|
+
| Key | English |
|
|
555
|
+
| --- | --- |
|
|
556
|
+
| `views.panels.toast-undo` | Undo |
|
|
557
|
+
| `views.panels.alert-failed` | That didn't go through. Nothing changed. |
|
|
558
|
+
| `views.panels.toast-region` | Notifications |
|
|
559
|
+
|
|
560
|
+
A view's menu and what it opens (`CONTROLS.ViewsListBody` where the axis hands `verbs`, and `useViewMenu`; its other words are keys worded already: `views.panels.copy-link`, `views.panels.view-reset`, `views.panels.view-save`, `views.panels.view-create`, `views.panels.layout`, `views.panels.back`):
|
|
561
|
+
|
|
562
|
+
| Key | English |
|
|
563
|
+
| --- | --- |
|
|
564
|
+
| `views.panels.view-rename` | Rename… |
|
|
565
|
+
| `views.panels.view-rename-short` | Rename |
|
|
566
|
+
| `views.panels.view-edit` | Edit view… |
|
|
567
|
+
| `views.panels.view-private-toggle` | Private view |
|
|
568
|
+
| `views.panels.view-save-everyone` | Save for everyone |
|
|
569
|
+
| `views.panels.view-save-new` | Save as new view… |
|
|
570
|
+
| `views.panels.view-copy-link-short` | Copy link |
|
|
571
|
+
| `views.panels.view-favorite` | Favorite |
|
|
572
|
+
| `views.panels.view-unfavorite` | Unfavorite |
|
|
573
|
+
| `views.panels.view-duplicate` | Duplicate view |
|
|
574
|
+
| `views.panels.view-duplicate-short` | Duplicate |
|
|
575
|
+
| `views.panels.view-delete` | Delete view |
|
|
576
|
+
| `views.panels.view-keep-one` | A list keeps one view |
|
|
577
|
+
| `views.panels.view-unsaved` | Unsaved changes |
|
|
578
|
+
| `views.panels.view-this` | This view |
|
|
579
|
+
| `views.panels.view-rename-title` | Rename view |
|
|
580
|
+
| `views.panels.view-name` | Name |
|
|
581
|
+
| `views.panels.view-create-action` | Create view |
|
|
582
|
+
| `views.panels.view-delete-title` | Delete {name}? |
|
|
583
|
+
| `views.panels.view-deleted` | {name} was deleted |
|
|
584
|
+
| `views.panels.view-copy-name` | Copy of {name} |
|
|
585
|
+
| `views.panels.view-delete-stays` | The {records} in it stay as they are. |
|
|
586
|
+
| `views.panels.view-delete-goes` | The view goes for everyone who uses it. |
|
|
587
|
+
| `views.panels.view-columns` | {layout} columns |
|
|
588
|
+
|
|
589
|
+
The filter editor (`CONTROLS.FilterBody`, `CONTROLS.FilterPartBody`; its other words are ViewKit's own editor's keys, worded already):
|
|
590
|
+
|
|
591
|
+
| Key | English |
|
|
592
|
+
| --- | --- |
|
|
593
|
+
| `views.panels.filter-group-list` | Group |
|
|
594
|
+
| `views.panels.filter-rule-named` | {label}'s rule |
|
|
595
|
+
| `views.panels.filter-way-named` | How {label} compares |
|
|
596
|
+
| `views.panels.filter-choose-date` | Choose a date |
|
|
597
|
+
| `views.panels.filter-type-number` | Type a number |
|
|
598
|
+
| `views.panels.filter-type-value` | Type a value |
|
|
599
|
+
| `views.panels.filter-from-named` | {label} from |
|
|
600
|
+
| `views.panels.filter-to-named` | {label} to |
|
|
601
|
+
| `views.panels.filter-checked` | Checked |
|
|
602
|
+
| `views.panels.filter-unchecked` | Unchecked |
|
|
603
|
+
| `views.panels.filter-kit-way` | the kit's way in its words, by its value: is any of, less than, any part between… |
|
|
604
|
+
|
|
605
|
+
The group editor (`CONTROLS.GroupBody`; its other words are ViewKit's own group pages' and the sort editor's keys, worded already):
|
|
606
|
+
|
|
607
|
+
| Key | English |
|
|
608
|
+
| --- | --- |
|
|
609
|
+
| `views.panels.group-order` | Order |
|
|
610
|
+
| `views.panels.group-date-step` | Date step |
|
|
611
|
+
| `views.panels.group-order-own` | Your own |
|
|
612
|
+
| `views.panels.group-own-no-direction` | Your own order has no direction |
|
|
613
|
+
| `views.panels.group-no-value` | No value |
|
|
614
|
+
| `views.panels.list-move-keys` | Left arrow for its grip, then up or down arrow to move it |
|
|
615
|
+
| `views.panels.list-move-hold` | Hold, then drag to move it |
|
|
616
|
+
| `views.panels.list-moved` | {label}, {at} of {of} |
|
|
617
|
+
|
|
618
|
+
Customize (`CONTROLS.CustomizeBody`; its other words are ViewKit's own Customize's, its group pages' and the sort editor's keys, worded already):
|
|
619
|
+
|
|
620
|
+
| Key | English |
|
|
621
|
+
| --- | --- |
|
|
622
|
+
| `views.panels.customize-list` | Customize |
|
|
623
|
+
| `views.panels.customize-shown` | Shown in the table |
|
|
624
|
+
| `views.panels.customize-shown-fields` | Shown |
|
|
625
|
+
| `views.panels.customize-hidden` | Hidden |
|
|
626
|
+
| `views.panels.customize-search` | Search columns |
|
|
627
|
+
| `views.panels.customize-find` | Find a column |
|
|
628
|
+
| `views.panels.customize-no-column` | No column is named “{words}” |
|
|
629
|
+
| `views.panels.customize-always-shown` | Always shown |
|
|
630
|
+
| `views.panels.customize-view-name` | The view's name |
|
|
631
|
+
| `views.panels.customize-layout-button` | Layout: {name} |
|
|
632
|
+
| `views.panels.customize-layout-settings` | {name} settings |
|
|
633
|
+
| `views.panels.customize-share` | Share the view |
|
|
634
|
+
|
|
635
|
+
The quick filters (`CONTROLS.QuickFiltersBody`; its other words are ViewKit's own quick filters' keys, worded already):
|
|
636
|
+
|
|
637
|
+
| Key | English |
|
|
638
|
+
| --- | --- |
|
|
639
|
+
| `views.panels.quick-clear-value` | Clear filter |
|
|
640
|
+
|
|
641
|
+
The bulk bar (`CONTROLS.SelectionBar`; its other words are ViewKit's own bar's keys, worded already: `views.selection.selected`, `views.selection.more`, `views.selection.actions`):
|
|
642
|
+
|
|
643
|
+
| Key | English |
|
|
644
|
+
| --- | --- |
|
|
645
|
+
| `views.selection.many` | {count} {one} or {count} {other} |
|
|
646
|
+
| `views.selection.bar-label` | {many} selected |
|
|
647
|
+
| `views.selection.delete-many` | Delete {many} |
|
|
648
|
+
| `views.selection.delete-ask` | Delete {many}? |
|
|
649
|
+
| `views.selection.noun-one` | row |
|
|
650
|
+
| `views.selection.noun-other` | rows |
|
|
651
|
+
| `views.selection.bar-count` | Selected |
|
|
652
|
+
| `views.selection.clear-the` | Clear the selection |
|
|
653
|
+
| `views.selection.delete-button` | Delete |
|
|
654
|
+
| `views.selection.cant-use` | Can't be used now |
|
|
655
|
+
|
|
540
656
|
Adding an option to a select:
|
|
541
657
|
|
|
542
658
|
| Key | English |
|
|
@@ -562,6 +678,7 @@ The panels: quick filters, set-aside rules, dragging:
|
|
|
562
678
|
| `views.panels.drag-dropped-over` | Draggable item {label} was dropped over droppable area {over} |
|
|
563
679
|
| `views.panels.drag-dropped` | Draggable item {label} was dropped. |
|
|
564
680
|
| `views.panels.drag-cancelled` | Dragging was cancelled. Draggable item {label} was dropped. |
|
|
681
|
+
| `views.panels.filter-fieldless` | Not a field of this list; a view cannot filter on it. |
|
|
565
682
|
|
|
566
683
|
`viewkitjs/fields` (the conventions' `messages`):
|
|
567
684
|
|
|
@@ -584,6 +701,7 @@ The panels: quick filters, set-aside rules, dragging:
|
|
|
584
701
|
| `date.not-a-date` | That isn't a date. Write a day and a month: 12/11 |
|
|
585
702
|
| `date.no-such-day` | {month} has no {day, as an ordinal}. Write a day and a month: 12/11 |
|
|
586
703
|
| `field.must-tick` | This box must be ticked |
|
|
704
|
+
| `field.label` | A field a lookup's or a rollup's note names, by `{ entity, field, label }`: its label |
|
|
587
705
|
|
|
588
706
|
### Check you're done with this part
|
|
589
707
|
|
package/fields/dist/derived.d.ts
CHANGED
|
@@ -17,7 +17,8 @@ export declare function scalarOf(field: FieldDef, value: unknown): unknown;
|
|
|
17
17
|
/** The type a consumer dispatches on — the result's for a rollup or a formula,
|
|
18
18
|
* the far field's for a lookup (text while unresolved). */
|
|
19
19
|
export declare function valueTypeOf(field: FieldDef): ValueType;
|
|
20
|
-
/** The sentence a lock shows for a derived field — data-model truth in words.
|
|
20
|
+
/** The sentence a lock shows for a derived field — data-model truth in words. Each field it names is worded by its
|
|
21
|
+
* label, through the host's `field.label`, where the index named it (`names`); else by its key, as before. */
|
|
21
22
|
export declare function derivedReason(field: DerivedDef, cv?: FieldConventions): string;
|
|
22
23
|
/**
|
|
23
24
|
* WHY a field refuses an edit, in the user's words — the lock glyph's hover and
|
package/fields/dist/derived.js
CHANGED
|
@@ -27,16 +27,22 @@ function humanizeKey(key) {
|
|
|
27
27
|
}
|
|
28
28
|
export function derivedReason(field, cv = DEFAULT_CONVENTIONS) {
|
|
29
29
|
cv = conventionsOr(cv);
|
|
30
|
+
const word = (named, key) => named ? cv.messages({ key: "field.label", values: named }) : humanizeKey(key);
|
|
30
31
|
if (field.type === "lookup") {
|
|
31
32
|
return cv.messages({
|
|
32
33
|
key: "derived.lookup",
|
|
33
|
-
values: { via:
|
|
34
|
+
values: { via: word(field.names?.via, field.via), field: word(field.names?.field, field.field) },
|
|
34
35
|
});
|
|
35
36
|
}
|
|
36
37
|
if (field.type === "formula") {
|
|
37
38
|
return cv.messages({ key: "derived.formula", values: { from: field.from } });
|
|
38
39
|
}
|
|
39
|
-
const
|
|
40
|
+
const hops = field.names?.over;
|
|
41
|
+
const over = hops
|
|
42
|
+
? hops.map((hop) => cv.messages({ key: "field.label", values: hop })).join(" → ")
|
|
43
|
+
: typeof field.over === "string"
|
|
44
|
+
? field.over
|
|
45
|
+
: field.over.join(" → ");
|
|
40
46
|
if (field.fn === "count" || field.fn === "countDistinct") {
|
|
41
47
|
return cv.messages({ key: "derived.count", values: { over } });
|
|
42
48
|
}
|
|
@@ -46,7 +52,7 @@ export function derivedReason(field, cv = DEFAULT_CONVENTIONS) {
|
|
|
46
52
|
return cv.messages({ key: "derived.none", values: { over } });
|
|
47
53
|
return cv.messages({
|
|
48
54
|
key: "derived.rollup",
|
|
49
|
-
values: { fn: field.fn, of:
|
|
55
|
+
values: { fn: field.fn, of: word(field.names?.of, field.of ?? ""), over },
|
|
50
56
|
});
|
|
51
57
|
}
|
|
52
58
|
export function lockReason(field, cv = DEFAULT_CONVENTIONS) {
|
package/fields/dist/entities.js
CHANGED
|
@@ -458,6 +458,38 @@ function withContributions(raw, contributions) {
|
|
|
458
458
|
raw[c.entity] = { entity: base.entity, identity: base.identity, fields };
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
+
function namedField(entity, key) {
|
|
462
|
+
const field = key === undefined ? undefined : ownField(entity?.fields, key);
|
|
463
|
+
return entity && field ? Object.freeze({ entity: entity.entity, field: key, label: field.label }) : undefined;
|
|
464
|
+
}
|
|
465
|
+
function derivedNames(index, near, field) {
|
|
466
|
+
if (field.type === "lookup") {
|
|
467
|
+
const via = namedField(near, field.via);
|
|
468
|
+
const far = namedField(farEntityOf(index, near, field.via), field.field);
|
|
469
|
+
return { ...(via ? { via } : {}), ...(far ? { field: far } : {}) };
|
|
470
|
+
}
|
|
471
|
+
const hops = typeof field.over === "string" ? [field.over] : field.over;
|
|
472
|
+
const over = [];
|
|
473
|
+
let at = near;
|
|
474
|
+
for (const hop of hops) {
|
|
475
|
+
const named = namedField(at, hop);
|
|
476
|
+
if (!named)
|
|
477
|
+
break;
|
|
478
|
+
over.push(named);
|
|
479
|
+
at = farEntityOf(index, at, hop);
|
|
480
|
+
}
|
|
481
|
+
const first = ownField(near.fields, hops[0]);
|
|
482
|
+
const severalKinds = first?.type === "relation" && "kinds" in first.relation;
|
|
483
|
+
const of = severalKinds ? undefined : namedField(at, field.of);
|
|
484
|
+
return {
|
|
485
|
+
...(over.length === hops.length ? { over: Object.freeze(over) } : {}),
|
|
486
|
+
...(of && over.length === hops.length ? { of } : {}),
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
function withNames(field, names) {
|
|
490
|
+
const { names: _written, ...own } = field;
|
|
491
|
+
return Object.freeze(Object.keys(names).length ? { ...own, names: Object.freeze(names) } : own);
|
|
492
|
+
}
|
|
461
493
|
export function defineIndex(entities, contributions = []) {
|
|
462
494
|
const raw = {};
|
|
463
495
|
for (const e of entities) {
|
|
@@ -474,7 +506,13 @@ export function defineIndex(entities, contributions = []) {
|
|
|
474
506
|
const ready = done.get(address);
|
|
475
507
|
if (ready)
|
|
476
508
|
return ready;
|
|
477
|
-
const
|
|
509
|
+
const near = ownField(raw, kind);
|
|
510
|
+
const field = ownField(near.fields, key);
|
|
511
|
+
if (field.type === "rollup") {
|
|
512
|
+
const out = withNames(field, derivedNames(raw, near, field));
|
|
513
|
+
done.set(address, out);
|
|
514
|
+
return out;
|
|
515
|
+
}
|
|
478
516
|
if (field.type !== "lookup") {
|
|
479
517
|
done.set(address, field);
|
|
480
518
|
return field;
|
|
@@ -483,7 +521,7 @@ export function defineIndex(entities, contributions = []) {
|
|
|
483
521
|
throw new FieldDefinitionError(address, "a lookup cycle — follow the chain and break it");
|
|
484
522
|
}
|
|
485
523
|
resolving.add(address);
|
|
486
|
-
const far = farEntityOf(raw,
|
|
524
|
+
const far = farEntityOf(raw, near, field.via);
|
|
487
525
|
const target = far ? resolve(far.entity, field.field) : undefined;
|
|
488
526
|
resolving.delete(address);
|
|
489
527
|
if (target) {
|
|
@@ -496,7 +534,7 @@ export function defineIndex(entities, contributions = []) {
|
|
|
496
534
|
}
|
|
497
535
|
}
|
|
498
536
|
const { target: _written, ...own } = field;
|
|
499
|
-
const out =
|
|
537
|
+
const out = withNames({ ...own, ...(target ? { target } : {}) }, derivedNames(raw, near, field));
|
|
500
538
|
done.set(address, out);
|
|
501
539
|
return out;
|
|
502
540
|
};
|
package/fields/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export { checkFormula, evaluateFormula, FORMULA_FUNCTIONS, FORMULA_MAX_NODES, ty
|
|
|
11
11
|
export { ACTOR_TYPES, actorKey, actorLabel, actorOfKey, isActorValue } from "./actor.js";
|
|
12
12
|
export { markdownFirstLine, markdownPlainText, normalizeMarkdown } from "./markdown.js";
|
|
13
13
|
export { applyNormalize, NORMALIZE_STEPS, normalizerFor, type NormalizeStep } from "./normalize.js";
|
|
14
|
-
export { isEmptyRange, isRangeValue, presetOf, rangeDecimals, RANGE_PARTS, rangeOverlaps, rangeText, sameRange, withRangeEnd, type RangePart, } from "./range.js";
|
|
14
|
+
export { exactPresetOf, isEmptyRange, isRangeValue, presetOf, rangeDecimals, RANGE_PARTS, rangeOverlaps, rangeShownText, rangeText, sameRange, withRangeEnd, type RangePart, } from "./range.js";
|
|
15
15
|
export { LOCATION_PARTS, locationLines, locationPart, locationShort, locationText, withLocationPart, type LocationPart, } from "./location.js";
|
|
16
16
|
export { placeFormat, writesLatin, type CityWord, type PlaceFormat, type PlaceLineItem, type PostalWord, type RegionWord, } from "./places/format.js";
|
|
17
17
|
export { COUNTRY_CODES, countryCodeOf, countryName, isCountryCode } from "./countries.js";
|
package/fields/dist/index.js
CHANGED
|
@@ -8,7 +8,7 @@ export { checkFormula, evaluateFormula, FORMULA_FUNCTIONS, FORMULA_MAX_NODES, }
|
|
|
8
8
|
export { ACTOR_TYPES, actorKey, actorLabel, actorOfKey, isActorValue } from "./actor.js";
|
|
9
9
|
export { markdownFirstLine, markdownPlainText, normalizeMarkdown } from "./markdown.js";
|
|
10
10
|
export { applyNormalize, NORMALIZE_STEPS, normalizerFor } from "./normalize.js";
|
|
11
|
-
export { isEmptyRange, isRangeValue, presetOf, rangeDecimals, RANGE_PARTS, rangeOverlaps, rangeText, sameRange, withRangeEnd, } from "./range.js";
|
|
11
|
+
export { exactPresetOf, isEmptyRange, isRangeValue, presetOf, rangeDecimals, RANGE_PARTS, rangeOverlaps, rangeShownText, rangeText, sameRange, withRangeEnd, } from "./range.js";
|
|
12
12
|
export { LOCATION_PARTS, locationLines, locationPart, locationShort, locationText, withLocationPart, } from "./location.js";
|
|
13
13
|
export { placeFormat, writesLatin, } from "./places/format.js";
|
|
14
14
|
export { COUNTRY_CODES, countryCodeOf, countryName, isCountryCode } from "./countries.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ActorType, CreatableFieldType, FieldType, RollupFn } from "./types.js";
|
|
1
|
+
import type { ActorType, CreatableFieldType, FieldType, NamedField, RollupFn } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* A typed message plus the values its host may interpolate. EVERY sentence the
|
|
4
4
|
* library writes is one of these — a host that translates them translates the
|
|
@@ -54,6 +54,12 @@ export type FieldMessage = {
|
|
|
54
54
|
values: {
|
|
55
55
|
over: string;
|
|
56
56
|
};
|
|
57
|
+
}
|
|
58
|
+
/** A field a worked-out field's note names (its relation, its far field), before it goes into the note: where it
|
|
59
|
+
* lives and its label. The default is the label; a host whose labels are its own catalog's keys words them here. */
|
|
60
|
+
| {
|
|
61
|
+
key: "field.label";
|
|
62
|
+
values: NamedField;
|
|
57
63
|
} | {
|
|
58
64
|
key: "settlement.requested";
|
|
59
65
|
values: {
|
|
@@ -431,6 +437,6 @@ export type FieldMessage = {
|
|
|
431
437
|
export type FieldMessageKey = FieldMessage["key"];
|
|
432
438
|
export type FieldMessageResolver = (message: FieldMessage) => string;
|
|
433
439
|
/** Every key a host words, once: a host tests that its catalog holds each (`VIEWS_MESSAGE_KEYS` is the views part's). */
|
|
434
|
-
export declare const FIELD_MESSAGE_KEYS: readonly ["lock.system", "lock.provider", "lock.create", "lock.never", "derived.formula", "derived.lookup", "derived.count", "derived.rollup", "derived.exists", "derived.none", "settlement.requested", "provider.name", "type.label", "setting.label", "setting.word", "field.cannot-empty", "field.must-tick", "field.cannot-edit", "field.cannot-save", "field.retry-save", "field.stored-value-required", "field.history-unavailable", "field.restore-refused", "field.already-saving", "field.unavailable", "field.derived", "editor.search", "editor.searching", "editor.search-failed", "editor.loading-more", "editor.nothing-matches", "editor.use-value", "relation.none", "relation.lead", "relation.make-lead", "date.placeholder", "date.label", "date.today", "date.tomorrow", "date.next-monday", "date.in-a-week", "date.clear", "time.placeholder", "time.label", "date.type", "date.none", "date.add-time", "date.last-month", "date.next-month", "date.day", "date.month", "date.year", "date.months", "date.years", "time.hour", "time.minute", "date.not-a-date", "date.no-such-day", "chips.add-placeholder", "chips.everything-picked", "chips.add", "validation.invalid", "validation.text", "validation.number", "validation.integer", "validation.date", "validation.datetime", "validation.boolean", "validation.option", "validation.options-list", "validation.values-list", "validation.relation", "validation.url", "validation.domain", "validation.email", "validation.email-list", "validation.unit", "validation.phone", "validation.phone-country", "validation.phone-short", "validation.phone-long", "validation.phone-whole", "validation.user", "validation.location", "validation.country-code", "validation.region-code", "validation.name", "validation.actor", "actor.type", "validation.range-order", "range.up-to", "range.and-up", "validation.pattern", "validation.tag-empty", "validation.max-length", "validation.min-length", "validation.min", "validation.max", "validation.greater-than", "validation.less-than", "validation.decimals", "validation.max-items", "validation.max-addresses", "validation.one-main", "validation.duplicate-value", "save.failed", "save.refresh-failed", "filter.any", "filter.operator", "filter.text-summary", "filter.date-summary", "filter.relative", "filter.relative-direction", "filter.relative-unit", "group.none", "group.relative", "group.due", "group.week-of", "time.never", "time.future", "time.ago", "platform.website"];
|
|
440
|
+
export declare const FIELD_MESSAGE_KEYS: readonly ["lock.system", "lock.provider", "lock.create", "lock.never", "derived.formula", "derived.lookup", "derived.count", "derived.rollup", "derived.exists", "derived.none", "field.label", "settlement.requested", "provider.name", "type.label", "setting.label", "setting.word", "field.cannot-empty", "field.must-tick", "field.cannot-edit", "field.cannot-save", "field.retry-save", "field.stored-value-required", "field.history-unavailable", "field.restore-refused", "field.already-saving", "field.unavailable", "field.derived", "editor.search", "editor.searching", "editor.search-failed", "editor.loading-more", "editor.nothing-matches", "editor.use-value", "relation.none", "relation.lead", "relation.make-lead", "date.placeholder", "date.label", "date.today", "date.tomorrow", "date.next-monday", "date.in-a-week", "date.clear", "time.placeholder", "time.label", "date.type", "date.none", "date.add-time", "date.last-month", "date.next-month", "date.day", "date.month", "date.year", "date.months", "date.years", "time.hour", "time.minute", "date.not-a-date", "date.no-such-day", "chips.add-placeholder", "chips.everything-picked", "chips.add", "validation.invalid", "validation.text", "validation.number", "validation.integer", "validation.date", "validation.datetime", "validation.boolean", "validation.option", "validation.options-list", "validation.values-list", "validation.relation", "validation.url", "validation.domain", "validation.email", "validation.email-list", "validation.unit", "validation.phone", "validation.phone-country", "validation.phone-short", "validation.phone-long", "validation.phone-whole", "validation.user", "validation.location", "validation.country-code", "validation.region-code", "validation.name", "validation.actor", "actor.type", "validation.range-order", "range.up-to", "range.and-up", "validation.pattern", "validation.tag-empty", "validation.max-length", "validation.min-length", "validation.min", "validation.max", "validation.greater-than", "validation.less-than", "validation.decimals", "validation.max-items", "validation.max-addresses", "validation.one-main", "validation.duplicate-value", "save.failed", "save.refresh-failed", "filter.any", "filter.operator", "filter.text-summary", "filter.date-summary", "filter.relative", "filter.relative-direction", "filter.relative-unit", "group.none", "group.relative", "group.due", "group.week-of", "time.never", "time.future", "time.ago", "platform.website"];
|
|
435
441
|
/** Neutral English fallback for hosts that do not provide localization. */
|
|
436
442
|
export declare const resolveFieldMessage: FieldMessageResolver;
|