@viewkitjs/views 0.0.0-stage → 0.2.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 +615 -0
- package/LICENSE.md +7 -0
- package/README.md +99 -2
- package/dist/atoms/CommandMenu.d.ts +2 -0
- package/dist/atoms/CommandMenu.js +20 -0
- package/dist/atoms/List.d.ts +2 -0
- package/dist/atoms/List.js +6 -0
- package/dist/atoms/LoadMore.d.ts +2 -0
- package/dist/atoms/LoadMore.js +25 -0
- package/dist/atoms/Loading.d.ts +2 -0
- package/dist/atoms/Loading.js +7 -0
- package/dist/atoms/PlatformMark.d.ts +2 -0
- package/dist/atoms/PlatformMark.js +4 -0
- package/dist/atoms/RelationLink.d.ts +2 -0
- package/dist/atoms/RelationLink.js +6 -0
- package/dist/atoms/Row.d.ts +3 -0
- package/dist/atoms/Row.js +30 -0
- package/dist/atoms/RowMenu.d.ts +2 -0
- package/dist/atoms/RowMenu.js +112 -0
- package/dist/atoms/StatusBadge.d.ts +2 -0
- package/dist/atoms/StatusBadge.js +7 -0
- package/dist/atoms/StatusMarker.d.ts +2 -0
- package/dist/atoms/StatusMarker.js +19 -0
- package/dist/atoms/Tag.d.ts +2 -0
- package/dist/atoms/Tag.js +13 -0
- package/dist/atoms/TickBox.d.ts +2 -0
- package/dist/atoms/TickBox.js +8 -0
- package/dist/atoms/defaults.d.ts +2 -0
- package/dist/atoms/defaults.js +27 -0
- package/dist/atoms/tones.d.ts +5 -0
- package/dist/atoms/tones.js +28 -0
- package/dist/atoms/types.d.ts +178 -0
- package/dist/atoms/types.js +3 -0
- package/dist/cells/cell-format.d.ts +138 -0
- package/dist/cells/cell-format.js +16 -0
- package/dist/cells/cell-title.d.ts +17 -0
- package/dist/cells/cell-title.js +8 -0
- package/dist/cells/cell-values.d.ts +28 -0
- package/dist/cells/cell-values.js +87 -0
- package/dist/cells/index.d.ts +4 -0
- package/dist/cells/index.js +4 -0
- package/dist/cells/legacy-field.d.ts +52 -0
- package/dist/cells/legacy-field.js +164 -0
- package/dist/cells/relation-wrap.d.ts +3 -0
- package/dist/cells/relation-wrap.js +24 -0
- package/dist/cells/use-cell-format.d.ts +5 -0
- package/dist/cells/use-cell-format.js +10 -0
- package/dist/contract.d.ts +461 -0
- package/dist/contract.js +682 -0
- package/dist/display/actor.d.ts +4 -0
- package/dist/display/actor.js +26 -0
- package/dist/display/boolean.d.ts +18 -0
- package/dist/display/boolean.js +43 -0
- package/dist/display/breakdown.d.ts +15 -0
- package/dist/display/breakdown.js +32 -0
- package/dist/display/currency.d.ts +9 -0
- package/dist/display/currency.js +29 -0
- package/dist/display/date.d.ts +12 -0
- package/dist/display/date.js +26 -0
- package/dist/display/display-cores.d.ts +31 -0
- package/dist/display/display-cores.js +57 -0
- package/dist/display/entity-chip.d.ts +26 -0
- package/dist/display/entity-chip.js +9 -0
- package/dist/display/format.d.ts +66 -0
- package/dist/display/format.js +190 -0
- package/dist/display/index.d.ts +8 -0
- package/dist/display/index.js +7 -0
- package/dist/display/link.d.ts +29 -0
- package/dist/display/link.js +50 -0
- package/dist/display/location.d.ts +8 -0
- package/dist/display/location.js +22 -0
- package/dist/display/multi-value.d.ts +18 -0
- package/dist/display/multi-value.js +28 -0
- package/dist/display/name.d.ts +6 -0
- package/dist/display/name.js +14 -0
- package/dist/display/number.d.ts +11 -0
- package/dist/display/number.js +27 -0
- package/dist/display/options.d.ts +153 -0
- package/dist/display/options.js +1 -0
- package/dist/display/percent.d.ts +4 -0
- package/dist/display/percent.js +40 -0
- package/dist/display/phone.d.ts +11 -0
- package/dist/display/phone.js +45 -0
- package/dist/display/range.d.ts +6 -0
- package/dist/display/range.js +29 -0
- package/dist/display/relation.d.ts +4 -0
- package/dist/display/relation.js +29 -0
- package/dist/display/rich-text.d.ts +10 -0
- package/dist/display/rich-text.js +34 -0
- package/dist/display/select.d.ts +6 -0
- package/dist/display/select.js +38 -0
- package/dist/display/text-class.d.ts +23 -0
- package/dist/display/text-class.js +5 -0
- package/dist/display/text.d.ts +19 -0
- package/dist/display/text.js +8 -0
- package/dist/display/use-display-options.d.ts +2 -0
- package/dist/display/use-display-options.js +14 -0
- package/dist/display/user.d.ts +11 -0
- package/dist/display/user.js +10 -0
- package/dist/display/value-list.d.ts +10 -0
- package/dist/display/value-list.js +12 -0
- package/dist/display/viewer.d.ts +4 -0
- package/dist/display/viewer.js +11 -0
- package/dist/display/web-href.d.ts +8 -0
- package/dist/display/web-href.js +12 -0
- package/dist/editors/ChipsEditor.d.ts +59 -0
- package/dist/editors/ChipsEditor.js +73 -0
- package/dist/editors/DateEditor.d.ts +25 -0
- package/dist/editors/DateEditor.js +122 -0
- package/dist/editors/LocationEditor.d.ts +22 -0
- package/dist/editors/LocationEditor.js +228 -0
- package/dist/editors/NameEditor.d.ts +22 -0
- package/dist/editors/NameEditor.js +92 -0
- package/dist/editors/NumberEditor.d.ts +67 -0
- package/dist/editors/NumberEditor.js +86 -0
- package/dist/editors/RangeEditor.d.ts +22 -0
- package/dist/editors/RangeEditor.js +70 -0
- package/dist/editors/RelationEditor.d.ts +65 -0
- package/dist/editors/RelationEditor.js +64 -0
- package/dist/editors/SelectEditor.d.ts +72 -0
- package/dist/editors/SelectEditor.js +59 -0
- package/dist/editors/ValueListEditor.d.ts +38 -0
- package/dist/editors/ValueListEditor.js +217 -0
- package/dist/editors/edit-cores.d.ts +83 -0
- package/dist/editors/edit-cores.js +38 -0
- package/dist/editors/edit-session.d.ts +74 -0
- package/dist/editors/edit-session.js +35 -0
- package/dist/editors/open-values.d.ts +28 -0
- package/dist/editors/open-values.js +26 -0
- package/dist/editors/relation-source.d.ts +66 -0
- package/dist/editors/relation-source.js +102 -0
- package/dist/fields/binding.d.ts +87 -0
- package/dist/fields/binding.js +117 -0
- package/dist/fields/currency.d.ts +82 -0
- package/dist/fields/currency.js +41 -0
- package/dist/fields/denomination.d.ts +42 -0
- package/dist/fields/denomination.js +11 -0
- package/dist/fields/edit-core-types.d.ts +40 -0
- package/dist/fields/edit-core-types.js +29 -0
- package/dist/fields/format-knobs.d.ts +34 -0
- package/dist/fields/format-knobs.js +36 -0
- package/dist/fields/menus.d.ts +28 -0
- package/dist/fields/menus.js +1 -0
- package/dist/fields/money.d.ts +60 -0
- package/dist/fields/money.js +78 -0
- package/dist/fields/number-edit.d.ts +11 -0
- package/dist/fields/number-edit.js +17 -0
- package/dist/fields/prepare-write.d.ts +55 -0
- package/dist/fields/prepare-write.js +67 -0
- package/dist/fields/relation-source-types.d.ts +54 -0
- package/dist/fields/relation-source-types.js +1 -0
- package/dist/figures.d.ts +52 -0
- package/dist/figures.js +63 -0
- package/dist/filters/date-filter.d.ts +2 -0
- package/dist/filters/date-filter.js +1 -0
- package/dist/filters/filter-model.d.ts +176 -0
- package/dist/filters/filter-model.js +41 -0
- package/dist/filters/number-filter.d.ts +2 -0
- package/dist/filters/number-filter.js +1 -0
- package/dist/filters/range-filter.d.ts +2 -0
- package/dist/filters/range-filter.js +1 -0
- package/dist/filters/registry.d.ts +103 -0
- package/dist/filters/registry.js +8 -0
- package/dist/filters/relation-filter.d.ts +16 -0
- package/dist/filters/relation-filter.js +53 -0
- package/dist/filters/text-filter.d.ts +2 -0
- package/dist/filters/text-filter.js +1 -0
- package/dist/grid/chrome/GridAddColumn.d.ts +11 -0
- package/dist/grid/chrome/GridAddColumn.js +29 -0
- package/dist/grid/chrome/GridAggregateMenu.d.ts +31 -0
- package/dist/grid/chrome/GridAggregateMenu.js +27 -0
- package/dist/grid/chrome/GridCellEditors.d.ts +64 -0
- package/dist/grid/chrome/GridCellEditors.js +55 -0
- package/dist/grid/chrome/GridCellOutline.d.ts +70 -0
- package/dist/grid/chrome/GridCellOutline.js +21 -0
- package/dist/grid/chrome/GridChipsEditor.d.ts +28 -0
- package/dist/grid/chrome/GridChipsEditor.js +40 -0
- package/dist/grid/chrome/GridColumnColorSection.d.ts +11 -0
- package/dist/grid/chrome/GridColumnColorSection.js +40 -0
- package/dist/grid/chrome/GridColumnDateSection.d.ts +23 -0
- package/dist/grid/chrome/GridColumnDateSection.js +23 -0
- package/dist/grid/chrome/GridColumnDurationSection.d.ts +19 -0
- package/dist/grid/chrome/GridColumnDurationSection.js +24 -0
- package/dist/grid/chrome/GridColumnMenu.d.ts +101 -0
- package/dist/grid/chrome/GridColumnMenu.js +99 -0
- package/dist/grid/chrome/GridColumnNumberSection.d.ts +25 -0
- package/dist/grid/chrome/GridColumnNumberSection.js +27 -0
- package/dist/grid/chrome/GridColumnPercentSection.d.ts +15 -0
- package/dist/grid/chrome/GridColumnPercentSection.js +16 -0
- package/dist/grid/chrome/GridColumnSortSection.d.ts +18 -0
- package/dist/grid/chrome/GridColumnSortSection.js +16 -0
- package/dist/grid/chrome/GridDateEditor.d.ts +22 -0
- package/dist/grid/chrome/GridDateEditor.js +31 -0
- package/dist/grid/chrome/GridFlyout.d.ts +44 -0
- package/dist/grid/chrome/GridFlyout.js +80 -0
- package/dist/grid/chrome/GridFooter.d.ts +23 -0
- package/dist/grid/chrome/GridFooter.js +81 -0
- package/dist/grid/chrome/GridGroupMenu.d.ts +37 -0
- package/dist/grid/chrome/GridGroupMenu.js +57 -0
- package/dist/grid/chrome/GridHeader.d.ts +61 -0
- package/dist/grid/chrome/GridHeader.js +37 -0
- package/dist/grid/chrome/GridLongTextEditor.d.ts +36 -0
- package/dist/grid/chrome/GridLongTextEditor.js +127 -0
- package/dist/grid/chrome/GridMenuRow.d.ts +15 -0
- package/dist/grid/chrome/GridMenuRow.js +15 -0
- package/dist/grid/chrome/GridNameEditor.d.ts +19 -0
- package/dist/grid/chrome/GridNameEditor.js +36 -0
- package/dist/grid/chrome/GridNumberEditor.d.ts +35 -0
- package/dist/grid/chrome/GridNumberEditor.js +25 -0
- package/dist/grid/chrome/GridRangeEditor.d.ts +20 -0
- package/dist/grid/chrome/GridRangeEditor.js +25 -0
- package/dist/grid/chrome/GridRelationEditor.d.ts +21 -0
- package/dist/grid/chrome/GridRelationEditor.js +30 -0
- package/dist/grid/chrome/GridResizeHandle.d.ts +19 -0
- package/dist/grid/chrome/GridResizeHandle.js +19 -0
- package/dist/grid/chrome/GridRow.d.ts +25 -0
- package/dist/grid/chrome/GridRow.js +136 -0
- package/dist/grid/chrome/GridRowActions.d.ts +32 -0
- package/dist/grid/chrome/GridRowActions.js +25 -0
- package/dist/grid/chrome/GridRowCells.d.ts +4 -0
- package/dist/grid/chrome/GridRowCells.js +133 -0
- package/dist/grid/chrome/GridRowGlyph.d.ts +12 -0
- package/dist/grid/chrome/GridRowGlyph.js +13 -0
- package/dist/grid/chrome/GridSelectEditor.d.ts +18 -0
- package/dist/grid/chrome/GridSelectEditor.js +49 -0
- package/dist/grid/chrome/GridStructure.d.ts +48 -0
- package/dist/grid/chrome/GridStructure.js +45 -0
- package/dist/grid/chrome/GridTable.d.ts +4 -0
- package/dist/grid/chrome/GridTable.js +125 -0
- package/dist/grid/chrome/GridTableSurface.d.ts +15 -0
- package/dist/grid/chrome/GridTableSurface.js +6 -0
- package/dist/grid/chrome/GridTextEditor.d.ts +11 -0
- package/dist/grid/chrome/GridTextEditor.js +40 -0
- package/dist/grid/chrome/GridValueListEditor.d.ts +18 -0
- package/dist/grid/chrome/GridValueListEditor.js +36 -0
- package/dist/grid/chrome/StuckMarker.d.ts +16 -0
- package/dist/grid/chrome/StuckMarker.js +34 -0
- package/dist/grid/chrome/cell-clipboard.d.ts +9 -0
- package/dist/grid/chrome/cell-clipboard.js +28 -0
- package/dist/grid/chrome/cells.d.ts +21 -0
- package/dist/grid/chrome/cells.js +20 -0
- package/dist/grid/chrome/checks.d.ts +35 -0
- package/dist/grid/chrome/checks.js +22 -0
- package/dist/grid/chrome/column-glyph.d.ts +14 -0
- package/dist/grid/chrome/column-glyph.js +44 -0
- package/dist/grid/chrome/editors.d.ts +9 -0
- package/dist/grid/chrome/editors.js +10 -0
- package/dist/grid/chrome/grid-cell-classes.d.ts +59 -0
- package/dist/grid/chrome/grid-cell-classes.js +30 -0
- package/dist/grid/chrome/grid-menu-search.d.ts +7 -0
- package/dist/grid/chrome/grid-menu-search.js +7 -0
- package/dist/grid/chrome/grid-row-props.d.ts +131 -0
- package/dist/grid/chrome/grid-row-props.js +1 -0
- package/dist/grid/chrome/grid-styles.d.ts +37 -0
- package/dist/grid/chrome/grid-styles.js +8 -0
- package/dist/grid/chrome/grid-table-props.d.ts +173 -0
- package/dist/grid/chrome/grid-table-props.js +1 -0
- package/dist/grid/chrome/useGridBatchApi.d.ts +34 -0
- package/dist/grid/chrome/useGridBatchApi.js +35 -0
- package/dist/grid/chrome/useGridColumnLayout.d.ts +30 -0
- package/dist/grid/chrome/useGridColumnLayout.js +206 -0
- package/dist/grid/chrome/useGridHeaderDrag.d.ts +20 -0
- package/dist/grid/chrome/useGridHeaderDrag.js +37 -0
- package/dist/grid/chrome/useGridKeyboard.d.ts +47 -0
- package/dist/grid/chrome/useGridKeyboard.js +274 -0
- package/dist/grid/chrome/useGridPendingReconciliation.d.ts +12 -0
- package/dist/grid/chrome/useGridPendingReconciliation.js +32 -0
- package/dist/grid/chrome/useGridRailReveal.d.ts +57 -0
- package/dist/grid/chrome/useGridRailReveal.js +67 -0
- package/dist/grid/chrome/useGridRangeActions.d.ts +49 -0
- package/dist/grid/chrome/useGridRangeActions.js +188 -0
- package/dist/grid/chrome/useGridRangeGestures.d.ts +32 -0
- package/dist/grid/chrome/useGridRangeGestures.js +190 -0
- package/dist/grid/chrome/useGridRowContextMenu.d.ts +35 -0
- package/dist/grid/chrome/useGridRowContextMenu.js +127 -0
- package/dist/grid/chrome/useGridScaleStyles.d.ts +1 -0
- package/dist/grid/chrome/useGridScaleStyles.js +29 -0
- package/dist/grid/chrome/useGridScrollSync.d.ts +38 -0
- package/dist/grid/chrome/useGridScrollSync.js +176 -0
- package/dist/grid/chrome/useGridTableInteractionModel.d.ts +55 -0
- package/dist/grid/chrome/useGridTableInteractionModel.js +197 -0
- package/dist/grid/chrome/useGridTableSelection.d.ts +29 -0
- package/dist/grid/chrome/useGridTableSelection.js +55 -0
- package/dist/grid/chrome/useHeaderDragReorder.d.ts +21 -0
- package/dist/grid/chrome/useHeaderDragReorder.js +216 -0
- package/dist/grid/core/clipboard-model.d.ts +81 -0
- package/dist/grid/core/clipboard-model.js +291 -0
- package/dist/grid/core/column-values.d.ts +27 -0
- package/dist/grid/core/column-values.js +76 -0
- package/dist/grid/core/commit-model.d.ts +34 -0
- package/dist/grid/core/commit-model.js +3 -0
- package/dist/grid/core/coordinates.d.ts +48 -0
- package/dist/grid/core/coordinates.js +27 -0
- package/dist/grid/core/edit-values.d.ts +9 -0
- package/dist/grid/core/edit-values.js +1 -0
- package/dist/grid/core/editing-controller.d.ts +59 -0
- package/dist/grid/core/editing-controller.js +240 -0
- package/dist/grid/core/editing-model.d.ts +78 -0
- package/dist/grid/core/editing-model.js +136 -0
- package/dist/grid/core/grid-scale.d.ts +14 -0
- package/dist/grid/core/grid-scale.js +8 -0
- package/dist/grid/core/nav.d.ts +94 -0
- package/dist/grid/core/nav.js +92 -0
- package/dist/grid/core/pending-reconciliation.d.ts +50 -0
- package/dist/grid/core/pending-reconciliation.js +49 -0
- package/dist/grid/core/range-model.d.ts +25 -0
- package/dist/grid/core/range-model.js +59 -0
- package/dist/grid/core/spreadsheet-operations.d.ts +85 -0
- package/dist/grid/core/spreadsheet-operations.js +253 -0
- package/dist/grid/core/useGridEditing.d.ts +43 -0
- package/dist/grid/core/useGridEditing.js +90 -0
- package/dist/grid/core/useGridRange.d.ts +20 -0
- package/dist/grid/core/useGridRange.js +24 -0
- package/dist/grid/core/value-equality.d.ts +32 -0
- package/dist/grid/core/value-equality.js +34 -0
- package/dist/grid/index.d.ts +18 -0
- package/dist/grid/index.js +5 -0
- package/dist/grid/useGridTablePrefs.d.ts +50 -0
- package/dist/grid/useGridTablePrefs.js +101 -0
- package/dist/grouping/sort-groups.d.ts +18 -0
- package/dist/grouping/sort-groups.js +33 -0
- package/dist/grouping/types.d.ts +10 -0
- package/dist/grouping/types.js +1 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +28 -0
- package/dist/internal/chip.d.ts +4 -0
- package/dist/internal/chip.js +3 -0
- package/dist/internal/cx.d.ts +3 -0
- package/dist/internal/cx.js +3 -0
- package/dist/internal/viewport.d.ts +5 -0
- package/dist/internal/viewport.js +29 -0
- package/dist/model/aggregates.d.ts +59 -0
- package/dist/model/aggregates.js +186 -0
- package/dist/model/card-density.d.ts +8 -0
- package/dist/model/card-density.js +10 -0
- package/dist/model/card-layout.d.ts +85 -0
- package/dist/model/card-layout.js +90 -0
- package/dist/model/column-capabilities.d.ts +162 -0
- package/dist/model/column-capabilities.js +233 -0
- package/dist/model/column-filters.d.ts +106 -0
- package/dist/model/column-filters.js +321 -0
- package/dist/model/column-format.d.ts +103 -0
- package/dist/model/column-format.js +1 -0
- package/dist/model/column-from.d.ts +28 -0
- package/dist/model/column-from.js +160 -0
- package/dist/model/column-inspect.d.ts +18 -0
- package/dist/model/column-inspect.js +6 -0
- package/dist/model/column-knobs.d.ts +20 -0
- package/dist/model/column-knobs.js +16 -0
- package/dist/model/column-money.d.ts +13 -0
- package/dist/model/column-money.js +27 -0
- package/dist/model/column-order.d.ts +36 -0
- package/dist/model/column-order.js +68 -0
- package/dist/model/column-schema.d.ts +335 -0
- package/dist/model/column-schema.js +1 -0
- package/dist/model/column-sort.d.ts +17 -0
- package/dist/model/column-sort.js +11 -0
- package/dist/model/column-state.d.ts +77 -0
- package/dist/model/column-state.js +95 -0
- package/dist/model/column-types.d.ts +109 -0
- package/dist/model/column-types.js +50 -0
- package/dist/model/column-warnings.d.ts +44 -0
- package/dist/model/column-warnings.js +24 -0
- package/dist/model/density.d.ts +3 -0
- package/dist/model/density.js +13 -0
- package/dist/model/field-type-of.d.ts +21 -0
- package/dist/model/field-type-of.js +11 -0
- package/dist/model/filter-capabilities.d.ts +1 -0
- package/dist/model/filter-capabilities.js +1 -0
- package/dist/model/index.d.ts +38 -0
- package/dist/model/index.js +20 -0
- package/dist/model/part-rows.d.ts +28 -0
- package/dist/model/part-rows.js +40 -0
- package/dist/model/preferences.d.ts +155 -0
- package/dist/model/preferences.js +84 -0
- package/dist/model/prefs-buckets.d.ts +173 -0
- package/dist/model/prefs-buckets.js +71 -0
- package/dist/model/relation-filters.d.ts +45 -0
- package/dist/model/relation-filters.js +78 -0
- package/dist/model/render-count.d.ts +2 -0
- package/dist/model/render-count.js +24 -0
- package/dist/model/row-icon.d.ts +23 -0
- package/dist/model/row-icon.js +5 -0
- package/dist/model/view-rules.d.ts +73 -0
- package/dist/model/view-rules.js +216 -0
- package/dist/provider/ViewsProvider.d.ts +26 -0
- package/dist/provider/ViewsProvider.js +16 -0
- package/dist/provider/components.d.ts +230 -0
- package/dist/provider/components.js +3 -0
- package/dist/provider/context.d.ts +20 -0
- package/dist/provider/context.js +10 -0
- package/dist/provider/icons.d.ts +6 -0
- package/dist/provider/icons.js +1 -0
- package/dist/provider/menu-groups.d.ts +8 -0
- package/dist/provider/menu-groups.js +38 -0
- package/dist/provider/ports.d.ts +57 -0
- package/dist/provider/ports.js +9 -0
- package/dist/react.d.ts +9 -0
- package/dist/react.js +4 -0
- package/dist/selection/SelectCheckbox.d.ts +17 -0
- package/dist/selection/SelectCheckbox.js +11 -0
- package/dist/selection/index.d.ts +7 -0
- package/dist/selection/index.js +6 -0
- package/dist/selection/model.d.ts +55 -0
- package/dist/selection/model.js +86 -0
- package/dist/selection/row-click.d.ts +35 -0
- package/dist/selection/row-click.js +20 -0
- package/dist/selection/types.d.ts +17 -0
- package/dist/selection/types.js +1 -0
- package/dist/selection/useCheckDragSelect.d.ts +61 -0
- package/dist/selection/useCheckDragSelect.js +165 -0
- package/dist/selection/useListSelection.d.ts +39 -0
- package/dist/selection/useListSelection.js +48 -0
- package/dist/selection/useListSelectionShortcuts.d.ts +6 -0
- package/dist/selection/useListSelectionShortcuts.js +14 -0
- package/dist/selection/useRestIntent.d.ts +18 -0
- package/dist/selection/useRestIntent.js +35 -0
- package/docs/contract.md +525 -0
- package/docs/getting-started.md +250 -0
- package/docs/guides/atoms.md +245 -0
- package/docs/guides/cells.md +302 -0
- package/docs/guides/columns.md +412 -0
- package/docs/guides/display.md +203 -0
- package/docs/guides/editors.md +404 -0
- package/docs/guides/ports.md +246 -0
- package/docs/guides/selection.md +270 -0
- package/docs/guides/the-grid.md +677 -0
- package/docs/guides/the-provider.md +446 -0
- package/docs/index.md +50 -0
- package/docs/install.md +67 -0
- package/docs/reference/cells.md +28 -0
- package/docs/reference/display.md +42 -0
- package/docs/reference/editors-chips.md +6 -0
- package/docs/reference/editors-date.md +6 -0
- package/docs/reference/editors-location.md +10 -0
- package/docs/reference/editors-name.md +6 -0
- package/docs/reference/editors-number.md +11 -0
- package/docs/reference/editors-open-values.md +9 -0
- package/docs/reference/editors-range.md +6 -0
- package/docs/reference/editors-relation.md +9 -0
- package/docs/reference/editors-select.md +8 -0
- package/docs/reference/editors-session.md +9 -0
- package/docs/reference/editors-value-list.md +6 -0
- package/docs/reference/editors.md +5 -0
- package/docs/reference/grid.md +39 -0
- package/docs/reference/react.md +86 -0
- package/docs/reference/selection.md +33 -0
- package/docs/reference/views.md +601 -0
- package/docs/reshaping.md +19 -0
- package/package.json +118 -3
- package/skills/views/SKILL.md +102 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { FieldDefinitionError, } from "@viewkitjs/fields";
|
|
2
|
+
import { columnLabel } from "../model/column-capabilities.js";
|
|
3
|
+
import { prettifyOptionValue } from "../model/column-state.js";
|
|
4
|
+
import { fieldTypeOf } from "../model/field-type-of.js";
|
|
5
|
+
export function legacyFieldFromColumn(col) {
|
|
6
|
+
const base = { key: col.id, label: columnLabel(col) };
|
|
7
|
+
if (!col.type) {
|
|
8
|
+
throw new FieldDefinitionError(col.id, "has no column type, so there is no storage type to synthesize a field from");
|
|
9
|
+
}
|
|
10
|
+
switch (col.type) {
|
|
11
|
+
case "title":
|
|
12
|
+
throw new FieldDefinitionError(col.id, "a title is a column ROLE, not a storage type — the list draws it and synthesizes no field");
|
|
13
|
+
case "text":
|
|
14
|
+
return { ...base, type: "text", ...(col.format?.long && { format: { long: true } }) };
|
|
15
|
+
case "url":
|
|
16
|
+
return { ...base, type: "url", ...(col.multiple && { multiple: true }) };
|
|
17
|
+
case "domain":
|
|
18
|
+
return { ...base, type: "domain", ...(col.multiple && { multiple: true }) };
|
|
19
|
+
case "email":
|
|
20
|
+
return { ...base, type: "email", ...(col.multiple && { multiple: true }) };
|
|
21
|
+
case "relation":
|
|
22
|
+
return {
|
|
23
|
+
...base,
|
|
24
|
+
type: "relation",
|
|
25
|
+
relation: { kind: (col.relation?.entity ?? "") },
|
|
26
|
+
};
|
|
27
|
+
case "select":
|
|
28
|
+
return { ...base, type: "select", options: optionsOf(col.options) };
|
|
29
|
+
case "status":
|
|
30
|
+
return { ...base, type: "status", options: statusOptionsOf(col.options) };
|
|
31
|
+
case "multiselect":
|
|
32
|
+
return {
|
|
33
|
+
...base,
|
|
34
|
+
type: "multiselect",
|
|
35
|
+
vocabulary: "custom-values",
|
|
36
|
+
...(col.options && { options: optionsOf(col.options) }),
|
|
37
|
+
};
|
|
38
|
+
case "boolean": {
|
|
39
|
+
const options = booleanOptions(col.options);
|
|
40
|
+
return {
|
|
41
|
+
...base,
|
|
42
|
+
type: "boolean",
|
|
43
|
+
...(col.format?.booleanDisplay && { format: { style: col.format.booleanDisplay } }),
|
|
44
|
+
...(options && { options }),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
case "date":
|
|
48
|
+
return {
|
|
49
|
+
...base,
|
|
50
|
+
type: "date",
|
|
51
|
+
...(col.format?.dateStyle && { format: { dateStyle: col.format.dateStyle } }),
|
|
52
|
+
};
|
|
53
|
+
case "datetime": {
|
|
54
|
+
const format = dateFormatOf(col.format);
|
|
55
|
+
return { ...base, type: "datetime", ...(format && { format }) };
|
|
56
|
+
}
|
|
57
|
+
case "percent":
|
|
58
|
+
return {
|
|
59
|
+
...base,
|
|
60
|
+
type: "percent",
|
|
61
|
+
...((col.format?.decimals !== undefined || col.format?.percentDisplay) && {
|
|
62
|
+
format: {
|
|
63
|
+
...(col.format?.decimals !== undefined && { decimals: col.format.decimals }),
|
|
64
|
+
...(col.format?.percentDisplay && { display: col.format.percentDisplay }),
|
|
65
|
+
},
|
|
66
|
+
}),
|
|
67
|
+
};
|
|
68
|
+
case "currency":
|
|
69
|
+
return {
|
|
70
|
+
...base,
|
|
71
|
+
type: "currency",
|
|
72
|
+
code: { fixed: col.format?.currency ?? "EUR" },
|
|
73
|
+
format: legacyCurrencyFormat(col.format),
|
|
74
|
+
};
|
|
75
|
+
case "user":
|
|
76
|
+
return { ...base, type: "user" };
|
|
77
|
+
case "phone":
|
|
78
|
+
return { ...base, type: "phone", ...(col.multiple && { multiple: true }) };
|
|
79
|
+
case "location":
|
|
80
|
+
return { ...base, type: "location" };
|
|
81
|
+
case "name":
|
|
82
|
+
return { ...base, type: "name" };
|
|
83
|
+
case "actor":
|
|
84
|
+
return { ...base, type: "actor" };
|
|
85
|
+
case "rich_text":
|
|
86
|
+
return { ...base, type: "rich_text" };
|
|
87
|
+
case "range":
|
|
88
|
+
return { ...base, type: "range", of: "number" };
|
|
89
|
+
case "number": {
|
|
90
|
+
const format = legacyNumberFormat(col.format);
|
|
91
|
+
return { ...base, type: "number", ...(format && { format }) };
|
|
92
|
+
}
|
|
93
|
+
default: {
|
|
94
|
+
const unhandled = col.type;
|
|
95
|
+
throw new FieldDefinitionError(col.id, `has an unmapped column type (${String(unhandled)}) — no field can be synthesized from it`);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function optionsOf(options) {
|
|
100
|
+
return (options ?? []).map((option) => ({
|
|
101
|
+
...option,
|
|
102
|
+
label: option.label ?? prettifyOptionValue(option.value),
|
|
103
|
+
}));
|
|
104
|
+
}
|
|
105
|
+
function statusOptionsOf(options) {
|
|
106
|
+
return optionsOf(options).map((option) => ({ ...option, slot: option.slot ?? "muted" }));
|
|
107
|
+
}
|
|
108
|
+
function booleanOptions(options) {
|
|
109
|
+
const on = options?.find((option) => option.value === "true");
|
|
110
|
+
const off = options?.find((option) => option.value === "false");
|
|
111
|
+
if (!on && !off)
|
|
112
|
+
return undefined;
|
|
113
|
+
return [
|
|
114
|
+
{ ...on, value: "true", label: on?.label ?? "Yes" },
|
|
115
|
+
{ ...off, value: "false", label: off?.label ?? "No" },
|
|
116
|
+
];
|
|
117
|
+
}
|
|
118
|
+
function dateFormatOf(format) {
|
|
119
|
+
const out = {
|
|
120
|
+
...(format?.dateStyle && { dateStyle: format.dateStyle }),
|
|
121
|
+
...(format?.withTime !== undefined && { withTime: format.withTime }),
|
|
122
|
+
};
|
|
123
|
+
return Object.keys(out).length ? out : undefined;
|
|
124
|
+
}
|
|
125
|
+
function numberKnobs(format) {
|
|
126
|
+
return {
|
|
127
|
+
...(format.decimals !== undefined && { decimals: format.decimals }),
|
|
128
|
+
...(format.suffix !== undefined && { suffix: format.suffix }),
|
|
129
|
+
...(format.signed !== undefined && { signed: format.signed }),
|
|
130
|
+
...(format.signedTone !== undefined && { signedTone: format.signedTone }),
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
export function legacyNumberFormat(format) {
|
|
134
|
+
if (!format)
|
|
135
|
+
return undefined;
|
|
136
|
+
const knobs = numberKnobs(format);
|
|
137
|
+
if (format.style === "duration") {
|
|
138
|
+
return {
|
|
139
|
+
...knobs,
|
|
140
|
+
style: "duration",
|
|
141
|
+
...(format.unit && { unit: format.unit }),
|
|
142
|
+
...(format.durationStyle && { durationStyle: format.durationStyle }),
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
return { ...knobs, style: "plain" };
|
|
146
|
+
}
|
|
147
|
+
export function legacyCurrencyFormat(format) {
|
|
148
|
+
return format ? numberKnobs(format) : {};
|
|
149
|
+
}
|
|
150
|
+
export function legacyNumberLikeFormat(col) {
|
|
151
|
+
const format = col.format;
|
|
152
|
+
switch (fieldTypeOf(col)) {
|
|
153
|
+
case "percent":
|
|
154
|
+
return { style: "percent", ...(format ? numberKnobs(format) : {}) };
|
|
155
|
+
case "currency":
|
|
156
|
+
return {
|
|
157
|
+
style: "currency",
|
|
158
|
+
currency: format?.currency ?? "EUR",
|
|
159
|
+
...(format ? numberKnobs(format) : {}),
|
|
160
|
+
};
|
|
161
|
+
default:
|
|
162
|
+
return legacyNumberFormat(format);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { CHIP_INTERACTIVE } from "../internal/chip.js";
|
|
4
|
+
import { useViews } from "../provider/context.js";
|
|
5
|
+
export function listRelationWrap(opts) {
|
|
6
|
+
if (opts?.slotOwnsClick)
|
|
7
|
+
return undefined;
|
|
8
|
+
const onOpenRelation = opts?.onOpenRelation;
|
|
9
|
+
if (onOpenRelation) {
|
|
10
|
+
return function openRelationWrap(relation, chip) {
|
|
11
|
+
return (_jsx("button", { type: "button", "data-no-nav": true, title: relation.label, onClick: (event) => {
|
|
12
|
+
event.stopPropagation();
|
|
13
|
+
onOpenRelation(relation);
|
|
14
|
+
}, className: CHIP_INTERACTIVE, children: chip }));
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
return function appRelationWrap(relation, chip) {
|
|
18
|
+
return _jsx(AppRelationLink, { relation: relation, children: chip });
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function AppRelationLink({ relation, children }) {
|
|
22
|
+
const { RelationLink } = useViews().atoms;
|
|
23
|
+
return _jsx(RelationLink, { relation: relation, children: children });
|
|
24
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { DEFAULT_FIELD_PRESENTATION } from "../display/format.js";
|
|
4
|
+
import { viewerFrom } from "../display/viewer.js";
|
|
5
|
+
import { useViews } from "../provider/context.js";
|
|
6
|
+
export function useCellFormat() {
|
|
7
|
+
const { conventions, messages, presentation } = useViews();
|
|
8
|
+
const applied = useMemo(() => presentation?.(DEFAULT_FIELD_PRESENTATION), [presentation]);
|
|
9
|
+
return { viewer: viewerFrom(conventions, messages), presentation: applied };
|
|
10
|
+
}
|
|
@@ -0,0 +1,461 @@
|
|
|
1
|
+
import type { CityWord, PercentDisplay, PostalWord, RegionWord } from "@viewkitjs/fields";
|
|
2
|
+
type FigureKind = "none" | "sum" | "avg" | "min" | "max" | "count" | "filled" | "unique" | "ratio";
|
|
3
|
+
type OptionColour = "gray" | "blue" | "green" | "amber" | "red" | "purple" | "pink" | "teal";
|
|
4
|
+
type DateStyle = "short" | "long" | "numeric" | "relative";
|
|
5
|
+
type DurationStyle = "adaptive" | "clock" | "units";
|
|
6
|
+
/** The prefix on what shares a global namespace: the CSS variables (`--vk-*`) and the
|
|
7
|
+
* `data-slot` values (`vk-grid-row`). States are bare `data-*` attributes on the
|
|
8
|
+
* package's own elements, and message keys live under `views.*`. */
|
|
9
|
+
export declare const VK_PREFIX: "vk";
|
|
10
|
+
/** The parts of the grid, as `data-slot` values. `data-slot` is one attribute shared by
|
|
11
|
+
* every component copy in an app, so each value carries the prefix. Board's arrive with
|
|
12
|
+
* the board. */
|
|
13
|
+
export declare const GRID_SLOTS: readonly ["vk-grid", "vk-grid-header", "vk-grid-header-cell", "vk-grid-row", "vk-grid-cell", "vk-grid-group", "vk-grid-group-header", "vk-grid-footer", "vk-grid-footer-cell", "vk-grid-rail", "vk-grid-tail", "vk-grid-row-more", "vk-grid-editor", "vk-grid-outline", "vk-grid-resize-handle", "vk-grid-column-menu", "vk-grid-flyout", "vk-grid-group-menu", "vk-grid-aggregate-menu"];
|
|
14
|
+
export type GridSlot = (typeof GRID_SLOTS)[number];
|
|
15
|
+
/** The flags the rendering styles, as `data-*` attributes present when true. */
|
|
16
|
+
export declare const GRID_STATES: readonly ["focused", "selected", "editing", "in-range", "range-edge", "pending", "invalid", "dragging", "empty", "frozen", "scrolled", "parked"];
|
|
17
|
+
export type GridState = (typeof GRID_STATES)[number];
|
|
18
|
+
/** The CSS variables the package owns: geometry and density. Its colours are `VK_COLOURS`, which the app declares.
|
|
19
|
+
* The last three are `densityStyle`'s, written on the root of a rows view an app draws itself. */
|
|
20
|
+
export declare const VK_TOKENS: readonly ["--vk-scale", "--vk-row-h", "--vk-head-h", "--vk-footer-h", "--vk-label-h", "--vk-line-h", "--vk-chrome-h", "--vk-px", "--vk-cell-py", "--vk-tail-py", "--vk-tail-pl", "--vk-rail-w", "--vk-rail-gap", "--vk-tail-w", "--vk-indent", "--vk-frozen-w", "--vk-scroll-mt", "--vk-glyph", "--vk-head-glyph", "--vk-text", "--vk-text-xs", "--vk-text-10", "--vk-head-text", "--vk-scrolled", "--vk-parked", "--vk-frozen-on", "--vk-row-py", "--vk-head-mb", "--vk-row-gap"];
|
|
21
|
+
export type VkToken = (typeof VK_TOKENS)[number];
|
|
22
|
+
/** The colours the rendering paints, each a CSS variable the APP declares — the package
|
|
23
|
+
* sets none, and names no variable of the app's own. An app maps each onto its tokens once
|
|
24
|
+
* (`docs/install.md` holds the block for stock shadcn). `--vk-hovered` and `--vk-pressed`
|
|
25
|
+
* are the ground's own: an app whose grounds each tune their states declares both wherever
|
|
26
|
+
* a ground declares its own, so a part takes the states of the ground nearest it. */
|
|
27
|
+
export declare const VK_COLOURS: readonly ["--vk-fg", "--vk-fg-subtle", "--vk-fg-subtlest", "--vk-fg-brand", "--vk-fg-selected", "--vk-fg-on-brand", "--vk-ground", "--vk-overlay", "--vk-hovered", "--vk-pressed", "--vk-neutral", "--vk-neutral-hovered", "--vk-brand", "--vk-brand-subtlest", "--vk-danger", "--vk-danger-subtlest", "--vk-border", "--vk-border-subtle", "--vk-border-bold", "--vk-border-brand"];
|
|
28
|
+
export type VkColour = (typeof VK_COLOURS)[number];
|
|
29
|
+
/** Colours the default atoms and the display read with a built-in fallback — the status
|
|
30
|
+
* hues and the category hues — so an app that declares none of them still reads right. */
|
|
31
|
+
export declare const VK_OPTIONAL_COLOURS: readonly ["--vk-success", "--vk-warning", "--vk-info", "--vk-label-blue", "--vk-label-green", "--vk-label-amber", "--vk-label-red", "--vk-label-purple", "--vk-label-pink", "--vk-label-teal"];
|
|
32
|
+
export type VkOptionalColour = (typeof VK_OPTIONAL_COLOURS)[number];
|
|
33
|
+
/** Layout the APP may declare, read with a built-in fallback. `--vk-gutter` is the side padding the
|
|
34
|
+
* page gives its content: the grid's rows run edge to edge and line their content up with it.
|
|
35
|
+
* Undeclared, it reads `0px` — a grid flush with its container. `--vk-pinned-top` is how far
|
|
36
|
+
* down the surface's own pinned chrome reaches (a drawer's tab strip, a pinned toolbar): the
|
|
37
|
+
* grid's sticky header row and each group's header stop under it. Undeclared, it reads `0px`. */
|
|
38
|
+
export declare const VK_OPTIONAL_LAYOUT: readonly ["--vk-gutter", "--vk-pinned-top"];
|
|
39
|
+
export type VkOptionalLayout = (typeof VK_OPTIONAL_LAYOUT)[number];
|
|
40
|
+
/** The grid's own machinery, set and read by the grid alone: prefixed because they share the
|
|
41
|
+
* global namespace, and not public. An app neither sets nor reads them, and they may change in
|
|
42
|
+
* any release. `--vk-drag-shift` is a header cell's offset while its column is dragged. */
|
|
43
|
+
export declare const VK_INTERNAL: readonly ["--vk-drag-shift"];
|
|
44
|
+
export type VkInternal = (typeof VK_INTERNAL)[number];
|
|
45
|
+
/** Internal families: a prefix, one variable per key after it. `--vk-col-w-<id>` is one
|
|
46
|
+
* column's resolved width, set on the grid's root for every visible column. */
|
|
47
|
+
export declare const VK_INTERNAL_FAMILIES: readonly ["--vk-col-w-"];
|
|
48
|
+
/** The primitives an app hands in through the provider. */
|
|
49
|
+
export declare const COMPONENT_NAMES: readonly ["Button", "Popover", "Tooltip", "Checkbox", "Menu", "Command", "Calendar", "Collapse", "Sheet", "AppIcon", "Markdown"];
|
|
50
|
+
export type ComponentName = (typeof COMPONENT_NAMES)[number];
|
|
51
|
+
/** The pieces the rendering is built from, and the app's own pieces it cannot draw itself (a command cell's verb menu, the row's right-click menu, where a relation goes, a wait, how a list asks for more). Each ships as a default; an app swaps any of them through the provider's `atoms`. */
|
|
52
|
+
export declare const ATOM_NAMES: readonly ["Row", "RowContent", "TickBox", "StatusBadge", "StatusMarker", "Tag", "List", "CommandMenu", "RelationLink", "Loading", "LoadMore", "PlatformMark", "RowMenu"];
|
|
53
|
+
export type AtomName = (typeof ATOM_NAMES)[number];
|
|
54
|
+
/** The default atoms' `data-slot` values: prefixed, like the grid's. */
|
|
55
|
+
export declare const ATOM_SLOTS: readonly ["vk-row", "vk-row-content", "vk-tick", "vk-status", "vk-marker", "vk-tag", "vk-list", "vk-command-menu", "vk-relation-link", "vk-loading", "vk-load-more", "vk-platform", "vk-row-menu"];
|
|
56
|
+
export type AtomSlot = (typeof ATOM_SLOTS)[number];
|
|
57
|
+
/** The default atoms' states. `chosen`, `disabled`, `muted`, `checked` and `open` are
|
|
58
|
+
* flags present when true; `status` carries the slot's name. */
|
|
59
|
+
export declare const ATOM_STATES: readonly ["chosen", "disabled", "muted", "checked", "open", "status", "platform"];
|
|
60
|
+
export type AtomState = (typeof ATOM_STATES)[number];
|
|
61
|
+
/** The runtime services an app hands in through the provider. */
|
|
62
|
+
export declare const PORT_NAMES: readonly ["toast", "haptics", "clipboard", "viewPrefs", "confirm"];
|
|
63
|
+
export type PortName = (typeof PORT_NAMES)[number];
|
|
64
|
+
/** The glyphs the rendering asks the app for, by what they mean, never by a
|
|
65
|
+
* library's name. The app maps each to its own icon component. */
|
|
66
|
+
export declare const ICON_NAMES: readonly ["text", "longText", "number", "percent", "currency", "date", "datetime", "duration", "boolean", "select", "status", "multiselect", "relation", "user", "url", "domain", "email", "phone", "location", "name", "actor", "rich_text", "range", "lookup", "rollup", "formula", "computed", "automation", "apiKey", "system", "add", "edit", "delete", "copy", "cut", "paste", "clear", "hide", "show", "lock", "pin", "wrap", "more", "close", "check", "warning", "drag", "resize", "open", "selectRow", "chevronDown", "chevronRight", "caretDown", "caretRight", "sortAsc", "sortDesc", "enter", "calendar", "time", "progress", "moveLeft", "moveRight", "group", "clearSort", "sortRowsUp", "sortRowsDown"];
|
|
67
|
+
export type ViewsIconName = (typeof ICON_NAMES)[number];
|
|
68
|
+
/** Every visible string the views package owns is a key under one of these. */
|
|
69
|
+
export declare const MESSAGE_NAMESPACES: readonly ["views.grid", "views.editors", "views.menus", "views.display"];
|
|
70
|
+
export type ViewsMessageNamespace = (typeof MESSAGE_NAMESPACES)[number];
|
|
71
|
+
/** A message the package emits: its key and the values a host may interpolate,
|
|
72
|
+
* never a sentence. A string `@viewkitjs/fields` already keys stays a fields
|
|
73
|
+
* message; this list holds only the views package's own. Closed, so a new key is
|
|
74
|
+
* a change here and a compile error in every exhaustive resolver (a `switch` with
|
|
75
|
+
* no default) that has not worded it. */
|
|
76
|
+
export type ViewsMessage = {
|
|
77
|
+
key: "views.editors.tag-remove";
|
|
78
|
+
values: {
|
|
79
|
+
label: string;
|
|
80
|
+
};
|
|
81
|
+
} | {
|
|
82
|
+
key: "views.editors.marker-resolve";
|
|
83
|
+
} | {
|
|
84
|
+
key: "views.editors.marker-no-reason";
|
|
85
|
+
} | {
|
|
86
|
+
key: "views.editors.range-low";
|
|
87
|
+
} | {
|
|
88
|
+
key: "views.editors.range-high";
|
|
89
|
+
} | {
|
|
90
|
+
key: "views.editors.name-given";
|
|
91
|
+
} | {
|
|
92
|
+
key: "views.editors.name-family";
|
|
93
|
+
} | {
|
|
94
|
+
key: "views.editors.name-full";
|
|
95
|
+
} | {
|
|
96
|
+
key: "views.editors.values-add";
|
|
97
|
+
} | {
|
|
98
|
+
key: "views.editors.values-label";
|
|
99
|
+
} | {
|
|
100
|
+
key: "views.editors.values-main";
|
|
101
|
+
} | {
|
|
102
|
+
key: "views.editors.values-make-main";
|
|
103
|
+
values: {
|
|
104
|
+
value: string;
|
|
105
|
+
};
|
|
106
|
+
} | {
|
|
107
|
+
key: "views.editors.values-remove";
|
|
108
|
+
values: {
|
|
109
|
+
value: string;
|
|
110
|
+
};
|
|
111
|
+
} | {
|
|
112
|
+
key: "views.editors.place-country";
|
|
113
|
+
} | {
|
|
114
|
+
key: "views.editors.place-country-search";
|
|
115
|
+
} | {
|
|
116
|
+
key: "views.editors.place-change-country";
|
|
117
|
+
} | {
|
|
118
|
+
key: "views.editors.place-region-search";
|
|
119
|
+
} | {
|
|
120
|
+
key: "views.editors.place-line1";
|
|
121
|
+
} | {
|
|
122
|
+
key: "views.editors.place-line2";
|
|
123
|
+
} | {
|
|
124
|
+
key: "views.editors.place-region-area";
|
|
125
|
+
} | {
|
|
126
|
+
key: "views.editors.place-region-county";
|
|
127
|
+
} | {
|
|
128
|
+
key: "views.editors.place-region-department";
|
|
129
|
+
} | {
|
|
130
|
+
key: "views.editors.place-region-district";
|
|
131
|
+
} | {
|
|
132
|
+
key: "views.editors.place-region-do-si";
|
|
133
|
+
} | {
|
|
134
|
+
key: "views.editors.place-region-emirate";
|
|
135
|
+
} | {
|
|
136
|
+
key: "views.editors.place-region-island";
|
|
137
|
+
} | {
|
|
138
|
+
key: "views.editors.place-region-oblast";
|
|
139
|
+
} | {
|
|
140
|
+
key: "views.editors.place-region-parish";
|
|
141
|
+
} | {
|
|
142
|
+
key: "views.editors.place-region-prefecture";
|
|
143
|
+
} | {
|
|
144
|
+
key: "views.editors.place-region-province";
|
|
145
|
+
} | {
|
|
146
|
+
key: "views.editors.place-region-state";
|
|
147
|
+
} | {
|
|
148
|
+
key: "views.editors.place-city-city";
|
|
149
|
+
} | {
|
|
150
|
+
key: "views.editors.place-city-district";
|
|
151
|
+
} | {
|
|
152
|
+
key: "views.editors.place-city-post-town";
|
|
153
|
+
} | {
|
|
154
|
+
key: "views.editors.place-city-suburb";
|
|
155
|
+
} | {
|
|
156
|
+
key: "views.editors.place-postal-eircode";
|
|
157
|
+
} | {
|
|
158
|
+
key: "views.editors.place-postal-pin";
|
|
159
|
+
} | {
|
|
160
|
+
key: "views.editors.place-postal-postal";
|
|
161
|
+
} | {
|
|
162
|
+
key: "views.editors.place-postal-zip";
|
|
163
|
+
} | {
|
|
164
|
+
key: "views.editors.place-required";
|
|
165
|
+
values: {
|
|
166
|
+
label: string;
|
|
167
|
+
};
|
|
168
|
+
} | {
|
|
169
|
+
key: "views.editors.place-region";
|
|
170
|
+
} | {
|
|
171
|
+
key: "views.menus.part-row";
|
|
172
|
+
values: {
|
|
173
|
+
field: string;
|
|
174
|
+
part: string;
|
|
175
|
+
};
|
|
176
|
+
} | {
|
|
177
|
+
key: "views.menus.sort-asc";
|
|
178
|
+
} | {
|
|
179
|
+
key: "views.menus.sort-desc";
|
|
180
|
+
} | {
|
|
181
|
+
key: "views.menus.sort-clear";
|
|
182
|
+
} | {
|
|
183
|
+
key: "views.menus.group-by";
|
|
184
|
+
values: {
|
|
185
|
+
field: string;
|
|
186
|
+
};
|
|
187
|
+
} | {
|
|
188
|
+
key: "views.menus.ungroup";
|
|
189
|
+
} | {
|
|
190
|
+
key: "views.menus.move-left";
|
|
191
|
+
} | {
|
|
192
|
+
key: "views.menus.move-right";
|
|
193
|
+
} | {
|
|
194
|
+
key: "views.menus.hide-column";
|
|
195
|
+
} | {
|
|
196
|
+
key: "views.menus.format";
|
|
197
|
+
} | {
|
|
198
|
+
key: "views.menus.date-style";
|
|
199
|
+
values: {
|
|
200
|
+
style: DateStyle;
|
|
201
|
+
};
|
|
202
|
+
} | {
|
|
203
|
+
key: "views.menus.show-time";
|
|
204
|
+
} | {
|
|
205
|
+
key: "views.menus.duration-style";
|
|
206
|
+
values: {
|
|
207
|
+
style: DurationStyle;
|
|
208
|
+
};
|
|
209
|
+
} | {
|
|
210
|
+
key: "views.menus.decimals";
|
|
211
|
+
} | {
|
|
212
|
+
key: "views.menus.automatic";
|
|
213
|
+
} | {
|
|
214
|
+
key: "views.menus.currency";
|
|
215
|
+
} | {
|
|
216
|
+
key: "views.menus.percent-display";
|
|
217
|
+
} | {
|
|
218
|
+
key: "views.menus.percent-display-option";
|
|
219
|
+
values: {
|
|
220
|
+
display: PercentDisplay;
|
|
221
|
+
};
|
|
222
|
+
} | {
|
|
223
|
+
key: "views.menus.colour";
|
|
224
|
+
values: {
|
|
225
|
+
colour: OptionColour;
|
|
226
|
+
};
|
|
227
|
+
} | {
|
|
228
|
+
key: "views.menus.colours-reset";
|
|
229
|
+
} | {
|
|
230
|
+
key: "views.menus.group-options";
|
|
231
|
+
} | {
|
|
232
|
+
key: "views.menus.group-sort";
|
|
233
|
+
} | {
|
|
234
|
+
key: "views.menus.search";
|
|
235
|
+
} | {
|
|
236
|
+
key: "views.menus.group-show";
|
|
237
|
+
} | {
|
|
238
|
+
key: "views.menus.group-count";
|
|
239
|
+
} | {
|
|
240
|
+
key: "views.menus.group-hide";
|
|
241
|
+
} | {
|
|
242
|
+
key: "views.menus.add-column-search";
|
|
243
|
+
} | {
|
|
244
|
+
key: "views.menus.add-column-no-match";
|
|
245
|
+
values: {
|
|
246
|
+
query: string;
|
|
247
|
+
};
|
|
248
|
+
} | {
|
|
249
|
+
key: "views.menus.add-column-all-shown";
|
|
250
|
+
} | {
|
|
251
|
+
key: "views.menus.copy";
|
|
252
|
+
} | {
|
|
253
|
+
key: "views.menus.cut";
|
|
254
|
+
} | {
|
|
255
|
+
key: "views.menus.paste";
|
|
256
|
+
} | {
|
|
257
|
+
key: "views.menus.clear";
|
|
258
|
+
} | {
|
|
259
|
+
key: "views.menus.edit";
|
|
260
|
+
} | {
|
|
261
|
+
key: "views.menus.row-open";
|
|
262
|
+
} | {
|
|
263
|
+
key: "views.menus.row-select";
|
|
264
|
+
values: {
|
|
265
|
+
selected: "true" | "false";
|
|
266
|
+
};
|
|
267
|
+
} | {
|
|
268
|
+
key: "views.menus.row-delete";
|
|
269
|
+
} | {
|
|
270
|
+
key: "views.menus.row-delete-confirm";
|
|
271
|
+
} | {
|
|
272
|
+
key: "views.menus.row-delete-failed";
|
|
273
|
+
} | {
|
|
274
|
+
key: "views.grid.figure";
|
|
275
|
+
values: {
|
|
276
|
+
kind: FigureKind;
|
|
277
|
+
};
|
|
278
|
+
} | {
|
|
279
|
+
key: "views.grid.figure-pick";
|
|
280
|
+
} | {
|
|
281
|
+
key: "views.grid.add-column";
|
|
282
|
+
} | {
|
|
283
|
+
key: "views.grid.loading";
|
|
284
|
+
} | {
|
|
285
|
+
key: "views.grid.select-row";
|
|
286
|
+
} | {
|
|
287
|
+
key: "views.grid.select-group";
|
|
288
|
+
} | {
|
|
289
|
+
key: "views.grid.select-all";
|
|
290
|
+
} | {
|
|
291
|
+
key: "views.grid.row-menu";
|
|
292
|
+
} | {
|
|
293
|
+
key: "views.grid.group-expand";
|
|
294
|
+
} | {
|
|
295
|
+
key: "views.grid.group-collapse";
|
|
296
|
+
} | {
|
|
297
|
+
key: "views.grid.change-value";
|
|
298
|
+
} | {
|
|
299
|
+
key: "views.grid.value";
|
|
300
|
+
} | {
|
|
301
|
+
key: "views.grid.edit-value";
|
|
302
|
+
} | {
|
|
303
|
+
key: "views.grid.read-only";
|
|
304
|
+
} | {
|
|
305
|
+
key: "views.grid.read-only-why";
|
|
306
|
+
} | {
|
|
307
|
+
key: "views.grid.locked";
|
|
308
|
+
values: {
|
|
309
|
+
field: string;
|
|
310
|
+
};
|
|
311
|
+
} | {
|
|
312
|
+
key: "views.grid.not-clearable";
|
|
313
|
+
} | {
|
|
314
|
+
key: "views.grid.computed";
|
|
315
|
+
values: {
|
|
316
|
+
from: string;
|
|
317
|
+
};
|
|
318
|
+
} | {
|
|
319
|
+
key: "views.grid.cell-read-only";
|
|
320
|
+
} | {
|
|
321
|
+
key: "views.grid.clear-none";
|
|
322
|
+
} | {
|
|
323
|
+
key: "views.grid.write-not-list";
|
|
324
|
+
} | {
|
|
325
|
+
key: "views.grid.write-not-boolean";
|
|
326
|
+
} | {
|
|
327
|
+
key: "views.grid.write-marker";
|
|
328
|
+
} | {
|
|
329
|
+
key: "views.grid.write-not-email";
|
|
330
|
+
} | {
|
|
331
|
+
key: "views.grid.write-not-url";
|
|
332
|
+
} | {
|
|
333
|
+
key: "views.grid.write-not-link";
|
|
334
|
+
} | {
|
|
335
|
+
key: "views.grid.write-not-linkable";
|
|
336
|
+
} | {
|
|
337
|
+
key: "views.grid.paste-refused";
|
|
338
|
+
} | {
|
|
339
|
+
key: "views.grid.paste-empty";
|
|
340
|
+
} | {
|
|
341
|
+
key: "views.grid.paste-not-number";
|
|
342
|
+
} | {
|
|
343
|
+
key: "views.grid.paste-not-duration";
|
|
344
|
+
} | {
|
|
345
|
+
key: "views.grid.paste-not-date";
|
|
346
|
+
} | {
|
|
347
|
+
key: "views.grid.paste-not-option";
|
|
348
|
+
values: {
|
|
349
|
+
value: string;
|
|
350
|
+
};
|
|
351
|
+
} | {
|
|
352
|
+
key: "views.grid.paste-ambiguous-option";
|
|
353
|
+
values: {
|
|
354
|
+
value: string;
|
|
355
|
+
};
|
|
356
|
+
} | {
|
|
357
|
+
key: "views.grid.paste-other-currency";
|
|
358
|
+
values: {
|
|
359
|
+
currency: string;
|
|
360
|
+
};
|
|
361
|
+
} | {
|
|
362
|
+
key: "views.grid.paste-pick";
|
|
363
|
+
values: {
|
|
364
|
+
value: string;
|
|
365
|
+
};
|
|
366
|
+
} | {
|
|
367
|
+
key: "views.grid.paste-not-linkable";
|
|
368
|
+
values: {
|
|
369
|
+
value: string;
|
|
370
|
+
};
|
|
371
|
+
} | {
|
|
372
|
+
key: "views.grid.paste-not-range";
|
|
373
|
+
} | {
|
|
374
|
+
key: "views.grid.paste-skipped";
|
|
375
|
+
values: {
|
|
376
|
+
count: number;
|
|
377
|
+
reason: string;
|
|
378
|
+
};
|
|
379
|
+
} | {
|
|
380
|
+
key: "views.grid.fill-skipped";
|
|
381
|
+
values: {
|
|
382
|
+
count: number;
|
|
383
|
+
reason: string;
|
|
384
|
+
};
|
|
385
|
+
} | {
|
|
386
|
+
key: "views.grid.changed-elsewhere";
|
|
387
|
+
values: {
|
|
388
|
+
field: string;
|
|
389
|
+
};
|
|
390
|
+
} | {
|
|
391
|
+
key: "views.grid.changed-elsewhere-cells";
|
|
392
|
+
values: {
|
|
393
|
+
count: number;
|
|
394
|
+
};
|
|
395
|
+
} | {
|
|
396
|
+
key: "views.grid.saved-value";
|
|
397
|
+
} | {
|
|
398
|
+
key: "views.grid.saved-values";
|
|
399
|
+
} | {
|
|
400
|
+
key: "views.grid.row-left";
|
|
401
|
+
} | {
|
|
402
|
+
key: "views.display.just-now";
|
|
403
|
+
} | {
|
|
404
|
+
key: "views.display.in";
|
|
405
|
+
values: {
|
|
406
|
+
count: number;
|
|
407
|
+
unit: "m" | "h" | "d" | "w" | "mo" | "y";
|
|
408
|
+
};
|
|
409
|
+
} | {
|
|
410
|
+
key: "views.display.today";
|
|
411
|
+
} | {
|
|
412
|
+
key: "views.display.yesterday";
|
|
413
|
+
} | {
|
|
414
|
+
key: "views.display.tomorrow";
|
|
415
|
+
} | {
|
|
416
|
+
key: "views.display.month";
|
|
417
|
+
values: {
|
|
418
|
+
month: number;
|
|
419
|
+
length: "short" | "long";
|
|
420
|
+
};
|
|
421
|
+
} | {
|
|
422
|
+
key: "views.display.not-an-option";
|
|
423
|
+
} | {
|
|
424
|
+
key: "views.display.needs-attention";
|
|
425
|
+
} | {
|
|
426
|
+
key: "views.display.boolean";
|
|
427
|
+
values: {
|
|
428
|
+
value: "true" | "false";
|
|
429
|
+
};
|
|
430
|
+
} | {
|
|
431
|
+
key: "views.display.show-all";
|
|
432
|
+
values: {
|
|
433
|
+
count: number;
|
|
434
|
+
};
|
|
435
|
+
} | {
|
|
436
|
+
key: "views.display.show-more";
|
|
437
|
+
} | {
|
|
438
|
+
key: "views.display.show-less";
|
|
439
|
+
} | {
|
|
440
|
+
key: "views.display.phone-extension";
|
|
441
|
+
values: {
|
|
442
|
+
extension: string;
|
|
443
|
+
};
|
|
444
|
+
} | {
|
|
445
|
+
key: "views.display.phone-as-typed";
|
|
446
|
+
};
|
|
447
|
+
export type ViewsMessageKey = ViewsMessage["key"];
|
|
448
|
+
/** A place's word, as a message key: the region, city or postal-code word a country's format names
|
|
449
|
+
* (`placeFormat(code).words` in `@viewkitjs/fields`). */
|
|
450
|
+
export type PlaceWordKey = Extract<ViewsMessageKey, `views.editors.place-${"region" | "city" | "postal"}-${string}`>;
|
|
451
|
+
/** The message key for a place's word: `placeWordKey("region", "county")` is `views.editors.place-region-county`. */
|
|
452
|
+
export declare function placeWordKey(kind: "region", word: RegionWord): PlaceWordKey;
|
|
453
|
+
export declare function placeWordKey(kind: "city", word: CityWord): PlaceWordKey;
|
|
454
|
+
export declare function placeWordKey(kind: "postal", word: PostalWord): PlaceWordKey;
|
|
455
|
+
export declare const VIEWS_MESSAGE_KEYS: readonly ["views.editors.tag-remove", "views.editors.marker-resolve", "views.editors.marker-no-reason", "views.editors.range-low", "views.editors.range-high", "views.editors.name-given", "views.editors.name-family", "views.editors.name-full", "views.editors.values-add", "views.editors.values-label", "views.editors.values-main", "views.editors.values-make-main", "views.editors.values-remove", "views.editors.place-country", "views.editors.place-country-search", "views.editors.place-change-country", "views.editors.place-region-search", "views.editors.place-line1", "views.editors.place-line2", "views.editors.place-region-area", "views.editors.place-region-county", "views.editors.place-region-department", "views.editors.place-region-district", "views.editors.place-region-do-si", "views.editors.place-region-emirate", "views.editors.place-region-island", "views.editors.place-region-oblast", "views.editors.place-region-parish", "views.editors.place-region-prefecture", "views.editors.place-region-province", "views.editors.place-region-state", "views.editors.place-city-city", "views.editors.place-city-district", "views.editors.place-city-post-town", "views.editors.place-city-suburb", "views.editors.place-postal-eircode", "views.editors.place-postal-pin", "views.editors.place-postal-postal", "views.editors.place-postal-zip", "views.editors.place-required", "views.editors.place-region", "views.menus.part-row", "views.menus.sort-asc", "views.menus.sort-desc", "views.menus.sort-clear", "views.menus.group-by", "views.menus.ungroup", "views.menus.move-left", "views.menus.move-right", "views.menus.hide-column", "views.menus.format", "views.menus.date-style", "views.menus.show-time", "views.menus.duration-style", "views.menus.decimals", "views.menus.automatic", "views.menus.currency", "views.menus.percent-display", "views.menus.percent-display-option", "views.menus.colour", "views.menus.colours-reset", "views.menus.group-options", "views.menus.group-sort", "views.menus.search", "views.menus.group-show", "views.menus.group-count", "views.menus.group-hide", "views.menus.add-column-search", "views.menus.add-column-no-match", "views.menus.add-column-all-shown", "views.menus.copy", "views.menus.cut", "views.menus.paste", "views.menus.clear", "views.menus.edit", "views.menus.row-open", "views.menus.row-select", "views.menus.row-delete", "views.menus.row-delete-confirm", "views.menus.row-delete-failed", "views.grid.figure", "views.grid.figure-pick", "views.grid.add-column", "views.grid.loading", "views.grid.select-row", "views.grid.select-group", "views.grid.select-all", "views.grid.row-menu", "views.grid.group-expand", "views.grid.group-collapse", "views.grid.change-value", "views.grid.value", "views.grid.edit-value", "views.grid.read-only", "views.grid.read-only-why", "views.grid.locked", "views.grid.not-clearable", "views.grid.computed", "views.grid.cell-read-only", "views.grid.clear-none", "views.grid.write-not-list", "views.grid.write-not-boolean", "views.grid.write-marker", "views.grid.write-not-email", "views.grid.write-not-url", "views.grid.write-not-link", "views.grid.write-not-linkable", "views.grid.paste-refused", "views.grid.paste-empty", "views.grid.paste-not-number", "views.grid.paste-not-duration", "views.grid.paste-not-date", "views.grid.paste-not-option", "views.grid.paste-ambiguous-option", "views.grid.paste-other-currency", "views.grid.paste-pick", "views.grid.paste-not-linkable", "views.grid.paste-not-range", "views.grid.paste-skipped", "views.grid.fill-skipped", "views.grid.changed-elsewhere", "views.grid.changed-elsewhere-cells", "views.grid.saved-value", "views.grid.saved-values", "views.grid.row-left", "views.display.just-now", "views.display.in", "views.display.today", "views.display.yesterday", "views.display.tomorrow", "views.display.month", "views.display.not-an-option", "views.display.needs-attention", "views.display.boolean", "views.display.show-all", "views.display.show-more", "views.display.show-less", "views.display.phone-extension", "views.display.phone-as-typed"];
|
|
456
|
+
/** What an app hands in: its wording for every message. A resolver that words
|
|
457
|
+
* only some keys calls `resolveViewsMessage` for the rest; the provider does not. */
|
|
458
|
+
export type ViewsMessageResolver = (message: ViewsMessage) => string;
|
|
459
|
+
/** The package's English, one line per key. */
|
|
460
|
+
export declare function resolveViewsMessage(message: ViewsMessage): string;
|
|
461
|
+
export {};
|