@nu-grid/nuxt 0.1.1
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/LICENSE.md +21 -0
- package/README.md +261 -0
- package/dist/module.d.mts +13 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +52 -0
- package/dist/runtime/cell-types/action-menu/ActionMenuRenderer.d.vue.ts +12 -0
- package/dist/runtime/cell-types/action-menu/ActionMenuRenderer.vue +123 -0
- package/dist/runtime/cell-types/action-menu/ActionMenuRenderer.vue.d.ts +12 -0
- package/dist/runtime/cell-types/action-menu/index.d.ts +8 -0
- package/dist/runtime/cell-types/action-menu/index.js +28 -0
- package/dist/runtime/cell-types/boolean/BooleanEditor.d.vue.ts +15 -0
- package/dist/runtime/cell-types/boolean/BooleanEditor.vue +32 -0
- package/dist/runtime/cell-types/boolean/BooleanEditor.vue.d.ts +15 -0
- package/dist/runtime/cell-types/boolean/BooleanFilter.d.vue.ts +7 -0
- package/dist/runtime/cell-types/boolean/BooleanFilter.vue +42 -0
- package/dist/runtime/cell-types/boolean/BooleanFilter.vue.d.ts +7 -0
- package/dist/runtime/cell-types/boolean/BooleanRenderer.d.vue.ts +13 -0
- package/dist/runtime/cell-types/boolean/BooleanRenderer.vue +23 -0
- package/dist/runtime/cell-types/boolean/BooleanRenderer.vue.d.ts +13 -0
- package/dist/runtime/cell-types/boolean/index.d.ts +8 -0
- package/dist/runtime/cell-types/boolean/index.js +31 -0
- package/dist/runtime/cell-types/currency/CurrencyEditor.d.vue.ts +15 -0
- package/dist/runtime/cell-types/currency/CurrencyEditor.vue +40 -0
- package/dist/runtime/cell-types/currency/CurrencyEditor.vue.d.ts +15 -0
- package/dist/runtime/cell-types/currency/CurrencyFilter.d.vue.ts +7 -0
- package/dist/runtime/cell-types/currency/CurrencyFilter.vue +76 -0
- package/dist/runtime/cell-types/currency/CurrencyFilter.vue.d.ts +7 -0
- package/dist/runtime/cell-types/currency/index.d.ts +6 -0
- package/dist/runtime/cell-types/currency/index.js +42 -0
- package/dist/runtime/cell-types/date/DateEditor.d.vue.ts +15 -0
- package/dist/runtime/cell-types/date/DateEditor.vue +42 -0
- package/dist/runtime/cell-types/date/DateEditor.vue.d.ts +15 -0
- package/dist/runtime/cell-types/date/DateFilter.d.vue.ts +7 -0
- package/dist/runtime/cell-types/date/DateFilter.vue +58 -0
- package/dist/runtime/cell-types/date/DateFilter.vue.d.ts +7 -0
- package/dist/runtime/cell-types/date/index.d.ts +6 -0
- package/dist/runtime/cell-types/date/index.js +13 -0
- package/dist/runtime/cell-types/index.d.ts +17 -0
- package/dist/runtime/cell-types/index.js +34 -0
- package/dist/runtime/cell-types/lookup/LookupEditor.d.vue.ts +15 -0
- package/dist/runtime/cell-types/lookup/LookupEditor.vue +291 -0
- package/dist/runtime/cell-types/lookup/LookupEditor.vue.d.ts +15 -0
- package/dist/runtime/cell-types/lookup/LookupRenderer.d.vue.ts +8 -0
- package/dist/runtime/cell-types/lookup/LookupRenderer.vue +43 -0
- package/dist/runtime/cell-types/lookup/LookupRenderer.vue.d.ts +8 -0
- package/dist/runtime/cell-types/lookup/index.d.ts +36 -0
- package/dist/runtime/cell-types/lookup/index.js +50 -0
- package/dist/runtime/cell-types/number/NumberEditor.d.vue.ts +15 -0
- package/dist/runtime/cell-types/number/NumberEditor.vue +34 -0
- package/dist/runtime/cell-types/number/NumberEditor.vue.d.ts +15 -0
- package/dist/runtime/cell-types/number/NumberFilter.d.vue.ts +7 -0
- package/dist/runtime/cell-types/number/NumberFilter.vue +66 -0
- package/dist/runtime/cell-types/number/NumberFilter.vue.d.ts +7 -0
- package/dist/runtime/cell-types/number/index.d.ts +6 -0
- package/dist/runtime/cell-types/number/index.js +13 -0
- package/dist/runtime/cell-types/rating/RatingEditor.d.vue.ts +15 -0
- package/dist/runtime/cell-types/rating/RatingEditor.vue +219 -0
- package/dist/runtime/cell-types/rating/RatingEditor.vue.d.ts +15 -0
- package/dist/runtime/cell-types/rating/RatingFilter.d.vue.ts +7 -0
- package/dist/runtime/cell-types/rating/RatingFilter.vue +74 -0
- package/dist/runtime/cell-types/rating/RatingFilter.vue.d.ts +7 -0
- package/dist/runtime/cell-types/rating/RatingRenderer.d.vue.ts +10 -0
- package/dist/runtime/cell-types/rating/RatingRenderer.vue +75 -0
- package/dist/runtime/cell-types/rating/RatingRenderer.vue.d.ts +10 -0
- package/dist/runtime/cell-types/rating/index.d.ts +6 -0
- package/dist/runtime/cell-types/rating/index.js +67 -0
- package/dist/runtime/cell-types/selection/SelectionEditor.d.vue.ts +15 -0
- package/dist/runtime/cell-types/selection/SelectionEditor.vue +42 -0
- package/dist/runtime/cell-types/selection/SelectionEditor.vue.d.ts +15 -0
- package/dist/runtime/cell-types/selection/SelectionRenderer.d.vue.ts +14 -0
- package/dist/runtime/cell-types/selection/SelectionRenderer.vue +25 -0
- package/dist/runtime/cell-types/selection/SelectionRenderer.vue.d.ts +14 -0
- package/dist/runtime/cell-types/selection/index.d.ts +8 -0
- package/dist/runtime/cell-types/selection/index.js +36 -0
- package/dist/runtime/cell-types/text/TextEditor.d.vue.ts +15 -0
- package/dist/runtime/cell-types/text/TextEditor.vue +70 -0
- package/dist/runtime/cell-types/text/TextEditor.vue.d.ts +15 -0
- package/dist/runtime/cell-types/text/TextFilter.d.vue.ts +7 -0
- package/dist/runtime/cell-types/text/TextFilter.vue +50 -0
- package/dist/runtime/cell-types/text/TextFilter.vue.d.ts +7 -0
- package/dist/runtime/cell-types/text/TextareaEditor.d.vue.ts +15 -0
- package/dist/runtime/cell-types/text/TextareaEditor.vue +100 -0
- package/dist/runtime/cell-types/text/TextareaEditor.vue.d.ts +15 -0
- package/dist/runtime/cell-types/text/index.d.ts +10 -0
- package/dist/runtime/cell-types/text/index.js +16 -0
- package/dist/runtime/cell-types/text/textarea.d.ts +13 -0
- package/dist/runtime/cell-types/text/textarea.js +13 -0
- package/dist/runtime/components/NuGrid.d.vue.ts +96 -0
- package/dist/runtime/components/NuGrid.vue +651 -0
- package/dist/runtime/components/NuGrid.vue.d.ts +96 -0
- package/dist/runtime/components/NuGridCellCheckbox.d.vue.ts +24 -0
- package/dist/runtime/components/NuGridCellCheckbox.vue +105 -0
- package/dist/runtime/components/NuGridCellCheckbox.vue.d.ts +24 -0
- package/dist/runtime/components/NuGridGroup.d.vue.ts +20 -0
- package/dist/runtime/components/NuGridGroup.vue +650 -0
- package/dist/runtime/components/NuGridGroup.vue.d.ts +20 -0
- package/dist/runtime/components/NuGridLazyCell.d.vue.ts +62 -0
- package/dist/runtime/components/NuGridLazyCell.vue +133 -0
- package/dist/runtime/components/NuGridLazyCell.vue.d.ts +62 -0
- package/dist/runtime/components/_internal/NuGridAddRow.d.vue.ts +36 -0
- package/dist/runtime/components/_internal/NuGridAddRow.vue +144 -0
- package/dist/runtime/components/_internal/NuGridAddRow.vue.d.ts +36 -0
- package/dist/runtime/components/_internal/NuGridBase.d.vue.ts +20 -0
- package/dist/runtime/components/_internal/NuGridBase.vue +1172 -0
- package/dist/runtime/components/_internal/NuGridBase.vue.d.ts +20 -0
- package/dist/runtime/components/_internal/NuGridCellContent.d.vue.ts +9 -0
- package/dist/runtime/components/_internal/NuGridCellContent.vue +202 -0
- package/dist/runtime/components/_internal/NuGridCellContent.vue.d.ts +9 -0
- package/dist/runtime/components/_internal/NuGridColumnMenu.d.vue.ts +25 -0
- package/dist/runtime/components/_internal/NuGridColumnMenu.vue +391 -0
- package/dist/runtime/components/_internal/NuGridColumnMenu.vue.d.ts +25 -0
- package/dist/runtime/components/_internal/NuGridGroup.d.vue.ts +20 -0
- package/dist/runtime/components/_internal/NuGridGroup.vue +650 -0
- package/dist/runtime/components/_internal/NuGridGroup.vue.d.ts +20 -0
- package/dist/runtime/components/_internal/NuGridGroupCheckbox.d.vue.ts +22 -0
- package/dist/runtime/components/_internal/NuGridGroupCheckbox.vue +132 -0
- package/dist/runtime/components/_internal/NuGridGroupCheckbox.vue.d.ts +22 -0
- package/dist/runtime/components/_internal/NuGridHeaderSortButton.d.vue.ts +31 -0
- package/dist/runtime/components/_internal/NuGridHeaderSortButton.vue +61 -0
- package/dist/runtime/components/_internal/NuGridHeaderSortButton.vue.d.ts +31 -0
- package/dist/runtime/components/_internal/NuGridPaging.d.vue.ts +3 -0
- package/dist/runtime/components/_internal/NuGridPaging.vue +65 -0
- package/dist/runtime/components/_internal/NuGridPaging.vue.d.ts +3 -0
- package/dist/runtime/components/_internal/NuGridRow.d.vue.ts +40 -0
- package/dist/runtime/components/_internal/NuGridRow.vue +645 -0
- package/dist/runtime/components/_internal/NuGridRow.vue.d.ts +40 -0
- package/dist/runtime/components/_internal/NuGridSplitGroup.d.vue.ts +20 -0
- package/dist/runtime/components/_internal/NuGridSplitGroup.vue +735 -0
- package/dist/runtime/components/_internal/NuGridSplitGroup.vue.d.ts +20 -0
- package/dist/runtime/components/_internal/NuGridTooltip.d.vue.ts +3 -0
- package/dist/runtime/components/_internal/NuGridTooltip.vue +36 -0
- package/dist/runtime/components/_internal/NuGridTooltip.vue.d.ts +3 -0
- package/dist/runtime/composables/_internal/index.d.ts +31 -0
- package/dist/runtime/composables/_internal/index.js +28 -0
- package/dist/runtime/composables/_internal/keyboard-handlers/index.d.ts +5 -0
- package/dist/runtime/composables/_internal/keyboard-handlers/index.js +9 -0
- package/dist/runtime/composables/_internal/keyboard-handlers/useKeyboardCellTypeDispatch.d.ts +18 -0
- package/dist/runtime/composables/_internal/keyboard-handlers/useKeyboardCellTypeDispatch.js +53 -0
- package/dist/runtime/composables/_internal/keyboard-handlers/useKeyboardEditingTriggers.d.ts +12 -0
- package/dist/runtime/composables/_internal/keyboard-handlers/useKeyboardEditingTriggers.js +53 -0
- package/dist/runtime/composables/_internal/keyboard-handlers/useKeyboardNavigation.d.ts +9 -0
- package/dist/runtime/composables/_internal/keyboard-handlers/useKeyboardNavigation.js +35 -0
- package/dist/runtime/composables/_internal/keyboard-handlers/useKeyboardSetup.d.ts +33 -0
- package/dist/runtime/composables/_internal/keyboard-handlers/useKeyboardSetup.js +111 -0
- package/dist/runtime/composables/_internal/keyboard-handlers/usePagingKeyboard.d.ts +11 -0
- package/dist/runtime/composables/_internal/keyboard-handlers/usePagingKeyboard.js +67 -0
- package/dist/runtime/composables/_internal/useNuGridActionMenu.d.ts +15 -0
- package/dist/runtime/composables/_internal/useNuGridActionMenu.js +137 -0
- package/dist/runtime/composables/_internal/useNuGridAddRow.d.ts +39 -0
- package/dist/runtime/composables/_internal/useNuGridAddRow.js +735 -0
- package/dist/runtime/composables/_internal/useNuGridAnimation.d.ts +33 -0
- package/dist/runtime/composables/_internal/useNuGridAnimation.js +178 -0
- package/dist/runtime/composables/_internal/useNuGridAutosize.d.ts +14 -0
- package/dist/runtime/composables/_internal/useNuGridAutosize.js +161 -0
- package/dist/runtime/composables/_internal/useNuGridCellEditing.d.ts +15 -0
- package/dist/runtime/composables/_internal/useNuGridCellEditing.js +1243 -0
- package/dist/runtime/composables/_internal/useNuGridColumnDragDrop.d.ts +8 -0
- package/dist/runtime/composables/_internal/useNuGridColumnDragDrop.js +148 -0
- package/dist/runtime/composables/_internal/useNuGridColumnPinning.d.ts +15 -0
- package/dist/runtime/composables/_internal/useNuGridColumnPinning.js +44 -0
- package/dist/runtime/composables/_internal/useNuGridColumnResize.d.ts +22 -0
- package/dist/runtime/composables/_internal/useNuGridColumnResize.js +427 -0
- package/dist/runtime/composables/_internal/useNuGridCore.d.ts +62 -0
- package/dist/runtime/composables/_internal/useNuGridCore.js +359 -0
- package/dist/runtime/composables/_internal/useNuGridExcel.d.ts +60 -0
- package/dist/runtime/composables/_internal/useNuGridExcel.js +35 -0
- package/dist/runtime/composables/_internal/useNuGridFocus.d.ts +15 -0
- package/dist/runtime/composables/_internal/useNuGridFocus.js +1378 -0
- package/dist/runtime/composables/_internal/useNuGridGroupSelection.d.ts +13 -0
- package/dist/runtime/composables/_internal/useNuGridGroupSelection.js +38 -0
- package/dist/runtime/composables/_internal/useNuGridGrouping.d.ts +28 -0
- package/dist/runtime/composables/_internal/useNuGridGrouping.js +211 -0
- package/dist/runtime/composables/_internal/useNuGridInteractionRouter.d.ts +9 -0
- package/dist/runtime/composables/_internal/useNuGridInteractionRouter.js +441 -0
- package/dist/runtime/composables/_internal/useNuGridInteractions.d.ts +10 -0
- package/dist/runtime/composables/_internal/useNuGridInteractions.js +36 -0
- package/dist/runtime/composables/_internal/useNuGridKeyboardNavigation.d.ts +54 -0
- package/dist/runtime/composables/_internal/useNuGridKeyboardNavigation.js +407 -0
- package/dist/runtime/composables/_internal/useNuGridPaging.d.ts +76 -0
- package/dist/runtime/composables/_internal/useNuGridPaging.js +147 -0
- package/dist/runtime/composables/_internal/useNuGridRowDragDrop.d.ts +68 -0
- package/dist/runtime/composables/_internal/useNuGridRowDragDrop.js +295 -0
- package/dist/runtime/composables/_internal/useNuGridRowSelection.d.ts +14 -0
- package/dist/runtime/composables/_internal/useNuGridRowSelection.js +214 -0
- package/dist/runtime/composables/_internal/useNuGridScroll.d.ts +110 -0
- package/dist/runtime/composables/_internal/useNuGridScroll.js +463 -0
- package/dist/runtime/composables/_internal/useNuGridScrollState.d.ts +32 -0
- package/dist/runtime/composables/_internal/useNuGridScrollState.js +60 -0
- package/dist/runtime/composables/_internal/useNuGridScrollbars.d.ts +24 -0
- package/dist/runtime/composables/_internal/useNuGridScrollbars.js +69 -0
- package/dist/runtime/composables/_internal/useNuGridStatePersistence.d.ts +27 -0
- package/dist/runtime/composables/_internal/useNuGridStatePersistence.js +243 -0
- package/dist/runtime/composables/_internal/useNuGridTooltip.d.ts +41 -0
- package/dist/runtime/composables/_internal/useNuGridTooltip.js +304 -0
- package/dist/runtime/composables/_internal/useNuGridUI.d.ts +3283 -0
- package/dist/runtime/composables/_internal/useNuGridUI.js +58 -0
- package/dist/runtime/composables/_internal/useNuGridVirtualization.d.ts +75 -0
- package/dist/runtime/composables/_internal/useNuGridVirtualization.js +534 -0
- package/dist/runtime/composables/_internal/useNuGridWheelSmoothing.d.ts +25 -0
- package/dist/runtime/composables/_internal/useNuGridWheelSmoothing.js +157 -0
- package/dist/runtime/composables/index.d.ts +3 -0
- package/dist/runtime/composables/index.js +2 -0
- package/dist/runtime/composables/useNuGridCellEditor.d.ts +91 -0
- package/dist/runtime/composables/useNuGridCellEditor.js +82 -0
- package/dist/runtime/composables/useNuGridCellTypeRegistry.d.ts +85 -0
- package/dist/runtime/composables/useNuGridCellTypeRegistry.js +202 -0
- package/dist/runtime/config/_internal/index.d.ts +5 -0
- package/dist/runtime/config/_internal/index.js +2 -0
- package/dist/runtime/config/_internal/options-defaults.d.ts +121 -0
- package/dist/runtime/config/_internal/options-defaults.js +121 -0
- package/dist/runtime/config/_internal/prop-utils.d.ts +54 -0
- package/dist/runtime/config/_internal/prop-utils.js +21 -0
- package/dist/runtime/config/config.d.ts +44 -0
- package/dist/runtime/config/config.js +18 -0
- package/dist/runtime/config/index.d.ts +2 -0
- package/dist/runtime/config/index.js +2 -0
- package/dist/runtime/config/presets.d.ts +15 -0
- package/dist/runtime/config/presets.js +58 -0
- package/dist/runtime/index.css +1 -0
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.js +1 -0
- package/dist/runtime/plugin.d.ts +5 -0
- package/dist/runtime/plugin.js +10 -0
- package/dist/runtime/themes/index.d.ts +56 -0
- package/dist/runtime/themes/index.js +68 -0
- package/dist/runtime/themes/nuGridTheme.d.ts +329 -0
- package/dist/runtime/themes/nuGridTheme.js +236 -0
- package/dist/runtime/themes/nuGridThemeCompact.d.ts +331 -0
- package/dist/runtime/themes/nuGridThemeCompact.js +236 -0
- package/dist/runtime/types/_internal/action-menu.d.ts +55 -0
- package/dist/runtime/types/_internal/action-menu.js +0 -0
- package/dist/runtime/types/_internal/cell-editing.d.ts +75 -0
- package/dist/runtime/types/_internal/cell-editing.js +0 -0
- package/dist/runtime/types/_internal/composable-returns.d.ts +52 -0
- package/dist/runtime/types/_internal/composable-returns.js +0 -0
- package/dist/runtime/types/_internal/config.d.ts +16 -0
- package/dist/runtime/types/_internal/config.js +0 -0
- package/dist/runtime/types/_internal/contexts/add-row.d.ts +25 -0
- package/dist/runtime/types/_internal/contexts/add-row.js +0 -0
- package/dist/runtime/types/_internal/contexts/animation.d.ts +24 -0
- package/dist/runtime/types/_internal/contexts/animation.js +0 -0
- package/dist/runtime/types/_internal/contexts/core.d.ts +24 -0
- package/dist/runtime/types/_internal/contexts/core.js +0 -0
- package/dist/runtime/types/_internal/contexts/drag.d.ts +13 -0
- package/dist/runtime/types/_internal/contexts/drag.js +0 -0
- package/dist/runtime/types/_internal/contexts/focus.d.ts +11 -0
- package/dist/runtime/types/_internal/contexts/focus.js +0 -0
- package/dist/runtime/types/_internal/contexts/grouping.d.ts +9 -0
- package/dist/runtime/types/_internal/contexts/grouping.js +0 -0
- package/dist/runtime/types/_internal/contexts/index.d.ts +15 -0
- package/dist/runtime/types/_internal/contexts/index.js +0 -0
- package/dist/runtime/types/_internal/contexts/interaction-router.d.ts +5 -0
- package/dist/runtime/types/_internal/contexts/interaction-router.js +0 -0
- package/dist/runtime/types/_internal/contexts/multi-row.d.ts +40 -0
- package/dist/runtime/types/_internal/contexts/multi-row.js +0 -0
- package/dist/runtime/types/_internal/contexts/paging.d.ts +39 -0
- package/dist/runtime/types/_internal/contexts/paging.js +0 -0
- package/dist/runtime/types/_internal/contexts/performance.d.ts +15 -0
- package/dist/runtime/types/_internal/contexts/performance.js +0 -0
- package/dist/runtime/types/_internal/contexts/resize.d.ts +12 -0
- package/dist/runtime/types/_internal/contexts/resize.js +0 -0
- package/dist/runtime/types/_internal/contexts/row-interactions.d.ts +12 -0
- package/dist/runtime/types/_internal/contexts/row-interactions.js +0 -0
- package/dist/runtime/types/_internal/contexts/scroll-state.d.ts +21 -0
- package/dist/runtime/types/_internal/contexts/scroll-state.js +0 -0
- package/dist/runtime/types/_internal/contexts/ui-config.d.ts +21 -0
- package/dist/runtime/types/_internal/contexts/ui-config.js +0 -0
- package/dist/runtime/types/_internal/contexts/virtualization.d.ts +16 -0
- package/dist/runtime/types/_internal/contexts/virtualization.js +0 -0
- package/dist/runtime/types/_internal/drag-drop.d.ts +48 -0
- package/dist/runtime/types/_internal/drag-drop.js +0 -0
- package/dist/runtime/types/_internal/focus.d.ts +68 -0
- package/dist/runtime/types/_internal/focus.js +0 -0
- package/dist/runtime/types/_internal/grouping.d.ts +48 -0
- package/dist/runtime/types/_internal/grouping.js +0 -0
- package/dist/runtime/types/_internal/index.d.ts +37 -0
- package/dist/runtime/types/_internal/index.js +2 -0
- package/dist/runtime/types/_internal/interaction-router.d.ts +176 -0
- package/dist/runtime/types/_internal/interaction-router.js +39 -0
- package/dist/runtime/types/_internal/props.d.ts +28 -0
- package/dist/runtime/types/_internal/props.js +0 -0
- package/dist/runtime/types/_internal/resize.d.ts +37 -0
- package/dist/runtime/types/_internal/resize.js +0 -0
- package/dist/runtime/types/_internal/row-interactions.d.ts +15 -0
- package/dist/runtime/types/_internal/row-interactions.js +0 -0
- package/dist/runtime/types/_internal/row-selection.d.ts +27 -0
- package/dist/runtime/types/_internal/row-selection.js +0 -0
- package/dist/runtime/types/_internal/states.d.ts +24 -0
- package/dist/runtime/types/_internal/states.js +0 -0
- package/dist/runtime/types/_internal/sticky-headers.d.ts +10 -0
- package/dist/runtime/types/_internal/sticky-headers.js +0 -0
- package/dist/runtime/types/_internal/validation.d.ts +54 -0
- package/dist/runtime/types/_internal/validation.js +0 -0
- package/dist/runtime/types/_internal/virtualization.d.ts +114 -0
- package/dist/runtime/types/_internal/virtualization.js +0 -0
- package/dist/runtime/types/action-menu.d.ts +62 -0
- package/dist/runtime/types/action-menu.js +0 -0
- package/dist/runtime/types/autosize.d.ts +8 -0
- package/dist/runtime/types/autosize.js +0 -0
- package/dist/runtime/types/cells.d.ts +292 -0
- package/dist/runtime/types/cells.js +5 -0
- package/dist/runtime/types/column.d.ts +248 -0
- package/dist/runtime/types/column.js +0 -0
- package/dist/runtime/types/config.d.ts +35 -0
- package/dist/runtime/types/config.js +0 -0
- package/dist/runtime/types/drag-drop.d.ts +92 -0
- package/dist/runtime/types/drag-drop.js +0 -0
- package/dist/runtime/types/events.d.ts +164 -0
- package/dist/runtime/types/events.js +1 -0
- package/dist/runtime/types/focus.d.ts +50 -0
- package/dist/runtime/types/focus.js +0 -0
- package/dist/runtime/types/grouping.d.ts +7 -0
- package/dist/runtime/types/grouping.js +0 -0
- package/dist/runtime/types/index.d.ts +15 -0
- package/dist/runtime/types/index.js +0 -0
- package/dist/runtime/types/option-groups.d.ts +624 -0
- package/dist/runtime/types/option-groups.js +0 -0
- package/dist/runtime/types/props.d.ts +418 -0
- package/dist/runtime/types/props.js +0 -0
- package/dist/runtime/types/resize.d.ts +14 -0
- package/dist/runtime/types/resize.js +0 -0
- package/dist/runtime/types/row-interactions.d.ts +11 -0
- package/dist/runtime/types/row-interactions.js +0 -0
- package/dist/runtime/types/row-selection.d.ts +48 -0
- package/dist/runtime/types/row-selection.js +0 -0
- package/dist/runtime/types/row.d.ts +7 -0
- package/dist/runtime/types/row.js +0 -0
- package/dist/runtime/types/sort-icon.d.ts +35 -0
- package/dist/runtime/types/sort-icon.js +0 -0
- package/dist/runtime/types/states.d.ts +17 -0
- package/dist/runtime/types/states.js +0 -0
- package/dist/runtime/types/sticky-headers.d.ts +6 -0
- package/dist/runtime/types/sticky-headers.js +0 -0
- package/dist/runtime/types/tanstack-table.d.ts +126 -0
- package/dist/runtime/types/theme.d.ts +22 -0
- package/dist/runtime/types/theme.js +0 -0
- package/dist/runtime/types/validation.d.ts +94 -0
- package/dist/runtime/types/validation.js +0 -0
- package/dist/runtime/utils/columnHelper.d.ts +208 -0
- package/dist/runtime/utils/columnHelper.js +23 -0
- package/dist/runtime/utils/excelExport.d.ts +63 -0
- package/dist/runtime/utils/excelExport.js +297 -0
- package/dist/runtime/utils/index.d.ts +2 -0
- package/dist/runtime/utils/index.js +2 -0
- package/dist/runtime/utils/standardSchema.d.ts +77 -0
- package/dist/runtime/utils/standardSchema.js +141 -0
- package/dist/types.d.mts +3 -0
- package/package.json +117 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
export type { NuGridPresetOptions } from '../props.js';
|
|
5
|
+
export type { NuGridActionMenuButton, NuGridActionMenuColumnDef, NuGridActionMenuColumnMeta, } from './action-menu.js';
|
|
6
|
+
export type { NuGridCellEditing, NuGridEditingCell, NuGridEditorConfig, NuGridEditorRenderContext, NuGridRowValidationError, } from './cell-editing.js';
|
|
7
|
+
export type { UseNuGridActionMenuReturn, UseNuGridColumnsReturn, UseNuGridRowSelectionReturn, } from './composable-returns.js';
|
|
8
|
+
export type { NuGridConfig, NuGridUISlots } from './config.js';
|
|
9
|
+
export * from './contexts/index.js';
|
|
10
|
+
export type { NuGridAddRowContext, NuGridAddRowPosition, NuGridAddRowState, } from './contexts/add-row.js';
|
|
11
|
+
export type { NuGridAnimationContext } from './contexts/animation.js';
|
|
12
|
+
export type { NuGridCoreContext } from './contexts/core.js';
|
|
13
|
+
export type { NuGridDragContext } from './contexts/drag.js';
|
|
14
|
+
export type { NuGridFocusContext } from './contexts/focus.js';
|
|
15
|
+
export type { NuGridGroupingContext } from './contexts/grouping.js';
|
|
16
|
+
export type { NuGridInteractionRouterContext } from './contexts/interaction-router.js';
|
|
17
|
+
export type { NuGridMultiRowContext } from './contexts/multi-row.js';
|
|
18
|
+
export type { NuGridPagingContext } from './contexts/paging.js';
|
|
19
|
+
export type { NuGridPerformanceContext } from './contexts/performance.js';
|
|
20
|
+
export type { NuGridResizeContext } from './contexts/resize.js';
|
|
21
|
+
export type { NuGridRowInteractionsContext } from './contexts/row-interactions.js';
|
|
22
|
+
export type { NuGridScrollStateContext } from './contexts/scroll-state.js';
|
|
23
|
+
export type { NuGridUIConfigContext } from './contexts/ui-config.js';
|
|
24
|
+
export type { NuGridVirtualizationContext } from './contexts/virtualization.js';
|
|
25
|
+
export type { NuGridColumnDragDrop, NuGridRowDragDrop } from './drag-drop.js';
|
|
26
|
+
export type { NuGridFocus, NuGridFocusedCell } from './focus.js';
|
|
27
|
+
export type { NuGridGroupingFns } from './grouping.js';
|
|
28
|
+
export type { EventMetadata, NuGridCellClickContext, NuGridHoverContext, NuGridHoverHandler, NuGridInteractionHandler, NuGridInteractionRouter, NuGridInteractionRouteResult, NuGridKeyboardConfig, NuGridKeyboardContext, NuGridKeyboardHandler, NuGridPointerContext, NuGridPointerHandler, NuGridWheelContext, NuGridWheelHandler, } from './interaction-router.js';
|
|
29
|
+
export { getEventFlag, hasEventFlag, ROUTER_PRIORITIES, setEventFlag } from './interaction-router.js';
|
|
30
|
+
export type { NuGridCreateConfigOptions, NuGridPreset } from './props.js';
|
|
31
|
+
export type { NuGridColumnResize, PinnableHeader } from './resize.js';
|
|
32
|
+
export type { NuGridRowInteractions } from './row-interactions.js';
|
|
33
|
+
export type { NuGridRowSelectionMode, NuGridSelectionColumnDef, NuGridSelectionColumnMeta, } from './row-selection.js';
|
|
34
|
+
export type { NuGridStates } from './states.js';
|
|
35
|
+
export type { NuGridStickyHeaderClasses } from './sticky-headers.js';
|
|
36
|
+
export type { NuGridResolvedValidation, NuGridRowValidationResult, NuGridRowValidationRule, NuGridValidationContext, } from './validation.js';
|
|
37
|
+
export type { GroupingVirtualRowHeights, GroupVirtualRowItem, GroupVirtualRowType, NuGridVirtualItemStyle, NuGridVirtualizer, NuGridVirtualizerOptions, OverscanSetting, ResolvedNuGridVirtualizeOptions, } from './virtualization.js';
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import type { TableData } from '@nuxt/ui';
|
|
2
|
+
import type { Cell, Row, Table } from '@tanstack/vue-table';
|
|
3
|
+
import type { NuGridCellEditing } from './cell-editing.js';
|
|
4
|
+
import type { NuGridFocus, NuGridFocusedCell } from './focus.js';
|
|
5
|
+
/**
|
|
6
|
+
* Priority ranges for interaction router handlers
|
|
7
|
+
* Lower numbers execute first
|
|
8
|
+
*/
|
|
9
|
+
export declare const ROUTER_PRIORITIES: {
|
|
10
|
+
/** Guards - veto events early (0-9) */
|
|
11
|
+
readonly GUARD_MIN: 0;
|
|
12
|
+
readonly GUARD_MAX: 9;
|
|
13
|
+
/** Focus management (10-19) */
|
|
14
|
+
readonly FOCUS_MIN: 10;
|
|
15
|
+
readonly FOCUS: 10;
|
|
16
|
+
readonly FOCUS_MAX: 19;
|
|
17
|
+
/** Editing (20-29) */
|
|
18
|
+
readonly EDITING_MIN: 20;
|
|
19
|
+
readonly EDITING: 20;
|
|
20
|
+
readonly EDITING_OUTSIDE: 25;
|
|
21
|
+
readonly EDITING_MAX: 29;
|
|
22
|
+
/** Actions (30-99) */
|
|
23
|
+
readonly ACTION_MIN: 30;
|
|
24
|
+
readonly ACTION_MAX: 99;
|
|
25
|
+
/** Low priority - tooltips, etc (100+) */
|
|
26
|
+
readonly LOW_PRIORITY: 100;
|
|
27
|
+
/** Keyboard: Cell type handlers (15) - before editing triggers */
|
|
28
|
+
readonly KEYBOARD_CELL_TYPE: 15;
|
|
29
|
+
/** Keyboard: Editing triggers - F2, Enter, Backspace, alphanumeric (20) */
|
|
30
|
+
readonly KEYBOARD_EDITING_TRIGGERS: 20;
|
|
31
|
+
/** Keyboard: Paging - PageUp/PageDown, Cmd+Up/Down when paging enabled (25) */
|
|
32
|
+
readonly KEYBOARD_PAGING: 25;
|
|
33
|
+
/** Keyboard: Navigation - arrows, tab, page up/down, etc. (30) */
|
|
34
|
+
readonly KEYBOARD_NAVIGATION: 30;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Event metadata storage - replaces magic event properties
|
|
38
|
+
*/
|
|
39
|
+
export interface EventMetadata {
|
|
40
|
+
addRowFinalizing?: boolean;
|
|
41
|
+
addRowCellTransition?: boolean;
|
|
42
|
+
addRowUneditableClick?: boolean;
|
|
43
|
+
[key: string]: any;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Set metadata flag on an event
|
|
47
|
+
*/
|
|
48
|
+
export declare function setEventFlag(event: Event, key: string, value: any): void;
|
|
49
|
+
/**
|
|
50
|
+
* Get metadata flag from an event
|
|
51
|
+
*/
|
|
52
|
+
export declare function getEventFlag<T = any>(event: Event, key: string, defaultValue?: T): T;
|
|
53
|
+
/**
|
|
54
|
+
* Check if event has a metadata flag
|
|
55
|
+
*/
|
|
56
|
+
export declare function hasEventFlag(event: Event, key: string): boolean;
|
|
57
|
+
export interface NuGridCellClickContext<T extends TableData = TableData> {
|
|
58
|
+
event: MouseEvent;
|
|
59
|
+
row: Row<T>;
|
|
60
|
+
cell: Cell<T, any>;
|
|
61
|
+
cellIndex: number;
|
|
62
|
+
}
|
|
63
|
+
export interface NuGridInteractionRouteResult {
|
|
64
|
+
handled?: boolean;
|
|
65
|
+
stop?: boolean;
|
|
66
|
+
preventDefault?: boolean;
|
|
67
|
+
stopPropagation?: boolean;
|
|
68
|
+
}
|
|
69
|
+
export interface NuGridInteractionHandler<T extends TableData = TableData> {
|
|
70
|
+
id: string;
|
|
71
|
+
priority: number;
|
|
72
|
+
when?: (context: NuGridCellClickContext<T>) => boolean;
|
|
73
|
+
handle: (context: NuGridCellClickContext<T>) => NuGridInteractionRouteResult | void;
|
|
74
|
+
}
|
|
75
|
+
export interface NuGridPointerContext {
|
|
76
|
+
event: PointerEvent | MouseEvent;
|
|
77
|
+
}
|
|
78
|
+
export interface NuGridPointerHandler {
|
|
79
|
+
id: string;
|
|
80
|
+
priority: number;
|
|
81
|
+
when?: (context: NuGridPointerContext) => boolean;
|
|
82
|
+
handle: (context: NuGridPointerContext) => NuGridInteractionRouteResult | void;
|
|
83
|
+
}
|
|
84
|
+
export interface NuGridHoverContext {
|
|
85
|
+
event: MouseEvent;
|
|
86
|
+
target: HTMLElement;
|
|
87
|
+
type: 'enter' | 'leave' | 'move';
|
|
88
|
+
}
|
|
89
|
+
export interface NuGridHoverHandler {
|
|
90
|
+
id: string;
|
|
91
|
+
priority: number;
|
|
92
|
+
when?: (context: NuGridHoverContext) => boolean;
|
|
93
|
+
handle: (context: NuGridHoverContext) => NuGridInteractionRouteResult | void;
|
|
94
|
+
}
|
|
95
|
+
export interface NuGridWheelContext<T extends TableData = TableData> {
|
|
96
|
+
event: WheelEvent;
|
|
97
|
+
row: Row<T>;
|
|
98
|
+
cell: Cell<T, any>;
|
|
99
|
+
cellIndex: number;
|
|
100
|
+
}
|
|
101
|
+
export interface NuGridWheelHandler<T extends TableData = TableData> {
|
|
102
|
+
id: string;
|
|
103
|
+
priority: number;
|
|
104
|
+
when?: (context: NuGridWheelContext<T>) => boolean;
|
|
105
|
+
handle: (context: NuGridWheelContext<T>) => NuGridInteractionRouteResult | void;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Keyboard context passed to keyboard handlers
|
|
109
|
+
*/
|
|
110
|
+
export interface NuGridKeyboardContext<T extends TableData = TableData> {
|
|
111
|
+
/** The keyboard event */
|
|
112
|
+
event: KeyboardEvent;
|
|
113
|
+
/** Current focused cell position (null if no cell focused) */
|
|
114
|
+
focusedCell: NuGridFocusedCell | null;
|
|
115
|
+
/** The focused row instance (if focused) */
|
|
116
|
+
focusedRow: Row<T> | null;
|
|
117
|
+
/** The focused cell instance (if focused) */
|
|
118
|
+
cell: Cell<T, any> | null;
|
|
119
|
+
/** Cell index within the row */
|
|
120
|
+
cellIndex: number;
|
|
121
|
+
/** Whether a cell is currently being edited */
|
|
122
|
+
isEditing: boolean;
|
|
123
|
+
/** Focus mode from props ('none' | 'cell' | 'row') */
|
|
124
|
+
focusMode: 'none' | 'cell' | 'row';
|
|
125
|
+
/** Whether editing is enabled */
|
|
126
|
+
editingEnabled: boolean;
|
|
127
|
+
/** TanStack table API */
|
|
128
|
+
tableApi: Table<T>;
|
|
129
|
+
/** Focus functions for navigation */
|
|
130
|
+
focusFns: NuGridFocus<T>;
|
|
131
|
+
/** Cell editing functions */
|
|
132
|
+
cellEditingFns: NuGridCellEditing<T>;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Keyboard handler definition - follows NuGridInteractionHandler pattern
|
|
136
|
+
*/
|
|
137
|
+
export interface NuGridKeyboardHandler<T extends TableData = TableData> {
|
|
138
|
+
id: string;
|
|
139
|
+
priority: number;
|
|
140
|
+
/** Optional condition - handler only runs if when() returns true */
|
|
141
|
+
when?: (context: NuGridKeyboardContext<T>) => boolean;
|
|
142
|
+
/** Handle the keyboard event */
|
|
143
|
+
handle: (context: NuGridKeyboardContext<T>) => NuGridInteractionRouteResult | void;
|
|
144
|
+
/**
|
|
145
|
+
* Request document-level keyboard listening.
|
|
146
|
+
* Use this when the handler needs to capture events on elements outside the grid
|
|
147
|
+
* (e.g., teleported dropdowns, modals).
|
|
148
|
+
* Document-level handlers receive a minimal context (event + editing state).
|
|
149
|
+
*/
|
|
150
|
+
documentLevel?: boolean;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Configuration for keyboard event handling
|
|
154
|
+
*/
|
|
155
|
+
export interface NuGridKeyboardConfig<T extends TableData = TableData> {
|
|
156
|
+
/** Whether to attach listener to document (true) or grid root (false) */
|
|
157
|
+
retainFocus: boolean;
|
|
158
|
+
/** Build context for a keyboard event. Return null to skip routing. */
|
|
159
|
+
buildContext: (event: KeyboardEvent) => NuGridKeyboardContext<T> | null;
|
|
160
|
+
}
|
|
161
|
+
export interface NuGridInteractionRouter<T extends TableData = TableData> {
|
|
162
|
+
registerCellClickHandler: (handler: NuGridInteractionHandler<T>) => () => void;
|
|
163
|
+
routeCellClick: (context: NuGridCellClickContext<T>) => void;
|
|
164
|
+
registerCellDoubleClickHandler: (handler: NuGridInteractionHandler<T>) => () => void;
|
|
165
|
+
routeCellDoubleClick: (context: NuGridCellClickContext<T>) => void;
|
|
166
|
+
registerContextMenuHandler: (handler: NuGridInteractionHandler<T>) => () => void;
|
|
167
|
+
routeContextMenu: (context: NuGridCellClickContext<T>) => void;
|
|
168
|
+
registerWheelHandler: (handler: NuGridWheelHandler<T>) => () => void;
|
|
169
|
+
routeWheel: (context: NuGridWheelContext<T>) => void;
|
|
170
|
+
registerGlobalPointerHandler: (handler: NuGridPointerHandler) => () => void;
|
|
171
|
+
registerHoverHandler: (handler: NuGridHoverHandler) => () => void;
|
|
172
|
+
registerKeyboardHandler: (handler: NuGridKeyboardHandler<T>) => () => void;
|
|
173
|
+
routeKeyboard: (context: NuGridKeyboardContext<T>) => void;
|
|
174
|
+
setKeyboardConfig: (config: NuGridKeyboardConfig<T> | null) => void;
|
|
175
|
+
setGridRoot: (el: HTMLElement | null) => void;
|
|
176
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export const ROUTER_PRIORITIES = {
|
|
2
|
+
/** Guards - veto events early (0-9) */
|
|
3
|
+
GUARD_MIN: 0,
|
|
4
|
+
GUARD_MAX: 9,
|
|
5
|
+
/** Focus management (10-19) */
|
|
6
|
+
FOCUS_MIN: 10,
|
|
7
|
+
FOCUS: 10,
|
|
8
|
+
FOCUS_MAX: 19,
|
|
9
|
+
/** Editing (20-29) */
|
|
10
|
+
EDITING_MIN: 20,
|
|
11
|
+
EDITING: 20,
|
|
12
|
+
EDITING_OUTSIDE: 25,
|
|
13
|
+
EDITING_MAX: 29,
|
|
14
|
+
/** Actions (30-99) */
|
|
15
|
+
ACTION_MIN: 30,
|
|
16
|
+
ACTION_MAX: 99,
|
|
17
|
+
/** Low priority - tooltips, etc (100+) */
|
|
18
|
+
LOW_PRIORITY: 100,
|
|
19
|
+
/** Keyboard: Cell type handlers (15) - before editing triggers */
|
|
20
|
+
KEYBOARD_CELL_TYPE: 15,
|
|
21
|
+
/** Keyboard: Editing triggers - F2, Enter, Backspace, alphanumeric (20) */
|
|
22
|
+
KEYBOARD_EDITING_TRIGGERS: 20,
|
|
23
|
+
/** Keyboard: Paging - PageUp/PageDown, Cmd+Up/Down when paging enabled (25) */
|
|
24
|
+
KEYBOARD_PAGING: 25,
|
|
25
|
+
/** Keyboard: Navigation - arrows, tab, page up/down, etc. (30) */
|
|
26
|
+
KEYBOARD_NAVIGATION: 30
|
|
27
|
+
};
|
|
28
|
+
const eventMetadata = /* @__PURE__ */ new WeakMap();
|
|
29
|
+
export function setEventFlag(event, key, value) {
|
|
30
|
+
const meta = eventMetadata.get(event) ?? {};
|
|
31
|
+
meta[key] = value;
|
|
32
|
+
eventMetadata.set(event, meta);
|
|
33
|
+
}
|
|
34
|
+
export function getEventFlag(event, key, defaultValue) {
|
|
35
|
+
return eventMetadata.get(event)?.[key] ?? defaultValue;
|
|
36
|
+
}
|
|
37
|
+
export function hasEventFlag(event, key) {
|
|
38
|
+
return eventMetadata.has(event) && key in (eventMetadata.get(event) ?? {});
|
|
39
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
import type { TableData } from '@nuxt/ui';
|
|
5
|
+
import type { NuGridProps } from '../props.js';
|
|
6
|
+
/**
|
|
7
|
+
* Available NuGrid preset configurations
|
|
8
|
+
* - 'readOnly': Read-only grid with basic navigation
|
|
9
|
+
* - 'editable': Editable grid with validation and editing features
|
|
10
|
+
* - 'kanban': Kanban-style grid with drag-and-drop
|
|
11
|
+
* - 'forms': Form-like grid optimized for data entry
|
|
12
|
+
* - 'analytics': Analytics-focused grid with virtualization
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export type NuGridPreset = 'readOnly' | 'editable' | 'kanban' | 'forms' | 'analytics';
|
|
16
|
+
/**
|
|
17
|
+
* Preset options configuration
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
export type { NuGridPresetOptions } from '../props.js';
|
|
21
|
+
/**
|
|
22
|
+
* Options for creating NuGrid configuration
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export interface NuGridCreateConfigOptions<T extends TableData = TableData> {
|
|
26
|
+
preset?: NuGridPreset;
|
|
27
|
+
config?: Partial<NuGridProps<T>>;
|
|
28
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
import type { TableData } from '@nuxt/ui';
|
|
5
|
+
import type { Header } from '@tanstack/vue-table';
|
|
6
|
+
import type { Ref } from 'vue';
|
|
7
|
+
/**
|
|
8
|
+
* Type for nugrid-resizefns injection
|
|
9
|
+
* Provides column resize functionality
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export interface NuGridColumnResize<T extends TableData = TableData> {
|
|
13
|
+
handleResizeStart: (event: MouseEvent | TouchEvent, header: Header<T, any>) => void;
|
|
14
|
+
handleGroupResizeStart: (event: MouseEvent | TouchEvent, header: Header<T, any>) => void;
|
|
15
|
+
handleResizeEnd: () => void;
|
|
16
|
+
resizingGroupId: Ref<string | null>;
|
|
17
|
+
resizingColumnId: Ref<string | null>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Header type used for pinning calculations.
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
export interface PinnableHeader {
|
|
24
|
+
colSpan: number;
|
|
25
|
+
column: {
|
|
26
|
+
getIsPinned: () => false | 'left' | 'right';
|
|
27
|
+
getStart: (position: 'left') => number;
|
|
28
|
+
getAfter: (position: 'right') => number;
|
|
29
|
+
};
|
|
30
|
+
getLeafHeaders: () => Array<{
|
|
31
|
+
column: {
|
|
32
|
+
getIsPinned: () => false | 'left' | 'right';
|
|
33
|
+
getStart: (position: 'left') => number;
|
|
34
|
+
getAfter: (position: 'right') => number;
|
|
35
|
+
};
|
|
36
|
+
}>;
|
|
37
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
import type { TableData } from '@nuxt/ui';
|
|
5
|
+
import type { Row } from '@tanstack/vue-table';
|
|
6
|
+
/**
|
|
7
|
+
* Type for nugrid-rowinteractions injection
|
|
8
|
+
* Provides row interaction handlers
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export interface NuGridRowInteractions<T extends TableData = TableData> {
|
|
12
|
+
onRowSelect: (e: Event, row: Row<T>) => void;
|
|
13
|
+
onRowHover: (e: Event, row: Row<T> | null) => void;
|
|
14
|
+
onRowContextmenu: (e: Event, row: Row<T>) => void;
|
|
15
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
import type { TableColumn, TableData } from '@nuxt/ui';
|
|
5
|
+
import type { Row } from '@tanstack/vue-table';
|
|
6
|
+
import type { Ref } from 'vue';
|
|
7
|
+
import type { NuGridRowSelectOptions } from '../row-selection.js';
|
|
8
|
+
/**
|
|
9
|
+
* Column definition overrides for the selection column
|
|
10
|
+
* Excludes properties that are required for the selection column to function correctly
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export type NuGridSelectionColumnDef<T extends TableData = TableData> = Partial<Omit<TableColumn<T>, 'id' | 'header' | 'cell' | 'accessorFn' | 'meta' | 'cellDataType'>>;
|
|
14
|
+
/**
|
|
15
|
+
* Meta data stored on the selection column
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export interface NuGridSelectionColumnMeta<T extends TableData = TableData> {
|
|
19
|
+
selectionEnabled: boolean;
|
|
20
|
+
enabledRef?: Ref<boolean>;
|
|
21
|
+
rowSelectionEnabledRef?: Ref<((row: Row<T>) => boolean) | undefined>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Row selection mode type - supports legacy boolean/'single'/'multi' or new options object
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
export type NuGridRowSelectionMode<T extends TableData = TableData> = boolean | 'single' | 'multi' | NuGridRowSelectOptions<T> | undefined;
|
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
import type { ColumnFiltersState, ColumnOrderState, ColumnPinningState, ColumnSizingInfoState, ColumnSizingState, ExpandedState, GroupingState, PaginationState, RowPinningState, RowSelectionState, SortingState, VisibilityState } from '@tanstack/vue-table';
|
|
5
|
+
import type { Ref } from 'vue';
|
|
6
|
+
/**
|
|
7
|
+
* Grid state refs container
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export interface NuGridStates {
|
|
11
|
+
globalFilterState: Ref<string>;
|
|
12
|
+
columnFiltersState: Ref<ColumnFiltersState>;
|
|
13
|
+
columnOrderState: Ref<ColumnOrderState>;
|
|
14
|
+
columnVisibilityState: Ref<VisibilityState>;
|
|
15
|
+
columnPinningState: Ref<ColumnPinningState>;
|
|
16
|
+
columnSizingState: Ref<ColumnSizingState>;
|
|
17
|
+
columnSizingInfoState: Ref<ColumnSizingInfoState>;
|
|
18
|
+
rowSelectionState: Ref<RowSelectionState>;
|
|
19
|
+
rowPinningState: Ref<RowPinningState>;
|
|
20
|
+
sortingState: Ref<SortingState>;
|
|
21
|
+
groupingState: Ref<GroupingState>;
|
|
22
|
+
expandedState: Ref<ExpandedState>;
|
|
23
|
+
paginationState: Ref<PaginationState>;
|
|
24
|
+
}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
import type { TableData } from '@nuxt/ui';
|
|
5
|
+
import type { Ref } from 'vue';
|
|
6
|
+
import type { StandardSchemaV1 } from '../../utils/standardSchema.js';
|
|
7
|
+
import type { NuGridOnInvalid, NuGridShowErrors, NuGridValidateOn } from '../validation.js';
|
|
8
|
+
/**
|
|
9
|
+
* Result of a row validation rule
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export interface NuGridRowValidationResult {
|
|
13
|
+
/**
|
|
14
|
+
* Whether the row is valid
|
|
15
|
+
*/
|
|
16
|
+
valid: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Error message to display
|
|
19
|
+
*/
|
|
20
|
+
message?: string;
|
|
21
|
+
/**
|
|
22
|
+
* The field(s) that caused the validation failure
|
|
23
|
+
* These cells will be highlighted with error styling
|
|
24
|
+
* If not specified, all cells in the row will show error styling
|
|
25
|
+
*/
|
|
26
|
+
failedFields?: string[];
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* A row-level validation rule
|
|
30
|
+
* Returns validation result based on the entire row data
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
export type NuGridRowValidationRule<T extends TableData = TableData> = (row: T) => NuGridRowValidationResult;
|
|
34
|
+
/**
|
|
35
|
+
* Normalized validation options resolved internally
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
export interface NuGridResolvedValidation<T extends TableData = TableData> {
|
|
39
|
+
schema: StandardSchemaV1<T> | null;
|
|
40
|
+
rowRules: NuGridRowValidationRule<T>[];
|
|
41
|
+
validateOn: NuGridValidateOn;
|
|
42
|
+
showErrors: NuGridShowErrors;
|
|
43
|
+
icon: string;
|
|
44
|
+
onInvalid: NuGridOnInvalid;
|
|
45
|
+
validateOnAddRow: boolean;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Validation context provided to cell editors
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
51
|
+
export interface NuGridValidationContext {
|
|
52
|
+
showErrors?: Ref<NuGridShowErrors>;
|
|
53
|
+
icon?: Ref<string>;
|
|
54
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { TableData } from '@nuxt/ui';
|
|
2
|
+
import type { Row } from '@tanstack/vue-table';
|
|
3
|
+
import type { Virtualizer, VirtualizerOptions } from '@tanstack/vue-virtual';
|
|
4
|
+
import type { ComputedRef } from 'vue';
|
|
5
|
+
/**
|
|
6
|
+
* Configuration for virtual row heights in grouped grid mode.
|
|
7
|
+
* These heights are used by useNuGridGrouping for virtualization calculations.
|
|
8
|
+
*/
|
|
9
|
+
export interface GroupingVirtualRowHeights {
|
|
10
|
+
/**
|
|
11
|
+
* Height of group header rows (in pixels)
|
|
12
|
+
* @defaultValue 50
|
|
13
|
+
*/
|
|
14
|
+
groupHeader?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Height of a single column header row (in pixels)
|
|
17
|
+
* @defaultValue 50
|
|
18
|
+
*/
|
|
19
|
+
columnHeader?: number;
|
|
20
|
+
/**
|
|
21
|
+
* Height of data rows (in pixels)
|
|
22
|
+
* @defaultValue 80
|
|
23
|
+
*/
|
|
24
|
+
dataRow?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Height of footer rows (in pixels)
|
|
27
|
+
* @defaultValue 45
|
|
28
|
+
*/
|
|
29
|
+
footer?: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Type of virtual row in grouped grid mode
|
|
33
|
+
*/
|
|
34
|
+
export type GroupVirtualRowType = 'group-header' | 'column-headers' | 'data' | 'footer';
|
|
35
|
+
/**
|
|
36
|
+
* Virtual row item for grouped grid virtualization
|
|
37
|
+
*/
|
|
38
|
+
export interface GroupVirtualRowItem<T extends TableData = TableData> {
|
|
39
|
+
type: GroupVirtualRowType;
|
|
40
|
+
height: number;
|
|
41
|
+
groupId?: string;
|
|
42
|
+
groupRow?: Row<T>;
|
|
43
|
+
dataRow?: Row<T>;
|
|
44
|
+
index: number;
|
|
45
|
+
depth?: number;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Keys to omit from base VirtualizerOptions as they are managed internally.
|
|
49
|
+
*/
|
|
50
|
+
type OmittedVirtualizerKeys = 'getScrollElement' | 'count' | 'estimateSize' | 'overscan';
|
|
51
|
+
export type OverscanSetting = number | Record<string, number>;
|
|
52
|
+
/**
|
|
53
|
+
* Extended virtualization options for NuGrid.
|
|
54
|
+
* Includes standard TanStack Virtual options plus NuGrid-specific row heights.
|
|
55
|
+
*/
|
|
56
|
+
export type NuGridVirtualizerOptions = Partial<Omit<VirtualizerOptions<Element, Element>, OmittedVirtualizerKeys>> & {
|
|
57
|
+
/**
|
|
58
|
+
* Toggle virtualization. If omitted, treated as enabled when the object is provided.
|
|
59
|
+
*/
|
|
60
|
+
enabled?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Number of items rendered outside the visible area
|
|
63
|
+
* - number: uniform overscan
|
|
64
|
+
* - record: overscan per breakpoint key (uses `default` when no match)
|
|
65
|
+
* @defaultValue 12 (with breakpoint defaults stored in nuGridDefaults)
|
|
66
|
+
*/
|
|
67
|
+
overscan?: OverscanSetting;
|
|
68
|
+
/**
|
|
69
|
+
* Explicit map for breakpoint-based overscan overrides. Takes precedence over `overscan` when set.
|
|
70
|
+
*/
|
|
71
|
+
overscanByBreakpoint?: Record<string, number>;
|
|
72
|
+
/**
|
|
73
|
+
* Estimated size (in px) of each item
|
|
74
|
+
* @defaultValue 65
|
|
75
|
+
*/
|
|
76
|
+
estimateSize?: number;
|
|
77
|
+
/**
|
|
78
|
+
* Custom heights for virtual row types used in grouped grid mode.
|
|
79
|
+
* Only applicable when grouped layouts are active.
|
|
80
|
+
*/
|
|
81
|
+
rowHeights?: GroupingVirtualRowHeights;
|
|
82
|
+
/**
|
|
83
|
+
* Enable dynamic row height measurement. See docs for default behavior.
|
|
84
|
+
*/
|
|
85
|
+
dynamicRowHeights?: boolean;
|
|
86
|
+
};
|
|
87
|
+
export type ResolvedNuGridVirtualizeOptions = Omit<NuGridVirtualizerOptions, 'enabled' | 'overscan' | 'estimateSize' | 'dynamicRowHeights' | 'rowHeights'> & {
|
|
88
|
+
enabled: boolean;
|
|
89
|
+
overscan: number;
|
|
90
|
+
overscanByBreakpoint?: Record<string, number>;
|
|
91
|
+
estimateSize: number;
|
|
92
|
+
dynamicRowHeights: boolean;
|
|
93
|
+
rowHeights: Required<GroupingVirtualRowHeights>;
|
|
94
|
+
};
|
|
95
|
+
export interface NuGridVirtualizer<TScrollElement extends Element = Element, TItemElement extends Element = Element> extends Virtualizer<TScrollElement, TItemElement> {
|
|
96
|
+
props: ComputedRef<ResolvedNuGridVirtualizeOptions>;
|
|
97
|
+
dynamicRowHeightsEnabled: ComputedRef<boolean>;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* CSS style object for virtualized grid items.
|
|
101
|
+
* Used by getVirtualItemStyle functions in NuGridBase, NuGridGroup, and NuGridSplitGroup.
|
|
102
|
+
*/
|
|
103
|
+
export type NuGridVirtualItemStyle = {
|
|
104
|
+
position: 'sticky' | 'absolute';
|
|
105
|
+
top: string | number;
|
|
106
|
+
width: string | number;
|
|
107
|
+
left?: number;
|
|
108
|
+
zIndex?: number;
|
|
109
|
+
height?: string;
|
|
110
|
+
transform?: string;
|
|
111
|
+
backgroundColor?: string;
|
|
112
|
+
boxShadow?: string;
|
|
113
|
+
} & Record<string, string | number | undefined>;
|
|
114
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { Row } from '@tanstack/vue-table';
|
|
2
|
+
import type { NuGridActionMenuButton, NuGridActionMenuColumnDef } from './_internal/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Action menu item type - compatible with UDropdownMenu items
|
|
5
|
+
*/
|
|
6
|
+
export type NuGridActionMenuItem = {
|
|
7
|
+
type?: 'label' | 'separator';
|
|
8
|
+
label?: string;
|
|
9
|
+
} | {
|
|
10
|
+
label: string;
|
|
11
|
+
icon?: string;
|
|
12
|
+
color?: 'error' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'neutral';
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
onSelect?: (event?: Event) => void;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Action menu options for configuring the action menu column
|
|
18
|
+
*/
|
|
19
|
+
export interface NuGridActionMenuOptions<T = any> {
|
|
20
|
+
/**
|
|
21
|
+
* Whether actions column is enabled
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
enabled?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Function that returns menu items for a specific row
|
|
27
|
+
* @param row - The row data
|
|
28
|
+
* @returns Array of menu items
|
|
29
|
+
*/
|
|
30
|
+
getActions?: (row: Row<T>) => NuGridActionMenuItem[];
|
|
31
|
+
/**
|
|
32
|
+
* Function that determines if the action menu is enabled for a specific row
|
|
33
|
+
* @param row - The row data
|
|
34
|
+
* @returns Whether the action menu should be enabled
|
|
35
|
+
* @default () => true
|
|
36
|
+
*/
|
|
37
|
+
isRowEnabled?: (row: Row<T>) => boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Button configuration for the action menu trigger
|
|
40
|
+
* @default { icon: 'i-lucide-ellipsis-vertical', color: 'neutral', variant: 'ghost', class: 'ml-auto' }
|
|
41
|
+
*/
|
|
42
|
+
button?: NuGridActionMenuButton;
|
|
43
|
+
/**
|
|
44
|
+
* Whether the action menu column should be hidden (but still in columns collection)
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
47
|
+
hidden?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Column definition overrides for the action menu column
|
|
50
|
+
* Allows customizing properties like size, enableResizing, enableReordering, etc.
|
|
51
|
+
* @example
|
|
52
|
+
* // Allow resizing and reordering the action menu column
|
|
53
|
+
* columnDef: {
|
|
54
|
+
* enableResizing: true,
|
|
55
|
+
* enableReordering: true,
|
|
56
|
+
* size: 80,
|
|
57
|
+
* minSize: 50,
|
|
58
|
+
* maxSize: 120
|
|
59
|
+
* }
|
|
60
|
+
*/
|
|
61
|
+
columnDef?: NuGridActionMenuColumnDef;
|
|
62
|
+
}
|
|
File without changes
|
|
File without changes
|