viewkitjs 0.28.0 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +218 -0
- package/MIGRATION.md +181 -11
- package/fields/dist/derived.d.ts +2 -1
- package/fields/dist/derived.js +9 -3
- package/fields/dist/entities.js +41 -3
- package/fields/dist/index.d.ts +1 -1
- package/fields/dist/index.js +1 -1
- package/fields/dist/messages.d.ts +8 -2
- package/fields/dist/messages.js +3 -0
- package/fields/dist/range.d.ts +6 -0
- package/fields/dist/range.js +8 -0
- package/fields/dist/registry.js +11 -1
- package/fields/dist/spec-changes.js +1 -0
- package/fields/dist/types.d.ts +23 -1
- package/fields/docs/guides/derived-fields.md +7 -5
- package/fields/docs/guides/field-types.md +2 -2
- package/fields/docs/guides/the-index.md +1 -1
- package/fields/docs/reference/fields.md +3 -1
- package/fields/docs/reference/types.md +3 -1
- package/fields/skills/viewkit/SKILL.md +1 -1
- package/package.json +2 -1
- package/postgres/dist/definitions/build.js +29 -5
- package/postgres/dist/definitions/label.d.ts +7 -0
- package/postgres/dist/definitions/label.js +9 -1
- package/postgres/dist/definitions/lookup.js +6 -2
- package/postgres/dist/definitions/place.d.ts +6 -3
- package/postgres/dist/definitions/rollup.js +5 -1
- package/postgres/dist/definitions/storage.d.ts +15 -0
- package/postgres/dist/definitions/storage.js +52 -1
- package/postgres/dist/definitions/stored.js +21 -0
- package/postgres/dist/phone.d.ts +13 -1
- package/postgres/dist/phone.js +23 -3
- package/postgres/dist/search-indexes.d.ts +6 -1
- package/postgres/dist/search-indexes.js +71 -25
- package/postgres/dist/search.js +3 -3
- package/postgres/docs/guides/definitions.md +22 -5
- package/postgres/docs/guides/field-map.md +5 -4
- package/postgres/docs/reference/definitions.md +3 -3
- package/postgres/docs/reference/postgres.md +1 -1
- package/views/dist/cells/cell-format.d.ts +2 -2
- package/views/dist/cells/cell-format.js +2 -2
- package/views/dist/cells/cell-values.js +9 -12
- package/views/dist/contract.d.ts +161 -18
- package/views/dist/contract.js +170 -28
- package/views/dist/controls/bulk-bar/bulk-bar-of.d.ts +66 -0
- package/views/dist/controls/bulk-bar/bulk-bar-of.js +22 -0
- package/views/dist/controls/bulk-bar/bulk-bar.d.ts +40 -0
- package/views/dist/controls/bulk-bar/bulk-bar.js +278 -0
- package/views/dist/controls/bulk-bar/looks.d.ts +10 -0
- package/views/dist/controls/bulk-bar/looks.js +14 -0
- package/views/dist/controls/bulk-bar/map-selection-bar.d.ts +19 -0
- package/views/dist/controls/bulk-bar/map-selection-bar.js +57 -0
- package/views/dist/controls/bulk-bar/tokens.d.ts +136 -0
- package/views/dist/controls/bulk-bar/tokens.js +36 -0
- package/views/dist/controls/bulk-bar/words.d.ts +50 -0
- package/views/dist/controls/bulk-bar/words.js +19 -0
- package/views/dist/controls/bulk-bar.css +96 -0
- package/views/dist/controls/button/button.js +3 -1
- package/views/dist/controls/button.css +5 -4
- package/views/dist/controls/checkbox/checkbox.js +3 -1
- package/views/dist/controls/checkbox.css +1 -1
- package/views/dist/controls/choice/tokens.d.ts +79 -0
- package/views/dist/controls/choice/tokens.js +22 -0
- package/views/dist/controls/choice.css +31 -0
- package/views/dist/controls/compound-editor/looks.js +1 -1
- package/views/dist/controls/controls.d.ts +8 -0
- package/views/dist/controls/controls.js +8 -0
- package/views/dist/controls/customize/customize.d.ts +176 -0
- package/views/dist/controls/customize/customize.js +348 -0
- package/views/dist/controls/customize/glide.d.ts +10 -0
- package/views/dist/controls/customize/glide.js +55 -0
- package/views/dist/controls/customize/looks.d.ts +13 -0
- package/views/dist/controls/customize/looks.js +11 -0
- package/views/dist/controls/customize/map-customize-body.d.ts +15 -0
- package/views/dist/controls/customize/map-customize-body.js +195 -0
- package/views/dist/controls/customize/map-ranges.d.ts +23 -0
- package/views/dist/controls/customize/map-ranges.js +41 -0
- package/views/dist/controls/customize/rules.d.ts +39 -0
- package/views/dist/controls/customize/rules.js +21 -0
- package/views/dist/controls/customize/tokens.d.ts +40 -0
- package/views/dist/controls/customize/tokens.js +12 -0
- package/views/dist/controls/customize/words.d.ts +65 -0
- package/views/dist/controls/customize/words.js +42 -0
- package/views/dist/controls/customize.css +57 -0
- package/views/dist/controls/date-editor/looks.js +1 -1
- package/views/dist/controls/filter-editor/block.d.ts +31 -0
- package/views/dist/controls/filter-editor/block.js +27 -0
- package/views/dist/controls/filter-editor/filter-editor.d.ts +4 -0
- package/views/dist/controls/filter-editor/filter-editor.js +86 -43
- package/views/dist/controls/filter-editor/how.d.ts +1 -1
- package/views/dist/controls/filter-editor/how.js +1 -0
- package/views/dist/controls/filter-editor/map-filter-body.d.ts +16 -1
- package/views/dist/controls/filter-editor/map-filter-body.js +39 -13
- package/views/dist/controls/filter-editor/map-rules.d.ts +27 -11
- package/views/dist/controls/filter-editor/map-rules.js +73 -42
- package/views/dist/controls/filter-editor/rules.d.ts +42 -5
- package/views/dist/controls/filter-editor/rules.js +55 -2
- package/views/dist/controls/filter-editor/words.d.ts +15 -0
- package/views/dist/controls/filter-editor/words.js +6 -0
- package/views/dist/controls/filter-editor.css +18 -0
- package/views/dist/controls/index.d.ts +33 -9
- package/views/dist/controls/index.js +32 -9
- package/views/dist/controls/inline-input/looks.js +1 -1
- package/views/dist/controls/input/input.js +10 -4
- package/views/dist/controls/internal/phone.d.ts +5 -4
- package/views/dist/controls/internal/phone.js +7 -7
- package/views/dist/controls/internal/scroll.js +5 -1
- package/views/dist/controls/internal/typed-run.d.ts +2 -0
- package/views/dist/controls/internal/typed-run.js +5 -0
- package/views/dist/controls/menu/map-menu.js +2 -2
- package/views/dist/controls/menu-list/menu-list.d.ts +16 -1
- package/views/dist/controls/menu-list/menu-list.js +26 -8
- package/views/dist/controls/menu-list.css +8 -0
- package/views/dist/controls/number-editor/looks.js +1 -1
- package/views/dist/controls/option/option.js +3 -1
- package/views/dist/controls/option.css +1 -1
- package/views/dist/controls/pane/pane.d.ts +4 -0
- package/views/dist/controls/pane/pane.js +2 -1
- package/views/dist/controls/picker/looks.js +1 -1
- package/views/dist/controls/picker/map-picker.d.ts +6 -2
- package/views/dist/controls/picker/map-picker.js +4 -2
- package/views/dist/controls/picker/picker.d.ts +7 -0
- package/views/dist/controls/picker/picker.js +57 -8
- package/views/dist/controls/popover/map-popover.d.ts +1 -1
- package/views/dist/controls/popover/map-popover.js +2 -2
- package/views/dist/controls/popover/popover.js +2 -1
- package/views/dist/controls/popover.css +3 -0
- package/views/dist/controls/ports-host/map-ports-host.d.ts +7 -0
- package/views/dist/controls/ports-host/map-ports-host.js +43 -0
- package/views/dist/controls/press/tokens.d.ts +8 -0
- package/views/dist/controls/press/tokens.js +4 -0
- package/views/dist/controls/press.css +44 -0
- package/views/dist/controls/quick-filters/looks.d.ts +11 -0
- package/views/dist/controls/quick-filters/looks.js +9 -0
- package/views/dist/controls/quick-filters/map-quick-filters-body.d.ts +31 -0
- package/views/dist/controls/quick-filters/map-quick-filters-body.js +59 -0
- package/views/dist/controls/quick-filters/quick-filters.d.ts +37 -0
- package/views/dist/controls/quick-filters/quick-filters.js +89 -0
- package/views/dist/controls/quick-filters/reminder.d.ts +18 -0
- package/views/dist/controls/quick-filters/reminder.js +41 -0
- package/views/dist/controls/quick-filters/rules.d.ts +89 -0
- package/views/dist/controls/quick-filters/rules.js +52 -0
- package/views/dist/controls/quick-filters/tokens.d.ts +112 -0
- package/views/dist/controls/quick-filters/tokens.js +30 -0
- package/views/dist/controls/quick-filters/words.d.ts +25 -0
- package/views/dist/controls/quick-filters/words.js +13 -0
- package/views/dist/controls/quick-filters.css +118 -0
- package/views/dist/controls/sheet/bottom-sheet.d.ts +9 -4
- package/views/dist/controls/sheet/bottom-sheet.js +4 -4
- package/views/dist/controls/sheet/map-sheet.d.ts +4 -1
- package/views/dist/controls/sheet/map-sheet.js +19 -6
- package/views/dist/controls/sheet/sheet-parts.d.ts +10 -0
- package/views/dist/controls/sheet/sheet-parts.js +2 -0
- package/views/dist/controls/switch-row/switch-row.d.ts +15 -0
- package/views/dist/controls/switch-row/switch-row.js +9 -0
- package/views/dist/controls/switch-row/tokens.d.ts +51 -0
- package/views/dist/controls/switch-row/tokens.js +15 -0
- package/views/dist/controls/switch-row.css +39 -0
- package/views/dist/controls/switch.css +1 -1
- package/views/dist/controls/tag/tag.js +3 -1
- package/views/dist/controls/tag-field/tag-field.d.ts +20 -0
- package/views/dist/controls/tag-field/tag-field.js +19 -0
- package/views/dist/controls/tag-field/tokens.d.ts +7 -0
- package/views/dist/controls/tag-field/tokens.js +4 -0
- package/views/dist/controls/tag-field.css +13 -0
- package/views/dist/controls/text-editor/looks.js +1 -1
- package/views/dist/controls/text-editor/map-text-body.d.ts +1 -1
- package/views/dist/controls/text-editor/map-text-body.js +2 -2
- package/views/dist/controls/text-editor/text-editor.d.ts +3 -0
- package/views/dist/controls/text-editor/text-editor.js +17 -7
- package/views/dist/controls/text-editor.css +11 -0
- package/views/dist/controls/toast/toast.d.ts +5 -1
- package/views/dist/controls/toast/toast.js +5 -3
- package/views/dist/controls/tokens.js +18 -0
- package/views/dist/controls/toolbar/keys.d.ts +3 -0
- package/views/dist/controls/toolbar/keys.js +11 -0
- package/views/dist/controls/toolbar/looks.d.ts +10 -0
- package/views/dist/controls/toolbar/looks.js +40 -0
- package/views/dist/controls/toolbar/tokens.d.ts +28 -0
- package/views/dist/controls/toolbar/tokens.js +9 -0
- package/views/dist/controls/toolbar/toolbar.d.ts +111 -0
- package/views/dist/controls/toolbar/toolbar.js +370 -0
- package/views/dist/controls/toolbar/words.d.ts +28 -0
- package/views/dist/controls/toolbar/words.js +17 -0
- package/views/dist/controls/toolbar-button/looks.d.ts +4 -0
- package/views/dist/controls/toolbar-button/looks.js +21 -0
- package/views/dist/controls/toolbar-button/tokens.d.ts +103 -0
- package/views/dist/controls/toolbar-button/tokens.js +28 -0
- package/views/dist/controls/toolbar-button/toolbar-button.d.ts +66 -0
- package/views/dist/controls/toolbar-button/toolbar-button.js +51 -0
- package/views/dist/controls/toolbar-button.css +75 -0
- package/views/dist/controls/toolbar.css +65 -0
- package/views/dist/controls/tooltip/map-tooltip.d.ts +1 -1
- package/views/dist/controls/tooltip/map-tooltip.js +2 -2
- package/views/dist/controls/tooltip/tooltip.d.ts +3 -1
- package/views/dist/controls/tooltip/tooltip.js +2 -2
- package/views/dist/controls/values-editor/looks.js +1 -1
- package/views/dist/controls/values-editor/values.js +6 -2
- package/views/dist/controls/views-list/map-views-list-body.d.ts +4 -1
- package/views/dist/controls/views-list/map-views-list-body.js +128 -4
- package/views/dist/controls/views-list/rules.d.ts +26 -0
- package/views/dist/controls/views-list/rules.js +63 -0
- package/views/dist/controls/views-list/view-menu.d.ts +84 -0
- package/views/dist/controls/views-list/view-menu.js +201 -0
- package/views/dist/controls/views-list/views-list.d.ts +8 -1
- package/views/dist/controls/views-list/views-list.js +18 -3
- package/views/dist/controls/views-list/words.d.ts +54 -0
- package/views/dist/controls/views-list/words.js +10 -1
- package/views/dist/controls/views-list.css +5 -1
- package/views/dist/display/date.js +3 -3
- package/views/dist/display/format.d.ts +6 -0
- package/views/dist/display/format.js +3 -0
- package/views/dist/display/index.d.ts +1 -1
- package/views/dist/display/index.js +1 -1
- package/views/dist/display/options.d.ts +1 -1
- package/views/dist/display/range.d.ts +2 -1
- package/views/dist/display/range.js +4 -1
- package/views/dist/display/rich-text.js +0 -1
- package/views/dist/editors/ChipsEditor.d.ts +4 -5
- package/views/dist/editors/ChipsEditor.js +12 -78
- package/views/dist/editors/DateEditor.d.ts +12 -16
- package/views/dist/editors/DateEditor.js +40 -191
- package/views/dist/editors/EditorPanel.d.ts +2 -6
- package/views/dist/editors/EditorPanel.js +2 -2
- package/views/dist/editors/LocationEditor.d.ts +11 -19
- package/views/dist/editors/LocationEditor.js +19 -211
- package/views/dist/editors/NameEditor.d.ts +8 -16
- package/views/dist/editors/NameEditor.js +11 -100
- package/views/dist/editors/NumberEditor.d.ts +14 -21
- package/views/dist/editors/NumberEditor.js +22 -49
- package/views/dist/editors/RangeEditor.d.ts +9 -33
- package/views/dist/editors/RangeEditor.js +12 -97
- package/views/dist/editors/RelationEditor.d.ts +6 -9
- package/views/dist/editors/RelationEditor.js +11 -30
- package/views/dist/editors/RelationSetEditor.d.ts +13 -24
- package/views/dist/editors/RelationSetEditor.js +33 -101
- package/views/dist/editors/SelectEditor.d.ts +15 -17
- package/views/dist/editors/SelectEditor.js +15 -94
- package/views/dist/editors/TextEditor.d.ts +23 -26
- package/views/dist/editors/TextEditor.js +11 -48
- package/views/dist/editors/ValueListEditor.d.ts +14 -23
- package/views/dist/editors/ValueListEditor.js +16 -202
- package/views/dist/editors/body-panel.d.ts +13 -7
- package/views/dist/editors/body-panel.js +3 -7
- package/views/dist/editors/edit-cores.d.ts +15 -15
- package/views/dist/editors/edit-cores.js +14 -14
- package/views/dist/editors/number-body.d.ts +1 -1
- package/views/dist/editors/number-step.d.ts +0 -34
- package/views/dist/editors/number-step.js +0 -37
- package/views/dist/editors/option-add-flow.d.ts +1 -13
- package/views/dist/editors/option-add-flow.js +0 -22
- package/views/dist/editors/relation-links-body.d.ts +2 -3
- package/views/dist/editors/relation-picker.d.ts +13 -3
- package/views/dist/editors/relation-source.d.ts +0 -22
- package/views/dist/editors/relation-source.js +0 -21
- package/views/dist/field-row/FieldRow.js +5 -6
- package/views/dist/field-row/FieldRowLane.js +0 -1
- package/views/dist/field-row/editors/RowChipsEditor.js +2 -2
- package/views/dist/field-row/editors/RowDateEditor.d.ts +2 -2
- package/views/dist/field-row/editors/RowDateEditor.js +2 -2
- package/views/dist/field-row/editors/RowNameEditor.d.ts +2 -5
- package/views/dist/field-row/editors/RowNameEditor.js +7 -12
- package/views/dist/field-row/editors/RowNumberEditor.d.ts +1 -1
- package/views/dist/field-row/editors/RowNumberEditor.js +4 -4
- package/views/dist/field-row/editors/RowPlaceEditor.js +3 -3
- package/views/dist/field-row/editors/RowRangeEditor.d.ts +2 -5
- package/views/dist/field-row/editors/RowRangeEditor.js +7 -14
- package/views/dist/field-row/editors/RowRelationEditor.js +3 -3
- package/views/dist/field-row/editors/RowSelectEditor.js +2 -2
- package/views/dist/field-row/editors/RowTextEditor.d.ts +1 -1
- package/views/dist/field-row/editors/RowTextEditor.js +3 -4
- package/views/dist/field-row/editors/RowValueListEditor.js +5 -5
- package/views/dist/field-row/field-row-button.d.ts +6 -9
- package/views/dist/field-row/field-row-button.js +1 -6
- package/views/dist/field-row/field-row-checkbox.d.ts +1 -1
- package/views/dist/field-row/row-target.d.ts +0 -7
- package/views/dist/field-row/row-target.js +0 -2
- package/views/dist/grid/chrome/GridAddColumn.d.ts +2 -1
- package/views/dist/grid/chrome/GridAddColumn.js +8 -66
- package/views/dist/grid/chrome/GridAggregateMenu.d.ts +5 -7
- package/views/dist/grid/chrome/GridAggregateMenu.js +20 -39
- package/views/dist/grid/chrome/GridCellEditors.d.ts +2 -2
- package/views/dist/grid/chrome/GridCellEditors.js +12 -12
- package/views/dist/grid/chrome/GridChipsEditor.js +3 -3
- package/views/dist/grid/chrome/GridColumnMenu.d.ts +11 -12
- package/views/dist/grid/chrome/GridColumnMenu.js +32 -93
- package/views/dist/grid/chrome/GridDateEditor.d.ts +6 -6
- package/views/dist/grid/chrome/GridDateEditor.js +3 -3
- package/views/dist/grid/chrome/GridGroupMenu.d.ts +4 -6
- package/views/dist/grid/chrome/GridGroupMenu.js +21 -62
- package/views/dist/grid/chrome/GridHeader.d.ts +1 -2
- package/views/dist/grid/chrome/GridHeader.js +3 -2
- package/views/dist/grid/chrome/GridLongTextEditor.d.ts +17 -38
- package/views/dist/grid/chrome/GridLongTextEditor.js +6 -7
- package/views/dist/grid/chrome/GridNameEditor.js +4 -4
- package/views/dist/grid/chrome/GridNumberEditor.d.ts +4 -5
- package/views/dist/grid/chrome/GridNumberEditor.js +5 -6
- package/views/dist/grid/chrome/GridPlaceEditor.d.ts +2 -5
- package/views/dist/grid/chrome/GridPlaceEditor.js +5 -5
- package/views/dist/grid/chrome/GridRangeEditor.d.ts +6 -12
- package/views/dist/grid/chrome/GridRangeEditor.js +7 -15
- package/views/dist/grid/chrome/GridRelationEditor.js +5 -5
- package/views/dist/grid/chrome/GridRow.js +0 -3
- package/views/dist/grid/chrome/GridRowActions.d.ts +1 -1
- package/views/dist/grid/chrome/GridRowActions.js +0 -5
- package/views/dist/grid/chrome/GridRowCells.js +11 -7
- package/views/dist/grid/chrome/GridSelectEditor.js +3 -3
- package/views/dist/grid/chrome/GridStructure.js +0 -1
- package/views/dist/grid/chrome/GridTable.js +1 -1
- package/views/dist/grid/chrome/GridTextEditor.d.ts +5 -7
- package/views/dist/grid/chrome/GridTextEditor.js +5 -18
- package/views/dist/grid/chrome/GridValueListEditor.js +4 -4
- package/views/dist/grid/chrome/grid-body-place.d.ts +2 -3
- package/views/dist/grid/chrome/grid-body-place.js +4 -8
- package/views/dist/grid/chrome/grid-button.d.ts +7 -10
- package/views/dist/grid/chrome/grid-button.js +1 -6
- package/views/dist/grid/chrome/grid-cell-classes.js +1 -1
- package/views/dist/grid/chrome/grid-column-menu-items.d.ts +4 -4
- package/views/dist/grid/chrome/grid-column-menu-items.js +10 -6
- package/views/dist/grid/chrome/grid-editor-layer.d.ts +5 -1
- package/views/dist/grid/chrome/grid-editor-layer.js +1 -0
- package/views/dist/grid/chrome/grid-fitted-box.d.ts +7 -1
- package/views/dist/grid/chrome/grid-fitted-box.js +4 -4
- package/views/dist/grid/chrome/grid-group-menu-parts.d.ts +5 -9
- package/views/dist/grid/chrome/grid-group-menu-parts.js +1 -3
- package/views/dist/grid/chrome/grid-hover.js +0 -1
- package/views/dist/grid/chrome/grid-menu-focus.d.ts +7 -31
- package/views/dist/grid/chrome/grid-menu-focus.js +7 -47
- package/views/dist/grid/chrome/grid-styles.d.ts +0 -3
- package/views/dist/grid/chrome/grid-styles.js +0 -1
- package/views/dist/grid/chrome/grid-table-props.d.ts +6 -10
- package/views/dist/grid/chrome/useGridTableInteractionModel.js +2 -4
- package/views/dist/grid/core/clipboard-model.js +9 -4
- package/views/dist/grid/core/editing-controller.d.ts +2 -1
- package/views/dist/grid/core/editing-controller.js +10 -2
- package/views/dist/grid/core/refusal-sentence.d.ts +3 -0
- package/views/dist/grid/core/refusal-sentence.js +2 -2
- package/views/dist/grid/core/write-states.d.ts +3 -1
- package/views/dist/grid/core/write-states.js +6 -2
- package/views/dist/grid/grid.css +240 -0
- package/views/dist/grid/looks.d.ts +5 -1
- package/views/dist/grid/looks.js +20 -12
- package/views/dist/grid-tokens.d.ts +109 -0
- package/views/dist/grid-tokens.js +29 -0
- package/views/dist/looks/index.d.ts +5 -0
- package/views/dist/looks/index.js +5 -0
- package/views/dist/looks/pieces.js +10 -0
- package/views/dist/model/body-frame.d.ts +0 -32
- package/views/dist/model/body-frame.js +1 -15
- package/views/dist/model/column-capabilities.d.ts +2 -0
- package/views/dist/model/column-filters.d.ts +2 -1
- package/views/dist/model/column-from.js +2 -2
- package/views/dist/model/column-inspect.d.ts +5 -5
- package/views/dist/model/column-inspect.js +2 -2
- package/views/dist/model/relation-filters.d.ts +2 -0
- package/views/dist/panels/customize-body.d.ts +1 -10
- package/views/dist/panels/customize-body.js +0 -3
- package/views/dist/panels/filter/MenuSelect.js +0 -5
- package/views/dist/panels/filter/RangeFilterBody.js +0 -1
- package/views/dist/panels/filter/details.d.ts +1 -5
- package/views/dist/panels/filter/details.js +0 -13
- package/views/dist/panels/filter/filter-list.d.ts +0 -1
- package/views/dist/panels/filter/filter-list.js +1 -1
- package/views/dist/panels/index.d.ts +2 -2
- package/views/dist/panels/index.js +2 -2
- package/views/dist/panels/labels.d.ts +4 -0
- package/views/dist/panels/labels.js +8 -0
- package/views/dist/panels/model.d.ts +10 -2
- package/views/dist/panels/panel-button.d.ts +10 -12
- package/views/dist/panels/panel-button.js +1 -6
- package/views/dist/panels/quick/model.d.ts +4 -0
- package/views/dist/panels/react/chrome.d.ts +0 -17
- package/views/dist/panels/react/chrome.js +0 -8
- package/views/dist/panels/react/customize-body.d.ts +14 -12
- package/views/dist/panels/react/customize-body.js +93 -19
- package/views/dist/panels/react/customize.d.ts +16 -12
- package/views/dist/panels/react/customize.js +4 -110
- package/views/dist/panels/react/filter/FilterEditor.d.ts +4 -18
- package/views/dist/panels/react/filter/FilterEditor.js +6 -330
- package/views/dist/panels/react/filter/FilterFieldList.d.ts +1 -1
- package/views/dist/panels/react/filter/FilterFieldList.js +27 -51
- package/views/dist/panels/react/filter/PhoneFilterEditor.d.ts +1 -11
- package/views/dist/panels/react/filter/PhoneFilterEditor.js +8 -144
- package/views/dist/panels/react/filter/editor-ctx.d.ts +1 -33
- package/views/dist/panels/react/filter/editor-ctx.js +5 -33
- package/views/dist/panels/react/filter/filter-body.js +5 -2
- package/views/dist/panels/react/filter/filter-part-body.d.ts +3 -6
- package/views/dist/panels/react/filter/filter-part-body.js +0 -5
- package/views/dist/panels/react/filter/rule-writes.d.ts +1 -26
- package/views/dist/panels/react/filter/rule-writes.js +4 -95
- package/views/dist/panels/react/order-details.d.ts +1 -26
- package/views/dist/panels/react/order-details.js +3 -69
- package/views/dist/panels/react/panel-header.js +0 -1
- package/views/dist/panels/react/panel-step.d.ts +3 -0
- package/views/dist/panels/react/panel-step.js +2 -1
- package/views/dist/panels/react/popover.d.ts +4 -7
- package/views/dist/panels/react/quick/QuickFiltersPanel.d.ts +2 -4
- package/views/dist/panels/react/quick/QuickFiltersPanel.js +16 -136
- package/views/dist/panels/react/sort/SortEditor.d.ts +4 -4
- package/views/dist/panels/react/sort/SortEditor.js +8 -245
- package/views/dist/panels/react/sort/SortFieldList.d.ts +1 -1
- package/views/dist/panels/react/sort/SortFieldList.js +11 -25
- package/views/dist/panels/react/toolbar/ReadyToolbar.d.ts +13 -3
- package/views/dist/panels/react/toolbar/ReadyToolbar.js +10 -3
- package/views/dist/panels/react/toolbar/Toolbar.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarAdvancedFilters.js +2 -2
- package/views/dist/panels/react/toolbar/ToolbarAsideFilter.js +2 -2
- package/views/dist/panels/react/toolbar/ToolbarBarFilter.js +16 -18
- package/views/dist/panels/react/toolbar/ToolbarFilterAdd.js +2 -1
- package/views/dist/panels/react/toolbar/ToolbarFilters.js +3 -3
- package/views/dist/panels/react/toolbar/ToolbarOptions.d.ts +12 -4
- package/views/dist/panels/react/toolbar/ToolbarOptions.js +6 -2
- package/views/dist/panels/react/toolbar/ToolbarQuickFilters.js +1 -1
- package/views/dist/panels/react/toolbar/ToolbarSave.js +0 -4
- package/views/dist/panels/react/toolbar/ToolbarSearch.js +0 -1
- package/views/dist/panels/react/toolbar/ToolbarSortPill.js +3 -3
- package/views/dist/panels/react/view-actions.js +0 -1
- package/views/dist/panels/react/views-row/FoldingViewRow.js +2 -5
- package/views/dist/panels/react/views-row/ViewCreatePill.js +0 -1
- package/views/dist/panels/react/views-row/ViewPicker.js +30 -45
- package/views/dist/panels/react/views-row/ViewPickerRow.js +0 -2
- package/views/dist/panels/react/views-row/menu-classes.d.ts +0 -4
- package/views/dist/panels/react/views-row/menu-classes.js +0 -2
- package/views/dist/panels/react.d.ts +5 -12
- package/views/dist/panels/react.js +5 -12
- package/views/dist/panels/settings/filter-groups.d.ts +3 -0
- package/views/dist/panels/settings/filter-groups.js +40 -9
- package/views/dist/panels/settings/filters.d.ts +5 -0
- package/views/dist/panels/settings/filters.js +12 -6
- package/views/dist/panels/views-row/model.d.ts +10 -1
- package/views/dist/provider/ViewsProvider.d.ts +2 -46
- package/views/dist/provider/ViewsProvider.js +31 -27
- package/views/dist/provider/components.d.ts +295 -107
- package/views/dist/provider/context.d.ts +7 -21
- package/views/dist/provider/missing-slot.d.ts +3 -7
- package/views/dist/provider/missing-slot.js +2 -9
- package/views/dist/provider/ports.d.ts +18 -6
- package/views/dist/provider/ports.js +2 -1
- package/views/dist/react.d.ts +2 -3
- package/views/dist/react.js +1 -1
- package/views/dist/selection/SelectionBar.d.ts +2 -16
- package/views/dist/selection/SelectionBar.js +6 -4
- package/views/dist/selection/bar-props.d.ts +26 -0
- package/views/dist/selection/bar-props.js +1 -0
- package/views/dist/selection/index.d.ts +1 -1
- package/views/dist/selection/verbs.d.ts +32 -5
- package/views/dist/styles.css +694 -191
- package/views/dist/styles.unlayered.css +691 -188
- package/views/docs/contract.md +133 -130
- package/views/docs/controls/bulk-bar.md +41 -0
- package/views/docs/controls/choice.md +25 -0
- package/views/docs/controls/customize.md +17 -0
- package/views/docs/controls/popover.md +2 -0
- package/views/docs/controls/press.md +9 -0
- package/views/docs/controls/quick-filters.md +35 -0
- package/views/docs/controls/radio.md +1 -1
- package/views/docs/controls/switch-row.md +18 -0
- package/views/docs/controls/tag-field.md +7 -0
- package/views/docs/controls/toolbar-button.md +31 -0
- package/views/docs/controls/toolbar.md +14 -0
- package/views/docs/getting-started.md +222 -2
- package/views/docs/guides/atoms.md +2 -2
- package/views/docs/guides/cells.md +224 -4
- package/views/docs/guides/display.md +3 -3
- package/views/docs/guides/editors.md +235 -20
- package/views/docs/guides/looks.md +8 -2
- package/views/docs/guides/ports.md +7 -7
- package/views/docs/guides/selection.md +5 -1
- package/views/docs/guides/the-grid.md +15 -17
- package/views/docs/guides/the-provider.md +9 -15
- package/views/docs/install.md +4 -1
- package/views/docs/reference/cells.md +2 -2
- package/views/docs/reference/controls.md +215 -21
- package/views/docs/reference/display.md +1 -0
- package/views/docs/reference/editors-chips.md +2 -2
- package/views/docs/reference/editors-date.md +4 -4
- package/views/docs/reference/editors-location.md +4 -7
- package/views/docs/reference/editors-name.md +3 -5
- package/views/docs/reference/editors-number.md +10 -10
- package/views/docs/reference/editors-panel.md +3 -3
- package/views/docs/reference/editors-range.md +3 -5
- package/views/docs/reference/editors-relation.md +4 -4
- package/views/docs/reference/editors-select.md +3 -3
- package/views/docs/reference/editors-text.md +3 -4
- package/views/docs/reference/editors-value-list.md +3 -3
- package/views/docs/reference/field-row.md +1 -1
- package/views/docs/reference/grid.md +2 -2
- package/views/docs/reference/looks.md +25 -11
- package/views/docs/reference/panels-react.md +23 -37
- package/views/docs/reference/panels.md +8 -6
- package/views/docs/reference/react.md +24 -24
- package/views/docs/reference/selection.md +4 -2
- package/views/docs/reference/views.md +12 -11
- package/views/skills/views/SKILL.md +2 -2
- package/views/dist/editors/relation-panel.d.ts +0 -69
- package/views/dist/editors/relation-panel.js +0 -46
- package/views/dist/grid/chrome/GridColumnColorSection.d.ts +0 -13
- package/views/dist/grid/chrome/GridColumnColorSection.js +0 -40
- package/views/dist/grid/chrome/GridColumnDateSection.d.ts +0 -28
- package/views/dist/grid/chrome/GridColumnDateSection.js +0 -23
- package/views/dist/grid/chrome/GridColumnDurationSection.d.ts +0 -23
- package/views/dist/grid/chrome/GridColumnDurationSection.js +0 -24
- package/views/dist/grid/chrome/GridColumnNumberSection.d.ts +0 -29
- package/views/dist/grid/chrome/GridColumnNumberSection.js +0 -27
- package/views/dist/grid/chrome/GridColumnPercentSection.d.ts +0 -16
- package/views/dist/grid/chrome/GridColumnPercentSection.js +0 -16
- package/views/dist/grid/chrome/GridColumnSortSection.d.ts +0 -38
- package/views/dist/grid/chrome/GridColumnSortSection.js +0 -33
- package/views/dist/grid/chrome/GridFlyout.d.ts +0 -44
- package/views/dist/grid/chrome/GridFlyout.js +0 -80
- package/views/dist/grid/chrome/GridMenuRow.d.ts +0 -15
- package/views/dist/grid/chrome/GridMenuRow.js +0 -15
- package/views/dist/grid/chrome/grid-menu-search.d.ts +0 -7
- package/views/dist/grid/chrome/grid-menu-search.js +0 -7
- package/views/dist/panels/react/GroupBucketsList.d.ts +0 -16
- package/views/dist/panels/react/GroupBucketsList.js +0 -44
- package/views/dist/panels/react/LayoutColumnsList.d.ts +0 -24
- package/views/dist/panels/react/LayoutColumnsList.js +0 -101
- package/views/dist/panels/react/PopoverColumnDetail.d.ts +0 -11
- package/views/dist/panels/react/PopoverColumnDetail.js +0 -24
- package/views/dist/panels/react/drag.d.ts +0 -2
- package/views/dist/panels/react/drag.js +0 -5
- package/views/dist/panels/react/layout-detail.d.ts +0 -4
- package/views/dist/panels/react/layout-detail.js +0 -29
- package/views/dist/panels/react/root-list.d.ts +0 -6
- package/views/dist/panels/react/root-list.js +0 -31
- package/views/dist/panels/react/sort/use-sort-drag.d.ts +0 -17
- package/views/dist/panels/react/sort/use-sort-drag.js +0 -39
- package/views/dist/panels/react/view-footer.d.ts +0 -20
- package/views/dist/panels/react/view-footer.js +0 -41
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type MouseEvent as ReactMouseEvent } from "react";
|
|
2
2
|
/**
|
|
3
3
|
* Gives the focus back to `anchor` when a menu that opened from it has closed, and only where the focus had nowhere
|
|
4
4
|
* else to go. Focus on the body goes back at once. Focus still inside a popup (an app's popover that plays its exit
|
|
@@ -12,28 +12,8 @@ import { type KeyboardEvent as ReactKeyboardEvent, type MouseEvent as ReactMouse
|
|
|
12
12
|
*/
|
|
13
13
|
export declare function returnGridFocus(anchor: HTMLElement): () => void;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* last). Only the box's own rows answer: a flyout's popup, drawn elsewhere on the page, keeps its keys.
|
|
18
|
-
*
|
|
19
|
-
* A menu whose first rows sit in a searchable list hands its search field in as `search`: the field is then the
|
|
20
|
-
* walk's first stop, standing for the list, and a key that starts in it is the field's (`gridMenuSearchArrows`).
|
|
21
|
-
* Coming into the field, the walk moves the list's highlight to the end it enters from, ↓ (round from the last row)
|
|
22
|
-
* to the first match and ↑ (from the row below) to the last, by the Home and End a cmdk list answers; left on the
|
|
23
|
-
* other end, the field would hand the next key straight back. A list that doesn't answer them keeps its highlight.
|
|
24
|
-
*/
|
|
25
|
-
export declare function gridMenuArrows(event: ReactKeyboardEvent<HTMLElement>, search?: HTMLElement | null): void;
|
|
26
|
-
/**
|
|
27
|
-
* ↓ and ↑ in a grid menu's search field, its `onKeyDown`: the list walks its own matches, and at its ends the walk
|
|
28
|
-
* goes on through the menu's other rows in `box`, ↓ past the last match (or with none) to the first row and ↑ past
|
|
29
|
-
* the first match round to the last. The default is prevented there, so the list's own arrows stay still. The match
|
|
30
|
-
* the list has highlighted is the option the field names in `aria-activedescendant`, as a combobox does; a list that
|
|
31
|
-
* names none keeps its arrows, and Tab leaves it.
|
|
32
|
-
*/
|
|
33
|
-
export declare function gridMenuSearchArrows(event: ReactKeyboardEvent<HTMLElement>, box: HTMLElement | null): void;
|
|
34
|
-
/**
|
|
35
|
-
* A press on a menu's own cell while the menu is open: noted on the press, read on the click it ends in. On the Menu
|
|
36
|
-
* route the app's menu may close on that press as a press outside it; the click that follows must not open it again.
|
|
15
|
+
* A press on a menu's own cell while the menu is open: noted on the press, read on the click it ends in. The
|
|
16
|
+
* app's menu may close on that press as a press outside it; the click that follows must not open it again.
|
|
37
17
|
*/
|
|
38
18
|
export declare function useGridMenuPress(open: boolean): {
|
|
39
19
|
/** The cell's `onPointerDownCapture`: notes whether the menu was open as the press began. */
|
|
@@ -44,15 +24,11 @@ export declare function useGridMenuPress(open: boolean): {
|
|
|
44
24
|
pressedOpen: (event: ReactMouseEvent) => boolean;
|
|
45
25
|
};
|
|
46
26
|
/**
|
|
47
|
-
* Focus for a menu the grid's chrome opens (a column's menu, a footer's figure picker, a group's ⋯):
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* to its cell where it had nowhere else to go (`returnGridFocus`).
|
|
27
|
+
* Focus for a menu the grid's chrome opens (a column's menu, a footer's figure picker, a group's ⋯): the app's `Menu`
|
|
28
|
+
* places it as it opens; closed, it gives the focus back to its cell where it had nowhere else to go
|
|
29
|
+
* (`returnGridFocus`).
|
|
51
30
|
*/
|
|
52
|
-
export declare function useGridMenuFocus(open: boolean, anchor: HTMLElement | null):
|
|
53
|
-
initialFocus: boolean;
|
|
54
|
-
noteOpen: (event: ReactMouseEvent) => void;
|
|
55
|
-
};
|
|
31
|
+
export declare function useGridMenuFocus(open: boolean, anchor: HTMLElement | null): void;
|
|
56
32
|
/**
|
|
57
33
|
* The column menu an app holds (`openColumnMenu`), told once per change a person makes. One press can ask twice: the
|
|
58
34
|
* app's menu closes on the press, as on any press outside it, and the click that ends the press on a header asks
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useCallback, useEffect, useRef
|
|
2
|
+
import { useCallback, useEffect, useRef } from "react";
|
|
3
3
|
const POPUP = '[role="dialog"], [role="menu"]';
|
|
4
4
|
const onNothing = (active) => active == null || active === document.body;
|
|
5
5
|
export function returnGridFocus(anchor) {
|
|
@@ -28,52 +28,15 @@ export function returnGridFocus(anchor) {
|
|
|
28
28
|
return;
|
|
29
29
|
stop();
|
|
30
30
|
});
|
|
31
|
-
watch.observe(document.body, {
|
|
31
|
+
watch.observe(document.body, {
|
|
32
|
+
childList: true,
|
|
33
|
+
subtree: true,
|
|
34
|
+
attributes: true,
|
|
35
|
+
attributeFilter: ["inert"],
|
|
36
|
+
});
|
|
32
37
|
document.addEventListener("focusin", stop, true);
|
|
33
38
|
return stop;
|
|
34
39
|
}
|
|
35
|
-
const isArrow = (event) => (event.key === "ArrowDown" || event.key === "ArrowUp") && !(event.altKey || event.ctrlKey || event.metaKey || event.shiftKey);
|
|
36
|
-
const menuRows = (box) => [...box.querySelectorAll("button:not(:disabled)")];
|
|
37
|
-
export function gridMenuArrows(event, search) {
|
|
38
|
-
if (!isArrow(event))
|
|
39
|
-
return;
|
|
40
|
-
const box = event.currentTarget;
|
|
41
|
-
if (!box.contains(event.target))
|
|
42
|
-
return;
|
|
43
|
-
if (search?.contains(event.target))
|
|
44
|
-
return;
|
|
45
|
-
const rows = search?.isConnected ? [search, ...menuRows(box)] : menuRows(box);
|
|
46
|
-
if (rows.length === 0)
|
|
47
|
-
return;
|
|
48
|
-
event.preventDefault();
|
|
49
|
-
const at = rows.indexOf(document.activeElement);
|
|
50
|
-
const down = event.key === "ArrowDown";
|
|
51
|
-
const next = at < 0 ? (down ? 0 : rows.length - 1) : (at + (down ? 1 : -1) + rows.length) % rows.length;
|
|
52
|
-
const row = rows[next];
|
|
53
|
-
row.focus();
|
|
54
|
-
if (row === search) {
|
|
55
|
-
row.dispatchEvent(new KeyboardEvent("keydown", { key: down ? "Home" : "End", bubbles: true, cancelable: true }));
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
export function gridMenuSearchArrows(event, box) {
|
|
59
|
-
if (!box || !isArrow(event))
|
|
60
|
-
return;
|
|
61
|
-
const rows = menuRows(box);
|
|
62
|
-
if (rows.length === 0)
|
|
63
|
-
return;
|
|
64
|
-
const down = event.key === "ArrowDown";
|
|
65
|
-
const matches = [...box.querySelectorAll('[role="option"]:not([aria-disabled="true"])')];
|
|
66
|
-
if (matches.length > 0) {
|
|
67
|
-
const named = event.currentTarget.getAttribute("aria-activedescendant");
|
|
68
|
-
if (!named)
|
|
69
|
-
return;
|
|
70
|
-
const at = matches.findIndex((match) => match.id === named);
|
|
71
|
-
if (at !== (down ? matches.length - 1 : 0))
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
event.preventDefault();
|
|
75
|
-
(down ? rows[0] : rows[rows.length - 1]).focus();
|
|
76
|
-
}
|
|
77
40
|
export function useGridMenuPress(open) {
|
|
78
41
|
const note = useRef(false);
|
|
79
42
|
return {
|
|
@@ -88,7 +51,6 @@ export function useGridMenuPress(open) {
|
|
|
88
51
|
};
|
|
89
52
|
}
|
|
90
53
|
export function useGridMenuFocus(open, anchor) {
|
|
91
|
-
const [byKey, setByKey] = useState(false);
|
|
92
54
|
const wasOpen = useRef(false);
|
|
93
55
|
useEffect(() => {
|
|
94
56
|
if (open) {
|
|
@@ -101,8 +63,6 @@ export function useGridMenuFocus(open, anchor) {
|
|
|
101
63
|
if (anchor)
|
|
102
64
|
return returnGridFocus(anchor);
|
|
103
65
|
}, [open, anchor]);
|
|
104
|
-
const noteOpen = useCallback((event) => setByKey(event.detail === 0), []);
|
|
105
|
-
return { initialFocus: byKey, noteOpen };
|
|
106
66
|
}
|
|
107
67
|
export function useGridHeldMenuReport(held, onChange) {
|
|
108
68
|
const pressingRef = useRef(false);
|
|
@@ -18,9 +18,6 @@ export declare const GRID_CHROME_FOCUS = "outline-none focus-visible:shadow-[var
|
|
|
18
18
|
* than its cell grows into. One whole `box-shadow` value, the app's `--vk-editing-shadow` (`none` turns it off);
|
|
19
19
|
* undeclared, what `shadow-lg shadow-black/20 dark:shadow-black/50` drew. */
|
|
20
20
|
export declare const GRID_EDITING_SHADOW = "shadow-[var(--vk-editing-shadow,0_10px_15px_-3px_rgb(0_0_0/0.2),0_4px_6px_-4px_rgb(0_0_0/0.2))] dark:shadow-[var(--vk-editing-shadow,0_10px_15px_-3px_rgb(0_0_0/0.5),0_4px_6px_-4px_rgb(0_0_0/0.5))]";
|
|
21
|
-
/** THE endFill-tail ⋯ button look: each row's menu button. Its hover is the caller's: neutral, or
|
|
22
|
-
* brand on a selected row. */
|
|
23
|
-
export declare const GRID_TAIL_BUTTON_BASE = "inline-flex h-8 w-9 items-center justify-center rounded-sm text-(color:--vk-fg-subtle) hover:text-(color:--vk-fg)";
|
|
24
21
|
/**
|
|
25
22
|
* A FROZEN header cell's OWN paint — the ground down to a 2px sliver at its
|
|
26
23
|
* foot, alpha-gated on `--vk-scrolled` (0/1, from the scroll area), like the
|
|
@@ -6,6 +6,5 @@ export const GRID_GROUND = "bg-(color:--vk-ground)";
|
|
|
6
6
|
export const GRID_GROUND_WHILE_SCROLLED = "bg-[color-mix(in_oklab,_var(--vk-ground)_calc(var(--vk-scrolled,0)*100%),_transparent)]";
|
|
7
7
|
export const GRID_CHROME_FOCUS = "outline-none focus-visible:shadow-[var(--vk-focus-ring,inset_0_0_0_2px_var(--vk-brand))]";
|
|
8
8
|
export const GRID_EDITING_SHADOW = "shadow-[var(--vk-editing-shadow,0_10px_15px_-3px_rgb(0_0_0/0.2),0_4px_6px_-4px_rgb(0_0_0/0.2))] dark:shadow-[var(--vk-editing-shadow,0_10px_15px_-3px_rgb(0_0_0/0.5),0_4px_6px_-4px_rgb(0_0_0/0.5))]";
|
|
9
|
-
export const GRID_TAIL_BUTTON_BASE = "inline-flex h-8 w-9 items-center justify-center rounded-sm text-(color:--vk-fg-subtle) hover:text-(color:--vk-fg)";
|
|
10
9
|
export const GRID_HEADER_BG_FROZEN = "bg-[linear-gradient(to_bottom,color-mix(in_oklab,_var(--vk-ground)_calc(var(--vk-scrolled,0)*100%),_transparent)_calc(100%-2px),transparent_calc(100%-2px))]";
|
|
11
10
|
export const GRID_HEADER_BG_FROZEN_HOVER = "hover:bg-[linear-gradient(var(--vk-hovered),var(--vk-hovered)),linear-gradient(to_bottom,color-mix(in_oklab,_var(--vk-ground)_calc(var(--vk-scrolled,0)*100%),_transparent)_calc(100%-2px),transparent_calc(100%-2px))]";
|
|
@@ -80,10 +80,8 @@ export type GridTableProps<Row> = {
|
|
|
80
80
|
/** Which parts a group band's ⋯ menu holds: `"select"` (Select all in group, leading the menu), `"sort"`,
|
|
81
81
|
* `"figures"` (the count and each figure, turned on and off) and `"hide"`. Each shows only when you also pass
|
|
82
82
|
* what it needs: `selection` for Select; `sort` with `sortOptions`; `groupFigures` with `onGroupSummaryChange`;
|
|
83
|
-
* `onHideGroup`. Select is never in the menu unless you name it here.
|
|
84
|
-
*
|
|
85
|
-
* with them, and searches past eight sort choices. On the `menu` route (the provider's `menus`) the sort choices
|
|
86
|
-
* open beside the menu with no search, either way. */
|
|
83
|
+
* `onHideGroup`. Select is never in the menu unless you name it here. Left out, the ⋯ opens for sort or Hide and
|
|
84
|
+
* carries the figure toggles with them. The sort choices open beside the menu, with no search, either way. */
|
|
87
85
|
groupMenu?: readonly GridGroupMenuPart[];
|
|
88
86
|
/** Source-paged group continuation, rendered after this group's loaded rows. */
|
|
89
87
|
renderGroupFooter?: (group: ListGroup<Row>) => ReactNode;
|
|
@@ -230,14 +228,12 @@ export type GridTableProps<Row> = {
|
|
|
230
228
|
* a sort's `fieldKey` and `by`), copies, edits and pastes as its part; an edit commits the whole column's id and
|
|
231
229
|
* the whole value with that part replaced, locked, refused and limited as its whole. Off by default. */
|
|
232
230
|
parts?: boolean;
|
|
233
|
-
/**
|
|
234
|
-
*
|
|
235
|
-
* provider's `menus`) it isn't drawn: hand `columnMenuItems`. */
|
|
231
|
+
/** @deprecated Read by nothing: a column's menu is your `Menu`, handed its rows as data, so a drawn row has nowhere
|
|
232
|
+
* to stand. Hand `columnMenuItems`. It goes when every menu takes a function from its default items. */
|
|
236
233
|
renderColumnMenuRows?: (fieldKey: string, close: () => void) => ReactNode;
|
|
237
|
-
/** The host's rows for a column's field
|
|
234
|
+
/** The host's rows for a column's field, as data, drawn just above Hide; null or an empty
|
|
238
235
|
* list for a field the host adds nothing to. Their keys must not reuse the package's own (`sort-asc`,
|
|
239
|
-
* `hide-column` and the rest). It is called while the grid renders, for every column: keep it pure and cheap.
|
|
240
|
-
* On the `popover` route `renderColumnMenuRows` draws them instead. */
|
|
236
|
+
* `hide-column` and the rest). It is called while the grid renders, for every column: keep it pure and cheap. */
|
|
241
237
|
columnMenuItems?: (fieldKey: string) => ViewsMenuItem[] | null;
|
|
242
238
|
columnState?: ListColumnState;
|
|
243
239
|
onColumnStateChange?: (next: ListColumnState) => void;
|
|
@@ -21,17 +21,15 @@ import { useGridCellPick } from "./useGridCellPick.js";
|
|
|
21
21
|
const REFUSAL_REPEAT_MS = 600;
|
|
22
22
|
export function useGridTableInteractionModel({ rootRef, props, rows, visibleRows, heldRows, rowIndex, visibleColumns, selecting, revealRow, focusShape, groupOfRow, }) {
|
|
23
23
|
const { columns, getRowId, listConfig } = props;
|
|
24
|
-
const { conventions, ports, messages
|
|
24
|
+
const { conventions, ports, messages } = useViews();
|
|
25
25
|
const editingEnabled = !!props.onCellCommit;
|
|
26
26
|
const sayRefusal = useCallback((refusal) => {
|
|
27
|
-
if (!sayRefusals)
|
|
28
|
-
return;
|
|
29
27
|
const nameOf = (columnId) => {
|
|
30
28
|
const col = columns.find((each) => each.id === columnId);
|
|
31
29
|
return col ? columnLabel(col) : columnId;
|
|
32
30
|
};
|
|
33
31
|
ports.toast.error(gridRefusalSentence(refusal, nameOf, messages));
|
|
34
|
-
}, [
|
|
32
|
+
}, [columns, ports, messages]);
|
|
35
33
|
const columnById = useMemo(() => new Map([...columns, ...visibleColumns].map((column) => [column.id, column])), [columns, visibleColumns]);
|
|
36
34
|
const partOfWhole = useCallback((wholeId) => [...columnById.values()].find((column) => column.partOf?.column === wholeId)?.partOf, [columnById]);
|
|
37
35
|
const keepsSent = useCallback((columnId) => partOfWhole(columnId) != null, [partOfWhole]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { actorLabel, formatLocalMinute, isActorValue, isBreakdown, isRangeValue, isValueItem, listValues, locationText, nameText, parseNumber,
|
|
1
|
+
import { actorLabel, formatLocalMinute, isActorValue, isBreakdown, isRangeValue, isValueItem, listValues, locationText, nameText, parseNumber, rangeShownText, relationIdOf, relationKey, relationLinksOf, relationStoredOf, utcDay, } from "viewkitjs/fields";
|
|
2
2
|
import { phoneText } from "viewkitjs/fields/phone";
|
|
3
3
|
import { msToDurationUnit, parseDateInput, parseDurationInput } from "viewkitjs/fields/query";
|
|
4
4
|
import { calendarDayOf } from "./value-equality.js";
|
|
@@ -45,7 +45,7 @@ function cellValueText(col, value) {
|
|
|
45
45
|
}
|
|
46
46
|
if (isRangeValue(value)) {
|
|
47
47
|
const field = col.field?.type === "range" ? col.field : { key: "", label: "", type: "range", of: "number" };
|
|
48
|
-
return
|
|
48
|
+
return rangeShownText(field, value);
|
|
49
49
|
}
|
|
50
50
|
if (isActorValue(value))
|
|
51
51
|
return actorLabel(value);
|
|
@@ -326,7 +326,7 @@ export function coercePaste(col, source, opts) {
|
|
|
326
326
|
return empty;
|
|
327
327
|
return { ok: true, next: { low: null, high: null }, overlay };
|
|
328
328
|
}
|
|
329
|
-
const range = parseRangeText(text, opts.conventions);
|
|
329
|
+
const range = parseRangeText(text, opts.conventions, col.field?.type === "range" ? col.field.presets : undefined);
|
|
330
330
|
if (!range)
|
|
331
331
|
return { ok: false, reason: messages({ key: "views.grid.paste-not-range" }) };
|
|
332
332
|
return { ok: true, next: range, overlay };
|
|
@@ -360,7 +360,12 @@ function pasteRelationSet(col, field, source, text, messages) {
|
|
|
360
360
|
}
|
|
361
361
|
return { ok: true, next: relationStoredOf(field, links), overlay: false };
|
|
362
362
|
}
|
|
363
|
-
function parseRangeText(text, cv) {
|
|
363
|
+
function parseRangeText(text, cv, presets) {
|
|
364
|
+
const bands = presets?.filter((p) => p.label.trim().toLowerCase() === text.toLowerCase()) ?? [];
|
|
365
|
+
if (bands.length > 1)
|
|
366
|
+
return null;
|
|
367
|
+
if (bands[0])
|
|
368
|
+
return { low: bands[0].low, high: bands[0].high };
|
|
364
369
|
const num = (part) => parseNumber(part, cv);
|
|
365
370
|
const upTo = /^up\s+to\s+(.+)$/i.exec(text);
|
|
366
371
|
if (upTo) {
|
|
@@ -35,7 +35,8 @@ export declare class GridEditingController<Row> {
|
|
|
35
35
|
/** The tokens of the writes waiting undos and redos noted, kept through `forgetSent` until their apply ends. */
|
|
36
36
|
private readonly openNotes;
|
|
37
37
|
/** Each cell's writes, for its `data-pending` and `data-invalid`: how many are out, the latest one's token, and
|
|
38
|
-
* whether that latest one was refused
|
|
38
|
+
* whether that latest one was refused, with the refusal's own words when it has some. An entry goes once nothing
|
|
39
|
+
* is out and it isn't refused. */
|
|
39
40
|
private readonly writes;
|
|
40
41
|
private writeStates;
|
|
41
42
|
private applyChain;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { gridCellKey, } from "./commit-model.js";
|
|
2
2
|
import { applyGridPending, carryGridPutBack, createGridHistory, gridEditValue, gridOverlayValue, gridHistoryValue, gridKeptValue, groupGridPendingByRow, groupGridPendingSettlement, keepGridPending, markGridPendingSettlement, planGridPendingAssignments, pressGridHistory, pruneGridEntry, pruneGridHistoryEntry, reconcileGridPending, recordGridHistory, revertGridHistoryPress, rollbackGridPending, } from "./editing-model.js";
|
|
3
3
|
import { setGridWriteStates } from "./write-states.js";
|
|
4
|
+
import { refusalWords } from "./refusal-sentence.js";
|
|
4
5
|
import { noteGridEdited } from "./undo-owner.js";
|
|
5
6
|
const confirmed = (outcome) => outcome ?? { status: "confirmed" };
|
|
6
7
|
export class GridEditingController {
|
|
@@ -293,8 +294,11 @@ export class GridEditingController {
|
|
|
293
294
|
if (!entry)
|
|
294
295
|
return;
|
|
295
296
|
entry.out -= 1;
|
|
296
|
-
|
|
297
|
+
const result = results[index];
|
|
298
|
+
if (entry.latest === token && result?.status === "failed") {
|
|
297
299
|
entry.invalid = true;
|
|
300
|
+
entry.reason = refusalWords(result.error) ?? undefined;
|
|
301
|
+
}
|
|
298
302
|
if (entry.out <= 0 && !entry.invalid)
|
|
299
303
|
this.writes.delete(key);
|
|
300
304
|
});
|
|
@@ -304,7 +308,11 @@ export class GridEditingController {
|
|
|
304
308
|
publishWriteStates(cells) {
|
|
305
309
|
const next = setGridWriteStates(this.writeStates, cells.map(({ rowId, columnId }) => {
|
|
306
310
|
const entry = this.writes.get(gridCellKey(rowId, columnId));
|
|
307
|
-
return {
|
|
311
|
+
return {
|
|
312
|
+
rowId,
|
|
313
|
+
columnId,
|
|
314
|
+
state: entry ? { pending: entry.out > 0, invalid: entry.invalid, reason: entry.reason } : null,
|
|
315
|
+
};
|
|
308
316
|
}));
|
|
309
317
|
if (next === this.writeStates)
|
|
310
318
|
return;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
import type { ViewsMessageResolver } from "../../contract.js";
|
|
2
2
|
import type { GridCommitRefusal } from "./commit-model.js";
|
|
3
|
+
/** An error's own words: an Error's message or a string, trimmed; null when it has none. A refused cell carries them as
|
|
4
|
+
* its reason (`GridWriteState.reason`). */
|
|
5
|
+
export declare function refusalWords(error: unknown): string | null;
|
|
3
6
|
export declare function gridRefusalSentence(refusal: GridCommitRefusal, fieldName: (columnId: string) => string, messages: ViewsMessageResolver): string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
function
|
|
1
|
+
export function refusalWords(error) {
|
|
2
2
|
const text = error instanceof Error ? error.message : typeof error === "string" ? error : "";
|
|
3
3
|
const trimmed = text.trim();
|
|
4
4
|
return trimmed === "" ? null : trimmed;
|
|
5
5
|
}
|
|
6
6
|
export function gridRefusalSentence(refusal, fieldName, messages) {
|
|
7
|
-
const reason =
|
|
7
|
+
const reason = refusalWords(refusal.error);
|
|
8
8
|
if (refusal.count === 1) {
|
|
9
9
|
return reason ?? messages({ key: "views.grid.commit-refused", values: { field: fieldName(refusal.columnIds[0]) } });
|
|
10
10
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Where each cell's writes stand, as the grid's states say it (`data-pending`, `data-invalid`): a write to it is
|
|
3
3
|
* still in flight, and the latest one sent was refused. Both can hold at once: an older write still out while the
|
|
4
|
-
* newest was refused. A cell with neither is absent, and a row with no such cell is absent.
|
|
4
|
+
* newest was refused. A cell with neither is absent, and a row with no such cell is absent. `reason` is the refusal's
|
|
5
|
+
* own words, while it is invalid and the app gave some: the cell's title and accessible description.
|
|
5
6
|
*/
|
|
6
7
|
export type GridWriteState = {
|
|
7
8
|
readonly pending: boolean;
|
|
8
9
|
readonly invalid: boolean;
|
|
10
|
+
readonly reason?: string;
|
|
9
11
|
};
|
|
10
12
|
/** By record id, then column id. A row with none is absent. */
|
|
11
13
|
export type GridWriteStateByRow = ReadonlyMap<string, Readonly<Record<string, GridWriteState>>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const sameState = (a, b) => a == null ? b == null : b != null && a.pending === b.pending && a.invalid === b.invalid;
|
|
1
|
+
const sameState = (a, b) => a == null ? b == null : b != null && a.pending === b.pending && a.invalid === b.invalid && a.reason === b.reason;
|
|
2
2
|
export function setGridWriteStates(byRow, cells) {
|
|
3
3
|
let next = null;
|
|
4
4
|
for (const { rowId, columnId, state } of cells) {
|
|
@@ -9,7 +9,11 @@ export function setGridWriteStates(byRow, cells) {
|
|
|
9
9
|
next ??= new Map(byRow);
|
|
10
10
|
const record = { ...current };
|
|
11
11
|
if (given)
|
|
12
|
-
record[columnId] = {
|
|
12
|
+
record[columnId] = {
|
|
13
|
+
pending: given.pending,
|
|
14
|
+
invalid: given.invalid,
|
|
15
|
+
...(given.invalid && given.reason !== undefined ? { reason: given.reason } : {}),
|
|
16
|
+
};
|
|
13
17
|
else
|
|
14
18
|
delete record[columnId];
|
|
15
19
|
if (Object.keys(record).length > 0)
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
/* THE GRID'S LOOK, by its options (GRID_LOOKS, grid/looks.ts): each rule under the option it draws, worn on a frame round the
|
|
2
|
+
grid as `data-grid-<option>="<value>"` (lookAttrs), and each option's default drawn with no frame too
|
|
3
|
+
(`:not([data-grid-<option>] *)`), so an app that wears no picks gets the default look, the Outright look's (My preset's). First drawn in the Showcase's ViewKit
|
|
4
|
+
add-on, after the table's canvas (UI Kit · sketch · table: Attio's look and the portal's). It reaches the grid only through
|
|
5
|
+
the contract: its named parts (data-slot), its states, the frame's options and the `data-kit` mark of ViewKit's own
|
|
6
|
+
controls, never a class it happens to use; and it reads only the contract's names (grid-tokens.ts, VK_GRID_TOKENS, beside
|
|
7
|
+
the grid's own geometry), never a colour or a length written in (grid-css.test.ts holds it to both). Plain CSS in no layer:
|
|
8
|
+
the ready stylesheet puts it after ViewKit's own classes, which it dresses; an app importing it by its door
|
|
9
|
+
(viewkitjs/views/grid.css) places it after them too. */
|
|
10
|
+
|
|
11
|
+
/* What an app may dress that the grid used to fix in its classes, at the Outright look's sizes: its timing the fast one, its
|
|
12
|
+
smallest words the 2xs size, a link's and a chip's underline the line's width 3 under the words (as the names' underline),
|
|
13
|
+
the fill handle's rim the focus width, and the chrome's keyboard focus a ring of the focus width in the focused line's
|
|
14
|
+
colour, in place of the brand's fill. */
|
|
15
|
+
[data-slot="vk-grid"] {
|
|
16
|
+
--vk-duration: var(--vk-duration-fast);
|
|
17
|
+
--vk-caption-text: var(--vk-font-size-2xs);
|
|
18
|
+
--vk-underline-offset: calc(var(--vk-spacing) * 0.75);
|
|
19
|
+
--vk-underline-width: var(--vk-border-width);
|
|
20
|
+
--vk-thick-line: var(--vk-focus-width);
|
|
21
|
+
--vk-focus-ring: inset 0 0 0 var(--vk-focus-width) var(--vk-border-brand);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* Header, Words (Attio's): a taller row, 36 at the default density, its words the text's colour at medium weight and the sm
|
|
25
|
+
size, its glyphs 14. Quiet is the grid's own: 32, its words subtle at 12. A computer's (data-desktop, the app's line): on
|
|
26
|
+
a phone Attio's header is the quiet one at the phone's size, which the grid's scale already draws. Under Words its glyphs stay quiet, the
|
|
27
|
+
subtle colour under the dark words (--vk-head-glyph-fg), read on the header, where --vk-fg-subtle is still the subtle
|
|
28
|
+
one; the grid draws them at 70% of it. */
|
|
29
|
+
[data-grid-header="words"] [data-slot="vk-grid"][data-desktop] [data-slot="vk-grid-header"],
|
|
30
|
+
[data-slot="vk-grid"][data-desktop] [data-slot="vk-grid-header"]:not([data-grid-header] *) {
|
|
31
|
+
--vk-head-h: calc(var(--vk-spacing) * 9 * var(--vk-scale));
|
|
32
|
+
--vk-head-text: calc(var(--vk-font-size-sm) * var(--vk-scale));
|
|
33
|
+
--vk-head-glyph: calc(var(--vk-spacing) * 3.5 * var(--vk-scale));
|
|
34
|
+
--vk-head-glyph-fg: var(--vk-fg-subtle);
|
|
35
|
+
}
|
|
36
|
+
[data-grid-header="words"] [data-slot="vk-grid"][data-desktop] [data-slot="vk-grid-header-cell"],
|
|
37
|
+
[data-slot="vk-grid"][data-desktop] [data-slot="vk-grid-header-cell"]:not([data-grid-header] *) {
|
|
38
|
+
--vk-fg-subtle: var(--vk-fg);
|
|
39
|
+
font-weight: var(--vk-font-weight-medium);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Column lines: All is the grid's own lines, the rows' and the header's (verticalBorders, headerVerticalBorders). None draws
|
|
43
|
+
none. Pinned only (Attio's): the line All draws, on the pinned name's edge alone, in the header and the rows, on the cells
|
|
44
|
+
the grid marks data-frozen, the grid's own lines off (gridLookProps). */
|
|
45
|
+
[data-grid-columns="pinned"] [data-slot="vk-grid-cell"][data-frozen],
|
|
46
|
+
[data-grid-columns="pinned"] [data-slot="vk-grid-header-cell"][data-frozen] {
|
|
47
|
+
border-right-style: solid;
|
|
48
|
+
border-right-width: var(--vk-border-width);
|
|
49
|
+
border-right-color: var(--vk-border-subtle);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Pinned edge: how the pinned name marks its edge once the grid is scrolled sideways, at the moment the grid shows its own
|
|
53
|
+
shadow (data-parked), beside Column lines' line, never in its place. Shadow is the grid's own and sets nothing. Fade,
|
|
54
|
+
Attio's at its measure, and Fade out are the grid's shadow itself, its colour and width set through its two variables: a
|
|
55
|
+
soft shade, or the ground the columns fade into. Line and Divider turn the shadow off and rule the last pinned column
|
|
56
|
+
(data-frozen-edge), a firmer line or a thick one. */
|
|
57
|
+
[data-grid-edge="fade"] [data-slot="vk-grid"] { --vk-frozen-shadow: var(--vk-frozen-fade); --vk-frozen-shadow-width: calc(var(--vk-spacing) * 7); }
|
|
58
|
+
[data-grid-edge="mask"] [data-slot="vk-grid"] { --vk-frozen-shadow: var(--vk-ground); --vk-frozen-shadow-width: calc(var(--vk-spacing) * 10); }
|
|
59
|
+
[data-grid-edge="line"] [data-slot="vk-grid"],
|
|
60
|
+
[data-grid-edge="divider"] [data-slot="vk-grid"],
|
|
61
|
+
[data-slot="vk-grid"]:not([data-grid-edge] *) {
|
|
62
|
+
--vk-frozen-shadow-width: 0;
|
|
63
|
+
}
|
|
64
|
+
[data-grid-edge="line"] [data-slot="vk-grid"][data-parked] [data-frozen-edge],
|
|
65
|
+
[data-slot="vk-grid"][data-parked] [data-frozen-edge]:not([data-grid-edge] *) {
|
|
66
|
+
border-right-style: solid;
|
|
67
|
+
border-right-width: var(--vk-border-width);
|
|
68
|
+
border-right-color: var(--vk-border-bold);
|
|
69
|
+
}
|
|
70
|
+
[data-grid-edge="divider"] [data-slot="vk-grid"][data-parked] [data-frozen-edge] {
|
|
71
|
+
border-right-style: solid;
|
|
72
|
+
border-right-width: calc(var(--vk-border-width) * 3);
|
|
73
|
+
border-right-color: var(--vk-border-input);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* Row lines, Off: no line under a row (its cells', its rail's and its tail's), and none where rows aren't drawn yet; the
|
|
77
|
+
header keeps its line, and the columns' lines stand or go by Column lines, so a cell loses only its foot. On is the grid's
|
|
78
|
+
own. */
|
|
79
|
+
[data-grid-lines="off"] [data-slot="vk-grid-row"] [data-slot="vk-grid-cell"] {
|
|
80
|
+
border-bottom-color: transparent;
|
|
81
|
+
}
|
|
82
|
+
[data-grid-lines="off"] [data-slot="vk-grid-row"] [data-slot="vk-grid-rail"],
|
|
83
|
+
[data-grid-lines="off"] [data-slot="vk-grid-row"] [data-slot="vk-grid-tail"],
|
|
84
|
+
[data-grid-lines="off"] [data-slot="vk-grid-gap"] {
|
|
85
|
+
--vk-border-subtle: transparent;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* Picked cell, Wash: the focused cell (data-focused) washed in the brand's lightest ground inside its frame. Ring: the frame
|
|
89
|
+
alone. */
|
|
90
|
+
[data-grid-cell="wash"] [data-slot="vk-grid-cell"][data-focused],
|
|
91
|
+
[data-slot="vk-grid-cell"][data-focused]:not([data-grid-cell] *) {
|
|
92
|
+
background-color: var(--vk-brand-subtlest);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* The two frames the grid draws round a cell, the hovered cell's and the picked cell's, on its four variables. Cell corners:
|
|
96
|
+
both frames' corners, which the grid ties, square or the small corner. Hover frame: the hovered cell's line, none, the
|
|
97
|
+
line's colour or its stronger one. Picked cell frame: the picked cell's line at rest, the brand's or the stronger line;
|
|
98
|
+
under the pointer and while editing it is the brand's either way. */
|
|
99
|
+
[data-grid-corners="square"] [data-slot="vk-grid"] { --vk-outline-radius: 0; }
|
|
100
|
+
[data-grid-corners="round"] [data-slot="vk-grid"],
|
|
101
|
+
[data-slot="vk-grid"]:not([data-grid-corners] *) { --vk-outline-radius: var(--vk-radius-sm); }
|
|
102
|
+
[data-grid-hover="none"] [data-slot="vk-grid"] { --vk-outline-hover: transparent; }
|
|
103
|
+
[data-grid-hover="subtle"] [data-slot="vk-grid"] { --vk-outline-hover: var(--vk-border); }
|
|
104
|
+
[data-grid-hover="strong"] [data-slot="vk-grid"],
|
|
105
|
+
[data-slot="vk-grid"]:not([data-grid-hover] *) { --vk-outline-hover: var(--vk-border-bold); }
|
|
106
|
+
[data-grid-frame="brand"] [data-slot="vk-grid"],
|
|
107
|
+
[data-slot="vk-grid"]:not([data-grid-frame] *) { --vk-outline: var(--vk-border-accent); }
|
|
108
|
+
[data-grid-frame="neutral"] [data-slot="vk-grid"] { --vk-outline: var(--vk-border-bold); }
|
|
109
|
+
[data-slot="vk-grid"] { --vk-outline-active: var(--vk-border-accent); }
|
|
110
|
+
|
|
111
|
+
/* A cell being edited in an editor that draws its own edge shows that edge alone: where ViewKit's Text editor or Number
|
|
112
|
+
editor stands in the cell (data-kit, CONTROLS.TextBody and NumberBody), the input draws the only edge round what is typed,
|
|
113
|
+
so the grid's outline, its brand line and its lift, stands down on the cell being edited (data-editing). Where the grid's
|
|
114
|
+
own editor stands its outline stays, and a cell at rest keeps it. */
|
|
115
|
+
[data-slot="vk-grid-cell"][data-editing]:has([data-kit="text-editor"], [data-kit="number-editor"]) [data-slot="vk-grid-outline"] {
|
|
116
|
+
display: none;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* A body over its cell has its own edge: while the grid's editor part holds ViewKit's Picker, Compound editor,
|
|
120
|
+
Values editor or Date editor, the cell being edited under it shows no outline, so the brand's line never peeks out under the
|
|
121
|
+
body's rounded corners. The grid's own editors keep it. */
|
|
122
|
+
:root:has([data-slot="vk-grid-editor"] [data-kit="picker"], [data-slot="vk-grid-editor"] [data-kit="compound-editor"], [data-slot="vk-grid-editor"] [data-kit="values-editor"], [data-slot="vk-grid-editor"] [data-kit="date-editor"]) [data-slot="vk-grid-cell"][data-editing] [data-slot="vk-grid-outline"] {
|
|
123
|
+
display: none;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* Picked rows: Tint, Attio's, keeps a picked row's own line, its tint alone saying it is picked (--vk-selection-edge). Tint
|
|
127
|
+
and line, the portal's, is the grid's own: the brand's line over the first picked row and under each. */
|
|
128
|
+
[data-grid-picked="tint"] [data-slot="vk-grid"] {
|
|
129
|
+
--vk-selection-edge: transparent;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* Groups: Compact, Attio's, the groups closing together under the one row of titles (--vk-group-gap); in both ways the group
|
|
133
|
+
after a folded one stands right under it (data-collapsed). A head that rows pass under casts a shadow (data-stuck). */
|
|
134
|
+
[data-grid-groups="compact"] [data-slot="vk-grid"] {
|
|
135
|
+
--vk-group-gap: 0;
|
|
136
|
+
}
|
|
137
|
+
[data-slot="vk-grid-group"][data-collapsed] + [data-slot="vk-grid-group"] {
|
|
138
|
+
--vk-group-gap: 0;
|
|
139
|
+
}
|
|
140
|
+
[data-slot="vk-grid-group-head"][data-stuck] {
|
|
141
|
+
box-shadow: var(--vk-shadow-sm);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* Names, Underlined (Attio's): a record's name underlined at rest and under the pointer, a line of the line's width in the
|
|
145
|
+
strong line colour, 3 under the words (vk-grid-title). On hover is the grid's own. */
|
|
146
|
+
[data-grid-names="underline"] [data-slot="vk-grid-title"] {
|
|
147
|
+
text-decoration-line: underline;
|
|
148
|
+
text-decoration-color: var(--vk-border-bold);
|
|
149
|
+
text-decoration-thickness: var(--vk-border-width);
|
|
150
|
+
text-underline-offset: calc(var(--vk-spacing) * 0.75);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* Phones, Link (Attio's): a checked phone in the link's colour, the brand's as the grid draws a link and a domain, with the
|
|
154
|
+
names' underline at rest, on the display's vk-phone while it is a link (data-cell-link). A phone with nothing to dial is
|
|
155
|
+
text and stays as it is. As text is the grid's own. Under the pointer the grid's own brand underline is drawn over it.
|
|
156
|
+
Before Phones as typed, whose look stands on top of it. */
|
|
157
|
+
[data-grid-phones="link"] [data-slot="vk-phone"][data-cell-link] {
|
|
158
|
+
color: var(--vk-fg-brand);
|
|
159
|
+
text-decoration-line: underline;
|
|
160
|
+
text-decoration-color: var(--vk-border-bold);
|
|
161
|
+
text-decoration-thickness: var(--vk-border-width);
|
|
162
|
+
text-underline-offset: calc(var(--vk-spacing) * 0.75);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* Phones as typed: a phone no parser read, which the display draws as typed and marks data-as-typed on its vk-phone, on top of
|
|
166
|
+
Phones' look. Each value dresses the phone itself, the line and the colour reaching its words: Dotted line, Attio's look's,
|
|
167
|
+
a dotted line in the warning's colour at the focus width; Subtle, the portal's, its words subtle, as the grid draws a value
|
|
168
|
+
that isn't one of its field's options; Dot, the warning's dot before it in the link's own gap, at the grid's scale; Tinted,
|
|
169
|
+
the warning's ground under it. None is the display's own, its title alone. Under the pointer the grid's own look stays the
|
|
170
|
+
one drawn: its brand underline, its brand colour. */
|
|
171
|
+
[data-grid-typed="dotted"] [data-slot="vk-phone"][data-as-typed],
|
|
172
|
+
[data-slot="vk-phone"][data-as-typed]:not([data-grid-typed] *) {
|
|
173
|
+
text-decoration-line: underline;
|
|
174
|
+
text-decoration-style: dotted;
|
|
175
|
+
text-decoration-color: var(--vk-warning);
|
|
176
|
+
text-decoration-thickness: var(--vk-focus-width);
|
|
177
|
+
text-underline-offset: calc(var(--vk-spacing) * 0.75);
|
|
178
|
+
}
|
|
179
|
+
[data-grid-typed="subtle"] [data-slot="vk-phone"][data-as-typed] {
|
|
180
|
+
color: var(--vk-fg-subtle);
|
|
181
|
+
}
|
|
182
|
+
@media (hover: hover) {
|
|
183
|
+
[data-grid-typed="dotted"] [data-slot="vk-phone"][data-as-typed]:hover,
|
|
184
|
+
[data-slot="vk-phone"][data-as-typed]:hover:not([data-grid-typed] *) {
|
|
185
|
+
text-decoration-line: none;
|
|
186
|
+
}
|
|
187
|
+
[data-grid-typed="subtle"] [data-slot="vk-phone"][data-as-typed]:hover {
|
|
188
|
+
color: var(--vk-fg-brand);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
/* Dot: a phone with a digit is the display's link, a flex row whose gap stands after the dot; one with none is its text, a
|
|
192
|
+
block, where the dot is an inline block in the line, as wide as the dot and the link's gap, the dot painted at its start.
|
|
193
|
+
In the link flex-basis holds it to the dot alone, so the gap is the link's own either way. */
|
|
194
|
+
[data-grid-typed="dot"] [data-slot="vk-phone"][data-as-typed]::before {
|
|
195
|
+
content: "";
|
|
196
|
+
display: inline-block;
|
|
197
|
+
vertical-align: middle;
|
|
198
|
+
flex: none;
|
|
199
|
+
flex-basis: calc(var(--vk-spacing) * 1.5 * var(--vk-scale));
|
|
200
|
+
inline-size: calc(var(--vk-spacing) * 1.5 * (var(--vk-scale) + 1));
|
|
201
|
+
block-size: calc(var(--vk-spacing) * 1.5 * var(--vk-scale));
|
|
202
|
+
background: radial-gradient(circle closest-side, var(--vk-warning-bold) 100%, transparent 100%) no-repeat 0 / calc(var(--vk-spacing) * 1.5 * var(--vk-scale)) calc(var(--vk-spacing) * 1.5 * var(--vk-scale));
|
|
203
|
+
}
|
|
204
|
+
[data-grid-typed="tint"] [data-slot="vk-phone"][data-as-typed] {
|
|
205
|
+
background-color: var(--vk-warning-subtler);
|
|
206
|
+
border-radius: var(--vk-radius-xs);
|
|
207
|
+
padding-inline: var(--vk-spacing);
|
|
208
|
+
margin-inline-start: calc(var(--vk-spacing) * -1);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/* Figures, Value first (Attio's): the footer's value, then its word in lower case, "13 count", and an empty cell's offer
|
|
212
|
+
"+ Add calculation" under the pointer, its words the app's message (views.grid.figure-pick), its "+" drawn here
|
|
213
|
+
(vk-grid-figure-*). Word first is the grid's own: the word in capitals before the value, "Calculate". */
|
|
214
|
+
[data-grid-figures="value"] [data-slot="vk-grid-figure-value"] {
|
|
215
|
+
order: -1;
|
|
216
|
+
color: var(--vk-fg);
|
|
217
|
+
font-weight: var(--vk-font-weight-medium);
|
|
218
|
+
}
|
|
219
|
+
[data-grid-figures="value"] [data-slot="vk-grid-figure-label"] {
|
|
220
|
+
text-transform: lowercase;
|
|
221
|
+
letter-spacing: normal;
|
|
222
|
+
color: var(--vk-fg-subtlest);
|
|
223
|
+
}
|
|
224
|
+
[data-grid-figures="value"] [data-slot="vk-grid-figure-pick"] {
|
|
225
|
+
text-transform: none;
|
|
226
|
+
letter-spacing: normal;
|
|
227
|
+
}
|
|
228
|
+
[data-grid-figures="value"] [data-slot="vk-grid-figure-pick"]::before {
|
|
229
|
+
content: "+";
|
|
230
|
+
content: "+" / "";
|
|
231
|
+
margin-right: var(--vk-spacing);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/* Pressed while its menu is open, in every look: a header cell while its column's menu is, a footer cell while its figure
|
|
235
|
+
picker is, and + Add column's corner of the header while its menu is (data-open). */
|
|
236
|
+
[data-slot="vk-grid-header-cell"][data-open],
|
|
237
|
+
[data-slot="vk-grid-footer-cell"][data-open],
|
|
238
|
+
[data-slot="vk-grid-header"] [data-slot="vk-grid-tail"]:has([data-open]) {
|
|
239
|
+
background-color: var(--vk-pressed);
|
|
240
|
+
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import type { GridGroupMenuPart } from "./chrome/grid-group-menu-parts.js";
|
|
2
2
|
import { type LookPicks, type PieceLooks } from "../looks/looks.js";
|
|
3
3
|
export type GridLookOptionId = "header" | "lines" | "columns" | "density" | "phone" | "name" | "edge" | "boxes" | "icon" | "picked" | "cell" | "corners" | "hover" | "frame" | "groups" | "names" | "phones" | "typed" | "figures" | "width" | "more" | "wait" | "foot" | "add" | "picking";
|
|
4
|
-
/** The grid's options and its two looks, attio
|
|
4
|
+
/** The grid's options and its two looks, attio and portal. Nothing picked wears each option's default, My preset's grid look
|
|
5
|
+
* (the Decisions of 25 Nov 2026: "My preset from the station is the look and ViewKit's default"), which differs from Attio's
|
|
6
|
+
* in ten options: its column lines all, its pinned edge a line, its checkboxes always, picked rows tinted and lined, round
|
|
7
|
+
* cell corners, a strong hover frame, groups under their own titles, names and phones as the grid draws them, its figures
|
|
8
|
+
* word first. */
|
|
5
9
|
export declare const GRID_LOOKS: PieceLooks<GridLookOptionId>;
|
|
6
10
|
/** What the grid's code reads of its options; the rest are its look stylesheet's alone. */
|
|
7
11
|
export type GridLookWorn = {
|