@wow-two-beta/fe 0.0.43 → 0.0.44
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.
|
@@ -16,6 +16,10 @@ export interface BffPerson {
|
|
|
16
16
|
/** Defines the organization the session acts in, and the person's role there. */
|
|
17
17
|
export interface BffOrganization {
|
|
18
18
|
readonly id: string;
|
|
19
|
+
/** The organization's display name (the token's `org_name`); `null` when the token names none. */
|
|
20
|
+
readonly name: string | null;
|
|
21
|
+
/** The organization's handle (the token's `org_slug`), as it appears in a link; `null` when the token names none. */
|
|
22
|
+
readonly slug: string | null;
|
|
19
23
|
readonly role: string;
|
|
20
24
|
}
|
|
21
25
|
/**
|
package/dist/auth/BffSession.js
CHANGED
|
@@ -3,7 +3,7 @@ import { ResultExtensions } from "../foundation/results/ResultExtensions.js";
|
|
|
3
3
|
const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4
4
|
const isText = (value) => typeof value === "string" && value !== "";
|
|
5
5
|
const optionalText = (value) => typeof value === "string" ? value : null;
|
|
6
|
-
const
|
|
6
|
+
const optionalLabel = (value) => typeof value === "string" && value.trim() !== "" ? value.trim() : null;
|
|
7
7
|
const protocol = () => ApiFailureFactory.create("protocol");
|
|
8
8
|
function decodeBffSession(value) {
|
|
9
9
|
if (!isRecord(value) || typeof value["isAuthenticated"] !== "boolean") return ResultExtensions.fail(protocol());
|
|
@@ -25,11 +25,16 @@ function decodeBffSession(value) {
|
|
|
25
25
|
person: {
|
|
26
26
|
sub: person["sub"],
|
|
27
27
|
name: optionalText(person["name"]),
|
|
28
|
-
picture:
|
|
28
|
+
picture: optionalLabel(person["picture"]),
|
|
29
29
|
email: optionalText(person["email"]),
|
|
30
30
|
phoneNumber: optionalText(person["phoneNumber"])
|
|
31
31
|
},
|
|
32
|
-
organization: isRecord(organization) ? {
|
|
32
|
+
organization: isRecord(organization) ? {
|
|
33
|
+
id: organization["id"],
|
|
34
|
+
name: optionalLabel(organization["name"]),
|
|
35
|
+
slug: optionalLabel(organization["slug"]),
|
|
36
|
+
role: optionalText(organization["role"]) ?? ""
|
|
37
|
+
} : null,
|
|
33
38
|
permissions: Object.freeze([...permissions]),
|
|
34
39
|
expiresAt: typeof expiresAt === "string" && Number.isFinite(Date.parse(expiresAt)) ? expiresAt : null
|
|
35
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BffSession.js","sources":["../../src/auth/BffSession.ts"],"sourcesContent":["import { ApiFailureFactory, type ApiFailure } from '../foundation/http';\nimport { ResultExtensions, type Result } from '../foundation/results';\n\n/** Defines the signed-in person a BFF session names. */\nexport interface BffPerson {\n /** The stable subject id — the identity key, never the display name. */\n readonly sub: string;\n readonly name: string | null;\n /**\n * The link to the person's picture (the ID token's `picture`); `null` without one or without the `profile` scope.\n * Bind it to `AccountMenu`'s `avatarSrc` as is — the avatar shows initials while it is `null` or fails to load.\n */\n readonly picture: string | null;\n readonly email: string | null;\n readonly phoneNumber: string | null;\n}\n\n/** Defines the organization the session acts in, and the person's role there. */\nexport interface BffOrganization {\n readonly id: string;\n readonly role: string;\n}\n\n/**\n * Defines the user a BFF session resolves to. The CSRF token is deliberately absent: it never renders, so the\n * strategy keeps it and the HTTP layer echoes it.\n */\nexport interface BffUser {\n readonly person: BffPerson;\n /** `null` for a person acting in no organization. */\n readonly organization: BffOrganization | null;\n readonly permissions: readonly string[];\n /** When the session ends (ISO 8601); `null` when the server sent none that parses. */\n readonly expiresAt: string | null;\n}\n\n/** Defines one decoded `GET {prefix}/session` response. */\nexport interface BffSessionSnapshot {\n /** `null` while signed out. */\n readonly user: BffUser | null;\n /** The token unsafe requests echo; `null` while signed out. */\n readonly csrfToken: string | null;\n}\n\n/** Defines one decoded `POST {prefix}/sign-out` response. */\nexport interface BffSignOut {\n /** Where the page navigates to end the identity provider's session. */\n readonly endSessionUrl: string;\n}\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\nconst isText = (value: unknown): value is string => typeof value === 'string' && value !== '';\n/** Reads an optional text field; anything but text reads as absent. */\nconst optionalText = (value: unknown): string | null => (typeof value === 'string' ? value : null);\n
|
|
1
|
+
{"version":3,"file":"BffSession.js","sources":["../../src/auth/BffSession.ts"],"sourcesContent":["import { ApiFailureFactory, type ApiFailure } from '../foundation/http';\nimport { ResultExtensions, type Result } from '../foundation/results';\n\n/** Defines the signed-in person a BFF session names. */\nexport interface BffPerson {\n /** The stable subject id — the identity key, never the display name. */\n readonly sub: string;\n readonly name: string | null;\n /**\n * The link to the person's picture (the ID token's `picture`); `null` without one or without the `profile` scope.\n * Bind it to `AccountMenu`'s `avatarSrc` as is — the avatar shows initials while it is `null` or fails to load.\n */\n readonly picture: string | null;\n readonly email: string | null;\n readonly phoneNumber: string | null;\n}\n\n/** Defines the organization the session acts in, and the person's role there. */\nexport interface BffOrganization {\n readonly id: string;\n /** The organization's display name (the token's `org_name`); `null` when the token names none. */\n readonly name: string | null;\n /** The organization's handle (the token's `org_slug`), as it appears in a link; `null` when the token names none. */\n readonly slug: string | null;\n readonly role: string;\n}\n\n/**\n * Defines the user a BFF session resolves to. The CSRF token is deliberately absent: it never renders, so the\n * strategy keeps it and the HTTP layer echoes it.\n */\nexport interface BffUser {\n readonly person: BffPerson;\n /** `null` for a person acting in no organization. */\n readonly organization: BffOrganization | null;\n readonly permissions: readonly string[];\n /** When the session ends (ISO 8601); `null` when the server sent none that parses. */\n readonly expiresAt: string | null;\n}\n\n/** Defines one decoded `GET {prefix}/session` response. */\nexport interface BffSessionSnapshot {\n /** `null` while signed out. */\n readonly user: BffUser | null;\n /** The token unsafe requests echo; `null` while signed out. */\n readonly csrfToken: string | null;\n}\n\n/** Defines one decoded `POST {prefix}/sign-out` response. */\nexport interface BffSignOut {\n /** Where the page navigates to end the identity provider's session. */\n readonly endSessionUrl: string;\n}\n\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n typeof value === 'object' && value !== null && !Array.isArray(value);\nconst isText = (value: unknown): value is string => typeof value === 'string' && value !== '';\n/** Reads an optional text field; anything but text reads as absent. */\nconst optionalText = (value: unknown): string | null => (typeof value === 'string' ? value : null);\n/**\n * Reads an optional link, name or handle, trimmed; anything but non-blank text reads as absent, since an empty one\n * names nothing.\n */\nconst optionalLabel = (value: unknown): string | null =>\n typeof value === 'string' && value.trim() !== '' ? value.trim() : null;\nconst protocol = (): ApiFailure => ApiFailureFactory.create('protocol');\n\n/** Decodes the session response; a payload that breaks the contract is a `protocol` failure. */\nexport function decodeBffSession(value: unknown): Result<BffSessionSnapshot, ApiFailure> {\n if (!isRecord(value) || typeof value['isAuthenticated'] !== 'boolean') return ResultExtensions.fail(protocol());\n if (!value['isAuthenticated']) return ResultExtensions.ok({ user: null, csrfToken: null });\n\n const person = value['person'];\n const organization = value['organization'];\n const permissions = value['permissions'] ?? [];\n const expiresAt = value['expiresAt'];\n if (!isRecord(person) || !isText(person['sub']) || !isText(value['csrfToken'])) {\n return ResultExtensions.fail(protocol());\n }\n if (organization != null && (!isRecord(organization) || !isText(organization['id']))) {\n return ResultExtensions.fail(protocol());\n }\n if (!Array.isArray(permissions) || !permissions.every(isText)) return ResultExtensions.fail(protocol());\n\n return ResultExtensions.ok({\n csrfToken: value['csrfToken'],\n user: {\n person: {\n sub: person['sub'],\n name: optionalText(person['name']),\n picture: optionalLabel(person['picture']),\n email: optionalText(person['email']),\n phoneNumber: optionalText(person['phoneNumber']),\n },\n organization: isRecord(organization)\n ? {\n id: organization['id'] as string,\n name: optionalLabel(organization['name']),\n slug: optionalLabel(organization['slug']),\n role: optionalText(organization['role']) ?? '',\n }\n : null,\n permissions: Object.freeze([...(permissions as string[])]),\n expiresAt: typeof expiresAt === 'string' && Number.isFinite(Date.parse(expiresAt)) ? expiresAt : null,\n },\n });\n}\n\n/** Whether a page may navigate to `url` to end the provider session: a local path, or an absolute http(s) URL. */\nfunction isNavigable(url: string): boolean {\n if (url.startsWith('/')) return !url.startsWith('//') && !url.includes('\\\\');\n try {\n const { protocol: scheme } = new URL(url);\n return scheme === 'https:' || scheme === 'http:';\n } catch {\n return false;\n }\n}\n\n/** Decodes the logout response; an end-session URL the page may not navigate to is a `protocol` failure. */\nexport function decodeBffSignOut(value: unknown): Result<BffSignOut, ApiFailure> {\n if (!isRecord(value) || !isText(value['endSessionUrl']) || !isNavigable(value['endSessionUrl'])) {\n return ResultExtensions.fail(protocol());\n }\n return ResultExtensions.ok({ endSessionUrl: value['endSessionUrl'] });\n}\n\n/** Extends a {@link BffUser} with the checks a screen and a bridge need. */\nexport const BffSessionExtensions = {\n /** Whether the user holds `permission`; `false` while signed out. */\n hasPermission(user: BffUser | null | undefined, permission: string): boolean {\n return user?.permissions.includes(permission) ?? false;\n },\n\n /**\n * The stable user-and-organization key: pass it as `createAuthBridge({ getIdentity })` so a refreshed session\n * keeps its caches and a person or organization switch drops them.\n */\n identity(user: BffUser): string {\n return `${user.person.sub}\\u0000${user.organization?.id ?? ''}`;\n },\n\n /** The session end as epoch milliseconds; `null` when the server sent none that parses. */\n expiresAtMs(user: BffUser): number | null {\n return user.expiresAt === null ? null : Date.parse(user.expiresAt);\n },\n} as const;\n"],"names":[],"mappings":";;AAsDA,MAAM,WAAW,CAAC,UAChB,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AACrE,MAAM,SAAS,CAAC,UAAoC,OAAO,UAAU,YAAY,UAAU;AAE3F,MAAM,eAAe,CAAC,UAAmC,OAAO,UAAU,WAAW,QAAQ;AAK7F,MAAM,gBAAgB,CAAC,UACrB,OAAO,UAAU,YAAY,MAAM,KAAA,MAAW,KAAK,MAAM,KAAA,IAAS;AACpE,MAAM,WAAW,MAAkB,kBAAkB,OAAO,UAAU;AAG/D,SAAS,iBAAiB,OAAwD;AACvF,MAAI,CAAC,SAAS,KAAK,KAAK,OAAO,MAAM,iBAAiB,MAAM,UAAW,QAAO,iBAAiB,KAAK,UAAU;AAC9G,MAAI,CAAC,MAAM,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AAS,CAAC,IAAI,YAAY;AAAA,IAAA;AAAA,EACnG,CACD;AACH;AAGA,SAAS,YAAY,KAAsB;AACzC,MAAI,IAAI,WAAW,GAAG,EAAG,QAAO,CAAC,IAAI,WAAW,IAAI,KAAK,CAAC,IAAI,SAAS,IAAI;AAC3E,MAAI;AACF,UAAM,EAAE,UAAU,OAAA,IAAW,IAAI,IAAI,GAAG;AACxC,WAAO,WAAW,YAAY,WAAW;AAAA,EAC3C,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAGO,SAAS,iBAAiB,OAAgD;AAC/E,MAAI,CAAC,SAAS,KAAK,KAAK,CAAC,OAAO,MAAM,eAAe,CAAC,KAAK,CAAC,YAAY,MAAM,eAAe,CAAC,GAAG;AAC/F,WAAO,iBAAiB,KAAK,UAAU;AAAA,EACzC;AACA,SAAO,iBAAiB,GAAG,EAAE,eAAe,MAAM,eAAe,GAAG;AACtE;AAGO,MAAM,uBAAuB;AAAA;AAAA,EAElC,cAAc,MAAkC,YAA6B;AAC3E,WAAO,MAAM,YAAY,SAAS,UAAU,KAAK;AAAA,EACnD;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,SAAS,MAAuB;AAC9B,WAAO,GAAG,KAAK,OAAO,GAAG,KAAS,KAAK,cAAc,MAAM,EAAE;AAAA,EAC/D;AAAA;AAAA,EAGA,YAAY,MAA8B;AACxC,WAAO,KAAK,cAAc,OAAO,OAAO,KAAK,MAAM,KAAK,SAAS;AAAA,EACnE;AACF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RefreshButton.vue.js","sources":["../../../../src/presentation/actions/refreshButton/RefreshButton.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { ButtonProps } from '../button';\n\n/** @internal The `ButtonProps` this preset decides itself. */\ntype OwnedButtonProp = keyof Pick<ButtonProps, 'isLoading' | 'shape' | 'leadingSlot'>;\n\n/** Defines the forwarded `ButtonProps`, minus the ones the refresh preset sets. */\ntype RefreshButtonAttributes = Omit<ButtonProps, OwnedButtonProp>;\n\n/** Defines props for the one refresh control a region shows. */\nexport interface RefreshButtonProps extends /* @vue-ignore */ RefreshButtonAttributes {\n /** True from the click until the refresh settles — `useRefresh`'s `refreshing`; the icon spins and clicks wait. */\n readonly isRefreshing?: boolean;\n\n /** The visible label, or the accessible name of an icon-only button. Default `\"Refresh\"`, localized. */\n readonly label?: string;\n\n /** Renders the icon alone, square at its size, named by `label`. */\n readonly isIconOnly?: boolean;\n\n /** The visual surface style. Default `outline`; `ghost` inside a panel header. */\n readonly variant?: ButtonProps['variant'];\n\n /** The size step. Default `sm`; `md` beside page-level controls. */\n readonly size?: ButtonProps['size'];\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport { RefreshCw } from 'lucide-vue-next';\nimport { useLocaleDefaults } from '../../../foundation/i18n';\nimport { Icon } from '../../../foundation/icons';\nimport Button from '../button/Button.vue';\n\n/**\n * Renders the refresh control a region reruns its reads with — a `Button` preset that swaps the refresh icon for the\n * spinner while `isRefreshing`, keeps its label and width, and swallows repeat clicks until the refresh settles. Pair\n * it with `useRefresh` from `@wow-two-beta/fe/query`, which also drives the region's placeholders.\n */\ndefineOptions({ name: 'RefreshButton', inheritAttrs: false });\n\nconst componentProps = withDefaults(defineProps<RefreshButtonProps>(), {\n isRefreshing: false,\n label: undefined,\n isIconOnly: false,\n variant: 'outline',\n size: 'sm',\n});\nconst props = useLocaleDefaults(componentProps, 'RefreshButton', { label: 'Refresh' });\n\nconst attrs = useAttrs();\n\n/** The icon-only form names itself through `aria-label`, and `title` shows the name on hover. */\nconst naming = computed(() =>\n props.isIconOnly ? { 'aria-label': props.label, title: props.label } : ({} as Record<string, string>),\n);\n</script>\n\n<template>\n <Button\n tone=\"neutral\"\n :variant=\"props.variant\"\n :size=\"props.size\"\n :shape=\"props.isIconOnly ? 'square' : 'default'\"\n :is-loading=\"props.isRefreshing\"\n v-bind=\"{ ...naming, ...attrs }\"\n >\n <template #leading><Icon :icon=\"RefreshCw\" :size=\"14\" /></template>\n <template v-if=\"!props.isIconOnly\">{{ props.label }}</template>\n </Button>\n</template>\n"],"names":["_openBlock","_createBlock","Button","_mergeProps","_unref","_createVNode","Icon","_createElementBlock","_Fragment","_createTextVNode","_toDisplayString"],"mappings":";;;;;;;;;;;;;;;;AA0CA,UAAM,iBAAiB;AAOvB,UAAM,QAAQ,kBAAkB,gBAAgB,iBAAiB,EAAE,OAAO,WAAW;AAErF,UAAM,QAAQ,SAAA;AAGd,UAAM,SAAS;AAAA,MAAS,MACtB,MAAM,aAAa,EAAE,cAAc,MAAM,OAAO,OAAO,MAAM,UAAW,CAAA;AAAA,IAAC;;AAKzE,aAAAA,UAAA,GAAAC,YAUSC,aAVTC,WAUS;AAAA,QATP,MAAK;AAAA,QACJ,SAASC,MAAA,KAAA,EAAM;AAAA,QACf,MAAMA,MAAA,KAAA,EAAM;AAAA,QACZ,OAAOA,MAAA,KAAA,EAAM,aAAU,WAAA;AAAA,QACvB,cAAYA,MAAA,KAAA,EAAM;AAAA,MAAA,GACN,EAAA,GAAA,OAAA,UAAWA,MAAA,KAAA,EAAA,CAAK,GAAA;AAAA,QAElB,iBAAQ,MAAqC;AAAA,UAArCC,YAAqCD,MAAAE,WAAA,GAAA;AAAA,YAA9B,MAAMF,MAAA,SAAA;AAAA,YAAY,MAAM;AAAA,UAAA;;
|
|
1
|
+
{"version":3,"file":"RefreshButton.vue.js","sources":["../../../../src/presentation/actions/refreshButton/RefreshButton.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { ButtonProps } from '../button';\n\n/** @internal The `ButtonProps` this preset decides itself. */\ntype OwnedButtonProp = keyof Pick<ButtonProps, 'isLoading' | 'shape' | 'leadingSlot'>;\n\n/** Defines the forwarded `ButtonProps`, minus the ones the refresh preset sets. */\ntype RefreshButtonAttributes = Omit<ButtonProps, OwnedButtonProp>;\n\n/** Defines props for the one refresh control a region shows. */\nexport interface RefreshButtonProps extends /* @vue-ignore */ RefreshButtonAttributes {\n /** True from the click until the refresh settles — `useRefresh`'s `refreshing`; the icon spins and clicks wait. */\n readonly isRefreshing?: boolean;\n\n /** The visible label, or the accessible name of an icon-only button. Default `\"Refresh\"`, localized. */\n readonly label?: string;\n\n /** Renders the icon alone, square at its size, named by `label`. */\n readonly isIconOnly?: boolean;\n\n /** The visual surface style. Default `outline`; `ghost` inside a panel header. */\n readonly variant?: ButtonProps['variant'];\n\n /** The size step. Default `sm`; `md` beside page-level controls. */\n readonly size?: ButtonProps['size'];\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs } from 'vue';\nimport { RefreshCw } from 'lucide-vue-next';\nimport { useLocaleDefaults } from '../../../foundation/i18n';\nimport { Icon } from '../../../foundation/icons';\nimport Button from '../button/Button.vue';\n\n/**\n * Renders the refresh control a region reruns its reads with — a `Button` preset that swaps the refresh icon for the\n * spinner while `isRefreshing`, keeps its label and width, and swallows repeat clicks until the refresh settles. Pair\n * it with `useRefresh` from `@wow-two-beta/fe/query`, which also drives the region's placeholders.\n */\ndefineOptions({ name: 'RefreshButton', inheritAttrs: false });\n\nconst componentProps = withDefaults(defineProps<RefreshButtonProps>(), {\n isRefreshing: false,\n label: undefined,\n isIconOnly: false,\n variant: 'outline',\n size: 'sm',\n});\nconst props = useLocaleDefaults(componentProps, 'RefreshButton', { label: 'Refresh' });\n\nconst attrs = useAttrs();\n\n/** The icon-only form names itself through `aria-label`, and `title` shows the name on hover. */\nconst naming = computed(() =>\n props.isIconOnly ? { 'aria-label': props.label, title: props.label } : ({} as Record<string, string>),\n);\n</script>\n\n<template>\n <Button\n tone=\"neutral\"\n :variant=\"props.variant\"\n :size=\"props.size\"\n :shape=\"props.isIconOnly ? 'square' : 'default'\"\n :is-loading=\"props.isRefreshing\"\n v-bind=\"{ ...naming, ...attrs }\"\n >\n <template #leading><Icon :icon=\"RefreshCw\" :size=\"14\" /></template>\n <template v-if=\"!props.isIconOnly\">{{ props.label }}</template>\n </Button>\n</template>\n"],"names":["_openBlock","_createBlock","Button","_mergeProps","_unref","_createVNode","Icon","_createElementBlock","_Fragment","_createTextVNode","_toDisplayString"],"mappings":";;;;;;;;;;;;;;;;AA0CA,UAAM,iBAAiB;AAOvB,UAAM,QAAQ,kBAAkB,gBAAgB,iBAAiB,EAAE,OAAO,WAAW;AAErF,UAAM,QAAQ,SAAA;AAGd,UAAM,SAAS;AAAA,MAAS,MACtB,MAAM,aAAa,EAAE,cAAc,MAAM,OAAO,OAAO,MAAM,UAAW,CAAA;AAAA,IAAC;;AAKzE,aAAAA,UAAA,GAAAC,YAUSC,aAVTC,WAUS;AAAA,QATP,MAAK;AAAA,QACJ,SAASC,MAAA,KAAA,EAAM;AAAA,QACf,MAAMA,MAAA,KAAA,EAAM;AAAA,QACZ,OAAOA,MAAA,KAAA,EAAM,aAAU,WAAA;AAAA,QACvB,cAAYA,MAAA,KAAA,EAAM;AAAA,MAAA,GACN,EAAA,GAAA,OAAA,UAAWA,MAAA,KAAA,EAAA,CAAK,GAAA;AAAA,QAElB,iBAAQ,MAAqC;AAAA,UAArCC,YAAqCD,MAAAE,WAAA,GAAA;AAAA,YAA9B,MAAMF,MAAA,SAAA;AAAA,YAAY,MAAM;AAAA,UAAA;;yBATuC,MAGjF;AAAA,UAOS,CAAAA,MAAA,KAAA,EAAM,2BAAvBG,mBAA+DC,UAAA,EAAA,KAAA,KAAA;AAAA,YAAzBC,gBAAAC,gBAAAN,MAAA,KAAA,EAAM,KAAK,GAAA,CAAA;AAAA,UAAA;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTable.vue.js","sources":["../../../../src/presentation/display/dataTable/DataTable.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { SelectionKey, SelectionMode } from '../../../foundation/selection';\nimport type { Breakpoint } from '../../layout/appShell/AppShell.vue';\nimport type { TableDensity, TablePhoneLayout } from '../table';\n\n/** Defines the sort order of a DataTable column. */\nexport const SortDirection = {\n /** Refers to ascending order. */\n Asc: 'asc',\n /** Refers to descending order. */\n Desc: 'desc',\n} as const;\n\nexport type SortDirection = (typeof SortDirection)[keyof typeof SortDirection];\n\n/** Defines the horizontal text alignment of a DataTable column. */\nexport const DataTableColumnAlign = {\n /** Refers to left alignment. */\n Left: 'left',\n /** Refers to centered alignment. */\n Center: 'center',\n /** Refers to right alignment. */\n Right: 'right',\n} as const;\n\nexport type DataTableColumnAlign = (typeof DataTableColumnAlign)[keyof typeof DataTableColumnAlign];\n\nexport interface DataTableSort {\n readonly columnKey: string;\n readonly direction: SortDirection;\n}\n\nexport interface DataTableColumn<T> {\n readonly key: string;\n /**\n * The header label. React took a `ReactNode`; a column is an array entry and\n * cannot become its own slot, so the scalar stays here and the `header`\n * scoped slot is the rich override.\n */\n readonly header: string | number;\n readonly accessor?: (row: T) => unknown;\n /**\n * The per-cell renderer — this column's rich override. Returns text, a number, a VNode (`h(Badge, …)`) or an\n * array of VNodes; any other value renders as its display string. The `cell` scoped slot overrides every\n * column at once.\n */\n readonly cell?: (row: T, index: number) => unknown;\n readonly isSortable?: boolean;\n /** Custom row comparison; takes precedence over accessor-based sorting. */\n readonly compare?: (left: T, right: T) => number;\n readonly align?: DataTableColumnAlign;\n readonly width?: string;\n /** The skeleton bar's width in this column, any CSS length; defaults to a varied share of the cell. */\n readonly skeletonWidth?: string;\n}\n\nexport interface DataTableProps<T> {\n readonly columns: ReadonlyArray<DataTableColumn<T>>;\n readonly data: ReadonlyArray<T>;\n readonly rowKey?: (row: T, index: number) => string | number;\n /**\n * Fires with the clicked row and its index.\n *\n * Kept a prop rather than an emit because its *presence* is load-bearing — it\n * seeds `isHoverable` and the `cursor-pointer` class, and Vue strips declared\n * emit listeners out of `useAttrs()`.\n */\n readonly onRowClick?: (row: T, index: number) => void;\n readonly sortBy?: DataTableSort | null;\n readonly defaultSortBy?: DataTableSort | null;\n readonly isStriped?: boolean;\n readonly isHoverable?: boolean;\n readonly density?: TableDensity;\n readonly isBare?: boolean;\n /** The empty-state text. Default `No results.`; override richly via the `emptyContent` slot. */\n readonly emptyContent?: string | number;\n\n /** How many rows the reader may select. Default `none`; `single` and `multiple` add a checkbox column. */\n readonly selectionMode?: SelectionMode;\n\n /** The selected row keys, controlled. The `v-model:selection` binding target. */\n readonly selection?: ReadonlyArray<SelectionKey>;\n\n /** The initially selected row keys when uncontrolled. Default none. */\n readonly defaultSelection?: ReadonlyArray<SelectionKey>;\n\n /** Whether a row can be selected, given its data index. Default every row. */\n readonly isRowSelectable?: (row: T, index: number) => boolean;\n\n /** The expanded row keys, controlled. The `v-model:expanded` binding target. */\n readonly expanded?: ReadonlyArray<SelectionKey>;\n\n /** The initially expanded row keys when uncontrolled. Default none. */\n readonly defaultExpanded?: ReadonlyArray<SelectionKey>;\n\n /** Whether a row can expand when the `expanded` slot is set, given its data index. Default every row. */\n readonly isRowExpandable?: (row: T, index: number) => boolean;\n\n /** Whether the header row stays pinned while the body scrolls inside `containerClassName`'s height. */\n readonly hasStickyHeader?: boolean;\n\n /** Whether data is loading — marks the table busy and draws skeleton rows while it is empty. */\n readonly isLoading?: boolean;\n\n /** The skeleton rows drawn while an empty table loads or its `DataRegion` first-loads. Default 5. */\n readonly skeletonRows?: number;\n\n /** @deprecated Use `skeletonRows`; this alias is removed next release. */\n readonly loadingRowCount?: number;\n\n /** Classes for the scroll container — a height such as `max-h-96` lets a sticky header pin. */\n readonly containerClassName?: string;\n\n /**\n * The layout below `stackBreakpoint`. Default `stack`: one card per row, each value beside its column's `header`,\n * with the sort and select-all controls in a bar above. `scroll` keeps the table and scrolls it sideways.\n */\n readonly phoneLayout?: TablePhoneLayout;\n\n /** Rows stack into cards below this breakpoint. Default `md`. */\n readonly stackBreakpoint?: Breakpoint;\n}\n\n/** @internal A row-control cell when stacked: inline at the head of its card, with no label. */\nconst StackedControlClass = 'w-10 table-stacked:inline-flex table-stacked:w-auto';\n\n/** @internal The skeleton rows drawn while an empty table loads, when `skeletonRows` is not set. */\nconst DefaultSkeletonRows = 5;\n\n/** @internal Bar widths a loading cell cycles through, so placeholder rows read as varied text, not a grid of bars. */\nconst SkeletonLineWidths = ['min(75%, 12rem)', 'min(50%, 8rem)', 'min(83%, 14rem)', 'min(66%, 10rem)'] as const;\n\n/** @internal Whether two key lists hold the same members. */\nfunction sameKeys(a: ReadonlyArray<SelectionKey>, b: ReadonlyArray<SelectionKey>): boolean {\n if (a.length !== b.length) return false;\n const lookup = new Set(b);\n return a.every((key) => lookup.has(key));\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport { computed, isVNode, toDisplayString, type FunctionalComponent, type VNodeChild } from 'vue';\nimport { useLocale } from '../../../foundation/i18n';\nimport { ArrowDown, ArrowUp, ArrowUpDown, ChevronRight } from 'lucide-vue-next';\nimport { useId } from '../../../foundation/identifiers';\nimport {\n compareValues,\n createSelection,\n deselect,\n extendSelection,\n isNullish,\n isSelected,\n select,\n selectionStatus,\n toggle,\n toggleAll,\n SelectionMode as SelectionModeToken,\n SelectionStatus,\n type SelectionState,\n} from '../../../foundation/selection';\nimport { cn } from '../../../foundation/styles';\nimport { useControlled } from '../../../foundation/state';\nimport CheckboxInput from '../../forms/checkboxInput/CheckboxInput.vue';\nimport { useSkeletonState } from '../../feedback/skeletonState/SkeletonStateContext';\nimport { SkeletonStateLine } from '../../feedback/skeletonState/SkeletonStateLine';\nimport { skeletonBoxClass } from '../../feedback/skeletonState/SkeletonState.variants';\nimport { Table, TableBody, TableCell, TableHead, TableHeaderCell, TableRow } from '../table';\n\n/**\n * Renders a sortable table from a `columns` descriptor, wrapping the `Table` primitives, with optional row\n * selection, expandable detail rows, a pinned header and a loading state.\n *\n * `class` and `aria-label` reach the inner `<table>` by fallthrough, which is why this component keeps `inheritAttrs`\n * on.\n */\ndefineOptions({ name: 'DataTable' });\n\nconst props = withDefaults(defineProps<DataTableProps<T>>(), {\n rowKey: undefined,\n onRowClick: undefined,\n sortBy: undefined,\n defaultSortBy: undefined,\n // Explicit `undefined` so an absent Boolean prop is not cast to `false` and\n // each one keeps deferring to `Table`'s own default.\n isStriped: undefined,\n isHoverable: undefined,\n density: undefined,\n isBare: undefined,\n selectionMode: SelectionModeToken.None,\n selection: undefined,\n defaultSelection: undefined,\n isRowSelectable: undefined,\n expanded: undefined,\n defaultExpanded: undefined,\n isRowExpandable: undefined,\n hasStickyHeader: false,\n isLoading: false,\n skeletonRows: undefined,\n loadingRowCount: undefined,\n containerClassName: undefined,\n phoneLayout: undefined,\n stackBreakpoint: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the reader clicks a sortable header, with the next sort or `null` once cleared. */\n 'update:sortBy': [sort: DataTableSort | null];\n\n /** Fires when the reader selects or deselects rows, with every selected row key. */\n 'update:selection': [keys: SelectionKey[]];\n\n /** Fires when the reader expands or collapses a row, with every expanded row key. */\n 'update:expanded': [keys: SelectionKey[]];\n}>();\n\nconst slots = defineSlots<{\n /** Overrides a column header. Falls back to the column's own `header`. */\n header(props: { column: DataTableColumn<T> }): unknown;\n /** Overrides a body cell. Falls back to the column's `cell`, then its `accessor`. */\n cell(props: { row: T; column: DataTableColumn<T>; index: number }): unknown;\n /** Overrides the empty-state content. Falls back to the `emptyContent` prop. */\n emptyContent(): unknown;\n /** The detail row under an expanded row; its presence adds the expand toggle column. */\n expanded?(props: { row: T; index: number }): unknown;\n /** Replaces the skeleton rows drawn while an empty table loads. */\n loading?(): unknown;\n}>();\n\nconst locale = useLocale();\nconst tableId = useId();\n\nconst emptyText = computed(() => props.emptyContent ?? locale.t('DataTable.emptyContent', undefined, 'No results.'));\n\nconst { value: sort, setValue: setSort } = useControlled<DataTableSort | null>({\n controlled: () => props.sortBy,\n default: props.defaultSortBy ?? null,\n onChange: (next) => emit('update:sortBy', next),\n});\n\nconst { value: selectedKeys, setValue: setSelectedKeys } = useControlled<ReadonlyArray<SelectionKey>>({\n controlled: () => props.selection,\n default: props.defaultSelection ?? [],\n onChange: (next) => emit('update:selection', [...next]),\n});\n\nconst { value: expandedKeys, setValue: setExpandedKeys } = useControlled<ReadonlyArray<SelectionKey>>({\n controlled: () => props.expanded,\n default: props.defaultExpanded ?? [],\n onChange: (next) => emit('update:expanded', [...next]),\n});\n\n/** @internal The fixed end of a shift-click range — interaction state, never part of the model. */\nlet selectionAnchor: SelectionKey | null = null;\n\n/** @internal Whether the pointer press that toggles a row checkbox held Shift. */\nlet isRangeGesture = false;\n\n/** React seeded `isHoverable` from `!!onRowClick`; kept as an explicit fallback. */\nconst resolvedHoverable = computed(() => props.isHoverable ?? props.onRowClick != null);\n\nconst hasSelection = computed(() => props.selectionMode !== SelectionModeToken.None);\nconst hasExpansion = computed(() => slots.expanded !== undefined);\n\n/** Every body column, including the selection and expansion control columns. */\nconst columnCount = computed(() => props.columns.length + (hasSelection.value ? 1 : 0) + (hasExpansion.value ? 1 : 0));\n\nconst selectedLookup = computed(() => new Set(selectedKeys.value));\nconst expandedLookup = computed(() => new Set(expandedKeys.value));\n\n/** The rows with their stable keys, which come from the data order so sorting never changes them. */\nconst keyedRows = computed(() =>\n props.data.map((row, dataIndex) => ({\n row,\n dataIndex,\n key: props.rowKey ? props.rowKey(row, dataIndex) : dataIndex,\n })),\n);\n\nconst sortedRows = computed(() => {\n const active = sort.value;\n if (!active) return keyedRows.value;\n const column = props.columns.find((entry) => entry.key === active.columnKey);\n const accessor = column?.accessor;\n if (!accessor && !column?.compare) return keyedRows.value;\n return keyedRows.value\n .map((entry) => ({ entry, value: column?.compare ? undefined : accessor?.(entry.row) }))\n .sort((a, b) => {\n if (column?.compare) {\n const result = column.compare(a.entry.row, b.entry.row);\n return active.direction === SortDirection.Asc ? result : -result;\n }\n /* The shared foundation ordering: absent values land last in both directions, outside the flip. */\n const isLeftAbsent = isNullish(a.value);\n const isRightAbsent = isNullish(b.value);\n if (isLeftAbsent || isRightAbsent) return isLeftAbsent === isRightAbsent ? 0 : isLeftAbsent ? 1 : -1;\n const result = compareValues(a.value, b.value, { locale: locale.locale.value });\n return active.direction === SortDirection.Asc ? result : -result;\n })\n .map(({ entry }) => entry);\n});\n\nconst rows = computed(() =>\n sortedRows.value.map(({ row, key, dataIndex }, index) => {\n const isRowSelected = selectedLookup.value.has(key);\n return {\n key,\n row,\n index,\n isSelected: isRowSelected,\n isSelectable: hasSelection.value && (props.isRowSelectable?.(row, dataIndex) ?? true),\n isExpandable: hasExpansion.value && (props.isRowExpandable?.(row, dataIndex) ?? true),\n isExpanded: expandedLookup.value.has(key),\n detailId: `${tableId}-detail-${dataIndex}`,\n /* `onClick` only exists when a handler was supplied — React's `onClick={onRowClick ? … : undefined}`. */\n attrs: {\n ...(hasSelection.value\n ? { 'aria-selected': isRowSelected, 'data-selected': isRowSelected ? '' : undefined }\n : {}),\n ...(props.onRowClick\n ? {\n tabindex: 0,\n onClick: (event: MouseEvent): void => {\n if (event.defaultPrevented || (event.target as Element | null)?.closest('[data-row-control]')) return;\n props.onRowClick?.(row, index);\n },\n onKeydown: (event: KeyboardEvent): void => {\n if (\n event.target !== event.currentTarget ||\n event.defaultPrevented ||\n !['Enter', ' '].includes(event.key)\n )\n return;\n event.preventDefault();\n props.onRowClick?.(row, index);\n },\n }\n : {}),\n },\n class: cn(\n props.onRowClick &&\n 'cursor-pointer focus-visible:outline-2 focus-visible:outline-ring focus-visible:-outline-offset-2',\n isRowSelected && 'bg-primary-soft/40 hover:bg-primary-soft/60',\n ),\n };\n }),\n);\n\n/** The keys of every selectable row, in display order — the scope of select-all and shift ranges. */\nconst selectableKeys = computed(() => rows.value.filter((entry) => entry.isSelectable).map((entry) => entry.key));\n\n/** The header checkbox's tri-state over the selectable rows. */\nconst headerStatus = computed(() =>\n selectionStatus(createSelection(SelectionModeToken.Multiple, selectedKeys.value), selectableKeys.value),\n);\n\nconst skeletonRowKeys = computed(() => {\n const count = Math.round(props.skeletonRows ?? props.loadingRowCount ?? DefaultSkeletonRows);\n return Array.from({ length: Math.max(1, count || DefaultSkeletonRows) }, (_, index) => index);\n});\n\n/* A `DataRegion` first load draws placeholder rows whatever the data holds; on its own the table draws them while an\n empty table loads. */\nconst regionSkeleton = useSkeletonState();\nconst isShowingSkeleton = computed(\n () => regionSkeleton.isSkeleton.value || (props.isLoading && rows.value.length === 0),\n);\n\nfunction cycleSort(columnKey: string): void {\n const active = sort.value;\n if (!active || active.columnKey !== columnKey) {\n setSort({ columnKey, direction: SortDirection.Asc });\n } else if (active.direction === SortDirection.Asc) {\n setSort({ columnKey, direction: SortDirection.Desc });\n } else {\n setSort(null);\n }\n}\n\nfunction alignClass(align: DataTableColumn<T>['align']): string {\n if (align === DataTableColumnAlign.Right) return 'text-right';\n if (align === DataTableColumnAlign.Center) return 'text-center';\n return 'text-left';\n}\n\n/** A loading cell's bar width: the column's own, else a varied share of the cell. The cell's alignment places it. */\nfunction skeletonLineWidth(column: DataTableColumn<T>, row: number, position: number): string {\n return column.skeletonWidth ?? SkeletonLineWidths[(row + position) % SkeletonLineWidths.length]!;\n}\n\n/** The expand control's own box, drawn as its placeholder. */\nconst skeletonControlClass = computed(() =>\n cn('inline-flex size-6 rounded-sm align-middle', skeletonBoxClass(regionSkeleton.animation.value)),\n);\n\nconst headerCells = computed(() =>\n props.columns.map((column) => {\n const active = sort.value;\n const isSorted = active?.columnKey === column.key;\n return {\n key: column.key,\n column,\n isSorted,\n isAscending: isSorted && active?.direction === SortDirection.Asc,\n ariaSort: isSorted\n ? active?.direction === SortDirection.Asc\n ? 'ascending'\n : 'descending'\n : column.isSortable\n ? 'none'\n : undefined,\n style: column.width ? { width: column.width } : undefined,\n class: alignClass(column.align),\n };\n }),\n);\n\n/** The column's own renderer, then its accessor — the fallback under the `cell` slot. */\nfunction renderCell(column: DataTableColumn<T>, row: T, index: number): unknown {\n if (column.cell) return column.cell(row, index);\n if (column.accessor) return column.accessor(row);\n return null;\n}\n\n/*\n * Renders a cell value: VNodes (and arrays of them) mount as markup, everything else as its display string.\n * Interpolating a VNode instead would JSON-stringify it — which throws on the VNode's circular component link.\n */\nconst CellContent: FunctionalComponent<{ value: unknown }> = ({ value }): VNodeChild => {\n if (isVNode(value)) return value;\n if (Array.isArray(value) && value.length > 0 && value.every((item) => isVNode(item))) return value as VNodeChild;\n return toDisplayString(value);\n};\nCellContent.props = ['value'];\n\n/** The current selection as a model state, carrying the range anchor. */\nfunction selectionState(): SelectionState<SelectionKey> {\n return createSelection(props.selectionMode, selectedKeys.value, selectionAnchor);\n}\n\n/** Requests the next selection, keeping its anchor and emitting only a real change. */\nfunction commitSelection(next: SelectionState<SelectionKey>): void {\n selectionAnchor = next.anchor;\n const keys = [...next.keys];\n if (!sameKeys(keys, selectedKeys.value)) setSelectedKeys(keys);\n}\n\n/** Records whether the press about to toggle a row checkbox held Shift. */\nfunction rememberGesture(event: MouseEvent): void {\n isRangeGesture = event.shiftKey;\n}\n\n/** Toggles one row — a Shift press in multiple mode selects the range from the anchor. */\nfunction toggleRow(key: SelectionKey): void {\n const state = selectionState();\n const isRange = isRangeGesture && props.selectionMode === SelectionModeToken.Multiple;\n isRangeGesture = false;\n if (isRange) commitSelection(extendSelection(state, key, selectableKeys.value));\n else if (props.selectionMode === SelectionModeToken.Single)\n commitSelection(isSelected(state, key) ? deselect(state, key) : select(state, key));\n else commitSelection(toggle(state, key));\n}\n\n/** Selects every selectable row, or clears them when all are selected. */\nfunction toggleAllRows(): void {\n commitSelection(toggleAll(selectionState(), selectableKeys.value));\n}\n\n/** Expands a collapsed row or collapses an expanded one. */\nfunction toggleExpanded(key: SelectionKey): void {\n const next = new Set(expandedKeys.value);\n if (next.has(key)) next.delete(key);\n else next.add(key);\n setExpandedKeys([...next]);\n}\n\n/** The expand chevron's classes — it points down once its row is expanded, and mirrors right to left. */\nfunction expandIconClass(isExpanded: boolean): string {\n return cn('size-4 transition-transform rtl:-scale-x-100', isExpanded && 'rotate-90 rtl:scale-x-100');\n}\n\nconst SortButtonClass =\n 'inline-flex items-center gap-1 rounded-sm transition-colors hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring';\n\nconst ExpandButtonClass =\n 'inline-flex size-6 items-center justify-center rounded-sm text-muted-foreground hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring';\n</script>\n\n<template>\n <Table\n :is-striped=\"isStriped\"\n :is-hoverable=\"resolvedHoverable\"\n :density=\"density\"\n :is-bare=\"isBare\"\n :container-class-name=\"containerClassName\"\n :has-sticky-header=\"hasStickyHeader\"\n :phone-layout=\"phoneLayout\"\n :stack-breakpoint=\"stackBreakpoint\"\n :aria-busy=\"isLoading || isShowingSkeleton || undefined\"\n >\n <!-- The heading stays as it is through a first load; only the body draws placeholder rows. -->\n <TableHead>\n <TableRow>\n <TableHeaderCell v-if=\"hasExpansion\" class=\"w-10\">\n <span class=\"sr-only\">{{ locale.t('DataTable.expandColumn', undefined, 'Details') }}</span>\n </TableHeaderCell>\n <TableHeaderCell v-if=\"hasSelection\" class=\"w-10\" data-row-control>\n <CheckboxInput\n v-if=\"selectionMode === SelectionModeToken.Multiple\"\n size=\"sm\"\n :model-value=\"headerStatus === SelectionStatus.All\"\n :is-indeterminate=\"headerStatus === SelectionStatus.Some\"\n :is-disabled=\"selectableKeys.length === 0\"\n :is-skeleton=\"false\"\n :aria-label=\"locale.t('DataTable.selectAll', undefined, 'Select all rows')\"\n @update:model-value=\"toggleAllRows\"\n />\n <span v-else class=\"sr-only\">{{ locale.t('DataTable.selectColumn', undefined, 'Select') }}</span>\n </TableHeaderCell>\n <TableHeaderCell\n v-for=\"cell in headerCells\"\n :key=\"cell.key\"\n :aria-sort=\"cell.ariaSort\"\n :style=\"cell.style\"\n :class=\"cell.class\"\n >\n <button v-if=\"cell.column.isSortable\" type=\"button\" :class=\"SortButtonClass\" @click=\"cycleSort(cell.key)\">\n <span>\n <slot name=\"header\" :column=\"cell.column\">{{ cell.column.header }}</slot>\n </span>\n <ArrowUp v-if=\"cell.isSorted && cell.isAscending\" class=\"h-3.5 w-3.5\" />\n <ArrowDown v-else-if=\"cell.isSorted\" class=\"h-3.5 w-3.5\" />\n <ArrowUpDown v-else class=\"h-3.5 w-3.5 opacity-50\" />\n </button>\n <slot v-else name=\"header\" :column=\"cell.column\">{{ cell.column.header }}</slot>\n </TableHeaderCell>\n </TableRow>\n </TableHead>\n <TableBody>\n <template v-if=\"isShowingSkeleton\">\n <slot name=\"loading\">\n <TableRow v-for=\"index in skeletonRowKeys\" :key=\"`skeleton-${index}`\" data-skeleton-row>\n <TableCell v-if=\"hasExpansion\" :class=\"StackedControlClass\" label=\"\" data-row-control>\n <span aria-hidden=\"true\" :class=\"skeletonControlClass\" />\n </TableCell>\n <TableCell v-if=\"hasSelection\" :class=\"StackedControlClass\" label=\"\" data-row-control>\n <CheckboxInput size=\"sm\" is-skeleton />\n </TableCell>\n <TableCell\n v-for=\"(column, position) in columns\"\n :key=\"column.key\"\n :label=\"String(column.header)\"\n :class=\"alignClass(column.align)\"\n >\n <SkeletonStateLine is-skeleton :width=\"skeletonLineWidth(column, index, position)\" />\n </TableCell>\n </TableRow>\n </slot>\n </template>\n <template v-else-if=\"rows.length === 0\">\n <TableRow>\n <TableCell :colspan=\"columnCount\" label=\"\" class=\"py-8 text-center text-muted-foreground\">\n <slot name=\"emptyContent\">{{ emptyText }}</slot>\n </TableCell>\n </TableRow>\n </template>\n <template v-else>\n <template v-for=\"row in rows\" :key=\"row.key\">\n <TableRow v-bind=\"row.attrs\" :class=\"row.class\">\n <TableCell v-if=\"hasExpansion\" :class=\"StackedControlClass\" label=\"\" data-row-control>\n <button\n v-if=\"row.isExpandable\"\n type=\"button\"\n :class=\"ExpandButtonClass\"\n :aria-expanded=\"row.isExpanded\"\n :aria-controls=\"row.isExpanded ? row.detailId : undefined\"\n :aria-label=\"\n row.isExpanded\n ? locale.t('DataTable.collapseRow', undefined, 'Hide details')\n : locale.t('DataTable.expandRow', undefined, 'Show details')\n \"\n @click=\"toggleExpanded(row.key)\"\n >\n <ChevronRight :class=\"expandIconClass(row.isExpanded)\" />\n </button>\n </TableCell>\n <TableCell\n v-if=\"hasSelection\"\n :class=\"StackedControlClass\"\n label=\"\"\n data-row-control\n @click.capture=\"rememberGesture\"\n >\n <CheckboxInput\n size=\"sm\"\n :model-value=\"row.isSelected\"\n :is-disabled=\"!row.isSelectable\"\n :aria-label=\"locale.t('DataTable.selectRow', undefined, 'Select row')\"\n @update:model-value=\"toggleRow(row.key)\"\n />\n </TableCell>\n <TableCell\n v-for=\"column in columns\"\n :key=\"column.key\"\n :label=\"String(column.header)\"\n :class=\"alignClass(column.align)\"\n >\n <slot name=\"cell\" :row=\"row.row\" :column=\"column\" :index=\"row.index\"\n ><CellContent :value=\"renderCell(column, row.row, row.index)\"\n /></slot>\n </TableCell>\n </TableRow>\n <TableRow v-if=\"row.isExpandable && row.isExpanded\" :id=\"row.detailId\" data-detail-row>\n <TableCell :colspan=\"columnCount\" label=\"\" class=\"bg-muted/30\">\n <slot name=\"expanded\" :row=\"row.row\" :index=\"row.index\" />\n </TableCell>\n </TableRow>\n </template>\n </template>\n </TableBody>\n </Table>\n</template>\n"],"names":["_useSlots","SelectionModeToken","result","_createBlock","_unref","Table","_createVNode","TableHead","TableRow","TableHeaderCell","_createElementVNode","_toDisplayString","CheckboxInput","_openBlock","_createElementBlock","_Fragment","_renderList","_normalizeStyle","_normalizeClass","_renderSlot","TableBody","TableCell","_mergeProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAMO,MAAM,gBAAgB;AAAA;AAAA,EAE3B,KAAK;AAAA;AAAA,EAEL,MAAM;AACR;AAKO,MAAM,uBAAuB;AAAA;AAAA,EAElC,MAAM;AAAA;AAAA,EAEN,QAAQ;AAAA;AAAA,EAER,OAAO;AACT;AAqGA,MAAM,sBAAsB;AAG5B,MAAM,sBAAsB;AAG5B,MAAM,qBAAqB,CAAC,mBAAmB,kBAAkB,mBAAmB,iBAAiB;AAGrG,SAAS,SAAS,GAAgC,GAAyC;AACzF,MAAI,EAAE,WAAW,EAAE,OAAQ,QAAO;AAClC,QAAM,SAAS,IAAI,IAAI,CAAC;AACxB,SAAO,EAAE,MAAM,CAAC,QAAQ,OAAO,IAAI,G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AAG,OAAM;AAAA,sBAAA;yCAC/C,MAA0D;AAAA,0BAA1DF,WAA0D,KAAA,QAAA,YAAA;AAAA,4BAAnC,KAAK,IAAI;AAAA,4BAAM,OAAO,IAAI;AAAA,0BAAA;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"DataTable.vue.js","sources":["../../../../src/presentation/display/dataTable/DataTable.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { SelectionKey, SelectionMode } from '../../../foundation/selection';\nimport type { Breakpoint } from '../../layout/appShell/AppShell.vue';\nimport type { TableDensity, TablePhoneLayout } from '../table';\n\n/** Defines the sort order of a DataTable column. */\nexport const SortDirection = {\n /** Refers to ascending order. */\n Asc: 'asc',\n /** Refers to descending order. */\n Desc: 'desc',\n} as const;\n\nexport type SortDirection = (typeof SortDirection)[keyof typeof SortDirection];\n\n/** Defines the horizontal text alignment of a DataTable column. */\nexport const DataTableColumnAlign = {\n /** Refers to left alignment. */\n Left: 'left',\n /** Refers to centered alignment. */\n Center: 'center',\n /** Refers to right alignment. */\n Right: 'right',\n} as const;\n\nexport type DataTableColumnAlign = (typeof DataTableColumnAlign)[keyof typeof DataTableColumnAlign];\n\nexport interface DataTableSort {\n readonly columnKey: string;\n readonly direction: SortDirection;\n}\n\nexport interface DataTableColumn<T> {\n readonly key: string;\n /**\n * The header label. React took a `ReactNode`; a column is an array entry and\n * cannot become its own slot, so the scalar stays here and the `header`\n * scoped slot is the rich override.\n */\n readonly header: string | number;\n readonly accessor?: (row: T) => unknown;\n /**\n * The per-cell renderer — this column's rich override. Returns text, a number, a VNode (`h(Badge, …)`) or an\n * array of VNodes; any other value renders as its display string. The `cell` scoped slot overrides every\n * column at once.\n */\n readonly cell?: (row: T, index: number) => unknown;\n readonly isSortable?: boolean;\n /** Custom row comparison; takes precedence over accessor-based sorting. */\n readonly compare?: (left: T, right: T) => number;\n readonly align?: DataTableColumnAlign;\n readonly width?: string;\n /** The skeleton bar's width in this column, any CSS length; defaults to a varied share of the cell. */\n readonly skeletonWidth?: string;\n}\n\nexport interface DataTableProps<T> {\n readonly columns: ReadonlyArray<DataTableColumn<T>>;\n readonly data: ReadonlyArray<T>;\n readonly rowKey?: (row: T, index: number) => string | number;\n /**\n * Fires with the clicked row and its index.\n *\n * Kept a prop rather than an emit because its *presence* is load-bearing — it\n * seeds `isHoverable` and the `cursor-pointer` class, and Vue strips declared\n * emit listeners out of `useAttrs()`.\n */\n readonly onRowClick?: (row: T, index: number) => void;\n readonly sortBy?: DataTableSort | null;\n readonly defaultSortBy?: DataTableSort | null;\n readonly isStriped?: boolean;\n readonly isHoverable?: boolean;\n readonly density?: TableDensity;\n readonly isBare?: boolean;\n /** The empty-state text. Default `No results.`; override richly via the `emptyContent` slot. */\n readonly emptyContent?: string | number;\n\n /** How many rows the reader may select. Default `none`; `single` and `multiple` add a checkbox column. */\n readonly selectionMode?: SelectionMode;\n\n /** The selected row keys, controlled. The `v-model:selection` binding target. */\n readonly selection?: ReadonlyArray<SelectionKey>;\n\n /** The initially selected row keys when uncontrolled. Default none. */\n readonly defaultSelection?: ReadonlyArray<SelectionKey>;\n\n /** Whether a row can be selected, given its data index. Default every row. */\n readonly isRowSelectable?: (row: T, index: number) => boolean;\n\n /** The expanded row keys, controlled. The `v-model:expanded` binding target. */\n readonly expanded?: ReadonlyArray<SelectionKey>;\n\n /** The initially expanded row keys when uncontrolled. Default none. */\n readonly defaultExpanded?: ReadonlyArray<SelectionKey>;\n\n /** Whether a row can expand when the `expanded` slot is set, given its data index. Default every row. */\n readonly isRowExpandable?: (row: T, index: number) => boolean;\n\n /** Whether the header row stays pinned while the body scrolls inside `containerClassName`'s height. */\n readonly hasStickyHeader?: boolean;\n\n /** Whether data is loading — marks the table busy and draws skeleton rows while it is empty. */\n readonly isLoading?: boolean;\n\n /** The skeleton rows drawn while an empty table loads or its `DataRegion` first-loads. Default 5. */\n readonly skeletonRows?: number;\n\n /** @deprecated Use `skeletonRows`; this alias is removed next release. */\n readonly loadingRowCount?: number;\n\n /** Classes for the scroll container — a height such as `max-h-96` lets a sticky header pin. */\n readonly containerClassName?: string;\n\n /**\n * The layout below `stackBreakpoint`. Default `stack`: one card per row, each value beside its column's `header`,\n * with the sort and select-all controls in a bar above. `scroll` keeps the table and scrolls it sideways.\n */\n readonly phoneLayout?: TablePhoneLayout;\n\n /** Rows stack into cards below this breakpoint. Default `md`. */\n readonly stackBreakpoint?: Breakpoint;\n}\n\n/** @internal A row-control cell when stacked: inline at the head of its card, with no label. */\nconst StackedControlClass = 'w-10 table-stacked:inline-flex table-stacked:w-auto';\n\n/** @internal The skeleton rows drawn while an empty table loads, when `skeletonRows` is not set. */\nconst DefaultSkeletonRows = 5;\n\n/** @internal Bar widths a loading cell cycles through, so placeholder rows read as varied text, not a grid of bars. */\nconst SkeletonLineWidths = ['min(75%, 12rem)', 'min(50%, 8rem)', 'min(83%, 14rem)', 'min(66%, 10rem)'] as const;\n\n/** @internal Whether two key lists hold the same members. */\nfunction sameKeys(a: ReadonlyArray<SelectionKey>, b: ReadonlyArray<SelectionKey>): boolean {\n if (a.length !== b.length) return false;\n const lookup = new Set(b);\n return a.every((key) => lookup.has(key));\n}\n</script>\n\n<script setup lang=\"ts\" generic=\"T\">\nimport { computed, isVNode, toDisplayString, type FunctionalComponent, type VNodeChild } from 'vue';\nimport { useLocale } from '../../../foundation/i18n';\nimport { ArrowDown, ArrowUp, ArrowUpDown, ChevronRight } from 'lucide-vue-next';\nimport { useId } from '../../../foundation/identifiers';\nimport {\n compareValues,\n createSelection,\n deselect,\n extendSelection,\n isNullish,\n isSelected,\n select,\n selectionStatus,\n toggle,\n toggleAll,\n SelectionMode as SelectionModeToken,\n SelectionStatus,\n type SelectionState,\n} from '../../../foundation/selection';\nimport { cn } from '../../../foundation/styles';\nimport { useControlled } from '../../../foundation/state';\nimport CheckboxInput from '../../forms/checkboxInput/CheckboxInput.vue';\nimport { useSkeletonState } from '../../feedback/skeletonState/SkeletonStateContext';\nimport { SkeletonStateLine } from '../../feedback/skeletonState/SkeletonStateLine';\nimport { skeletonBoxClass } from '../../feedback/skeletonState/SkeletonState.variants';\nimport { Table, TableBody, TableCell, TableHead, TableHeaderCell, TableRow } from '../table';\n\n/**\n * Renders a sortable table from a `columns` descriptor, wrapping the `Table` primitives, with optional row\n * selection, expandable detail rows, a pinned header and a loading state.\n *\n * `class` and `aria-label` reach the inner `<table>` by fallthrough, which is why this component keeps `inheritAttrs`\n * on.\n */\ndefineOptions({ name: 'DataTable' });\n\nconst props = withDefaults(defineProps<DataTableProps<T>>(), {\n rowKey: undefined,\n onRowClick: undefined,\n sortBy: undefined,\n defaultSortBy: undefined,\n // Explicit `undefined` so an absent Boolean prop is not cast to `false` and\n // each one keeps deferring to `Table`'s own default.\n isStriped: undefined,\n isHoverable: undefined,\n density: undefined,\n isBare: undefined,\n selectionMode: SelectionModeToken.None,\n selection: undefined,\n defaultSelection: undefined,\n isRowSelectable: undefined,\n expanded: undefined,\n defaultExpanded: undefined,\n isRowExpandable: undefined,\n hasStickyHeader: false,\n isLoading: false,\n skeletonRows: undefined,\n loadingRowCount: undefined,\n containerClassName: undefined,\n phoneLayout: undefined,\n stackBreakpoint: undefined,\n});\n\nconst emit = defineEmits<{\n /** Fires when the reader clicks a sortable header, with the next sort or `null` once cleared. */\n 'update:sortBy': [sort: DataTableSort | null];\n\n /** Fires when the reader selects or deselects rows, with every selected row key. */\n 'update:selection': [keys: SelectionKey[]];\n\n /** Fires when the reader expands or collapses a row, with every expanded row key. */\n 'update:expanded': [keys: SelectionKey[]];\n}>();\n\nconst slots = defineSlots<{\n /** Overrides a column header. Falls back to the column's own `header`. */\n header(props: { column: DataTableColumn<T> }): unknown;\n /** Overrides a body cell. Falls back to the column's `cell`, then its `accessor`. */\n cell(props: { row: T; column: DataTableColumn<T>; index: number }): unknown;\n /** Overrides the empty-state content. Falls back to the `emptyContent` prop. */\n emptyContent(): unknown;\n /** The detail row under an expanded row; its presence adds the expand toggle column. */\n expanded?(props: { row: T; index: number }): unknown;\n /** Replaces the skeleton rows drawn while an empty table loads. */\n loading?(): unknown;\n}>();\n\nconst locale = useLocale();\nconst tableId = useId();\n\nconst emptyText = computed(() => props.emptyContent ?? locale.t('DataTable.emptyContent', undefined, 'No results.'));\n\nconst { value: sort, setValue: setSort } = useControlled<DataTableSort | null>({\n controlled: () => props.sortBy,\n default: props.defaultSortBy ?? null,\n onChange: (next) => emit('update:sortBy', next),\n});\n\nconst { value: selectedKeys, setValue: setSelectedKeys } = useControlled<ReadonlyArray<SelectionKey>>({\n controlled: () => props.selection,\n default: props.defaultSelection ?? [],\n onChange: (next) => emit('update:selection', [...next]),\n});\n\nconst { value: expandedKeys, setValue: setExpandedKeys } = useControlled<ReadonlyArray<SelectionKey>>({\n controlled: () => props.expanded,\n default: props.defaultExpanded ?? [],\n onChange: (next) => emit('update:expanded', [...next]),\n});\n\n/** @internal The fixed end of a shift-click range — interaction state, never part of the model. */\nlet selectionAnchor: SelectionKey | null = null;\n\n/** @internal Whether the pointer press that toggles a row checkbox held Shift. */\nlet isRangeGesture = false;\n\n/** React seeded `isHoverable` from `!!onRowClick`; kept as an explicit fallback. */\nconst resolvedHoverable = computed(() => props.isHoverable ?? props.onRowClick != null);\n\nconst hasSelection = computed(() => props.selectionMode !== SelectionModeToken.None);\nconst hasExpansion = computed(() => slots.expanded !== undefined);\n\n/** Every body column, including the selection and expansion control columns. */\nconst columnCount = computed(() => props.columns.length + (hasSelection.value ? 1 : 0) + (hasExpansion.value ? 1 : 0));\n\nconst selectedLookup = computed(() => new Set(selectedKeys.value));\nconst expandedLookup = computed(() => new Set(expandedKeys.value));\n\n/** The rows with their stable keys, which come from the data order so sorting never changes them. */\nconst keyedRows = computed(() =>\n props.data.map((row, dataIndex) => ({\n row,\n dataIndex,\n key: props.rowKey ? props.rowKey(row, dataIndex) : dataIndex,\n })),\n);\n\nconst sortedRows = computed(() => {\n const active = sort.value;\n if (!active) return keyedRows.value;\n const column = props.columns.find((entry) => entry.key === active.columnKey);\n const accessor = column?.accessor;\n if (!accessor && !column?.compare) return keyedRows.value;\n return keyedRows.value\n .map((entry) => ({ entry, value: column?.compare ? undefined : accessor?.(entry.row) }))\n .sort((a, b) => {\n if (column?.compare) {\n const result = column.compare(a.entry.row, b.entry.row);\n return active.direction === SortDirection.Asc ? result : -result;\n }\n /* The shared foundation ordering: absent values land last in both directions, outside the flip. */\n const isLeftAbsent = isNullish(a.value);\n const isRightAbsent = isNullish(b.value);\n if (isLeftAbsent || isRightAbsent) return isLeftAbsent === isRightAbsent ? 0 : isLeftAbsent ? 1 : -1;\n const result = compareValues(a.value, b.value, { locale: locale.locale.value });\n return active.direction === SortDirection.Asc ? result : -result;\n })\n .map(({ entry }) => entry);\n});\n\nconst rows = computed(() =>\n sortedRows.value.map(({ row, key, dataIndex }, index) => {\n const isRowSelected = selectedLookup.value.has(key);\n return {\n key,\n row,\n index,\n isSelected: isRowSelected,\n isSelectable: hasSelection.value && (props.isRowSelectable?.(row, dataIndex) ?? true),\n isExpandable: hasExpansion.value && (props.isRowExpandable?.(row, dataIndex) ?? true),\n isExpanded: expandedLookup.value.has(key),\n detailId: `${tableId}-detail-${dataIndex}`,\n /* `onClick` only exists when a handler was supplied — React's `onClick={onRowClick ? … : undefined}`. */\n attrs: {\n ...(hasSelection.value\n ? { 'aria-selected': isRowSelected, 'data-selected': isRowSelected ? '' : undefined }\n : {}),\n ...(props.onRowClick\n ? {\n tabindex: 0,\n onClick: (event: MouseEvent): void => {\n if (event.defaultPrevented || (event.target as Element | null)?.closest('[data-row-control]')) return;\n props.onRowClick?.(row, index);\n },\n onKeydown: (event: KeyboardEvent): void => {\n if (\n event.target !== event.currentTarget ||\n event.defaultPrevented ||\n !['Enter', ' '].includes(event.key)\n )\n return;\n event.preventDefault();\n props.onRowClick?.(row, index);\n },\n }\n : {}),\n },\n class: cn(\n props.onRowClick &&\n 'cursor-pointer focus-visible:outline-2 focus-visible:outline-ring focus-visible:-outline-offset-2',\n isRowSelected && 'bg-primary-soft/40 hover:bg-primary-soft/60',\n ),\n };\n }),\n);\n\n/** The keys of every selectable row, in display order — the scope of select-all and shift ranges. */\nconst selectableKeys = computed(() => rows.value.filter((entry) => entry.isSelectable).map((entry) => entry.key));\n\n/** The header checkbox's tri-state over the selectable rows. */\nconst headerStatus = computed(() =>\n selectionStatus(createSelection(SelectionModeToken.Multiple, selectedKeys.value), selectableKeys.value),\n);\n\nconst skeletonRowKeys = computed(() => {\n const count = Math.round(props.skeletonRows ?? props.loadingRowCount ?? DefaultSkeletonRows);\n return Array.from({ length: Math.max(1, count || DefaultSkeletonRows) }, (_, index) => index);\n});\n\n/* A `DataRegion` first load draws placeholder rows whatever the data holds; on its own the table draws them while an\n empty table loads. */\nconst regionSkeleton = useSkeletonState();\nconst isShowingSkeleton = computed(\n () => regionSkeleton.isSkeleton.value || (props.isLoading && rows.value.length === 0),\n);\n\nfunction cycleSort(columnKey: string): void {\n const active = sort.value;\n if (!active || active.columnKey !== columnKey) {\n setSort({ columnKey, direction: SortDirection.Asc });\n } else if (active.direction === SortDirection.Asc) {\n setSort({ columnKey, direction: SortDirection.Desc });\n } else {\n setSort(null);\n }\n}\n\nfunction alignClass(align: DataTableColumn<T>['align']): string {\n if (align === DataTableColumnAlign.Right) return 'text-right';\n if (align === DataTableColumnAlign.Center) return 'text-center';\n return 'text-left';\n}\n\n/** A loading cell's bar width: the column's own, else a varied share of the cell. The cell's alignment places it. */\nfunction skeletonLineWidth(column: DataTableColumn<T>, row: number, position: number): string {\n return column.skeletonWidth ?? SkeletonLineWidths[(row + position) % SkeletonLineWidths.length]!;\n}\n\n/** The expand control's own box, drawn as its placeholder. */\nconst skeletonControlClass = computed(() =>\n cn('inline-flex size-6 rounded-sm align-middle', skeletonBoxClass(regionSkeleton.animation.value)),\n);\n\nconst headerCells = computed(() =>\n props.columns.map((column) => {\n const active = sort.value;\n const isSorted = active?.columnKey === column.key;\n return {\n key: column.key,\n column,\n isSorted,\n isAscending: isSorted && active?.direction === SortDirection.Asc,\n ariaSort: isSorted\n ? active?.direction === SortDirection.Asc\n ? 'ascending'\n : 'descending'\n : column.isSortable\n ? 'none'\n : undefined,\n style: column.width ? { width: column.width } : undefined,\n class: alignClass(column.align),\n };\n }),\n);\n\n/** The column's own renderer, then its accessor — the fallback under the `cell` slot. */\nfunction renderCell(column: DataTableColumn<T>, row: T, index: number): unknown {\n if (column.cell) return column.cell(row, index);\n if (column.accessor) return column.accessor(row);\n return null;\n}\n\n/*\n * Renders a cell value: VNodes (and arrays of them) mount as markup, everything else as its display string.\n * Interpolating a VNode instead would JSON-stringify it — which throws on the VNode's circular component link.\n */\nconst CellContent: FunctionalComponent<{ value: unknown }> = ({ value }): VNodeChild => {\n if (isVNode(value)) return value;\n if (Array.isArray(value) && value.length > 0 && value.every((item) => isVNode(item))) return value as VNodeChild;\n return toDisplayString(value);\n};\nCellContent.props = ['value'];\n\n/** The current selection as a model state, carrying the range anchor. */\nfunction selectionState(): SelectionState<SelectionKey> {\n return createSelection(props.selectionMode, selectedKeys.value, selectionAnchor);\n}\n\n/** Requests the next selection, keeping its anchor and emitting only a real change. */\nfunction commitSelection(next: SelectionState<SelectionKey>): void {\n selectionAnchor = next.anchor;\n const keys = [...next.keys];\n if (!sameKeys(keys, selectedKeys.value)) setSelectedKeys(keys);\n}\n\n/** Records whether the press about to toggle a row checkbox held Shift. */\nfunction rememberGesture(event: MouseEvent): void {\n isRangeGesture = event.shiftKey;\n}\n\n/** Toggles one row — a Shift press in multiple mode selects the range from the anchor. */\nfunction toggleRow(key: SelectionKey): void {\n const state = selectionState();\n const isRange = isRangeGesture && props.selectionMode === SelectionModeToken.Multiple;\n isRangeGesture = false;\n if (isRange) commitSelection(extendSelection(state, key, selectableKeys.value));\n else if (props.selectionMode === SelectionModeToken.Single)\n commitSelection(isSelected(state, key) ? deselect(state, key) : select(state, key));\n else commitSelection(toggle(state, key));\n}\n\n/** Selects every selectable row, or clears them when all are selected. */\nfunction toggleAllRows(): void {\n commitSelection(toggleAll(selectionState(), selectableKeys.value));\n}\n\n/** Expands a collapsed row or collapses an expanded one. */\nfunction toggleExpanded(key: SelectionKey): void {\n const next = new Set(expandedKeys.value);\n if (next.has(key)) next.delete(key);\n else next.add(key);\n setExpandedKeys([...next]);\n}\n\n/** The expand chevron's classes — it points down once its row is expanded, and mirrors right to left. */\nfunction expandIconClass(isExpanded: boolean): string {\n return cn('size-4 transition-transform rtl:-scale-x-100', isExpanded && 'rotate-90 rtl:scale-x-100');\n}\n\nconst SortButtonClass =\n 'inline-flex items-center gap-1 rounded-sm transition-colors hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring';\n\nconst ExpandButtonClass =\n 'inline-flex size-6 items-center justify-center rounded-sm text-muted-foreground hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring';\n</script>\n\n<template>\n <Table\n :is-striped=\"isStriped\"\n :is-hoverable=\"resolvedHoverable\"\n :density=\"density\"\n :is-bare=\"isBare\"\n :container-class-name=\"containerClassName\"\n :has-sticky-header=\"hasStickyHeader\"\n :phone-layout=\"phoneLayout\"\n :stack-breakpoint=\"stackBreakpoint\"\n :aria-busy=\"isLoading || isShowingSkeleton || undefined\"\n >\n <!-- The heading stays as it is through a first load; only the body draws placeholder rows. -->\n <TableHead>\n <TableRow>\n <TableHeaderCell v-if=\"hasExpansion\" class=\"w-10\">\n <span class=\"sr-only\">{{ locale.t('DataTable.expandColumn', undefined, 'Details') }}</span>\n </TableHeaderCell>\n <TableHeaderCell v-if=\"hasSelection\" class=\"w-10\" data-row-control>\n <CheckboxInput\n v-if=\"selectionMode === SelectionModeToken.Multiple\"\n size=\"sm\"\n :model-value=\"headerStatus === SelectionStatus.All\"\n :is-indeterminate=\"headerStatus === SelectionStatus.Some\"\n :is-disabled=\"selectableKeys.length === 0\"\n :is-skeleton=\"false\"\n :aria-label=\"locale.t('DataTable.selectAll', undefined, 'Select all rows')\"\n @update:model-value=\"toggleAllRows\"\n />\n <span v-else class=\"sr-only\">{{ locale.t('DataTable.selectColumn', undefined, 'Select') }}</span>\n </TableHeaderCell>\n <TableHeaderCell\n v-for=\"cell in headerCells\"\n :key=\"cell.key\"\n :aria-sort=\"cell.ariaSort\"\n :style=\"cell.style\"\n :class=\"cell.class\"\n >\n <button v-if=\"cell.column.isSortable\" type=\"button\" :class=\"SortButtonClass\" @click=\"cycleSort(cell.key)\">\n <span>\n <slot name=\"header\" :column=\"cell.column\">{{ cell.column.header }}</slot>\n </span>\n <ArrowUp v-if=\"cell.isSorted && cell.isAscending\" class=\"h-3.5 w-3.5\" />\n <ArrowDown v-else-if=\"cell.isSorted\" class=\"h-3.5 w-3.5\" />\n <ArrowUpDown v-else class=\"h-3.5 w-3.5 opacity-50\" />\n </button>\n <slot v-else name=\"header\" :column=\"cell.column\">{{ cell.column.header }}</slot>\n </TableHeaderCell>\n </TableRow>\n </TableHead>\n <TableBody>\n <template v-if=\"isShowingSkeleton\">\n <slot name=\"loading\">\n <TableRow v-for=\"index in skeletonRowKeys\" :key=\"`skeleton-${index}`\" data-skeleton-row>\n <TableCell v-if=\"hasExpansion\" :class=\"StackedControlClass\" label=\"\" data-row-control>\n <span aria-hidden=\"true\" :class=\"skeletonControlClass\" />\n </TableCell>\n <TableCell v-if=\"hasSelection\" :class=\"StackedControlClass\" label=\"\" data-row-control>\n <CheckboxInput size=\"sm\" is-skeleton />\n </TableCell>\n <TableCell\n v-for=\"(column, position) in columns\"\n :key=\"column.key\"\n :label=\"String(column.header)\"\n :class=\"alignClass(column.align)\"\n >\n <SkeletonStateLine is-skeleton :width=\"skeletonLineWidth(column, index, position)\" />\n </TableCell>\n </TableRow>\n </slot>\n </template>\n <template v-else-if=\"rows.length === 0\">\n <TableRow>\n <TableCell :colspan=\"columnCount\" label=\"\" class=\"py-8 text-center text-muted-foreground\">\n <slot name=\"emptyContent\">{{ emptyText }}</slot>\n </TableCell>\n </TableRow>\n </template>\n <template v-else>\n <template v-for=\"row in rows\" :key=\"row.key\">\n <TableRow v-bind=\"row.attrs\" :class=\"row.class\">\n <TableCell v-if=\"hasExpansion\" :class=\"StackedControlClass\" label=\"\" data-row-control>\n <button\n v-if=\"row.isExpandable\"\n type=\"button\"\n :class=\"ExpandButtonClass\"\n :aria-expanded=\"row.isExpanded\"\n :aria-controls=\"row.isExpanded ? row.detailId : undefined\"\n :aria-label=\"\n row.isExpanded\n ? locale.t('DataTable.collapseRow', undefined, 'Hide details')\n : locale.t('DataTable.expandRow', undefined, 'Show details')\n \"\n @click=\"toggleExpanded(row.key)\"\n >\n <ChevronRight :class=\"expandIconClass(row.isExpanded)\" />\n </button>\n </TableCell>\n <TableCell\n v-if=\"hasSelection\"\n :class=\"StackedControlClass\"\n label=\"\"\n data-row-control\n @click.capture=\"rememberGesture\"\n >\n <CheckboxInput\n size=\"sm\"\n :model-value=\"row.isSelected\"\n :is-disabled=\"!row.isSelectable\"\n :aria-label=\"locale.t('DataTable.selectRow', undefined, 'Select row')\"\n @update:model-value=\"toggleRow(row.key)\"\n />\n </TableCell>\n <TableCell\n v-for=\"column in columns\"\n :key=\"column.key\"\n :label=\"String(column.header)\"\n :class=\"alignClass(column.align)\"\n >\n <slot name=\"cell\" :row=\"row.row\" :column=\"column\" :index=\"row.index\"\n ><CellContent :value=\"renderCell(column, row.row, row.index)\"\n /></slot>\n </TableCell>\n </TableRow>\n <TableRow v-if=\"row.isExpandable && row.isExpanded\" :id=\"row.detailId\" data-detail-row>\n <TableCell :colspan=\"columnCount\" label=\"\" class=\"bg-muted/30\">\n <slot name=\"expanded\" :row=\"row.row\" :index=\"row.index\" />\n </TableCell>\n </TableRow>\n </template>\n </template>\n </TableBody>\n </Table>\n</template>\n"],"names":["_useSlots","SelectionModeToken","result","_createBlock","_unref","Table","_createVNode","TableHead","TableRow","TableHeaderCell","_createElementVNode","_toDisplayString","CheckboxInput","_openBlock","_createElementBlock","_Fragment","_renderList","_normalizeStyle","_normalizeClass","_renderSlot","TableBody","TableCell","_mergeProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;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