@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,735 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { FlexRender } from "@tanstack/vue-table";
|
|
3
|
+
import { createReusableTemplate } from "@vueuse/core";
|
|
4
|
+
import { Primitive } from "reka-ui";
|
|
5
|
+
import { upperFirst } from "scule";
|
|
6
|
+
import { computed, h, inject, toValue } from "vue";
|
|
7
|
+
import {
|
|
8
|
+
getHeaderEffectivePinning,
|
|
9
|
+
getHeaderPinningStyle,
|
|
10
|
+
resolveStyleObject,
|
|
11
|
+
resolveValue,
|
|
12
|
+
useNuGridGroupSelection
|
|
13
|
+
} from "../../composables/_internal";
|
|
14
|
+
import NuGridAddRow from "./NuGridAddRow.vue";
|
|
15
|
+
import NuGridColumnMenu from "./NuGridColumnMenu.vue";
|
|
16
|
+
import NuGridGroupCheckbox from "./NuGridGroupCheckbox.vue";
|
|
17
|
+
import NuGridHeaderSortButton from "./NuGridHeaderSortButton.vue";
|
|
18
|
+
import NuGridRow from "./NuGridRow.vue";
|
|
19
|
+
defineOptions({ inheritAttrs: false });
|
|
20
|
+
const props = defineProps({
|
|
21
|
+
ui: { type: null, required: false },
|
|
22
|
+
preset: { type: String, required: false },
|
|
23
|
+
focus: { type: Object, required: false },
|
|
24
|
+
editing: { type: Object, required: false },
|
|
25
|
+
validation: { type: [Boolean, Object], required: false },
|
|
26
|
+
selection: { type: [Boolean, String, Object], required: false },
|
|
27
|
+
actions: { type: [Boolean, Object], required: false },
|
|
28
|
+
columnDefaults: { type: Object, required: false },
|
|
29
|
+
layout: { type: Object, required: false },
|
|
30
|
+
tooltip: { type: [Boolean, Object], required: false },
|
|
31
|
+
multiRow: { type: [Boolean, Object], required: false },
|
|
32
|
+
animation: { type: [Boolean, Object], required: false },
|
|
33
|
+
paging: { type: [Boolean, Object], required: false },
|
|
34
|
+
state: { type: [Boolean, Object], required: false },
|
|
35
|
+
theme: { type: [String, Object], required: false },
|
|
36
|
+
virtualization: { type: [Boolean, Object], required: false },
|
|
37
|
+
cellTypes: { type: Array, required: false },
|
|
38
|
+
skipAutoSizeColumns: { type: Array, required: false },
|
|
39
|
+
rowDragOptions: { type: Object, required: false },
|
|
40
|
+
rowId: { type: [String, Function], required: false },
|
|
41
|
+
addNewRow: { type: [Boolean, Object], required: false },
|
|
42
|
+
as: { type: null, required: false },
|
|
43
|
+
data: { type: Array, required: false },
|
|
44
|
+
columns: { type: Array, required: false },
|
|
45
|
+
caption: { type: String, required: false },
|
|
46
|
+
meta: { type: Object, required: false },
|
|
47
|
+
empty: { type: String, required: false },
|
|
48
|
+
sticky: { type: [Boolean, String], required: false },
|
|
49
|
+
loading: { type: Boolean, required: false },
|
|
50
|
+
loadingColor: { type: null, required: false },
|
|
51
|
+
loadingAnimation: { type: null, required: false },
|
|
52
|
+
watchOptions: { type: Object, required: false },
|
|
53
|
+
globalFilterOptions: { type: Object, required: false },
|
|
54
|
+
columnFiltersOptions: { type: Object, required: false },
|
|
55
|
+
columnPinningOptions: { type: Object, required: false },
|
|
56
|
+
columnSizingOptions: { type: Object, required: false },
|
|
57
|
+
visibilityOptions: { type: Object, required: false },
|
|
58
|
+
sortingOptions: { type: Object, required: false },
|
|
59
|
+
groupingOptions: { type: Object, required: false },
|
|
60
|
+
expandedOptions: { type: Object, required: false },
|
|
61
|
+
rowSelectionOptions: { type: Object, required: false },
|
|
62
|
+
rowPinningOptions: { type: Object, required: false },
|
|
63
|
+
paginationOptions: { type: Object, required: false },
|
|
64
|
+
facetedOptions: { type: Object, required: false },
|
|
65
|
+
onSelect: { type: Function, required: false },
|
|
66
|
+
onHover: { type: Function, required: false },
|
|
67
|
+
onContextmenu: { type: [Function, Array], required: false },
|
|
68
|
+
class: { type: null, required: false },
|
|
69
|
+
onStateChange: { type: Function, required: false },
|
|
70
|
+
renderFallbackValue: { type: null, required: false },
|
|
71
|
+
_features: { type: Array, required: false },
|
|
72
|
+
autoResetAll: { type: Boolean, required: false },
|
|
73
|
+
debugAll: { type: Boolean, required: false },
|
|
74
|
+
debugCells: { type: Boolean, required: false },
|
|
75
|
+
debugColumns: { type: Boolean, required: false },
|
|
76
|
+
debugHeaders: { type: Boolean, required: false },
|
|
77
|
+
debugRows: { type: Boolean, required: false },
|
|
78
|
+
debugTable: { type: Boolean, required: false },
|
|
79
|
+
defaultColumn: { type: Object, required: false },
|
|
80
|
+
getRowId: { type: Function, required: false },
|
|
81
|
+
getSubRows: { type: Function, required: false },
|
|
82
|
+
initialState: { type: Object, required: false },
|
|
83
|
+
mergeOptions: { type: Function, required: false }
|
|
84
|
+
});
|
|
85
|
+
const slots = defineSlots();
|
|
86
|
+
const coreContext = inject("nugrid-core");
|
|
87
|
+
const dragContext = inject("nugrid-drag");
|
|
88
|
+
const resizeContext = inject("nugrid-resize");
|
|
89
|
+
const virtualizationContext = inject("nugrid-virtualization");
|
|
90
|
+
const groupingContext = inject("nugrid-grouping");
|
|
91
|
+
const performanceContext = inject("nugrid-performance");
|
|
92
|
+
const uiConfigContext = inject("nugrid-ui-config");
|
|
93
|
+
const addRowContext = inject("nugrid-add-row");
|
|
94
|
+
if (!coreContext || !dragContext || !resizeContext || !virtualizationContext || !groupingContext || !performanceContext || !uiConfigContext || !addRowContext) {
|
|
95
|
+
throw new Error("NuGridSplitGroup must be used within a NuGrid component.");
|
|
96
|
+
}
|
|
97
|
+
const { tableRef, rootRef, tableApi, ui, hasFooter, propsUi } = coreContext;
|
|
98
|
+
const { dragFns, rowDragOptions } = dragContext;
|
|
99
|
+
const { handleGroupResizeStart, resizingGroupId, resizingColumnId } = resizeContext;
|
|
100
|
+
const { stickyEnabled } = virtualizationContext;
|
|
101
|
+
const { groupingFns } = groupingContext;
|
|
102
|
+
const { headerGroupsLength } = performanceContext;
|
|
103
|
+
const {
|
|
104
|
+
sortIcons: gridSortIcons,
|
|
105
|
+
scrollbarClass,
|
|
106
|
+
scrollbarThemeClass,
|
|
107
|
+
scrollbarAttr
|
|
108
|
+
} = uiConfigContext;
|
|
109
|
+
const [DefineTableTemplate, ReuseNuGridTemplate] = createReusableTemplate({ inheritAttrs: false });
|
|
110
|
+
const [DefineGroupHeaderTemplate, ReuseGroupHeaderTemplate] = createReusableTemplate({ inheritAttrs: false });
|
|
111
|
+
const [DefineHeaderCellTemplate, ReuseHeaderCellTemplate] = createReusableTemplate({ inheritAttrs: false });
|
|
112
|
+
const [DefineFooterCellTemplate, ReuseFooterCellTemplate] = createReusableTemplate({ inheritAttrs: false });
|
|
113
|
+
if (!groupingFns) {
|
|
114
|
+
throw new Error(
|
|
115
|
+
'NuGridSplitGroup requires groupingFns from context. Ensure gridMode="group" is set on NuGrid.'
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
const {
|
|
119
|
+
groupRows,
|
|
120
|
+
groupedRows,
|
|
121
|
+
virtualRowItems,
|
|
122
|
+
virtualizer,
|
|
123
|
+
virtualizationEnabled,
|
|
124
|
+
toggleGroup,
|
|
125
|
+
isGroupExpanded,
|
|
126
|
+
getVirtualItemHeight,
|
|
127
|
+
stickyOffsets
|
|
128
|
+
} = groupingFns;
|
|
129
|
+
const dynamicRowHeightsEnabled = computed(() => {
|
|
130
|
+
if (!virtualizer || !virtualizer.value.dynamicRowHeightsEnabled) {
|
|
131
|
+
return false;
|
|
132
|
+
}
|
|
133
|
+
return !!virtualizer.value.dynamicRowHeightsEnabled.value;
|
|
134
|
+
});
|
|
135
|
+
const { toggleAllGroupRows, getGroupCheckboxState } = useNuGridGroupSelection(tableApi, groupedRows);
|
|
136
|
+
function renderGroupSelectHeader(header, groupId) {
|
|
137
|
+
if (header.column.id !== "__selection") {
|
|
138
|
+
if (typeof header.column.columnDef.header === "function") {
|
|
139
|
+
const rendered = header.column.columnDef.header(header.getContext());
|
|
140
|
+
if (rendered === "" || rendered === void 0 || rendered === null) {
|
|
141
|
+
return h("span");
|
|
142
|
+
}
|
|
143
|
+
return typeof rendered === "string" ? h("span", {}, rendered) : rendered;
|
|
144
|
+
}
|
|
145
|
+
if (typeof header.column.columnDef.header === "string") {
|
|
146
|
+
return h("span", {}, header.column.columnDef.header);
|
|
147
|
+
}
|
|
148
|
+
return h("span");
|
|
149
|
+
}
|
|
150
|
+
return h(NuGridGroupCheckbox, {
|
|
151
|
+
"modelValue": getGroupCheckboxState(groupId),
|
|
152
|
+
"onUpdate:modelValue": (value) => {
|
|
153
|
+
toggleAllGroupRows(groupId, !!value);
|
|
154
|
+
},
|
|
155
|
+
"ariaLabel": `Select all in group ${groupId}`
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
function virtStyle(virtualRow) {
|
|
159
|
+
const item = virtualRowItems.value[virtualRow.index];
|
|
160
|
+
const useDynamicHeight = dynamicRowHeightsEnabled.value;
|
|
161
|
+
const stickyTop = stickyOffsets.value.get(virtualRow.index);
|
|
162
|
+
const resolvedHeight = getVirtualItemHeight(virtualRow.index);
|
|
163
|
+
if (stickyEnabled.value && (item?.type === "group-header" || item?.type === "column-headers")) {
|
|
164
|
+
if (stickyTop !== void 0) {
|
|
165
|
+
return {
|
|
166
|
+
position: "sticky",
|
|
167
|
+
top: `${stickyTop}px`,
|
|
168
|
+
left: 0,
|
|
169
|
+
width: "100%",
|
|
170
|
+
zIndex: 10,
|
|
171
|
+
...useDynamicHeight ? {} : { height: `${resolvedHeight}px` },
|
|
172
|
+
backgroundColor: "var(--ui-bg)"
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
return {
|
|
176
|
+
position: "absolute",
|
|
177
|
+
top: 0,
|
|
178
|
+
width: "100%",
|
|
179
|
+
zIndex: 40,
|
|
180
|
+
...useDynamicHeight ? {} : { height: `${resolvedHeight}px` },
|
|
181
|
+
transform: `translateY(${virtualRow.start}px)`,
|
|
182
|
+
backgroundColor: "var(--ui-bg)"
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
return {
|
|
186
|
+
position: "absolute",
|
|
187
|
+
top: 0,
|
|
188
|
+
width: "100%",
|
|
189
|
+
...useDynamicHeight ? {} : { height: `${resolvedHeight}px` },
|
|
190
|
+
transform: `translateY(${virtualRow.start}px)`
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
function measureElementRef(el) {
|
|
194
|
+
if (el && virtualizer && virtualizer.value.dynamicRowHeightsEnabled.value) {
|
|
195
|
+
virtualizer.value.measureElement(el);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
</script>
|
|
199
|
+
|
|
200
|
+
<template>
|
|
201
|
+
<!-- Reusable Group Header Template -->
|
|
202
|
+
<DefineGroupHeaderTemplate v-slot="{ groupId, groupRow, itemCount, depth = 0 }">
|
|
203
|
+
<div
|
|
204
|
+
:data-group-header="groupId"
|
|
205
|
+
:class="ui.groupHeader({ class: [propsUi?.groupHeader] })"
|
|
206
|
+
:style="{ width: `${tableApi.getTotalSize()}px` }"
|
|
207
|
+
@click="toggleGroup(groupId)"
|
|
208
|
+
>
|
|
209
|
+
<!-- Fixed left part (doesn't scroll horizontally) -->
|
|
210
|
+
<div
|
|
211
|
+
:class="[
|
|
212
|
+
ui.groupHeaderLeft({ class: [propsUi?.groupHeaderLeft] }),
|
|
213
|
+
ui.td({ class: [propsUi?.td] })
|
|
214
|
+
]"
|
|
215
|
+
:style="{ paddingLeft: depth > 0 ? `${depth * 24}px` : void 0 }"
|
|
216
|
+
>
|
|
217
|
+
<UIcon
|
|
218
|
+
:name="isGroupExpanded(groupId) ? 'i-lucide-chevron-down' : 'i-lucide-chevron-right'"
|
|
219
|
+
:class="ui.groupIcon({ class: [propsUi?.groupIcon] })"
|
|
220
|
+
/>
|
|
221
|
+
<template v-if="groupRow?.groupingColumnId">
|
|
222
|
+
<span :class="ui.groupLabel({ class: [propsUi?.groupLabel] })">
|
|
223
|
+
{{ upperFirst(groupRow.groupingColumnId) }}:
|
|
224
|
+
</span>
|
|
225
|
+
<span class="text-base font-semibold">
|
|
226
|
+
{{ groupRow.getGroupingValue(groupRow.groupingColumnId) }}
|
|
227
|
+
</span>
|
|
228
|
+
</template>
|
|
229
|
+
<span :class="ui.groupLabel({ class: [propsUi?.groupLabel] })">
|
|
230
|
+
({{ itemCount }} items)
|
|
231
|
+
</span>
|
|
232
|
+
</div>
|
|
233
|
+
<!-- Spacer that scrolls (optional, for visual continuity) -->
|
|
234
|
+
<div :class="ui.groupHeaderSpacer({ class: [propsUi?.groupHeaderSpacer] })" />
|
|
235
|
+
</div>
|
|
236
|
+
</DefineGroupHeaderTemplate>
|
|
237
|
+
|
|
238
|
+
<!-- Reusable Header Cell Template -->
|
|
239
|
+
<DefineHeaderCellTemplate v-slot="{ header, groupId, isExpanded, rowIndex }">
|
|
240
|
+
<div
|
|
241
|
+
:data-column-id="header.column.id"
|
|
242
|
+
:data-pinned="header.column.getIsPinned()"
|
|
243
|
+
:data-dragging="toValue(dragFns.draggedColumnId) === header.column.id"
|
|
244
|
+
:data-drop-target="toValue(dragFns.dropTargetColumnId) === header.column.id"
|
|
245
|
+
:data-drop-position="
|
|
246
|
+
toValue(dragFns.dropTargetColumnId) === header.column.id ? toValue(dragFns.dropPosition) : void 0
|
|
247
|
+
"
|
|
248
|
+
:class="[
|
|
249
|
+
ui.th({
|
|
250
|
+
class: [propsUi?.th, resolveValue(header.column.columnDef.meta?.class?.th, header)],
|
|
251
|
+
pinned: !!getHeaderEffectivePinning(header),
|
|
252
|
+
colDragging: toValue(dragFns.draggedColumnId) === header.column.id,
|
|
253
|
+
colDropTarget: toValue(dragFns.dropTargetColumnId) === header.column.id
|
|
254
|
+
})
|
|
255
|
+
]"
|
|
256
|
+
:style="{
|
|
257
|
+
...resolveStyleObject(header.column.columnDef.meta?.style?.th, header),
|
|
258
|
+
// Use header.getSize() for all headers - it returns the sum of leaf column widths for group headers
|
|
259
|
+
width: `${header.getSize()}px`,
|
|
260
|
+
minWidth: `${header.getSize()}px`,
|
|
261
|
+
maxWidth: `${header.getSize()}px`,
|
|
262
|
+
...getHeaderPinningStyle(header, { includeZIndex: isExpanded }),
|
|
263
|
+
...isExpanded && header.rowSpan > 1 ? { alignSelf: 'stretch' } : {}
|
|
264
|
+
}"
|
|
265
|
+
@dragover="
|
|
266
|
+
(e) => dragFns.isHeaderDraggable(header) && dragFns.handleColumnDragOver(e, header.column.id)
|
|
267
|
+
"
|
|
268
|
+
@dragenter="dragFns.handleColumnDragEnter"
|
|
269
|
+
@drop="
|
|
270
|
+
(e) => dragFns.isHeaderDraggable(header) && dragFns.handleColumnDrop(e, header.column.id)
|
|
271
|
+
"
|
|
272
|
+
@dragend="dragFns.handleColumnDragEnd"
|
|
273
|
+
@dragleave="dragFns.handleColumnDragLeave"
|
|
274
|
+
>
|
|
275
|
+
<div :class="ui.headerContainer({ class: [propsUi?.headerContainer] })">
|
|
276
|
+
<div
|
|
277
|
+
:draggable="dragFns.isHeaderDraggable(header)"
|
|
278
|
+
:class="
|
|
279
|
+
ui.thInner({
|
|
280
|
+
class: [propsUi?.thInner],
|
|
281
|
+
colDraggable: dragFns.isHeaderDraggable(header)
|
|
282
|
+
})
|
|
283
|
+
"
|
|
284
|
+
@dragstart="
|
|
285
|
+
(e) => dragFns.isHeaderDraggable(header) && dragFns.handleColumnDragStart(e, header.column.id)
|
|
286
|
+
"
|
|
287
|
+
>
|
|
288
|
+
<slot :name="`${header.id}-header`" v-bind="header.getContext()">
|
|
289
|
+
<component
|
|
290
|
+
:is="header.isPlaceholder ? 'span' : renderGroupSelectHeader(header, groupId)"
|
|
291
|
+
/>
|
|
292
|
+
</slot>
|
|
293
|
+
<NuGridHeaderSortButton
|
|
294
|
+
v-if="
|
|
295
|
+
(header.column.columnDef.sortIcons?.position ?? gridSortIcons?.position ?? 'edge') === 'inline'
|
|
296
|
+
"
|
|
297
|
+
:header="header"
|
|
298
|
+
:sort-icons="header.column.columnDef.sortIcons"
|
|
299
|
+
/>
|
|
300
|
+
</div>
|
|
301
|
+
<NuGridHeaderSortButton
|
|
302
|
+
v-if="
|
|
303
|
+
(header.column.columnDef.sortIcons?.position ?? gridSortIcons?.position ?? 'edge') === 'edge'
|
|
304
|
+
"
|
|
305
|
+
:header="header"
|
|
306
|
+
:sort-icons="header.column.columnDef.sortIcons"
|
|
307
|
+
/>
|
|
308
|
+
<NuGridColumnMenu
|
|
309
|
+
v-if="header.colSpan === 1 && rowIndex === headerGroupsLength - 1"
|
|
310
|
+
:header="header"
|
|
311
|
+
/>
|
|
312
|
+
|
|
313
|
+
<!-- Column resize handle (works for both regular columns and column groups) -->
|
|
314
|
+
<div
|
|
315
|
+
v-if="header.column.getCanResize() || header.colSpan > 1"
|
|
316
|
+
:class="
|
|
317
|
+
ui.colResizeHandle({
|
|
318
|
+
class: [propsUi?.colResizeHandle],
|
|
319
|
+
colResizing: header.colSpan > 1 ? resizingGroupId === header.id : resizingColumnId === header.column.id || header.column.getIsResizing()
|
|
320
|
+
})
|
|
321
|
+
"
|
|
322
|
+
:data-col-resizing="
|
|
323
|
+
header.colSpan > 1 ? resizingGroupId === header.id : resizingColumnId === header.column.id || header.column.getIsResizing() ? 'true' : void 0
|
|
324
|
+
"
|
|
325
|
+
@mousedown="handleGroupResizeStart($event, header)"
|
|
326
|
+
@touchstart.passive="handleGroupResizeStart($event, header)"
|
|
327
|
+
>
|
|
328
|
+
<div
|
|
329
|
+
:class="
|
|
330
|
+
ui.colResizer({
|
|
331
|
+
class: [propsUi?.colResizer],
|
|
332
|
+
colResizing: header.colSpan > 1 ? resizingGroupId === header.id : resizingColumnId === header.column.id || header.column.getIsResizing()
|
|
333
|
+
})
|
|
334
|
+
"
|
|
335
|
+
:data-col-resizing="
|
|
336
|
+
header.colSpan > 1 ? resizingGroupId === header.id : resizingColumnId === header.column.id || header.column.getIsResizing() ? 'true' : void 0
|
|
337
|
+
"
|
|
338
|
+
/>
|
|
339
|
+
</div>
|
|
340
|
+
</div>
|
|
341
|
+
</div>
|
|
342
|
+
</DefineHeaderCellTemplate>
|
|
343
|
+
|
|
344
|
+
<!-- Reusable Footer Cell Template -->
|
|
345
|
+
<DefineFooterCellTemplate v-slot="{ header, index, isExpanded }">
|
|
346
|
+
<div
|
|
347
|
+
:data-pinned="header.column.getIsPinned()"
|
|
348
|
+
:class="[
|
|
349
|
+
ui.collapsedHeaderCell({ class: [propsUi?.collapsedHeaderCell] }),
|
|
350
|
+
ui.td({ class: [propsUi?.td], pinned: !!header.column.getIsPinned() })
|
|
351
|
+
]"
|
|
352
|
+
:style="{
|
|
353
|
+
width: `${header.getSize()}px`,
|
|
354
|
+
minWidth: `${header.getSize()}px`,
|
|
355
|
+
maxWidth: `${header.getSize()}px`,
|
|
356
|
+
...header.column.getIsPinned() === 'left' ? { left: `${header.column.getStart('left')}px` } : {},
|
|
357
|
+
...header.column.getIsPinned() === 'right' ? { right: `${header.column.getAfter('right')}px` } : {}
|
|
358
|
+
}"
|
|
359
|
+
>
|
|
360
|
+
<!-- Collapsed state: show summary with Σ column.id -->
|
|
361
|
+
<div v-if="!isExpanded" :class="ui.collapsedText({ class: [propsUi?.collapsedText] })">
|
|
362
|
+
<template v-if="index === 0"> Summary </template>
|
|
363
|
+
<template v-else> Σ {{ header.column.id }} </template>
|
|
364
|
+
</div>
|
|
365
|
+
<!-- Expanded state: show actual footer content -->
|
|
366
|
+
<div v-else :class="ui.expandedText({ class: [propsUi?.expandedText] })">
|
|
367
|
+
<slot :name="`${header.id}-footer`" v-bind="header.getContext()">
|
|
368
|
+
<FlexRender
|
|
369
|
+
v-if="!header.isPlaceholder && header.column.columnDef.footer"
|
|
370
|
+
:render="header.column.columnDef.footer"
|
|
371
|
+
:props="header.getContext()"
|
|
372
|
+
/>
|
|
373
|
+
<template v-else-if="index === 0">
|
|
374
|
+
<span class="italic">Summary</span>
|
|
375
|
+
</template>
|
|
376
|
+
</slot>
|
|
377
|
+
</div>
|
|
378
|
+
</div>
|
|
379
|
+
</DefineFooterCellTemplate>
|
|
380
|
+
|
|
381
|
+
<DefineTableTemplate>
|
|
382
|
+
<div ref="tableRef" :class="ui.base({ class: [propsUi?.base] })">
|
|
383
|
+
<div v-if="caption || !!slots.caption" :class="ui.caption({ class: [propsUi?.caption] })">
|
|
384
|
+
<slot name="caption">
|
|
385
|
+
{{ caption }}
|
|
386
|
+
</slot>
|
|
387
|
+
</div>
|
|
388
|
+
|
|
389
|
+
<!-- Top-level headers are not shown since we show them inside each group -->
|
|
390
|
+
|
|
391
|
+
<div
|
|
392
|
+
data-tbody
|
|
393
|
+
:class="ui.tbody({ class: [propsUi?.tbody] })"
|
|
394
|
+
:style="
|
|
395
|
+
virtualizationEnabled && virtualizer ? {
|
|
396
|
+
height: `${virtualizer.getTotalSize()}px`,
|
|
397
|
+
position: 'relative'
|
|
398
|
+
} : void 0
|
|
399
|
+
"
|
|
400
|
+
>
|
|
401
|
+
<slot name="body-top" />
|
|
402
|
+
|
|
403
|
+
<template v-if="groupRows.length">
|
|
404
|
+
<!-- Virtualized rendering -->
|
|
405
|
+
<template v-if="virtualizationEnabled && virtualizer">
|
|
406
|
+
<template v-for="virtualRow in virtualizer.getVirtualItems()" :key="virtualRow.index">
|
|
407
|
+
<div
|
|
408
|
+
:ref="
|
|
409
|
+
virtualizer && virtualizer.dynamicRowHeightsEnabled.value ? measureElementRef : void 0
|
|
410
|
+
"
|
|
411
|
+
:data-index="virtualRow.index"
|
|
412
|
+
:style="virtStyle(virtualRow)"
|
|
413
|
+
>
|
|
414
|
+
<template v-if="virtualRowItems[virtualRow.index]">
|
|
415
|
+
<!-- Group Header -->
|
|
416
|
+
<ReuseGroupHeaderTemplate
|
|
417
|
+
v-if="virtualRowItems[virtualRow.index]?.type === 'group-header'"
|
|
418
|
+
:group-id="virtualRowItems[virtualRow.index]?.groupId"
|
|
419
|
+
:group-row="virtualRowItems[virtualRow.index]?.groupRow"
|
|
420
|
+
:item-count="
|
|
421
|
+
groupedRows[virtualRowItems[virtualRow.index]?.groupId]?.filter(
|
|
422
|
+
(row) => !addRowContext.isAddRowRow(row)
|
|
423
|
+
).length || 0
|
|
424
|
+
"
|
|
425
|
+
:depth="virtualRowItems[virtualRow.index]?.depth ?? 0"
|
|
426
|
+
/>
|
|
427
|
+
|
|
428
|
+
<!-- Column Headers -->
|
|
429
|
+
<template
|
|
430
|
+
v-else-if="virtualRowItems[virtualRow.index]?.type === 'column-headers'"
|
|
431
|
+
>
|
|
432
|
+
<!-- Collapsed state -->
|
|
433
|
+
<div
|
|
434
|
+
v-if="!isGroupExpanded(virtualRowItems[virtualRow.index]?.groupId)"
|
|
435
|
+
:class="ui.thead({ class: [propsUi?.thead, 'border-t-0 border-b-0'] })"
|
|
436
|
+
:data-sticky-header="stickyEnabled ? 'true' : void 0"
|
|
437
|
+
>
|
|
438
|
+
<div :class="ui.tr({ class: propsUi?.tr })">
|
|
439
|
+
<!-- Drag handle header placeholder -->
|
|
440
|
+
<div
|
|
441
|
+
v-if="rowDragOptions.enabled"
|
|
442
|
+
:class="[
|
|
443
|
+
'w-10 max-w-10 min-w-10 shrink-0',
|
|
444
|
+
ui.th({ class: [propsUi?.th] })
|
|
445
|
+
]"
|
|
446
|
+
/>
|
|
447
|
+
<ReuseHeaderCellTemplate
|
|
448
|
+
v-for="header in tableApi.getHeaderGroups()[tableApi.getHeaderGroups().length - 1]?.headers || []"
|
|
449
|
+
:key="header.id"
|
|
450
|
+
:header="header"
|
|
451
|
+
:group-id="virtualRowItems[virtualRow.index]?.groupId"
|
|
452
|
+
:is-expanded="false"
|
|
453
|
+
:row-index="tableApi.getHeaderGroups().length - 1"
|
|
454
|
+
/>
|
|
455
|
+
</div>
|
|
456
|
+
</div>
|
|
457
|
+
|
|
458
|
+
<!-- Expanded state -->
|
|
459
|
+
<div
|
|
460
|
+
v-else
|
|
461
|
+
:class="ui.thead({ class: [propsUi?.thead, 'border-t-0'] })"
|
|
462
|
+
:data-sticky-header="stickyEnabled ? 'true' : void 0"
|
|
463
|
+
>
|
|
464
|
+
<div
|
|
465
|
+
v-for="(headerGroup, rowIndex) in tableApi.getHeaderGroups()"
|
|
466
|
+
:key="headerGroup.id"
|
|
467
|
+
:class="ui.tr({ class: propsUi?.tr })"
|
|
468
|
+
>
|
|
469
|
+
<!-- Drag handle header placeholder -->
|
|
470
|
+
<div
|
|
471
|
+
v-if="rowDragOptions.enabled"
|
|
472
|
+
:class="[
|
|
473
|
+
'w-10 max-w-10 min-w-10 shrink-0',
|
|
474
|
+
ui.th({ class: [propsUi?.th] })
|
|
475
|
+
]"
|
|
476
|
+
/>
|
|
477
|
+
<ReuseHeaderCellTemplate
|
|
478
|
+
v-for="header in headerGroup.headers"
|
|
479
|
+
:key="header.id"
|
|
480
|
+
:header="header"
|
|
481
|
+
:group-id="virtualRowItems[virtualRow.index]?.groupId"
|
|
482
|
+
:is-expanded="true"
|
|
483
|
+
:row-index="rowIndex"
|
|
484
|
+
/>
|
|
485
|
+
</div>
|
|
486
|
+
</div>
|
|
487
|
+
</template>
|
|
488
|
+
|
|
489
|
+
<!-- Data Row -->
|
|
490
|
+
<component
|
|
491
|
+
:is="
|
|
492
|
+
addRowContext.isAddRowRow(virtualRowItems[virtualRow.index]?.dataRow) ? NuGridAddRow : NuGridRow
|
|
493
|
+
"
|
|
494
|
+
v-else-if="
|
|
495
|
+
virtualRowItems[virtualRow.index]?.type === 'data' && virtualRowItems[virtualRow.index]?.dataRow
|
|
496
|
+
"
|
|
497
|
+
:row="virtualRowItems[virtualRow.index]?.dataRow"
|
|
498
|
+
/>
|
|
499
|
+
|
|
500
|
+
<!-- Footer Row -->
|
|
501
|
+
<div
|
|
502
|
+
v-else-if="virtualRowItems[virtualRow.index]?.type === 'footer'"
|
|
503
|
+
:class="
|
|
504
|
+
ui.tr({
|
|
505
|
+
class: [
|
|
506
|
+
propsUi?.tr,
|
|
507
|
+
'bg-elevated/20',
|
|
508
|
+
!isGroupExpanded(virtualRowItems[virtualRow.index]?.groupId) ? 'border-t-0' : 'border-t border-default'
|
|
509
|
+
]
|
|
510
|
+
})
|
|
511
|
+
"
|
|
512
|
+
>
|
|
513
|
+
<ReuseFooterCellTemplate
|
|
514
|
+
v-for="(header, index) in tableApi.getHeaderGroups()[tableApi.getHeaderGroups().length - 1]?.headers || []"
|
|
515
|
+
:key="index"
|
|
516
|
+
:header="header"
|
|
517
|
+
:index="index"
|
|
518
|
+
:is-expanded="isGroupExpanded(virtualRowItems[virtualRow.index]?.groupId)"
|
|
519
|
+
/>
|
|
520
|
+
</div>
|
|
521
|
+
</template>
|
|
522
|
+
</div>
|
|
523
|
+
</template>
|
|
524
|
+
</template>
|
|
525
|
+
|
|
526
|
+
<!-- Non-virtualized rendering (existing logic) -->
|
|
527
|
+
<template v-else>
|
|
528
|
+
<template v-for="item in virtualRowItems" :key="item.index">
|
|
529
|
+
<!-- Group Header -->
|
|
530
|
+
<template v-if="item.type === 'group-header'">
|
|
531
|
+
<div :class="['flex flex-col']">
|
|
532
|
+
<!-- Combined sticky container for group header and column headers -->
|
|
533
|
+
<div
|
|
534
|
+
:class="[
|
|
535
|
+
stickyEnabled ? ui.stickyGroupHeader({ class: [propsUi?.stickyGroupHeader] }) : 'bg-default'
|
|
536
|
+
]"
|
|
537
|
+
>
|
|
538
|
+
<!-- Group Header Row with fixed left side -->
|
|
539
|
+
<ReuseGroupHeaderTemplate
|
|
540
|
+
:group-id="item.groupId"
|
|
541
|
+
:group-row="item.groupRow"
|
|
542
|
+
:item-count="
|
|
543
|
+
groupedRows[item.groupId]?.filter((row) => !addRowContext.isAddRowRow(row)).length || 0
|
|
544
|
+
"
|
|
545
|
+
:depth="item.depth ?? 0"
|
|
546
|
+
/>
|
|
547
|
+
<!-- Collapsed state -->
|
|
548
|
+
<template v-if="!isGroupExpanded(item.groupId)">
|
|
549
|
+
<div
|
|
550
|
+
:class="ui.thead({ class: [propsUi?.thead, 'border-t-0 border-b-0'] })"
|
|
551
|
+
:data-sticky-header="stickyEnabled ? 'true' : void 0"
|
|
552
|
+
>
|
|
553
|
+
<div :class="ui.tr({ class: propsUi?.tr })">
|
|
554
|
+
<!-- Drag handle header placeholder -->
|
|
555
|
+
<div
|
|
556
|
+
v-if="rowDragOptions.enabled"
|
|
557
|
+
:class="[
|
|
558
|
+
'w-10 max-w-10 min-w-10 shrink-0',
|
|
559
|
+
ui.th({ class: [propsUi?.th] })
|
|
560
|
+
]"
|
|
561
|
+
/>
|
|
562
|
+
<ReuseHeaderCellTemplate
|
|
563
|
+
v-for="header in tableApi.getHeaderGroups()[tableApi.getHeaderGroups().length - 1]?.headers || []"
|
|
564
|
+
:key="header.id"
|
|
565
|
+
:header="header"
|
|
566
|
+
:group-id="item.groupId"
|
|
567
|
+
:is-expanded="false"
|
|
568
|
+
:row-index="tableApi.getHeaderGroups().length - 1"
|
|
569
|
+
/>
|
|
570
|
+
</div>
|
|
571
|
+
</div>
|
|
572
|
+
</template>
|
|
573
|
+
|
|
574
|
+
<!-- Expanded state -->
|
|
575
|
+
<template v-else>
|
|
576
|
+
<div
|
|
577
|
+
:class="ui.thead({ class: [propsUi?.thead, 'border-t-0'] })"
|
|
578
|
+
:data-sticky-header="stickyEnabled ? 'true' : void 0"
|
|
579
|
+
>
|
|
580
|
+
<div
|
|
581
|
+
v-for="(headerGroup, rowIndex) in tableApi.getHeaderGroups()"
|
|
582
|
+
:key="headerGroup.id"
|
|
583
|
+
:class="ui.tr({ class: propsUi?.tr })"
|
|
584
|
+
>
|
|
585
|
+
<!-- Drag handle header placeholder -->
|
|
586
|
+
<div
|
|
587
|
+
v-if="rowDragOptions.enabled"
|
|
588
|
+
:class="[
|
|
589
|
+
'w-10 max-w-10 min-w-10 shrink-0',
|
|
590
|
+
ui.th({ class: [propsUi?.th] })
|
|
591
|
+
]"
|
|
592
|
+
/>
|
|
593
|
+
<ReuseHeaderCellTemplate
|
|
594
|
+
v-for="header in headerGroup.headers"
|
|
595
|
+
:key="header.id"
|
|
596
|
+
:header="header"
|
|
597
|
+
:group-id="item.groupId"
|
|
598
|
+
:is-expanded="true"
|
|
599
|
+
:row-index="rowIndex"
|
|
600
|
+
/>
|
|
601
|
+
</div>
|
|
602
|
+
</div>
|
|
603
|
+
</template>
|
|
604
|
+
</div>
|
|
605
|
+
|
|
606
|
+
<!-- Collapsed state summary row -->
|
|
607
|
+
<div
|
|
608
|
+
v-if="!isGroupExpanded(item.groupId)"
|
|
609
|
+
:class="ui.tr({ class: [propsUi?.tr, 'bg-elevated/20 border-t-0'] })"
|
|
610
|
+
>
|
|
611
|
+
<ReuseFooterCellTemplate
|
|
612
|
+
v-for="(header, index) in tableApi.getHeaderGroups()[tableApi.getHeaderGroups().length - 1]?.headers || []"
|
|
613
|
+
:key="index"
|
|
614
|
+
:header="header"
|
|
615
|
+
:index="index"
|
|
616
|
+
:is-expanded="false"
|
|
617
|
+
/>
|
|
618
|
+
</div>
|
|
619
|
+
|
|
620
|
+
<!-- Data rows and nested groups are handled by virtualRowItems iteration -->
|
|
621
|
+
<!-- Footer is rendered separately when we encounter footer items -->
|
|
622
|
+
</div>
|
|
623
|
+
</template>
|
|
624
|
+
|
|
625
|
+
<!-- Data Row -->
|
|
626
|
+
<template v-else-if="item.type === 'data' && item.dataRow">
|
|
627
|
+
<component
|
|
628
|
+
:is="addRowContext.isAddRowRow(item.dataRow) ? NuGridAddRow : NuGridRow"
|
|
629
|
+
:row="item.dataRow"
|
|
630
|
+
/>
|
|
631
|
+
</template>
|
|
632
|
+
|
|
633
|
+
<!-- Footer Row -->
|
|
634
|
+
<template v-else-if="item.type === 'footer'">
|
|
635
|
+
<div
|
|
636
|
+
:class="
|
|
637
|
+
ui.tr({
|
|
638
|
+
class: [
|
|
639
|
+
propsUi?.tr,
|
|
640
|
+
'bg-elevated/20',
|
|
641
|
+
!isGroupExpanded(item.groupId) ? 'border-t-0' : 'border-t border-default'
|
|
642
|
+
]
|
|
643
|
+
})
|
|
644
|
+
"
|
|
645
|
+
>
|
|
646
|
+
<ReuseFooterCellTemplate
|
|
647
|
+
v-for="(header, index) in tableApi.getHeaderGroups()[tableApi.getHeaderGroups().length - 1]?.headers || []"
|
|
648
|
+
:key="index"
|
|
649
|
+
:header="header"
|
|
650
|
+
:index="index"
|
|
651
|
+
:is-expanded="isGroupExpanded(item.groupId)"
|
|
652
|
+
/>
|
|
653
|
+
</div>
|
|
654
|
+
</template>
|
|
655
|
+
</template>
|
|
656
|
+
</template>
|
|
657
|
+
</template>
|
|
658
|
+
|
|
659
|
+
<div v-else-if="loading && !!slots.loading" :class="ui.tr({ class: propsUi?.tr })">
|
|
660
|
+
<div :class="ui.loading({ class: propsUi?.loading })">
|
|
661
|
+
<slot name="loading" />
|
|
662
|
+
</div>
|
|
663
|
+
</div>
|
|
664
|
+
|
|
665
|
+
<div v-else :class="ui.tr({ class: propsUi?.tr })">
|
|
666
|
+
<div :class="ui.empty({ class: propsUi?.empty })">
|
|
667
|
+
<slot name="empty">
|
|
668
|
+
{{ empty || "No data available." }}
|
|
669
|
+
</slot>
|
|
670
|
+
</div>
|
|
671
|
+
</div>
|
|
672
|
+
|
|
673
|
+
<slot name="body-bottom" />
|
|
674
|
+
</div>
|
|
675
|
+
|
|
676
|
+
<div
|
|
677
|
+
v-if="hasFooter && groupRows.length === 0"
|
|
678
|
+
:class="ui.tfoot({ class: [propsUi?.tfoot] })"
|
|
679
|
+
:style="
|
|
680
|
+
virtualizationEnabled && virtualizer ? {
|
|
681
|
+
transform: `translateY(${virtualizer.getTotalSize() - virtualizer.getVirtualItems().length * (virtualizer.props.value.estimateSize ?? 0)}px)`
|
|
682
|
+
} : void 0
|
|
683
|
+
"
|
|
684
|
+
>
|
|
685
|
+
<div :class="ui.separator({ class: [propsUi?.separator] })" />
|
|
686
|
+
|
|
687
|
+
<div
|
|
688
|
+
v-for="footerGroup in tableApi.getFooterGroups()"
|
|
689
|
+
:key="footerGroup.id"
|
|
690
|
+
:class="ui.tr({ class: [propsUi?.tr] })"
|
|
691
|
+
>
|
|
692
|
+
<div
|
|
693
|
+
v-for="header in footerGroup.headers"
|
|
694
|
+
:key="header.id"
|
|
695
|
+
:data-pinned="header.column.getIsPinned()"
|
|
696
|
+
:class="[
|
|
697
|
+
ui.th({
|
|
698
|
+
class: [propsUi?.th, resolveValue(header.column.columnDef.meta?.class?.th, header)],
|
|
699
|
+
pinned: !!getHeaderEffectivePinning(header)
|
|
700
|
+
})
|
|
701
|
+
]"
|
|
702
|
+
:style="{
|
|
703
|
+
...resolveStyleObject(header.column.columnDef.meta?.style?.th, header),
|
|
704
|
+
width: `${header.getSize()}px`,
|
|
705
|
+
minWidth: `${header.getSize()}px`,
|
|
706
|
+
maxWidth: `${header.getSize()}px`,
|
|
707
|
+
...getHeaderPinningStyle(header),
|
|
708
|
+
...header.colSpan > 1 ? { flexGrow: header.colSpan } : {},
|
|
709
|
+
...header.rowSpan > 1 ? { alignSelf: 'stretch' } : {}
|
|
710
|
+
}"
|
|
711
|
+
>
|
|
712
|
+
<div class="w-full truncate">
|
|
713
|
+
<slot :name="`${header.id}-footer`" v-bind="header.getContext()">
|
|
714
|
+
<FlexRender
|
|
715
|
+
v-if="!header.isPlaceholder"
|
|
716
|
+
:render="header.column.columnDef.footer"
|
|
717
|
+
:props="header.getContext()"
|
|
718
|
+
/>
|
|
719
|
+
</slot>
|
|
720
|
+
</div>
|
|
721
|
+
</div>
|
|
722
|
+
</div>
|
|
723
|
+
</div>
|
|
724
|
+
</div>
|
|
725
|
+
</DefineTableTemplate>
|
|
726
|
+
|
|
727
|
+
<Primitive
|
|
728
|
+
ref="rootRef"
|
|
729
|
+
:as="as"
|
|
730
|
+
:class="[ui.root({ class: [propsUi?.root, props.class] }), scrollbarThemeClass, scrollbarClass]"
|
|
731
|
+
:data-scrollbars="scrollbarAttr"
|
|
732
|
+
>
|
|
733
|
+
<ReuseNuGridTemplate />
|
|
734
|
+
</Primitive>
|
|
735
|
+
</template>
|