@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,62 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/**
|
|
3
|
+
* Distance in pixels before the viewport to start loading content
|
|
4
|
+
* Higher values preload more aggressively
|
|
5
|
+
* @default 100
|
|
6
|
+
*/
|
|
7
|
+
preloadDistance?: number;
|
|
8
|
+
/**
|
|
9
|
+
* Whether to wait for scroll to settle before showing content
|
|
10
|
+
* If false, content shows immediately when in viewport
|
|
11
|
+
* @default true
|
|
12
|
+
*/
|
|
13
|
+
waitForSettle?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Minimum time in ms to show placeholder (prevents flash)
|
|
16
|
+
* @default 0
|
|
17
|
+
*/
|
|
18
|
+
minPlaceholderTime?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Transition duration in ms for content appearance
|
|
21
|
+
* @default 150
|
|
22
|
+
*/
|
|
23
|
+
transitionDuration?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Height hint for placeholder to prevent layout shift
|
|
26
|
+
* Can be a number (px) or CSS string
|
|
27
|
+
*/
|
|
28
|
+
height?: number | string;
|
|
29
|
+
/**
|
|
30
|
+
* Width hint for placeholder
|
|
31
|
+
* Can be a number (px) or CSS string
|
|
32
|
+
*/
|
|
33
|
+
width?: number | string;
|
|
34
|
+
/**
|
|
35
|
+
* Keep content mounted after first load (don't re-hide on scroll)
|
|
36
|
+
* @default true
|
|
37
|
+
*/
|
|
38
|
+
keepMounted?: boolean;
|
|
39
|
+
};
|
|
40
|
+
type __VLS_Slots = {
|
|
41
|
+
/** Content to render when visible and settled */
|
|
42
|
+
default: () => any;
|
|
43
|
+
/** Placeholder shown while loading (optional) */
|
|
44
|
+
placeholder: () => any;
|
|
45
|
+
};
|
|
46
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
47
|
+
width: number | string;
|
|
48
|
+
height: number | string;
|
|
49
|
+
preloadDistance: number;
|
|
50
|
+
waitForSettle: boolean;
|
|
51
|
+
minPlaceholderTime: number;
|
|
52
|
+
transitionDuration: number;
|
|
53
|
+
keepMounted: boolean;
|
|
54
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
55
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
56
|
+
declare const _default: typeof __VLS_export;
|
|
57
|
+
export default _default;
|
|
58
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
59
|
+
new (): {
|
|
60
|
+
$slots: S;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, inject, onMounted, onUnmounted, ref, watch } from "vue";
|
|
3
|
+
const props = defineProps({
|
|
4
|
+
preloadDistance: { type: Number, required: false, default: 100 },
|
|
5
|
+
waitForSettle: { type: Boolean, required: false, default: true },
|
|
6
|
+
minPlaceholderTime: { type: Number, required: false, default: 0 },
|
|
7
|
+
transitionDuration: { type: Number, required: false, default: 150 },
|
|
8
|
+
height: { type: [Number, String], required: false, default: void 0 },
|
|
9
|
+
width: { type: [Number, String], required: false, default: void 0 },
|
|
10
|
+
keepMounted: { type: Boolean, required: false, default: true }
|
|
11
|
+
});
|
|
12
|
+
defineSlots();
|
|
13
|
+
const scrollStateContext = inject("nugrid-scroll-state", null);
|
|
14
|
+
const elementRef = ref(null);
|
|
15
|
+
const isIntersecting = ref(false);
|
|
16
|
+
const hasBeenVisible = ref(false);
|
|
17
|
+
const showStartTime = ref(null);
|
|
18
|
+
const isReady = ref(false);
|
|
19
|
+
const shouldShowContent = computed(() => {
|
|
20
|
+
if (props.keepMounted && hasBeenVisible.value) {
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
if (!isIntersecting.value) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
if (!props.waitForSettle) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
if (!scrollStateContext) {
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
return scrollStateContext.isSettled.value;
|
|
33
|
+
});
|
|
34
|
+
watch(shouldShowContent, (show) => {
|
|
35
|
+
if (show && !hasBeenVisible.value) {
|
|
36
|
+
hasBeenVisible.value = true;
|
|
37
|
+
showStartTime.value = Date.now();
|
|
38
|
+
if (props.minPlaceholderTime > 0) {
|
|
39
|
+
setTimeout(() => {
|
|
40
|
+
isReady.value = true;
|
|
41
|
+
}, props.minPlaceholderTime);
|
|
42
|
+
} else {
|
|
43
|
+
isReady.value = true;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
const showContent = computed(() => {
|
|
48
|
+
if (!shouldShowContent.value) return false;
|
|
49
|
+
if (props.minPlaceholderTime > 0 && !isReady.value) return false;
|
|
50
|
+
return true;
|
|
51
|
+
});
|
|
52
|
+
let observer = null;
|
|
53
|
+
const setupObserver = () => {
|
|
54
|
+
if (!elementRef.value) return;
|
|
55
|
+
if (observer) {
|
|
56
|
+
observer.disconnect();
|
|
57
|
+
}
|
|
58
|
+
observer = new IntersectionObserver(
|
|
59
|
+
(entries) => {
|
|
60
|
+
const entry = entries[0];
|
|
61
|
+
if (entry) {
|
|
62
|
+
isIntersecting.value = entry.isIntersecting;
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
// Use viewport as root (null) for reliable intersection detection
|
|
67
|
+
root: null,
|
|
68
|
+
// Preload distance creates a margin around the viewport
|
|
69
|
+
rootMargin: `${props.preloadDistance}px`,
|
|
70
|
+
threshold: 0
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
observer.observe(elementRef.value);
|
|
74
|
+
};
|
|
75
|
+
onMounted(() => {
|
|
76
|
+
setupObserver();
|
|
77
|
+
});
|
|
78
|
+
watch(elementRef, (el) => {
|
|
79
|
+
if (el) {
|
|
80
|
+
setupObserver();
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
watch(
|
|
84
|
+
() => props.preloadDistance,
|
|
85
|
+
() => {
|
|
86
|
+
setupObserver();
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
onUnmounted(() => {
|
|
90
|
+
if (observer) {
|
|
91
|
+
observer.disconnect();
|
|
92
|
+
observer = null;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
const dimensionStyle = computed(() => {
|
|
96
|
+
const style = {};
|
|
97
|
+
if (props.height !== void 0) {
|
|
98
|
+
style.height = typeof props.height === "number" ? `${props.height}px` : props.height;
|
|
99
|
+
}
|
|
100
|
+
if (props.width !== void 0) {
|
|
101
|
+
style.width = typeof props.width === "number" ? `${props.width}px` : props.width;
|
|
102
|
+
}
|
|
103
|
+
return style;
|
|
104
|
+
});
|
|
105
|
+
const transitionStyle = computed(() => ({
|
|
106
|
+
transition: `opacity ${props.transitionDuration}ms ease-out`
|
|
107
|
+
}));
|
|
108
|
+
</script>
|
|
109
|
+
|
|
110
|
+
<template>
|
|
111
|
+
<div ref="elementRef" class="lazy-cell" :style="dimensionStyle">
|
|
112
|
+
<!-- Actual content (with fade-in transition) -->
|
|
113
|
+
<div
|
|
114
|
+
v-if="showContent"
|
|
115
|
+
class="lazy-cell-content"
|
|
116
|
+
:style="{ ...transitionStyle, opacity: showContent ? 1 : 0 }"
|
|
117
|
+
>
|
|
118
|
+
<slot />
|
|
119
|
+
</div>
|
|
120
|
+
|
|
121
|
+
<!-- Placeholder (shown while waiting) -->
|
|
122
|
+
<div v-else class="lazy-cell-placeholder" :style="dimensionStyle">
|
|
123
|
+
<slot name="placeholder">
|
|
124
|
+
<!-- Default placeholder: subtle skeleton -->
|
|
125
|
+
<div class="lazy-cell-skeleton" />
|
|
126
|
+
</slot>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
</template>
|
|
130
|
+
|
|
131
|
+
<style scoped>
|
|
132
|
+
.lazy-cell{min-height:1em;position:relative}.lazy-cell-content{height:100%;width:100%}.lazy-cell-placeholder{align-items:center;display:flex;height:100%;justify-content:center;width:100%}.lazy-cell-skeleton{animation:lazy-cell-shimmer 1.5s infinite;background:linear-gradient(90deg,hsla(0,0%,50%,.1) 25%,hsla(0,0%,50%,.2) 50%,hsla(0,0%,50%,.1) 75%);background-size:200% 100%;border-radius:4px;height:100%;min-height:1em;width:100%}@keyframes lazy-cell-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}
|
|
133
|
+
</style>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/**
|
|
3
|
+
* Distance in pixels before the viewport to start loading content
|
|
4
|
+
* Higher values preload more aggressively
|
|
5
|
+
* @default 100
|
|
6
|
+
*/
|
|
7
|
+
preloadDistance?: number;
|
|
8
|
+
/**
|
|
9
|
+
* Whether to wait for scroll to settle before showing content
|
|
10
|
+
* If false, content shows immediately when in viewport
|
|
11
|
+
* @default true
|
|
12
|
+
*/
|
|
13
|
+
waitForSettle?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Minimum time in ms to show placeholder (prevents flash)
|
|
16
|
+
* @default 0
|
|
17
|
+
*/
|
|
18
|
+
minPlaceholderTime?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Transition duration in ms for content appearance
|
|
21
|
+
* @default 150
|
|
22
|
+
*/
|
|
23
|
+
transitionDuration?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Height hint for placeholder to prevent layout shift
|
|
26
|
+
* Can be a number (px) or CSS string
|
|
27
|
+
*/
|
|
28
|
+
height?: number | string;
|
|
29
|
+
/**
|
|
30
|
+
* Width hint for placeholder
|
|
31
|
+
* Can be a number (px) or CSS string
|
|
32
|
+
*/
|
|
33
|
+
width?: number | string;
|
|
34
|
+
/**
|
|
35
|
+
* Keep content mounted after first load (don't re-hide on scroll)
|
|
36
|
+
* @default true
|
|
37
|
+
*/
|
|
38
|
+
keepMounted?: boolean;
|
|
39
|
+
};
|
|
40
|
+
type __VLS_Slots = {
|
|
41
|
+
/** Content to render when visible and settled */
|
|
42
|
+
default: () => any;
|
|
43
|
+
/** Placeholder shown while loading (optional) */
|
|
44
|
+
placeholder: () => any;
|
|
45
|
+
};
|
|
46
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
47
|
+
width: number | string;
|
|
48
|
+
height: number | string;
|
|
49
|
+
preloadDistance: number;
|
|
50
|
+
waitForSettle: boolean;
|
|
51
|
+
minPlaceholderTime: number;
|
|
52
|
+
transitionDuration: number;
|
|
53
|
+
keepMounted: boolean;
|
|
54
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
55
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
56
|
+
declare const _default: typeof __VLS_export;
|
|
57
|
+
export default _default;
|
|
58
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
59
|
+
new (): {
|
|
60
|
+
$slots: S;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { TableData } from '@nuxt/ui';
|
|
2
|
+
import type { Row } from '@tanstack/vue-table';
|
|
3
|
+
import type { ComponentPublicInstance } from 'vue';
|
|
4
|
+
declare const __VLS_export: <T extends TableData>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
6
|
+
row: Row<T>;
|
|
7
|
+
style?: Record<string, any>;
|
|
8
|
+
minHeight?: number;
|
|
9
|
+
dataIndex?: number;
|
|
10
|
+
measureRef?: (el: Element | ComponentPublicInstance | null) => void;
|
|
11
|
+
}> & (typeof globalThis extends {
|
|
12
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
13
|
+
} ? P : {});
|
|
14
|
+
expose: (exposed: {}) => void;
|
|
15
|
+
attrs: any;
|
|
16
|
+
slots: {
|
|
17
|
+
default?: (props: {
|
|
18
|
+
cell: any;
|
|
19
|
+
row: Row<T>;
|
|
20
|
+
cellIndex: number;
|
|
21
|
+
}) => any;
|
|
22
|
+
expanded?: (props: {
|
|
23
|
+
row: Row<T>;
|
|
24
|
+
}) => any;
|
|
25
|
+
};
|
|
26
|
+
emit: {};
|
|
27
|
+
}>) => import("vue").VNode & {
|
|
28
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
29
|
+
};
|
|
30
|
+
declare const _default: typeof __VLS_export;
|
|
31
|
+
export default _default;
|
|
32
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
33
|
+
[K in keyof T]: T[K];
|
|
34
|
+
} : {
|
|
35
|
+
[K in keyof T as K]: T[K];
|
|
36
|
+
}) & {};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, inject } from "vue";
|
|
3
|
+
import { resolveStyleObject, resolveValue } from "../../composables/_internal";
|
|
4
|
+
import NuGridCellContent from "./NuGridCellContent.vue";
|
|
5
|
+
defineOptions({
|
|
6
|
+
inheritAttrs: false
|
|
7
|
+
});
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
row: { type: Object, required: true },
|
|
10
|
+
style: { type: Object, required: false },
|
|
11
|
+
minHeight: { type: Number, required: false },
|
|
12
|
+
dataIndex: { type: Number, required: false },
|
|
13
|
+
measureRef: { type: Function, required: false }
|
|
14
|
+
});
|
|
15
|
+
const slots = defineSlots();
|
|
16
|
+
const coreContext = inject("nugrid-core");
|
|
17
|
+
const focusContext = inject("nugrid-focus");
|
|
18
|
+
const performanceContext = inject("nugrid-performance");
|
|
19
|
+
const addRowContext = inject("nugrid-add-row");
|
|
20
|
+
const interactionRouterContext = inject(
|
|
21
|
+
"nugrid-interaction-router"
|
|
22
|
+
);
|
|
23
|
+
if (!coreContext || !focusContext || !performanceContext || !addRowContext || !interactionRouterContext) {
|
|
24
|
+
throw new Error("NuGridAddRow must be used within a NuGrid component.");
|
|
25
|
+
}
|
|
26
|
+
const { tableApi, ui, propsUi } = coreContext;
|
|
27
|
+
const { focusFns, cellEditingFns } = focusContext;
|
|
28
|
+
const { getVisibleCells, shouldHaveBorder } = performanceContext;
|
|
29
|
+
const { interactionRouter } = interactionRouterContext;
|
|
30
|
+
const isAddRow = computed(() => addRowContext.isAddRowRow(props.row));
|
|
31
|
+
const showIndicator = computed(() => addRowContext.addRowState.value === "idle" && isAddRow.value);
|
|
32
|
+
const indicatorText = computed(() => addRowContext.addNewText.value);
|
|
33
|
+
const indicatorLeftOffset = computed(() => {
|
|
34
|
+
if (!showIndicator.value) return 0;
|
|
35
|
+
const cells = getVisibleCells(props.row);
|
|
36
|
+
let offset = 0;
|
|
37
|
+
for (const cell of cells) {
|
|
38
|
+
const isEditable = cellEditingFns.isCellEditable(props.row, cell);
|
|
39
|
+
if (isEditable) {
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
offset += cell.column.getSize();
|
|
43
|
+
}
|
|
44
|
+
return offset;
|
|
45
|
+
});
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<template>
|
|
49
|
+
<div
|
|
50
|
+
:ref="measureRef"
|
|
51
|
+
:data-index="dataIndex"
|
|
52
|
+
:data-add-row="isAddRow"
|
|
53
|
+
:data-row-id="row.id"
|
|
54
|
+
:data-selected="false"
|
|
55
|
+
data-selectable="false"
|
|
56
|
+
:data-expanded="row.getIsExpanded()"
|
|
57
|
+
:data-active-row="focusFns.isActiveRow(row)"
|
|
58
|
+
:data-focused-row="focusFns.isFocusedRow(row)"
|
|
59
|
+
:tabindex="focusFns.getRowTabIndex(row)"
|
|
60
|
+
:class="[
|
|
61
|
+
ui.tr({
|
|
62
|
+
class: [propsUi?.tr, resolveValue(tableApi.options.meta?.class?.tr, row)],
|
|
63
|
+
focusRow: !!focusFns.isFocusedRow(row),
|
|
64
|
+
gridFocused: focusFns.gridHasFocus.value
|
|
65
|
+
})
|
|
66
|
+
]"
|
|
67
|
+
:style="[
|
|
68
|
+
resolveValue(tableApi.options.meta?.style?.tr, row),
|
|
69
|
+
style,
|
|
70
|
+
minHeight ? { minHeight: `${minHeight}px` } : {},
|
|
71
|
+
showIndicator ? { position: 'relative' } : {}
|
|
72
|
+
]"
|
|
73
|
+
@click.stop
|
|
74
|
+
@pointerenter.stop
|
|
75
|
+
@pointerleave.stop
|
|
76
|
+
@contextmenu.prevent
|
|
77
|
+
>
|
|
78
|
+
<!-- Add row indicator overlay - shown when idle -->
|
|
79
|
+
<div
|
|
80
|
+
v-if="showIndicator"
|
|
81
|
+
:class="ui.addRowIndicator({ class: propsUi?.addRowIndicator })"
|
|
82
|
+
:style="
|
|
83
|
+
!addRowContext.indicatorSlot && indicatorLeftOffset ? { left: `${indicatorLeftOffset}px` } : {}
|
|
84
|
+
"
|
|
85
|
+
>
|
|
86
|
+
<component
|
|
87
|
+
:is="() => addRowContext.indicatorSlot?.({ row, text: indicatorText })"
|
|
88
|
+
v-if="addRowContext.indicatorSlot"
|
|
89
|
+
/>
|
|
90
|
+
<template v-else>{{ indicatorText }}</template>
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
<div
|
|
94
|
+
v-for="(cell, cellIndex) in getVisibleCells(row)"
|
|
95
|
+
:key="cell.id"
|
|
96
|
+
:data-cell-index="cellIndex"
|
|
97
|
+
:data-column-id="cell.column.id"
|
|
98
|
+
:data-pinned="cell.column.getIsPinned()"
|
|
99
|
+
:data-focused="focusFns.isFocusedCell(row, cellIndex)"
|
|
100
|
+
:tabindex="focusFns.getCellTabIndex(row, cellIndex)"
|
|
101
|
+
:class="[
|
|
102
|
+
cellEditingFns.isEditingCell(row, cell.column.id) && cell.column.columnDef.cellDataType !== 'boolean' ? 'p-3!' : '',
|
|
103
|
+
ui.td({
|
|
104
|
+
class: [propsUi?.td, resolveValue(cell.column.columnDef.meta?.class?.td, cell)],
|
|
105
|
+
pinned: !!cell.column.getIsPinned(),
|
|
106
|
+
hasLeftBorder: shouldHaveBorder(row, cellIndex, 'left'),
|
|
107
|
+
hasRightBorder: shouldHaveBorder(row, cellIndex, 'right'),
|
|
108
|
+
focusCell: !!focusFns.isFocusedCell(row, cellIndex) && !cellEditingFns.isEditingCell(row, cell.column.id),
|
|
109
|
+
focusRow: !!focusFns.isFocusedRow(row),
|
|
110
|
+
activeRow: focusFns.isActiveRow(row) && !focusFns.isFocusedRow(row),
|
|
111
|
+
gridFocused: focusFns.gridHasFocus.value
|
|
112
|
+
})
|
|
113
|
+
]"
|
|
114
|
+
:style="{
|
|
115
|
+
...resolveStyleObject(cell.column.columnDef.meta?.style?.td, cell),
|
|
116
|
+
width: `${cell.column.getSize()}px`,
|
|
117
|
+
minWidth: `${cell.column.getSize()}px`,
|
|
118
|
+
maxWidth: `${cell.column.getSize()}px`,
|
|
119
|
+
...cell.column.getIsPinned() === 'left' ? { left: `${cell.column.getStart('left')}px` } : {},
|
|
120
|
+
...cell.column.getIsPinned() === 'right' ? { right: `${cell.column.getAfter('right')}px` } : {},
|
|
121
|
+
...resolveValue(cell.column.columnDef.meta?.colspan?.td, cell) ? { flexGrow: resolveValue(cell.column.columnDef.meta?.colspan?.td, cell) } : {}
|
|
122
|
+
}"
|
|
123
|
+
@click="
|
|
124
|
+
(e) => interactionRouter.routeCellClick({
|
|
125
|
+
event: e,
|
|
126
|
+
row,
|
|
127
|
+
cell,
|
|
128
|
+
cellIndex
|
|
129
|
+
})
|
|
130
|
+
"
|
|
131
|
+
@dblclick="cellEditingFns.onCellDoubleClick($event, row, cell)"
|
|
132
|
+
>
|
|
133
|
+
<slot :cell="cell" :row="row" :cell-index="cellIndex">
|
|
134
|
+
<NuGridCellContent :cell="cell" :row="row" :cell-editing-fns="cellEditingFns" />
|
|
135
|
+
</slot>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<div v-if="row.getIsExpanded() && !!slots.expanded" :class="ui.tr({ class: [propsUi?.tr] })">
|
|
140
|
+
<div :class="ui.td({ class: [propsUi?.td] })">
|
|
141
|
+
<slot name="expanded" :row="row" />
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
</template>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { TableData } from '@nuxt/ui';
|
|
2
|
+
import type { Row } from '@tanstack/vue-table';
|
|
3
|
+
import type { ComponentPublicInstance } from 'vue';
|
|
4
|
+
declare const __VLS_export: <T extends TableData>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<{
|
|
6
|
+
row: Row<T>;
|
|
7
|
+
style?: Record<string, any>;
|
|
8
|
+
minHeight?: number;
|
|
9
|
+
dataIndex?: number;
|
|
10
|
+
measureRef?: (el: Element | ComponentPublicInstance | null) => void;
|
|
11
|
+
}> & (typeof globalThis extends {
|
|
12
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
13
|
+
} ? P : {});
|
|
14
|
+
expose: (exposed: {}) => void;
|
|
15
|
+
attrs: any;
|
|
16
|
+
slots: {
|
|
17
|
+
default?: (props: {
|
|
18
|
+
cell: any;
|
|
19
|
+
row: Row<T>;
|
|
20
|
+
cellIndex: number;
|
|
21
|
+
}) => any;
|
|
22
|
+
expanded?: (props: {
|
|
23
|
+
row: Row<T>;
|
|
24
|
+
}) => any;
|
|
25
|
+
};
|
|
26
|
+
emit: {};
|
|
27
|
+
}>) => import("vue").VNode & {
|
|
28
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
29
|
+
};
|
|
30
|
+
declare const _default: typeof __VLS_export;
|
|
31
|
+
export default _default;
|
|
32
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
33
|
+
[K in keyof T]: T[K];
|
|
34
|
+
} : {
|
|
35
|
+
[K in keyof T as K]: T[K];
|
|
36
|
+
}) & {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { TableData, TableSlots } from '@nuxt/ui';
|
|
2
|
+
import type { NuGridProps } from '../../types/index.js';
|
|
3
|
+
declare const __VLS_export: <T extends TableData>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<NuGridProps<T>> & (typeof globalThis extends {
|
|
5
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
6
|
+
} ? P : {});
|
|
7
|
+
expose: (exposed: {}) => void;
|
|
8
|
+
attrs: any;
|
|
9
|
+
slots: TableSlots<T>;
|
|
10
|
+
emit: {};
|
|
11
|
+
}>) => import("vue").VNode & {
|
|
12
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
13
|
+
};
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
17
|
+
[K in keyof T]: T[K];
|
|
18
|
+
} : {
|
|
19
|
+
[K in keyof T as K]: T[K];
|
|
20
|
+
}) & {};
|