@auronui/vue 1.4.0 → 1.4.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/dist/cjs/index.cjs +1 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/table/Table.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/components/table/Table.vue_vue_type_script_setup_true_lang.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.js","names":[],"sources":["../../../src/components/table/Table.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"TData extends RowData = RowData\">\nimport { computed, ref, watch, useTemplateRef, h } from 'vue'\nimport {\n useVueTable,\n getCoreRowModel,\n getSortedRowModel,\n type ColumnDef,\n type SortingState,\n type RowSelectionState,\n type Table as TableInstance,\n type RowData,\n type Row,\n} from '@tanstack/vue-table'\nimport { tableVariants, type TableVariants } from '@auronui/styles'\nimport { composeClassName , type ClassValue} from '../../utils/composeClassName'\nimport { useTableProvide } from './table.context'\nimport { useTableKeyboardNav } from './useTableKeyboardNav'\nimport TableHeader from './TableHeader.vue'\nimport TableBody from './TableBody.vue'\nimport TableVirtualBody from './TableVirtualBody.vue'\nimport TableFooter from './TableFooter.vue'\nimport TableCheckboxCell from './TableCheckboxCell.vue'\n\ntype SelectionMode = 'none' | 'single' | 'multiple'\n\nconst props = withDefaults(\n defineProps<{\n columns: ColumnDef<TData, any>[]\n data: TData[]\n variant?: TableVariants['variant']\n ariaLabel?: string\n /** Row selection mode. 'single' = radio-style; 'multiple' = checkbox + shift+click; 'none' = disabled */\n selection?: SelectionMode\n /** Controlled row selection state (Record<rowId, boolean>). Use v-model:rowSelection */\n rowSelection?: RowSelectionState\n /**\n * Opt-in row virtualization via @tanstack/vue-virtual.\n * - false (default): all rows render in a standard <tbody>\n * - true: always render via TableVirtualBody (only visible rows in DOM)\n * - number N: auto-enable virtualization when data.length > N\n */\n virtualRows?: boolean | number\n /** Estimated row height in px used by the virtualizer (default: 44) */\n estimatedRowHeight?: number\n /** Extra rows to render outside the visible viewport (default: 8) */\n virtualizerOverscan?: number\n /** Per-slot CSS class overrides */\n classNames?: Partial<{\n base: ClassValue\n scrollContainer: ClassValue\n }>\n }>(),\n {\n variant: 'primary',\n ariaLabel: undefined,\n selection: 'none',\n rowSelection: undefined,\n virtualRows: false,\n estimatedRowHeight: 44,\n virtualizerOverscan: 8,\n }\n)\n\nconst emit = defineEmits<{\n 'update:rowSelection': [value: RowSelectionState]\n}>()\n\n// --- Sorting state ----------------------------------------------------\nconst sorting = ref<SortingState>([])\n\n// --- Row selection state (controlled/uncontrolled) -------------------\nconst internalRowSelection = ref<RowSelectionState>(props.rowSelection ?? {})\nwatch(\n () => props.rowSelection,\n (next) => {\n if (next !== undefined) internalRowSelection.value = next\n },\n { deep: true }\n)\n\nfunction updateRowSelection(\n updater: RowSelectionState | ((old: RowSelectionState) => RowSelectionState)\n) {\n const next = typeof updater === 'function' ? updater(internalRowSelection.value) : updater\n internalRowSelection.value = next\n emit('update:rowSelection', next)\n}\n\n// --- Selection column injected at position 0 when enabled -----------\nconst selectionColumn: ColumnDef<TData, any> = {\n id: '__select__',\n size: 44,\n enableSorting: false,\n // TableCheckboxCell is invoked here via h() (a runtime call, not a compiled\n // template), which — like @vue/test-utils' mount() — does not infer a generic\n // SFC's type parameter from the props passed. It always resolves to the\n // component's default (RowData). Casting through RowData (not TData) here\n // matches what h() actually expects; this is the one narrower assertion the\n // design spec anticipated keeping.\n header: ({ table: t }) =>\n props.selection === 'multiple'\n ? h(TableCheckboxCell, { table: t as unknown as TableInstance<RowData> })\n : '',\n cell: ({ row: r }) => h(TableCheckboxCell, { row: r as unknown as Row<RowData> }),\n}\n\nconst effectiveColumns = computed<ColumnDef<TData, any>[]>(() => {\n if (props.selection === 'none') return props.columns\n return [selectionColumn, ...props.columns]\n})\n\n// --- useVueTable instance ---------------------------------------------\n// Use getters so @tanstack/vue-table tracks prop reactivity.\nconst table = useVueTable({\n get data() {\n return props.data\n },\n get columns() {\n return effectiveColumns.value as ColumnDef<TData, unknown>[]\n },\n state: {\n get sorting() {\n return sorting.value\n },\n get rowSelection() {\n return internalRowSelection.value\n },\n },\n onSortingChange: (updater) => {\n sorting.value = typeof updater === 'function' ? updater(sorting.value) : updater\n },\n onRowSelectionChange: updateRowSelection,\n get enableRowSelection() {\n return props.selection !== 'none'\n },\n get enableMultiRowSelection() {\n return props.selection === 'multiple'\n },\n getCoreRowModel: getCoreRowModel(),\n getSortedRowModel: getSortedRowModel(),\n})\n\n// --- Virtualization ---------------------------------------------------\n/** Whether to use TableVirtualBody instead of TableBody */\nconst useVirtual = computed<boolean>(() => {\n if (props.virtualRows === false) return false\n if (props.virtualRows === true) return true\n if (typeof props.virtualRows === 'number') return props.data.length > props.virtualRows\n return false\n})\n\n// The scroll container wrapping the <table> — passed to the virtualizer\nconst scrollContainerRef = useTemplateRef<HTMLElement>('scrollContainerRef')\n\n// Ref to TableVirtualBody instance so keyboard nav can call scrollToIndex.\n// InstanceType<typeof TableVirtualBody> no longer resolves now that\n// TableVirtualBody is a generic SFC (its exported type is a generic factory\n// function, not a plain constructor) — declare the exposed shape by hand\n// instead, matching what TableVirtualBody.vue's defineExpose actually provides.\ninterface TableVirtualBodyExpose {\n scrollToIndex: (index: number) => void\n}\nconst virtualBodyRef = ref<TableVirtualBodyExpose | null>(null)\n\n// --- Keyboard navigation ----------------------------------------------\nconst rootRef = useTemplateRef<HTMLElement>('rootRef')\n\nconst rowCount = computed(() => props.data.length)\nconst columnCount = computed(() => {\n const firstGroup = table.getHeaderGroups()[0]\n return firstGroup ? firstGroup.headers.length : 0\n})\n\nfunction getCellElement(rowIndex: number, columnIndex: number): HTMLElement | null {\n const root = rootRef.value\n if (!root) return null\n // In virtualized mode, scroll the row into view first so the DOM node exists.\n // The queueMicrotask in useTableKeyboardNav.move() gives Vue one tick to\n // flush the virtualizer's render before focus is attempted.\n if (useVirtual.value && virtualBodyRef.value) {\n virtualBodyRef.value.scrollToIndex(rowIndex)\n }\n return root.querySelector<HTMLElement>(\n `[data-row-index=\"${rowIndex}\"][data-col-index=\"${columnIndex}\"]`\n )\n}\n\nconst keyboardNav = useTableKeyboardNav({ rowCount, columnCount, getCellElement })\n\n// --- Selection context helpers ----------------------------------------\nconst selectionEnabled = computed(() => props.selection !== 'none')\nconst selectionMode = computed(() => props.selection ?? 'none')\n\n// Track last-clicked row index for Shift+Click range selection\nconst lastClickedRowIndex = ref<number | null>(null)\n\nfunction handleRowClick(rowIndex: number, event: MouseEvent) {\n if (props.selection === 'none') return\n const rows = table.getRowModel().rows\n if (props.selection === 'multiple' && event.shiftKey && lastClickedRowIndex.value !== null) {\n const [start, end] = [lastClickedRowIndex.value, rowIndex].sort((a, b) => a - b)\n const next: RowSelectionState = { ...internalRowSelection.value }\n for (let i = start; i <= end; i++) {\n const r = rows[i]\n if (r) next[r.id] = true\n }\n updateRowSelection(next)\n }\n lastClickedRowIndex.value = rowIndex\n}\n\n// --- Context provision -------------------------------------------------\nconst variantRef = computed(() => props.variant ?? 'primary')\nconst activeCell = keyboardNav.activeCell\n\nuseTableProvide({\n table,\n activeCell,\n selectionEnabled,\n selectionMode,\n variant: variantRef,\n handleRowClick,\n})\n\n// --- Slot class derivation -------------------------------------------\nconst slotFns = computed(() => tableVariants({ variant: variantRef.value }))\n\ndefineExpose({ table, keyboardNav, handleRowClick })\n</script>\n\n<template>\n <div :class=\"composeClassName(slotFns.base(), $attrs.class as string, props.classNames?.base)\">\n <!--\n scroll container: when virtualized, needs a fixed height + overflow:auto\n so the virtualizer can measure the viewport. Consumers should override\n the inline height via a wrapping container or CSS for production use.\n -->\n <div\n ref=\"scrollContainerRef\"\n :class=\"composeClassName(slotFns.scrollContainer(), props.classNames?.scrollContainer)\"\n :style=\"useVirtual ? { height: '400px', overflow: 'auto' } : undefined\"\n >\n <table\n ref=\"rootRef\"\n role=\"grid\"\n :aria-label=\"ariaLabel\"\n :aria-rowcount=\"rowCount\"\n :aria-colcount=\"columnCount\"\n @keydown=\"keyboardNav.onKeydown\"\n >\n <TableHeader />\n <TableBody v-if=\"!useVirtual\">\n <template #cell=\"slotProps\">\n <slot\n name=\"cell\"\n v-bind=\"slotProps\"\n />\n </template>\n </TableBody>\n <TableVirtualBody\n v-else\n ref=\"virtualBodyRef\"\n :scroll-element=\"scrollContainerRef\"\n :estimated-row-height=\"estimatedRowHeight\"\n :overscan=\"virtualizerOverscan\"\n />\n <TableFooter v-if=\"$slots.footer\">\n <slot name=\"footer\" />\n </TableFooter>\n </table>\n </div>\n </div>\n</template>\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Table.js","names":[],"sources":["../../../src/components/table/Table.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"TData extends RowData = RowData\">\nimport { computed, ref, watch, useTemplateRef, h } from 'vue'\nimport {\n useVueTable,\n getCoreRowModel,\n getSortedRowModel,\n type ColumnDef,\n type SortingState,\n type RowSelectionState,\n type Table as TableInstance,\n type RowData,\n type Row,\n} from '@tanstack/vue-table'\nimport { tableVariants, type TableVariants } from '@auronui/styles'\nimport { composeClassName , type ClassValue} from '../../utils/composeClassName'\nimport { useTableProvide } from './table.context'\nimport { useTableKeyboardNav } from './useTableKeyboardNav'\nimport TableHeader from './TableHeader.vue'\nimport TableBody from './TableBody.vue'\nimport TableVirtualBody from './TableVirtualBody.vue'\nimport TableFooter from './TableFooter.vue'\nimport TableCheckboxCell from './TableCheckboxCell.vue'\n\ntype SelectionMode = 'none' | 'single' | 'multiple'\n\nconst props = withDefaults(\n defineProps<{\n columns: ColumnDef<TData, any>[]\n data: TData[]\n variant?: TableVariants['variant']\n ariaLabel?: string\n /** Row selection mode. 'single' = radio-style; 'multiple' = checkbox + shift+click; 'none' = disabled */\n selection?: SelectionMode\n /** Controlled row selection state (Record<rowId, boolean>). Use v-model:rowSelection */\n rowSelection?: RowSelectionState\n /**\n * Opt-in row virtualization via @tanstack/vue-virtual.\n * - false (default): all rows render in a standard <tbody>\n * - true: always render via TableVirtualBody (only visible rows in DOM)\n * - number N: auto-enable virtualization when data.length > N\n */\n virtualRows?: boolean | number\n /** Estimated row height in px used by the virtualizer (default: 44) */\n estimatedRowHeight?: number\n /** Extra rows to render outside the visible viewport (default: 8) */\n virtualizerOverscan?: number\n /** Per-slot CSS class overrides */\n classNames?: Partial<{\n base: ClassValue\n scrollContainer: ClassValue\n }>\n }>(),\n {\n variant: 'primary',\n ariaLabel: undefined,\n selection: 'none',\n rowSelection: undefined,\n virtualRows: false,\n estimatedRowHeight: 44,\n virtualizerOverscan: 8,\n }\n)\n\nconst emit = defineEmits<{\n 'update:rowSelection': [value: RowSelectionState]\n}>()\n\n// --- Sorting state ----------------------------------------------------\nconst sorting = ref<SortingState>([])\n\n// --- Row selection state (controlled/uncontrolled) -------------------\nconst internalRowSelection = ref<RowSelectionState>(props.rowSelection ?? {})\nwatch(\n () => props.rowSelection,\n (next) => {\n if (next !== undefined) internalRowSelection.value = next\n },\n { deep: true }\n)\n\nfunction updateRowSelection(\n updater: RowSelectionState | ((old: RowSelectionState) => RowSelectionState)\n) {\n const next = typeof updater === 'function' ? updater(internalRowSelection.value) : updater\n internalRowSelection.value = next\n emit('update:rowSelection', next)\n}\n\n// --- Selection column injected at position 0 when enabled -----------\nconst selectionColumn: ColumnDef<TData, any> = {\n id: '__select__',\n size: 44,\n enableSorting: false,\n // TableCheckboxCell is invoked here via h() (a runtime call, not a compiled\n // template), which — like @vue/test-utils' mount() — does not infer a generic\n // SFC's type parameter from the props passed. It always resolves to the\n // component's default (RowData). Casting through RowData (not TData) here\n // matches what h() actually expects; this is the one narrower assertion the\n // design spec anticipated keeping.\n header: ({ table: t }) =>\n props.selection === 'multiple'\n ? h(TableCheckboxCell, { table: t as unknown as TableInstance<RowData> })\n : '',\n cell: ({ row: r }) => h(TableCheckboxCell, { row: r as unknown as Row<RowData> }),\n}\n\nconst effectiveColumns = computed<ColumnDef<TData, any>[]>(() => {\n if (props.selection === 'none') return props.columns\n return [selectionColumn, ...props.columns]\n})\n\n// --- useVueTable instance ---------------------------------------------\n// Use getters so @tanstack/vue-table tracks prop reactivity.\nconst table = useVueTable({\n get data() {\n return props.data\n },\n get columns() {\n return effectiveColumns.value as ColumnDef<TData, unknown>[]\n },\n state: {\n get sorting() {\n return sorting.value\n },\n get rowSelection() {\n return internalRowSelection.value\n },\n },\n onSortingChange: (updater) => {\n sorting.value = typeof updater === 'function' ? updater(sorting.value) : updater\n },\n onRowSelectionChange: updateRowSelection,\n get enableRowSelection() {\n return props.selection !== 'none'\n },\n get enableMultiRowSelection() {\n return props.selection === 'multiple'\n },\n getCoreRowModel: getCoreRowModel(),\n getSortedRowModel: getSortedRowModel(),\n})\n\n// --- Virtualization ---------------------------------------------------\n/** Whether to use TableVirtualBody instead of TableBody */\nconst useVirtual = computed<boolean>(() => {\n if (props.virtualRows === false) return false\n if (props.virtualRows === true) return true\n if (typeof props.virtualRows === 'number') return props.data.length > props.virtualRows\n return false\n})\n\n// The scroll container wrapping the <table> — passed to the virtualizer\nconst scrollContainerRef = useTemplateRef<HTMLElement>('scrollContainerRef')\n\n// Ref to TableVirtualBody instance so keyboard nav can call scrollToIndex.\n// InstanceType<typeof TableVirtualBody> no longer resolves now that\n// TableVirtualBody is a generic SFC (its exported type is a generic factory\n// function, not a plain constructor) — declare the exposed shape by hand\n// instead, matching what TableVirtualBody.vue's defineExpose actually provides.\ninterface TableVirtualBodyExpose {\n scrollToIndex: (index: number) => void\n}\nconst virtualBodyRef = ref<TableVirtualBodyExpose | null>(null)\n\n// --- Keyboard navigation ----------------------------------------------\nconst rootRef = useTemplateRef<HTMLElement>('rootRef')\n\nconst rowCount = computed(() => props.data.length)\nconst columnCount = computed(() => {\n const firstGroup = table.getHeaderGroups()[0]\n return firstGroup ? firstGroup.headers.length : 0\n})\n\nfunction getCellElement(rowIndex: number, columnIndex: number): HTMLElement | null {\n const root = rootRef.value\n if (!root) return null\n // In virtualized mode, scroll the row into view first so the DOM node exists.\n // The queueMicrotask in useTableKeyboardNav.move() gives Vue one tick to\n // flush the virtualizer's render before focus is attempted.\n if (useVirtual.value && virtualBodyRef.value) {\n virtualBodyRef.value.scrollToIndex(rowIndex)\n }\n return root.querySelector<HTMLElement>(\n `[data-row-index=\"${rowIndex}\"][data-col-index=\"${columnIndex}\"]`\n )\n}\n\nconst keyboardNav = useTableKeyboardNav({ rowCount, columnCount, getCellElement })\n\n// --- Selection context helpers ----------------------------------------\nconst selectionEnabled = computed(() => props.selection !== 'none')\nconst selectionMode = computed(() => props.selection ?? 'none')\n\n// Track last-clicked row index for Shift+Click range selection\nconst lastClickedRowIndex = ref<number | null>(null)\n\nfunction handleRowClick(rowIndex: number, event: MouseEvent) {\n if (props.selection === 'none') return\n const rows = table.getRowModel().rows\n if (props.selection === 'multiple' && event.shiftKey && lastClickedRowIndex.value !== null) {\n const [start, end] = [lastClickedRowIndex.value, rowIndex].sort((a, b) => a - b)\n const next: RowSelectionState = { ...internalRowSelection.value }\n for (let i = start; i <= end; i++) {\n const r = rows[i]\n if (r) next[r.id] = true\n }\n updateRowSelection(next)\n }\n lastClickedRowIndex.value = rowIndex\n}\n\n// --- Context provision -------------------------------------------------\nconst variantRef = computed(() => props.variant ?? 'primary')\nconst activeCell = keyboardNav.activeCell\n\nuseTableProvide({\n table,\n activeCell,\n selectionEnabled,\n selectionMode,\n variant: variantRef,\n handleRowClick,\n})\n\n// --- Slot class derivation -------------------------------------------\nconst slotFns = computed(() => tableVariants({ variant: variantRef.value }))\n\ndefineExpose({ table, keyboardNav, handleRowClick })\n</script>\n\n<template>\n <div :class=\"composeClassName(slotFns.base(), $attrs.class as string, props.classNames?.base)\">\n <!--\n scroll container: when virtualized, needs a fixed height + overflow:auto\n so the virtualizer can measure the viewport. Consumers should override\n the inline height via a wrapping container or CSS for production use.\n -->\n <div\n ref=\"scrollContainerRef\"\n :class=\"composeClassName(slotFns.scrollContainer(), props.classNames?.scrollContainer)\"\n :style=\"useVirtual ? { height: '400px', overflow: 'auto' } : undefined\"\n >\n <table\n class=\"table\"\n ref=\"rootRef\"\n role=\"grid\"\n :aria-label=\"ariaLabel\"\n :aria-rowcount=\"rowCount\"\n :aria-colcount=\"columnCount\"\n @keydown=\"keyboardNav.onKeydown\"\n >\n <TableHeader />\n <TableBody v-if=\"!useVirtual\">\n <template #cell=\"slotProps\">\n <slot\n name=\"cell\"\n v-bind=\"slotProps\"\n />\n </template>\n </TableBody>\n <TableVirtualBody\n v-else\n ref=\"virtualBodyRef\"\n :scroll-element=\"scrollContainerRef\"\n :estimated-row-height=\"estimatedRowHeight\"\n :overscan=\"virtualizerOverscan\"\n />\n <TableFooter v-if=\"$slots.footer\">\n <slot name=\"footer\" />\n </TableFooter>\n </table>\n </div>\n </div>\n</template>\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.vue_vue_type_script_setup_true_lang.js","names":["$attrs","$slots"],"sources":["../../../src/components/table/Table.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"TData extends RowData = RowData\">\nimport { computed, ref, watch, useTemplateRef, h } from 'vue'\nimport {\n useVueTable,\n getCoreRowModel,\n getSortedRowModel,\n type ColumnDef,\n type SortingState,\n type RowSelectionState,\n type Table as TableInstance,\n type RowData,\n type Row,\n} from '@tanstack/vue-table'\nimport { tableVariants, type TableVariants } from '@auronui/styles'\nimport { composeClassName , type ClassValue} from '../../utils/composeClassName'\nimport { useTableProvide } from './table.context'\nimport { useTableKeyboardNav } from './useTableKeyboardNav'\nimport TableHeader from './TableHeader.vue'\nimport TableBody from './TableBody.vue'\nimport TableVirtualBody from './TableVirtualBody.vue'\nimport TableFooter from './TableFooter.vue'\nimport TableCheckboxCell from './TableCheckboxCell.vue'\n\ntype SelectionMode = 'none' | 'single' | 'multiple'\n\nconst props = withDefaults(\n defineProps<{\n columns: ColumnDef<TData, any>[]\n data: TData[]\n variant?: TableVariants['variant']\n ariaLabel?: string\n /** Row selection mode. 'single' = radio-style; 'multiple' = checkbox + shift+click; 'none' = disabled */\n selection?: SelectionMode\n /** Controlled row selection state (Record<rowId, boolean>). Use v-model:rowSelection */\n rowSelection?: RowSelectionState\n /**\n * Opt-in row virtualization via @tanstack/vue-virtual.\n * - false (default): all rows render in a standard <tbody>\n * - true: always render via TableVirtualBody (only visible rows in DOM)\n * - number N: auto-enable virtualization when data.length > N\n */\n virtualRows?: boolean | number\n /** Estimated row height in px used by the virtualizer (default: 44) */\n estimatedRowHeight?: number\n /** Extra rows to render outside the visible viewport (default: 8) */\n virtualizerOverscan?: number\n /** Per-slot CSS class overrides */\n classNames?: Partial<{\n base: ClassValue\n scrollContainer: ClassValue\n }>\n }>(),\n {\n variant: 'primary',\n ariaLabel: undefined,\n selection: 'none',\n rowSelection: undefined,\n virtualRows: false,\n estimatedRowHeight: 44,\n virtualizerOverscan: 8,\n }\n)\n\nconst emit = defineEmits<{\n 'update:rowSelection': [value: RowSelectionState]\n}>()\n\n// --- Sorting state ----------------------------------------------------\nconst sorting = ref<SortingState>([])\n\n// --- Row selection state (controlled/uncontrolled) -------------------\nconst internalRowSelection = ref<RowSelectionState>(props.rowSelection ?? {})\nwatch(\n () => props.rowSelection,\n (next) => {\n if (next !== undefined) internalRowSelection.value = next\n },\n { deep: true }\n)\n\nfunction updateRowSelection(\n updater: RowSelectionState | ((old: RowSelectionState) => RowSelectionState)\n) {\n const next = typeof updater === 'function' ? updater(internalRowSelection.value) : updater\n internalRowSelection.value = next\n emit('update:rowSelection', next)\n}\n\n// --- Selection column injected at position 0 when enabled -----------\nconst selectionColumn: ColumnDef<TData, any> = {\n id: '__select__',\n size: 44,\n enableSorting: false,\n // TableCheckboxCell is invoked here via h() (a runtime call, not a compiled\n // template), which — like @vue/test-utils' mount() — does not infer a generic\n // SFC's type parameter from the props passed. It always resolves to the\n // component's default (RowData). Casting through RowData (not TData) here\n // matches what h() actually expects; this is the one narrower assertion the\n // design spec anticipated keeping.\n header: ({ table: t }) =>\n props.selection === 'multiple'\n ? h(TableCheckboxCell, { table: t as unknown as TableInstance<RowData> })\n : '',\n cell: ({ row: r }) => h(TableCheckboxCell, { row: r as unknown as Row<RowData> }),\n}\n\nconst effectiveColumns = computed<ColumnDef<TData, any>[]>(() => {\n if (props.selection === 'none') return props.columns\n return [selectionColumn, ...props.columns]\n})\n\n// --- useVueTable instance ---------------------------------------------\n// Use getters so @tanstack/vue-table tracks prop reactivity.\nconst table = useVueTable({\n get data() {\n return props.data\n },\n get columns() {\n return effectiveColumns.value as ColumnDef<TData, unknown>[]\n },\n state: {\n get sorting() {\n return sorting.value\n },\n get rowSelection() {\n return internalRowSelection.value\n },\n },\n onSortingChange: (updater) => {\n sorting.value = typeof updater === 'function' ? updater(sorting.value) : updater\n },\n onRowSelectionChange: updateRowSelection,\n get enableRowSelection() {\n return props.selection !== 'none'\n },\n get enableMultiRowSelection() {\n return props.selection === 'multiple'\n },\n getCoreRowModel: getCoreRowModel(),\n getSortedRowModel: getSortedRowModel(),\n})\n\n// --- Virtualization ---------------------------------------------------\n/** Whether to use TableVirtualBody instead of TableBody */\nconst useVirtual = computed<boolean>(() => {\n if (props.virtualRows === false) return false\n if (props.virtualRows === true) return true\n if (typeof props.virtualRows === 'number') return props.data.length > props.virtualRows\n return false\n})\n\n// The scroll container wrapping the <table> — passed to the virtualizer\nconst scrollContainerRef = useTemplateRef<HTMLElement>('scrollContainerRef')\n\n// Ref to TableVirtualBody instance so keyboard nav can call scrollToIndex.\n// InstanceType<typeof TableVirtualBody> no longer resolves now that\n// TableVirtualBody is a generic SFC (its exported type is a generic factory\n// function, not a plain constructor) — declare the exposed shape by hand\n// instead, matching what TableVirtualBody.vue's defineExpose actually provides.\ninterface TableVirtualBodyExpose {\n scrollToIndex: (index: number) => void\n}\nconst virtualBodyRef = ref<TableVirtualBodyExpose | null>(null)\n\n// --- Keyboard navigation ----------------------------------------------\nconst rootRef = useTemplateRef<HTMLElement>('rootRef')\n\nconst rowCount = computed(() => props.data.length)\nconst columnCount = computed(() => {\n const firstGroup = table.getHeaderGroups()[0]\n return firstGroup ? firstGroup.headers.length : 0\n})\n\nfunction getCellElement(rowIndex: number, columnIndex: number): HTMLElement | null {\n const root = rootRef.value\n if (!root) return null\n // In virtualized mode, scroll the row into view first so the DOM node exists.\n // The queueMicrotask in useTableKeyboardNav.move() gives Vue one tick to\n // flush the virtualizer's render before focus is attempted.\n if (useVirtual.value && virtualBodyRef.value) {\n virtualBodyRef.value.scrollToIndex(rowIndex)\n }\n return root.querySelector<HTMLElement>(\n `[data-row-index=\"${rowIndex}\"][data-col-index=\"${columnIndex}\"]`\n )\n}\n\nconst keyboardNav = useTableKeyboardNav({ rowCount, columnCount, getCellElement })\n\n// --- Selection context helpers ----------------------------------------\nconst selectionEnabled = computed(() => props.selection !== 'none')\nconst selectionMode = computed(() => props.selection ?? 'none')\n\n// Track last-clicked row index for Shift+Click range selection\nconst lastClickedRowIndex = ref<number | null>(null)\n\nfunction handleRowClick(rowIndex: number, event: MouseEvent) {\n if (props.selection === 'none') return\n const rows = table.getRowModel().rows\n if (props.selection === 'multiple' && event.shiftKey && lastClickedRowIndex.value !== null) {\n const [start, end] = [lastClickedRowIndex.value, rowIndex].sort((a, b) => a - b)\n const next: RowSelectionState = { ...internalRowSelection.value }\n for (let i = start; i <= end; i++) {\n const r = rows[i]\n if (r) next[r.id] = true\n }\n updateRowSelection(next)\n }\n lastClickedRowIndex.value = rowIndex\n}\n\n// --- Context provision -------------------------------------------------\nconst variantRef = computed(() => props.variant ?? 'primary')\nconst activeCell = keyboardNav.activeCell\n\nuseTableProvide({\n table,\n activeCell,\n selectionEnabled,\n selectionMode,\n variant: variantRef,\n handleRowClick,\n})\n\n// --- Slot class derivation -------------------------------------------\nconst slotFns = computed(() => tableVariants({ variant: variantRef.value }))\n\ndefineExpose({ table, keyboardNav, handleRowClick })\n</script>\n\n<template>\n <div :class=\"composeClassName(slotFns.base(), $attrs.class as string, props.classNames?.base)\">\n <!--\n scroll container: when virtualized, needs a fixed height + overflow:auto\n so the virtualizer can measure the viewport. Consumers should override\n the inline height via a wrapping container or CSS for production use.\n -->\n <div\n ref=\"scrollContainerRef\"\n :class=\"composeClassName(slotFns.scrollContainer(), props.classNames?.scrollContainer)\"\n :style=\"useVirtual ? { height: '400px', overflow: 'auto' } : undefined\"\n >\n <table\n ref=\"rootRef\"\n role=\"grid\"\n :aria-label=\"ariaLabel\"\n :aria-rowcount=\"rowCount\"\n :aria-colcount=\"columnCount\"\n @keydown=\"keyboardNav.onKeydown\"\n >\n <TableHeader />\n <TableBody v-if=\"!useVirtual\">\n <template #cell=\"slotProps\">\n <slot\n name=\"cell\"\n v-bind=\"slotProps\"\n />\n </template>\n </TableBody>\n <TableVirtualBody\n v-else\n ref=\"virtualBodyRef\"\n :scroll-element=\"scrollContainerRef\"\n :estimated-row-height=\"estimatedRowHeight\"\n :overscan=\"virtualizerOverscan\"\n />\n <TableFooter v-if=\"$slots.footer\">\n <slot name=\"footer\" />\n </TableFooter>\n </table>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBA,MAAM,QAAQ;EAsCd,MAAM,OAAO;EAKb,MAAM,UAAU,IAAkB,EAAE,CAAA;EAGpC,MAAM,uBAAuB,IAAuB,MAAM,gBAAgB,EAAE,CAAA;AAC5E,cACQ,MAAM,eACX,SAAS;AACR,OAAI,SAAS,KAAA,EAAW,sBAAqB,QAAQ;KAEvD,EAAE,MAAM,MAAK,CACf;EAEA,SAAS,mBACP,SACA;GACA,MAAM,OAAO,OAAO,YAAY,aAAa,QAAQ,qBAAqB,MAAM,GAAG;AACnF,wBAAqB,QAAQ;AAC7B,QAAK,uBAAuB,KAAI;;EAIlC,MAAM,kBAAyC;GAC7C,IAAI;GACJ,MAAM;GACN,eAAe;GAOf,SAAS,EAAE,OAAO,QAChB,MAAM,cAAc,aAChB,EAAE,2BAAmB,EAAE,OAAO,GAAwC,CAAA,GACtE;GACN,OAAO,EAAE,KAAK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,WAAA,QAAU;KAAA,QAAA;KAAA,UAAA;KAAA,GAA2C,KAAA,EAAS;OAEtE,mBA2BQ,SAAA;aA1BF;IAAJ,KAAI;IACJ,MAAK;IACJ,cAAY,QAAA;IACZ,iBAAe,SAAA;IACf,iBAAe,YAAA;IACf,WAAO,OAAA,OAAA,OAAA,MAAA,GAAA,SAAE,MAAA,YAAW,CAAC,aAAZ,MAAA,YAAW,CAAC,UAAS,GAAA,KAAA;;IAE/B,YAAe,oBAAA;KACG,WAAA,SAAA,WAAA,EAAlB,YAOY,mBAAA,EAAA,KAAA,GAAA,EAAA;KANC,MAAI,SAAE,cAAS,CACxB,WAGE,KAAA,QAAA,QAAA,eAAA,mBADQ,UAAS,CAAA,CAAA,CAAA,CAAA;;wBAIvB,YAME,0BAAA;;cAJI;KAAJ,KAAI;KACH,kBAAgB,mBAAA;KAChB,wBAAsB,QAAA;KACtB,UAAU,QAAA;;;;;;IAEMC,KAAAA,OAAO,UAAA,WAAA,EAA1B,YAEc,qBAAA,EAAA,KAAA,GAAA,EAAA;4BADU,CAAtB,WAAsB,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"Table.vue_vue_type_script_setup_true_lang.js","names":["$attrs","$slots"],"sources":["../../../src/components/table/Table.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"TData extends RowData = RowData\">\nimport { computed, ref, watch, useTemplateRef, h } from 'vue'\nimport {\n useVueTable,\n getCoreRowModel,\n getSortedRowModel,\n type ColumnDef,\n type SortingState,\n type RowSelectionState,\n type Table as TableInstance,\n type RowData,\n type Row,\n} from '@tanstack/vue-table'\nimport { tableVariants, type TableVariants } from '@auronui/styles'\nimport { composeClassName , type ClassValue} from '../../utils/composeClassName'\nimport { useTableProvide } from './table.context'\nimport { useTableKeyboardNav } from './useTableKeyboardNav'\nimport TableHeader from './TableHeader.vue'\nimport TableBody from './TableBody.vue'\nimport TableVirtualBody from './TableVirtualBody.vue'\nimport TableFooter from './TableFooter.vue'\nimport TableCheckboxCell from './TableCheckboxCell.vue'\n\ntype SelectionMode = 'none' | 'single' | 'multiple'\n\nconst props = withDefaults(\n defineProps<{\n columns: ColumnDef<TData, any>[]\n data: TData[]\n variant?: TableVariants['variant']\n ariaLabel?: string\n /** Row selection mode. 'single' = radio-style; 'multiple' = checkbox + shift+click; 'none' = disabled */\n selection?: SelectionMode\n /** Controlled row selection state (Record<rowId, boolean>). Use v-model:rowSelection */\n rowSelection?: RowSelectionState\n /**\n * Opt-in row virtualization via @tanstack/vue-virtual.\n * - false (default): all rows render in a standard <tbody>\n * - true: always render via TableVirtualBody (only visible rows in DOM)\n * - number N: auto-enable virtualization when data.length > N\n */\n virtualRows?: boolean | number\n /** Estimated row height in px used by the virtualizer (default: 44) */\n estimatedRowHeight?: number\n /** Extra rows to render outside the visible viewport (default: 8) */\n virtualizerOverscan?: number\n /** Per-slot CSS class overrides */\n classNames?: Partial<{\n base: ClassValue\n scrollContainer: ClassValue\n }>\n }>(),\n {\n variant: 'primary',\n ariaLabel: undefined,\n selection: 'none',\n rowSelection: undefined,\n virtualRows: false,\n estimatedRowHeight: 44,\n virtualizerOverscan: 8,\n }\n)\n\nconst emit = defineEmits<{\n 'update:rowSelection': [value: RowSelectionState]\n}>()\n\n// --- Sorting state ----------------------------------------------------\nconst sorting = ref<SortingState>([])\n\n// --- Row selection state (controlled/uncontrolled) -------------------\nconst internalRowSelection = ref<RowSelectionState>(props.rowSelection ?? {})\nwatch(\n () => props.rowSelection,\n (next) => {\n if (next !== undefined) internalRowSelection.value = next\n },\n { deep: true }\n)\n\nfunction updateRowSelection(\n updater: RowSelectionState | ((old: RowSelectionState) => RowSelectionState)\n) {\n const next = typeof updater === 'function' ? updater(internalRowSelection.value) : updater\n internalRowSelection.value = next\n emit('update:rowSelection', next)\n}\n\n// --- Selection column injected at position 0 when enabled -----------\nconst selectionColumn: ColumnDef<TData, any> = {\n id: '__select__',\n size: 44,\n enableSorting: false,\n // TableCheckboxCell is invoked here via h() (a runtime call, not a compiled\n // template), which — like @vue/test-utils' mount() — does not infer a generic\n // SFC's type parameter from the props passed. It always resolves to the\n // component's default (RowData). Casting through RowData (not TData) here\n // matches what h() actually expects; this is the one narrower assertion the\n // design spec anticipated keeping.\n header: ({ table: t }) =>\n props.selection === 'multiple'\n ? h(TableCheckboxCell, { table: t as unknown as TableInstance<RowData> })\n : '',\n cell: ({ row: r }) => h(TableCheckboxCell, { row: r as unknown as Row<RowData> }),\n}\n\nconst effectiveColumns = computed<ColumnDef<TData, any>[]>(() => {\n if (props.selection === 'none') return props.columns\n return [selectionColumn, ...props.columns]\n})\n\n// --- useVueTable instance ---------------------------------------------\n// Use getters so @tanstack/vue-table tracks prop reactivity.\nconst table = useVueTable({\n get data() {\n return props.data\n },\n get columns() {\n return effectiveColumns.value as ColumnDef<TData, unknown>[]\n },\n state: {\n get sorting() {\n return sorting.value\n },\n get rowSelection() {\n return internalRowSelection.value\n },\n },\n onSortingChange: (updater) => {\n sorting.value = typeof updater === 'function' ? updater(sorting.value) : updater\n },\n onRowSelectionChange: updateRowSelection,\n get enableRowSelection() {\n return props.selection !== 'none'\n },\n get enableMultiRowSelection() {\n return props.selection === 'multiple'\n },\n getCoreRowModel: getCoreRowModel(),\n getSortedRowModel: getSortedRowModel(),\n})\n\n// --- Virtualization ---------------------------------------------------\n/** Whether to use TableVirtualBody instead of TableBody */\nconst useVirtual = computed<boolean>(() => {\n if (props.virtualRows === false) return false\n if (props.virtualRows === true) return true\n if (typeof props.virtualRows === 'number') return props.data.length > props.virtualRows\n return false\n})\n\n// The scroll container wrapping the <table> — passed to the virtualizer\nconst scrollContainerRef = useTemplateRef<HTMLElement>('scrollContainerRef')\n\n// Ref to TableVirtualBody instance so keyboard nav can call scrollToIndex.\n// InstanceType<typeof TableVirtualBody> no longer resolves now that\n// TableVirtualBody is a generic SFC (its exported type is a generic factory\n// function, not a plain constructor) — declare the exposed shape by hand\n// instead, matching what TableVirtualBody.vue's defineExpose actually provides.\ninterface TableVirtualBodyExpose {\n scrollToIndex: (index: number) => void\n}\nconst virtualBodyRef = ref<TableVirtualBodyExpose | null>(null)\n\n// --- Keyboard navigation ----------------------------------------------\nconst rootRef = useTemplateRef<HTMLElement>('rootRef')\n\nconst rowCount = computed(() => props.data.length)\nconst columnCount = computed(() => {\n const firstGroup = table.getHeaderGroups()[0]\n return firstGroup ? firstGroup.headers.length : 0\n})\n\nfunction getCellElement(rowIndex: number, columnIndex: number): HTMLElement | null {\n const root = rootRef.value\n if (!root) return null\n // In virtualized mode, scroll the row into view first so the DOM node exists.\n // The queueMicrotask in useTableKeyboardNav.move() gives Vue one tick to\n // flush the virtualizer's render before focus is attempted.\n if (useVirtual.value && virtualBodyRef.value) {\n virtualBodyRef.value.scrollToIndex(rowIndex)\n }\n return root.querySelector<HTMLElement>(\n `[data-row-index=\"${rowIndex}\"][data-col-index=\"${columnIndex}\"]`\n )\n}\n\nconst keyboardNav = useTableKeyboardNav({ rowCount, columnCount, getCellElement })\n\n// --- Selection context helpers ----------------------------------------\nconst selectionEnabled = computed(() => props.selection !== 'none')\nconst selectionMode = computed(() => props.selection ?? 'none')\n\n// Track last-clicked row index for Shift+Click range selection\nconst lastClickedRowIndex = ref<number | null>(null)\n\nfunction handleRowClick(rowIndex: number, event: MouseEvent) {\n if (props.selection === 'none') return\n const rows = table.getRowModel().rows\n if (props.selection === 'multiple' && event.shiftKey && lastClickedRowIndex.value !== null) {\n const [start, end] = [lastClickedRowIndex.value, rowIndex].sort((a, b) => a - b)\n const next: RowSelectionState = { ...internalRowSelection.value }\n for (let i = start; i <= end; i++) {\n const r = rows[i]\n if (r) next[r.id] = true\n }\n updateRowSelection(next)\n }\n lastClickedRowIndex.value = rowIndex\n}\n\n// --- Context provision -------------------------------------------------\nconst variantRef = computed(() => props.variant ?? 'primary')\nconst activeCell = keyboardNav.activeCell\n\nuseTableProvide({\n table,\n activeCell,\n selectionEnabled,\n selectionMode,\n variant: variantRef,\n handleRowClick,\n})\n\n// --- Slot class derivation -------------------------------------------\nconst slotFns = computed(() => tableVariants({ variant: variantRef.value }))\n\ndefineExpose({ table, keyboardNav, handleRowClick })\n</script>\n\n<template>\n <div :class=\"composeClassName(slotFns.base(), $attrs.class as string, props.classNames?.base)\">\n <!--\n scroll container: when virtualized, needs a fixed height + overflow:auto\n so the virtualizer can measure the viewport. Consumers should override\n the inline height via a wrapping container or CSS for production use.\n -->\n <div\n ref=\"scrollContainerRef\"\n :class=\"composeClassName(slotFns.scrollContainer(), props.classNames?.scrollContainer)\"\n :style=\"useVirtual ? { height: '400px', overflow: 'auto' } : undefined\"\n >\n <table\n class=\"table\"\n ref=\"rootRef\"\n role=\"grid\"\n :aria-label=\"ariaLabel\"\n :aria-rowcount=\"rowCount\"\n :aria-colcount=\"columnCount\"\n @keydown=\"keyboardNav.onKeydown\"\n >\n <TableHeader />\n <TableBody v-if=\"!useVirtual\">\n <template #cell=\"slotProps\">\n <slot\n name=\"cell\"\n v-bind=\"slotProps\"\n />\n </template>\n </TableBody>\n <TableVirtualBody\n v-else\n ref=\"virtualBodyRef\"\n :scroll-element=\"scrollContainerRef\"\n :estimated-row-height=\"estimatedRowHeight\"\n :overscan=\"virtualizerOverscan\"\n />\n <TableFooter v-if=\"$slots.footer\">\n <slot name=\"footer\" />\n </TableFooter>\n </table>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBA,MAAM,QAAQ;EAsCd,MAAM,OAAO;EAKb,MAAM,UAAU,IAAkB,EAAE,CAAA;EAGpC,MAAM,uBAAuB,IAAuB,MAAM,gBAAgB,EAAE,CAAA;AAC5E,cACQ,MAAM,eACX,SAAS;AACR,OAAI,SAAS,KAAA,EAAW,sBAAqB,QAAQ;KAEvD,EAAE,MAAM,MAAK,CACf;EAEA,SAAS,mBACP,SACA;GACA,MAAM,OAAO,OAAO,YAAY,aAAa,QAAQ,qBAAqB,MAAM,GAAG;AACnF,wBAAqB,QAAQ;AAC7B,QAAK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AAiB,MAAM,YAAY,KAAI,CAAA,EAAA,EAAA,CAM1F,mBAkCM,OAAA;aAjCA;IAAJ,KAAI;IACH,OAAK,eAAE,MAAA,iBAAgB,CAAC,QAAA,MAAQ,iBAAe,EAAI,MAAM,YAAY,gBAAe,CAAA;IACpF,OAAK,eAAE,WAAA,QAAU;KAAA,QAAA;KAAA,UAAA;KAAA,GAA2C,KAAA,EAAS;OAEtE,mBA4BQ,SAAA;IA3BN,OAAM;aACF;IAAJ,KAAI;IACJ,MAAK;IACJ,cAAY,QAAA;IACZ,iBAAe,SAAA;IACf,iBAAe,YAAA;IACf,WAAO,OAAA,OAAA,OAAA,MAAA,GAAA,SAAE,MAAA,YAAW,CAAC,aAAZ,MAAA,YAAW,CAAC,UAAS,GAAA,KAAA;;IAE/B,YAAe,oBAAA;KACG,WAAA,SAAA,WAAA,EAAlB,YAOY,mBAAA,EAAA,KAAA,GAAA,EAAA;KANC,MAAI,SAAE,cAAS,CACxB,WAGE,KAAA,QAAA,QAAA,eAAA,mBADQ,UAAS,CAAA,CAAA,CAAA,CAAA;;wBAIvB,YAME,0BAAA;;cAJI;KAAJ,KAAI;KACH,kBAAgB,mBAAA;KAChB,wBAAsB,QAAA;KACtB,UAAU,QAAA;;;;;;IAEMC,KAAAA,OAAO,UAAA,WAAA,EAA1B,YAEc,qBAAA,EAAA,KAAA,GAAA,EAAA;4BADU,CAAtB,WAAsB,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@auronui/vue",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Vue 3 85 components with full visual and functional parity",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"tailwind-merge": "3.5.0",
|
|
76
76
|
"tailwind-variants": "3.2.2",
|
|
77
77
|
"vee-validate": "^4.15.1",
|
|
78
|
-
"@auronui/styles": "1.4.
|
|
78
|
+
"@auronui/styles": "1.4.1"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@chialab/vitest-axe": "0.19.1",
|
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
"vitest": "4.1.4",
|
|
95
95
|
"vue": "^3.5.32",
|
|
96
96
|
"vue-tsc": "^3.2.6",
|
|
97
|
-
"@auronui/
|
|
98
|
-
"@auronui/
|
|
97
|
+
"@auronui/vitest": "0.0.0",
|
|
98
|
+
"@auronui/standard": "0.0.0"
|
|
99
99
|
},
|
|
100
100
|
"scripts": {
|
|
101
101
|
"build:ai": "node src/ai-rules/generate.mjs",
|