@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 @@
|
|
|
1
|
+
{"version":3,"file":"anchor.js","names":["supported","supportsAnchorPositioning","anchorNameFor","id","placeWithoutAnchorSupport","rect","target","pop","floating","vw","vh","left","placement","top","trackAnchor","cleanups","frame","place","supportsAnchorVisibility","io","entry","fn"],"sources":["../../src/internal/anchor.ts"],"sourcesContent":["/**\n * Helpers for CSS anchor positioning. Popovers are placed purely in CSS (`position-anchor` +\n * `position-area` + `position-try-fallbacks`); this module only provides unique anchor names and a\n * JS fallback for browsers without anchor positioning.\n */\nimport { supportsAnchorVisibility } from './supports'\n\nlet supported: boolean | undefined\n\nexport function supportsAnchorPositioning(): boolean {\n supported ??= typeof CSS !== 'undefined' && typeof CSS.supports === 'function' && CSS.supports('anchor-name: --vg')\n return supported\n}\n\n/** A dashed-ident anchor name derived from a Vue `useId()` value. */\nexport function anchorNameFor(id: string): string {\n return `--vg-anchor-${id.replace(/[^\\w-]/g, '_')}`\n}\n\nexport type AnchorTarget = HTMLElement | { x: number; y: number }\n\nexport type Placement = 'bottom-start' | 'bottom-end' | 'point'\n\n/** JS placement used only when CSS anchor positioning is unavailable. Flips to stay in the viewport. */\nexport function placeWithoutAnchorSupport(floating: HTMLElement, target: AnchorTarget, placement: Placement) {\n const gap = 4\n const rect =\n target instanceof HTMLElement\n ? target.getBoundingClientRect()\n : new DOMRect(target.x, target.y, 0, 0)\n const pop = floating.getBoundingClientRect()\n const vw = window.innerWidth\n const vh = window.innerHeight\n\n let left = placement === 'bottom-end' ? rect.right - pop.width : placement === 'point' ? rect.left : rect.left\n if (left + pop.width > vw - gap) left = placement === 'point' ? rect.left - pop.width : vw - gap - pop.width\n left = Math.max(gap, left)\n\n let top = rect.bottom + (placement === 'point' ? 0 : gap)\n if (top + pop.height > vh - gap) top = rect.top - (placement === 'point' ? 0 : gap) - pop.height\n top = Math.max(gap, top)\n\n floating.style.left = `${left}px`\n floating.style.top = `${top}px`\n}\n\n/**\n * JS fallbacks for an open anchored popover, each only where CSS can't do the job:\n * - no CSS anchor positioning → place it now and again on scroll / resize, so it follows its anchor;\n * - no working `position-visibility: anchor-visible` → hide it (`data-vg-anchor-hidden`) while the\n * anchor element is clipped by a scroll container (IntersectionObserver applies ancestor clipping).\n * Returns a cleanup function; call it when the popover closes.\n */\nexport function trackAnchor(floating: HTMLElement, target: AnchorTarget, placement: Placement): () => void {\n const cleanups: (() => void)[] = []\n\n if (!supportsAnchorPositioning()) {\n let frame = 0\n const place = () => {\n cancelAnimationFrame(frame)\n frame = requestAnimationFrame(() => placeWithoutAnchorSupport(floating, target, placement))\n }\n placeWithoutAnchorSupport(floating, target, placement)\n window.addEventListener('scroll', place, { capture: true, passive: true })\n window.addEventListener('resize', place, { passive: true })\n cleanups.push(() => {\n cancelAnimationFrame(frame)\n window.removeEventListener('scroll', place, { capture: true })\n window.removeEventListener('resize', place)\n })\n }\n\n if (!supportsAnchorVisibility() && target instanceof HTMLElement && typeof IntersectionObserver !== 'undefined') {\n const io = new IntersectionObserver(([entry]) => {\n floating.toggleAttribute('data-vg-anchor-hidden', !!entry && !entry.isIntersecting)\n })\n io.observe(target)\n cleanups.push(() => {\n io.disconnect()\n floating.removeAttribute('data-vg-anchor-hidden')\n })\n }\n\n return () => cleanups.splice(0).forEach((fn) => fn())\n}\n"],"mappings":";;AAOA,IAAIA;AAEJ,SAAgBC,IAAqC;CAEnD,OADA,MAAc,OAAO,MAAQ,OAAe,OAAO,IAAI,YAAa,cAAc,IAAI,SAAS,mBAAmB,GAC3GD;AACT;AAGA,SAAgBE,EAAc,GAAoB;CAChD,OAAO,eAAeC,EAAG,QAAQ,WAAW,GAAG;AACjD;AAOA,SAAgBC,EAA0B,GAAuB,GAAsB,GAAsB;CAC3G,IACMC,IACJC,aAAkB,cACdA,EAAO,sBAAsB,IAC7B,IAAI,QAAQA,EAAO,GAAGA,EAAO,GAAG,GAAG,CAAC,GACpCC,IAAMC,EAAS,sBAAsB,GACrCC,IAAK,OAAO,YACZC,IAAK,OAAO,aAEdC,IAAOC,MAAc,eAAeP,EAAK,QAAQE,EAAI,QAAgCF,EAAK;CAE9F,AADIM,IAAOJ,EAAI,QAAQE,IAAK,MAAK,IAAOG,MAAc,UAAUP,EAAK,OAAOE,EAAI,QAAQE,IAAK,IAAMF,EAAI,QACvG,IAAO,KAAK,IAAI,GAAKI,CAAI;CAEzB,IAAIE,IAAMR,EAAK,UAAUO,MAAc,UAAU,IAAI;CAKrD,AAJIC,IAAMN,EAAI,SAASG,IAAK,MAAK,IAAML,EAAK,OAAOO,MAAc,UAAU,IAAI,KAAOL,EAAI,SAC1F,IAAM,KAAK,IAAI,GAAKM,CAAG,GAEvB,EAAS,MAAM,OAAO,GAAGF,EAAK,KAC9B,EAAS,MAAM,MAAM,GAAGE,EAAI;AAC9B;AASA,SAAgBC,EAAY,GAAuB,GAAsB,GAAkC;CACzG,IAAMC,IAA2B,CAAC;CAElC,IAAI,CAACd,EAA0B,GAAG;EAChC,IAAIe,IAAQ,GACNC,UAAc;GAElB,AADA,qBAAqBD,CAAK,GAC1B,IAAQ,4BAA4BZ,EAA0BI,GAAUF,GAAQM,CAAS,CAAC;EAC5F;EAIA,AAHAR,EAA0BI,GAAUF,GAAQM,CAAS,GACrD,OAAO,iBAAiB,UAAUK,GAAO;GAAE,SAAS;GAAM,SAAS;EAAK,CAAC,GACzE,OAAO,iBAAiB,UAAUA,GAAO,EAAE,SAAS,GAAK,CAAC,GAC1DF,EAAS,WAAW;GAGlB,AAFA,qBAAqBC,CAAK,GAC1B,OAAO,oBAAoB,UAAUC,GAAO,EAAE,SAAS,GAAK,CAAC,GAC7D,OAAO,oBAAoB,UAAUA,CAAK;EAC5C,CAAC;CACH;CAEA,IAAI,CAACC,EAAyB,KAAKZ,aAAkB,eAAe,OAAO,uBAAyB,KAAa;EAC/G,IAAMa,IAAK,IAAI,sBAAsB,CAACC,OAAW;GAC/C,EAAS,gBAAgB,yBAAyB,CAAC,CAACA,KAAS,CAACA,EAAM,cAAc;EACpF,CAAC;EAED,AADAD,EAAG,QAAQb,CAAM,GACjBS,EAAS,WAAW;GAElB,AADAI,EAAG,WAAW,GACdX,EAAS,gBAAgB,uBAAuB;EAClD,CAAC;CACH;CAEA,aAAaO,EAAS,OAAO,CAAC,CAAC,CAAC,SAAS,MAAOM,EAAG,CAAC;AACtD"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// src/internal/clipboard.ts
|
|
2
|
+
async function e(e) {
|
|
3
|
+
try {
|
|
4
|
+
return globalThis.navigator?.clipboard?.writeText ? (await navigator.clipboard.writeText(e), !0) : !1;
|
|
5
|
+
} catch {
|
|
6
|
+
return !1;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export { e as copyText };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=clipboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clipboard.js","names":["copyText","text"],"sources":["../../src/internal/clipboard.ts"],"sourcesContent":["/** Writes text to the clipboard. Resolves `false` when the Clipboard API is unavailable or denied. */\nexport async function copyText(text: string): Promise<boolean> {\n try {\n if (!globalThis.navigator?.clipboard?.writeText) return false\n await navigator.clipboard.writeText(text)\n return true\n } catch {\n return false\n }\n}\n"],"mappings":";AACA,eAAsBA,EAAS,GAAgC;CAC7D,IAAI;EAGF,OAFK,WAAW,WAAW,WAAW,aACtC,MAAM,UAAU,UAAU,UAAUC,CAAI,GACjC,MAFiD;CAG1D,QAAQ;EACN,OAAO;CACT;AACF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { inject as e } from "vue";
|
|
2
|
+
// src/internal/context.ts
|
|
3
|
+
var t = "__vg_select", n = Symbol("vue-grid:context");
|
|
4
|
+
function r() {
|
|
5
|
+
let t = e(n);
|
|
6
|
+
if (!t) throw Error("[vue-grid] internal component used outside <VGrid>");
|
|
7
|
+
return t;
|
|
8
|
+
}
|
|
9
|
+
export { n as GRID_CONTEXT_KEY, t as SELECT_COLUMN_KEY, r as useInternalGrid };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","names":["SELECT_COLUMN_KEY","GRID_CONTEXT_KEY","useInternalGrid","ctx","inject"],"sources":["../../src/internal/context.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any -- rows are an opaque, type-erased T inside the grid internals; the public <VGrid generic=\"T\"> API stays fully typed. */\nimport { inject, type Component, type ComputedRef, type InjectionKey, type Slots } from 'vue'\nimport type { Align, CellRendererDefinition, ClassValue, ColumnDef, FlashMode, GridPart, RowKey } from '../types'\nimport type { ColumnFilter, FilterState, FilterType } from '../core/filter'\nimport type { SelectionSummary } from '../core/selection'\nimport type { SubRowEntry } from '../composables/useSubRows'\nimport type { DistinctValue } from '../composables/useGridFilters'\nimport type { VirtualRowsContext } from '../composables/useVirtualRows'\n\nexport const SELECT_COLUMN_KEY = '__vg_select'\n\n/** A visible column with everything the cells need precomputed. */\nexport interface ResolvedColumn {\n key: string\n kind: 'data' | 'select'\n def: ColumnDef\n component: Component | undefined\n definition: CellRendererDefinition | undefined\n options: Record<string, unknown>\n align: Align\n pinned: 'left' | 'right' | undefined\n /** Last left-pinned or first right-pinned column. Only set where CSS `:has()` is unsupported. */\n pinEdge: boolean\n /** First data column — hosts the expander and the depth indent. */\n isTree: boolean\n}\n\nexport interface GridContext {\n columns: ComputedRef<ResolvedColumn[]>\n slots: Slots\n ui: ComputedRef<Partial<Record<GridPart, ClassValue>>>\n getKey(row: any): RowKey\n /**\n * Keyboard navigation (ARIA grid) is on: cells are `gridcell`s and the grid's own controls are\n * `tabindex=\"-1\"` (reached with the arrow keys). Off: an ARIA `table` with tabbable controls.\n */\n keyboardNav: boolean\n /** `gridcell` or `cell`, by `keyboardNav`. */\n cellRole: 'gridcell' | 'cell'\n /** Tabindex for the grid's own controls and cells: `-1` with keyboard navigation, else none. */\n rovingTabindex: -1 | undefined\n /** Filters (client mode) and sorts one level of rows. */\n sortRows(rows: readonly any[]): any[]\n /** The sorting feature is on and the column is `sortable`. */\n sortable(col: ColumnDef): boolean\n /** Only with the column resizing feature. */\n resize?: {\n /** The header edge grip component. */\n Handle: Component\n can(col: ColumnDef): boolean\n start(event: PointerEvent, key: string): void\n autosize(key: string): void\n step(key: string, delta: number): void\n /** Has a resized width (or is being resized): its cells clip their content. */\n isSized(key: string): boolean\n }\n /** Header rows above the body (2 with column groups). */\n headerRows: ComputedRef<number>\n /** Pinned rows (and a totals row) above the body: offsets the body's `aria-rowindex`. */\n pinnedTopCount: ComputedRef<number>\n /** Aggregation feature with a totals row: the values by column key, and the row's label. */\n totals?: {\n values: ComputedRef<Record<string, unknown>>\n label: ComputedRef<string>\n }\n // expansion\n treeMode: ComputedRef<boolean>\n hasDetail: ComputedRef<boolean>\n canExpand(row: any): boolean\n isExpanded(key: RowKey): boolean\n toggleExpanded(row: any): void\n children(row: any): any[] | undefined\n subRowState(row: any): SubRowEntry | undefined\n ensureSubRows(row: any): void\n retrySubRows(row: any): void\n // selection\n selectMode: ComputedRef<false | 'multi' | 'single'>\n /** The selection checkbox (from the selection feature; only rendered when `selectMode` is set). */\n Checkbox: Component | undefined\n isRowSelectable(row: any): boolean\n rowCheckState(row: any): SelectionSummary\n toggleRow(row: any): void\n // presentation & events\n isHighlighted(key: RowKey): boolean\n rowClass(row: any, index: number): ClassValue\n rowClickable: ComputedRef<boolean>\n /** Grid-wide change highlight (columns may override with `flash`). */\n flash: ComputedRef<FlashMode>\n /** Only with the filtering feature. */\n filters?: {\n FilterButton: Component\n FilterInput: Component\n state: ComputedRef<FilterState>\n setSearch(search: string): void\n setColumnFilter(key: string, filter: ColumnFilter | undefined): void\n isActive(key: string): boolean\n typeOf(col: ColumnDef): FilterType | 'custom'\n /** Show the filter row (inputs inside the header cells). */\n filterRow: ComputedRef<boolean>\n /** Distinct values of a column, for its value-list filter. */\n distinct(key: string): DistinctValue[]\n /** DOM id of a column's filter popover. */\n idFor(key: string): string\n /** Opens a column's filter popover (header menu, filter row). */\n open(key: string): void\n }\n virtual: ComputedRef<boolean>\n /** With the virtual scrolling feature: windowing of each level of rows, and measuring. */\n virtualRows?: VirtualRowsContext\n pinStyle(key: string): Record<string, string> | undefined\n onRowClick(row: any, key: RowKey, event: MouseEvent | KeyboardEvent): void\n onCellClick(row: any, key: RowKey, column: ResolvedColumn, event: MouseEvent | KeyboardEvent): void\n onCellAction(row: any, key: RowKey, column: ResolvedColumn, name: string, payload: unknown): void\n onCellContextMenu(row: any, key: RowKey, column: ResolvedColumn, event: MouseEvent, el: HTMLElement): void\n onHeaderContextMenu(column: ResolvedColumn, event: MouseEvent, el: HTMLElement): void\n /** Menus feature: a `pointerdown` on a body cell (touch: hold for its menu). */\n onCellPointerDown?(row: any, key: RowKey, column: ResolvedColumn, event: PointerEvent, el: HTMLElement): void\n}\n\n/** A row in a pinned section: a pinned data row, or the totals row. */\nexport interface PinnedRowItem {\n /** Unique within the grid's pinned rows. */\n id: string\n kind: 'row' | 'total'\n row: any\n key: RowKey\n /** Shows the selection checkbox (pinned rows of the data, not the app's extra rows). */\n selectable: boolean\n}\n\nexport const GRID_CONTEXT_KEY: InjectionKey<GridContext> = Symbol('vue-grid:context')\n\nexport function useInternalGrid(): GridContext {\n const ctx = inject(GRID_CONTEXT_KEY)\n if (!ctx) throw new Error('[vue-grid] internal component used outside <VGrid>')\n return ctx\n}\n"],"mappings":";;AASA,IAAaA,IAAoB,eAyHpBC,IAA8C,OAAO,kBAAkB;AAEpF,SAAgBC,IAA+B;CAC7C,IAAMC,IAAMC,EAAOH,CAAgB;CACnC,IAAI,CAACE,GAAK,MAAU,MAAM,oDAAoD;CAC9E,OAAOA;AACT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dev.js","names":["warned","warnOnce","id","message"],"sources":["../../src/internal/dev.ts"],"sourcesContent":["// Dev-only code is written as `if (process.env.NODE_ENV !== 'production') …` at each use site —\n// the same contract as Vue's esm-bundler build. Bundlers (Vite, webpack, Rollup/esbuild with a\n// define) replace the expression, so production builds drop those blocks and their messages.\n// Don't wrap it in a `typeof process` guard or an exported constant: the guard survives the\n// replacement (warnings would ship to production browsers) and a constant isn't inlined across\n// modules by every bundler. Each file that checks it declares `process` locally (module scope, so\n// it never clashes with @types/node):\n// declare const process: { env: Record<string, string | undefined> }\n\nconst warned = new Set<string>()\n\nexport function warnOnce(id: string, message: string) {\n if (warned.has(id)) return\n warned.add(id)\n console.warn(`[vue-grid] ${message}`)\n}\n"],"mappings":";AASA,IAAMA,oBAAS,IAAI,IAAY;AAE/B,SAAgBC,EAAS,GAAY,GAAiB;CACpD,AAAID,EAAO,IAAIE,CAAE,MACjBF,EAAO,IAAIE,CAAE,GACb,QAAQ,KAAK,cAAcC,GAAS;AACtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features.js","names":["resolveFeatures","lists","set","list","f"],"sources":["../../src/internal/features.ts"],"sourcesContent":["import type {\n AggregationFeature,\n RowPinningFeature,\n ColumnGroupsFeature,\n ColumnPinningFeature,\n ColumnResizingFeature,\n ColumnReorderFeature,\n ColumnVisibilityFeature,\n FilteringFeature,\n KeyboardNavigationFeature,\n GridFeature,\n MenusFeature,\n PaginationFeature,\n SelectionFeature,\n ServerDataFeature,\n SortingFeature,\n SubGridsFeature,\n VirtualScrollingFeature,\n} from '../types'\n\n/** The features a grid has, by name. */\nexport interface FeatureSet {\n sorting?: SortingFeature\n filtering?: FilteringFeature\n serverData?: ServerDataFeature\n pagination?: PaginationFeature\n selection?: SelectionFeature\n subGrids?: SubGridsFeature\n menus?: MenusFeature\n columnReorder?: ColumnReorderFeature\n columnPinning?: ColumnPinningFeature\n virtualScrolling?: VirtualScrollingFeature\n columnVisibility?: ColumnVisibilityFeature\n keyboardNavigation?: KeyboardNavigationFeature\n columnResizing?: ColumnResizingFeature\n columnGroups?: ColumnGroupsFeature\n rowPinning?: RowPinningFeature\n aggregation?: AggregationFeature\n}\n\n/** Merges feature lists (app-wide, then per grid); a later entry with the same name wins. */\nexport function resolveFeatures(...lists: (readonly GridFeature[] | undefined)[]): FeatureSet {\n const set: Record<string, GridFeature> = {}\n for (const list of lists) for (const f of list ?? []) set[f.feature] = f\n return set as FeatureSet\n}\n"],"mappings":";AAyCA,SAAgBA,EAAgB,GAAGC,GAA2D;CAC5F,IAAMC,IAAmC,CAAC;CAC1C,KAAK,IAAMC,KAAQF,GAAO,KAAK,IAAMG,KAAKD,KAAQ,CAAC,GAAG,EAAIC,EAAE,WAAWA;CACvE,OAAOF;AACT"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// src/internal/supports.ts
|
|
2
|
+
var e = /* @__PURE__ */ new Map();
|
|
3
|
+
function t(t, n) {
|
|
4
|
+
let r = e.get(t);
|
|
5
|
+
return r === void 0 && (r = typeof CSS > "u" || typeof CSS.supports != "function" || n(), e.set(t, r)), r;
|
|
6
|
+
}
|
|
7
|
+
var n = () => t("has", () => CSS.supports("selector(:has(+ *))")), r = () => t("scroll-state", () => CSS.supports("container-type: scroll-state")), i = () => t("anchor-visible", () => CSS.supports("position-visibility: anchor-visible")), a = () => t("relative-color", () => CSS.supports("color: oklch(from red l c h)"));
|
|
8
|
+
export { i as supportsAnchorVisibility, n as supportsHas, a as supportsRelativeColor, r as supportsScrollState };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=supports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"supports.js","names":["cache","check","v","id","test","supportsHas","supportsScrollState","supportsAnchorVisibility","supportsRelativeColor"],"sources":["../../src/internal/supports.ts"],"sourcesContent":["/**\n * CSS feature checks deciding when a JS fallback is needed. Everything the grid can do in CSS it does\n * in CSS; these only gate the fallbacks. All return `true` during SSR (no `CSS` global), so the\n * server never renders fallback state.\n */\nconst cache = new Map<string, boolean>()\n\nfunction check(id: string, test: () => boolean): boolean {\n let v = cache.get(id)\n if (v === undefined) {\n v = typeof CSS === 'undefined' || typeof CSS.supports !== 'function' ? true : test()\n cache.set(id, v)\n }\n return v\n}\n\n/** `:has()` — used to find the pinned-column edge in CSS. */\nexport const supportsHas = () => check('has', () => CSS.supports('selector(:has(+ *))'))\n\n/** Scroll-state container queries — show pin shadows only while content is scrolled under them. */\nexport const supportsScrollState = () =>\n check('scroll-state', () => CSS.supports('container-type: scroll-state'))\n\n/**\n * Hiding an anchored popover once its anchor is clipped. Checked via the current value name: engines\n * that only parse the old `anchors-visible` (Firefox 159) parse it without hiding anything.\n */\nexport const supportsAnchorVisibility = () =>\n check('anchor-visible', () => CSS.supports('position-visibility: anchor-visible'))\n\n/** Relative colour syntax — picks readable chip text in CSS. */\nexport const supportsRelativeColor = () =>\n check('relative-color', () => CSS.supports('color: oklch(from red l c h)'))\n"],"mappings":";AAKA,IAAMA,oBAAQ,IAAI,IAAqB;AAEvC,SAASC,EAAM,GAAY,GAA8B;CACvD,IAAIC,IAAIF,EAAM,IAAIG,CAAE;CAKpB,OAJID,MAAM,KAAA,MACR,IAAI,OAAO,MAAQ,OAAe,OAAO,IAAI,YAAa,cAAoBE,EAAK,GACnFJ,EAAM,IAAIG,GAAID,CAAC,IAEVA;AACT;AAGA,IAAaG,UAAoBJ,EAAM,aAAa,IAAI,SAAS,qBAAqB,CAAC,GAG1EK,UACXL,EAAM,sBAAsB,IAAI,SAAS,8BAA8B,CAAC,GAM7DM,UACXN,EAAM,wBAAwB,IAAI,SAAS,qCAAqC,CAAC,GAGtEO,UACXP,EAAM,wBAAwB,IAAI,SAAS,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
var e = /* @__PURE__ */ new WeakSet(), t = (t) => e.has(t);
|
|
2
|
+
function n(t, n) {
|
|
3
|
+
let r = new MouseEvent("contextmenu", {
|
|
4
|
+
clientX: t,
|
|
5
|
+
clientY: n,
|
|
6
|
+
button: 2,
|
|
7
|
+
cancelable: !0
|
|
8
|
+
});
|
|
9
|
+
return e.add(r), r;
|
|
10
|
+
}
|
|
11
|
+
function r(t, n) {
|
|
12
|
+
if (t.pointerType !== "touch") return;
|
|
13
|
+
let r = t.pointerId, i = t.clientX, a = t.clientY, o, s = !1, c = !1, l = window.setTimeout(() => {
|
|
14
|
+
s = !0, o = n(i, a);
|
|
15
|
+
}, 450), u = (e) => {
|
|
16
|
+
s && e.cancelable && e.preventDefault();
|
|
17
|
+
}, d = (t) => {
|
|
18
|
+
e.has(t) || (t.preventDefault(), t.stopPropagation());
|
|
19
|
+
}, f = (e) => {
|
|
20
|
+
e.pointerId === r && (s ? !c && Math.hypot(e.clientX - i, e.clientY - a) <= 10 || (c = !0, o?.move?.(e)) : Math.hypot(e.clientX - i, e.clientY - a) > 10 && h());
|
|
21
|
+
}, p = (e) => {
|
|
22
|
+
if (e.pointerId === r) {
|
|
23
|
+
if (s) {
|
|
24
|
+
let t = !1, n = () => {
|
|
25
|
+
t || (t = !0, window.removeEventListener("click", r, { capture: !0 }), o?.end?.(e, c));
|
|
26
|
+
}, r = (e) => {
|
|
27
|
+
e.preventDefault(), e.stopPropagation(), n();
|
|
28
|
+
};
|
|
29
|
+
window.addEventListener("click", r, { capture: !0 }), window.setTimeout(n, 350);
|
|
30
|
+
}
|
|
31
|
+
h();
|
|
32
|
+
}
|
|
33
|
+
}, m = (e) => {
|
|
34
|
+
e.pointerId === r && (s && o?.end?.(null, c), h());
|
|
35
|
+
};
|
|
36
|
+
function h() {
|
|
37
|
+
window.clearTimeout(l), window.removeEventListener("pointermove", f), window.removeEventListener("pointerup", p), window.removeEventListener("pointercancel", m), window.removeEventListener("touchmove", u), window.setTimeout(() => window.removeEventListener("contextmenu", d, { capture: !0 }), 600);
|
|
38
|
+
}
|
|
39
|
+
window.addEventListener("pointermove", f), window.addEventListener("pointerup", p), window.addEventListener("pointercancel", m), window.addEventListener("touchmove", u, { passive: !1 }), window.addEventListener("contextmenu", d, { capture: !0 });
|
|
40
|
+
}
|
|
41
|
+
export { n as holdEvent, t as isHoldEvent, r as touchHold };
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=touchHold.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"touchHold.js","names":["holdEvents","isHoldEvent","event","holdEvent","x","y","touchHold","id","x0","y0","handlers","held","moved","timer","onHold","blockScroll","blockMenu","e","onMove","finish","onUp","done","act","onClick","c","onCancel"],"sources":["../../src/internal/touchHold.ts"],"sourcesContent":["/** How long a finger stays put before a touch counts as a hold. */\nexport const HOLD_MS = 450\n/** How far (px) a finger may drift and still be holding; further first = a scroll. */\nconst SLOP = 10\n/** How long after a held finger lifts to wait for the click the release may send. */\nconst RELEASE_MS = 350\n\nexport interface HoldHandlers {\n /** The finger moved after the hold (the page doesn't scroll meanwhile). */\n move?(event: PointerEvent): void\n /** The finger lifted (`event`) or the gesture was cancelled (`null`). `moved`: it moved after the hold. */\n end?(event: PointerEvent | null, moved: boolean): void\n}\n\n/** Synthetic `contextmenu` events made for a touch hold (menus place them at the finger). */\nconst holdEvents = new WeakSet<Event>()\nexport const isHoldEvent = (event: Event) => holdEvents.has(event)\n/** A `contextmenu`-like event at a viewport point, for opening a menu after a touch hold. */\nexport function holdEvent(x: number, y: number): MouseEvent {\n const event = new MouseEvent('contextmenu', { clientX: x, clientY: y, button: 2, cancelable: true })\n holdEvents.add(event)\n return event\n}\n\n/**\n * Touch-and-hold on touch screens, where there is no right click (and iOS fires no `contextmenu`\n * at all). Call from a `pointerdown`: a touch that stays put for `HOLD_MS` calls `onHold`; moving\n * first is a scroll and cancels it. Once held, the page doesn't scroll (so the finger can drag), the\n * browser's own long-press menu is suppressed, and the click that follows the release is swallowed.\n * Does nothing for mouse and pen.\n */\nexport function touchHold(event: PointerEvent, onHold: (x: number, y: number) => HoldHandlers | void): void {\n if (event.pointerType !== 'touch') return\n const id = event.pointerId\n const x0 = event.clientX\n const y0 = event.clientY\n let handlers: HoldHandlers | void = undefined\n let held = false\n let moved = false\n\n const timer = window.setTimeout(() => {\n held = true\n handlers = onHold(x0, y0)\n }, HOLD_MS)\n\n const blockScroll = (e: TouchEvent) => {\n if (held && e.cancelable) e.preventDefault()\n }\n // The browser's own long-press menu (Android): the hold opens ours instead, whichever comes first.\n const blockMenu = (e: Event) => {\n if (holdEvents.has(e)) return\n e.preventDefault()\n e.stopPropagation()\n }\n const onMove = (e: PointerEvent) => {\n if (e.pointerId !== id) return\n if (!held) {\n if (Math.hypot(e.clientX - x0, e.clientY - y0) > SLOP) finish()\n return\n }\n if (!moved && Math.hypot(e.clientX - x0, e.clientY - y0) <= SLOP) return\n moved = true\n handlers?.move?.(e)\n }\n const onUp = (e: PointerEvent) => {\n if (e.pointerId !== id) return\n if (held) {\n // The release may still send a `click` (Chromium does): swallow it, and act only after it —\n // a menu opened before it would be light-dismissed by it. No click within RELEASE_MS: act then.\n let done = false\n const act = () => {\n if (done) return\n done = true\n window.removeEventListener('click', onClick, { capture: true })\n handlers?.end?.(e, moved)\n }\n const onClick = (c: Event) => {\n c.preventDefault()\n c.stopPropagation()\n act()\n }\n window.addEventListener('click', onClick, { capture: true })\n window.setTimeout(act, RELEASE_MS)\n }\n finish()\n }\n const onCancel = (e: PointerEvent) => {\n if (e.pointerId !== id) return\n if (held) handlers?.end?.(null, moved)\n finish()\n }\n function finish() {\n window.clearTimeout(timer)\n window.removeEventListener('pointermove', onMove)\n window.removeEventListener('pointerup', onUp)\n window.removeEventListener('pointercancel', onCancel)\n window.removeEventListener('touchmove', blockScroll)\n // A late native `contextmenu` can still arrive right after the release.\n window.setTimeout(() => window.removeEventListener('contextmenu', blockMenu, { capture: true }), 600)\n }\n window.addEventListener('pointermove', onMove)\n window.addEventListener('pointerup', onUp)\n window.addEventListener('pointercancel', onCancel)\n window.addEventListener('touchmove', blockScroll, { passive: false })\n window.addEventListener('contextmenu', blockMenu, { capture: true })\n}\n"],"mappings":"AAGA,IAYMA,oBAAa,IAAI,QAAe,GACzBC,KAAe,MAAiBD,EAAW,IAAIE,CAAK;AAEjE,SAAgBC,EAAU,GAAW,GAAuB;CAC1D,IAAMD,IAAQ,IAAI,WAAW,eAAe;EAAE,SAASE;EAAG,SAASC;EAAG,QAAQ;EAAG,YAAY;CAAK,CAAC;CAEnG,OADAL,EAAW,IAAIE,CAAK,GACbA;AACT;AASA,SAAgBI,EAAU,GAAqB,GAA6D;CAC1G,IAAIJ,EAAM,gBAAgB,SAAS;CACnC,IAAMK,IAAKL,EAAM,WACXM,IAAKN,EAAM,SACXO,IAAKP,EAAM,SACbQ,GACAC,IAAO,IACPC,IAAQ,IAENC,IAAQ,OAAO,iBAAiB;EAEpC,AADA,IAAO,IACP,IAAWC,EAAON,GAAIC,CAAE;CAC1B,GAAA,GAAU,GAEJM,KAAe,MAAkB;EACrC,AAAIJ,KAAQ,EAAE,cAAY,EAAE,eAAe;CAC7C,GAEMK,KAAa,MAAa;EAC9B,AAAIhB,EAAW,IAAIiB,CAAC,MACpBA,EAAE,eAAe,GACjBA,EAAE,gBAAgB;CACpB,GACMC,KAAU,MAAoB;EAClC,AAAI,EAAE,cAAcX,MACfI,IAID,CAACC,KAAS,KAAK,MAAM,EAAE,UAAUJ,GAAI,EAAE,UAAUC,CAAE,KAAK,OAC5D,IAAQ,IACRC,GAAU,OAAO,CAAC,KALZ,KAAK,MAAM,EAAE,UAAUF,GAAI,EAAE,UAAUC,CAAE,IAAI,MAAMU,EAAO;CAMlE,GACMC,KAAQ,MAAoB;EAChC,IAAI,EAAE,cAAcb,GACpB;OAAII,GAAM;IAGR,IAAIU,IAAO,IACLC,UAAY;KAChB,AAAID,MACJ,IAAO,IACP,OAAO,oBAAoB,SAASE,GAAS,EAAE,SAAS,GAAK,CAAC,GAC9Db,GAAU,MAAM,GAAGE,CAAK;IAC1B,GACMW,KAAW,MAAa;KAG5B,AAFAC,EAAE,eAAe,GACjBA,EAAE,gBAAgB,GAClBF,EAAI;IACN;IAEA,AADA,OAAO,iBAAiB,SAASC,GAAS,EAAE,SAAS,GAAK,CAAC,GAC3D,OAAO,WAAWD,GAAK,GAAU;GACnC;GACA,EAAO;EADP;CAEF,GACMG,KAAY,MAAoB;EACpC,AAAI,EAAE,cAAclB,MAChBI,KAAMD,GAAU,MAAM,MAAME,CAAK,GACrCO,EAAO;CACT;CACA,SAASA,IAAS;EAOhB,AANA,OAAO,aAAaN,CAAK,GACzB,OAAO,oBAAoB,eAAeK,CAAM,GAChD,OAAO,oBAAoB,aAAaE,CAAI,GAC5C,OAAO,oBAAoB,iBAAiBK,CAAQ,GACpD,OAAO,oBAAoB,aAAaV,CAAW,GAEnD,OAAO,iBAAiB,OAAO,oBAAoB,eAAeC,GAAW,EAAE,SAAS,GAAK,CAAC,GAAG,GAAG;CACtG;CAKA,AAJA,OAAO,iBAAiB,eAAeE,CAAM,GAC7C,OAAO,iBAAiB,aAAaE,CAAI,GACzC,OAAO,iBAAiB,iBAAiBK,CAAQ,GACjD,OAAO,iBAAiB,aAAaV,GAAa,EAAE,SAAS,GAAM,CAAC,GACpE,OAAO,iBAAiB,eAAeC,GAAW,EAAE,SAAS,GAAK,CAAC;AACrE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { computed as e, inject as t } from "vue";
|
|
2
|
+
// src/registry/plugin.ts
|
|
3
|
+
var n = Symbol("vue-grid:config"), r = Symbol("vue-grid:format");
|
|
4
|
+
function i(e = {}) {
|
|
5
|
+
return { install(t) {
|
|
6
|
+
t.provide(n, e);
|
|
7
|
+
} };
|
|
8
|
+
}
|
|
9
|
+
var a = () => typeof navigator < "u" && navigator.language || "en-US", o = e(() => ({
|
|
10
|
+
locale: a(),
|
|
11
|
+
currency: "USD"
|
|
12
|
+
}));
|
|
13
|
+
function s() {
|
|
14
|
+
return t(r, o);
|
|
15
|
+
}
|
|
16
|
+
function c(e, t) {
|
|
17
|
+
return {
|
|
18
|
+
locale: e.locale ?? t?.locale ?? a(),
|
|
19
|
+
currency: e.currency ?? t?.currency ?? "USD",
|
|
20
|
+
timeZone: e.timeZone ?? t?.timeZone
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export { r as FORMAT_CONTEXT_KEY, n as GRID_CONFIG_KEY, i as createVueGrid, c as resolveFormatContext, s as useGridContext };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","names":["GRID_CONFIG_KEY","FORMAT_CONTEXT_KEY","createVueGrid","config","browserLocale","fallback","computed","useGridContext","inject","resolveFormatContext","props"],"sources":["../../src/registry/plugin.ts"],"sourcesContent":["import { computed, inject, type ComputedRef, type InjectionKey, type Plugin } from 'vue'\nimport type { FormatContext, VueGridConfig } from '../types'\n\nexport const GRID_CONFIG_KEY: InjectionKey<VueGridConfig> = Symbol('vue-grid:config')\nexport const FORMAT_CONTEXT_KEY: InjectionKey<ComputedRef<FormatContext>> = Symbol('vue-grid:format')\n\n/**\n * App-wide defaults: extra renderers and formatting context.\n *\n * ```ts\n * app.use(createVueGrid({ renderers: [ratingRenderer], locale: 'de-DE', currency: 'EUR' }))\n * ```\n */\nexport function createVueGrid(config: VueGridConfig = {}): Plugin {\n return {\n install(app) {\n app.provide(GRID_CONFIG_KEY, config)\n },\n }\n}\n\nconst browserLocale = () =>\n (typeof navigator !== 'undefined' && navigator.language) || 'en-US'\n\nconst fallback = computed<FormatContext>(() => ({ locale: browserLocale(), currency: 'USD' }))\n\n/**\n * Formatting context (locale, currency, time zone) for renderers. Resolved from the nearest\n * `<VGrid>` props, then `createVueGrid` config, then the browser.\n */\nexport function useGridContext(): ComputedRef<FormatContext> {\n return inject(FORMAT_CONTEXT_KEY, fallback)\n}\n\nexport function resolveFormatContext(\n props: Partial<FormatContext>,\n config: VueGridConfig | undefined,\n): FormatContext {\n return {\n locale: props.locale ?? config?.locale ?? browserLocale(),\n currency: props.currency ?? config?.currency ?? 'USD',\n timeZone: props.timeZone ?? config?.timeZone,\n }\n}\n"],"mappings":";;AAGA,IAAaA,IAA+C,OAAO,iBAAiB,GACvEC,IAA+D,OAAO,iBAAiB;AASpG,SAAgBC,EAAc,IAAwB,CAAC,GAAW;CAChE,OAAO,EACL,QAAQ,GAAK;EACX,EAAI,QAAQF,GAAiBG,CAAM;CACrC,EACF;AACF;AAEA,IAAMC,UACH,OAAO,YAAc,OAAe,UAAU,YAAa,SAExDC,IAAWC,SAA+B;CAAE,QAAQF,EAAc;CAAG,UAAU;AAAM,EAAE;AAM7F,SAAgBG,IAA6C;CAC3D,OAAOC,EAAOP,GAAoBI,CAAQ;AAC5C;AAEA,SAAgBI,EACd,GACA,GACe;CACf,OAAO;EACL,QAAQC,EAAM,UAAUP,GAAQ,UAAUC,EAAc;EACxD,UAAUM,EAAM,YAAYP,GAAQ,YAAY;EAChD,UAAUO,EAAM,YAAYP,GAAQ;CACtC;AACF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/registry/registry.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
return e;
|
|
4
|
+
}
|
|
5
|
+
function t(...e) {
|
|
6
|
+
let t = /* @__PURE__ */ new Map();
|
|
7
|
+
for (let n of e) for (let e of n ?? []) t.set(e.name, e);
|
|
8
|
+
return { get: (e) => t.get(e) };
|
|
9
|
+
}
|
|
10
|
+
function n(e) {
|
|
11
|
+
return typeof e == "object" && !!e && "component" in e && "name" in e && typeof e.name == "string";
|
|
12
|
+
}
|
|
13
|
+
export { t as createRendererRegistry, e as defineCellRenderer, n as isRendererDefinition };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","names":["defineCellRenderer","definition","createRendererRegistry","layers","map","layer","def","name","isRendererDefinition","value"],"sources":["../../src/registry/registry.ts"],"sourcesContent":["import type { CellRendererDefinition } from '../types'\n\n/**\n * Identity helper that gives renderer authors type inference for options.\n *\n * ```ts\n * export const ratingRenderer = defineCellRenderer<{ max: number }>({\n * name: 'rating', component: RatingCell, defaults: { max: 5 },\n * })\n * ```\n */\nexport function defineCellRenderer<O = Record<string, unknown>>(\n definition: CellRendererDefinition<O>,\n): CellRendererDefinition<O> {\n return definition\n}\n\nexport interface RendererRegistry {\n get(name: string): CellRendererDefinition | undefined\n}\n\n/** Builds a lookup from layers of definitions; later layers override earlier ones by name. */\nexport function createRendererRegistry(\n ...layers: (readonly CellRendererDefinition[] | undefined)[]\n): RendererRegistry {\n const map = new Map<string, CellRendererDefinition>()\n for (const layer of layers) {\n for (const def of layer ?? []) map.set(def.name, def)\n }\n return { get: (name) => map.get(name) }\n}\n\n/** Tells a renderer definition (`{ name, component, … }`) apart from a plain component. */\nexport function isRendererDefinition(value: unknown): value is CellRendererDefinition {\n return typeof value === 'object' && value !== null && 'component' in value && 'name' in value && typeof (value as { name: unknown }).name === 'string'\n}\n"],"mappings":";AAWA,SAAgBA,EACd,GAC2B;CAC3B,OAAOC;AACT;AAOA,SAAgBC,EACd,GAAGC,GACe;CAClB,IAAMC,oBAAM,IAAI,IAAoC;CACpD,KAAK,IAAMC,KAASF,GAClB,KAAK,IAAMG,KAAOD,KAAS,CAAC,GAAG,EAAI,IAAIC,EAAI,MAAMA,CAAG;CAEtD,OAAO,EAAE,MAAM,MAASF,EAAI,IAAIG,CAAI,EAAE;AACxC;AAGA,SAAgBC,EAAqB,GAAiD;CACpF,OAAO,OAAOC,KAAU,cAAYA,KAAkB,eAAeA,KAAS,UAAUA,KAAS,OAAQA,EAA4B,QAAS;AAChJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionButtonCell.js","names":["ActionButtonCell_vue_vue_type_script_setup_true_lang_default","ActionButtonCell_default"],"sources":[],"mappings":""}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { resolveOption as e } from "./options.js";
|
|
2
|
+
import { computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, defineComponent as a, normalizeClass as o, openBlock as s, resolveDynamicComponent as c, toDisplayString as l, toRaw as u } from "vue";
|
|
3
|
+
// src/renderers/ActionButtonCell.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var d = [
|
|
5
|
+
"disabled",
|
|
6
|
+
"aria-label",
|
|
7
|
+
"title"
|
|
8
|
+
], f = { key: 1 }, p = /*@__PURE__*/ a({
|
|
9
|
+
__name: "ActionButtonCell",
|
|
10
|
+
props: {
|
|
11
|
+
value: {},
|
|
12
|
+
row: {},
|
|
13
|
+
rowKey: {},
|
|
14
|
+
rowIndex: {},
|
|
15
|
+
depth: {},
|
|
16
|
+
column: {},
|
|
17
|
+
options: {}
|
|
18
|
+
},
|
|
19
|
+
emits: ["action"],
|
|
20
|
+
setup(a, { emit: p }) {
|
|
21
|
+
let m = a, h = p, g = t(() => e(m.options.label, m.value, m.row) ?? String(m.value ?? "")), _ = t(() => m.options.disabled ? m.options.disabled(m.value, m.row) : !1), v = t(() => !m.options.visible || m.options.visible(m.value, m.row)), y = t(() => m.options.icon && u(m.options.icon)), b = t(() => !!m.options.iconOnly && !!y.value);
|
|
22
|
+
return (e, t) => v.value && (g.value || y.value) ? (s(), i("button", {
|
|
23
|
+
key: 0,
|
|
24
|
+
type: "button",
|
|
25
|
+
class: o([
|
|
26
|
+
"vg-action-button",
|
|
27
|
+
`vg-variant-${a.options.variant ?? "outline"}`,
|
|
28
|
+
a.options.tone && `vg-tone-${a.options.tone}`,
|
|
29
|
+
{ "vg-action-icon-only": b.value }
|
|
30
|
+
]),
|
|
31
|
+
disabled: _.value,
|
|
32
|
+
"aria-label": b.value ? g.value : void 0,
|
|
33
|
+
title: b.value ? g.value : void 0,
|
|
34
|
+
onClick: t[0] ||= (e) => h("action", a.options.action ?? "click", a.value)
|
|
35
|
+
}, [y.value ? (s(), n(c(y.value), {
|
|
36
|
+
key: 0,
|
|
37
|
+
class: "vg-action-icon",
|
|
38
|
+
"aria-hidden": "true"
|
|
39
|
+
})) : r("", !0), g.value && !b.value ? (s(), i("span", f, l(g.value), 1)) : r("", !0)], 10, d)) : r("", !0);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
export { p as default };
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=ActionButtonCell.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionButtonCell.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_normalizeClass","_createBlock","_resolveDynamicComponent","_toDisplayString","_hoisted_1","_hoisted_2","ActionButtonCell_vue_vue_type_script_setup_true_lang_default","__emit","props","__props","emit","label","computed","resolveOption","disabled","visible","icon","toRaw","iconOnly","openBlock","createElementBlock","normalizeClass","_cache","createBlock","resolveDynamicComponent","createCommentVNode","toDisplayString"],"sources":["../../src/renderers/ActionButtonCell.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, toRaw } from 'vue'\nimport type { CellRendererEmits, CellRendererProps } from '../types'\nimport { resolveOption, type ActionButtonOptions } from './options'\n\nconst props = defineProps<CellRendererProps<unknown, unknown, ActionButtonOptions>>()\nconst emit = defineEmits<CellRendererEmits>()\n\nconst label = computed(() => resolveOption(props.options.label, props.value, props.row) ?? String(props.value ?? ''))\nconst disabled = computed(() => (props.options.disabled ? props.options.disabled(props.value, props.row) : false))\nconst visible = computed(() => (props.options.visible ? props.options.visible(props.value, props.row) : true))\n// toRaw: options may come from reactive state; render the component itself, not a proxy.\nconst icon = computed(() => props.options.icon && toRaw(props.options.icon))\nconst iconOnly = computed(() => !!props.options.iconOnly && !!icon.value)\n</script>\n\n<template>\n <button\n v-if=\"visible && (label || icon)\"\n type=\"button\"\n :class=\"[\n 'vg-action-button',\n `vg-variant-${options.variant ?? 'outline'}`,\n options.tone && `vg-tone-${options.tone}`,\n { 'vg-action-icon-only': iconOnly },\n ]\"\n :disabled=\"disabled\"\n :aria-label=\"iconOnly ? label : undefined\"\n :title=\"iconOnly ? label : undefined\"\n @click=\"emit('action', options.action ?? 'click', value)\"\n >\n <component :is=\"icon\" v-if=\"icon\" class=\"vg-action-icon\" aria-hidden=\"true\" />\n <span v-if=\"label && !iconOnly\">{{ label }}</span>\n </button>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAKA,IAAMU,IAAQC,GACRC,IAAOH,GAEPI,IAAQC,QAAeC,EAAcL,EAAM,QAAQ,OAAOA,EAAM,OAAOA,EAAM,GAAG,KAAK,OAAOA,EAAM,SAAS,EAAE,CAAC,GAC9GM,IAAWF,QAAgBJ,EAAM,QAAQ,WAAWA,EAAM,QAAQ,SAASA,EAAM,OAAOA,EAAM,GAAG,IAAI,EAAM,GAC3GO,IAAUH,QAAgB,GAAM,QAAQ,WAAUJ,EAAM,QAAQ,QAAQA,EAAM,OAAOA,EAAM,GAAG,CAAS,GAEvGQ,IAAOJ,QAAeJ,EAAM,QAAQ,QAAQS,EAAMT,EAAM,QAAQ,IAAI,CAAC,GACrEU,IAAWN,QAAe,CAAC,CAACJ,EAAM,QAAQ,YAAY,CAAC,CAACQ,EAAK,KAAK;E,iBAK9DD,EAAA,UAAYJ,EAAA,SAASK,EAAA,UAD7BlB,EAAA,GAAAC,EAgBS,UAAA;;GAdP,MAAK;GACJ,OAAKC,EAAA;;IAAkD,cAAAS,EAAA,QAAQ,WAAO;IAAuBA,EAAA,QAAQ,QAAI,WAAeA,EAAA,QAAQ;IAAuC,EAAA,uBAAAS,EAAA,MAAQ;;GAM/K,UAAUJ,EAAA;GACV,cAAYI,EAAA,QAAWP,EAAA,QAAQ,KAAA;GAC/B,OAAOO,EAAA,QAAWP,EAAA,QAAQ,KAAA;GAC1B,SAAK,AAAAW,EAAA,QAAA,MAAEZ,EAAI,UAAWD,EAAA,QAAQ,UAAM,SAAaA,EAAA,KAAK;E,IAE3BO,EAAA,SAA5BlB,EAAA,GAAAG,EAA8EC,EAA9Dc,EAAA,KAAI,GAAA;;GAAc,OAAM;GAAiB,eAAY;E,iBACzDL,EAAA,SAAK,CAAKO,EAAA,SAAtBpB,EAAA,GAAAC,EAAkD,QAAAM,GAAAF,EAAfQ,EAAA,KAAK,GAAA,CAAA,K"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionsMenuCell.js","names":["ActionsMenuCell_vue_vue_type_script_setup_true_lang_default","ActionsMenuCell_default"],"sources":[],"mappings":""}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import e from "../components/VGridMenu.js";
|
|
2
|
+
import { anchorNameFor as t } from "../internal/anchor.js";
|
|
3
|
+
import { computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, normalizeStyle as c, openBlock as l, ref as u, unref as d, useId as f, withModifiers as p } from "vue";
|
|
4
|
+
// src/renderers/ActionsMenuCell.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var m = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "vg-actions-menu"
|
|
8
|
+
}, h = ["aria-label", "aria-expanded"], g = /*@__PURE__*/ s({
|
|
9
|
+
__name: "ActionsMenuCell",
|
|
10
|
+
props: {
|
|
11
|
+
value: {},
|
|
12
|
+
row: {},
|
|
13
|
+
rowKey: {},
|
|
14
|
+
rowIndex: {},
|
|
15
|
+
depth: {},
|
|
16
|
+
column: {},
|
|
17
|
+
options: {}
|
|
18
|
+
},
|
|
19
|
+
emits: ["action"],
|
|
20
|
+
setup(s, { emit: g }) {
|
|
21
|
+
let _ = s, v = g, y = f(), b = `vg-actions-${y}`, x = t(`actions-${y}`), S = u(!1), C = n(() => {
|
|
22
|
+
let e = _.options.actions;
|
|
23
|
+
return (typeof e == "function" ? e(_.row) : e) ?? [];
|
|
24
|
+
});
|
|
25
|
+
function w(e) {
|
|
26
|
+
v("action", e.name, e);
|
|
27
|
+
}
|
|
28
|
+
return (t, n) => C.value.length ? (l(), i("span", m, [a("button", {
|
|
29
|
+
type: "button",
|
|
30
|
+
class: "vg-icon-button",
|
|
31
|
+
"aria-label": s.options.label ?? "Actions",
|
|
32
|
+
"aria-haspopup": "menu",
|
|
33
|
+
"aria-expanded": S.value,
|
|
34
|
+
"aria-controls": b,
|
|
35
|
+
popovertarget: b,
|
|
36
|
+
style: c({ "anchor-name": d(x) }),
|
|
37
|
+
onClick: n[0] ||= p(() => {}, ["stop"])
|
|
38
|
+
}, [...n[3] ||= [a("svg", {
|
|
39
|
+
viewBox: "0 0 16 16",
|
|
40
|
+
"aria-hidden": "true"
|
|
41
|
+
}, [
|
|
42
|
+
a("circle", {
|
|
43
|
+
cx: "8",
|
|
44
|
+
cy: "3",
|
|
45
|
+
r: "1.5"
|
|
46
|
+
}),
|
|
47
|
+
a("circle", {
|
|
48
|
+
cx: "8",
|
|
49
|
+
cy: "8",
|
|
50
|
+
r: "1.5"
|
|
51
|
+
}),
|
|
52
|
+
a("circle", {
|
|
53
|
+
cx: "8",
|
|
54
|
+
cy: "13",
|
|
55
|
+
r: "1.5"
|
|
56
|
+
})
|
|
57
|
+
], -1)]], 12, h), o(e, {
|
|
58
|
+
id: b,
|
|
59
|
+
items: C.value,
|
|
60
|
+
label: s.options.label ?? "Actions",
|
|
61
|
+
"anchor-name": d(x),
|
|
62
|
+
placement: "bottom-end",
|
|
63
|
+
onSelect: w,
|
|
64
|
+
onOpen: n[1] ||= (e) => S.value = !0,
|
|
65
|
+
onClose: n[2] ||= (e) => S.value = !1
|
|
66
|
+
}, null, 8, [
|
|
67
|
+
"items",
|
|
68
|
+
"label",
|
|
69
|
+
"anchor-name"
|
|
70
|
+
])])) : r("", !0);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
export { g as default };
|
|
74
|
+
|
|
75
|
+
//# sourceMappingURL=ActionsMenuCell.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionsMenuCell.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_createElementVNode","_normalizeStyle","_unref","_withModifiers","_createVNode","VGridMenu","VGridMenu_default","_hoisted_1","_hoisted_2","ActionsMenuCell_vue_vue_type_script_setup_true_lang_default","__emit","props","__props","emit","uid","useId","menuId","anchor","anchorNameFor","open","ref","items","computed","a","choose","item","openBlock","createElementBlock","createElementVNode","normalizeStyle","unref","_cache","withModifiers","createVNode","createCommentVNode"],"sources":["../../src/renderers/ActionsMenuCell.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, ref, useId } from 'vue'\nimport VGridMenu from '../components/VGridMenu.vue'\nimport { anchorNameFor } from '../internal/anchor'\nimport type { CellRendererEmits, CellRendererProps, MenuAction, MenuItem } from '../types'\nimport type { ActionsMenuOptions } from './options'\n\nconst props = defineProps<CellRendererProps<unknown, unknown, ActionsMenuOptions>>()\nconst emit = defineEmits<CellRendererEmits>()\n\nconst uid = useId()\nconst menuId = `vg-actions-${uid}`\n// The trigger is the anchor; the menu is positioned against it purely in CSS and follows it\n// while the grid scrolls (no JS placement, no close-on-scroll).\nconst anchor = anchorNameFor(`actions-${uid}`)\nconst open = ref(false)\n\nconst items = computed<MenuItem[]>(() => {\n const a = props.options.actions\n return (typeof a === 'function' ? a(props.row) : a) ?? []\n})\n\nfunction choose(item: MenuAction) {\n emit('action', item.name, item)\n}\n</script>\n\n<template>\n <span v-if=\"items.length\" class=\"vg-actions-menu\">\n <button\n type=\"button\"\n class=\"vg-icon-button\"\n :aria-label=\"options.label ?? 'Actions'\"\n aria-haspopup=\"menu\"\n :aria-expanded=\"open\"\n :aria-controls=\"menuId\"\n :popovertarget=\"menuId\"\n :style=\"{ 'anchor-name': anchor }\"\n @click.stop\n >\n <svg viewBox=\"0 0 16 16\" aria-hidden=\"true\"><circle cx=\"8\" cy=\"3\" r=\"1.5\" /><circle cx=\"8\" cy=\"8\" r=\"1.5\" /><circle cx=\"8\" cy=\"13\" r=\"1.5\" /></svg>\n </button>\n <VGridMenu\n :id=\"menuId\"\n :items=\"items\"\n :label=\"options.label ?? 'Actions'\"\n :anchor-name=\"anchor\"\n placement=\"bottom-end\"\n @select=\"choose\"\n @open=\"open = true\"\n @close=\"open = false\"\n />\n </span>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAOA,IAAMa,IAAQC,GACRC,IAAOH,GAEPI,IAAMC,EAAM,GACZC,IAAS,cAAcF,KAGvBG,IAASC,EAAc,WAAWJ,GAAK,GACvCK,IAAOC,EAAI,EAAK,GAEhBC,IAAQC,QAA2B;GACvC,IAAMC,IAAIZ,EAAM,QAAQ;GACxB,QAAQ,OAAOY,KAAM,aAAaA,EAAEZ,EAAM,GAAG,IAAIY,MAAM,CAAC;EAC1D,CAAC;EAED,SAASC,EAAO,GAAkB;GAChC,EAAK,UAAUC,EAAK,MAAMA,CAAI;EAChC;E,iBAIcJ,EAAA,MAAM,UAAlBvB,EAAA,GAAAC,EAwBO,QAxBPQ,GAwBO,CAvBLP,EAYS,UAAA;GAXP,MAAK;GACL,OAAM;GACL,cAAYY,EAAA,QAAQ,SAAK;GAC1B,iBAAc;GACb,iBAAeO,EAAA;GACf,iBAAeH;GACf,eAAeA;GACf,OAAKf,EAAA,EAAA,eAAmBC,EAAAe,CAAA,EAAM,CAAA;GAC9B,SAAK,AAAAc,EAAA,OAAA5B,QAAN,CAAA,GAAW,CAAA,MAAA,CAAA;E,iBAEXH,EAAmJ,OAAA;GAA9I,SAAQ;GAAY,eAAY;;GAAOA,EAAgC,UAAA;IAAxB,IAAG;IAAI,IAAG;IAAI,GAAE;;GAAQA,EAAgC,UAAA;IAAxB,IAAG;IAAI,IAAG;IAAI,GAAE;;GAAQA,EAAiC,UAAA;IAAzB,IAAG;IAAI,IAAG;IAAK,GAAE;;E,kBAEvII,EASEC,GAAA;GARC,IAAIW;GACJ,OAAOK,EAAA;GACP,OAAOT,EAAA,QAAQ,SAAK;GACpB,eAAaV,EAAAe,CAAA;GACd,WAAU;GACT,UAAQO;GACR,QAAI,AAAAO,EAAA,QAAA,MAAE,EAAA,QAAI;GACV,SAAK,AAAAA,EAAA,QAAA,MAAE,EAAA,QAAI"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BooleanCell.js","names":["BooleanCell_vue_vue_type_script_setup_true_lang_default","BooleanCell_default"],"sources":[],"mappings":""}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { CheckIcon as e, CrossIcon as t } from "./parts/icons.js";
|
|
2
|
+
import { computed as n, createBlock as r, createElementBlock as i, defineComponent as a, normalizeClass as o, openBlock as s, resolveDynamicComponent as c, toDisplayString as l } from "vue";
|
|
3
|
+
// src/renderers/BooleanCell.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var u = ["aria-label", "title"], d = { key: 1 }, f = {
|
|
5
|
+
key: 2,
|
|
6
|
+
class: "vg-sr-only"
|
|
7
|
+
}, p = /*@__PURE__*/ a({
|
|
8
|
+
__name: "BooleanCell",
|
|
9
|
+
props: {
|
|
10
|
+
value: {},
|
|
11
|
+
row: {},
|
|
12
|
+
rowKey: {},
|
|
13
|
+
rowIndex: {},
|
|
14
|
+
depth: {},
|
|
15
|
+
column: {},
|
|
16
|
+
options: {}
|
|
17
|
+
},
|
|
18
|
+
setup(a) {
|
|
19
|
+
let p = a, m = n(() => p.value === null || p.value === void 0 ? "null" : p.value ? "true" : "false"), h = n(() => ({
|
|
20
|
+
true: p.options.trueLabel ?? "Yes",
|
|
21
|
+
false: p.options.falseLabel ?? "No",
|
|
22
|
+
null: p.options.nullLabel ?? ""
|
|
23
|
+
})[m.value]), g = n(() => m.value === "true" ? e : m.value === "false" && p.options.falseIcon ? t : null);
|
|
24
|
+
return (e, t) => a.options.display === "icon" ? (s(), i("span", {
|
|
25
|
+
key: 0,
|
|
26
|
+
class: o([
|
|
27
|
+
"vg-boolean",
|
|
28
|
+
"vg-boolean-icon",
|
|
29
|
+
`vg-boolean-${m.value}`
|
|
30
|
+
])
|
|
31
|
+
}, [g.value ? (s(), i("span", {
|
|
32
|
+
key: 0,
|
|
33
|
+
class: "vg-boolean-glyph",
|
|
34
|
+
role: "img",
|
|
35
|
+
"aria-label": h.value,
|
|
36
|
+
title: h.value
|
|
37
|
+
}, [(s(), r(c(g.value)))], 8, u)) : m.value === "null" ? (s(), i("span", d, l(h.value), 1)) : (s(), i("span", f, l(h.value), 1))], 2)) : (s(), i("span", {
|
|
38
|
+
key: 1,
|
|
39
|
+
class: o(["vg-boolean", `vg-boolean-${m.value}`])
|
|
40
|
+
}, l(h.value), 3));
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
export { p as default };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=BooleanCell.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BooleanCell.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_normalizeClass","_createBlock","_resolveDynamicComponent","_toDisplayString","_hoisted_1","_hoisted_2","_hoisted_3","BooleanCell_vue_vue_type_script_setup_true_lang_default","props","__props","state","computed","text","icon","CheckIcon","CrossIcon","openBlock","createElementBlock","normalizeClass","createBlock","resolveDynamicComponent","toDisplayString"],"sources":["../../src/renderers/BooleanCell.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport type { CellRendererProps } from '../types'\nimport type { BooleanOptions } from './options'\nimport { CheckIcon, CrossIcon } from './parts/icons'\n\nconst props = defineProps<CellRendererProps<unknown, unknown, BooleanOptions>>()\n\nconst state = computed(() => (props.value === null || props.value === undefined ? 'null' : props.value ? 'true' : 'false'))\nconst text = computed(\n () =>\n ({\n true: props.options.trueLabel ?? 'Yes',\n false: props.options.falseLabel ?? 'No',\n null: props.options.nullLabel ?? '',\n })[state.value],\n)\nconst icon = computed(() =>\n state.value === 'true' ? CheckIcon : state.value === 'false' && props.options.falseIcon ? CrossIcon : null,\n)\n</script>\n\n<template>\n <span v-if=\"options.display === 'icon'\" :class=\"['vg-boolean', 'vg-boolean-icon', `vg-boolean-${state}`]\">\n <span v-if=\"icon\" class=\"vg-boolean-glyph\" role=\"img\" :aria-label=\"text\" :title=\"text\"><component :is=\"icon\" /></span>\n <span v-else-if=\"state === 'null'\">{{ text }}</span>\n <span v-else class=\"vg-sr-only\">{{ text }}</span>\n </span>\n <span v-else :class=\"['vg-boolean', `vg-boolean-${state}`]\">{{ text }}</span>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAMA,IAAMU,IAAQC,GAERC,IAAQC,QAAgBH,EAAM,UAAU,QAAQA,EAAM,UAAU,KAAA,IAAY,SAASA,EAAM,QAAQ,SAAS,OAAQ,GACpHI,IAAOD,SAER;GACC,MAAMH,EAAM,QAAQ,aAAa;GACjC,OAAOA,EAAM,QAAQ,cAAc;GACnC,MAAMA,EAAM,QAAQ,aAAa;EACnC,EAAA,CAAGE,EAAM,MACb,GACMG,IAAOF,QACXD,EAAM,UAAU,SAASI,IAAYJ,EAAM,UAAU,WAAWF,EAAM,QAAQ,YAAYO,IAAY,IACxG;E,iBAIcN,EAAA,QAAQ,YAAO,UAA3BX,EAAA,GAAAC,EAIO,QAAA;;GAJkC,OAAKC,EAAA;IAAA;IAAA;IAAA,cAAkDU,EAAA;GAAK,CAAA;E,IACvFG,EAAA,SAAZf,EAAA,GAAAC,EAAsH,QAAA;;GAApG,OAAM;GAAmB,MAAK;GAAO,cAAYa,EAAA;GAAO,OAAOA,EAAA;E,KAAMd,EAAA,GAAAG,EAAwBC,EAARW,EAAA,KAAI,CAAA,E,YAC1FH,EAAA,UAAK,UAAtBZ,EAAA,GAAAC,EAAoD,QAAAM,GAAAF,EAAdS,EAAA,KAAI,GAAA,CAAA,MAC1Cd,EAAA,GAAAC,EAAiD,QAAjDO,GAAiDH,EAAdS,EAAA,KAAI,GAAA,CAAA,E,UAEzCd,EAAA,GAAAC,EAA6E,QAAA;;GAA/D,OAAKC,EAAA,CAAA,cAAA,cAA+BU,EAAA,OAAK,CAAA;EAAQ,GAAAP,EAAAS,EAAA,KAAI,GAAA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonGroupCell.js","names":["ButtonGroupCell_vue_vue_type_script_setup_true_lang_default","ButtonGroupCell_default"],"sources":[],"mappings":""}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, defineComponent as o, normalizeClass as s, openBlock as c, renderList as l, resolveDynamicComponent as u, toDisplayString as d, toRaw as f } from "vue";
|
|
2
|
+
// src/renderers/ButtonGroupCell.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var p = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "vg-button-group",
|
|
6
|
+
role: "group"
|
|
7
|
+
}, m = ["disabled", "onClick"], h = /*@__PURE__*/ o({
|
|
8
|
+
__name: "ButtonGroupCell",
|
|
9
|
+
props: {
|
|
10
|
+
value: {},
|
|
11
|
+
row: {},
|
|
12
|
+
rowKey: {},
|
|
13
|
+
rowIndex: {},
|
|
14
|
+
depth: {},
|
|
15
|
+
column: {},
|
|
16
|
+
options: {}
|
|
17
|
+
},
|
|
18
|
+
emits: ["action"],
|
|
19
|
+
setup(o, { emit: h }) {
|
|
20
|
+
let g = o, _ = h, v = t(() => {
|
|
21
|
+
let e = g.options.buttons;
|
|
22
|
+
return ((typeof e == "function" ? e(g.row) : e) ?? []).filter((e) => !e.hidden).map((e) => ({
|
|
23
|
+
...e,
|
|
24
|
+
icon: e.icon && f(e.icon)
|
|
25
|
+
}));
|
|
26
|
+
});
|
|
27
|
+
return (t, f) => v.value.length ? (c(), i("span", p, [(c(!0), i(e, null, l(v.value, (e) => (c(), i("button", {
|
|
28
|
+
key: e.name,
|
|
29
|
+
type: "button",
|
|
30
|
+
class: s([
|
|
31
|
+
"vg-action-button",
|
|
32
|
+
`vg-variant-${e.variant ?? "outline"}`,
|
|
33
|
+
e.tone && `vg-tone-${e.tone}`
|
|
34
|
+
]),
|
|
35
|
+
disabled: e.disabled,
|
|
36
|
+
onClick: (t) => _("action", e.name, o.value)
|
|
37
|
+
}, [e.icon ? (c(), n(u(e.icon), {
|
|
38
|
+
key: 0,
|
|
39
|
+
class: "vg-action-icon",
|
|
40
|
+
"aria-hidden": "true"
|
|
41
|
+
})) : r("", !0), a("span", null, d(e.label), 1)], 10, m))), 128))])) : r("", !0);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
export { h as default };
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=ButtonGroupCell.vue_vue_type_script_setup_true_lang.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonGroupCell.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_Fragment","_renderList","_normalizeClass","_createBlock","_resolveDynamicComponent","_createElementVNode","_toDisplayString","_hoisted_1","_hoisted_2","ButtonGroupCell_vue_vue_type_script_setup_true_lang_default","__emit","props","__props","emit","buttons","computed","b","x","toRaw","openBlock","createElementBlock","Fragment","renderList","normalizeClass","createBlock","resolveDynamicComponent","createCommentVNode","createElementVNode","toDisplayString"],"sources":["../../src/renderers/ButtonGroupCell.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, toRaw } from 'vue'\nimport type { CellRendererEmits, CellRendererProps } from '../types'\nimport type { ButtonGroupOptions } from './options'\n\nconst props = defineProps<CellRendererProps<unknown, unknown, ButtonGroupOptions>>()\nconst emit = defineEmits<CellRendererEmits>()\n\nconst buttons = computed(() => {\n const b = props.options.buttons\n const list = (typeof b === 'function' ? b(props.row) : b) ?? []\n return list.filter((x) => !x.hidden).map((x) => ({ ...x, icon: x.icon && toRaw(x.icon) }))\n})\n</script>\n\n<template>\n <span v-if=\"buttons.length\" class=\"vg-button-group\" role=\"group\">\n <button\n v-for=\"b in buttons\"\n :key=\"b.name\"\n type=\"button\"\n :class=\"['vg-action-button', `vg-variant-${b.variant ?? 'outline'}`, b.tone && `vg-tone-${b.tone}`]\"\n :disabled=\"b.disabled\"\n @click=\"emit('action', b.name, value)\"\n >\n <component :is=\"b.icon\" v-if=\"b.icon\" class=\"vg-action-icon\" aria-hidden=\"true\" />\n <span>{{ b.label }}</span>\n </button>\n </span>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EAKA,IAAMa,IAAQC,GACRC,IAAOH,GAEPI,IAAUC,QAAe;GAC7B,IAAMC,IAAIL,EAAM,QAAQ;GAExB,SADc,OAAOK,KAAM,aAAaA,EAAEL,EAAM,GAAG,IAAIK,MAAM,CAAC,EAAA,CAClD,QAAQ,MAAM,CAACC,EAAE,MAAM,CAAC,CAAC,KAAK,OAAO;IAAE,GAAGA;IAAG,MAAMA,EAAE,QAAQC,EAAMD,EAAE,IAAI;GAAE,EAAE;EAC3F,CAAC;E,iBAIaH,EAAA,MAAQ,UAApBhB,EAAA,GAAAC,EAYO,QAZPQ,GAYO,EAXLT,EAAA,EAAA,GAAAC,EAUSC,GAAA,MAAAC,EATKa,EAAA,QAAL,OADThB,EAAA,GAAAC,EAUS,UAAA;GARN,KAAKiB,EAAE;GACR,MAAK;GACJ,OAAKd,EAAA;IAAA;IAAA,cAAqCc,EAAE,WAAO;IAAiBA,EAAE,QAAI,WAAeA,EAAE;GAAI,CAAA;GAC/F,UAAUA,EAAE;GACZ,UAAK,MAAEH,EAAI,UAAWG,EAAE,MAAMJ,EAAA,KAAK;E,IAENI,EAAE,QAAhClB,EAAA,GAAAK,EAAkFC,EAAlEY,EAAE,IAAI,GAAA;;GAAgB,OAAM;GAAiB,eAAY;E,iBACzEX,EAA0B,QAAA,MAAAC,EAAjBU,EAAE,KAAK,GAAA,CAAA,C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChangeCell.js","names":["ChangeCell_vue_vue_type_script_setup_true_lang_default","ChangeCell_default"],"sources":[],"mappings":""}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { useGridContext as e } from "../registry/plugin.js";
|
|
2
|
+
import { formatCurrency as t, formatNumber as n, toNumber as r } from "./format.js";
|
|
3
|
+
import { Fragment as i, computed as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, defineComponent as l, normalizeClass as u, openBlock as d, toDisplayString as f } from "vue";
|
|
4
|
+
// src/renderers/ChangeCell.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var p = [
|
|
6
|
+
"title",
|
|
7
|
+
"role",
|
|
8
|
+
"aria-label"
|
|
9
|
+
], m = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "vg-change-icon",
|
|
12
|
+
viewBox: "0 0 10 10",
|
|
13
|
+
"aria-hidden": "true"
|
|
14
|
+
}, h = {
|
|
15
|
+
key: 0,
|
|
16
|
+
d: "M5 1.5 9 7.5H1z"
|
|
17
|
+
}, g = {
|
|
18
|
+
key: 1,
|
|
19
|
+
d: "M5 8.5 1 2.5h8z"
|
|
20
|
+
}, _ = {
|
|
21
|
+
key: 0,
|
|
22
|
+
class: "vg-sr-only"
|
|
23
|
+
}, v = { class: "vg-change-value" }, y = /*@__PURE__*/ l({
|
|
24
|
+
__name: "ChangeCell",
|
|
25
|
+
props: {
|
|
26
|
+
value: {},
|
|
27
|
+
row: {},
|
|
28
|
+
rowKey: {},
|
|
29
|
+
rowIndex: {},
|
|
30
|
+
depth: {},
|
|
31
|
+
column: {},
|
|
32
|
+
options: {}
|
|
33
|
+
},
|
|
34
|
+
setup(l) {
|
|
35
|
+
let y = l, b = e(), x = a(() => {
|
|
36
|
+
if (y.options.direction) return y.options.direction(y.value, y.row) ?? "equal";
|
|
37
|
+
if (y.value === !0 || y.value === "true") return "up";
|
|
38
|
+
if (y.value === !1 || y.value === "false") return "down";
|
|
39
|
+
let e = r(y.value);
|
|
40
|
+
return e === null || e === 0 ? "equal" : e > 0 ? "up" : "down";
|
|
41
|
+
}), S = a(() => {
|
|
42
|
+
let { currency: e, format: i, placeholder: a } = y.options;
|
|
43
|
+
return typeof y.value == "boolean" || y.value === "true" || y.value === "false" ? "" : r(y.value) === null ? y.value === null || y.value === void 0 ? a ?? "" : String(y.value) : e ? t(y.value, b.value, typeof e == "string" ? e : void 0, i) : n(y.value, b.value, i);
|
|
44
|
+
}), C = a(() => ({
|
|
45
|
+
up: "Increased",
|
|
46
|
+
down: "Decreased",
|
|
47
|
+
equal: ""
|
|
48
|
+
})[x.value]), w = a(() => y.options.iconOnly || !S.value);
|
|
49
|
+
return (e, t) => (d(), s("span", {
|
|
50
|
+
class: u(["vg-change", `vg-change-${x.value}`]),
|
|
51
|
+
title: w.value ? C.value || void 0 : S.value,
|
|
52
|
+
role: w.value && C.value ? "img" : void 0,
|
|
53
|
+
"aria-label": w.value && C.value ? [C.value, S.value].filter(Boolean).join(" ") : void 0
|
|
54
|
+
}, [x.value === "equal" ? o("", !0) : (d(), s("svg", m, [x.value === "up" ? (d(), s("path", h)) : (d(), s("path", g))])), w.value ? o("", !0) : (d(), s(i, { key: 1 }, [C.value ? (d(), s("span", _, f(C.value), 1)) : o("", !0), c("span", v, f(S.value), 1)], 64))], 10, p));
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
export { y as default };
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=ChangeCell.vue_vue_type_script_setup_true_lang.js.map
|