@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,418 @@
|
|
|
1
|
+
import type { TableData, TableProps } from '@nuxt/ui';
|
|
2
|
+
import type { RowDragOptions } from '../composables/_internal/useNuGridRowDragDrop.js';
|
|
3
|
+
import type { NuGridConfig, NuGridPreset, NuGridVirtualizerOptions } from './_internal/index.js';
|
|
4
|
+
import type { NuGridCellType } from './cells.js';
|
|
5
|
+
import type { NuGridActionsOptions, NuGridAnimationOptions, NuGridColumnDefaultsOptions, NuGridEditingOptions, NuGridFocusOptions, NuGridLayoutOptions, NuGridMultiRowOptions, NuGridPagingOptions, NuGridSelectionOptions, NuGridStateOptions, NuGridTooltipOptions } from './option-groups.js';
|
|
6
|
+
import type { NuGridTheme } from './theme.js';
|
|
7
|
+
import type { NuGridValidationOptions } from './validation.js';
|
|
8
|
+
/**
|
|
9
|
+
* Scrollbar styling modes for NuGrid
|
|
10
|
+
* - 'native': Browser default scrollbar behavior
|
|
11
|
+
* - 'hover': Show styled scrollbar on hover
|
|
12
|
+
* - 'scroll': Show styled scrollbar when scrolling (macOS-like)
|
|
13
|
+
*/
|
|
14
|
+
export type NuGridScrollbars = 'native' | 'hover' | 'scroll';
|
|
15
|
+
/**
|
|
16
|
+
* NuGrid props interface extending TableProps with additional grid-specific options
|
|
17
|
+
* - Omits the base virtualize flag in favor of the grouped `virtualization` config
|
|
18
|
+
* - Omits 'state' to avoid conflict with new NuGrid state persistence config
|
|
19
|
+
*/
|
|
20
|
+
export interface NuGridProps<T extends TableData = TableData> extends Omit<TableProps<T>, 'virtualize' | 'state'> {
|
|
21
|
+
ui?: NuGridConfig['slots'];
|
|
22
|
+
/**
|
|
23
|
+
* Preset configuration to quickly setup common grid behaviors
|
|
24
|
+
* Presets hydrate sensible defaults for focus, editing, selection, validation, etc.
|
|
25
|
+
* - 'readOnly': Read-only grid with basic navigation
|
|
26
|
+
* - 'editable': Editable grid with validation and editing features
|
|
27
|
+
* - 'kanban': Kanban-style grid with drag-and-drop
|
|
28
|
+
* - 'forms': Form-like grid optimized for data entry
|
|
29
|
+
* - 'analytics': Analytics-focused grid with virtualization
|
|
30
|
+
* @defaultValue undefined
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* // Quick setup with preset
|
|
34
|
+
* <NuGrid preset="editable" :data="data" :columns="columns" />
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* // Preset with overrides
|
|
38
|
+
* <NuGrid
|
|
39
|
+
* preset="editable"
|
|
40
|
+
* :focus="{ retain: false }"
|
|
41
|
+
* :editing="{ startClicks: 'single' }"
|
|
42
|
+
* />
|
|
43
|
+
*/
|
|
44
|
+
preset?: NuGridPreset;
|
|
45
|
+
/**
|
|
46
|
+
* Focus and keyboard navigation configuration
|
|
47
|
+
* Groups focus-related settings for cleaner API surface
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* // Enable cell focus with paging navigation
|
|
51
|
+
* focus: {
|
|
52
|
+
* mode: 'cell',
|
|
53
|
+
* retain: true,
|
|
54
|
+
* cmdArrows: 'paging',
|
|
55
|
+
* loopNavigation: false
|
|
56
|
+
* }
|
|
57
|
+
*/
|
|
58
|
+
focus?: NuGridFocusOptions;
|
|
59
|
+
/**
|
|
60
|
+
* Cell editing configuration
|
|
61
|
+
* Groups editing-related settings including start triggers and behaviors
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* // Enable editing with custom triggers
|
|
65
|
+
* editing: {
|
|
66
|
+
* enabled: true,
|
|
67
|
+
* startKeys: 'minimal',
|
|
68
|
+
* startClicks: 'single',
|
|
69
|
+
* commitOnBlur: true,
|
|
70
|
+
* canEdit: (row, columnId) => row.original.status !== 'locked'
|
|
71
|
+
* }
|
|
72
|
+
*/
|
|
73
|
+
editing?: NuGridEditingOptions<T>;
|
|
74
|
+
/**
|
|
75
|
+
* Enhanced validation configuration
|
|
76
|
+
* Supports schema validation, row rules, and flexible validation modes
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* // Basic validation with schema
|
|
80
|
+
* validation: {
|
|
81
|
+
* schema: myZodSchema,
|
|
82
|
+
* trigger: 'submit',
|
|
83
|
+
* mode: 'block'
|
|
84
|
+
* }
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* // With row-level rules
|
|
88
|
+
* validation: {
|
|
89
|
+
* schema: mySchema,
|
|
90
|
+
* rowRules: [(row) => ({
|
|
91
|
+
* valid: row.startDate < row.endDate,
|
|
92
|
+
* message: 'End date must be after start date',
|
|
93
|
+
* failedFields: ['endDate']
|
|
94
|
+
* })],
|
|
95
|
+
* trigger: 'blur',
|
|
96
|
+
* mode: 'warn'
|
|
97
|
+
* }
|
|
98
|
+
*/
|
|
99
|
+
validation?: false | NuGridValidationOptions<T>;
|
|
100
|
+
/**
|
|
101
|
+
* Enhanced selection configuration
|
|
102
|
+
* Provides preset-based setup with sync callback for external state
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* // Multi-select with sync callback
|
|
106
|
+
* selection: {
|
|
107
|
+
* mode: 'multi',
|
|
108
|
+
* placement: 'start',
|
|
109
|
+
* sync: (ids) => { selectedIds.value = ids }
|
|
110
|
+
* }
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* // Single select with conditional enabling
|
|
114
|
+
* selection: {
|
|
115
|
+
* mode: 'single',
|
|
116
|
+
* rowSelectionEnabled: (row) => row.original.selectable
|
|
117
|
+
* }
|
|
118
|
+
*/
|
|
119
|
+
selection?: false | 'single' | 'multi' | NuGridSelectionOptions<T>;
|
|
120
|
+
/**
|
|
121
|
+
* Actions column configuration
|
|
122
|
+
* Simplified API with placement options and defaults to hidden when no getActions provided
|
|
123
|
+
*
|
|
124
|
+
* @example
|
|
125
|
+
* // Basic actions at end
|
|
126
|
+
* actions: {
|
|
127
|
+
* getActions: (row) => [
|
|
128
|
+
* { label: 'Edit', icon: 'i-lucide-pencil', onSelect: () => edit(row) }
|
|
129
|
+
* ]
|
|
130
|
+
* }
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* // Actions at start with conditional enable
|
|
134
|
+
* actions: {
|
|
135
|
+
* placement: 'start',
|
|
136
|
+
* getActions: (row) => [...],
|
|
137
|
+
* actionsEnabled: (row) => row.original.status !== 'archived'
|
|
138
|
+
* }
|
|
139
|
+
*/
|
|
140
|
+
actions?: false | NuGridActionsOptions<T>;
|
|
141
|
+
/**
|
|
142
|
+
* Column defaults configuration
|
|
143
|
+
* Default settings applied to all columns, can be overridden at the column level
|
|
144
|
+
*
|
|
145
|
+
* @example
|
|
146
|
+
* // Configure column defaults
|
|
147
|
+
* columnDefaults: {
|
|
148
|
+
* sortIcons: {
|
|
149
|
+
* unsorted: 'i-lucide-chevrons-up-down',
|
|
150
|
+
* asc: 'i-lucide-arrow-up-narrow-wide',
|
|
151
|
+
* desc: 'i-lucide-arrow-down-wide-narrow'
|
|
152
|
+
* },
|
|
153
|
+
* menu: {
|
|
154
|
+
* visibilityToggle: true,
|
|
155
|
+
* button: { icon: 'i-lucide-settings' }
|
|
156
|
+
* },
|
|
157
|
+
* resize: true,
|
|
158
|
+
* reorder: true
|
|
159
|
+
* }
|
|
160
|
+
*/
|
|
161
|
+
columnDefaults?: NuGridColumnDefaultsOptions<T>;
|
|
162
|
+
/**
|
|
163
|
+
* Layout and display configuration
|
|
164
|
+
* Groups layout-related settings for consistent theming and display
|
|
165
|
+
*
|
|
166
|
+
* @example
|
|
167
|
+
* // Grouped layout with sticky headers
|
|
168
|
+
* layout: {
|
|
169
|
+
* mode: 'group',
|
|
170
|
+
* stickyHeaders: true,
|
|
171
|
+
* scrollbars: 'scroll',
|
|
172
|
+
* autoSize: 'fitGrid'
|
|
173
|
+
* }
|
|
174
|
+
*/
|
|
175
|
+
layout?: NuGridLayoutOptions;
|
|
176
|
+
/**
|
|
177
|
+
* Tooltip configuration
|
|
178
|
+
* Controls tooltip behavior for cells and headers
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* // Enable tooltips for all cells with mouse follow
|
|
182
|
+
* tooltip: {
|
|
183
|
+
* truncatedOnly: false,
|
|
184
|
+
* mouseFollow: true,
|
|
185
|
+
* showDelay: 300
|
|
186
|
+
* }
|
|
187
|
+
*
|
|
188
|
+
* @example
|
|
189
|
+
* // Disable tooltips entirely
|
|
190
|
+
* tooltip: false
|
|
191
|
+
*/
|
|
192
|
+
tooltip?: false | NuGridTooltipOptions;
|
|
193
|
+
/**
|
|
194
|
+
* Multi-row configuration
|
|
195
|
+
* Allows a single data item to span multiple visual rows
|
|
196
|
+
* Each column can specify which row it appears on using the `row` property
|
|
197
|
+
*
|
|
198
|
+
* @example
|
|
199
|
+
* // Enable multi-row with 2 rows per data item
|
|
200
|
+
* multiRow: {
|
|
201
|
+
* enabled: true,
|
|
202
|
+
* rowCount: 2
|
|
203
|
+
* }
|
|
204
|
+
*
|
|
205
|
+
* @example
|
|
206
|
+
* // Columns specify their row
|
|
207
|
+
* columns: [
|
|
208
|
+
* { accessorKey: 'name', header: 'Name', row: 0 },
|
|
209
|
+
* { accessorKey: 'email', header: 'Email', row: 0 },
|
|
210
|
+
* { accessorKey: 'bio', header: 'Bio', row: 1 }
|
|
211
|
+
* ]
|
|
212
|
+
*/
|
|
213
|
+
multiRow?: false | NuGridMultiRowOptions;
|
|
214
|
+
/**
|
|
215
|
+
* Row animation configuration
|
|
216
|
+
* Controls animations for row transitions after sorting, filtering, and other data changes
|
|
217
|
+
* Similar to AG Grid's row animations, but disabled by default for performance
|
|
218
|
+
*
|
|
219
|
+
* @example
|
|
220
|
+
* // Enable animations with default settings
|
|
221
|
+
* animation: {
|
|
222
|
+
* enabled: true
|
|
223
|
+
* }
|
|
224
|
+
*
|
|
225
|
+
* @example
|
|
226
|
+
* // Custom animation timing
|
|
227
|
+
* animation: {
|
|
228
|
+
* enabled: true,
|
|
229
|
+
* duration: 400,
|
|
230
|
+
* easing: 'ease-in-out'
|
|
231
|
+
* }
|
|
232
|
+
*/
|
|
233
|
+
animation?: false | NuGridAnimationOptions;
|
|
234
|
+
/**
|
|
235
|
+
* Paging configuration
|
|
236
|
+
* Controls client-side pagination with built-in UI panel
|
|
237
|
+
* Similar to AG Grid's pagination feature
|
|
238
|
+
*
|
|
239
|
+
* Note: Named 'paging' to avoid conflict with TanStack's pagination state v-model
|
|
240
|
+
*
|
|
241
|
+
* @example
|
|
242
|
+
* // Enable with defaults
|
|
243
|
+
* paging: true
|
|
244
|
+
*
|
|
245
|
+
* @example
|
|
246
|
+
* // Custom page size
|
|
247
|
+
* paging: {
|
|
248
|
+
* pageSize: 25,
|
|
249
|
+
* pageSizeSelector: [10, 25, 50, 100]
|
|
250
|
+
* }
|
|
251
|
+
*
|
|
252
|
+
* @example
|
|
253
|
+
* // Auto-fit rows to container height
|
|
254
|
+
* paging: {
|
|
255
|
+
* autoPageSize: true
|
|
256
|
+
* }
|
|
257
|
+
*
|
|
258
|
+
* @example
|
|
259
|
+
* // Hide built-in panel (use custom controls)
|
|
260
|
+
* paging: {
|
|
261
|
+
* suppressPanel: true
|
|
262
|
+
* }
|
|
263
|
+
*/
|
|
264
|
+
paging?: boolean | NuGridPagingOptions;
|
|
265
|
+
/**
|
|
266
|
+
* State persistence configuration
|
|
267
|
+
* Enhanced with granular control over persisted parts and storage type
|
|
268
|
+
*
|
|
269
|
+
* @example
|
|
270
|
+
* // Persist filters and sorting to localStorage
|
|
271
|
+
* state: {
|
|
272
|
+
* key: 'my-grid-state',
|
|
273
|
+
* parts: ['filters', 'sorting'],
|
|
274
|
+
* storage: 'local',
|
|
275
|
+
* throttleMs: 500
|
|
276
|
+
* }
|
|
277
|
+
*
|
|
278
|
+
* @example
|
|
279
|
+
* // With state change callback
|
|
280
|
+
* state: {
|
|
281
|
+
* key: 'my-grid',
|
|
282
|
+
* parts: ['filters', 'sorting', 'columnVisibility'],
|
|
283
|
+
* onStateChange: (state) => console.log('State changed', state)
|
|
284
|
+
* }
|
|
285
|
+
*/
|
|
286
|
+
state?: false | NuGridStateOptions;
|
|
287
|
+
/**
|
|
288
|
+
* Theme preset for the grid
|
|
289
|
+
* Built-in themes:
|
|
290
|
+
* - 'default': Standard NuGrid theme with primary color accents and comfortable spacing
|
|
291
|
+
* - 'compact': Compact theme with blue accents and tighter spacing for data-dense displays
|
|
292
|
+
*
|
|
293
|
+
* Custom themes can be registered via registerTheme() or app config
|
|
294
|
+
* @defaultValue 'default'
|
|
295
|
+
*
|
|
296
|
+
* @example
|
|
297
|
+
* // Use built-in theme
|
|
298
|
+
* <NuGrid theme="compact" :data="data" :columns="columns" />
|
|
299
|
+
*
|
|
300
|
+
* @example
|
|
301
|
+
* // Use custom registered theme
|
|
302
|
+
* <NuGrid theme="ocean" :data="data" :columns="columns" />
|
|
303
|
+
*/
|
|
304
|
+
theme?: NuGridTheme;
|
|
305
|
+
/**
|
|
306
|
+
* Enable virtualization for large datasets with extended configuration options.
|
|
307
|
+
* When `gridMode` is 'group', additional `rowHeights` can be configured.
|
|
308
|
+
* Use `enabled: true` (or `virtualization: true`) to turn it on.
|
|
309
|
+
* @defaultValue { enabled: false, estimateSize: 65, overscan: 12, dynamicRowHeights: true }
|
|
310
|
+
*
|
|
311
|
+
* @example
|
|
312
|
+
* // Simple boolean to enable with defaults
|
|
313
|
+
* virtualization: true
|
|
314
|
+
*
|
|
315
|
+
* @example
|
|
316
|
+
* // Configure virtualization options
|
|
317
|
+
* virtualization: {
|
|
318
|
+
* estimateSize: 80,
|
|
319
|
+
* overscan: 10,
|
|
320
|
+
* overscanByBreakpoint: { default: 12, sm: 8, lg: 18 },
|
|
321
|
+
* rowHeights: {
|
|
322
|
+
* groupHeader: 60,
|
|
323
|
+
* columnHeader: 45,
|
|
324
|
+
* dataRow: 100,
|
|
325
|
+
* footer: 50
|
|
326
|
+
* }
|
|
327
|
+
* }
|
|
328
|
+
*/
|
|
329
|
+
virtualization?: boolean | NuGridVirtualizerOptions;
|
|
330
|
+
/**
|
|
331
|
+
* Custom cell types for extending column behavior
|
|
332
|
+
* Allows defining custom cell types with their own editors, renderers, filters, validation, and keyboard handling
|
|
333
|
+
* Custom types override built-in types with the same name, and new types are added to the registry
|
|
334
|
+
* @example
|
|
335
|
+
* // Rating cell type with editor, keyboard handler, and validation
|
|
336
|
+
* cellTypes: [
|
|
337
|
+
* {
|
|
338
|
+
* name: 'rating',
|
|
339
|
+
* displayName: 'Rating',
|
|
340
|
+
* editor: RatingEditor,
|
|
341
|
+
* renderer: RatingRenderer,
|
|
342
|
+
* keyboardHandler: (event, context) => {
|
|
343
|
+
* if (event.key >= '1' && event.key <= '5' && context.isFocused && context.canEdit) {
|
|
344
|
+
* const newValue = parseInt(event.key)
|
|
345
|
+
* context.emitChange(context.getValue(), newValue)
|
|
346
|
+
* return { handled: true, preventDefault: true }
|
|
347
|
+
* }
|
|
348
|
+
* return { handled: false }
|
|
349
|
+
* },
|
|
350
|
+
* validation: (value) => ({
|
|
351
|
+
* valid: value >= 1 && value <= 5,
|
|
352
|
+
* message: 'Rating must be between 1 and 5'
|
|
353
|
+
* })
|
|
354
|
+
* }
|
|
355
|
+
* ]
|
|
356
|
+
*
|
|
357
|
+
* @see NuGridCellType interface for full capabilities
|
|
358
|
+
* @see CELL_TYPE_GUIDE.md for detailed documentation
|
|
359
|
+
*/
|
|
360
|
+
cellTypes?: NuGridCellType<T>[];
|
|
361
|
+
/**
|
|
362
|
+
* Columns to skip when autosizing
|
|
363
|
+
* Provide an array of column IDs that should not be auto-sized
|
|
364
|
+
* @defaultValue []
|
|
365
|
+
*/
|
|
366
|
+
skipAutoSizeColumns?: string[];
|
|
367
|
+
/**
|
|
368
|
+
* Row dragging configuration
|
|
369
|
+
* Enables drag and drop reordering of rows
|
|
370
|
+
* @defaultValue undefined
|
|
371
|
+
*/
|
|
372
|
+
rowDragOptions?: RowDragOptions;
|
|
373
|
+
/**
|
|
374
|
+
* Row identity field or function
|
|
375
|
+
* Used for stable row tracking during sorting, filtering, and animations
|
|
376
|
+
* - String: Field name to use as row ID (e.g., 'id', 'userId', '_id')
|
|
377
|
+
* - Function: Custom function to generate row ID from row data
|
|
378
|
+
* @defaultValue 'id'
|
|
379
|
+
*
|
|
380
|
+
* @example
|
|
381
|
+
* // Use a different field as row ID
|
|
382
|
+
* rowId: 'uuid'
|
|
383
|
+
*
|
|
384
|
+
* @example
|
|
385
|
+
* // Custom function for composite keys
|
|
386
|
+
* rowId: (row) => `${row.type}-${row.id}`
|
|
387
|
+
*/
|
|
388
|
+
rowId?: string | ((row: T) => string);
|
|
389
|
+
/**
|
|
390
|
+
* Add new item row configuration
|
|
391
|
+
* - true: Enable add new row at bottom (default position)
|
|
392
|
+
* - false: Disable add new row
|
|
393
|
+
* - object: Configure add new row with position and text
|
|
394
|
+
* - position: 'none' | 'top' | 'bottom' - Where to display the add new row
|
|
395
|
+
* - addNewText: Text to display in idle state (default: 'Click here to add')
|
|
396
|
+
* @defaultValue undefined
|
|
397
|
+
*
|
|
398
|
+
* @example
|
|
399
|
+
* // Simple boolean to enable at bottom
|
|
400
|
+
* addNewRow: true
|
|
401
|
+
*
|
|
402
|
+
* @example
|
|
403
|
+
* // Configure position and text
|
|
404
|
+
* addNewRow: {
|
|
405
|
+
* position: 'bottom',
|
|
406
|
+
* addNewText: 'Add new item...'
|
|
407
|
+
* }
|
|
408
|
+
*/
|
|
409
|
+
addNewRow?: boolean | {
|
|
410
|
+
position: 'none' | 'top' | 'bottom';
|
|
411
|
+
addNewText?: string;
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Preset options configuration
|
|
416
|
+
* Configuration options that can be set via presets
|
|
417
|
+
*/
|
|
418
|
+
export type NuGridPresetOptions<T extends TableData = TableData> = Partial<Pick<NuGridProps<T>, 'focus' | 'editing' | 'layout' | 'validation' | 'virtualization'>>;
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TableData } from '@nuxt/ui';
|
|
2
|
+
import type { Header } from '@tanstack/vue-table';
|
|
3
|
+
import type { Ref } from 'vue';
|
|
4
|
+
/**
|
|
5
|
+
* Type for nugrid-resizefns injection
|
|
6
|
+
* Provides column resize functionality
|
|
7
|
+
*/
|
|
8
|
+
export interface NuGridColumnResize<T extends TableData = TableData> {
|
|
9
|
+
handleResizeStart: (event: MouseEvent | TouchEvent, header: Header<T, any>) => void;
|
|
10
|
+
handleGroupResizeStart: (event: MouseEvent | TouchEvent, header: Header<T, any>) => void;
|
|
11
|
+
handleResizeEnd: () => void;
|
|
12
|
+
resizingGroupId: Ref<string | null>;
|
|
13
|
+
resizingColumnId: Ref<string | null>;
|
|
14
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { TableData } from '@nuxt/ui';
|
|
2
|
+
import type { Row } from '@tanstack/vue-table';
|
|
3
|
+
/**
|
|
4
|
+
* Type for nugrid-rowinteractions injection
|
|
5
|
+
* Provides row interaction handlers
|
|
6
|
+
*/
|
|
7
|
+
export interface NuGridRowInteractions<T extends TableData = TableData> {
|
|
8
|
+
onRowSelect: (e: Event, row: Row<T>) => void;
|
|
9
|
+
onRowHover: (e: Event, row: Row<T> | null) => void;
|
|
10
|
+
onRowContextmenu: (e: Event, row: Row<T>) => void;
|
|
11
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { TableData } from '@nuxt/ui';
|
|
2
|
+
import type { Row } from '@tanstack/vue-table';
|
|
3
|
+
import type { NuGridSelectionColumnDef } from './_internal/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* Row selection options object type for advanced configuration
|
|
6
|
+
*/
|
|
7
|
+
export interface NuGridRowSelectOptions<T extends TableData = TableData> {
|
|
8
|
+
/**
|
|
9
|
+
* Selection mode: 'single' or 'multi'
|
|
10
|
+
* @default 'multi'
|
|
11
|
+
*/
|
|
12
|
+
mode?: 'single' | 'multi';
|
|
13
|
+
/**
|
|
14
|
+
* Whether the selection column should be hidden (but still in columns collection)
|
|
15
|
+
* @default false
|
|
16
|
+
*/
|
|
17
|
+
hidden?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the checkboxes should be clickable
|
|
20
|
+
* @default true
|
|
21
|
+
*/
|
|
22
|
+
enabled?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Function to determine if a specific row can be selected
|
|
25
|
+
* When returns false, the row's checkbox is disabled and spacebar/clicks won't toggle selection
|
|
26
|
+
* @param row - The TanStack Table Row object
|
|
27
|
+
* @returns boolean - true if row can be selected, false otherwise
|
|
28
|
+
* @default () => true
|
|
29
|
+
* @example
|
|
30
|
+
* // Disable selection for inactive employees
|
|
31
|
+
* rowSelectionEnabled: (row) => row.original.status !== 'inactive'
|
|
32
|
+
*/
|
|
33
|
+
rowSelectionEnabled?: (row: Row<T>) => boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Column definition overrides for the selection column
|
|
36
|
+
* Allows customizing properties like size, enableResizing, enableReordering, etc.
|
|
37
|
+
* @example
|
|
38
|
+
* // Allow resizing and reordering the selection column
|
|
39
|
+
* columnDef: {
|
|
40
|
+
* enableResizing: true,
|
|
41
|
+
* enableReordering: true,
|
|
42
|
+
* size: 60,
|
|
43
|
+
* minSize: 40,
|
|
44
|
+
* maxSize: 80
|
|
45
|
+
* }
|
|
46
|
+
*/
|
|
47
|
+
columnDef?: NuGridSelectionColumnDef;
|
|
48
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Row } from '@tanstack/vue-table';
|
|
2
|
+
/**
|
|
3
|
+
* NuGridRow extends TanStack's Row type.
|
|
4
|
+
* This wrapper type allows for future NuGrid-specific extensions
|
|
5
|
+
* without breaking changes to the public API.
|
|
6
|
+
*/
|
|
7
|
+
export type NuGridRow<TData = unknown> = Row<TData>;
|
|
File without changes
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sort icon configuration for a column header
|
|
3
|
+
* Allows customizing the icons shown for each sort state
|
|
4
|
+
*/
|
|
5
|
+
export interface NuGridSortIcon {
|
|
6
|
+
/**
|
|
7
|
+
* Icon to show when column is not sorted
|
|
8
|
+
* @defaultValue 'i-lucide-chevrons-up-down'
|
|
9
|
+
*/
|
|
10
|
+
unsorted?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Icon to show when column is sorted in ascending order
|
|
13
|
+
* @defaultValue 'i-lucide-arrow-up'
|
|
14
|
+
*/
|
|
15
|
+
asc?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Icon to show when column is sorted in descending order
|
|
18
|
+
* @defaultValue 'i-lucide-arrow-down'
|
|
19
|
+
*/
|
|
20
|
+
desc?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Only show unsorted icon on hover
|
|
23
|
+
* When true, the unsorted icon will only appear when hovering over the header
|
|
24
|
+
* @defaultValue true
|
|
25
|
+
*/
|
|
26
|
+
unsortedHover?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Placement of the sort icon relative to header content
|
|
29
|
+
* - 'edge': Icon renders at the far edge of the header cell
|
|
30
|
+
* - 'inline': Icon renders directly after the header label
|
|
31
|
+
* - 'none': Icon omitted entirely (use custom UI)
|
|
32
|
+
* @defaultValue 'edge'
|
|
33
|
+
*/
|
|
34
|
+
position?: 'edge' | 'inline' | 'none';
|
|
35
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ColumnFiltersState, ColumnOrderState, ColumnPinningState, ColumnSizingInfoState, ColumnSizingState, ExpandedState, GroupingState, PaginationState, RowPinningState, RowSelectionState, SortingState, VisibilityState } from '@tanstack/vue-table';
|
|
2
|
+
import type { Ref } from 'vue';
|
|
3
|
+
export interface NuGridStates {
|
|
4
|
+
globalFilterState: Ref<string>;
|
|
5
|
+
columnFiltersState: Ref<ColumnFiltersState>;
|
|
6
|
+
columnOrderState: Ref<ColumnOrderState>;
|
|
7
|
+
columnVisibilityState: Ref<VisibilityState>;
|
|
8
|
+
columnPinningState: Ref<ColumnPinningState>;
|
|
9
|
+
columnSizingState: Ref<ColumnSizingState>;
|
|
10
|
+
columnSizingInfoState: Ref<ColumnSizingInfoState>;
|
|
11
|
+
rowSelectionState: Ref<RowSelectionState>;
|
|
12
|
+
rowPinningState: Ref<RowPinningState>;
|
|
13
|
+
sortingState: Ref<SortingState>;
|
|
14
|
+
groupingState: Ref<GroupingState>;
|
|
15
|
+
expandedState: Ref<ExpandedState>;
|
|
16
|
+
paginationState: Ref<PaginationState>;
|
|
17
|
+
}
|
|
File without changes
|
|
File without changes
|