@nocopypaste/vue-grid 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/AGENTS.md +285 -0
- package/CHANGELOG.md +31 -0
- package/README.md +881 -2
- package/agent/api.json +2336 -0
- package/agent/api.md +632 -0
- package/agent/grid-config.schema.json +609 -0
- package/dist/agent/api.js +2301 -0
- package/dist/agent/api.js.map +1 -0
- package/dist/agent/index.js +8 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/agent/requirements.js +57 -0
- package/dist/agent/requirements.js.map +1 -0
- package/dist/agent/validate.js +181 -0
- package/dist/agent/validate.js.map +1 -0
- package/dist/base.css +1 -0
- package/dist/components/VGrid.js +6 -0
- package/dist/components/VGrid.js.map +1 -0
- package/dist/components/VGrid.vue_vue_type_script_setup_true_lang.js +759 -0
- package/dist/components/VGrid.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VGridCell.js +6 -0
- package/dist/components/VGridCell.js.map +1 -0
- package/dist/components/VGridCell.vue_vue_type_script_setup_true_lang.js +167 -0
- package/dist/components/VGridCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VGridCheckbox.js +6 -0
- package/dist/components/VGridCheckbox.js.map +1 -0
- package/dist/components/VGridCheckbox.vue_vue_type_script_setup_true_lang.js +39 -0
- package/dist/components/VGridCheckbox.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VGridColumnMenu.js +6 -0
- package/dist/components/VGridColumnMenu.js.map +1 -0
- package/dist/components/VGridColumnMenu.vue_vue_type_script_setup_true_lang.js +100 -0
- package/dist/components/VGridColumnMenu.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VGridFilterInput.js +6 -0
- package/dist/components/VGridFilterInput.js.map +1 -0
- package/dist/components/VGridFilterInput.vue_vue_type_script_setup_true_lang.js +89 -0
- package/dist/components/VGridFilterInput.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VGridFilterPanel.js +6 -0
- package/dist/components/VGridFilterPanel.js.map +1 -0
- package/dist/components/VGridFilterPanel.vue_vue_type_script_setup_true_lang.js +248 -0
- package/dist/components/VGridFilterPanel.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VGridFilterPopover.js +6 -0
- package/dist/components/VGridFilterPopover.js.map +1 -0
- package/dist/components/VGridFilterPopover.vue_vue_type_script_setup_true_lang.js +79 -0
- package/dist/components/VGridFilterPopover.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VGridGroupRow.js +6 -0
- package/dist/components/VGridGroupRow.js.map +1 -0
- package/dist/components/VGridGroupRow.vue_vue_type_script_setup_true_lang.js +49 -0
- package/dist/components/VGridGroupRow.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VGridHeader.js +6 -0
- package/dist/components/VGridHeader.js.map +1 -0
- package/dist/components/VGridHeader.vue_vue_type_script_setup_true_lang.js +130 -0
- package/dist/components/VGridHeader.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VGridMenu.js +6 -0
- package/dist/components/VGridMenu.js.map +1 -0
- package/dist/components/VGridMenu.vue_vue_type_script_setup_true_lang.js +133 -0
- package/dist/components/VGridMenu.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VGridPagination.js +6 -0
- package/dist/components/VGridPagination.js.map +1 -0
- package/dist/components/VGridPagination.vue_vue_type_script_setup_true_lang.js +102 -0
- package/dist/components/VGridPagination.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VGridPinnedRows.js +6 -0
- package/dist/components/VGridPinnedRows.js.map +1 -0
- package/dist/components/VGridPinnedRows.vue_vue_type_script_setup_true_lang.js +75 -0
- package/dist/components/VGridPinnedRows.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VGridResizeHandle.js +6 -0
- package/dist/components/VGridResizeHandle.js.map +1 -0
- package/dist/components/VGridResizeHandle.vue_vue_type_script_setup_true_lang.js +34 -0
- package/dist/components/VGridResizeHandle.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VGridRows.js +6 -0
- package/dist/components/VGridRows.js.map +1 -0
- package/dist/components/VGridRows.vue_vue_type_script_setup_true_lang.js +178 -0
- package/dist/components/VGridRows.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VGridSearch.js +6 -0
- package/dist/components/VGridSearch.js.map +1 -0
- package/dist/components/VGridSearch.vue_vue_type_script_setup_true_lang.js +46 -0
- package/dist/components/VGridSearch.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/components/VGridTotalCell.js +6 -0
- package/dist/components/VGridTotalCell.js.map +1 -0
- package/dist/components/VGridTotalCell.vue_vue_type_script_setup_true_lang.js +74 -0
- package/dist/components/VGridTotalCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/composables/useColumnDrag.js +79 -0
- package/dist/composables/useColumnDrag.js.map +1 -0
- package/dist/composables/useColumnResize.js +68 -0
- package/dist/composables/useColumnResize.js.map +1 -0
- package/dist/composables/useDataSource.js +47 -0
- package/dist/composables/useDataSource.js.map +1 -0
- package/dist/composables/useGridFilters.js +125 -0
- package/dist/composables/useGridFilters.js.map +1 -0
- package/dist/composables/useGridKeyboard.js +111 -0
- package/dist/composables/useGridKeyboard.js.map +1 -0
- package/dist/composables/useGridMenus.js +214 -0
- package/dist/composables/useGridMenus.js.map +1 -0
- package/dist/composables/useGridSelection.js +75 -0
- package/dist/composables/useGridSelection.js.map +1 -0
- package/dist/composables/usePinnedOffsets.js +61 -0
- package/dist/composables/usePinnedOffsets.js.map +1 -0
- package/dist/composables/usePinnedRows.js +58 -0
- package/dist/composables/usePinnedRows.js.map +1 -0
- package/dist/composables/useScrollEdges.js +27 -0
- package/dist/composables/useScrollEdges.js.map +1 -0
- package/dist/composables/useSubRows.js +101 -0
- package/dist/composables/useSubRows.js.map +1 -0
- package/dist/composables/useTotals.js +30 -0
- package/dist/composables/useTotals.js.map +1 -0
- package/dist/composables/useVirtualRows.js +160 -0
- package/dist/composables/useVirtualRows.js.map +1 -0
- package/dist/core/aggregate.js +39 -0
- package/dist/core/aggregate.js.map +1 -0
- package/dist/core/columns.js +106 -0
- package/dist/core/columns.js.map +1 -0
- package/dist/core/filter.js +218 -0
- package/dist/core/filter.js.map +1 -0
- package/dist/core/helpers.js +7 -0
- package/dist/core/helpers.js.map +1 -0
- package/dist/core/pagination.js +25 -0
- package/dist/core/pagination.js.map +1 -0
- package/dist/core/patch.js +41 -0
- package/dist/core/patch.js.map +1 -0
- package/dist/core/selection.js +15 -0
- package/dist/core/selection.js.map +1 -0
- package/dist/core/sort.js +36 -0
- package/dist/core/sort.js.map +1 -0
- package/dist/core/storage.js +36 -0
- package/dist/core/storage.js.map +1 -0
- package/dist/core/value.js +19 -0
- package/dist/core/value.js.map +1 -0
- package/dist/core/virtual.js +83 -0
- package/dist/core/virtual.js.map +1 -0
- package/dist/core.css +1 -0
- package/dist/features/aggregation.js +11 -0
- package/dist/features/aggregation.js.map +1 -0
- package/dist/features/columnGroups.js +9 -0
- package/dist/features/columnGroups.js.map +1 -0
- package/dist/features/columnPinning.js +11 -0
- package/dist/features/columnPinning.js.map +1 -0
- package/dist/features/columnReorder.js +12 -0
- package/dist/features/columnReorder.js.map +1 -0
- package/dist/features/columnResizing.js +11 -0
- package/dist/features/columnResizing.js.map +1 -0
- package/dist/features/columnVisibility.js +9 -0
- package/dist/features/columnVisibility.js.map +1 -0
- package/dist/features/filtering.js +13 -0
- package/dist/features/filtering.js.map +1 -0
- package/dist/features/index.js +38 -0
- package/dist/features/index.js.map +1 -0
- package/dist/features/keyboardNavigation.js +9 -0
- package/dist/features/keyboardNavigation.js.map +1 -0
- package/dist/features/menus.js +11 -0
- package/dist/features/menus.js.map +1 -0
- package/dist/features/pagination.js +9 -0
- package/dist/features/pagination.js.map +1 -0
- package/dist/features/rowPinning.js +11 -0
- package/dist/features/rowPinning.js.map +1 -0
- package/dist/features/selection.js +11 -0
- package/dist/features/selection.js.map +1 -0
- package/dist/features/serverData.js +9 -0
- package/dist/features/serverData.js.map +1 -0
- package/dist/features/sorting.js +9 -0
- package/dist/features/sorting.js.map +1 -0
- package/dist/features/subGrids.js +9 -0
- package/dist/features/subGrids.js.map +1 -0
- package/dist/features/virtualScrolling.js +9 -0
- package/dist/features/virtualScrolling.js.map +1 -0
- package/dist/index.js +67 -0
- package/dist/internal/RenderSlot.js +6 -0
- package/dist/internal/RenderSlot.js.map +1 -0
- package/dist/internal/anchor.js +41 -0
- package/dist/internal/anchor.js.map +1 -0
- package/dist/internal/clipboard.js +11 -0
- package/dist/internal/clipboard.js.map +1 -0
- package/dist/internal/context.js +11 -0
- package/dist/internal/context.js.map +1 -0
- package/dist/internal/dev.js +8 -0
- package/dist/internal/dev.js.map +1 -0
- package/dist/internal/features.js +9 -0
- package/dist/internal/features.js.map +1 -0
- package/dist/internal/supports.js +10 -0
- package/dist/internal/supports.js.map +1 -0
- package/dist/internal/touchHold.js +43 -0
- package/dist/internal/touchHold.js.map +1 -0
- package/dist/registry/plugin.js +25 -0
- package/dist/registry/plugin.js.map +1 -0
- package/dist/registry/registry.js +15 -0
- package/dist/registry/registry.js.map +1 -0
- package/dist/renderers/ActionButtonCell.js +6 -0
- package/dist/renderers/ActionButtonCell.js.map +1 -0
- package/dist/renderers/ActionButtonCell.vue_vue_type_script_setup_true_lang.js +44 -0
- package/dist/renderers/ActionButtonCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/ActionsMenuCell.js +6 -0
- package/dist/renderers/ActionsMenuCell.js.map +1 -0
- package/dist/renderers/ActionsMenuCell.vue_vue_type_script_setup_true_lang.js +75 -0
- package/dist/renderers/ActionsMenuCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/BooleanCell.js +6 -0
- package/dist/renderers/BooleanCell.js.map +1 -0
- package/dist/renderers/BooleanCell.vue_vue_type_script_setup_true_lang.js +45 -0
- package/dist/renderers/BooleanCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/ButtonGroupCell.js +6 -0
- package/dist/renderers/ButtonGroupCell.js.map +1 -0
- package/dist/renderers/ButtonGroupCell.vue_vue_type_script_setup_true_lang.js +46 -0
- package/dist/renderers/ButtonGroupCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/ChangeCell.js +6 -0
- package/dist/renderers/ChangeCell.js.map +1 -0
- package/dist/renderers/ChangeCell.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/renderers/ChangeCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/CheckboxCell.js +6 -0
- package/dist/renderers/CheckboxCell.js.map +1 -0
- package/dist/renderers/CheckboxCell.vue_vue_type_script_setup_true_lang.js +41 -0
- package/dist/renderers/CheckboxCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/ChipCell.js +6 -0
- package/dist/renderers/ChipCell.js.map +1 -0
- package/dist/renderers/ChipCell.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/renderers/ChipCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/CodeCell.js +6 -0
- package/dist/renderers/CodeCell.js.map +1 -0
- package/dist/renderers/CodeCell.vue_vue_type_script_setup_true_lang.js +49 -0
- package/dist/renderers/CodeCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/CopyCell.js +6 -0
- package/dist/renderers/CopyCell.js.map +1 -0
- package/dist/renderers/CopyCell.vue_vue_type_script_setup_true_lang.js +51 -0
- package/dist/renderers/CopyCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/CurrencyCell.js +6 -0
- package/dist/renderers/CurrencyCell.js.map +1 -0
- package/dist/renderers/CurrencyCell.vue_vue_type_script_setup_true_lang.js +38 -0
- package/dist/renderers/CurrencyCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/DateCell.js +6 -0
- package/dist/renderers/DateCell.js.map +1 -0
- package/dist/renderers/DateCell.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/renderers/DateCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/DateTimeCell.js +6 -0
- package/dist/renderers/DateTimeCell.js.map +1 -0
- package/dist/renderers/DateTimeCell.vue_vue_type_script_setup_true_lang.js +34 -0
- package/dist/renderers/DateTimeCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/DetailsCell.js +6 -0
- package/dist/renderers/DetailsCell.js.map +1 -0
- package/dist/renderers/DetailsCell.vue_vue_type_script_setup_true_lang.js +82 -0
- package/dist/renderers/DetailsCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/EditCell.js +6 -0
- package/dist/renderers/EditCell.js.map +1 -0
- package/dist/renderers/EditCell.vue_vue_type_script_setup_true_lang.js +41 -0
- package/dist/renderers/EditCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/IconCell.js +6 -0
- package/dist/renderers/IconCell.js.map +1 -0
- package/dist/renderers/IconCell.vue_vue_type_script_setup_true_lang.js +39 -0
- package/dist/renderers/IconCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/IconToggleCell.js +6 -0
- package/dist/renderers/IconToggleCell.js.map +1 -0
- package/dist/renderers/IconToggleCell.vue_vue_type_script_setup_true_lang.js +44 -0
- package/dist/renderers/IconToggleCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/ImageCell.js +6 -0
- package/dist/renderers/ImageCell.js.map +1 -0
- package/dist/renderers/ImageCell.vue_vue_type_script_setup_true_lang.js +47 -0
- package/dist/renderers/ImageCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/JsonCell.js +6 -0
- package/dist/renderers/JsonCell.js.map +1 -0
- package/dist/renderers/JsonCell.vue_vue_type_script_setup_true_lang.js +47 -0
- package/dist/renderers/JsonCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/JsonTreeCell.js +6 -0
- package/dist/renderers/JsonTreeCell.js.map +1 -0
- package/dist/renderers/JsonTreeCell.vue_vue_type_script_setup_true_lang.js +56 -0
- package/dist/renderers/JsonTreeCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/JsonTreeNode.js +6 -0
- package/dist/renderers/JsonTreeNode.js.map +1 -0
- package/dist/renderers/JsonTreeNode.vue_vue_type_script_setup_true_lang.js +80 -0
- package/dist/renderers/JsonTreeNode.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/LinkCell.js +6 -0
- package/dist/renderers/LinkCell.js.map +1 -0
- package/dist/renderers/LinkCell.vue_vue_type_script_setup_true_lang.js +63 -0
- package/dist/renderers/LinkCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/ListCell.js +6 -0
- package/dist/renderers/ListCell.js.map +1 -0
- package/dist/renderers/ListCell.vue_vue_type_script_setup_true_lang.js +46 -0
- package/dist/renderers/ListCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/MultiLineCell.js +6 -0
- package/dist/renderers/MultiLineCell.js.map +1 -0
- package/dist/renderers/MultiLineCell.vue_vue_type_script_setup_true_lang.js +102 -0
- package/dist/renderers/MultiLineCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/NumberCell.js +6 -0
- package/dist/renderers/NumberCell.js.map +1 -0
- package/dist/renderers/NumberCell.vue_vue_type_script_setup_true_lang.js +35 -0
- package/dist/renderers/NumberCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/RadioCell.js +6 -0
- package/dist/renderers/RadioCell.js.map +1 -0
- package/dist/renderers/RadioCell.vue_vue_type_script_setup_true_lang.js +43 -0
- package/dist/renderers/RadioCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/StatusCell.js +6 -0
- package/dist/renderers/StatusCell.js.map +1 -0
- package/dist/renderers/StatusCell.vue_vue_type_script_setup_true_lang.js +51 -0
- package/dist/renderers/StatusCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/SwitchCell.js +6 -0
- package/dist/renderers/SwitchCell.js.map +1 -0
- package/dist/renderers/SwitchCell.vue_vue_type_script_setup_true_lang.js +41 -0
- package/dist/renderers/SwitchCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/TextCell.js +6 -0
- package/dist/renderers/TextCell.js.map +1 -0
- package/dist/renderers/TextCell.vue_vue_type_script_setup_true_lang.js +92 -0
- package/dist/renderers/TextCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/ToggleTextCell.js +6 -0
- package/dist/renderers/ToggleTextCell.js.map +1 -0
- package/dist/renderers/ToggleTextCell.vue_vue_type_script_setup_true_lang.js +36 -0
- package/dist/renderers/ToggleTextCell.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/format.js +142 -0
- package/dist/renderers/format.js.map +1 -0
- package/dist/renderers/index.js +188 -0
- package/dist/renderers/index.js.map +1 -0
- package/dist/renderers/options.js +17 -0
- package/dist/renderers/options.js.map +1 -0
- package/dist/renderers/parts/CopyButton.js +6 -0
- package/dist/renderers/parts/CopyButton.js.map +1 -0
- package/dist/renderers/parts/CopyButton.vue_vue_type_script_setup_true_lang.js +37 -0
- package/dist/renderers/parts/CopyButton.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/parts/NumberValue.js +6 -0
- package/dist/renderers/parts/NumberValue.js.map +1 -0
- package/dist/renderers/parts/NumberValue.vue_vue_type_script_setup_true_lang.js +25 -0
- package/dist/renderers/parts/NumberValue.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/parts/ValueBadge.js +6 -0
- package/dist/renderers/parts/ValueBadge.js.map +1 -0
- package/dist/renderers/parts/ValueBadge.vue_vue_type_script_setup_true_lang.js +17 -0
- package/dist/renderers/parts/ValueBadge.vue_vue_type_script_setup_true_lang.js.map +1 -0
- package/dist/renderers/parts/icons.js +27 -0
- package/dist/renderers/parts/icons.js.map +1 -0
- package/dist/renderers/parts/routerLink.js +9 -0
- package/dist/renderers/parts/routerLink.js.map +1 -0
- package/dist/renderers/parts/useToggleControl.js +15 -0
- package/dist/renderers/parts/useToggleControl.js.map +1 -0
- package/dist/renderers/text.js +10 -0
- package/dist/renderers/text.js.map +1 -0
- package/dist/renderers.css +1 -0
- package/dist/theme.css +1 -0
- package/dist/types/agent/index.d.ts +50 -0
- package/dist/types/agent/requirements.d.ts +17 -0
- package/dist/types/agent/validate.d.ts +33 -0
- package/dist/types/components/VGrid.vue.d.ts +205 -0
- package/dist/types/components/VGridCell.vue.d.ts +19 -0
- package/dist/types/components/VGridCheckbox.vue.d.ts +14 -0
- package/dist/types/components/VGridColumnMenu.vue.d.ts +22 -0
- package/dist/types/components/VGridFilterInput.vue.d.ts +17 -0
- package/dist/types/components/VGridFilterPanel.vue.d.ts +20 -0
- package/dist/types/components/VGridFilterPopover.vue.d.ts +12 -0
- package/dist/types/components/VGridGroupRow.vue.d.ts +3 -0
- package/dist/types/components/VGridHeader.vue.d.ts +26 -0
- package/dist/types/components/VGridMenu.vue.d.ts +42 -0
- package/dist/types/components/VGridPagination.vue.d.ts +27 -0
- package/dist/types/components/VGridPinnedRows.vue.d.ts +15 -0
- package/dist/types/components/VGridResizeHandle.vue.d.ts +8 -0
- package/dist/types/components/VGridRows.vue.d.ts +28 -0
- package/dist/types/components/VGridSearch.vue.d.ts +22 -0
- package/dist/types/components/VGridTotalCell.vue.d.ts +13 -0
- package/dist/types/composables/useColumnDrag.d.ts +26 -0
- package/dist/types/composables/useColumnResize.d.ts +29 -0
- package/dist/types/composables/useDataSource.d.ts +39 -0
- package/dist/types/composables/useGridFilters.d.ts +45 -0
- package/dist/types/composables/useGridKeyboard.d.ts +16 -0
- package/dist/types/composables/useGridMenus.d.ts +55 -0
- package/dist/types/composables/useGridSelection.d.ts +27 -0
- package/dist/types/composables/usePinnedOffsets.d.ts +22 -0
- package/dist/types/composables/usePinnedRows.d.ts +26 -0
- package/dist/types/composables/useScrollEdges.d.ts +8 -0
- package/dist/types/composables/useSubRows.d.ts +38 -0
- package/dist/types/composables/useTotals.d.ts +17 -0
- package/dist/types/composables/useVirtualRows.d.ts +72 -0
- package/dist/types/core/aggregate.d.ts +9 -0
- package/dist/types/core/columns.d.ts +35 -0
- package/dist/types/core/filter.d.ts +85 -0
- package/dist/types/core/helpers.d.ts +3 -0
- package/dist/types/core/pagination.d.ts +3 -0
- package/dist/types/core/patch.d.ts +23 -0
- package/dist/types/core/selection.d.ts +8 -0
- package/dist/types/core/sort.d.ts +10 -0
- package/dist/types/core/storage.d.ts +6 -0
- package/dist/types/core/value.d.ts +6 -0
- package/dist/types/core/virtual.d.ts +72 -0
- package/dist/types/features/aggregation.d.ts +8 -0
- package/dist/types/features/columnGroups.d.ts +7 -0
- package/dist/types/features/columnPinning.d.ts +7 -0
- package/dist/types/features/columnReorder.d.ts +7 -0
- package/dist/types/features/columnResizing.d.ts +8 -0
- package/dist/types/features/columnVisibility.d.ts +7 -0
- package/dist/types/features/filtering.d.ts +7 -0
- package/dist/types/features/index.d.ts +20 -0
- package/dist/types/features/keyboardNavigation.d.ts +10 -0
- package/dist/types/features/menus.d.ts +8 -0
- package/dist/types/features/pagination.d.ts +8 -0
- package/dist/types/features/rowPinning.d.ts +8 -0
- package/dist/types/features/selection.d.ts +6 -0
- package/dist/types/features/serverData.d.ts +6 -0
- package/dist/types/features/sorting.d.ts +6 -0
- package/dist/types/features/subGrids.d.ts +6 -0
- package/dist/types/features/virtualScrolling.d.ts +8 -0
- package/dist/types/index.d.ts +21 -0
- package/dist/types/internal/RenderSlot.d.ts +6 -0
- package/dist/types/internal/anchor.d.ts +18 -0
- package/dist/types/internal/clipboard.d.ts +2 -0
- package/dist/types/internal/context.d.ts +123 -0
- package/dist/types/internal/dev.d.ts +1 -0
- package/dist/types/internal/features.d.ts +22 -0
- package/dist/types/internal/supports.d.ts +11 -0
- package/dist/types/internal/touchHold.d.ts +19 -0
- package/dist/types/registry/plugin.d.ts +18 -0
- package/dist/types/registry/registry.d.ts +18 -0
- package/dist/types/renderers/ActionButtonCell.vue.d.ts +10 -0
- package/dist/types/renderers/ActionsMenuCell.vue.d.ts +10 -0
- package/dist/types/renderers/BooleanCell.vue.d.ts +6 -0
- package/dist/types/renderers/ButtonGroupCell.vue.d.ts +10 -0
- package/dist/types/renderers/ChangeCell.vue.d.ts +6 -0
- package/dist/types/renderers/CheckboxCell.vue.d.ts +10 -0
- package/dist/types/renderers/ChipCell.vue.d.ts +6 -0
- package/dist/types/renderers/CodeCell.vue.d.ts +6 -0
- package/dist/types/renderers/CopyCell.vue.d.ts +10 -0
- package/dist/types/renderers/CurrencyCell.vue.d.ts +10 -0
- package/dist/types/renderers/DateCell.vue.d.ts +6 -0
- package/dist/types/renderers/DateTimeCell.vue.d.ts +6 -0
- package/dist/types/renderers/DetailsCell.vue.d.ts +6 -0
- package/dist/types/renderers/EditCell.vue.d.ts +10 -0
- package/dist/types/renderers/IconCell.vue.d.ts +6 -0
- package/dist/types/renderers/IconToggleCell.vue.d.ts +10 -0
- package/dist/types/renderers/ImageCell.vue.d.ts +6 -0
- package/dist/types/renderers/JsonCell.vue.d.ts +6 -0
- package/dist/types/renderers/JsonTreeCell.vue.d.ts +6 -0
- package/dist/types/renderers/JsonTreeNode.vue.d.ts +14 -0
- package/dist/types/renderers/LinkCell.vue.d.ts +10 -0
- package/dist/types/renderers/ListCell.vue.d.ts +10 -0
- package/dist/types/renderers/MultiLineCell.vue.d.ts +10 -0
- package/dist/types/renderers/NumberCell.vue.d.ts +12 -0
- package/dist/types/renderers/RadioCell.vue.d.ts +10 -0
- package/dist/types/renderers/StatusCell.vue.d.ts +10 -0
- package/dist/types/renderers/SwitchCell.vue.d.ts +10 -0
- package/dist/types/renderers/TextCell.vue.d.ts +10 -0
- package/dist/types/renderers/ToggleTextCell.vue.d.ts +10 -0
- package/dist/types/renderers/format.d.ts +27 -0
- package/dist/types/renderers/index.d.ts +132 -0
- package/dist/types/renderers/options.d.ts +325 -0
- package/dist/types/renderers/parts/CopyButton.vue.d.ts +16 -0
- package/dist/types/renderers/parts/NumberValue.vue.d.ts +12 -0
- package/dist/types/renderers/parts/ValueBadge.vue.d.ts +7 -0
- package/dist/types/renderers/parts/icons.d.ts +21 -0
- package/dist/types/renderers/parts/routerLink.d.ts +7 -0
- package/dist/types/renderers/parts/useToggleControl.d.ts +12 -0
- package/dist/types/renderers/text.d.ts +3 -0
- package/dist/types/types.d.ts +383 -0
- package/dist/vue-grid.css +1 -0
- package/llms-full.txt +1806 -0
- package/llms.txt +23 -0
- package/package.json +74 -4
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/** The kinds of built-in column filters. */
|
|
2
|
+
export type FilterType = 'text' | 'number' | 'date' | 'boolean' | 'set';
|
|
3
|
+
export type TextFilterOp = 'contains' | 'notContains' | 'equals' | 'notEquals' | 'startsWith' | 'endsWith' | 'empty' | 'notEmpty';
|
|
4
|
+
export type NumberFilterOp = 'eq' | 'ne' | 'lt' | 'lte' | 'gt' | 'gte' | 'between' | 'empty' | 'notEmpty';
|
|
5
|
+
export type DateFilterOp = 'on' | 'before' | 'after' | 'between' | 'empty' | 'notEmpty';
|
|
6
|
+
export interface TextFilter {
|
|
7
|
+
type: 'text';
|
|
8
|
+
op: TextFilterOp;
|
|
9
|
+
value?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface NumberFilter {
|
|
12
|
+
type: 'number';
|
|
13
|
+
op: NumberFilterOp;
|
|
14
|
+
value?: number | null;
|
|
15
|
+
/** Upper bound for `between` (inclusive). */
|
|
16
|
+
to?: number | null;
|
|
17
|
+
}
|
|
18
|
+
export interface DateFilter {
|
|
19
|
+
type: 'date';
|
|
20
|
+
op: DateFilterOp;
|
|
21
|
+
/** `YYYY-MM-DD` (what `<input type="date">` produces). */
|
|
22
|
+
value?: string;
|
|
23
|
+
to?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface BooleanFilter {
|
|
26
|
+
type: 'boolean';
|
|
27
|
+
/** `null` matches empty values. */
|
|
28
|
+
value: boolean | null;
|
|
29
|
+
}
|
|
30
|
+
export interface SetFilter {
|
|
31
|
+
type: 'set';
|
|
32
|
+
/** Selected values, as keys from {@link setKey} (`''` = blanks). */
|
|
33
|
+
values: string[];
|
|
34
|
+
}
|
|
35
|
+
/** Anything a column's `filterComponent` / `filterFn` understand. */
|
|
36
|
+
export interface CustomFilter {
|
|
37
|
+
type: 'custom';
|
|
38
|
+
value: unknown;
|
|
39
|
+
}
|
|
40
|
+
export type ColumnFilter = TextFilter | NumberFilter | DateFilter | BooleanFilter | SetFilter | CustomFilter;
|
|
41
|
+
/** The grid's filter model (`v-model:filters`). */
|
|
42
|
+
export interface FilterState {
|
|
43
|
+
/** Active filter per column key. */
|
|
44
|
+
columns: Record<string, ColumnFilter>;
|
|
45
|
+
/** Quick search across searchable columns. */
|
|
46
|
+
search?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface FilterStateStorage {
|
|
49
|
+
load(): FilterState | null;
|
|
50
|
+
save(state: FilterState): void;
|
|
51
|
+
}
|
|
52
|
+
export declare const emptyFilters: () => FilterState;
|
|
53
|
+
/** Is the filter restricting anything? (An empty text box or an empty value list doesn't.) */
|
|
54
|
+
export declare function isFilterActive(filter: ColumnFilter | undefined | null): boolean;
|
|
55
|
+
/** Number of active column filters plus the search, for badges and "clear all". */
|
|
56
|
+
export declare function activeFilterCount(state: FilterState | null | undefined): number;
|
|
57
|
+
/** Lower-cased, accent-free text for forgiving matching (`"nis"` finds `"Niš"`). */
|
|
58
|
+
export declare function foldText(value: unknown): string;
|
|
59
|
+
/** The value-list key of a cell value: its string form, `''` for blanks. */
|
|
60
|
+
export declare function setKey(value: unknown): string;
|
|
61
|
+
/**
|
|
62
|
+
* `YYYY-MM-DD` of a date-ish value in the given time zone (default: local). A date-only string
|
|
63
|
+
* (`2026-01-05`) is a calendar day, not an instant, so it is returned as is in every time zone.
|
|
64
|
+
*/
|
|
65
|
+
export declare function dayKey(value: unknown, timeZone?: string): string | null;
|
|
66
|
+
/** Does a single cell value pass a built-in filter? (`custom` filters need the column's `filterFn`.) */
|
|
67
|
+
export declare function matchesFilter(value: unknown, filter: ColumnFilter, opts?: {
|
|
68
|
+
timeZone?: string;
|
|
69
|
+
}): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Parses the filter row's shorthand into a filter: text → contains; numbers accept `>10`, `<=5`,
|
|
72
|
+
* `!=3`, `10..20` / `10-20` / `-5..-1`, open ranges `5..` / `..5`, a decimal comma (`1,5`) or a
|
|
73
|
+
* plain number; dates accept `>2026-01-01`, `<…`, `a..b`, `a..`, `..b` or a day.
|
|
74
|
+
* Returns `undefined` for empty or unparseable input (= no filter).
|
|
75
|
+
*/
|
|
76
|
+
export declare function parseQuickFilter(type: FilterType, input: string): ColumnFilter | undefined;
|
|
77
|
+
/** Shorthand text for a filter, shown in the filter row (inverse of {@link parseQuickFilter}). */
|
|
78
|
+
export declare function quickFilterText(filter: ColumnFilter | undefined): string;
|
|
79
|
+
/**
|
|
80
|
+
* Filters rows, keeping tree structure: a row stays if it matches, or if any of its children
|
|
81
|
+
* (from `childrenOf`) stays. A row that matches itself keeps all of its children.
|
|
82
|
+
*/
|
|
83
|
+
export declare function filterTree<T>(rows: readonly T[], matches: (row: T) => boolean, childrenOf?: (row: T) => readonly T[] | undefined): T[];
|
|
84
|
+
/** Saves the filter model in localStorage. Never throws; malformed data loads as "nothing stored". */
|
|
85
|
+
export declare function localFilterStorage(key: string): FilterStateStorage;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { RowKey } from '../types';
|
|
2
|
+
import { type RowKeyGetter } from './value';
|
|
3
|
+
/** Field updates for rows, by row key: a `Map`, or a list of partial rows that include the key. */
|
|
4
|
+
export type RowPatches<T> = ReadonlyMap<RowKey, Partial<T>> | readonly Partial<T>[];
|
|
5
|
+
export interface PatchRowsOptions<T> {
|
|
6
|
+
/** Also patch nested child rows stored in this field (the data behind `subRows`). */
|
|
7
|
+
children?: keyof T;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Applies field updates (e.g. enrichment that arrives later) to rows **immutably and minimally**:
|
|
11
|
+
* a patched row becomes a new object, every other row keeps its identity — so the grid re-renders
|
|
12
|
+
* only the patched rows. Patches that change nothing keep the row (and the array) as they are, and
|
|
13
|
+
* unknown keys are ignored.
|
|
14
|
+
*
|
|
15
|
+
* ```ts
|
|
16
|
+
* rows.value = patchRows(rows.value, [{ id: 3, city: 'Niš' }, { id: 7, city: 'Beograd' }], 'id')
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* For `reactive()` / `ref()` rows you can also just assign the field (`row.city = 'Niš'`): the grid
|
|
20
|
+
* then re-renders only that cell. `patchRows` is for immutable data (e.g. a `shallowRef` holding a
|
|
21
|
+
* large list) and for applying a batch of patches by key.
|
|
22
|
+
*/
|
|
23
|
+
export declare function patchRows<T>(rows: readonly T[], patches: RowPatches<T>, rowKey: RowKeyGetter<T>, options?: PatchRowsOptions<T>): T[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RowKey } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Toggles `key`. In cascade mode the row's (known) descendants follow the new state of the row.
|
|
4
|
+
* Returns a new Set; the input is not mutated.
|
|
5
|
+
*/
|
|
6
|
+
export declare function toggleRowSelection(selected: ReadonlySet<RowKey>, key: RowKey, descendants: readonly RowKey[], cascade: boolean): Set<RowKey>;
|
|
7
|
+
export type SelectionSummary = 'none' | 'some' | 'all';
|
|
8
|
+
export declare function selectionState(keys: readonly RowKey[], selected: ReadonlySet<RowKey>): SelectionSummary;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SortDir, SortState } from '../types';
|
|
2
|
+
/** Header click cycle: none → asc → desc → none. A different key starts at asc. */
|
|
3
|
+
export declare function nextSort(current: SortState | null | undefined, key: string): SortState | null;
|
|
4
|
+
/** Compares two non-nil values: numbers, bigints, dates, booleans, then numeric-aware strings. */
|
|
5
|
+
export declare function compareValues(a: unknown, b: unknown): number;
|
|
6
|
+
/**
|
|
7
|
+
* Stable sort that never mutates its input. Nil values (null/undefined/NaN/invalid Date) always go last,
|
|
8
|
+
* regardless of direction. `compare`, when given, replaces value comparison entirely.
|
|
9
|
+
*/
|
|
10
|
+
export declare function sortRows<T>(rows: readonly T[], dir: SortDir, getValue: (row: T) => unknown, compare?: (a: T, b: T) => number): T[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ColumnStateStorage } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Persists column state in `localStorage`. Never throws: unavailable storage (private mode,
|
|
4
|
+
* blocked cookies, SSR) or malformed data simply behaves like "nothing stored".
|
|
5
|
+
*/
|
|
6
|
+
export declare function localStorageAdapter(key: string): ColumnStateStorage;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ColumnDef, RowKey } from '../types';
|
|
2
|
+
/** Reads a dot path (`a.b.c`) from own properties only — never walks the prototype chain. */
|
|
3
|
+
export declare function getByPath(source: unknown, path: string): unknown;
|
|
4
|
+
export declare function getCellValue<T>(row: T, column: Pick<ColumnDef<T>, 'key' | 'field' | 'value'>): unknown;
|
|
5
|
+
export type RowKeyGetter<T> = keyof T | ((row: T) => RowKey);
|
|
6
|
+
export declare function resolveRowKey<T>(row: T, rowKey: RowKeyGetter<T>): RowKey;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { RowKey } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Virtual layout of a tree of rows, for rendering only what is in view while keeping the grid's DOM
|
|
4
|
+
* structure: expanded children stay inside their parent's `subgrid` container, and off-screen
|
|
5
|
+
* siblings at every level are replaced by spacers.
|
|
6
|
+
*
|
|
7
|
+
* Every item at a level is a *block*: its row (fixed `rowHeight`), then — when expanded — its detail
|
|
8
|
+
* row and its sub-grid (a loading / error status row, or the child level). Blocks are stacked
|
|
9
|
+
* top-down; `tops` holds the prefix sums, so finding what is in view is a binary search per level.
|
|
10
|
+
*/
|
|
11
|
+
export interface LevelLayout<T = unknown> {
|
|
12
|
+
/** Rows of this level, in display order (filtered and sorted). */
|
|
13
|
+
rows: readonly T[];
|
|
14
|
+
/** `tops[i]`: block `i`'s top, relative to the level's start. `tops[rows.length]` = level height. */
|
|
15
|
+
tops: Float64Array;
|
|
16
|
+
/** `rowsBefore[i]`: rendered rows (data, detail, status) before block `i` within the level. */
|
|
17
|
+
rowsBefore: Int32Array;
|
|
18
|
+
/** Measured or estimated detail row height per block (0 = no detail row). */
|
|
19
|
+
detail: Float64Array;
|
|
20
|
+
/** Sub-grids of expanded blocks, by row key. */
|
|
21
|
+
sub: Map<RowKey, SubLayout<T>>;
|
|
22
|
+
/** Level height in px. */
|
|
23
|
+
height: number;
|
|
24
|
+
/** Rendered rows in the level, nested ones included. */
|
|
25
|
+
rowCount: number;
|
|
26
|
+
}
|
|
27
|
+
export type SubLayout<T> = {
|
|
28
|
+
kind: 'status';
|
|
29
|
+
status: 'loading' | 'error';
|
|
30
|
+
height: number;
|
|
31
|
+
} | {
|
|
32
|
+
kind: 'rows';
|
|
33
|
+
layout: LevelLayout<T>;
|
|
34
|
+
};
|
|
35
|
+
export interface LayoutInput<T> {
|
|
36
|
+
/** Top-level rows, already filtered and sorted. */
|
|
37
|
+
rows: readonly T[];
|
|
38
|
+
getKey: (row: T) => RowKey;
|
|
39
|
+
rowHeight: number;
|
|
40
|
+
/** Filters and sorts a child level. */
|
|
41
|
+
prepare: (rows: readonly T[]) => readonly T[];
|
|
42
|
+
isExpanded: (row: T) => boolean;
|
|
43
|
+
/** Height of the row's detail row when expanded, or 0 for none. */
|
|
44
|
+
detailHeight: (row: T, key: RowKey) => number;
|
|
45
|
+
/**
|
|
46
|
+
* The expanded row's sub-grid container: its status (loading / error) or its children (before
|
|
47
|
+
* filtering); undefined = no container.
|
|
48
|
+
*/
|
|
49
|
+
subRows: (row: T) => {
|
|
50
|
+
status: 'loading' | 'error';
|
|
51
|
+
} | {
|
|
52
|
+
children: readonly T[];
|
|
53
|
+
} | undefined;
|
|
54
|
+
/** Height of a sub-grid status row (measured or estimated). */
|
|
55
|
+
statusHeight: (key: RowKey) => number;
|
|
56
|
+
/** Border + padding of a sub-grid container, above and below its rows. */
|
|
57
|
+
subgridChrome: {
|
|
58
|
+
top: number;
|
|
59
|
+
bottom: number;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
export declare function buildLayout<T>(input: LayoutInput<T>): LevelLayout<T>;
|
|
63
|
+
/** Blocks `[start, end)` of a level that intersect `[top, bottom)` (px, relative to the level). */
|
|
64
|
+
export declare function visibleSpan(layout: Pick<LevelLayout, 'tops' | 'rows'>, top: number, bottom: number): {
|
|
65
|
+
start: number;
|
|
66
|
+
end: number;
|
|
67
|
+
};
|
|
68
|
+
/** Where a row is: its top (px from the first row) and its position among rendered rows, or null. */
|
|
69
|
+
export declare function locateRow<T>(layout: LevelLayout<T>, key: RowKey, getKey: (row: T) => RowKey, rowHeight: number, chromeTop: number): {
|
|
70
|
+
top: number;
|
|
71
|
+
index: number;
|
|
72
|
+
} | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AggregationFeature } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Aggregates and the totals row: columns with an `aggregate` (`sum`, `avg`, `min`, `max`, `count` or
|
|
4
|
+
* a function) and `totals` (`true` / `'bottom'` or `'top'`) show a sticky totals row over the rows
|
|
5
|
+
* that pass the filters, on every page. `aggregates` supplies the values instead (e.g. from a
|
|
6
|
+
* server). Without it, `aggregate` and `totals` are ignored.
|
|
7
|
+
*/
|
|
8
|
+
export declare const aggregationFeature: AggregationFeature;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ColumnGroupsFeature } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Grouped column headers: give columns a `group` and adjacent visible columns of the same group get
|
|
4
|
+
* one header cell spanning them, in a sticky row above the column headers. Groups follow
|
|
5
|
+
* reordering, hiding and pinning (a pin boundary splits a group). Without it, `group` is ignored.
|
|
6
|
+
*/
|
|
7
|
+
export declare const columnGroupsFeature: ColumnGroupsFeature;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ColumnPinningFeature } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Pinned columns: `pinned: 'left' | 'right'` columns stay put (sticky) while the grid scrolls
|
|
4
|
+
* sideways, with edge shadows; runtime pins from the header menu (Pin left / Pin right / Unpin) are
|
|
5
|
+
* kept in `v-model:column-state` and persisted with `storage`. Without it, pins are ignored.
|
|
6
|
+
*/
|
|
7
|
+
export declare const columnPinningFeature: ColumnPinningFeature;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ColumnReorderFeature } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Column reordering: drag a header (mouse, pen, touch), Alt+←/→ on a focused header, and the header
|
|
4
|
+
* menu's Move left / Move right. Columns opt out with `reorderable: false`. The order is part of
|
|
5
|
+
* `v-model:column-state` and persisted with `storage`; `<VGridColumnMenu>` works without it.
|
|
6
|
+
*/
|
|
7
|
+
export declare const columnReorderFeature: ColumnReorderFeature;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ColumnResizingFeature } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Column resizing: drag a header's edge (mouse, pen, touch), use ←/→ on the focused edge
|
|
4
|
+
* (Alt+Shift+←/→ on a header with keyboard navigation), or double-click the edge to fit the content.
|
|
5
|
+
* `minWidth` / `maxWidth` bound it; columns opt out with `resizable: false`. Widths are kept in
|
|
6
|
+
* `columnState.widths` and persisted with `storage`. The header menu gains Fit width / Reset width.
|
|
7
|
+
*/
|
|
8
|
+
export declare const columnResizingFeature: ColumnResizingFeature;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ColumnVisibilityFeature } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Column visibility: `hidden: true` columns, `columnState.hidden` (persisted with `storage`), the
|
|
4
|
+
* header menu's Hide column item and `<VGridColumnMenu>`'s checkboxes. Columns opt out with
|
|
5
|
+
* `hideable: false`. Without it, every column shows.
|
|
6
|
+
*/
|
|
7
|
+
export declare const columnVisibilityFeature: ColumnVisibilityFeature;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FilteringFeature } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Filtering: header funnels with typed filter popovers on `filterable` columns, the filter row,
|
|
4
|
+
* `<VGridSearch>`, the filter items of the header menu, `v-model:filters` and filter persistence.
|
|
5
|
+
* The popover body and the filter-row editors load on demand (own chunks).
|
|
6
|
+
*/
|
|
7
|
+
export declare const filteringFeature: FilteringFeature;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { GridFeature } from '../types';
|
|
2
|
+
import { aggregationFeature } from './aggregation';
|
|
3
|
+
import { columnGroupsFeature } from './columnGroups';
|
|
4
|
+
import { columnPinningFeature } from './columnPinning';
|
|
5
|
+
import { columnResizingFeature } from './columnResizing';
|
|
6
|
+
import { columnReorderFeature } from './columnReorder';
|
|
7
|
+
import { columnVisibilityFeature } from './columnVisibility';
|
|
8
|
+
import { filteringFeature } from './filtering';
|
|
9
|
+
import { keyboardNavigationFeature } from './keyboardNavigation';
|
|
10
|
+
import { menusFeature } from './menus';
|
|
11
|
+
import { paginationFeature } from './pagination';
|
|
12
|
+
import { rowPinningFeature } from './rowPinning';
|
|
13
|
+
import { selectionFeature } from './selection';
|
|
14
|
+
import { serverDataFeature } from './serverData';
|
|
15
|
+
import { sortingFeature } from './sorting';
|
|
16
|
+
import { subGridsFeature } from './subGrids';
|
|
17
|
+
import { virtualScrollingFeature } from './virtualScrolling';
|
|
18
|
+
export { aggregationFeature, columnGroupsFeature, columnPinningFeature, columnReorderFeature, columnResizingFeature, columnVisibilityFeature, filteringFeature, keyboardNavigationFeature, menusFeature, paginationFeature, rowPinningFeature, selectionFeature, serverDataFeature, sortingFeature, subGridsFeature, virtualScrollingFeature, };
|
|
19
|
+
/** Every built-in feature, for apps that want them all: `createVueGrid({ features: allFeatures })`. */
|
|
20
|
+
export declare const allFeatures: readonly GridFeature[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { KeyboardNavigationFeature } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Keyboard navigation (the ARIA grid pattern): the grid is one tab stop, arrow keys / Home / End /
|
|
4
|
+
* PageUp / PageDown move between cells, Enter activates a cell's control, Space selects a row,
|
|
5
|
+
* →/← expand and collapse, Alt+←/→ move a column, ContextMenu / Shift+F10 open the cell menu.
|
|
6
|
+
*
|
|
7
|
+
* Without it the grid is an ARIA `table`: its own controls (sort buttons, expanders, checkboxes,
|
|
8
|
+
* filter buttons) sit in the normal Tab order instead.
|
|
9
|
+
*/
|
|
10
|
+
export declare const keyboardNavigationFeature: KeyboardNavigationFeature;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { MenusFeature } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Context menus: the built-in header menu (sort, filter, pin, move, hide, reset, your own items via
|
|
4
|
+
* `header-menu`) and body-cell menus (`context-menu`), opened by right-click, the ContextMenu key
|
|
5
|
+
* or Shift+F10. Without it the browser's own menu shows. The standalone `<VGridMenu>` and the
|
|
6
|
+
* `actions-menu` renderer don't need it.
|
|
7
|
+
*/
|
|
8
|
+
export declare const menusFeature: MenusFeature;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PaginationFeature } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Built-in pagination: the `pagination` prop and `v-model:page` / `v-model:page-size`. Pages the
|
|
4
|
+
* client rows, or asks the `dataSource` for pages. The pager loads on demand (own chunk).
|
|
5
|
+
*
|
|
6
|
+
* Not needed for the standalone `<VGridPagination>` component.
|
|
7
|
+
*/
|
|
8
|
+
export declare const paginationFeature: PaginationFeature;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RowPinningFeature } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Pinned rows: `v-model:pinned-rows` (`{ top, bottom }` row keys), `pinned-top-rows` /
|
|
4
|
+
* `pinned-bottom-rows` (extra rows that aren't in the data) and the `pinRow()` method. Pinned rows
|
|
5
|
+
* stay in view (sticky) under the header or at the bottom while the body scrolls, and aren't
|
|
6
|
+
* filtered, sorted or paged. Without it, those options are ignored.
|
|
7
|
+
*/
|
|
8
|
+
export declare const rowPinningFeature: RowPinningFeature;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SelectionFeature } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Row selection: the `selectable` prop (multi or single), `v-model:selected`, `selection-mode`
|
|
4
|
+
* (cascade through sub-grids), `is-row-selectable`, Space on a row and the select-all checkbox.
|
|
5
|
+
*/
|
|
6
|
+
export declare const selectionFeature: SelectionFeature;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ServerDataFeature } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Server data: the `dataSource` prop. The grid sends sort, filters and page to your function,
|
|
4
|
+
* cancels superseded requests, and shows loading, error and retry states.
|
|
5
|
+
*/
|
|
6
|
+
export declare const serverDataFeature: ServerDataFeature;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SortingFeature } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Sorting: the sort button on `sortable` column headers, the sort items of the header menu and,
|
|
4
|
+
* with `sort-mode="client"`, sorting the rows in the browser.
|
|
5
|
+
*/
|
|
6
|
+
export declare const sortingFeature: SortingFeature;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SubGridsFeature } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Sub-grids: nested child rows in a CSS `subgrid`, from `sub-rows` (synchronous) or `load-sub-rows`
|
|
4
|
+
* (lazy, cached, with loading / error / retry). Detail rows (`#detail` slot) don't need it.
|
|
5
|
+
*/
|
|
6
|
+
export declare const subGridsFeature: SubGridsFeature;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { VirtualScrollingFeature } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Virtual scrolling: `:virtual="{ rowHeight, overscan?, detailHeight? }"` renders only the rows in
|
|
4
|
+
* view (plus `overscan`), so tens of thousands of rows stay fast — sub-grids and detail rows
|
|
5
|
+
* included, inside the same CSS grid / subgrid layout. Without it, `virtual` is ignored and every
|
|
6
|
+
* row renders.
|
|
7
|
+
*/
|
|
8
|
+
export declare const virtualScrollingFeature: VirtualScrollingFeature;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export { default as VGrid } from './components/VGrid.vue';
|
|
2
|
+
export { default as VGridPagination } from './components/VGridPagination.vue';
|
|
3
|
+
export { default as VGridColumnMenu } from './components/VGridColumnMenu.vue';
|
|
4
|
+
export { default as VGridMenu } from './components/VGridMenu.vue';
|
|
5
|
+
export { default as VGridSearch } from './components/VGridSearch.vue';
|
|
6
|
+
export { anchorNameFor, supportsAnchorPositioning } from './internal/anchor';
|
|
7
|
+
export { createVueGrid, useGridContext, GRID_CONFIG_KEY } from './registry/plugin';
|
|
8
|
+
export { defineCellRenderer, createRendererRegistry, isRendererDefinition, type RendererRegistry, } from './registry/registry';
|
|
9
|
+
export { getByPath, getCellValue, resolveRowKey, type RowKeyGetter } from './core/value';
|
|
10
|
+
export { normalizeColumnState, visibleColumns, moveColumn, moveColumnRelative, setColumnHidden, setColumnPinned, effectivePin, } from './core/columns';
|
|
11
|
+
export { nextSort, sortRows, compareValues } from './core/sort';
|
|
12
|
+
export { aggregateRows, aggregateValues } from './core/aggregate';
|
|
13
|
+
export { patchRows, type RowPatches, type PatchRowsOptions } from './core/patch';
|
|
14
|
+
export type { DataSource, DataSourceResult, GridQuery } from './composables/useDataSource';
|
|
15
|
+
export { activeFilterCount, emptyFilters, filterTree, foldText, isFilterActive, localFilterStorage, matchesFilter, parseQuickFilter, setKey, type BooleanFilter, type CustomFilter, type DateFilter, type DateFilterOp, type NumberFilter, type NumberFilterOp, type SetFilter, type TextFilter, type TextFilterOp, } from './core/filter';
|
|
16
|
+
export { localStorageAdapter } from './core/storage';
|
|
17
|
+
export { pageItems, type PageItem } from './core/pagination';
|
|
18
|
+
export { createColumnHelper } from './core/helpers';
|
|
19
|
+
export * from './renderers';
|
|
20
|
+
export * from './features';
|
|
21
|
+
export type * from './types';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare function supportsAnchorPositioning(): boolean;
|
|
2
|
+
/** A dashed-ident anchor name derived from a Vue `useId()` value. */
|
|
3
|
+
export declare function anchorNameFor(id: string): string;
|
|
4
|
+
export type AnchorTarget = HTMLElement | {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
};
|
|
8
|
+
export type Placement = 'bottom-start' | 'bottom-end' | 'point';
|
|
9
|
+
/** JS placement used only when CSS anchor positioning is unavailable. Flips to stay in the viewport. */
|
|
10
|
+
export declare function placeWithoutAnchorSupport(floating: HTMLElement, target: AnchorTarget, placement: Placement): void;
|
|
11
|
+
/**
|
|
12
|
+
* JS fallbacks for an open anchored popover, each only where CSS can't do the job:
|
|
13
|
+
* - no CSS anchor positioning → place it now and again on scroll / resize, so it follows its anchor;
|
|
14
|
+
* - no working `position-visibility: anchor-visible` → hide it (`data-vg-anchor-hidden`) while the
|
|
15
|
+
* anchor element is clipped by a scroll container (IntersectionObserver applies ancestor clipping).
|
|
16
|
+
* Returns a cleanup function; call it when the popover closes.
|
|
17
|
+
*/
|
|
18
|
+
export declare function trackAnchor(floating: HTMLElement, target: AnchorTarget, placement: Placement): () => void;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { type Component, type ComputedRef, type InjectionKey, type Slots } from 'vue';
|
|
2
|
+
import type { Align, CellRendererDefinition, ClassValue, ColumnDef, FlashMode, GridPart, RowKey } from '../types';
|
|
3
|
+
import type { ColumnFilter, FilterState, FilterType } from '../core/filter';
|
|
4
|
+
import type { SelectionSummary } from '../core/selection';
|
|
5
|
+
import type { SubRowEntry } from '../composables/useSubRows';
|
|
6
|
+
import type { DistinctValue } from '../composables/useGridFilters';
|
|
7
|
+
import type { VirtualRowsContext } from '../composables/useVirtualRows';
|
|
8
|
+
export declare const SELECT_COLUMN_KEY = "__vg_select";
|
|
9
|
+
/** A visible column with everything the cells need precomputed. */
|
|
10
|
+
export interface ResolvedColumn {
|
|
11
|
+
key: string;
|
|
12
|
+
kind: 'data' | 'select';
|
|
13
|
+
def: ColumnDef;
|
|
14
|
+
component: Component | undefined;
|
|
15
|
+
definition: CellRendererDefinition | undefined;
|
|
16
|
+
options: Record<string, unknown>;
|
|
17
|
+
align: Align;
|
|
18
|
+
pinned: 'left' | 'right' | undefined;
|
|
19
|
+
/** Last left-pinned or first right-pinned column. Only set where CSS `:has()` is unsupported. */
|
|
20
|
+
pinEdge: boolean;
|
|
21
|
+
/** First data column — hosts the expander and the depth indent. */
|
|
22
|
+
isTree: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface GridContext {
|
|
25
|
+
columns: ComputedRef<ResolvedColumn[]>;
|
|
26
|
+
slots: Slots;
|
|
27
|
+
ui: ComputedRef<Partial<Record<GridPart, ClassValue>>>;
|
|
28
|
+
getKey(row: any): RowKey;
|
|
29
|
+
/**
|
|
30
|
+
* Keyboard navigation (ARIA grid) is on: cells are `gridcell`s and the grid's own controls are
|
|
31
|
+
* `tabindex="-1"` (reached with the arrow keys). Off: an ARIA `table` with tabbable controls.
|
|
32
|
+
*/
|
|
33
|
+
keyboardNav: boolean;
|
|
34
|
+
/** `gridcell` or `cell`, by `keyboardNav`. */
|
|
35
|
+
cellRole: 'gridcell' | 'cell';
|
|
36
|
+
/** Tabindex for the grid's own controls and cells: `-1` with keyboard navigation, else none. */
|
|
37
|
+
rovingTabindex: -1 | undefined;
|
|
38
|
+
/** Filters (client mode) and sorts one level of rows. */
|
|
39
|
+
sortRows(rows: readonly any[]): any[];
|
|
40
|
+
/** The sorting feature is on and the column is `sortable`. */
|
|
41
|
+
sortable(col: ColumnDef): boolean;
|
|
42
|
+
/** Only with the column resizing feature. */
|
|
43
|
+
resize?: {
|
|
44
|
+
/** The header edge grip component. */
|
|
45
|
+
Handle: Component;
|
|
46
|
+
can(col: ColumnDef): boolean;
|
|
47
|
+
start(event: PointerEvent, key: string): void;
|
|
48
|
+
autosize(key: string): void;
|
|
49
|
+
step(key: string, delta: number): void;
|
|
50
|
+
/** Has a resized width (or is being resized): its cells clip their content. */
|
|
51
|
+
isSized(key: string): boolean;
|
|
52
|
+
};
|
|
53
|
+
/** Header rows above the body (2 with column groups). */
|
|
54
|
+
headerRows: ComputedRef<number>;
|
|
55
|
+
/** Pinned rows (and a totals row) above the body: offsets the body's `aria-rowindex`. */
|
|
56
|
+
pinnedTopCount: ComputedRef<number>;
|
|
57
|
+
/** Aggregation feature with a totals row: the values by column key, and the row's label. */
|
|
58
|
+
totals?: {
|
|
59
|
+
values: ComputedRef<Record<string, unknown>>;
|
|
60
|
+
label: ComputedRef<string>;
|
|
61
|
+
};
|
|
62
|
+
treeMode: ComputedRef<boolean>;
|
|
63
|
+
hasDetail: ComputedRef<boolean>;
|
|
64
|
+
canExpand(row: any): boolean;
|
|
65
|
+
isExpanded(key: RowKey): boolean;
|
|
66
|
+
toggleExpanded(row: any): void;
|
|
67
|
+
children(row: any): any[] | undefined;
|
|
68
|
+
subRowState(row: any): SubRowEntry | undefined;
|
|
69
|
+
ensureSubRows(row: any): void;
|
|
70
|
+
retrySubRows(row: any): void;
|
|
71
|
+
selectMode: ComputedRef<false | 'multi' | 'single'>;
|
|
72
|
+
/** The selection checkbox (from the selection feature; only rendered when `selectMode` is set). */
|
|
73
|
+
Checkbox: Component | undefined;
|
|
74
|
+
isRowSelectable(row: any): boolean;
|
|
75
|
+
rowCheckState(row: any): SelectionSummary;
|
|
76
|
+
toggleRow(row: any): void;
|
|
77
|
+
isHighlighted(key: RowKey): boolean;
|
|
78
|
+
rowClass(row: any, index: number): ClassValue;
|
|
79
|
+
rowClickable: ComputedRef<boolean>;
|
|
80
|
+
/** Grid-wide change highlight (columns may override with `flash`). */
|
|
81
|
+
flash: ComputedRef<FlashMode>;
|
|
82
|
+
/** Only with the filtering feature. */
|
|
83
|
+
filters?: {
|
|
84
|
+
FilterButton: Component;
|
|
85
|
+
FilterInput: Component;
|
|
86
|
+
state: ComputedRef<FilterState>;
|
|
87
|
+
setSearch(search: string): void;
|
|
88
|
+
setColumnFilter(key: string, filter: ColumnFilter | undefined): void;
|
|
89
|
+
isActive(key: string): boolean;
|
|
90
|
+
typeOf(col: ColumnDef): FilterType | 'custom';
|
|
91
|
+
/** Show the filter row (inputs inside the header cells). */
|
|
92
|
+
filterRow: ComputedRef<boolean>;
|
|
93
|
+
/** Distinct values of a column, for its value-list filter. */
|
|
94
|
+
distinct(key: string): DistinctValue[];
|
|
95
|
+
/** DOM id of a column's filter popover. */
|
|
96
|
+
idFor(key: string): string;
|
|
97
|
+
/** Opens a column's filter popover (header menu, filter row). */
|
|
98
|
+
open(key: string): void;
|
|
99
|
+
};
|
|
100
|
+
virtual: ComputedRef<boolean>;
|
|
101
|
+
/** With the virtual scrolling feature: windowing of each level of rows, and measuring. */
|
|
102
|
+
virtualRows?: VirtualRowsContext;
|
|
103
|
+
pinStyle(key: string): Record<string, string> | undefined;
|
|
104
|
+
onRowClick(row: any, key: RowKey, event: MouseEvent | KeyboardEvent): void;
|
|
105
|
+
onCellClick(row: any, key: RowKey, column: ResolvedColumn, event: MouseEvent | KeyboardEvent): void;
|
|
106
|
+
onCellAction(row: any, key: RowKey, column: ResolvedColumn, name: string, payload: unknown): void;
|
|
107
|
+
onCellContextMenu(row: any, key: RowKey, column: ResolvedColumn, event: MouseEvent, el: HTMLElement): void;
|
|
108
|
+
onHeaderContextMenu(column: ResolvedColumn, event: MouseEvent, el: HTMLElement): void;
|
|
109
|
+
/** Menus feature: a `pointerdown` on a body cell (touch: hold for its menu). */
|
|
110
|
+
onCellPointerDown?(row: any, key: RowKey, column: ResolvedColumn, event: PointerEvent, el: HTMLElement): void;
|
|
111
|
+
}
|
|
112
|
+
/** A row in a pinned section: a pinned data row, or the totals row. */
|
|
113
|
+
export interface PinnedRowItem {
|
|
114
|
+
/** Unique within the grid's pinned rows. */
|
|
115
|
+
id: string;
|
|
116
|
+
kind: 'row' | 'total';
|
|
117
|
+
row: any;
|
|
118
|
+
key: RowKey;
|
|
119
|
+
/** Shows the selection checkbox (pinned rows of the data, not the app's extra rows). */
|
|
120
|
+
selectable: boolean;
|
|
121
|
+
}
|
|
122
|
+
export declare const GRID_CONTEXT_KEY: InjectionKey<GridContext>;
|
|
123
|
+
export declare function useInternalGrid(): GridContext;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function warnOnce(id: string, message: string): void;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { AggregationFeature, RowPinningFeature, ColumnGroupsFeature, ColumnPinningFeature, ColumnResizingFeature, ColumnReorderFeature, ColumnVisibilityFeature, FilteringFeature, KeyboardNavigationFeature, GridFeature, MenusFeature, PaginationFeature, SelectionFeature, ServerDataFeature, SortingFeature, SubGridsFeature, VirtualScrollingFeature } from '../types';
|
|
2
|
+
/** The features a grid has, by name. */
|
|
3
|
+
export interface FeatureSet {
|
|
4
|
+
sorting?: SortingFeature;
|
|
5
|
+
filtering?: FilteringFeature;
|
|
6
|
+
serverData?: ServerDataFeature;
|
|
7
|
+
pagination?: PaginationFeature;
|
|
8
|
+
selection?: SelectionFeature;
|
|
9
|
+
subGrids?: SubGridsFeature;
|
|
10
|
+
menus?: MenusFeature;
|
|
11
|
+
columnReorder?: ColumnReorderFeature;
|
|
12
|
+
columnPinning?: ColumnPinningFeature;
|
|
13
|
+
virtualScrolling?: VirtualScrollingFeature;
|
|
14
|
+
columnVisibility?: ColumnVisibilityFeature;
|
|
15
|
+
keyboardNavigation?: KeyboardNavigationFeature;
|
|
16
|
+
columnResizing?: ColumnResizingFeature;
|
|
17
|
+
columnGroups?: ColumnGroupsFeature;
|
|
18
|
+
rowPinning?: RowPinningFeature;
|
|
19
|
+
aggregation?: AggregationFeature;
|
|
20
|
+
}
|
|
21
|
+
/** Merges feature lists (app-wide, then per grid); a later entry with the same name wins. */
|
|
22
|
+
export declare function resolveFeatures(...lists: (readonly GridFeature[] | undefined)[]): FeatureSet;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** `:has()` — used to find the pinned-column edge in CSS. */
|
|
2
|
+
export declare const supportsHas: () => boolean;
|
|
3
|
+
/** Scroll-state container queries — show pin shadows only while content is scrolled under them. */
|
|
4
|
+
export declare const supportsScrollState: () => boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Hiding an anchored popover once its anchor is clipped. Checked via the current value name: engines
|
|
7
|
+
* that only parse the old `anchors-visible` (Firefox 159) parse it without hiding anything.
|
|
8
|
+
*/
|
|
9
|
+
export declare const supportsAnchorVisibility: () => boolean;
|
|
10
|
+
/** Relative colour syntax — picks readable chip text in CSS. */
|
|
11
|
+
export declare const supportsRelativeColor: () => boolean;
|