@entifix/react-controls 0.23.11 → 0.23.13
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/i18n/catalog/en.d.ts.map +1 -1
- package/dist/i18n/catalog/en.js +1 -0
- package/dist/i18n/catalog/en.js.map +1 -1
- package/dist/i18n/catalog/es.d.ts +1 -0
- package/dist/i18n/catalog/es.d.ts.map +1 -1
- package/dist/i18n/catalog/es.js +1 -0
- package/dist/i18n/catalog/es.js.map +1 -1
- package/dist/i18n/catalog/index.d.ts +2 -0
- package/dist/i18n/catalog/index.d.ts.map +1 -1
- package/dist/ui/molecules/entity-link-input/entity-link-input.d.ts +7 -1
- package/dist/ui/molecules/entity-link-input/entity-link-input.d.ts.map +1 -1
- package/dist/ui/molecules/entity-link-input/entity-link-input.js +6 -4
- package/dist/ui/molecules/entity-link-input/entity-link-input.js.map +1 -1
- package/dist/ui/molecules/entity-link-multi-input/entity-link-multi-input.d.ts +1 -1
- package/dist/ui/molecules/entity-link-multi-input/entity-link-multi-input.js +4 -4
- package/dist/ui/molecules/entity-link-multi-input/entity-link-multi-input.js.map +1 -1
- package/dist/ui/molecules/entity-link-picker/entity-link-picker.d.ts +3 -1
- package/dist/ui/molecules/entity-link-picker/entity-link-picker.d.ts.map +1 -1
- package/dist/ui/molecules/entity-link-picker/entity-link-picker.js +4 -1
- package/dist/ui/molecules/entity-link-picker/entity-link-picker.js.map +1 -1
- package/dist/ui/organisms/entity-form/entity-form.d.ts.map +1 -1
- package/dist/ui/organisms/entity-form/entity-form.js +26 -9
- package/dist/ui/organisms/entity-form/entity-form.js.map +1 -1
- package/dist/ui/organisms/entity-table/entity-table.d.ts +1 -1
- package/dist/ui/organisms/entity-table/entity-table.d.ts.map +1 -1
- package/dist/ui/organisms/entity-table/entity-table.js +4 -2
- package/dist/ui/organisms/entity-table/entity-table.js.map +1 -1
- package/dist/ui/organisms/entity-table/entity-table.types.d.ts +6 -0
- package/dist/ui/organisms/entity-table/entity-table.types.d.ts.map +1 -1
- package/dist/ui/organisms/entity-table/entity-table.types.js.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/ui/organisms/entity-table/entity-table.tsx"],"sourcesContent":["'use client';\n\nimport {\n canNameRecord,\n emptySelection,\n type Entity,\n type EntityId,\n type EntitySelection,\n type EntitySorting,\n extractMetaEntity,\n type FilterGroup,\n hierarchyOf,\n isSelected,\n isTextMember,\n queryPropertyFor,\n recordLabel,\n selectionSize,\n toggleSelected,\n type UseCaseDescriptor,\n} from '@entifix/core';\nimport {\n Fragment,\n type ReactNode,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport {\n useEntityNoun,\n useLocale,\n useT,\n useTranslateKey,\n} from '../../../i18n/index.js';\nimport {\n availableUseCases,\n renderAnchor,\n useCasesForSurface,\n} from '../../actions/index.js';\nimport { useVerbInvoker } from '../../actions/use-verb-invoker.js';\nimport { Button, button } from '../../atoms/button/index.js';\nimport { CellValue, useRecordLabel } from '../../atoms/cell-value/index.js';\nimport { Checkbox } from '../../atoms/field/index.js';\nimport { Skeleton } from '../../atoms/skeleton/index.js';\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeaderCell,\n TableMessageRow,\n TableRow,\n} from '../../atoms/table/index.js';\nimport { linkClassName } from '../../atoms/text/index.js';\nimport {\n ActionBar,\n type ActionBarItem,\n itemsForUseCases,\n} from '../../molecules/action-bar/index.js';\nimport { BulkActionBar } from '../../molecules/bulk-action-bar/index.js';\nimport { BulkResult } from '../../molecules/bulk-result/index.js';\nimport { ColumnSettings } from '../../molecules/column-settings/index.js';\nimport { EntityRecordCard } from '../../molecules/entity-record-card/index.js';\nimport { FilterBuilder } from '../../molecules/filter-builder/index.js';\nimport { FilterChips } from '../../molecules/filter-chips/index.js';\nimport { LoadingBoundary } from '../../molecules/loading-boundary/index.js';\nimport { Pagination } from '../../molecules/pagination/index.js';\nimport { RegionState } from '../../molecules/region-state/index.js';\nimport { SortBuilder } from '../../molecules/sort-builder/index.js';\nimport { TableToolbar } from '../../molecules/table-toolbar/index.js';\nimport { useFocusOnLoss } from '../../utils/use-focus-on-arrival.js';\nimport { cardRoles } from './card-roles.js';\nimport type {\n EntityTableColumn,\n EntityTableProps,\n} from './entity-table.types.js';\nimport { readEntityTableSlots } from './entity-table-slots.js';\nimport { shownTreeRows, TreeCell, treeRows } from './entity-table-tree.js';\nimport { nextHeaderSorting, sortKeys } from './header-sort.js';\nimport {\n ACTIONS_WIDTH,\n columnWidth,\n pivotClasses,\n pivotWidths,\n SELECTION_WIDTH,\n} from './pivot.js';\nimport { useEntityTableColumns } from './use-entity-table-columns.js';\nimport { useResultAnnouncement } from './use-result-announcement.js';\n\ntype Panel = 'none' | 'filters' | 'sorting';\n\n/**\n * How many placeholder rows the built-in skeleton draws.\n *\n * The column count is taken from the real geometry, because that is the axis a\n * mismatch shifts; the row count is capped instead of tracking `pageSize`, since\n * a fifty-row page would otherwise paint fifty shimmer rows to stand in for\n * content that arrives below the fold anyway.\n */\nconst SKELETON_ROW_CAP = 5;\n\n/** How many members a card shows as meta when none declares a `card` role. */\nconst UNDECLARED_META_CAP = 3;\n\n/**\n * The name of the leading column a table adds when nothing on screen names a\n * row. Not a member name an entity can declare, so it never collides.\n */\nconst RECORD_COLUMN = '$record';\n\n/**\n * A table that builds itself from an entity's metadata: columns, labels, value\n * formatting and the filter/sort controls all come from `@accessor()`\n * declarations, so listing a new entity needs no bespoke table.\n *\n * Three things layer on top of that default:\n * - **personalization** — column order and visibility, persisted through the\n * UI-preferences port (so it survives reloads and can later move server-side);\n * - **responsiveness** — below `pivotBreakpoint` rows pivot into label/value\n * cards instead of scrolling sideways;\n * - **slots** — `<EntityColumn>` / `<EntityTableHeader>` / `<EntityTableRow>` /\n * `<EntityTableToolbar>` children override any part of the default rendering.\n */\n/**\n * What a pending verb will act on once it is confirmed.\n *\n * A form has one record; a table has a row or a selection, and those reach two\n * different handlers with two different payloads. Carrying the selection itself\n * rather than reading it back at confirm time also removes a branch that could\n * not happen: the bulk bar only renders inside a truthy selection.\n */\ntype PendingTarget<TEntity extends Entity> =\n | { kind: 'row'; item: TEntity }\n | { kind: 'selection'; selection: EntitySelection<TEntity> };\n\nexport function EntityTable<TEntity extends Entity>({\n entityConstructor,\n isLoading,\n skeleton = true,\n error,\n items,\n totalItems,\n currentPage,\n pageSize,\n onPageChange,\n onPageSizeChange,\n hrefFor,\n newHref,\n renderLink = renderAnchor,\n onSelect,\n preferencesKey,\n hiddenColumns,\n showKey = false,\n showControls = true,\n pivotBreakpoint,\n filtering,\n sorting,\n onFilteringChange,\n onSortingChange,\n facets,\n selection,\n onSelectionChange,\n metadata,\n isMetadataLoading = false,\n onBulkUseCase,\n onUseCase,\n onRetry,\n bulkOutcomes,\n onBulkDismiss,\n onBulkRetry,\n isBulkRunning = false,\n children,\n}: EntityTableProps<TEntity>) {\n const t = useT();\n // A descriptor's label is a runtime catalog key — the typed gate cannot see\n // it, which is why a host's catalog check is what catches a typo.\n const translateKey = useTranslateKey();\n const entityNoun = useEntityNoun();\n const metaEntity = extractMetaEntity(entityConstructor);\n const slots = readEntityTableSlots<TEntity>(children);\n const [panel, setPanel] = useState<Panel>('none');\n\n const {\n columns,\n visibleColumns: resolvedColumns,\n hidden,\n setPersonalization,\n } = useEntityTableColumns<TEntity>(\n entityConstructor,\n slots.columns,\n items[0],\n `entity-table:${preferencesKey ?? metaEntity.key ?? metaEntity.name}`,\n hiddenColumns,\n showKey,\n );\n const nameOf = useRecordLabel();\n /**\n * How a row names itself — to a screen reader on its checkbox, in a confirm\n * dialog, a bulk result, a tree toggle: what the reader reads the row *as*\n * (\"Seleccionar Acme\", never \"Seleccionar fila 3\" and never a whole id),\n * through the one derivation every surface shares.\n */\n const rowLabel = (item: TEntity): string => nameOf(entityConstructor, item);\n\n /**\n * The column every row reads as — the entity's `labelMember`, else its\n * declared card title, else the first **text** member that is not a key. A\n * status, a quantity or a date is a value the record holds, never what it is\n * called, which is the rule `recordLabel()` names a record by.\n */\n const titleOf = (candidates: Array<EntityTableColumn<TEntity>>) =>\n candidates.find(column => column.name === metaEntity.labelMember) ??\n candidates.find(column => column.card === 'title') ??\n candidates.find(column => canNameRecord(column) && isTextMember(column));\n /**\n * A record nothing on screen names — an order, a movement, a payout, or a\n * row whose naming column the reader has hidden — gets a leading column of\n * its own that reads as the record: its noun and short id, as every other\n * surface names it. Without it the grid's link landed on a number or an\n * enum, or on no cell at all.\n */\n const namedTitle = titleOf(resolvedColumns);\n /**\n * The title column, held in view at the inline start while a grid wider than\n * its container scrolls — the naming column, or the record column above.\n */\n const stickyTitle: EntityTableColumn<TEntity> = namedTitle ?? {\n name: RECORD_COLUMN,\n key: RECORD_COLUMN,\n label: entityNoun(metaEntity),\n type: 'string',\n sortable: false,\n filterable: false,\n order: -1,\n readonly: false,\n required: false,\n linkLabelProperty: 'name',\n linkSearchProperty: 'name',\n linkSerialization: 'id',\n resetOnClone: false,\n card: 'title',\n render: rowLabel,\n virtual: true,\n };\n const visibleColumns =\n namedTitle === undefined\n ? [stickyTitle, ...resolvedColumns]\n : resolvedColumns;\n\n // A picker's table is choosing *one* value; a multi-selection there would\n // offer a set to a form member that holds a single reference, and the two\n // controls would fight over the same row. This is a wiring mistake rather\n // than a state, so it costs the render — the same call `EntityForm` makes\n // for a link source aimed at a member no picker can edit.\n if (onSelect !== undefined && selection !== undefined) {\n throw new Error(\n 'EntityTable was given both `onSelect` and `selection`. A picker picks one ' +\n 'row and a selection accumulates many, so the row control cannot be both. ' +\n 'Drop `selection` inside a picker, or drop `onSelect` outside one.',\n );\n }\n\n /**\n * The selection, or `undefined` when the table is not selectable at all.\n *\n * One value rather than a `selection` prop beside a `selectable` boolean:\n * two of them means every render site has to re-test both, and the second\n * test is unreachable — which reads as a defensive check and is really dead\n * code the coverage gate then cannot close.\n */\n const selectionState =\n selection !== undefined && onSelectionChange !== undefined\n ? selection\n : undefined;\n const selectable = selectionState !== undefined;\n const rowUseCases = useCasesForSurface('row-menu', metadata?.useCases);\n const bulkUseCases = useCasesForSurface('bulk-bar', metadata?.useCases);\n const toolbarUseCases = useCasesForSurface(\n 'table-toolbar',\n metadata?.useCases,\n );\n const hasRowMenu = rowUseCases.length > 0 && onUseCase !== undefined;\n\n /**\n * What a `context-independent` collection verb acts on: everything the\n * current filter matches.\n *\n * Not an empty `ids` selection, which would say \"no rows\" — the verb is\n * available *without* a selection precisely because its subject is the\n * collection, so the honest payload is the same filter the listing is\n * showing, and the same one a \"select all matching\" escalation would send.\n */\n const everythingMatching: EntitySelection<TEntity> = {\n mode: 'matching',\n filtering,\n total: totalItems,\n excluded: new Set<EntityId>(),\n };\n\n // Opening a record is its title's link, so a row needs an actions column\n // only to pick it or to run a verb on it.\n const hasRowAction = onSelect !== undefined || hasRowMenu;\n const columnCount =\n visibleColumns.length + (hasRowAction ? 1 : 0) + (selectable ? 1 : 0);\n\n /**\n * The grid and the cards are both rendered, and a container query on the\n * table's own box picks one — at the width its visible columns need. A\n * viewport breakpoint was wrong inside a split view, a drawer or a wizard\n * step, and a JS measurement would guess during SSR and correct after mount.\n */\n const widths = pivotWidths({\n columns: visibleColumns,\n title: stickyTitle,\n roleOf: cardRoles(visibleColumns),\n extra:\n (selectable ? SELECTION_WIDTH : 0) + (hasRowAction ? ACTIONS_WIDTH : 0),\n breakpoint: pivotBreakpoint,\n });\n const pivot = pivotClasses(widths.essential);\n /**\n * The sticky title's cells: opaque, so the columns scrolling under it never\n * show through — a header cell on the header's surface, a row's on the\n * row's, following its hover.\n */\n const stickyClass = (\n column: EntityTableColumn<TEntity>,\n part: 'header' | 'body',\n ) =>\n column !== stickyTitle\n ? undefined\n : part === 'header'\n ? 'sticky start-0 z-2 bg-surface'\n : 'sticky start-0 z-1 bg-surface-elevated group-hover/row:bg-surface';\n /**\n * The first load has nothing to show and is held with a skeleton; a refetch\n * already has rows, so it keeps them and only marks the region busy. Splitting\n * the two is what stops every pagination click flashing grey.\n */\n const isFirstLoad = isLoading && items.length === 0;\n /** Loaded, nothing came back, and nothing failed: there are no rows to lay out. */\n const settledEmpty = items.length === 0 && !isLoading && error === undefined;\n\n /** `true`/omitted → the built-in default; a node → that node; `false` → none. */\n const customSkeleton = typeof skeleton === 'boolean' ? undefined : skeleton;\n const showSkeleton = isFirstLoad && skeleton !== false;\n const skeletonRows = Array.from(\n { length: Math.min(pageSize, SKELETON_ROW_CAP) },\n (_, index) => index,\n );\n\n /**\n * A refetch keeps its rows at full contrast and marks them `aria-busy`:\n * dimming them through opacity took the text under the contrast a reader\n * needs, on every page change.\n */\n const busy = isLoading || undefined;\n\n /**\n * The column a row reads *as*: the member `recordLabel()` names it by, when\n * the reader has not hidden that column; else one declared `card: 'title'`;\n * else the first visible text one it filled in that is not a key; else the\n * table's title column, whose empty cell then reads as the record's label.\n * So every row has exactly one open link, and it is never a number or an\n * enum.\n */\n const declaredTitle = visibleColumns.find(column => column.card === 'title');\n const linkColumn = (item: TEntity) => {\n const label = recordLabel(entityConstructor, item);\n const named =\n label.kind === 'fallback'\n ? undefined\n : visibleColumns.find(column => column.name === label.member.name);\n return (\n named ??\n declaredTitle ??\n visibleColumns.find(column => {\n const value = (item as Record<string, unknown>)[column.name];\n return (\n canNameRecord(column) &&\n isTextMember(column) &&\n value != null &&\n String(value) !== ''\n );\n }) ??\n stickyTitle\n );\n };\n\n /**\n * What a record's card shows, by each member's declared `card` role or the\n * default: an id is hidden, the first enum is the badge, and up to\n * {@link UNDECLARED_META_CAP} more members are meta — a card is a summary,\n * and the grid holds the rest.\n */\n const roleOf = cardRoles(visibleColumns);\n const cardParts = (item: TEntity) => {\n const title = linkColumn(item);\n const rest = visibleColumns.filter(column => column !== title);\n let undeclared = 0;\n return {\n title,\n subtitle: rest.find(column => roleOf(column) === 'subtitle'),\n badges: rest.filter(column => roleOf(column) === 'badge'),\n meta: rest.filter(column => {\n if (roleOf(column) !== 'meta') return false;\n if (column.card !== undefined) return true;\n undeclared += 1;\n return undeclared <= UNDECLARED_META_CAP;\n }),\n };\n };\n\n const renderValue = (\n column: EntityTableColumn<TEntity>,\n item: TEntity,\n ): ReactNode =>\n column.render ? (\n column.render(item)\n ) : (\n <CellValue\n value={(item as Record<string, unknown>)[column.name]}\n descriptor={column}\n record={item as Record<string, unknown>}\n />\n );\n\n /**\n * A cell, and the row's title cell is the record's link\n * ([ADR 0026](../../../../../../../docs/adr/0026-actions-hierarchy-overflow-and-destructive-verbs.md)).\n * A column of identical \"Open\" links named nothing, and a reader tabbing\n * down it heard \"Open\" once per row; the title says which record it opens.\n * A picker's rows are chosen, not opened, so they stay plain.\n */\n const renderCell = (\n column: EntityTableColumn<TEntity>,\n item: TEntity,\n ): ReactNode => {\n if (linkColumn(item).name !== column.name) return renderValue(column, item);\n // The row's title cell left empty still reads as the record.\n const raw = (item as Record<string, unknown>)[column.name];\n const blank = column.render === undefined && (raw == null || raw === '');\n const value = blank ? rowLabel(item) : renderValue(column, item);\n if (hrefFor === undefined || onSelect !== undefined) return value;\n return renderLink({\n href: hrefFor(item.id),\n className: linkClassName,\n children: value,\n intent: { kind: 'open', id: item.id },\n });\n };\n\n /**\n * The row a shift-click ranges *from* — the last box the user actually\n * toggled. Held in a ref rather than state because it changes nothing on\n * screen, and re-rendering the whole table on every click to remember an\n * anchor is a cost with no visible return.\n */\n const anchorIndex = useRef<number | undefined>(undefined);\n\n /**\n * An entity that declares a parent renders as a tree: the page arranged\n * depth first, its first column indented, and a subtree hidden while its\n * record is collapsed. Collapsing is view state, so it lives here and is\n * forgotten with the table, like the shift-click anchor above.\n */\n const treeKeys = useMemo(\n () => hierarchyOf(entityConstructor),\n [entityConstructor],\n );\n const [collapsed, setCollapsed] = useState<ReadonlySet<string>>(\n () => new Set(),\n );\n const rows = useMemo(() => treeRows(items, treeKeys), [items, treeKeys]);\n const shown = shownTreeRows(rows, collapsed);\n const shownItems = shown.map(row => row.item);\n const toggleCollapsed = (key: string) =>\n setCollapsed(current => {\n const next = new Set(current);\n if (next.has(key)) next.delete(key);\n else next.add(key);\n return next;\n });\n\n const setSelection = (next: EntitySelection<TEntity>) =>\n onSelectionChange?.(next);\n\n const toggleRow = (\n index: number,\n checked: boolean,\n shiftKey: boolean,\n current: EntitySelection<TEntity>,\n ) => {\n // A shift-click extends the last toggle across the rows *on this page*, in\n // the direction the user dragged, and applies the new state to all of them.\n const from = shiftKey ? (anchorIndex.current ?? index) : index;\n const [start, end] = from <= index ? [from, index] : [index, from];\n\n let next = current;\n // The rows as shown: in a tree the order on screen is not the load's.\n for (const row of shownItems.slice(start, end + 1)) {\n next = toggleSelected(next, row.id, checked);\n }\n\n anchorIndex.current = index;\n setSelection(next);\n };\n\n /**\n * The header box, and it has three states rather than two: none of this\n * page's rows selected, all of them, or some. Without the third the box\n * reads as \"nothing is selected\" while a bulk bar sits below it saying\n * otherwise.\n */\n const pageIds = items.map(item => item.id);\n const selectedOnPage = selectionState\n ? pageIds.filter(id => isSelected(selectionState, id)).length\n : 0;\n const allOnPageSelected =\n pageIds.length > 0 && selectedOnPage === pageIds.length;\n const someOnPageSelected = selectedOnPage > 0 && !allOnPageSelected;\n\n const toggleAllOnPage = (\n checked: boolean,\n current: EntitySelection<TEntity>,\n ) => {\n let next = current;\n for (const id of pageIds) next = toggleSelected(next, id, checked);\n anchorIndex.current = undefined;\n setSelection(next);\n };\n\n const selectionCell = (\n item: TEntity,\n index: number,\n // Passed in rather than closed over: this is only ever called under\n // `selectable`, which already proves the selection exists, and reading the\n // optional prop here would add a fallback arm that nothing can reach.\n current: EntitySelection<TEntity>,\n ) => (\n <Checkbox\n // Deliberately no `id`: both pivots are always in the DOM, so an id here\n // would be emitted twice per row. `aria-label` names the control instead,\n // and it names the *record* rather than the position.\n aria-label={t('table.selectRow', { record: rowLabel(item) })}\n checked={isSelected(current, item.id)}\n disabled={isBulkRunning}\n onChange={event =>\n toggleRow(\n index,\n event.currentTarget.checked,\n (event.nativeEvent as MouseEvent).shiftKey === true,\n current,\n )\n }\n />\n );\n\n const runTarget = (key: string, target: PendingTarget<TEntity>) => {\n if (target.kind === 'row') onUseCase?.(key, target.item);\n else onBulkUseCase?.(key, target.selection);\n };\n\n /**\n * Every verb on the table goes through here — the row menu, the bulk bar and\n * the toolbar — so none reaches a destructive verb around its confirmation,\n * its typed check or its Undo.\n */\n const verbs = useVerbInvoker<PendingTarget<TEntity>>({\n run: runTarget,\n busy: isBulkRunning,\n served: metadata?.useCases,\n });\n\n // The row a verb last ran on. Its menu trigger unmounts when the verb moved\n // the record out of every state a row verb applies to, and focus then goes\n // to that row's own link or control rather than `<body>`.\n const rowScope = useId();\n const [lastRow, setLastRow] = useState<string | undefined>(undefined);\n useFocusOnLoss(\n () =>\n lastRow === undefined ? undefined : focusableIn(`${rowScope}${lastRow}`),\n shown\n .map(({ item }) =>\n availableUseCases(rowUseCases, item)\n .map(({ key }) => key)\n .join(','),\n )\n .join(' '),\n );\n\n const invoke = (\n useCase: UseCaseDescriptor,\n target: PendingTarget<TEntity>,\n ) => {\n if (target.kind === 'row') {\n setLastRow(String(target.item.id));\n verbs.invoke({\n descriptor: useCase,\n target,\n object: rowLabel(target.item),\n count: 1,\n });\n return;\n }\n const count = selectionSize(target.selection);\n verbs.invoke({\n descriptor: useCase,\n target,\n object: t('confirm.selection', {\n count,\n label: entityNoun(metaEntity),\n plural: entityNoun(metaEntity, 'plural'),\n }),\n count,\n matching: target.selection.mode === 'matching',\n });\n };\n\n const rowMenu = (item: TEntity) =>\n hasRowMenu ? (\n <ActionBar\n surface=\"row-menu\"\n menuLabel={t('actions.forRecord', { record: rowLabel(item) })}\n items={itemsForUseCases(\n availableUseCases(rowUseCases, item),\n translateKey,\n useCase => invoke(useCase, { kind: 'row', item }),\n )}\n />\n ) : undefined;\n\n /**\n * A picker's Select, then the row's verbs. Opening the record is not here:\n * it is the title's link.\n */\n const recordAction = (item: TEntity) => {\n const pick = onSelect ? (\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"sm\"\n onClick={() => onSelect(item)}\n >\n {t('table.select')}\n </Button>\n ) : undefined;\n\n const menu = rowMenu(item);\n if (!menu) return pick;\n\n return (\n <span className=\"flex items-center gap-2xs\">\n {pick}\n {menu}\n </span>\n );\n };\n\n /**\n * \"New\" is the list's primary, and only where something can be created\n * here: the entity is not one only a flow writes (`creatable: false`), and\n * the caller may write it. A list that offered \"New\" to a reader who could\n * never save opened a form with no Save on it.\n */\n const mayCreate =\n newHref !== undefined &&\n metaEntity.creatable &&\n (metadata === undefined || metadata.actions.includes('write'));\n const toolbarItems: ActionBarItem[] = itemsForUseCases(\n toolbarUseCases,\n translateKey,\n useCase =>\n invoke(useCase, { kind: 'selection', selection: everythingMatching }),\n isBulkRunning,\n );\n const declaresToolbarPrimary = toolbarItems.some(\n item => item.emphasis === 'primary',\n );\n const toolbarActions: ActionBarItem[] = [\n ...(mayCreate\n ? [\n {\n key: 'new',\n label: t('table.new'),\n emphasis: declaresToolbarPrimary\n ? ('default' as const)\n : ('primary' as const),\n href: newHref,\n intent: { kind: 'new' as const },\n },\n ]\n : []),\n ...toolbarItems,\n ];\n\n const locale = useLocale();\n const panelId = useId();\n const keys = sortKeys(sorting, columns);\n const activeFilters = filtering?.values.length ?? 0;\n const results = t('table.results', { count: totalItems });\n\n /**\n * What the status region says once a filter, a sort or a page has settled —\n * debounced, and silent on the first load.\n */\n const announcement = useResultAnnouncement(\n !isLoading,\n totalItems === 0 && activeFilters > 0\n ? t('table.noResultsFiltered')\n : results,\n JSON.stringify([filtering, sorting, currentPage, pageSize]),\n );\n\n /** The caption: what the table holds, how many, and in what order. */\n const primaryKey = keys[0];\n const primaryColumn =\n primaryKey === undefined\n ? undefined\n : columns.find(column => column.name === primaryKey.member);\n const caption =\n primaryKey === undefined || primaryColumn === undefined\n ? t('table.caption', {\n entity: entityNoun(metaEntity, 'plural'),\n results,\n })\n : t('table.captionSorted', {\n entity: entityNoun(metaEntity, 'plural'),\n results,\n column: primaryColumn.label,\n direction: t(\n primaryKey.type === 'asc' ? 'sort.ascending' : 'sort.descending',\n ),\n });\n\n /**\n * A column's header: its name, and — for a sortable one — a button that\n * cycles it ascending → descending → unsorted, with Shift adding it as the\n * next key. Only the primary key carries `aria-sort`.\n */\n const headerCell = (column: EntityTableColumn<TEntity>) => {\n const label = column.header ?? column.label;\n if (!column.sortable || onSortingChange === undefined)\n return (\n <TableHeaderCell\n key={column.name}\n className={stickyClass(column, 'header')}\n >\n {label}\n </TableHeaderCell>\n );\n const position = keys.findIndex(key => key.member === column.name);\n const type = keys[position]?.type;\n return (\n <TableHeaderCell\n key={column.name}\n className={stickyClass(column, 'header')}\n aria-sort={\n position === 0\n ? type === 'asc'\n ? 'ascending'\n : 'descending'\n : undefined\n }\n >\n <button\n type=\"button\"\n className=\"inline-flex min-h-(--target-min) items-center gap-3xs rounded-sm focus-ring hover:text-content\"\n onClick={event =>\n onSortingChange(\n nextHeaderSorting<TEntity>(\n keys,\n {\n member: column.name,\n property: queryPropertyFor(column, locale),\n },\n event.shiftKey,\n ),\n )\n }\n >\n {label}\n <span aria-hidden=\"true\">\n {type === 'asc' ? '▲' : type === 'desc' ? '▼' : '↕'}\n </span>\n {keys.length > 1 && position >= 0 && (\n <span aria-hidden=\"true\" className=\"text-step-sm\">\n {position + 1}\n </span>\n )}\n </button>\n </TableHeaderCell>\n );\n };\n\n /** A panel toggle: its state said by `aria-expanded`, and its count shown. */\n const panelToggle = (which: Exclude<Panel, 'none'>, count: number) => (\n <Button\n type=\"button\"\n id={`${panelId}-${which}`}\n variant={panel === which ? 'primary' : 'secondary'}\n size=\"sm\"\n aria-expanded={panel === which}\n aria-controls={panelId}\n onClick={() => setPanel(current => (current === which ? 'none' : which))}\n >\n {t(which === 'filters' ? 'table.filters' : 'table.sorting')}\n {count > 0 && (\n // Its name stays \"Filters\": the chips say which filters, and a count\n // in the name would change it under the reader with every filter.\n <span\n aria-hidden=\"true\"\n className=\"ms-3xs rounded-full bg-surface px-3xs text-step-sm text-content\"\n >\n {count}\n </span>\n )}\n </Button>\n );\n\n return (\n <div className=\"@container/entity-table flex flex-col gap-s\">\n {/*\n One announcement for the whole table, not one per layout. Both the grid\n and the card list are always in the DOM — CSS picks which is visible —\n so a live region inside each meant assistive tech was told twice that\n the table was loading. The shimmer itself is aria-hidden, so this is the\n only thing that carries the news.\n */}\n <span role=\"status\" aria-live=\"polite\" className=\"sr-only\">\n {isFirstLoad ? t('table.loading') : announcement}\n </span>\n\n {showControls && (\n <TableToolbar\n start={\n <>\n {/* \"New\" and the collection-bound verbs that need no\n selection. They sit here rather than in the bulk bar,\n because the bulk bar only exists while rows are ticked and\n these are always available. */}\n <LoadingBoundary isLoading={isMetadataLoading} lines={0}>\n <>\n {toolbarActions.length > 0 && (\n <ActionBar\n surface=\"table-toolbar\"\n items={toolbarActions}\n renderLink={renderLink}\n />\n )}\n </>\n </LoadingBoundary>\n {slots.toolbar}\n </>\n }\n end={\n <>\n {panelToggle('filters', activeFilters)}\n {panelToggle('sorting', keys.length)}\n <ColumnSettings\n columns={columns}\n hidden={hidden}\n onChange={setPersonalization}\n />\n </>\n }\n panelId={panelId}\n panel={\n panel === 'filters' ? (\n <FilterBuilder<TEntity>\n // Remounted when the filtering changes from outside — a chip\n // removed — so its rows show what is in effect.\n key={JSON.stringify(filtering ?? null)}\n descriptors={columns.filter(column => column.filterable)}\n facets={facets}\n value={filtering}\n onChange={(applied: FilterGroup<TEntity>) =>\n onFilteringChange?.(applied)\n }\n />\n ) : panel === 'sorting' ? (\n <SortBuilder<TEntity>\n descriptors={columns.filter(column => column.sortable)}\n value={sorting}\n onChange={(applied: EntitySorting<TEntity>) =>\n onSortingChange?.(applied)\n }\n />\n ) : undefined\n }\n />\n )}\n\n {showControls && onFilteringChange !== undefined && (\n <FilterChips<TEntity>\n descriptors={columns.filter(column => column.filterable)}\n value={filtering}\n onChange={onFilteringChange}\n />\n )}\n\n {/*\n The bar appears when there is something selected and something to do\n with it. It sits above the rows rather than floating over them: a fixed\n overlay covers the last row of a short page, which is the row the user\n most likely just ticked.\n */}\n {selectionState && selectionSize(selectionState) > 0 && (\n <BulkActionBar\n count={selectionSize(selectionState)}\n useCases={bulkUseCases}\n busy={isBulkRunning}\n // Offered only when this page is fully ticked and the store holds\n // more than the page — the escalation has somewhere to escalate to.\n matchingTotal={\n selectionState.mode === 'ids' &&\n allOnPageSelected &&\n totalItems > items.length\n ? totalItems\n : undefined\n }\n onSelectAllMatching={() => setSelection(everythingMatching)}\n onClear={() => setSelection(emptySelection<TEntity>())}\n onUseCase={useCase =>\n invoke(useCase, { kind: 'selection', selection: selectionState })\n }\n />\n )}\n\n {verbs.dialog}\n\n {bulkOutcomes && bulkOutcomes.length > 0 && onBulkDismiss && (\n <BulkResult\n outcomes={bulkOutcomes}\n busy={isBulkRunning}\n labelFor={id => {\n const row = items.find(item => item.id === id);\n return row ? rowLabel(row) : undefined;\n }}\n onRetryFailed={onBulkRetry}\n onDismiss={onBulkDismiss}\n />\n )}\n\n {/*\n Rendered once, outside both layouts, and independently of whether there\n are rows: a refetch that fails leaves the previous page on screen, and\n without this the user would read stale data as current.\n */}\n {/*\n One state for the region, outside both layouts (ADR 0028): a failed\n load with Retry — and the rows from before it marked as possibly out of\n date — or an empty answer, which says whether a filter emptied it.\n */}\n <RegionState\n plural={entityNoun(metaEntity, 'plural')}\n isLoading={isLoading}\n error={error}\n onRetry={onRetry}\n hasStaleData={items.length > 0}\n isEmpty={items.length === 0}\n isFiltered={activeFilters > 0}\n onClearFilters={\n onFilteringChange === undefined\n ? undefined\n : () => {\n // The button goes with the empty state it sits in, so focus\n // moves first to the control that filters — still there, and\n // where a reader would go next — never to `<body>`.\n document.getElementById(`${panelId}-filters`)?.focus();\n onFilteringChange({\n // Only offered under a filter, so there is one to keep the\n // logic of.\n operator: (filtering as FilterGroup<TEntity>).operator,\n values: [],\n });\n }\n }\n emptyAction={\n mayCreate\n ? renderLink({\n href: newHref as string,\n className: button({ variant: 'primary' }),\n children: t('table.new'),\n intent: { kind: 'new' },\n })\n : undefined\n }\n />\n\n {/*\n A settled empty answer is the region's state alone: a grid's header\n over no rows, announced after \"nothing here\", told the reader there\n was a table to read (ADR 0028). Loading keeps the skeleton's geometry,\n and a failure keeps whatever rows it had, so nothing already on screen\n moves.\n */}\n {!settledEmpty && (\n <>\n {/* Wide viewports: a grid. */}\n <div className={pivot.grid} aria-busy={busy}>\n {/* Held to most of the viewport so the header can stick above the\n rows; the scroll padding keeps a focused row out from under it. */}\n <Table\n caption={caption}\n containerClassName=\"max-h-(--table-max-block) scroll-pt-12\"\n // Never narrower than its columns side by side: between the\n // essential width and that, the grid scrolls rather than crushing\n // every column into an unreadable sliver.\n style={{ minWidth: `${widths.full}rem` }}\n // A focused cell scrolled sideways is never left under the\n // sticky title column (WCAG 2.4.11).\n containerStyle={{\n scrollPaddingInlineStart: `${columnWidth(stickyTitle)}rem`,\n }}\n >\n <TableHead>\n {slots.header ? (\n slots.header.render(visibleColumns)\n ) : (\n <tr>\n {selectable && (\n <TableHeaderCell>\n <Checkbox\n aria-label={t('table.selectAllOnPage')}\n checked={allOnPageSelected}\n indeterminate={someOnPageSelected}\n disabled={isBulkRunning || items.length === 0}\n onChange={event =>\n toggleAllOnPage(\n event.currentTarget.checked,\n selectionState,\n )\n }\n />\n </TableHeaderCell>\n )}\n {visibleColumns.map(headerCell)}\n {hasRowAction && (\n <TableHeaderCell>{t('table.actions')}</TableHeaderCell>\n )}\n </tr>\n )}\n </TableHead>\n <TableBody>\n {/* Skeleton rows rather than the word \"Loading\", and one per column\n rather than a single full-width blob: the placeholder occupies\n the real grid, so the swap to rows shifts nothing sideways.\n `TableMessageRow` is deliberately bypassed — it is one centred\n full-span cell and cannot express the geometry. */}\n {showSkeleton &&\n (customSkeleton ? (\n <TableMessageRow colSpan={columnCount}>\n {customSkeleton}\n </TableMessageRow>\n ) : (\n skeletonRows.map(row => (\n <TableRow key={row}>\n {selectable && (\n <TableCell>\n <Skeleton shape=\"line\" className=\"w-4\" />\n </TableCell>\n )}\n {visibleColumns.map(column => (\n <TableCell key={column.name}>\n <Skeleton shape=\"line\" className=\"w-full\" />\n </TableCell>\n ))}\n {hasRowAction && (\n <TableCell>\n <Skeleton shape=\"line\" className=\"w-16\" />\n </TableCell>\n )}\n </TableRow>\n ))\n ))}\n {shown.map(({ item, depth, hasChildren }, index) =>\n slots.row ? (\n // A Fragment carries the key without wrapping the custom row in\n // an element `<tbody>` would reject.\n <Fragment key={String(item.id ?? index)}>\n {slots.row.render(item, visibleColumns)}\n </Fragment>\n ) : (\n <TableRow\n key={String(item.id ?? index)}\n data-record-id={`${rowScope}${String(item.id)}`}\n className=\"group/row\"\n >\n {selectionState && (\n <TableCell>\n {selectionCell(item, index, selectionState)}\n </TableCell>\n )}\n {visibleColumns.map((column, columnIndex) => (\n <TableCell\n key={column.name}\n className={stickyClass(column, 'body')}\n >\n {treeKeys !== undefined && columnIndex === 0 ? (\n <TreeCell\n depth={depth}\n hasChildren={hasChildren}\n expanded={!collapsed.has(treeKeys.idOf(item))}\n label={t(\n collapsed.has(treeKeys.idOf(item))\n ? 'table.expandRow'\n : 'table.collapseRow',\n { record: rowLabel(item) },\n )}\n onToggle={() =>\n toggleCollapsed(treeKeys.idOf(item))\n }\n >\n {renderCell(column, item)}\n </TreeCell>\n ) : (\n renderCell(column, item)\n )}\n </TableCell>\n ))}\n {hasRowAction && (\n <TableCell>{recordAction(item)}</TableCell>\n )}\n </TableRow>\n ),\n )}\n </TableBody>\n </Table>\n </div>\n\n {/* Narrow containers: the same columns pivoted into a list of cards. */}\n <div className={pivot.cards} aria-busy={busy}>\n {/* The card pivot gets card-shaped placeholders, not a bare shimmer\n block: the border, radius and padding are the geometry here. */}\n {showSkeleton &&\n (customSkeleton ?? (\n <ul\n role=\"list\"\n className=\"m-0 p-0 flex list-none flex-col gap-2xs\"\n >\n {skeletonRows.map(row => (\n <li key={row}>\n <EntityRecordCard\n title={<Skeleton shape=\"line\" className=\"w-32\" />}\n meta={visibleColumns.slice(1).map(column => ({\n key: column.name,\n label: column.label,\n value: <Skeleton shape=\"line\" className=\"w-24\" />,\n }))}\n />\n </li>\n ))}\n </ul>\n ))}\n {shown.length > 0 && (\n <ul\n role=\"list\"\n className=\"m-0 p-0 flex list-none flex-col gap-2xs\"\n >\n {shown.map(({ item, depth }, index) => {\n const parts = cardParts(item);\n return (\n <li\n key={String(item.id ?? index)}\n data-record-id={`${rowScope}${String(item.id)}`}\n // A tree's card says how deep it sits, as its row does.\n aria-level={\n treeKeys === undefined ? undefined : depth + 1\n }\n style={\n treeKeys === undefined\n ? undefined\n : { marginInlineStart: `${depth * 1.5}rem` }\n }\n >\n <EntityRecordCard\n // The same renderers as the grid, so the two layouts agree.\n title={renderCell(parts.title, item)}\n subtitle={\n parts.subtitle === undefined\n ? undefined\n : renderCell(parts.subtitle, item)\n }\n badges={parts.badges.map(column => ({\n key: column.name,\n value: renderCell(column, item),\n }))}\n meta={parts.meta.map(column => ({\n key: column.name,\n label: column.header ?? column.label,\n value: renderCell(column, item),\n }))}\n leading={\n selectionState\n ? selectionCell(item, index, selectionState)\n : undefined\n }\n actions={recordAction(item)}\n />\n </li>\n );\n })}\n </ul>\n )}\n </div>\n </>\n )}\n\n <Pagination\n currentPage={currentPage}\n pageSize={pageSize}\n totalItems={totalItems}\n onPageChange={onPageChange}\n onPageSizeChange={onPageSizeChange}\n />\n\n {slots.rest}\n </div>\n );\n}\n\n/**\n * The first control in a record's row or card that the reader can see. Both\n * layouts are in the DOM and CSS shows one, so a control inside the hidden\n * one is skipped. `scoped` is the record's id under this table's own prefix,\n * so a second table on the page holding the same record is never reached.\n */\nfunction focusableIn(scoped: string): HTMLElement | undefined {\n return [\n ...document.querySelectorAll<HTMLElement>(\n `[data-record-id=\"${CSS.escape(scoped)}\"] :is(a[href], button)`,\n ),\n ].find(\n control =>\n // `checkVisibility` is recent; a browser without it is asked for the\n // boxes the control lays out, which a `display: none` layout has none of.\n control.checkVisibility?.() ?? control.getClientRects().length > 0,\n );\n}\n"],"names":["canNameRecord","emptySelection","extractMetaEntity","hierarchyOf","isSelected","isTextMember","queryPropertyFor","recordLabel","selectionSize","toggleSelected","Fragment","useId","useMemo","useRef","useState","useEntityNoun","useLocale","useT","useTranslateKey","availableUseCases","renderAnchor","useCasesForSurface","useVerbInvoker","Button","button","CellValue","useRecordLabel","Checkbox","Skeleton","Table","TableBody","TableCell","TableHead","TableHeaderCell","TableMessageRow","TableRow","linkClassName","ActionBar","itemsForUseCases","BulkActionBar","BulkResult","ColumnSettings","EntityRecordCard","FilterBuilder","FilterChips","LoadingBoundary","Pagination","RegionState","SortBuilder","TableToolbar","useFocusOnLoss","cardRoles","readEntityTableSlots","shownTreeRows","TreeCell","treeRows","nextHeaderSorting","sortKeys","ACTIONS_WIDTH","columnWidth","pivotClasses","pivotWidths","SELECTION_WIDTH","useEntityTableColumns","useResultAnnouncement","SKELETON_ROW_CAP","UNDECLARED_META_CAP","RECORD_COLUMN","EntityTable","entityConstructor","isLoading","skeleton","error","items","totalItems","currentPage","pageSize","onPageChange","onPageSizeChange","hrefFor","newHref","renderLink","onSelect","preferencesKey","hiddenColumns","showKey","showControls","pivotBreakpoint","filtering","sorting","onFilteringChange","onSortingChange","facets","selection","onSelectionChange","metadata","isMetadataLoading","onBulkUseCase","onUseCase","onRetry","bulkOutcomes","onBulkDismiss","onBulkRetry","isBulkRunning","children","t","translateKey","entityNoun","metaEntity","slots","panel","setPanel","columns","visibleColumns","resolvedColumns","hidden","setPersonalization","key","name","nameOf","rowLabel","item","titleOf","candidates","find","column","labelMember","card","namedTitle","stickyTitle","label","type","sortable","filterable","order","readonly","required","linkLabelProperty","linkSearchProperty","linkSerialization","resetOnClone","render","virtual","undefined","Error","selectionState","selectable","rowUseCases","useCases","bulkUseCases","toolbarUseCases","hasRowMenu","length","everythingMatching","mode","total","excluded","Set","hasRowAction","columnCount","widths","title","roleOf","extra","breakpoint","pivot","essential","stickyClass","part","isFirstLoad","settledEmpty","customSkeleton","showSkeleton","skeletonRows","Array","from","Math","min","_","index","busy","declaredTitle","linkColumn","named","kind","member","value","String","cardParts","rest","filter","undeclared","subtitle","badges","meta","renderValue","descriptor","record","renderCell","raw","blank","href","id","className","intent","anchorIndex","treeKeys","collapsed","setCollapsed","rows","shown","shownItems","map","row","toggleCollapsed","current","next","has","delete","add","setSelection","toggleRow","checked","shiftKey","start","end","slice","pageIds","selectedOnPage","allOnPageSelected","someOnPageSelected","toggleAllOnPage","selectionCell","aria-label","disabled","onChange","event","currentTarget","nativeEvent","runTarget","target","verbs","run","served","rowScope","lastRow","setLastRow","focusableIn","join","invoke","useCase","object","count","plural","matching","rowMenu","surface","menuLabel","recordAction","pick","variant","size","onClick","menu","span","mayCreate","creatable","actions","includes","toolbarItems","declaresToolbarPrimary","some","emphasis","toolbarActions","locale","panelId","keys","activeFilters","values","results","announcement","JSON","stringify","primaryKey","primaryColumn","caption","entity","direction","headerCell","header","position","findIndex","aria-sort","property","aria-hidden","panelToggle","which","aria-expanded","aria-controls","div","role","aria-live","lines","toolbar","descriptors","applied","matchingTotal","onSelectAllMatching","onClear","dialog","outcomes","labelFor","onRetryFailed","onDismiss","hasStaleData","isEmpty","isFiltered","onClearFilters","document","getElementById","focus","operator","emptyAction","grid","aria-busy","containerClassName","style","minWidth","full","containerStyle","scrollPaddingInlineStart","tr","indeterminate","colSpan","shape","depth","hasChildren","data-record-id","columnIndex","expanded","idOf","onToggle","cards","ul","li","parts","aria-level","marginInlineStart","leading","scoped","querySelectorAll","CSS","escape","control","checkVisibility","getClientRects"],"mappings":"AAAA;;AAEA,SACEA,aAAa,EACbC,cAAc,EAKdC,iBAAiB,EAEjBC,WAAW,EACXC,UAAU,EACVC,YAAY,EACZC,gBAAgB,EAChBC,WAAW,EACXC,aAAa,EACbC,cAAc,QAET,gBAAgB;AACvB,SACEC,QAAQ,EAERC,KAAK,EACLC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,QAAQ;AAEf,SACEC,aAAa,EACbC,SAAS,EACTC,IAAI,EACJC,eAAe,QACV,yBAAyB;AAChC,SACEC,iBAAiB,EAC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QC,eAAe,oBAAvBD,QAAQC,eAAe,MAAvBD,2BAA+BA,QAAQE,cAAc,GAAG3M,MAAM,GAAG;;AAEvE"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/ui/organisms/entity-table/entity-table.tsx"],"sourcesContent":["'use client';\n\nimport {\n canNameRecord,\n emptySelection,\n type Entity,\n type EntityId,\n type EntitySelection,\n type EntitySorting,\n extractMetaEntity,\n type FilterGroup,\n hierarchyOf,\n isSelected,\n isTextMember,\n queryPropertyFor,\n recordLabel,\n selectionSize,\n toggleSelected,\n type UseCaseDescriptor,\n} from '@entifix/core';\nimport {\n Fragment,\n type ReactNode,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport {\n useEntityNoun,\n useLocale,\n useT,\n useTranslateKey,\n} from '../../../i18n/index.js';\nimport {\n availableUseCases,\n renderAnchor,\n useCasesForSurface,\n} from '../../actions/index.js';\nimport { useVerbInvoker } from '../../actions/use-verb-invoker.js';\nimport { Button, button } from '../../atoms/button/index.js';\nimport { CellValue, useRecordLabel } from '../../atoms/cell-value/index.js';\nimport { Checkbox } from '../../atoms/field/index.js';\nimport { Skeleton } from '../../atoms/skeleton/index.js';\nimport {\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableHeaderCell,\n TableMessageRow,\n TableRow,\n} from '../../atoms/table/index.js';\nimport { linkClassName } from '../../atoms/text/index.js';\nimport {\n ActionBar,\n type ActionBarItem,\n itemsForUseCases,\n} from '../../molecules/action-bar/index.js';\nimport { BulkActionBar } from '../../molecules/bulk-action-bar/index.js';\nimport { BulkResult } from '../../molecules/bulk-result/index.js';\nimport { ColumnSettings } from '../../molecules/column-settings/index.js';\nimport { EntityRecordCard } from '../../molecules/entity-record-card/index.js';\nimport { FilterBuilder } from '../../molecules/filter-builder/index.js';\nimport { FilterChips } from '../../molecules/filter-chips/index.js';\nimport { LoadingBoundary } from '../../molecules/loading-boundary/index.js';\nimport { Pagination } from '../../molecules/pagination/index.js';\nimport { RegionState } from '../../molecules/region-state/index.js';\nimport { SortBuilder } from '../../molecules/sort-builder/index.js';\nimport { TableToolbar } from '../../molecules/table-toolbar/index.js';\nimport { useFocusOnLoss } from '../../utils/use-focus-on-arrival.js';\nimport { cardRoles } from './card-roles.js';\nimport type {\n EntityTableColumn,\n EntityTableProps,\n} from './entity-table.types.js';\nimport { readEntityTableSlots } from './entity-table-slots.js';\nimport { shownTreeRows, TreeCell, treeRows } from './entity-table-tree.js';\nimport { nextHeaderSorting, sortKeys } from './header-sort.js';\nimport {\n ACTIONS_WIDTH,\n columnWidth,\n pivotClasses,\n pivotWidths,\n SELECTION_WIDTH,\n} from './pivot.js';\nimport { useEntityTableColumns } from './use-entity-table-columns.js';\nimport { useResultAnnouncement } from './use-result-announcement.js';\n\ntype Panel = 'none' | 'filters' | 'sorting';\n\n/**\n * How many placeholder rows the built-in skeleton draws.\n *\n * The column count is taken from the real geometry, because that is the axis a\n * mismatch shifts; the row count is capped instead of tracking `pageSize`, since\n * a fifty-row page would otherwise paint fifty shimmer rows to stand in for\n * content that arrives below the fold anyway.\n */\nconst SKELETON_ROW_CAP = 5;\n\n/** How many members a card shows as meta when none declares a `card` role. */\nconst UNDECLARED_META_CAP = 3;\n\n/**\n * The name of the leading column a table adds when nothing on screen names a\n * row. Not a member name an entity can declare, so it never collides.\n */\nconst RECORD_COLUMN = '$record';\n\n/**\n * A table that builds itself from an entity's metadata: columns, labels, value\n * formatting and the filter/sort controls all come from `@accessor()`\n * declarations, so listing a new entity needs no bespoke table.\n *\n * Three things layer on top of that default:\n * - **personalization** — column order and visibility, persisted through the\n * UI-preferences port (so it survives reloads and can later move server-side);\n * - **responsiveness** — below `pivotBreakpoint` rows pivot into label/value\n * cards instead of scrolling sideways;\n * - **slots** — `<EntityColumn>` / `<EntityTableHeader>` / `<EntityTableRow>` /\n * `<EntityTableToolbar>` children override any part of the default rendering.\n */\n/**\n * What a pending verb will act on once it is confirmed.\n *\n * A form has one record; a table has a row or a selection, and those reach two\n * different handlers with two different payloads. Carrying the selection itself\n * rather than reading it back at confirm time also removes a branch that could\n * not happen: the bulk bar only renders inside a truthy selection.\n */\ntype PendingTarget<TEntity extends Entity> =\n | { kind: 'row'; item: TEntity }\n | { kind: 'selection'; selection: EntitySelection<TEntity> };\n\nexport function EntityTable<TEntity extends Entity>({\n entityConstructor,\n isLoading,\n skeleton = true,\n error,\n items,\n totalItems,\n currentPage,\n pageSize,\n onPageChange,\n onPageSizeChange,\n hrefFor,\n newHref,\n renderLink = renderAnchor,\n onSelect,\n isSelectable,\n preferencesKey,\n hiddenColumns,\n showKey = false,\n showControls = true,\n pivotBreakpoint,\n filtering,\n sorting,\n onFilteringChange,\n onSortingChange,\n facets,\n selection,\n onSelectionChange,\n metadata,\n isMetadataLoading = false,\n onBulkUseCase,\n onUseCase,\n onRetry,\n bulkOutcomes,\n onBulkDismiss,\n onBulkRetry,\n isBulkRunning = false,\n children,\n}: EntityTableProps<TEntity>) {\n const t = useT();\n // A descriptor's label is a runtime catalog key — the typed gate cannot see\n // it, which is why a host's catalog check is what catches a typo.\n const translateKey = useTranslateKey();\n const entityNoun = useEntityNoun();\n const metaEntity = extractMetaEntity(entityConstructor);\n const slots = readEntityTableSlots<TEntity>(children);\n const [panel, setPanel] = useState<Panel>('none');\n\n const {\n columns,\n visibleColumns: resolvedColumns,\n hidden,\n setPersonalization,\n } = useEntityTableColumns<TEntity>(\n entityConstructor,\n slots.columns,\n items[0],\n `entity-table:${preferencesKey ?? metaEntity.key ?? metaEntity.name}`,\n hiddenColumns,\n showKey,\n );\n const nameOf = useRecordLabel();\n /**\n * How a row names itself — to a screen reader on its checkbox, in a confirm\n * dialog, a bulk result, a tree toggle: what the reader reads the row *as*\n * (\"Seleccionar Acme\", never \"Seleccionar fila 3\" and never a whole id),\n * through the one derivation every surface shares.\n */\n const rowLabel = (item: TEntity): string => nameOf(entityConstructor, item);\n\n /**\n * The column every row reads as — the entity's `labelMember`, else its\n * declared card title, else the first **text** member that is not a key. A\n * status, a quantity or a date is a value the record holds, never what it is\n * called, which is the rule `recordLabel()` names a record by.\n */\n const titleOf = (candidates: Array<EntityTableColumn<TEntity>>) =>\n candidates.find(column => column.name === metaEntity.labelMember) ??\n candidates.find(column => column.card === 'title') ??\n candidates.find(column => canNameRecord(column) && isTextMember(column));\n /**\n * A record nothing on screen names — an order, a movement, a payout, or a\n * row whose naming column the reader has hidden — gets a leading column of\n * its own that reads as the record: its noun and short id, as every other\n * surface names it. Without it the grid's link landed on a number or an\n * enum, or on no cell at all.\n */\n const namedTitle = titleOf(resolvedColumns);\n /**\n * The title column, held in view at the inline start while a grid wider than\n * its container scrolls — the naming column, or the record column above.\n */\n const stickyTitle: EntityTableColumn<TEntity> = namedTitle ?? {\n name: RECORD_COLUMN,\n key: RECORD_COLUMN,\n label: entityNoun(metaEntity),\n type: 'string',\n sortable: false,\n filterable: false,\n order: -1,\n readonly: false,\n required: false,\n linkLabelProperty: 'name',\n linkSearchProperty: 'name',\n linkSerialization: 'id',\n resetOnClone: false,\n card: 'title',\n render: rowLabel,\n virtual: true,\n };\n const visibleColumns =\n namedTitle === undefined\n ? [stickyTitle, ...resolvedColumns]\n : resolvedColumns;\n\n // A picker's table is choosing *one* value; a multi-selection there would\n // offer a set to a form member that holds a single reference, and the two\n // controls would fight over the same row. This is a wiring mistake rather\n // than a state, so it costs the render — the same call `EntityForm` makes\n // for a link source aimed at a member no picker can edit.\n if (onSelect !== undefined && selection !== undefined) {\n throw new Error(\n 'EntityTable was given both `onSelect` and `selection`. A picker picks one ' +\n 'row and a selection accumulates many, so the row control cannot be both. ' +\n 'Drop `selection` inside a picker, or drop `onSelect` outside one.',\n );\n }\n\n /**\n * The selection, or `undefined` when the table is not selectable at all.\n *\n * One value rather than a `selection` prop beside a `selectable` boolean:\n * two of them means every render site has to re-test both, and the second\n * test is unreachable — which reads as a defensive check and is really dead\n * code the coverage gate then cannot close.\n */\n const selectionState =\n selection !== undefined && onSelectionChange !== undefined\n ? selection\n : undefined;\n const selectable = selectionState !== undefined;\n const rowUseCases = useCasesForSurface('row-menu', metadata?.useCases);\n const bulkUseCases = useCasesForSurface('bulk-bar', metadata?.useCases);\n const toolbarUseCases = useCasesForSurface(\n 'table-toolbar',\n metadata?.useCases,\n );\n const hasRowMenu = rowUseCases.length > 0 && onUseCase !== undefined;\n\n /**\n * What a `context-independent` collection verb acts on: everything the\n * current filter matches.\n *\n * Not an empty `ids` selection, which would say \"no rows\" — the verb is\n * available *without* a selection precisely because its subject is the\n * collection, so the honest payload is the same filter the listing is\n * showing, and the same one a \"select all matching\" escalation would send.\n */\n const everythingMatching: EntitySelection<TEntity> = {\n mode: 'matching',\n filtering,\n total: totalItems,\n excluded: new Set<EntityId>(),\n };\n\n // Opening a record is its title's link, so a row needs an actions column\n // only to pick it or to run a verb on it.\n const hasRowAction = onSelect !== undefined || hasRowMenu;\n const columnCount =\n visibleColumns.length + (hasRowAction ? 1 : 0) + (selectable ? 1 : 0);\n\n /**\n * The grid and the cards are both rendered, and a container query on the\n * table's own box picks one — at the width its visible columns need. A\n * viewport breakpoint was wrong inside a split view, a drawer or a wizard\n * step, and a JS measurement would guess during SSR and correct after mount.\n */\n const widths = pivotWidths({\n columns: visibleColumns,\n title: stickyTitle,\n roleOf: cardRoles(visibleColumns),\n extra:\n (selectable ? SELECTION_WIDTH : 0) + (hasRowAction ? ACTIONS_WIDTH : 0),\n breakpoint: pivotBreakpoint,\n });\n const pivot = pivotClasses(widths.essential);\n /**\n * The sticky title's cells: opaque, so the columns scrolling under it never\n * show through — a header cell on the header's surface, a row's on the\n * row's, following its hover.\n */\n const stickyClass = (\n column: EntityTableColumn<TEntity>,\n part: 'header' | 'body',\n ) =>\n column !== stickyTitle\n ? undefined\n : part === 'header'\n ? 'sticky start-0 z-2 bg-surface'\n : 'sticky start-0 z-1 bg-surface-elevated group-hover/row:bg-surface';\n /**\n * The first load has nothing to show and is held with a skeleton; a refetch\n * already has rows, so it keeps them and only marks the region busy. Splitting\n * the two is what stops every pagination click flashing grey.\n */\n const isFirstLoad = isLoading && items.length === 0;\n /** Loaded, nothing came back, and nothing failed: there are no rows to lay out. */\n const settledEmpty = items.length === 0 && !isLoading && error === undefined;\n\n /** `true`/omitted → the built-in default; a node → that node; `false` → none. */\n const customSkeleton = typeof skeleton === 'boolean' ? undefined : skeleton;\n const showSkeleton = isFirstLoad && skeleton !== false;\n const skeletonRows = Array.from(\n { length: Math.min(pageSize, SKELETON_ROW_CAP) },\n (_, index) => index,\n );\n\n /**\n * A refetch keeps its rows at full contrast and marks them `aria-busy`:\n * dimming them through opacity took the text under the contrast a reader\n * needs, on every page change.\n */\n const busy = isLoading || undefined;\n\n /**\n * The column a row reads *as*: the member `recordLabel()` names it by, when\n * the reader has not hidden that column; else one declared `card: 'title'`;\n * else the first visible text one it filled in that is not a key; else the\n * table's title column, whose empty cell then reads as the record's label.\n * So every row has exactly one open link, and it is never a number or an\n * enum.\n */\n const declaredTitle = visibleColumns.find(column => column.card === 'title');\n const linkColumn = (item: TEntity) => {\n const label = recordLabel(entityConstructor, item);\n const named =\n label.kind === 'fallback'\n ? undefined\n : visibleColumns.find(column => column.name === label.member.name);\n return (\n named ??\n declaredTitle ??\n visibleColumns.find(column => {\n const value = (item as Record<string, unknown>)[column.name];\n return (\n canNameRecord(column) &&\n isTextMember(column) &&\n value != null &&\n String(value) !== ''\n );\n }) ??\n stickyTitle\n );\n };\n\n /**\n * What a record's card shows, by each member's declared `card` role or the\n * default: an id is hidden, the first enum is the badge, and up to\n * {@link UNDECLARED_META_CAP} more members are meta — a card is a summary,\n * and the grid holds the rest.\n */\n const roleOf = cardRoles(visibleColumns);\n const cardParts = (item: TEntity) => {\n const title = linkColumn(item);\n const rest = visibleColumns.filter(column => column !== title);\n let undeclared = 0;\n return {\n title,\n subtitle: rest.find(column => roleOf(column) === 'subtitle'),\n badges: rest.filter(column => roleOf(column) === 'badge'),\n meta: rest.filter(column => {\n if (roleOf(column) !== 'meta') return false;\n if (column.card !== undefined) return true;\n undeclared += 1;\n return undeclared <= UNDECLARED_META_CAP;\n }),\n };\n };\n\n const renderValue = (\n column: EntityTableColumn<TEntity>,\n item: TEntity,\n ): ReactNode =>\n column.render ? (\n column.render(item)\n ) : (\n <CellValue\n value={(item as Record<string, unknown>)[column.name]}\n descriptor={column}\n record={item as Record<string, unknown>}\n />\n );\n\n /**\n * A cell, and the row's title cell is the record's link\n * ([ADR 0026](../../../../../../../docs/adr/0026-actions-hierarchy-overflow-and-destructive-verbs.md)).\n * A column of identical \"Open\" links named nothing, and a reader tabbing\n * down it heard \"Open\" once per row; the title says which record it opens.\n * A picker's rows are chosen, not opened, so they stay plain.\n */\n const renderCell = (\n column: EntityTableColumn<TEntity>,\n item: TEntity,\n ): ReactNode => {\n if (linkColumn(item).name !== column.name) return renderValue(column, item);\n // The row's title cell left empty still reads as the record.\n const raw = (item as Record<string, unknown>)[column.name];\n const blank = column.render === undefined && (raw == null || raw === '');\n const value = blank ? rowLabel(item) : renderValue(column, item);\n if (hrefFor === undefined || onSelect !== undefined) return value;\n return renderLink({\n href: hrefFor(item.id),\n className: linkClassName,\n children: value,\n intent: { kind: 'open', id: item.id },\n });\n };\n\n /**\n * The row a shift-click ranges *from* — the last box the user actually\n * toggled. Held in a ref rather than state because it changes nothing on\n * screen, and re-rendering the whole table on every click to remember an\n * anchor is a cost with no visible return.\n */\n const anchorIndex = useRef<number | undefined>(undefined);\n\n /**\n * An entity that declares a parent renders as a tree: the page arranged\n * depth first, its first column indented, and a subtree hidden while its\n * record is collapsed. Collapsing is view state, so it lives here and is\n * forgotten with the table, like the shift-click anchor above.\n */\n const treeKeys = useMemo(\n () => hierarchyOf(entityConstructor),\n [entityConstructor],\n );\n const [collapsed, setCollapsed] = useState<ReadonlySet<string>>(\n () => new Set(),\n );\n const rows = useMemo(() => treeRows(items, treeKeys), [items, treeKeys]);\n const shown = shownTreeRows(rows, collapsed);\n const shownItems = shown.map(row => row.item);\n const toggleCollapsed = (key: string) =>\n setCollapsed(current => {\n const next = new Set(current);\n if (next.has(key)) next.delete(key);\n else next.add(key);\n return next;\n });\n\n const setSelection = (next: EntitySelection<TEntity>) =>\n onSelectionChange?.(next);\n\n const toggleRow = (\n index: number,\n checked: boolean,\n shiftKey: boolean,\n current: EntitySelection<TEntity>,\n ) => {\n // A shift-click extends the last toggle across the rows *on this page*, in\n // the direction the user dragged, and applies the new state to all of them.\n const from = shiftKey ? (anchorIndex.current ?? index) : index;\n const [start, end] = from <= index ? [from, index] : [index, from];\n\n let next = current;\n // The rows as shown: in a tree the order on screen is not the load's.\n for (const row of shownItems.slice(start, end + 1)) {\n next = toggleSelected(next, row.id, checked);\n }\n\n anchorIndex.current = index;\n setSelection(next);\n };\n\n /**\n * The header box, and it has three states rather than two: none of this\n * page's rows selected, all of them, or some. Without the third the box\n * reads as \"nothing is selected\" while a bulk bar sits below it saying\n * otherwise.\n */\n const pageIds = items.map(item => item.id);\n const selectedOnPage = selectionState\n ? pageIds.filter(id => isSelected(selectionState, id)).length\n : 0;\n const allOnPageSelected =\n pageIds.length > 0 && selectedOnPage === pageIds.length;\n const someOnPageSelected = selectedOnPage > 0 && !allOnPageSelected;\n\n const toggleAllOnPage = (\n checked: boolean,\n current: EntitySelection<TEntity>,\n ) => {\n let next = current;\n for (const id of pageIds) next = toggleSelected(next, id, checked);\n anchorIndex.current = undefined;\n setSelection(next);\n };\n\n const selectionCell = (\n item: TEntity,\n index: number,\n // Passed in rather than closed over: this is only ever called under\n // `selectable`, which already proves the selection exists, and reading the\n // optional prop here would add a fallback arm that nothing can reach.\n current: EntitySelection<TEntity>,\n ) => (\n <Checkbox\n // Deliberately no `id`: both pivots are always in the DOM, so an id here\n // would be emitted twice per row. `aria-label` names the control instead,\n // and it names the *record* rather than the position.\n aria-label={t('table.selectRow', { record: rowLabel(item) })}\n checked={isSelected(current, item.id)}\n disabled={isBulkRunning}\n onChange={event =>\n toggleRow(\n index,\n event.currentTarget.checked,\n (event.nativeEvent as MouseEvent).shiftKey === true,\n current,\n )\n }\n />\n );\n\n const runTarget = (key: string, target: PendingTarget<TEntity>) => {\n if (target.kind === 'row') onUseCase?.(key, target.item);\n else onBulkUseCase?.(key, target.selection);\n };\n\n /**\n * Every verb on the table goes through here — the row menu, the bulk bar and\n * the toolbar — so none reaches a destructive verb around its confirmation,\n * its typed check or its Undo.\n */\n const verbs = useVerbInvoker<PendingTarget<TEntity>>({\n run: runTarget,\n busy: isBulkRunning,\n served: metadata?.useCases,\n });\n\n // The row a verb last ran on. Its menu trigger unmounts when the verb moved\n // the record out of every state a row verb applies to, and focus then goes\n // to that row's own link or control rather than `<body>`.\n const rowScope = useId();\n const [lastRow, setLastRow] = useState<string | undefined>(undefined);\n useFocusOnLoss(\n () =>\n lastRow === undefined ? undefined : focusableIn(`${rowScope}${lastRow}`),\n shown\n .map(({ item }) =>\n availableUseCases(rowUseCases, item)\n .map(({ key }) => key)\n .join(','),\n )\n .join(' '),\n );\n\n const invoke = (\n useCase: UseCaseDescriptor,\n target: PendingTarget<TEntity>,\n ) => {\n if (target.kind === 'row') {\n setLastRow(String(target.item.id));\n verbs.invoke({\n descriptor: useCase,\n target,\n object: rowLabel(target.item),\n count: 1,\n });\n return;\n }\n const count = selectionSize(target.selection);\n verbs.invoke({\n descriptor: useCase,\n target,\n object: t('confirm.selection', {\n count,\n label: entityNoun(metaEntity),\n plural: entityNoun(metaEntity, 'plural'),\n }),\n count,\n matching: target.selection.mode === 'matching',\n });\n };\n\n const rowMenu = (item: TEntity) =>\n hasRowMenu ? (\n <ActionBar\n surface=\"row-menu\"\n menuLabel={t('actions.forRecord', { record: rowLabel(item) })}\n items={itemsForUseCases(\n availableUseCases(rowUseCases, item),\n translateKey,\n useCase => invoke(useCase, { kind: 'row', item }),\n )}\n />\n ) : undefined;\n\n /**\n * A picker's Select, then the row's verbs. Opening the record is not here:\n * it is the title's link.\n */\n const recordAction = (item: TEntity) => {\n const chosen = isSelectable !== undefined && !isSelectable(item);\n const pick = onSelect ? (\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"sm\"\n disabled={chosen}\n onClick={() => onSelect(item)}\n >\n {chosen ? t('table.chosen') : t('table.select')}\n </Button>\n ) : undefined;\n\n const menu = rowMenu(item);\n if (!menu) return pick;\n\n return (\n <span className=\"flex items-center gap-2xs\">\n {pick}\n {menu}\n </span>\n );\n };\n\n /**\n * \"New\" is the list's primary, and only where something can be created\n * here: the entity is not one only a flow writes (`creatable: false`), and\n * the caller may write it. A list that offered \"New\" to a reader who could\n * never save opened a form with no Save on it.\n */\n const mayCreate =\n newHref !== undefined &&\n metaEntity.creatable &&\n (metadata === undefined || metadata.actions.includes('write'));\n const toolbarItems: ActionBarItem[] = itemsForUseCases(\n toolbarUseCases,\n translateKey,\n useCase =>\n invoke(useCase, { kind: 'selection', selection: everythingMatching }),\n isBulkRunning,\n );\n const declaresToolbarPrimary = toolbarItems.some(\n item => item.emphasis === 'primary',\n );\n const toolbarActions: ActionBarItem[] = [\n ...(mayCreate\n ? [\n {\n key: 'new',\n label: t('table.new'),\n emphasis: declaresToolbarPrimary\n ? ('default' as const)\n : ('primary' as const),\n href: newHref,\n intent: { kind: 'new' as const },\n },\n ]\n : []),\n ...toolbarItems,\n ];\n\n const locale = useLocale();\n const panelId = useId();\n const keys = sortKeys(sorting, columns);\n const activeFilters = filtering?.values.length ?? 0;\n const results = t('table.results', { count: totalItems });\n\n /**\n * What the status region says once a filter, a sort or a page has settled —\n * debounced, and silent on the first load.\n */\n const announcement = useResultAnnouncement(\n !isLoading,\n totalItems === 0 && activeFilters > 0\n ? t('table.noResultsFiltered')\n : results,\n JSON.stringify([filtering, sorting, currentPage, pageSize]),\n );\n\n /** The caption: what the table holds, how many, and in what order. */\n const primaryKey = keys[0];\n const primaryColumn =\n primaryKey === undefined\n ? undefined\n : columns.find(column => column.name === primaryKey.member);\n const caption =\n primaryKey === undefined || primaryColumn === undefined\n ? t('table.caption', {\n entity: entityNoun(metaEntity, 'plural'),\n results,\n })\n : t('table.captionSorted', {\n entity: entityNoun(metaEntity, 'plural'),\n results,\n column: primaryColumn.label,\n direction: t(\n primaryKey.type === 'asc' ? 'sort.ascending' : 'sort.descending',\n ),\n });\n\n /**\n * A column's header: its name, and — for a sortable one — a button that\n * cycles it ascending → descending → unsorted, with Shift adding it as the\n * next key. Only the primary key carries `aria-sort`.\n */\n const headerCell = (column: EntityTableColumn<TEntity>) => {\n const label = column.header ?? column.label;\n if (!column.sortable || onSortingChange === undefined)\n return (\n <TableHeaderCell\n key={column.name}\n className={stickyClass(column, 'header')}\n >\n {label}\n </TableHeaderCell>\n );\n const position = keys.findIndex(key => key.member === column.name);\n const type = keys[position]?.type;\n return (\n <TableHeaderCell\n key={column.name}\n className={stickyClass(column, 'header')}\n aria-sort={\n position === 0\n ? type === 'asc'\n ? 'ascending'\n : 'descending'\n : undefined\n }\n >\n <button\n type=\"button\"\n className=\"inline-flex min-h-(--target-min) items-center gap-3xs rounded-sm focus-ring hover:text-content\"\n onClick={event =>\n onSortingChange(\n nextHeaderSorting<TEntity>(\n keys,\n {\n member: column.name,\n property: queryPropertyFor(column, locale),\n },\n event.shiftKey,\n ),\n )\n }\n >\n {label}\n <span aria-hidden=\"true\">\n {type === 'asc' ? '▲' : type === 'desc' ? '▼' : '↕'}\n </span>\n {keys.length > 1 && position >= 0 && (\n <span aria-hidden=\"true\" className=\"text-step-sm\">\n {position + 1}\n </span>\n )}\n </button>\n </TableHeaderCell>\n );\n };\n\n /** A panel toggle: its state said by `aria-expanded`, and its count shown. */\n const panelToggle = (which: Exclude<Panel, 'none'>, count: number) => (\n <Button\n type=\"button\"\n id={`${panelId}-${which}`}\n variant={panel === which ? 'primary' : 'secondary'}\n size=\"sm\"\n aria-expanded={panel === which}\n aria-controls={panelId}\n onClick={() => setPanel(current => (current === which ? 'none' : which))}\n >\n {t(which === 'filters' ? 'table.filters' : 'table.sorting')}\n {count > 0 && (\n // Its name stays \"Filters\": the chips say which filters, and a count\n // in the name would change it under the reader with every filter.\n <span\n aria-hidden=\"true\"\n className=\"ms-3xs rounded-full bg-surface px-3xs text-step-sm text-content\"\n >\n {count}\n </span>\n )}\n </Button>\n );\n\n return (\n <div className=\"@container/entity-table flex flex-col gap-s\">\n {/*\n One announcement for the whole table, not one per layout. Both the grid\n and the card list are always in the DOM — CSS picks which is visible —\n so a live region inside each meant assistive tech was told twice that\n the table was loading. The shimmer itself is aria-hidden, so this is the\n only thing that carries the news.\n */}\n <span role=\"status\" aria-live=\"polite\" className=\"sr-only\">\n {isFirstLoad ? t('table.loading') : announcement}\n </span>\n\n {showControls && (\n <TableToolbar\n start={\n <>\n {/* \"New\" and the collection-bound verbs that need no\n selection. They sit here rather than in the bulk bar,\n because the bulk bar only exists while rows are ticked and\n these are always available. */}\n <LoadingBoundary isLoading={isMetadataLoading} lines={0}>\n <>\n {toolbarActions.length > 0 && (\n <ActionBar\n surface=\"table-toolbar\"\n items={toolbarActions}\n renderLink={renderLink}\n />\n )}\n </>\n </LoadingBoundary>\n {slots.toolbar}\n </>\n }\n end={\n <>\n {panelToggle('filters', activeFilters)}\n {panelToggle('sorting', keys.length)}\n <ColumnSettings\n columns={columns}\n hidden={hidden}\n onChange={setPersonalization}\n />\n </>\n }\n panelId={panelId}\n panel={\n panel === 'filters' ? (\n <FilterBuilder<TEntity>\n // Remounted when the filtering changes from outside — a chip\n // removed — so its rows show what is in effect.\n key={JSON.stringify(filtering ?? null)}\n descriptors={columns.filter(column => column.filterable)}\n facets={facets}\n value={filtering}\n onChange={(applied: FilterGroup<TEntity>) =>\n onFilteringChange?.(applied)\n }\n />\n ) : panel === 'sorting' ? (\n <SortBuilder<TEntity>\n descriptors={columns.filter(column => column.sortable)}\n value={sorting}\n onChange={(applied: EntitySorting<TEntity>) =>\n onSortingChange?.(applied)\n }\n />\n ) : undefined\n }\n />\n )}\n\n {showControls && onFilteringChange !== undefined && (\n <FilterChips<TEntity>\n descriptors={columns.filter(column => column.filterable)}\n value={filtering}\n onChange={onFilteringChange}\n />\n )}\n\n {/*\n The bar appears when there is something selected and something to do\n with it. It sits above the rows rather than floating over them: a fixed\n overlay covers the last row of a short page, which is the row the user\n most likely just ticked.\n */}\n {selectionState && selectionSize(selectionState) > 0 && (\n <BulkActionBar\n count={selectionSize(selectionState)}\n useCases={bulkUseCases}\n busy={isBulkRunning}\n // Offered only when this page is fully ticked and the store holds\n // more than the page — the escalation has somewhere to escalate to.\n matchingTotal={\n selectionState.mode === 'ids' &&\n allOnPageSelected &&\n totalItems > items.length\n ? totalItems\n : undefined\n }\n onSelectAllMatching={() => setSelection(everythingMatching)}\n onClear={() => setSelection(emptySelection<TEntity>())}\n onUseCase={useCase =>\n invoke(useCase, { kind: 'selection', selection: selectionState })\n }\n />\n )}\n\n {verbs.dialog}\n\n {bulkOutcomes && bulkOutcomes.length > 0 && onBulkDismiss && (\n <BulkResult\n outcomes={bulkOutcomes}\n busy={isBulkRunning}\n labelFor={id => {\n const row = items.find(item => item.id === id);\n return row ? rowLabel(row) : undefined;\n }}\n onRetryFailed={onBulkRetry}\n onDismiss={onBulkDismiss}\n />\n )}\n\n {/*\n Rendered once, outside both layouts, and independently of whether there\n are rows: a refetch that fails leaves the previous page on screen, and\n without this the user would read stale data as current.\n */}\n {/*\n One state for the region, outside both layouts (ADR 0028): a failed\n load with Retry — and the rows from before it marked as possibly out of\n date — or an empty answer, which says whether a filter emptied it.\n */}\n <RegionState\n plural={entityNoun(metaEntity, 'plural')}\n isLoading={isLoading}\n error={error}\n onRetry={onRetry}\n hasStaleData={items.length > 0}\n isEmpty={items.length === 0}\n isFiltered={activeFilters > 0}\n onClearFilters={\n onFilteringChange === undefined\n ? undefined\n : () => {\n // The button goes with the empty state it sits in, so focus\n // moves first to the control that filters — still there, and\n // where a reader would go next — never to `<body>`.\n document.getElementById(`${panelId}-filters`)?.focus();\n onFilteringChange({\n // Only offered under a filter, so there is one to keep the\n // logic of.\n operator: (filtering as FilterGroup<TEntity>).operator,\n values: [],\n });\n }\n }\n emptyAction={\n mayCreate\n ? renderLink({\n href: newHref as string,\n className: button({ variant: 'primary' }),\n children: t('table.new'),\n intent: { kind: 'new' },\n })\n : undefined\n }\n />\n\n {/*\n A settled empty answer is the region's state alone: a grid's header\n over no rows, announced after \"nothing here\", told the reader there\n was a table to read (ADR 0028). Loading keeps the skeleton's geometry,\n and a failure keeps whatever rows it had, so nothing already on screen\n moves.\n */}\n {!settledEmpty && (\n <>\n {/* Wide viewports: a grid. */}\n <div className={pivot.grid} aria-busy={busy}>\n {/* Held to most of the viewport so the header can stick above the\n rows; the scroll padding keeps a focused row out from under it. */}\n <Table\n caption={caption}\n containerClassName=\"max-h-(--table-max-block) scroll-pt-12\"\n // Never narrower than its columns side by side: between the\n // essential width and that, the grid scrolls rather than crushing\n // every column into an unreadable sliver.\n style={{ minWidth: `${widths.full}rem` }}\n // A focused cell scrolled sideways is never left under the\n // sticky title column (WCAG 2.4.11).\n containerStyle={{\n scrollPaddingInlineStart: `${columnWidth(stickyTitle)}rem`,\n }}\n >\n <TableHead>\n {slots.header ? (\n slots.header.render(visibleColumns)\n ) : (\n <tr>\n {selectable && (\n <TableHeaderCell>\n <Checkbox\n aria-label={t('table.selectAllOnPage')}\n checked={allOnPageSelected}\n indeterminate={someOnPageSelected}\n disabled={isBulkRunning || items.length === 0}\n onChange={event =>\n toggleAllOnPage(\n event.currentTarget.checked,\n selectionState,\n )\n }\n />\n </TableHeaderCell>\n )}\n {visibleColumns.map(headerCell)}\n {hasRowAction && (\n <TableHeaderCell>{t('table.actions')}</TableHeaderCell>\n )}\n </tr>\n )}\n </TableHead>\n <TableBody>\n {/* Skeleton rows rather than the word \"Loading\", and one per column\n rather than a single full-width blob: the placeholder occupies\n the real grid, so the swap to rows shifts nothing sideways.\n `TableMessageRow` is deliberately bypassed — it is one centred\n full-span cell and cannot express the geometry. */}\n {showSkeleton &&\n (customSkeleton ? (\n <TableMessageRow colSpan={columnCount}>\n {customSkeleton}\n </TableMessageRow>\n ) : (\n skeletonRows.map(row => (\n <TableRow key={row}>\n {selectable && (\n <TableCell>\n <Skeleton shape=\"line\" className=\"w-4\" />\n </TableCell>\n )}\n {visibleColumns.map(column => (\n <TableCell key={column.name}>\n <Skeleton shape=\"line\" className=\"w-full\" />\n </TableCell>\n ))}\n {hasRowAction && (\n <TableCell>\n <Skeleton shape=\"line\" className=\"w-16\" />\n </TableCell>\n )}\n </TableRow>\n ))\n ))}\n {shown.map(({ item, depth, hasChildren }, index) =>\n slots.row ? (\n // A Fragment carries the key without wrapping the custom row in\n // an element `<tbody>` would reject.\n <Fragment key={String(item.id ?? index)}>\n {slots.row.render(item, visibleColumns)}\n </Fragment>\n ) : (\n <TableRow\n key={String(item.id ?? index)}\n data-record-id={`${rowScope}${String(item.id)}`}\n className=\"group/row\"\n >\n {selectionState && (\n <TableCell>\n {selectionCell(item, index, selectionState)}\n </TableCell>\n )}\n {visibleColumns.map((column, columnIndex) => (\n <TableCell\n key={column.name}\n className={stickyClass(column, 'body')}\n >\n {treeKeys !== undefined && columnIndex === 0 ? (\n <TreeCell\n depth={depth}\n hasChildren={hasChildren}\n expanded={!collapsed.has(treeKeys.idOf(item))}\n label={t(\n collapsed.has(treeKeys.idOf(item))\n ? 'table.expandRow'\n : 'table.collapseRow',\n { record: rowLabel(item) },\n )}\n onToggle={() =>\n toggleCollapsed(treeKeys.idOf(item))\n }\n >\n {renderCell(column, item)}\n </TreeCell>\n ) : (\n renderCell(column, item)\n )}\n </TableCell>\n ))}\n {hasRowAction && (\n <TableCell>{recordAction(item)}</TableCell>\n )}\n </TableRow>\n ),\n )}\n </TableBody>\n </Table>\n </div>\n\n {/* Narrow containers: the same columns pivoted into a list of cards. */}\n <div className={pivot.cards} aria-busy={busy}>\n {/* The card pivot gets card-shaped placeholders, not a bare shimmer\n block: the border, radius and padding are the geometry here. */}\n {showSkeleton &&\n (customSkeleton ?? (\n <ul\n role=\"list\"\n className=\"m-0 p-0 flex list-none flex-col gap-2xs\"\n >\n {skeletonRows.map(row => (\n <li key={row}>\n <EntityRecordCard\n title={<Skeleton shape=\"line\" className=\"w-32\" />}\n meta={visibleColumns.slice(1).map(column => ({\n key: column.name,\n label: column.label,\n value: <Skeleton shape=\"line\" className=\"w-24\" />,\n }))}\n />\n </li>\n ))}\n </ul>\n ))}\n {shown.length > 0 && (\n <ul\n role=\"list\"\n className=\"m-0 p-0 flex list-none flex-col gap-2xs\"\n >\n {shown.map(({ item, depth }, index) => {\n const parts = cardParts(item);\n return (\n <li\n key={String(item.id ?? index)}\n data-record-id={`${rowScope}${String(item.id)}`}\n // A tree's card says how deep it sits, as its row does.\n aria-level={\n treeKeys === undefined ? undefined : depth + 1\n }\n style={\n treeKeys === undefined\n ? undefined\n : { marginInlineStart: `${depth * 1.5}rem` }\n }\n >\n <EntityRecordCard\n // The same renderers as the grid, so the two layouts agree.\n title={renderCell(parts.title, item)}\n subtitle={\n parts.subtitle === undefined\n ? undefined\n : renderCell(parts.subtitle, item)\n }\n badges={parts.badges.map(column => ({\n key: column.name,\n value: renderCell(column, item),\n }))}\n meta={parts.meta.map(column => ({\n key: column.name,\n label: column.header ?? column.label,\n value: renderCell(column, item),\n }))}\n leading={\n selectionState\n ? selectionCell(item, index, selectionState)\n : undefined\n }\n actions={recordAction(item)}\n />\n </li>\n );\n })}\n </ul>\n )}\n </div>\n </>\n )}\n\n <Pagination\n currentPage={currentPage}\n pageSize={pageSize}\n totalItems={totalItems}\n onPageChange={onPageChange}\n onPageSizeChange={onPageSizeChange}\n />\n\n {slots.rest}\n </div>\n );\n}\n\n/**\n * The first control in a record's row or card that the reader can see. Both\n * layouts are in the DOM and CSS shows one, so a control inside the hidden\n * one is skipped. `scoped` is the record's id under this table's own prefix,\n * so a second table on the page holding the same record is never reached.\n */\nfunction focusableIn(scoped: string): HTMLElement | undefined {\n return [\n ...document.querySelectorAll<HTMLElement>(\n `[data-record-id=\"${CSS.escape(scoped)}\"] :is(a[href], button)`,\n ),\n ].find(\n control =>\n // `checkVisibility` is recent; a browser without it is asked for the\n // boxes the control lays out, which a `display: none` layout has none of.\n control.checkVisibility?.() ?? control.getClientRects().length > 0,\n );\n}\n"],"names":["canNameRecord","emptySelection","extractMetaEntity","hierarchyOf","isSelected","isTextMember","queryPropertyFor","recordLabel","selectionSize","toggleSelected","Fragment","useId","useMemo","useRef","useState","useEntityNoun","useLocale","useT","useTranslateKey","availableUseCases","renderAnchor","useCasesForSurface","useVerbInvoker","Button","button","CellValue","useRecordLabel","Checkbox","Skeleton","Table","TableBody","TableCell","TableHead","TableHeaderCell","TableMessageRow","TableRow","linkClassName","ActionBar","itemsForUseCases","BulkActionBar","BulkResult","ColumnSettings","EntityRecordCard","FilterBuilder","FilterChips","LoadingBoundary","Pagination","RegionState","SortBuilder","TableToolbar","useFocusOnLoss","cardRoles","readEntityTableSlots","shownTreeRows","TreeCell","treeRows","nextHeaderSorting","sortKeys","ACTIONS_WIDTH","columnWidth","pivotClasses","pivotWidths","SELECTION_WIDTH","useEntityTableColumns","useResultAnnouncement","SKELETON_ROW_CAP","UNDECLARED_META_CAP","RECORD_COLUMN","EntityTable","entityConstructor","isLoading","skeleton","error","items","totalItems","currentPage","pageSize","onPageChange","onPageSizeChange","hrefFor","newHref","renderLink","onSelect","isSelectable","preferencesKey","hiddenColumns","showKey","showControls","pivotBreakpoint","filtering","sorting","onFilteringChange","onSortingChange","facets","selection","onSelectionChange","metadata","isMetadataLoading","onBulkUseCase","onUseCase","onRetry","bulkOutcomes","onBulkDismiss","onBulkRetry","isBulkRunning","children","t","translateKey","entityNoun","metaEntity","slots","panel","setPanel","columns","visibleColumns","resolvedColumns","hidden","setPersonalization","key","name","nameOf","rowLabel","item","titleOf","candidates","find","column","labelMember","card","namedTitle","stickyTitle","label","type","sortable","filterable","order","readonly","required","linkLabelProperty","linkSearchProperty","linkSerialization","resetOnClone","render","virtual","undefined","Error","selectionState","selectable","rowUseCases","useCases","bulkUseCases","toolbarUseCases","hasRowMenu","length","everythingMatching","mode","total","excluded","Set","hasRowAction","columnCount","widths","title","roleOf","extra","breakpoint","pivot","essential","stickyClass","part","isFirstLoad","settledEmpty","customSkeleton","showSkeleton","skeletonRows","Array","from","Math","min","_","index","busy","declaredTitle","linkColumn","named","kind","member","value","String","cardParts","rest","filter","undeclared","subtitle","badges","meta","renderValue","descriptor","record","renderCell","raw","blank","href","id","className","intent","anchorIndex","treeKeys","collapsed","setCollapsed","rows","shown","shownItems","map","row","toggleCollapsed","current","next","has","delete","add","setSelection","toggleRow","checked","shiftKey","start","end","slice","pageIds","selectedOnPage","allOnPageSelected","someOnPageSelected","toggleAllOnPage","selectionCell","aria-label","disabled","onChange","event","currentTarget","nativeEvent","runTarget","target","verbs","run","served","rowScope","lastRow","setLastRow","focusableIn","join","invoke","useCase","object","count","plural","matching","rowMenu","surface","menuLabel","recordAction","chosen","pick","variant","size","onClick","menu","span","mayCreate","creatable","actions","includes","toolbarItems","declaresToolbarPrimary","some","emphasis","toolbarActions","locale","panelId","keys","activeFilters","values","results","announcement","JSON","stringify","primaryKey","primaryColumn","caption","entity","direction","headerCell","header","position","findIndex","aria-sort","property","aria-hidden","panelToggle","which","aria-expanded","aria-controls","div","role","aria-live","lines","toolbar","descriptors","applied","matchingTotal","onSelectAllMatching","onClear","dialog","outcomes","labelFor","onRetryFailed","onDismiss","hasStaleData","isEmpty","isFiltered","onClearFilters","document","getElementById","focus","operator","emptyAction","grid","aria-busy","containerClassName","style","minWidth","full","containerStyle","scrollPaddingInlineStart","tr","indeterminate","colSpan","shape","depth","hasChildren","data-record-id","columnIndex","expanded","idOf","onToggle","cards","ul","li","parts","aria-level","marginInlineStart","leading","scoped","querySelectorAll","CSS","escape","control","checkVisibility","getClientRects"],"mappings":"AAAA;;AAEA,SACEA,aAAa,EACbC,cAAc,EAKdC,iBAAiB,EAEjBC,WAAW,EACXC,UAAU,EACVC,YAAY,EACZC,gBAAgB,EAChBC,WAAW,EACXC,aAAa,EACbC,cAAc,QAET,gBAAgB;AACvB,SACEC,QAAQ,EAERC,KAAK,EACLC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,QAAQ;AAEf,SACEC,aAAa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;WACF/B,SAASgC,gBAAgB,CAC1B,CAAC,iBAAiB,EAAEC,IAAIC,MAAM,CAACH,QAAQ,uBAAuB,CAAC;KAElE,CAAClO,IAAI,CACJsO,CAAAA;;uBACE,qEAAqE;QACrE,0EAA0E;QAC1EA,QAAQC,eAAe,oBAAvBD,QAAQC,eAAe,MAAvBD,2BAA+BA,QAAQE,cAAc,GAAG5M,MAAM,GAAG;;AAEvE"}
|
|
@@ -78,6 +78,12 @@ export interface EntityTableProps<TEntity extends Entity> {
|
|
|
78
78
|
* wrong affordance. Either one renders the actions column.
|
|
79
79
|
*/
|
|
80
80
|
onSelect?: (item: TEntity) => void;
|
|
81
|
+
/**
|
|
82
|
+
* Whether a row may be picked by {@link onSelect}. A row it refuses shows a
|
|
83
|
+
* disabled "Already chosen" in place of Select — a list picker's way of
|
|
84
|
+
* saying the record is held, without dropping it from the page.
|
|
85
|
+
*/
|
|
86
|
+
isSelectable?: (item: TEntity) => boolean;
|
|
81
87
|
/** Scope for persisted personalization. Defaults to the entity's key. */
|
|
82
88
|
preferencesKey?: string;
|
|
83
89
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-table.types.d.ts","sourceRoot":"","sources":["../../../../src/ui/organisms/entity-table/entity-table.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACd,MAAM,EACN,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,QAAQ,EACR,sBAAsB,EACtB,eAAe,EACf,aAAa,EACb,WAAW,EACZ,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD;;;GAGG;AACH,MAAM,WAAW,iBAAiB,CAChC,OAAO,SAAS,MAAM,CACtB,SAAQ,qBAAqB;IAC7B,wCAAwC;IACxC,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,kEAAkE;IAClE,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,SAAS,CAAC;IACtC,4EAA4E;IAC5E,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,MAAM,0BAA0B,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5D,MAAM,WAAW,gBAAgB,CAAC,OAAO,SAAS,MAAM;IACtD;oDACgD;IAChD,iBAAiB,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAE9C,SAAS,EAAE,OAAO,CAAC;IACnB;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC/B;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,gBAAgB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAEjD;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,QAAQ,KAAK,MAAM,CAAC;IACnC,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IAExB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"entity-table.types.d.ts","sourceRoot":"","sources":["../../../../src/ui/organisms/entity-table/entity-table.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACd,MAAM,EACN,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB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AAa,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAC3E,mEAAmE;IACnE,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAEjD,0EAA0E;IAC1E,YAAY,CAAC,EAAE,SAAS,WAAW,EAAE,CAAC;IACtC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,IAAI,CAAC;IACxC,oEAAoE;IACpE,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/ui/organisms/entity-table/entity-table.types.ts"],"sourcesContent":["import type {\n BulkOutcome,\n EntifixFailure,\n Entity,\n EntityConstructor,\n EntityFacetCounts,\n EntityFieldDescriptor,\n EntityId,\n EntityMetadataDocument,\n EntitySelection,\n EntitySorting,\n FilterGroup,\n} from '@entifix/core';\nimport type { ReactNode } from 'react';\n\nimport type { RenderLink } from '../../actions/index.js';\n\n/**\n * A column as the table finally renders it: the metadata descriptor plus the\n * per-column overrides a caller supplied through an `<EntityColumn>` slot.\n */\nexport interface EntityTableColumn<\n TEntity extends Entity,\n> extends EntityFieldDescriptor {\n /** Replaces the default header text. */\n header?: ReactNode;\n /** Replaces the default `CellValue` rendering for this column. */\n render?: (item: TEntity) => ReactNode;\n /** True when the column has no backing entity member (slot-only column). */\n virtual?: boolean;\n}\n\n/**\n * A fixed width, read against the table's own container, at and above which\n * it renders as a grid rather than as cards: `sm` 40rem, `md` 48rem, `lg` 64rem.\n */\nexport type EntityTablePivotBreakpoint = 'sm' | 'md' | 'lg';\n\nexport interface EntityTableProps<TEntity extends Entity> {\n /** Metadata source. Columns, labels, types and the filter/sort controls all\n * derive from this constructor's accessors. */\n entityConstructor: EntityConstructor<TEntity>;\n\n isLoading: boolean;\n /**\n * What holds the table's shape during the first load.\n *\n * `true` (the default) renders the built-in placeholder, which is derived from\n * the table's own resolved geometry — one shimmer cell per visible column, so\n * the swap to real rows shifts nothing. A node replaces that default; `false`\n * renders no placeholder at all.\n *\n * Only the *first* load is held this way. A refetch that already has rows\n * keeps them and marks the region busy instead — replacing populated rows with\n * shimmer on every pagination click is a grey flash, not a loading state.\n */\n skeleton?: boolean | ReactNode;\n /**\n * The failure of the last load, if it failed.\n *\n * A listing that renders an empty table when the service is unreachable tells\n * the user their catalog is empty — the one thing they must not conclude. So\n * this is rendered as an alert, and it also changes the empty message.\n *\n * It arrives for free from `useDataLoading`, whose whole state is spread into\n * this component.\n */\n error?: EntifixFailure;\n items: ReadonlyArray<TEntity>;\n totalItems: number;\n currentPage: number;\n pageSize: number;\n onPageChange: (newPage: number) => void;\n onPageSizeChange?: (newPageSize: number) => void;\n\n /**\n * Builds the link to a row's record. Supplied as a function rather than the\n * table routing by itself: this package must not depend on a router, so the\n * caller (a shell page, which does know one) owns the URL shape.\n *\n * Omit it and the actions column is not rendered at all.\n */\n hrefFor?: (id: EntityId) => string;\n /** Link to the create form. Omit and no `New` action is rendered. */\n newHref?: string;\n /**\n * Renders the `Open` and `New` links. Defaults to a plain anchor, which a\n * client-routed host experiences as a full document load — pass one built on\n * the host's own link component. See {@link RenderLink}.\n */\n renderLink?: RenderLink;\n\n /**\n * Picks a row instead of navigating to it — how a link picker reuses this\n * table as its browse dialog.\n *\n * Takes precedence over {@link hrefFor}: inside a picker the user is choosing\n * a value, and offering to navigate away from the form they are editing is the\n * wrong affordance. Either one renders the actions column.\n */\n onSelect?: (item: TEntity) => void;\n\n /** Scope for persisted personalization. Defaults to the entity's key. */\n preferencesKey?: string;\n /**\n * Columns this reader does not get — a member that is always the reader\n * themselves, say. Unlike a column the reader hides from the settings, it is\n * gone from the settings, the filters, the sort choices and the cards, and\n * the reader cannot bring it back. A name that is not a column throws.\n */\n hiddenColumns?: readonly string[];\n /**\n * Shows the record's own key (its `id`) as a column. Off by default: an id\n * is how a record is addressed, never how a person reads it, and a row\n * already opens by its name — or by its noun and short id when it has none.\n * A reference's id is unaffected, and `id=in=` still queries.\n */\n showKey?: boolean;\n /** Hide the toolbar (columns, filters, sorting) — a bare listing. */\n showControls?: boolean;\n /**\n * Overrides where rows stop pivoting into cards. By default that is where\n * the visible columns fit side by side in the table's own container — the\n * sum of each member's `minWidth`, or its type's — so a table in a split\n * view, a drawer or a wizard step switches by the room it actually has.\n */\n pivotBreakpoint?: EntityTablePivotBreakpoint;\n\n /** The filtering currently applied, seeding the filter panel so it shows\n * what is in effect rather than an empty form. */\n filtering?: FilterGroup<TEntity>;\n /** The sorting currently applied, seeding the sort panel. */\n sorting?: EntitySorting<TEntity>;\n\n /** Notified when the filter panel is **applied** — not while it is edited, so\n * the value can feed a load request directly. */\n onFilteringChange?: (filtering: FilterGroup<TEntity>) => void;\n /** Loads the page again — what a failed load offers as Retry. */\n onRetry?: () => void;\n /** Notified when the sort panel is applied, or a column header is clicked. */\n\n onSortingChange?: (sorting: EntitySorting<TEntity>) => void;\n /**\n * How many records hold each value, by member, for the filter panel to show\n * beside an enum's or a boolean's choices.\n */\n facets?: EntityFacetCounts;\n\n /**\n * The rows a collection-bound action would act on.\n *\n * **Controlled from above the table**, exactly as `filtering` and `sorting`\n * are, and for the same reason plus one more: a selection has to survive\n * pagination, and the page owns the pager. A selection held inside the table\n * would be reset by the very navigation the user performs to add to it.\n *\n * Omit it and no selection column is rendered — a listing that is only read\n * gains nothing from a column of empty boxes.\n */\n selection?: EntitySelection<TEntity>;\n onSelectionChange?: (selection: EntitySelection<TEntity>) => void;\n\n /**\n * What this caller may do with the entity, as the service decided it.\n *\n * The same document `EntityForm` takes. The table reads only the\n * `collection`-bound half of `useCases` — the entity-bound verbs belong to a\n * record, and a row's own overflow menu is fed from the\n * `context-dependent` ones.\n *\n * Absent keeps the pre-ADR-0026 behaviour: no bulk bar and no row menu, which\n * is what every un-migrated call site renders today.\n */\n metadata?: EntityMetadataDocument;\n isMetadataLoading?: boolean;\n\n /** Runs a `collection`-bound verb over {@link selection}. */\n onBulkUseCase?: (key: string, selection: EntitySelection<TEntity>) => void;\n /** Runs an `entity`-bound, `context-dependent` verb on one row. */\n onUseCase?: (key: string, item: TEntity) => void;\n\n /** The outcome of the last bulk run, rendered per row until dismissed. */\n bulkOutcomes?: readonly BulkOutcome[];\n onBulkDismiss?: () => void;\n onBulkRetry?: (ids: EntityId[]) => void;\n /** A bulk run is in flight — every verb is disabled while it is. */\n isBulkRunning?: boolean;\n\n /** Customization slots — see `entity-table-slots`. */\n children?: ReactNode;\n}\n"],"names":[],"mappings":"AAsCA,
|
|
1
|
+
{"version":3,"sources":["../../../../src/ui/organisms/entity-table/entity-table.types.ts"],"sourcesContent":["import type {\n BulkOutcome,\n EntifixFailure,\n Entity,\n EntityConstructor,\n EntityFacetCounts,\n EntityFieldDescriptor,\n EntityId,\n EntityMetadataDocument,\n EntitySelection,\n EntitySorting,\n FilterGroup,\n} from '@entifix/core';\nimport type { ReactNode } from 'react';\n\nimport type { RenderLink } from '../../actions/index.js';\n\n/**\n * A column as the table finally renders it: the metadata descriptor plus the\n * per-column overrides a caller supplied through an `<EntityColumn>` slot.\n */\nexport interface EntityTableColumn<\n TEntity extends Entity,\n> extends EntityFieldDescriptor {\n /** Replaces the default header text. */\n header?: ReactNode;\n /** Replaces the default `CellValue` rendering for this column. */\n render?: (item: TEntity) => ReactNode;\n /** True when the column has no backing entity member (slot-only column). */\n virtual?: boolean;\n}\n\n/**\n * A fixed width, read against the table's own container, at and above which\n * it renders as a grid rather than as cards: `sm` 40rem, `md` 48rem, `lg` 64rem.\n */\nexport type EntityTablePivotBreakpoint = 'sm' | 'md' | 'lg';\n\nexport interface EntityTableProps<TEntity extends Entity> {\n /** Metadata source. Columns, labels, types and the filter/sort controls all\n * derive from this constructor's accessors. */\n entityConstructor: EntityConstructor<TEntity>;\n\n isLoading: boolean;\n /**\n * What holds the table's shape during the first load.\n *\n * `true` (the default) renders the built-in placeholder, which is derived from\n * the table's own resolved geometry — one shimmer cell per visible column, so\n * the swap to real rows shifts nothing. A node replaces that default; `false`\n * renders no placeholder at all.\n *\n * Only the *first* load is held this way. A refetch that already has rows\n * keeps them and marks the region busy instead — replacing populated rows with\n * shimmer on every pagination click is a grey flash, not a loading state.\n */\n skeleton?: boolean | ReactNode;\n /**\n * The failure of the last load, if it failed.\n *\n * A listing that renders an empty table when the service is unreachable tells\n * the user their catalog is empty — the one thing they must not conclude. So\n * this is rendered as an alert, and it also changes the empty message.\n *\n * It arrives for free from `useDataLoading`, whose whole state is spread into\n * this component.\n */\n error?: EntifixFailure;\n items: ReadonlyArray<TEntity>;\n totalItems: number;\n currentPage: number;\n pageSize: number;\n onPageChange: (newPage: number) => void;\n onPageSizeChange?: (newPageSize: number) => void;\n\n /**\n * Builds the link to a row's record. Supplied as a function rather than the\n * table routing by itself: this package must not depend on a router, so the\n * caller (a shell page, which does know one) owns the URL shape.\n *\n * Omit it and the actions column is not rendered at all.\n */\n hrefFor?: (id: EntityId) => string;\n /** Link to the create form. Omit and no `New` action is rendered. */\n newHref?: string;\n /**\n * Renders the `Open` and `New` links. Defaults to a plain anchor, which a\n * client-routed host experiences as a full document load — pass one built on\n * the host's own link component. See {@link RenderLink}.\n */\n renderLink?: RenderLink;\n\n /**\n * Picks a row instead of navigating to it — how a link picker reuses this\n * table as its browse dialog.\n *\n * Takes precedence over {@link hrefFor}: inside a picker the user is choosing\n * a value, and offering to navigate away from the form they are editing is the\n * wrong affordance. Either one renders the actions column.\n */\n onSelect?: (item: TEntity) => void;\n /**\n * Whether a row may be picked by {@link onSelect}. A row it refuses shows a\n * disabled \"Already chosen\" in place of Select — a list picker's way of\n * saying the record is held, without dropping it from the page.\n */\n isSelectable?: (item: TEntity) => boolean;\n\n /** Scope for persisted personalization. Defaults to the entity's key. */\n preferencesKey?: string;\n /**\n * Columns this reader does not get — a member that is always the reader\n * themselves, say. Unlike a column the reader hides from the settings, it is\n * gone from the settings, the filters, the sort choices and the cards, and\n * the reader cannot bring it back. A name that is not a column throws.\n */\n hiddenColumns?: readonly string[];\n /**\n * Shows the record's own key (its `id`) as a column. Off by default: an id\n * is how a record is addressed, never how a person reads it, and a row\n * already opens by its name — or by its noun and short id when it has none.\n * A reference's id is unaffected, and `id=in=` still queries.\n */\n showKey?: boolean;\n /** Hide the toolbar (columns, filters, sorting) — a bare listing. */\n showControls?: boolean;\n /**\n * Overrides where rows stop pivoting into cards. By default that is where\n * the visible columns fit side by side in the table's own container — the\n * sum of each member's `minWidth`, or its type's — so a table in a split\n * view, a drawer or a wizard step switches by the room it actually has.\n */\n pivotBreakpoint?: EntityTablePivotBreakpoint;\n\n /** The filtering currently applied, seeding the filter panel so it shows\n * what is in effect rather than an empty form. */\n filtering?: FilterGroup<TEntity>;\n /** The sorting currently applied, seeding the sort panel. */\n sorting?: EntitySorting<TEntity>;\n\n /** Notified when the filter panel is **applied** — not while it is edited, so\n * the value can feed a load request directly. */\n onFilteringChange?: (filtering: FilterGroup<TEntity>) => void;\n /** Loads the page again — what a failed load offers as Retry. */\n onRetry?: () => void;\n /** Notified when the sort panel is applied, or a column header is clicked. */\n\n onSortingChange?: (sorting: EntitySorting<TEntity>) => void;\n /**\n * How many records hold each value, by member, for the filter panel to show\n * beside an enum's or a boolean's choices.\n */\n facets?: EntityFacetCounts;\n\n /**\n * The rows a collection-bound action would act on.\n *\n * **Controlled from above the table**, exactly as `filtering` and `sorting`\n * are, and for the same reason plus one more: a selection has to survive\n * pagination, and the page owns the pager. A selection held inside the table\n * would be reset by the very navigation the user performs to add to it.\n *\n * Omit it and no selection column is rendered — a listing that is only read\n * gains nothing from a column of empty boxes.\n */\n selection?: EntitySelection<TEntity>;\n onSelectionChange?: (selection: EntitySelection<TEntity>) => void;\n\n /**\n * What this caller may do with the entity, as the service decided it.\n *\n * The same document `EntityForm` takes. The table reads only the\n * `collection`-bound half of `useCases` — the entity-bound verbs belong to a\n * record, and a row's own overflow menu is fed from the\n * `context-dependent` ones.\n *\n * Absent keeps the pre-ADR-0026 behaviour: no bulk bar and no row menu, which\n * is what every un-migrated call site renders today.\n */\n metadata?: EntityMetadataDocument;\n isMetadataLoading?: boolean;\n\n /** Runs a `collection`-bound verb over {@link selection}. */\n onBulkUseCase?: (key: string, selection: EntitySelection<TEntity>) => void;\n /** Runs an `entity`-bound, `context-dependent` verb on one row. */\n onUseCase?: (key: string, item: TEntity) => void;\n\n /** The outcome of the last bulk run, rendered per row until dismissed. */\n bulkOutcomes?: readonly BulkOutcome[];\n onBulkDismiss?: () => void;\n onBulkRetry?: (ids: EntityId[]) => void;\n /** A bulk run is in flight — every verb is disabled while it is. */\n isBulkRunning?: boolean;\n\n /** Customization slots — see `entity-table-slots`. */\n children?: ReactNode;\n}\n"],"names":[],"mappings":"AAsCA,WA8JC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entifix/react-controls",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.13",
|
|
4
4
|
"description": "Entity-agnostic React UI — table, form, filters, wizard, command palette — rendered from entity metadata, plus layout primitives.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@headlessui/react": "^2.2.10",
|
|
20
20
|
"class-variance-authority": "^0.7.1",
|
|
21
21
|
"idb": "^8.0.4",
|
|
22
|
-
"@entifix/core": "0.23.
|
|
22
|
+
"@entifix/core": "0.23.13"
|
|
23
23
|
},
|
|
24
24
|
"exports": {
|
|
25
25
|
"./package.json": "./package.json",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"react": "19.3.1",
|
|
56
56
|
"react-i18next": "18.0.1",
|
|
57
57
|
"storybook": "^10.6.8",
|
|
58
|
-
"@entifix/i18n": "0.23.
|
|
59
|
-
"@entifix/style": "0.23.
|
|
58
|
+
"@entifix/i18n": "0.23.13",
|
|
59
|
+
"@entifix/style": "0.23.13"
|
|
60
60
|
},
|
|
61
61
|
"nx": {
|
|
62
62
|
"tags": [
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"i18next": ">=26 <28",
|
|
112
112
|
"react": ">=19 <20",
|
|
113
113
|
"react-i18next": ">=17 <19",
|
|
114
|
-
"@entifix/i18n": "0.23.
|
|
114
|
+
"@entifix/i18n": "0.23.13"
|
|
115
115
|
},
|
|
116
116
|
"peerDependenciesMeta": {
|
|
117
117
|
"@entifix/i18n": {
|