@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,126 @@
|
|
|
1
|
+
import type { Column, Row, RowData } from '@tanstack/vue-table'
|
|
2
|
+
import type { NuGridEditorConfig } from './_internal'
|
|
3
|
+
import type { NuGridColumnMenuItem } from './column'
|
|
4
|
+
import type { NuGridSortIcon, NuGridValidationResult } from './index'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Module augmentation for TanStack Table to add NuGrid custom column properties.
|
|
8
|
+
* This extends the ColumnDefBase interface to add custom properties directly
|
|
9
|
+
* to column definitions, avoiding the need to access them via the `meta` property.
|
|
10
|
+
*
|
|
11
|
+
* @see https://tanstack.com/table/latest/docs/guide/column-defs#column-def-types
|
|
12
|
+
*/
|
|
13
|
+
declare module '@tanstack/vue-table' {
|
|
14
|
+
interface ColumnDefBase<TData extends RowData, TValue> {
|
|
15
|
+
/**
|
|
16
|
+
* Editor configuration for the column cell
|
|
17
|
+
* Can be specified as:
|
|
18
|
+
* - String: Component name (e.g., 'NuGridCellEditorRange')
|
|
19
|
+
* - Object: { component: 'ComponentName', props: { min: 0, max: 100 } }
|
|
20
|
+
* - Function: Custom render function for advanced cases
|
|
21
|
+
*/
|
|
22
|
+
editor?: NuGridEditorConfig
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Controls whether this column is editable
|
|
26
|
+
* Can be a boolean or a function that receives the row and returns a boolean
|
|
27
|
+
* @defaultValue true
|
|
28
|
+
*/
|
|
29
|
+
enableEditing?: boolean | ((row: Row<TData>) => boolean)
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Controls whether this column can receive keyboard focus during navigation
|
|
33
|
+
* Can be a boolean or a function that receives the row and returns a boolean
|
|
34
|
+
* When false, the column will be skipped during keyboard navigation (arrows, tab, etc.)
|
|
35
|
+
* @defaultValue true
|
|
36
|
+
*/
|
|
37
|
+
enableFocusing?: boolean | ((row: Row<TData>) => boolean)
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Data type for the cell, determines which default editor to use
|
|
41
|
+
* Built-in types: 'text', 'number', 'date', 'boolean', 'selection', 'action-menu'
|
|
42
|
+
* Custom types can be registered via cellTypes prop
|
|
43
|
+
* @defaultValue 'text'
|
|
44
|
+
*/
|
|
45
|
+
cellDataType?: string
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Sort icon configuration for this column's header
|
|
49
|
+
* Overrides the grid-level sortIcons configuration
|
|
50
|
+
*/
|
|
51
|
+
sortIcons?: NuGridSortIcon
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Override the default cell rendering behavior
|
|
55
|
+
* When true, indicates that the cell uses a custom renderer and should bypass default rendering logic
|
|
56
|
+
* @defaultValue false
|
|
57
|
+
*/
|
|
58
|
+
overrideCellRender?: boolean
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Controls whether the column menu is enabled for this column
|
|
62
|
+
* @defaultValue true
|
|
63
|
+
*/
|
|
64
|
+
enableColumnMenu?: boolean
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Controls whether this column can be reordered via drag and drop
|
|
68
|
+
* @defaultValue true
|
|
69
|
+
*/
|
|
70
|
+
enableReordering?: boolean
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Custom menu items for the column menu
|
|
74
|
+
* Can be either:
|
|
75
|
+
* - An array of menu items (replaces default items)
|
|
76
|
+
* - A callback function that receives default items and returns custom items
|
|
77
|
+
*/
|
|
78
|
+
columnMenuItems?:
|
|
79
|
+
| NuGridColumnMenuItem<TData>[]
|
|
80
|
+
| ((
|
|
81
|
+
defaultItems: NuGridColumnMenuItem<TData>[],
|
|
82
|
+
column?: Column<TData, unknown>,
|
|
83
|
+
) => NuGridColumnMenuItem<TData>[])
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Controls whether this column's editor is shown when the user clicks "Add New"
|
|
87
|
+
* When false, the column will be hidden in the add new row form
|
|
88
|
+
* @defaultValue true
|
|
89
|
+
*/
|
|
90
|
+
showNew?: boolean
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Controls whether this column is required when adding a new row
|
|
94
|
+
* Can be a boolean or a function that returns a boolean
|
|
95
|
+
* @defaultValue false
|
|
96
|
+
*/
|
|
97
|
+
requiredNew?: boolean | (() => boolean)
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Validation function for the new row value
|
|
101
|
+
* Called when the user attempts to add a new row with a value for this column
|
|
102
|
+
* @param value The current value being attempted by the user
|
|
103
|
+
* @returns NuGridValidationResult, boolean, or string (error message)
|
|
104
|
+
*/
|
|
105
|
+
validateNew?: (value: any) => NuGridValidationResult | boolean | string | undefined | null
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* The visual row index this column should appear on in multi-row mode
|
|
109
|
+
* Only used when `multiRow.enabled` is true on the grid
|
|
110
|
+
* Columns on the same row are rendered left-to-right in their defined order
|
|
111
|
+
* @defaultValue 0
|
|
112
|
+
*/
|
|
113
|
+
row?: number
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Number of column slots to span in aligned multi-row mode
|
|
117
|
+
* Only used when `multiRow.alignColumns` is true
|
|
118
|
+
* - Number: Span that many columns from row 0
|
|
119
|
+
* - '*': Span all remaining columns (fills to the end)
|
|
120
|
+
* @defaultValue 1
|
|
121
|
+
*/
|
|
122
|
+
span?: number | '*'
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export {}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme definition for NuGrid
|
|
3
|
+
*/
|
|
4
|
+
export interface NuGridThemeDefinition {
|
|
5
|
+
/** Unique theme identifier (used in theme prop) */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Human-readable display name */
|
|
8
|
+
displayName?: string;
|
|
9
|
+
/** Theme description */
|
|
10
|
+
description?: string;
|
|
11
|
+
/** The actual theme object (slots, variants, compoundVariants) */
|
|
12
|
+
theme: {
|
|
13
|
+
slots: Record<string, string>;
|
|
14
|
+
variants?: Record<string, any>;
|
|
15
|
+
compoundVariants?: any[];
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Theme prop type - accepts built-in theme names ('default', 'compact') or custom theme names
|
|
21
|
+
*/
|
|
22
|
+
export type NuGridTheme = 'default' | 'compact' | (string & {});
|
|
File without changes
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { TableData } from '@nuxt/ui';
|
|
2
|
+
import type { StandardSchemaV1 } from '../utils/standardSchema.js';
|
|
3
|
+
import type { NuGridRowValidationRule } from './_internal/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* When validation should run
|
|
6
|
+
* - 'change': Validate on every keystroke/change (real-time)
|
|
7
|
+
* - 'blur': Validate when the editor loses focus
|
|
8
|
+
* - 'submit': Validate only when attempting to save (Enter/Tab/Arrow keys)
|
|
9
|
+
* - 'reward': Show errors only after blur/submission (punish late),
|
|
10
|
+
* but clear errors immediately when value becomes valid (reward early).
|
|
11
|
+
* This provides a balanced UX: don't interrupt users while typing valid input,
|
|
12
|
+
* but give immediate positive feedback when correcting errors.
|
|
13
|
+
*/
|
|
14
|
+
export type NuGridValidateOn = 'change' | 'blur' | 'submit' | 'reward';
|
|
15
|
+
/**
|
|
16
|
+
* When to show validation error messages
|
|
17
|
+
* - 'never': Never show errors
|
|
18
|
+
* - 'hover': Show only while the editor is hovered
|
|
19
|
+
* - 'always': Show whenever invalid (default)
|
|
20
|
+
*/
|
|
21
|
+
export type NuGridShowErrors = 'never' | 'hover' | 'always';
|
|
22
|
+
/**
|
|
23
|
+
* What to do when validation fails and user tries to leave the editor
|
|
24
|
+
* - 'block': Prevent leaving cell until value is valid (default)
|
|
25
|
+
* - 'revert': Revert to original value and allow navigation
|
|
26
|
+
* - 'warn': Allow navigation but show warning
|
|
27
|
+
*/
|
|
28
|
+
export type NuGridOnInvalid = 'block' | 'revert' | 'warn';
|
|
29
|
+
/**
|
|
30
|
+
* Base validation configuration options
|
|
31
|
+
*/
|
|
32
|
+
interface NuGridValidationOptionsBase {
|
|
33
|
+
/**
|
|
34
|
+
* When to run validation
|
|
35
|
+
* - 'change': Validate on every keystroke (real-time)
|
|
36
|
+
* - 'blur': Validate when the editor loses focus
|
|
37
|
+
* - 'submit': Validate only when attempting to save
|
|
38
|
+
* - 'reward': Punish late (show after blur), reward early (clear when valid)
|
|
39
|
+
* @defaultValue 'reward'
|
|
40
|
+
*/
|
|
41
|
+
validateOn?: NuGridValidateOn;
|
|
42
|
+
/**
|
|
43
|
+
* When to show error messages
|
|
44
|
+
* - 'always': Show whenever invalid (default)
|
|
45
|
+
* - 'hover': Show only while the editor is hovered
|
|
46
|
+
* - 'never': Never show errors
|
|
47
|
+
* @defaultValue 'always'
|
|
48
|
+
*/
|
|
49
|
+
showErrors?: NuGridShowErrors;
|
|
50
|
+
/**
|
|
51
|
+
* What to do when validation fails and user tries to leave
|
|
52
|
+
* - 'block': Prevent leaving until valid (default)
|
|
53
|
+
* - 'revert': Revert to original value and allow navigation
|
|
54
|
+
* - 'warn': Allow navigation but show warning
|
|
55
|
+
* @defaultValue 'block'
|
|
56
|
+
*/
|
|
57
|
+
onInvalid?: NuGridOnInvalid;
|
|
58
|
+
/**
|
|
59
|
+
* Whether to validate when adding a new row
|
|
60
|
+
* @defaultValue true
|
|
61
|
+
*/
|
|
62
|
+
validateOnAddRow?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Icon name to display with error messages
|
|
65
|
+
* @defaultValue 'i-lucide-alert-circle'
|
|
66
|
+
*/
|
|
67
|
+
icon?: string;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Validation configuration options for NuGrid props
|
|
71
|
+
*/
|
|
72
|
+
export interface NuGridValidationOptions<T extends TableData = TableData> extends NuGridValidationOptionsBase {
|
|
73
|
+
/**
|
|
74
|
+
* The Standard Schema v1 validation schema
|
|
75
|
+
* @see https://standardschema.dev
|
|
76
|
+
*/
|
|
77
|
+
schema?: StandardSchemaV1<T>;
|
|
78
|
+
/**
|
|
79
|
+
* Row-level validation rules
|
|
80
|
+
* These rules validate relationships between fields in a row
|
|
81
|
+
* They run after cell-level schema validation passes
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* rowRules: [
|
|
85
|
+
* (row) => ({
|
|
86
|
+
* valid: !(row.department === 'Engineering' && row.salary < 100000),
|
|
87
|
+
* message: 'Engineering employees must have salary >= $100,000',
|
|
88
|
+
* failedFields: ['salary']
|
|
89
|
+
* })
|
|
90
|
+
* ]
|
|
91
|
+
*/
|
|
92
|
+
rowRules?: NuGridRowValidationRule<T>[];
|
|
93
|
+
}
|
|
94
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import type { TableData } from '@nuxt/ui';
|
|
2
|
+
import type { ColumnDefTemplate, StringOrTemplateHeader } from '@tanstack/vue-table';
|
|
3
|
+
import type { NuGridColumn } from '../types/column.js';
|
|
4
|
+
/**
|
|
5
|
+
* Properties for accessor columns (columns that map to a data field)
|
|
6
|
+
* Omits 'accessorKey' since it's provided separately for type safety
|
|
7
|
+
*/
|
|
8
|
+
export type AccessorColumnDef<T extends TableData, TValue = unknown> = Omit<NuGridColumn<T>, 'accessorKey' | 'accessorFn'> & {
|
|
9
|
+
/**
|
|
10
|
+
* Custom accessor function for computed values
|
|
11
|
+
* When provided, this is used instead of direct property access
|
|
12
|
+
*/
|
|
13
|
+
accessorFn?: (row: T) => TValue;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Properties for display columns (columns without data accessor)
|
|
17
|
+
* Used for action columns, custom rendered columns, etc.
|
|
18
|
+
*/
|
|
19
|
+
export type DisplayColumnDef<T extends TableData> = Omit<NuGridColumn<T>, 'accessorKey' | 'accessorFn'> & {
|
|
20
|
+
/**
|
|
21
|
+
* Unique identifier for the column (required for display columns)
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Properties for column groups
|
|
27
|
+
*/
|
|
28
|
+
export interface GroupColumnDef<T extends TableData> {
|
|
29
|
+
/**
|
|
30
|
+
* Unique identifier for the column group
|
|
31
|
+
*/
|
|
32
|
+
id: string;
|
|
33
|
+
/**
|
|
34
|
+
* Header for the column group
|
|
35
|
+
*/
|
|
36
|
+
header: StringOrTemplateHeader<T, unknown>;
|
|
37
|
+
/**
|
|
38
|
+
* Child columns in this group
|
|
39
|
+
*/
|
|
40
|
+
columns: NuGridColumn<T>[];
|
|
41
|
+
/**
|
|
42
|
+
* Optional footer for the column group
|
|
43
|
+
*/
|
|
44
|
+
footer?: ColumnDefTemplate<{
|
|
45
|
+
table: any;
|
|
46
|
+
column: any;
|
|
47
|
+
}>;
|
|
48
|
+
/**
|
|
49
|
+
* Enable resizing for the group
|
|
50
|
+
*/
|
|
51
|
+
enableResizing?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Additional metadata
|
|
54
|
+
*/
|
|
55
|
+
meta?: Record<string, unknown>;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Column helper instance with methods for creating typed columns
|
|
59
|
+
*/
|
|
60
|
+
export interface ColumnHelper<T extends TableData> {
|
|
61
|
+
/**
|
|
62
|
+
* Creates an accessor column that maps to a data field
|
|
63
|
+
*
|
|
64
|
+
* @param accessorKey - The key of the field in the data object
|
|
65
|
+
* @param column - Column configuration options
|
|
66
|
+
* @returns A fully typed NuGridColumn
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* const helper = createColumnHelper<User>()
|
|
70
|
+
*
|
|
71
|
+
* helper.accessor('name', {
|
|
72
|
+
* header: 'Full Name',
|
|
73
|
+
* size: 200,
|
|
74
|
+
* enableEditing: true,
|
|
75
|
+
* })
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* // With custom accessor function
|
|
79
|
+
* helper.accessor('fullName', {
|
|
80
|
+
* accessorFn: (row) => `${row.firstName} ${row.lastName}`,
|
|
81
|
+
* header: 'Full Name',
|
|
82
|
+
* })
|
|
83
|
+
*/
|
|
84
|
+
accessor: <TKey extends keyof T & string>(accessorKey: TKey, column?: AccessorColumnDef<T, T[TKey]>) => NuGridColumn<T>;
|
|
85
|
+
/**
|
|
86
|
+
* Creates a display column without a data accessor
|
|
87
|
+
* Used for action menus, custom buttons, or computed displays
|
|
88
|
+
*
|
|
89
|
+
* @param column - Column configuration with required 'id'
|
|
90
|
+
* @returns A fully typed NuGridColumn
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* helper.display({
|
|
94
|
+
* id: 'actions',
|
|
95
|
+
* header: '',
|
|
96
|
+
* size: 50,
|
|
97
|
+
* cellDataType: 'action-menu',
|
|
98
|
+
* enableEditing: false,
|
|
99
|
+
* enableSorting: false,
|
|
100
|
+
* })
|
|
101
|
+
*/
|
|
102
|
+
display: (column: DisplayColumnDef<T>) => NuGridColumn<T>;
|
|
103
|
+
/**
|
|
104
|
+
* Creates a column group containing multiple columns
|
|
105
|
+
*
|
|
106
|
+
* @param group - Group configuration with child columns
|
|
107
|
+
* @returns A grouped column definition
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* helper.group({
|
|
111
|
+
* id: 'contact',
|
|
112
|
+
* header: 'Contact Information',
|
|
113
|
+
* columns: [
|
|
114
|
+
* helper.accessor('email', { header: 'Email' }),
|
|
115
|
+
* helper.accessor('phone', { header: 'Phone' }),
|
|
116
|
+
* ],
|
|
117
|
+
* })
|
|
118
|
+
*/
|
|
119
|
+
group: (group: GroupColumnDef<T>) => NuGridColumn<T>;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Creates a column helper for defining NuGrid columns with full type safety
|
|
123
|
+
*
|
|
124
|
+
* Similar to TanStack Table's createColumnHelper, but extended to support
|
|
125
|
+
* NuGrid-specific features like editing, validation, lookups, and more.
|
|
126
|
+
*
|
|
127
|
+
* @returns A column helper instance with accessor, display, and group methods
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* interface User {
|
|
131
|
+
* id: number
|
|
132
|
+
* name: string
|
|
133
|
+
* email: string
|
|
134
|
+
* department: string
|
|
135
|
+
* salary: number
|
|
136
|
+
* isActive: boolean
|
|
137
|
+
* }
|
|
138
|
+
*
|
|
139
|
+
* const columnHelper = createColumnHelper<User>()
|
|
140
|
+
*
|
|
141
|
+
* const columns = [
|
|
142
|
+
* columnHelper.accessor('id', {
|
|
143
|
+
* header: 'ID',
|
|
144
|
+
* size: 60,
|
|
145
|
+
* enableEditing: false,
|
|
146
|
+
* }),
|
|
147
|
+
*
|
|
148
|
+
* columnHelper.accessor('name', {
|
|
149
|
+
* header: 'Name',
|
|
150
|
+
* size: 200,
|
|
151
|
+
* requiredNew: true,
|
|
152
|
+
* validateNew: (value) => ({
|
|
153
|
+
* valid: value.length >= 2,
|
|
154
|
+
* message: 'Name must be at least 2 characters',
|
|
155
|
+
* }),
|
|
156
|
+
* }),
|
|
157
|
+
*
|
|
158
|
+
* columnHelper.accessor('email', {
|
|
159
|
+
* header: 'Email',
|
|
160
|
+
* cellDataType: 'text',
|
|
161
|
+
* tooltipValue: (row) => `Contact: ${row.email}`,
|
|
162
|
+
* }),
|
|
163
|
+
*
|
|
164
|
+
* columnHelper.accessor('department', {
|
|
165
|
+
* header: 'Department',
|
|
166
|
+
* cellDataType: 'lookup',
|
|
167
|
+
* lookup: {
|
|
168
|
+
* items: [
|
|
169
|
+
* { value: 'engineering', label: 'Engineering' },
|
|
170
|
+
* { value: 'marketing', label: 'Marketing' },
|
|
171
|
+
* { value: 'sales', label: 'Sales' },
|
|
172
|
+
* ],
|
|
173
|
+
* },
|
|
174
|
+
* }),
|
|
175
|
+
*
|
|
176
|
+
* columnHelper.accessor('salary', {
|
|
177
|
+
* header: 'Salary',
|
|
178
|
+
* cellDataType: 'number',
|
|
179
|
+
* cell: ({ row }) => `$${row.original.salary.toLocaleString()}`,
|
|
180
|
+
* }),
|
|
181
|
+
*
|
|
182
|
+
* columnHelper.accessor('isActive', {
|
|
183
|
+
* header: 'Active',
|
|
184
|
+
* cellDataType: 'boolean',
|
|
185
|
+
* size: 80,
|
|
186
|
+
* }),
|
|
187
|
+
*
|
|
188
|
+
* columnHelper.display({
|
|
189
|
+
* id: 'actions',
|
|
190
|
+
* header: '',
|
|
191
|
+
* size: 50,
|
|
192
|
+
* cellDataType: 'action-menu',
|
|
193
|
+
* enableEditing: false,
|
|
194
|
+
* enableColumnMenu: false,
|
|
195
|
+
* }),
|
|
196
|
+
*
|
|
197
|
+
* // Column groups
|
|
198
|
+
* columnHelper.group({
|
|
199
|
+
* id: 'personalInfo',
|
|
200
|
+
* header: 'Personal Information',
|
|
201
|
+
* columns: [
|
|
202
|
+
* columnHelper.accessor('name', { header: 'Name' }),
|
|
203
|
+
* columnHelper.accessor('email', { header: 'Email' }),
|
|
204
|
+
* ],
|
|
205
|
+
* }),
|
|
206
|
+
* ]
|
|
207
|
+
*/
|
|
208
|
+
export declare function createColumnHelper<T extends TableData>(): ColumnHelper<T>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export function createColumnHelper() {
|
|
2
|
+
return {
|
|
3
|
+
accessor(accessorKey, column = {}) {
|
|
4
|
+
return {
|
|
5
|
+
accessorKey,
|
|
6
|
+
...column
|
|
7
|
+
};
|
|
8
|
+
},
|
|
9
|
+
display(column) {
|
|
10
|
+
return column;
|
|
11
|
+
},
|
|
12
|
+
group(group) {
|
|
13
|
+
return {
|
|
14
|
+
id: group.id,
|
|
15
|
+
header: group.header,
|
|
16
|
+
columns: group.columns,
|
|
17
|
+
footer: group.footer,
|
|
18
|
+
enableResizing: group.enableResizing,
|
|
19
|
+
meta: group.meta
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { Table } from '@tanstack/vue-table';
|
|
2
|
+
import type { NuGridColumn } from '../types/index.js';
|
|
3
|
+
export interface ExcelExportOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Filename for the exported file (without extension)
|
|
6
|
+
* @defaultValue 'export'
|
|
7
|
+
*/
|
|
8
|
+
filename?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Sheet name in the Excel file
|
|
11
|
+
* @defaultValue 'Sheet1'
|
|
12
|
+
*/
|
|
13
|
+
sheetName?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Whether to include column headers in the export
|
|
16
|
+
* @defaultValue true
|
|
17
|
+
*/
|
|
18
|
+
includeHeaders?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Whether to export only visible columns (respects column visibility state)
|
|
21
|
+
* @defaultValue true
|
|
22
|
+
*/
|
|
23
|
+
visibleColumnsOnly?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Custom column width overrides (column id -> width in characters)
|
|
26
|
+
*/
|
|
27
|
+
columnWidths?: Record<string, number>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Exports grid data to an Excel file
|
|
31
|
+
* Respects current grid state: column visibility, column order, sorting, and filtering
|
|
32
|
+
*/
|
|
33
|
+
export declare function exportToExcel<T>(tableApi: Table<T>, columns: NuGridColumn<T>[], options?: ExcelExportOptions): Promise<void>;
|
|
34
|
+
export interface GroupedExcelExportOptions extends ExcelExportOptions {
|
|
35
|
+
/**
|
|
36
|
+
* Whether to include group header rows
|
|
37
|
+
* @defaultValue true
|
|
38
|
+
*/
|
|
39
|
+
includeGroupHeaders?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Indent data cells under groups (number of spaces)
|
|
42
|
+
* @defaultValue 2
|
|
43
|
+
*/
|
|
44
|
+
groupIndent?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Format for group header text
|
|
47
|
+
* @defaultValue '{groupName}: {groupValue} ({count})'
|
|
48
|
+
*/
|
|
49
|
+
groupHeaderFormat?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Exports grouped grid data to an Excel file
|
|
53
|
+
* Preserves group hierarchy with group header rows
|
|
54
|
+
*/
|
|
55
|
+
export declare function exportGroupedToExcel<T>(tableApi: Table<T>, columns: NuGridColumn<T>[], options?: GroupedExcelExportOptions): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Exports data array directly to Excel (without table API)
|
|
58
|
+
*/
|
|
59
|
+
export declare function exportDataToExcel<T extends Record<string, unknown>>(data: T[], columns: Array<{
|
|
60
|
+
key: string;
|
|
61
|
+
header: string;
|
|
62
|
+
cellDataType?: string;
|
|
63
|
+
}>, options?: ExcelExportOptions): Promise<void>;
|