@forgeroute/ui 0.5.18 → 0.5.20

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.
Files changed (35) hide show
  1. package/fesm2022/forgeroute-ui-boards.mjs +2 -2
  2. package/fesm2022/forgeroute-ui-boards.mjs.map +1 -1
  3. package/fesm2022/forgeroute-ui-chip.mjs +25 -6
  4. package/fesm2022/forgeroute-ui-chip.mjs.map +1 -1
  5. package/fesm2022/{forgeroute-ui-core-ui-labels.es-Woi3az70.mjs → forgeroute-ui-core-ui-labels.es-ChTmqFlw.mjs} +37 -10
  6. package/fesm2022/forgeroute-ui-core-ui-labels.es-ChTmqFlw.mjs.map +1 -0
  7. package/fesm2022/forgeroute-ui-core.mjs +94 -19
  8. package/fesm2022/forgeroute-ui-core.mjs.map +1 -1
  9. package/fesm2022/forgeroute-ui-data-table-core.mjs +217 -26
  10. package/fesm2022/forgeroute-ui-data-table-core.mjs.map +1 -1
  11. package/fesm2022/forgeroute-ui-messaging.mjs +19 -2
  12. package/fesm2022/forgeroute-ui-messaging.mjs.map +1 -1
  13. package/fesm2022/forgeroute-ui-more-menu.mjs +61 -8
  14. package/fesm2022/forgeroute-ui-more-menu.mjs.map +1 -1
  15. package/fesm2022/forgeroute-ui-multi-select.mjs +2 -1
  16. package/fesm2022/forgeroute-ui-multi-select.mjs.map +1 -1
  17. package/fesm2022/forgeroute-ui-payments.mjs +870 -57
  18. package/fesm2022/forgeroute-ui-payments.mjs.map +1 -1
  19. package/fesm2022/forgeroute-ui-quickbooks.mjs.map +1 -1
  20. package/fesm2022/forgeroute-ui-square.mjs.map +1 -1
  21. package/fesm2022/forgeroute-ui-stripe.mjs +815 -49
  22. package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
  23. package/fesm2022/forgeroute-ui-table-types.mjs.map +1 -1
  24. package/package.json +2 -6
  25. package/types/forgeroute-ui-chip.d.ts +11 -1
  26. package/types/forgeroute-ui-core.d.ts +65 -12
  27. package/types/forgeroute-ui-data-table-core.d.ts +60 -1
  28. package/types/forgeroute-ui-messaging.d.ts +15 -5
  29. package/types/forgeroute-ui-more-menu.d.ts +7 -0
  30. package/types/forgeroute-ui-payments.d.ts +332 -8
  31. package/types/forgeroute-ui-quickbooks.d.ts +2 -2
  32. package/types/forgeroute-ui-square.d.ts +1 -1
  33. package/types/forgeroute-ui-stripe.d.ts +293 -20
  34. package/types/forgeroute-ui-table-types.d.ts +29 -0
  35. package/fesm2022/forgeroute-ui-core-ui-labels.es-Woi3az70.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"forgeroute-ui-table-types.mjs","names":[],"sources":["../../../projects/forgeroute-ui/table-types/src/lib/data-table/data-table.types.ts"],"sourcesContent":["import { InjectionToken, WritableSignal } from '@angular/core';\nimport { uiLocale } from '@forgeroute/ui/core';\n\nexport type SortDir = 'asc' | 'desc';\n\n/**\n * Shared signal provided at the DataTableComponent level.\n * Holds the ID of the currently-open dropdown. When any dropdown\n * opens it sets this to its own ID — all others react and close.\n */\nexport const DROPDOWN_GROUP = new InjectionToken<WritableSignal<string>>('DROPDOWN_GROUP');\n\n// ── Badge ──────────────────────────────────────────────────────\nexport type BadgeVariant =\n | 'green' | 'blue' | 'red' | 'amber' | 'purple' | 'gray' | 'teal' | 'pink'\n | 'indigo' | 'orange' | 'cyan' | 'lime' | 'rose' | 'slate'\n | 'emerald' | 'sky' | 'fuchsia' | 'yellow' | 'violet' | 'stone'\n | 'mint' | 'steel' | 'bronze' | 'plum' | 'sage' | 'coral' | 'sand' | 'ocean' | 'pewter'\n | 'gold' | 'jade' | 'sienna' | 'mauve' | 'walnut' | 'navy';\n\nexport const BADGE_VARIANT_STYLES: Record<BadgeVariant, { bg: string; color: string }> = {\n green: { bg: '#dcfce7', color: '#166534' },\n blue: { bg: '#dbeafe', color: '#1e40af' },\n red: { bg: '#fee2e2', color: '#991b1b' },\n amber: { bg: '#fef3c7', color: '#92400e' },\n purple: { bg: '#fff1f2', color: '#881337' },\n gray: { bg: '#f1f5f9', color: '#475569' },\n teal: { bg: '#ccfbf1', color: '#115e59' },\n pink: { bg: '#fce7f3', color: '#be185d' },\n indigo: { bg: '#bfdbfe', color: '#1e3a8a' },\n orange: { bg: '#ffedd5', color: '#9a3412' },\n cyan: { bg: '#cffafe', color: '#155e75' },\n lime: { bg: '#ecfccb', color: '#3f6212' },\n rose: { bg: '#ffe4e6', color: '#9f1239' },\n slate: { bg: '#e2e8f0', color: '#334155' },\n emerald: { bg: '#d1fae5', color: '#065f46' },\n sky: { bg: '#e0f2fe', color: '#0c4a6e' },\n fuchsia: { bg: '#fdf4ff', color: '#a21caf' },\n yellow: { bg: '#fef9c3', color: '#854d0e' },\n violet: { bg: '#fefce8', color: '#713f12' },\n stone: { bg: '#f5f5f4', color: '#57534e' },\n mint: { bg: '#d1fae5', color: '#047857' },\n steel: { bg: '#cbd5e1', color: '#1e293b' },\n bronze: { bg: '#fde68a', color: '#78350f' },\n plum: { bg: '#f5f5f4', color: '#44403c' },\n sage: { bg: '#d9f99d', color: '#4d7c0f' },\n coral: { bg: '#fecdd3', color: '#be123c' },\n sand: { bg: '#e7e5e4', color: '#44403c' },\n ocean: { bg: '#bae6fd', color: '#075985' },\n pewter: { bg: '#d4d4d8', color: '#3f3f46' },\n gold: { bg: '#fbbf24', color: '#78350f' },\n jade: { bg: '#6ee7b7', color: '#064e3b' },\n sienna: { bg: '#f0cfb8', color: '#7c2d12' },\n mauve: { bg: '#f0d9e0', color: '#6b2d3e' },\n walnut: { bg: '#d4a27a', color: '#1c0f09' },\n navy: { bg: '#93c5fd', color: '#172554' },\n};\n\n/**\n * Global semantic map — same label always gets the same color across every\n * table in the app, regardless of which page or column it appears in. The keys are the ENGLISH labels (the exported constant stays English for API\n * compatibility); Spanish labels are matched by `SEMANTIC_BADGE_MAP_ES` through `semanticBadgeVariant()`, which the badge and the data table use.\n */\nexport const SEMANTIC_BADGE_MAP: Readonly<Record<string, BadgeVariant>> = {\n // Active/Inactive states\n 'Active': 'green',\n 'Inactive': 'gray',\n 'Off': 'gray',\n 'Disabled': 'red',\n 'Paused': 'amber',\n // Workflow\n 'Pending': 'blue',\n 'In Progress': 'cyan',\n 'Completed': 'emerald',\n 'Resolved': 'green',\n 'Draft': 'slate',\n 'Voided': 'slate',\n // Audit\n 'Created': 'green',\n 'Updated': 'blue',\n 'Deleted': 'red',\n 'Login': 'amber',\n 'Logout': 'gray',\n 'Exported': 'pink',\n 'Imported': 'orange',\n // Comms delivery\n 'Sent': 'blue',\n 'Delivered': 'green',\n 'Opened': 'teal',\n 'Clicked': 'emerald',\n 'Bounced': 'amber',\n 'Scheduled': 'sky',\n // Terminal/negative\n 'Failed': 'red',\n 'Cancelled': 'gray',\n 'Expired': 'orange',\n 'Declined': 'red',\n 'Signed': 'emerald',\n 'Paid': 'green',\n // Priority\n 'High': 'red',\n 'Medium': 'amber',\n 'Low': 'slate',\n // Direction\n 'Inbound': 'cyan',\n 'Outbound': 'teal',\n // Boolean/consent\n 'Yes': 'green',\n 'No': 'gray',\n 'Opted In': 'green',\n 'Opted Out': 'red',\n // Channel\n 'Text': 'indigo',\n 'Email': 'sky',\n};\n\n/**\n * Spanish aliases of the labels in `SEMANTIC_BADGE_MAP`: a Spanish status keeps the colour its English twin has (\"Activo\" is green like \"Active\", \"Pagado\"\n * green like \"Paid\"), so the same meaning has the same colour in either language. Looked up by `semanticBadgeVariant` after the exact English match.\n */\nexport const SEMANTIC_BADGE_MAP_ES: Readonly<Record<string, BadgeVariant>> = {\n 'Activo': 'green', 'Inactivo': 'gray', 'Apagado': 'gray', 'Desactivado': 'red', 'Deshabilitado': 'red', 'Pausado': 'amber',\n 'Pendiente': 'blue', 'En progreso': 'cyan', 'Completado': 'emerald', 'Resuelto': 'green', 'Borrador': 'slate', 'Anulado': 'slate',\n 'Creado': 'green', 'Actualizado': 'blue', 'Eliminado': 'red', 'Inicio de sesión': 'amber', 'Cierre de sesión': 'gray', 'Exportado': 'pink', 'Importado': 'orange',\n 'Enviado': 'blue', 'Entregado': 'green', 'Abierto': 'teal', 'Con clic': 'emerald', 'Rebotado': 'amber', 'Programado': 'sky',\n 'Fallido': 'red', 'Cancelado': 'gray', 'Vencido': 'orange', 'Rechazado': 'red', 'Firmado': 'emerald', 'Pagado': 'green',\n 'Alta': 'red', 'Media': 'amber', 'Baja': 'slate',\n 'Entrante': 'cyan', 'Saliente': 'teal',\n 'Sí': 'green', 'Aceptó': 'green', 'No aceptó': 'red',\n 'Texto': 'indigo', 'Correo electrónico': 'sky',\n};\n\nconst foldLabel = (label: string): string => label.normalize('NFD').replace(/[\\u0300-\\u036f]/g, '').trim().toLowerCase();\nconst SEMANTIC_ES_FOLDED: ReadonlyMap<string, BadgeVariant> = new Map(Object.entries(SEMANTIC_BADGE_MAP_ES).map(([k, v]) => [foldLabel(k), v]));\n\n/**\n * The semantic colour of a label, or `undefined` when it has none: the exact English entry of `SEMANTIC_BADGE_MAP` first, then - only while the app's\n * active locale is Spanish (the Spanish dictionary or `setLocale('es-..')`) - the Spanish alias, ignoring case and accents (\"ACTIVO\", \"sí\" and \"si\" are\n * all green). An English app never reaches the Spanish table, so an English label such as \"Media\" keeps its hash colour exactly as before.\n */\nexport function semanticBadgeVariant(label: string | null | undefined, locale: string = uiLocale()): BadgeVariant | undefined {\n if (!label) return undefined;\n const exact = SEMANTIC_BADGE_MAP[label];\n if (exact) return exact;\n return locale.toLowerCase().startsWith('es') ? SEMANTIC_ES_FOLDED.get(foldLabel(label)) : undefined;\n}\n\n/** Visually distinct variants used for auto-color assignment. */\nconst AUTO_COLOR_PALETTE: BadgeVariant[] = [\n 'green', 'blue', 'teal', 'pink', 'sky', 'ocean', 'cyan', 'rose',\n 'amber', 'purple', 'orange', 'sage', 'indigo', 'emerald', 'violet',\n 'lime', 'steel', 'coral', 'plum', 'slate', 'fuchsia', 'jade', 'navy',\n 'sienna', 'mauve', 'gold', 'bronze', 'walnut',\n];\n\n/**\n * Deterministic color from a string value — same value always gets the\n * same color, and adjacent values in the palette are visually distinct.\n */\nexport function autoVariant(value: string): BadgeVariant {\n let hash = 0;\n for (let i = 0; i < value.length; i++) {\n hash = (hash * 31 + value.charCodeAt(i)) & 0xffff;\n }\n return AUTO_COLOR_PALETTE[Math.abs(hash) % AUTO_COLOR_PALETTE.length];\n}\n\nexport interface BadgeConfig {\n label: string;\n variant: BadgeVariant;\n}\n\n// ── Toolbar actions ────────────────────────────────────────────\nexport interface ToolbarAction {\n type: string;\n label: string;\n /** SVG path data for an icon (optional) */\n icon?: string;\n /** 'primary' = blue standalone button, 'secondary' = gray outlined standalone button, omit = inside More Actions dropdown */\n variant?: 'primary' | 'secondary';\n /** Optional count badge shown on the button */\n badge?: number;\n /** Hide this action entirely */\n hidden?: boolean;\n /** Documentation of intent: marks a mutating action (\"Add …\", bulk mutations). It does not change behavior - the table hides\n * EVERY page-defined toolbar action for any `permission` other than 'full', unless it is marked `allowReadOnly`. */\n requiresFull?: boolean;\n /**\n * Keep this action when the table is empty and unfiltered. By default only `variant: 'primary'` buttons survive that\n * state; set this on secondary buttons and More Actions items that must stay reachable on an empty table (e.g. an\n * \"Import\" or \"Invite\" that is how the first record gets created). A kept More Actions item brings the More Actions\n * menu back (with its usual items).\n */\n keepWhenEmpty?: boolean;\n /**\n * Keep this action for a read-only table (`permission` other than 'full'). By default a read-only table drops every\n * page-defined toolbar action and keeps only Export; set this on a PURE READ - e.g. a \"Board View\" / \"List View\" switch\n * that changes what is shown but writes nothing. Never set it on an action that creates, changes or deletes a record.\n * On an empty, unfiltered table only primary buttons survive: add `keepWhenEmpty` as well to keep a view switch there.\n */\n allowReadOnly?: boolean;\n /**\n * Standalone toggle buttons (e.g. \"Assigned to Me\"): true / false renders `aria-pressed` so screen readers announce\n * the on / off state. Leave unset for ordinary buttons (no attribute).\n */\n pressed?: boolean;\n /**\n * Optional confirmation before the click is reported (library source 2026-11-05, not yet published). Set it ONLY on an action that needs a\n * confirm dialog (pause / run now / send to all): the table shows its confirm modal first, emits `(tableButtonClick)` only when the user\n * confirms, and emits nothing on Cancel / Escape / backdrop. An action without `confirm` behaves exactly as before. Not used for the\n * table's own Import and Export. Same copy fields as a row action's `modal` (`message` may be a function read at click time, for text that\n * depends on the host's current state); say what happens before -> after and what is NOT affected.\n */\n confirm?: ToolbarConfirm;\n}\n\n/** Confirm dialog copy of a toolbar action (see `ToolbarAction.confirm`). */\nexport interface ToolbarConfirm {\n title: string;\n message: string | (() => string);\n confirmLabel?: string;\n cancelLabel?: string;\n variant?: 'danger' | 'primary' | 'warning';\n details?: string[];\n}\n\n// ── Confirm config (used by RowAction.modal and ConfirmService) ─\nexport interface ConfirmConfig {\n title: string;\n /** Message text. In actionsFn context item is already in scope so a plain string is fine.\n * Pass a function when defining actions as a static array outside actionsFn. */\n message: string | ((item: any) => string);\n confirmLabel?: string; // default 'Confirm'\n cancelLabel?: string; // default 'Cancel'\n variant?: 'danger' | 'primary' | 'warning'; // default 'danger'; 'warning' makes the confirm button amber\n /** Bullet list shown under the message (consequences, what is NOT affected, undoable or not). Plain text only (never HTML).\n * Rendered by the confirm dialog (`data-testid=\"confirm-details\"`, aria-label \"What will happen\") and by the built-in row delete. */\n details?: string[];\n}\n\n// ── Row actions (for actions cell type) ───────────────────────\nexport interface RowAction {\n type: string;\n label: string;\n /** SVG path data string (the <path> or <line> etc. content only, no outer <svg>) */\n icon?: string;\n variant?: 'default' | 'danger';\n hidden?: (item: any) => boolean;\n disabled?: (item: any) => boolean;\n /** How the table handles this action when clicked.\n * 'modal' — table shows a built-in confirm modal; onAction is called only if confirmed.\n * 'panel' — table emits (panelActionClick); host component opens the right panel or form modal.\n * Omit — onAction is called directly (navigate, toggle, call, etc.) */\n opens?: 'modal' | 'panel';\n /** Required when opens === 'modal'. Drives the confirm dialog shown by the table. */\n modal?: ConfirmConfig;\n /** Documentation of intent: marks a mutating action (edit, delete, ...). It does not change behavior - for any `permission`\n * other than 'full' the table offers only View and actions marked `allowReadOnly`, with or without this flag.\n * The built-in `type: 'delete'` action is never offered to read-only users. */\n requiresFull?: boolean;\n /** Keep this action for read-only users too (download, preview: reads that change nothing). Without it a read-only table offers only\n * View. Never applies to the built-in delete, and the table still drops the Actions column when no row has any visible action. */\n allowReadOnly?: boolean;\n}\n\n/** Page-level permission passed to `<ui-data-table [permission]>`. Anything other than 'full' is read-only\n * (apps use values like 'read-only' / 'hidden'). */\nexport type TablePermission = 'full' | 'read' | 'read-only' | 'none' | 'hidden';\n\n// ── Cell types ────────────────────────────────────────────────\nexport type CellType =\n | 'text' // default — renders item[col.key] as string\n | 'badge' // renders a colored badge pill\n | 'date' // formats a date value\n | 'phone' // formats a phone number\n | 'number' // right-aligns header + cell; renders via render() or item[col.key]\n | 'avatar-name' // avatar circle + full name\n | 'days-ago' // \"Xd ago\" / \"Never\" with overdue styling\n | 'progress' // progress bar + label, driven by progressFn\n | 'tags' // first tag badge + \"+N more\"\n | 'image' // thumbnail driven by imageFn (placeholder icon when there is no URL / it fails to load)\n | 'link' // real <a> driven by linkFn (mailto:, tel:, http(s):, or an in-app route); plain text when linkFn gives no target\n | 'actions'; // more-menu dropdown\n\n// ── Link cells ────────────────────────────────────────────────\n/**\n * Where a `cellType: 'link'` cell points. Return a plain string from `linkFn` as shorthand for `{ href }`.\n *\n * - `routerLink` (+ `queryParams`) is an in-app route: the anchor gets the real URL as its `href` (so right-click,\n * middle-click, ctrl/cmd-click, \"open in new tab\" and \"copy link address\" all work) and a plain left click\n * navigates through the Angular `Router` without a page reload. `routerLink` wins when `href` is also set.\n * - `href` accepts ONLY `mailto:`, `tel:`, `http:`, `https:` and root-relative paths (`/cases/12`). Anything else\n * (`javascript:`, `data:`, `//host`, empty, control characters) is never rendered as an href: the cell shows plain\n * text. A root-relative `href` is a normal link (full page load); use `routerLink` for in-app navigation.\n * - `target: '_blank'` (default `'_self'`) adds `rel=\"noopener noreferrer\"` and a \"(opens in a new tab)\" screen-reader\n * hint. `http(s):` hrefs always get the same `rel`.\n * - `label` is the link text when the cell has no text of its own (`render` and `item[key]` are empty).\n * - `ariaLabel` replaces the link's accessible name (default: its text).\n * - `download` adds the `download` attribute.\n */\nexport interface LinkTarget {\n href?: string;\n routerLink?: string | readonly any[];\n queryParams?: Record<string, any>;\n target?: '_self' | '_blank';\n label?: string;\n ariaLabel?: string;\n download?: boolean;\n}\n\n/** Payload of `(linkClick)`: a link cell's anchor was activated by a click (the row click is NOT also emitted). */\nexport interface LinkClickEvent<T = any> {\n item: T;\n column: ColumnDef;\n /** The anchor's href (null only for a routerLink that could not be resolved, which renders no anchor anyway). */\n href: string | null;\n}\n\n// ── Column definition ─────────────────────────────────────────\nexport interface ColumnDef {\n key: string;\n label: string;\n sortable?: boolean;\n defaultVisible?: boolean;\n /**\n * Wire name of this column's FILTER, when it must differ from `key`. Defaults to `key` (unset = unchanged behaviour).\n * Replaces `key` only for: the column-filter query param on rows and export requests, the key read from the\n * `/filter-counts` response for this column's options/counts (also the bulk \"Change <column>\" options), and the key\n * stored in saved views (a view saved under the plain `key` still restores). Everything else stays on `key`:\n * sort (`sort=<key>`), cell values, visibility, `lockedColumn`, `searchFields`, `bulkUpdateOptions` and the\n * `/bulk/<field>` request body. It also names the header filter and the phone-card filter chips' request param. It must not equal a reserved table param (`page`, `size`, `search`, `searchFields`, `sort`, `direction`, `filter`) nor an `Object.prototype` member name such as `constructor` — there is no runtime guard. Example: `{ key: 'direction', filterParam: 'messageDirection' }` keeps the filter\n * from colliding with the table's own `direction=asc|desc` sort param.\n */\n filterParam?: string;\n /** If true, this column's label appears in the search input placeholder when the column is visible. */\n searchable?: boolean;\n /** Values a bulk \"Change <label>\" may set. When omitted the options come from /filter-counts.\n * Use it when only some values are user-settable or when a valid value may currently have no rows. */\n bulkOptions?: string[];\n /** Fixed column width (any CSS length, e.g. '140px'). Applied as width, min-width and max-width; cell text longer than\n * it is cut with an ellipsis. Omit for an automatic width. Not applied to the Actions column's cell clipping. */\n width?: string;\n align?: 'left' | 'right' | 'center';\n headerAlign?: 'left' | 'right' | 'center';\n\n /** How to render cell content. Defaults to 'text'. */\n cellType?: CellType;\n\n // ── badge ──\n /**\n * Maps a cell value (or full item) to a { label, variant } config.\n * When omitted, auto-color is applied using the value string.\n * Return null to render a plain '—' instead of a badge (e.g. for an empty value).\n */\n badgeFn?: (value: any, item?: any) => BadgeConfig | null;\n\n // ── star (text cells, e.g. the name column) ──\n /**\n * Puts a gold `<ui-star>` to the LEFT of the cell's text when it returns a non-empty string; that string is the star's tooltip\n * (hover / keyboard focus) and accessible name. Return null / undefined / '' for no star. The star is always gold.\n * Applies to plain text cells (and the title of the phone card); the row's accessible name is unchanged (`nameFn` / `render`).\n * Example: `{ key: 'name', label: 'Name', starFn: (doc) => doc.isAuthForm ? 'Authorization Form' : null }`\n */\n starFn?: (item: any) => string | null | undefined;\n\n // ── leading icon (text-like cells) ──\n /**\n * Library source 2026-11-05, not yet published. Draws a small decorative icon (16px, `aria-hidden`, currentColor, on the first text line, never shrinks)\n * to the LEFT of the cell text, in desktop cells and in the phone card (title, badge pills, detail rows). Returns a `<ui-icon>` key (see `iconPath()`) or a\n * raw 24x24 stroke SVG path (drawing commands and numbers only, same rule as ui-radio's `icon`); null / undefined / '' / anything else draws nothing.\n * Applies to text, badge, date, phone and number cells; never to avatar-name, link, tags, progress, image, days-ago or actions. The cell's text and the row's\n * accessible name are unchanged (see `iconLabelFn` for meaningful icons). Placed before a `starFn` star.\n * Example: `{ key: 'name', label: 'Name', iconFn: (r) => r.kind === 'rental' ? 'wrench' : 'cup' }`\n */\n iconFn?: (item: any) => string | null | undefined;\n /**\n * Library source 2026-11-05, not yet published. Accessible text for a MEANINGFUL `iconFn` icon: rendered as visually hidden text right after the icon\n * (the icon stays `aria-hidden`). Default (absent / null / '') = the icon is decorative. Ignored when no icon is drawn for the row.\n */\n iconLabelFn?: (item: any) => string | null | undefined;\n\n // ── footer totals ──\n /**\n * Footer text for this column, from the table's `totalsEndpoint` response (shown only while the table has rows and the totals loaded).\n * Return null / undefined / '' for an empty footer cell. `cellType: 'number'` columns are right-aligned like their body cells.\n * The table's `totalsLabel` goes in the footer cell of the first visible column; when that column has a `footerFn` too, the label is\n * kept as visually hidden text before the value (\"Total: $1,200\") so it is still announced once.\n * Example: `{ key: 'amount', label: 'Amount', cellType: 'number', footerFn: t => t['amount'] == null ? null : '$' + t['amount'] }`\n */\n footerFn?: (totals: Record<string, string | number | null>) => string | null | undefined;\n\n // ── date ──\n /** Date format string. Default: 'MMM d, y' */\n dateFormat?: string;\n\n // ── avatar-name ──\n /** Returns the display name for the row. Default: item[col.key] */\n nameFn?: (item: any) => string;\n /** Returns initials for the avatar. Default: first char of nameFn result */\n initialsFn?: (item: any) => string;\n\n // ── days-ago ──\n /** Key in item holding the days-since count. Defaults to col.key. */\n daysKey?: string;\n /** Days after which the cell is styled as overdue. Default: 30 */\n overdueThreshold?: number;\n\n // ── progress ──\n /**\n * Maps a row to a progress bar. Return null to render a plain '—' (e.g. nothing to track).\n * `label` is the text beside the bar (e.g. \"3/5\"); `tooltip` is the hover text. `ariaLabel` is the bar's accessible name (e.g. the row's name + \" cap progress\"); leave it out and the bar is named by its `label` text — which, with only \"80%\" to go on, tells a screen-reader user nothing about WHICH row it belongs to, so set it whenever several rows show a bar. Leave `variant` out and the bar colors itself by completion (red / amber / blue / green).\n */\n progressFn?: (item: any) => { value: number; max: number; label?: string; variant?: 'blue' | 'green' | 'amber' | 'red' | 'slate'; tooltip?: string; ariaLabel?: string } | null;\n\n // ── tags ──\n /** Key in item holding the tags array. Defaults to col.key.\n * Expected shape: { name: string; variant?: BadgeVariant; color?: string; colorName?: string }[]. `colorName` is the colour (or state) in words, e.g. 'red' or 'error': it is read by screen readers after the tag name (hidden visually) so the colour is never the only signal; omit it and nothing changes. `color` is a custom hex colour (`#rgb` / `#rrggbb`,\n * e.g. the colour a user picked for the tag): it becomes the chip background with dark or white text for contrast and wins over `variant`;\n * an invalid value is ignored. */\n tagsKey?: string;\n\n // ── link ──\n /**\n * `cellType: 'link'` — returns where the cell points for a row (`value` is `item[key]`), or null / undefined /\n * '' for no link (the cell then shows plain text). A string is shorthand for `{ href }`. See {@link LinkTarget}\n * for the contract and the allowed schemes. Text shown: `render(item)` if set, else `item[key]`, else the\n * target's `label`, else '—'. The text is always escaped. A throwing `linkFn` renders plain text.\n * Sorting, search, filters and export are independent of the link (export uses the host's `exportRow`).\n * Clicking or keying the anchor never emits `rowClick`; it emits `(linkClick)`.\n */\n linkFn?: (item: any, value: any) => LinkTarget | string | null | undefined;\n\n // ── image ──\n /** Returns the image URL for the row. A falsy value (null / undefined / '') shows the placeholder icon. */\n imageFn?: (item: any) => string | null | undefined;\n /** Focal point (percent, 50/50 = centered) of the cropped image, applied as CSS object-position. */\n imagePositionFn?: (item: any) => { x: number | null | undefined; y: number | null | undefined } | null | undefined;\n /** Alt text for the row's image. When omitted the image is decorative (`alt=\"\"`). */\n imageAlt?: (item: any) => string;\n /** 'circle' (default) or 'rounded' (3:2 rounded rectangle). */\n imageShape?: 'circle' | 'rounded';\n /** 'md' (default) or 'sm'. circle: 40px / 28px; rounded: 48x32 / 36x24. */\n imageSize?: 'sm' | 'md';\n /** Neutral icon shown when there is no URL or the image fails to load. Default: 'image'. */\n imagePlaceholder?: 'person' | 'image';\n\n // ── actions ──\n /** Returns the list of actions for a given row item. */\n actionsFn?: (item: any) => RowAction[];\n /** Called when the user clicks an action. */\n onAction?: (type: string, item: any) => void;\n\n // ── fallback ──\n /** Custom plain-text render function. Only used for 'text' type. */\n render?: (item: any) => string;\n\n // ── mobile ──\n /** Hide this column in the card-view detail rows on mobile (≤640px).\n * The title (avatar-name) and badge columns are always shown. */\n mobileHidden?: boolean;\n}\n\n// ── Quick filter tab ──────────────────────────────────────────\nexport interface QuickFilterTab {\n value: string;\n label: string;\n /** When true, the tab is shown as informational only and cannot be clicked. */\n disabled?: boolean;\n}\n\n// ── Column filter ─────────────────────────────────────────────\nexport interface FilterOption {\n value: string;\n label: string;\n color?: string;\n count?: number;\n}\n\n// ── Saved view ────────────────────────────────────────────────\nexport interface SavedView {\n id: string;\n name: string;\n isSystem?: boolean;\n /** Active quick-filter tab value at time of save */\n quickFilter?: string | null;\n /** Active sort column key at time of save */\n sortField?: string | null;\n /** Sort direction at time of save */\n sortDir?: string | null;\n /** Visible column keys at time of save (empty = use defaultVisible) */\n visibleColumns?: string[];\n /**\n * Active column filters at time of save: column key → comma-joined selected values (the same wire format the\n * table sends as query params). `undefined`/`null` (views saved before this existed, or a backend that doesn't\n * store it) leaves the current column filters untouched on load; `{}` clears them.\n */\n columnFilters?: Record<string, string> | null;\n /**\n * Active numeric range filters at save time (only tables with `rangeFilters`): column key -> `{ min, max }` (a bound is a number or\n * absent). Written only when a range is set. `undefined` / `null` (views saved before ranges existed, or a backend that doesn't store\n * it) leaves the current ranges untouched on load; `{}` clears them.\n */\n rangeFilters?: Record<string, { min?: number | null; max?: number | null }> | null;\n}\n\n// ── Numeric range column filter ───────────────────────────────\n\n/**\n * One `<ui-data-table [rangeFilters]>` entry: gives the visible column `key` a numeric Min / Max filter (same funnel icon and popover as\n * the value-list filter). Opt-in at the TABLE: a column that is not listed (or is hidden) has no range filter, and an empty list changes\n * nothing. When applied, the table sends `<minParam>=<n>` and `<maxParam>=<n>` (a bound that is empty is omitted) on the rows, export and\n * totals requests (not on /counts or /filter-counts, like every column filter); the BACKEND does the filtering.\n *\n * readonly rangeFilters: RangeFilterConfig[] = [{ key: 'rentableSf', minParam: 'rentableSfMin', maxParam: 'rentableSfMax', min: 0, step: 100, format: 'number' }];\n */\nexport interface RangeFilterConfig {\n /** Key of a column of the table. */\n key: string;\n /** Query param for the lower bound. Default `<key>Min`. */\n minParam?: string;\n /** Query param for the upper bound. Default `<key>Max`. */\n maxParam?: string;\n /** Lowest value the user may enter (default 0, so negatives are refused; pass a negative number to allow them). */\n min?: number;\n /** Highest value the user may enter (default: no limit). */\n max?: number;\n /** Step of the number fields; also sets the decimals allowed (step 0.01 = 2 decimals, whole-number steps = whole numbers). Default 1. */\n step?: number;\n /** How bounds are written in the chip / active label: plain number (default), US dollars or a percent. Values sent are always plain numbers. */\n format?: 'number' | 'currency' | 'percent';\n /** Text appended to a bound in the label when `format` is 'number' (e.g. 'SF'). */\n unit?: string;\n}\n\n// ── Bulk actions ──────────────────────────────────────────────\n\n/**\n * Declares a bulk action available in the table's selection bar.\n * Options for select-based actions are derived automatically from the table's\n * column configuration (columnFilters → quickFilterTabs → filterCounts → distinct values).\n */\n/**\n * One `bulkUpdateOptions` entry:\n * - `'delete'` — the built-in bulk delete;\n * - a column key (e.g. `'status'`) — \"Change <column label>\" with options from /filter-counts;\n * - `{ field, exclude }` — the same, minus values users can't set by hand (e.g. a status only the\n * system sets). Excluded values are left out of the bulk select only — the column filter, quick-filter\n * tabs and counts still show them. Matching ignores case, spaces, dashes and underscores.\n *\n * readonly bulkUpdateOptions: BulkUpdateOption[] = [{ field: 'status', exclude: ['EXPIRED'] }, 'delete'];\n * - `{ field, allowedFrom }` — the status workflow: a map of TARGET value -> the values a row may currently\n * have to move to it, e.g. `{ SENT: ['DRAFT'], VOIDED: ['DRAFT', 'SENT'] }`. The bulk select then offers only\n * targets that at least one selected row can legally move to (a target with no entry is not selectable), and rows\n * whose current value is not in the target's list are skipped (counted, never sent). Without `allowedFrom` every\n * row can move to any value it does not already have. Combine with `exclude` freely (exact, case-sensitive values).\n *\n * { field: 'status', allowedFrom: { SENT: ['DRAFT'], VOIDED: ['DRAFT', 'SENT'] } }\n */\nexport type BulkUpdateOption<T = any> = string | {\n field: string;\n /**\n * Field changes (`{ field, label }`): the bulk bar button text instead of \"Change <column label>\", e.g. `{ field: 'state', label: 'Archive / Restore' }`.\n * It is also the inline select's accessible name, the default confirm's title and confirm button, and the default confirm message reads\n * \"<label>: <option> for N items?\" (instead of \"Change <column> to <option> for N items?\"). Host `confirm` copy still wins; its\n * `ctx.columnLabel` stays the column's label. Trimmed; blank = ignored. Ignored for the reserved `delete` key. Omit it and nothing changes.\n * Direct actions (`action: true`): the bar button text, default confirm title and confirm button (required in practice; trimmed,\n * blank = the key split on `_`, `-` and camelCase with only the first word capitalised: 'resend' -> 'Resend', 'send_reminder' / 'sendReminder' -> 'Send reminder'); `ctx.columnLabel` is this label.\n *\n * { field: 'state', label: 'Archive / Restore' }\n */\n label?: string;\n exclude?: string[];\n allowedFrom?: Record<string, string[]>;\n /**\n * Host-written confirm copy (see `BulkConfirmFn`): one function for every target value, or a map target value -> function\n * (a target without an entry keeps the library's default wording). For the reserved delete key use\n * `{ field: 'delete', confirm }`. Omit it and the confirm keeps today's default wording.\n */\n confirm?: BulkConfirmFn<T> | Record<string, BulkConfirmFn<T>>;\n /**\n * Bulk Delete only (`{ field: 'delete', deletable }`): true when the server will accept deleting this row. Keep it identical\n * to the backend rule. Only deletable rows are counted in the confirm, sent to `/bulk/delete` and shown as deleted; the others\n * are skipped (\"N selected rows can't be deleted and will be skipped.\"). The Delete button is disabled (with a reason) when\n * no selected row is deletable. Omit it and every selected row is sent, as before.\n *\n * { field: 'delete', deletable: (row: Invoice) => row.status === 'DRAFT' }\n */\n deletable?: (row: T) => boolean;\n /**\n * Field changes (`{ field, canChange }`): true when the server will accept moving THIS row to `target` (a value the select offers).\n * For rules the field values alone can't express, e.g. a draft can only be sent when it has a document and a recipient. Keep it\n * identical to the backend rule. Rows it refuses are skipped like rows `allowedFrom` refuses (\"N selected rows can't be changed to X\n * and will be skipped.\" / `ctx.skippedBlocked` + `ctx.skippedRows` for host `confirm` copy), are never sent, and a target is offered\n * only while some selected row can move to it. It runs after `allowedFrom` and only sees rows on the loaded page. Omit it and\n * nothing changes.\n *\n * { field: 'status', allowedFrom: { SENT: ['DRAFT'] }, canChange: (row, target) => target !== 'SENT' || canSend(row) }\n */\n canChange?: (row: T, target: string) => boolean;\n /**\n * Field changes (`{ field, canApply }`): a rule on the WHOLE selection, in addition to the per-row `allowedFrom` / `canChange`. Called with every\n * selected row of the loaded page and the target value; return `true` to allow, `false` (generic reason) or a string (the reason shown to the\n * user) to refuse. Use it for a rule no single row can express (\"an Archived invoice batch must all belong to one customer\", \"all rows must\n * share the same status\"). Keep it identical to the backend rule. A target it refuses is listed in the select but disabled, with a visible\n * \"<option>: <reason>\" hint, and Apply re-checks it (a refused target is never confirmed or sent; the reason is shown as an error toast). A function that throws counts as\n * refused. It only sees rows on the loaded page. Ignored for Delete and direct actions. Omit it and nothing changes.\n *\n * { field: 'status', canApply: (rows, target) => target !== 'MERGED' || new Set(rows.map(r => r.customerId)).size === 1 || 'Rows must belong to one customer.' }\n */\n canApply?: (rows: T[], target: string) => boolean | string;\n /**\n * Field changes (`{ field, listAll }`): list the FULL set of values in the \"Change <column>\" select instead of only the values the\n * /filter-counts response currently carries (which omits values no row has yet). `true` = the filter-count values plus every target of\n * `allowedFrom` that is not already listed; a list of values = exactly that set, in that order (labelled through the column's `badgeFn`). The\n * `exclude`, `allowedFrom`, `canChange` and `canApply` rules and the \"not already held by every selected row\" rule still apply, so listing a\n * value never offers a change the table knows the server refuses. An empty list is ignored. Omit it and nothing changes.\n *\n * { field: 'status', listAll: ['DRAFT', 'SENT', 'SIGNED', 'VOIDED'], allowedFrom: { SENT: ['DRAFT'], SIGNED: ['SENT'], VOIDED: ['DRAFT', 'SENT'] } }\n */\n listAll?: true | readonly string[];\n /**\n * Field changes (`{ field, order }`): the order of the \"Change <column>\" select. Values listed in `order` come first, in that order (matched\n * exactly to the option values, case-sensitive); the remaining options follow in their existing order. Values in `order` that are not among\n * the options are ignored (nothing is added). It only sorts: `exclude`, `allowedFrom`, `canChange`, `canApply`, `listAll` and the \"not already\n * held by every selected row\" rule decide WHICH options appear. Ignored for Delete and direct actions. Omit it and nothing changes.\n *\n * { field: 'type', order: ['office', 'retail', 'industrial', 'multifamily'] }\n */\n order?: readonly string[];\n /**\n * Direct bulk action (`{ field: 'resend', action: true, label: 'Resend' }`): a bulk-bar button that is neither a field change nor\n * Delete. `field` is the action key (no column needed), the button type is `action-<field>` and there is no inline select.\n * Clicking it opens the library confirm, then POSTs `<endpoint>/bulk/<field>` with exactly `{ ids }` (the eligible rows). The response is\n * handled like a field change (`updated`, `skipped`, `notAllowed`, readable `message`). Ignored for the reserved `delete` key.\n * Read-only users get no bulk bar, so nothing changes for them. Omit it and nothing changes.\n * `confirm` on an action takes only the function form; a map (target value -> function) is ignored and the default copy is used.\n *\n * { field: 'resend', action: true, label: 'Resend', eligible: (row: Request) => row.status === 'PENDING' }\n */\n action?: boolean;\n /** Direct action only: button style, default 'secondary'. 'danger' also makes the default confirm button red. */\n variant?: 'secondary' | 'danger';\n /**\n * Direct action only: true when the server will accept the action for this row (keep it identical to the backend rule). Rows it\n * refuses are skipped (counted, NEVER sent; \"N selected rows don't qualify for <label lower-cased> and will be skipped.\"). When no selected loaded row passes,\n * the button is disabled with a visible reason (\"None of the selected rows qualify for <label lower-cased>.\"). Omit it and every selected row is sent. A predicate that throws counts as \"row not eligible\" (never breaks rendering).\n */\n eligible?: (row: T) => boolean;\n /**\n * Direct action only: the past-tense word in the result toast. \"N <doneLabel>, M skipped.\" when anything was skipped / not allowed,\n * else \"N <itemLabel>(s) <doneLabel>.\". Default 'updated'.\n * English keeps the past-tense word ('resent' -> \"N contacts resent.\"). In Spanish the summary reads \"<doneLabel>: N <items>.\" and the word is\n * a capitalised NOUN, not a participle: pass 'Reenvío' (\"Reenvío: 3 contactos.\"), not 'enviados' (\"enviados: 3 contactos.\"). The built-in\n * default ('updated') is translated by the dictionary and needs nothing.\n */\n doneLabel?: string;\n /**\n * Direct action only: the request returns a FILE instead of JSON (a ZIP of PDFs, a CSV...). The table still confirms first and POSTs\n * `<endpoint>/bulk/<field>` with exactly `{ ids }`, but asks for a blob response and saves it as one download (one file, so browsers do not\n * block it the way several automatic downloads are blocked). The file name is the response's `Content-Disposition` filename, else\n * `fileName`, else the action key. The toast reads \"N <itemLabel>(s) <doneLabel>.\" (`doneLabel` defaults to 'downloaded' here); the server may\n * send an `X-Skipped-Count` header with the number of selected rows it left out of the file (\"N downloaded, M skipped.\"). The rows do not change,\n * so the table is not refreshed; the selection is cleared and `(bulkAction)` is emitted. An error response is read as `{ message }` JSON and shown\n * in an error toast. Omit it and the action expects JSON as before.\n *\n * { field: 'download-pdfs', action: true, label: 'Download PDFs', download: { fileName: 'inspections.zip' } }\n */\n download?: { fileName?: string };\n /**\n * Direct action only (`opens: 'panel'`): the button does not confirm and does not POST. It emits `(bulkPanelClick)` with the\n * eligible rows and the host opens its own panel or form (compose an e-mail, add a charge...) and does the work itself.\n * The host calls `clearSelection()` and `refresh()` on the table when it is done. `confirm` and `doneLabel` are ignored for a panel action (no confirm is shown; `variant: 'danger'` still colours the button); `eligible` still applies (refused rows are never passed on). Omit it and nothing changes.\n *\n * { field: 'email', action: true, opens: 'panel', label: 'Email', eligible: (r: Resident) => !!r.email }\n */\n opens?: 'panel';\n /**\n * Panel action only (`opens: 'panel'`): true while the action is not available right now (e.g. text messaging is switched off). The button is\n * then not shown at all. Read every time the bar renders, so it can read signals; a function that throws counts as \"not hidden\". A panel\n * action is also not shown while none of the selected rows is `eligible`. Omit it and the button shows whenever a selected row is eligible.\n */\n hidden?: () => boolean;\n};\n\n/** What a bulk confirm function receives. For a direct bulk action: `columnLabel` is the action label, `targetValue`/`targetLabel` are '', `rows`/`skippedRows` the eligible / refused selected rows. For bulk Delete: `targetValue`/`targetLabel` are '', `columnLabel` is 'Delete', skipped counts are 0. */\nexport interface BulkConfirmContext<T = any> {\n /** Rows that WILL be sent (eligible). For Delete: the selected count. */\n count: number;\n /** Selected rows skipped because they already hold the target value. */\n skippedAlready: number;\n /** Selected rows skipped because `allowedFrom` does not allow the move. */\n skippedBlocked: number;\n /** Everything the user selected (`count + skippedAlready + skippedBlocked`). */\n selectedCount: number;\n /** Singular / plural item label (the table's `itemLabel` / `itemLabelPlural`). */\n itemLabel: string;\n itemLabelPlural: string;\n /** Label of the column being changed (\"Status\"). */\n columnLabel: string;\n /** Raw target value (\"APPROVED\") and its display label (\"Approved\"). */\n targetValue: string;\n targetLabel: string;\n /**\n * The eligible row objects (name records, show before -> after). A selection never spans pages (any reload clears it and\n * select-all takes the loaded page), so these are every row that will be sent.\n */\n rows: T[];\n /** The selected rows that will be skipped. */\n skippedRows: T[];\n}\n\n/** Host copy for one bulk confirm. Plain text only (never HTML); `\\n` in `message` shows as a line break. */\nexport interface BulkConfirmCopy {\n /** Default: the action label (\"Change Status\") / \"Delete <Items>\" built from the table's item label (\"template\" → \"Delete Templates\"). */\n title?: string;\n message: string;\n /** Rendered as a bullet list under the message (consequences, what is NOT affected, undoable or not). */\n details?: string[];\n /** Default: the action label / \"Delete\". */\n confirmLabel?: string;\n /** Default: 'primary' for a field change, 'danger' for Delete. 'danger' makes the confirm button red. */\n variant?: 'primary' | 'danger' | 'warning';\n /** By default the library appends its standard \"N selected rows ... will be skipped.\" sentence (change actions); set true to write it yourself. */\n omitSkippedNote?: boolean;\n}\n\nexport type BulkConfirmFn<T = any> = (ctx: BulkConfirmContext<T>) => BulkConfirmCopy | string;\n\nexport interface BulkActionDef {\n /** Action key — passed through to the (bulkAction) event. */\n type: string;\n /** Button label shown in the bulk bar. */\n label: string;\n /** True when `label` came from the entry's custom `label` (the default confirm message then reads \"<label>: <option> for N items?\"). Only set then. */\n customLabel?: boolean;\n /** Button style. Default: 'secondary'. Use 'danger' for destructive actions. */\n variant?: 'secondary' | 'danger';\n /** Values left out of this field's bulk select (from a `{ field, exclude }` bulkUpdateOptions entry). */\n exclude?: string[];\n /** Workflow rules (from `{ field, allowedFrom }`): target value -> source values a row may move from. */\n allowedFrom?: Record<string, string[]>;\n /** Host confirm copy (from `{ field, confirm }`). */\n confirm?: BulkConfirmFn | Record<string, BulkConfirmFn>;\n /** Bulk Delete only: which rows the server will delete (from `{ field: 'delete', deletable }`). */\n deletable?: (row: any) => boolean;\n /** Field changes: per-row check that the server will accept the move to a target (from `{ field, canChange }`). */\n canChange?: (row: any, target: string) => boolean;\n /** Field changes: rule on the whole selection (from `{ field, canApply }`): true = allowed, false / a string = refused (the string is the reason). */\n canApply?: (rows: any[], target: string) => boolean | string;\n /** Field changes: list the full value set (from `{ field, listAll }`): `true` or the exact list of values. */\n listAll?: true | readonly string[];\n /** Field changes: option order (from `{ field, order }`): these values first, in this order. */\n order?: readonly string[];\n /** True for a direct bulk action (from `{ field, action: true, label }`); `type` is `action-<key>` and `field` is not set (no inline select). */\n action?: boolean;\n /** Direct action: which rows the server will accept (from `{ field, action: true, eligible }`). */\n eligible?: (row: any) => boolean;\n /** Direct action: past-tense word in the result toast (from `{ doneLabel }`), default 'updated'. */\n doneLabel?: string;\n /** Direct action that returns a file (from `{ download }`): the response is saved as a download instead of read as JSON. */\n download?: { fileName?: string };\n /** True for a direct action that opens a host panel instead of confirming and POSTing (from `{ opens: 'panel' }`). */\n opensPanel?: boolean;\n /** Panel action: true while it is not available (from `{ hidden }`); the button is not shown. */\n hidden?: () => boolean;\n /**\n * The item field this action targets (e.g. 'status', 'type').\n * When set the table shows an inline select populated from the column's option sources.\n * Omit for direct actions like delete that need no value selection.\n */\n field?: string;\n}\n\n/** Emitted by (bulkAction) after the user selects a value and clicks Apply. */\nexport interface BulkActionEvent {\n type: string;\n ids: string[];\n value?: string;\n skippedCount: number;\n}\n\n/** Emitted by (bulkPanelClick) when the user clicks a bulk action declared with `opens: 'panel'`. */\nexport interface BulkPanelEvent<T = any> {\n /** `action-<key>` of the clicked bulk option. */\n type: string;\n /** The option's `field` (its key), e.g. 'email'. */\n key: string;\n /** Ids of the eligible selected rows. */\n ids: string[];\n /** The eligible selected rows (loaded page). */\n rows: T[];\n /** Selected rows the option's `eligible` refused. */\n skippedCount: number;\n}\n\n/** Emitted by (rowReorder) after the user moves a row (`reorderable`). */\nexport interface TableRowReorderEvent<T = any> {\n /** The row that was moved. */\n item: T;\n /** Its index on the page before and after the move (0-based). */\n from: number;\n to: number;\n /** The rows on the page in their new order. */\n items: T[];\n /** How many rows come before this page (0 on the first page), so `offset + to` is the row's position in the whole list. */\n offset: number;\n}\n\n// ── Page response from backend ────────────────────────────────\nexport interface PageResponse<T> {\n content: T[];\n totalElements: number;\n totalPages: number;\n number: number;\n size: number;\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"forgeroute-ui-table-types.mjs","names":[],"sources":["../../../projects/forgeroute-ui/table-types/src/lib/data-table/data-table.types.ts"],"sourcesContent":["import { InjectionToken, WritableSignal } from '@angular/core';\nimport { uiLocale } from '@forgeroute/ui/core';\n\nexport type SortDir = 'asc' | 'desc';\n\n/**\n * Shared signal provided at the DataTableComponent level.\n * Holds the ID of the currently-open dropdown. When any dropdown\n * opens it sets this to its own ID — all others react and close.\n */\nexport const DROPDOWN_GROUP = new InjectionToken<WritableSignal<string>>('DROPDOWN_GROUP');\n\n// ── Badge ──────────────────────────────────────────────────────\nexport type BadgeVariant =\n | 'green' | 'blue' | 'red' | 'amber' | 'purple' | 'gray' | 'teal' | 'pink'\n | 'indigo' | 'orange' | 'cyan' | 'lime' | 'rose' | 'slate'\n | 'emerald' | 'sky' | 'fuchsia' | 'yellow' | 'violet' | 'stone'\n | 'mint' | 'steel' | 'bronze' | 'plum' | 'sage' | 'coral' | 'sand' | 'ocean' | 'pewter'\n | 'gold' | 'jade' | 'sienna' | 'mauve' | 'walnut' | 'navy';\n\nexport const BADGE_VARIANT_STYLES: Record<BadgeVariant, { bg: string; color: string }> = {\n green: { bg: '#dcfce7', color: '#166534' },\n blue: { bg: '#dbeafe', color: '#1e40af' },\n red: { bg: '#fee2e2', color: '#991b1b' },\n amber: { bg: '#fef3c7', color: '#92400e' },\n purple: { bg: '#fff1f2', color: '#881337' },\n gray: { bg: '#f1f5f9', color: '#475569' },\n teal: { bg: '#ccfbf1', color: '#115e59' },\n pink: { bg: '#fce7f3', color: '#be185d' },\n indigo: { bg: '#bfdbfe', color: '#1e3a8a' },\n orange: { bg: '#ffedd5', color: '#9a3412' },\n cyan: { bg: '#cffafe', color: '#155e75' },\n lime: { bg: '#ecfccb', color: '#3f6212' },\n rose: { bg: '#ffe4e6', color: '#9f1239' },\n slate: { bg: '#e2e8f0', color: '#334155' },\n emerald: { bg: '#d1fae5', color: '#065f46' },\n sky: { bg: '#e0f2fe', color: '#0c4a6e' },\n fuchsia: { bg: '#fdf4ff', color: '#a21caf' },\n yellow: { bg: '#fef9c3', color: '#854d0e' },\n violet: { bg: '#fefce8', color: '#713f12' },\n stone: { bg: '#f5f5f4', color: '#57534e' },\n mint: { bg: '#d1fae5', color: '#047857' },\n steel: { bg: '#cbd5e1', color: '#1e293b' },\n bronze: { bg: '#fde68a', color: '#78350f' },\n plum: { bg: '#f5f5f4', color: '#44403c' },\n sage: { bg: '#d9f99d', color: '#4d7c0f' },\n coral: { bg: '#fecdd3', color: '#be123c' },\n sand: { bg: '#e7e5e4', color: '#44403c' },\n ocean: { bg: '#bae6fd', color: '#075985' },\n pewter: { bg: '#d4d4d8', color: '#3f3f46' },\n gold: { bg: '#fbbf24', color: '#78350f' },\n jade: { bg: '#6ee7b7', color: '#064e3b' },\n sienna: { bg: '#f0cfb8', color: '#7c2d12' },\n mauve: { bg: '#f0d9e0', color: '#6b2d3e' },\n walnut: { bg: '#d4a27a', color: '#1c0f09' },\n navy: { bg: '#93c5fd', color: '#172554' },\n};\n\n/**\n * Global semantic map — same label always gets the same color across every\n * table in the app, regardless of which page or column it appears in. The keys are the ENGLISH labels (the exported constant stays English for API\n * compatibility); Spanish labels are matched by `SEMANTIC_BADGE_MAP_ES` through `semanticBadgeVariant()`, which the badge and the data table use.\n */\nexport const SEMANTIC_BADGE_MAP: Readonly<Record<string, BadgeVariant>> = {\n // Active/Inactive states\n 'Active': 'green',\n 'Inactive': 'gray',\n 'Off': 'gray',\n 'Disabled': 'red',\n 'Paused': 'amber',\n // Workflow\n 'Pending': 'blue',\n 'In Progress': 'cyan',\n 'Completed': 'emerald',\n 'Resolved': 'green',\n 'Draft': 'slate',\n 'Voided': 'slate',\n // Audit\n 'Created': 'green',\n 'Updated': 'blue',\n 'Deleted': 'red',\n 'Login': 'amber',\n 'Logout': 'gray',\n 'Exported': 'pink',\n 'Imported': 'orange',\n // Comms delivery\n 'Sent': 'blue',\n 'Delivered': 'green',\n 'Opened': 'teal',\n 'Clicked': 'emerald',\n 'Bounced': 'amber',\n 'Scheduled': 'sky',\n // Terminal/negative\n 'Failed': 'red',\n 'Cancelled': 'gray',\n 'Expired': 'orange',\n 'Declined': 'red',\n 'Signed': 'emerald',\n 'Paid': 'green',\n // Priority\n 'High': 'red',\n 'Medium': 'amber',\n 'Low': 'slate',\n // Direction\n 'Inbound': 'cyan',\n 'Outbound': 'teal',\n // Boolean/consent\n 'Yes': 'green',\n 'No': 'gray',\n 'Opted In': 'green',\n 'Opted Out': 'red',\n // Channel\n 'Text': 'indigo',\n 'Email': 'sky',\n};\n\n/**\n * Spanish aliases of the labels in `SEMANTIC_BADGE_MAP`: a Spanish status keeps the colour its English twin has (\"Activo\" is green like \"Active\", \"Pagado\"\n * green like \"Paid\"), so the same meaning has the same colour in either language. Looked up by `semanticBadgeVariant` after the exact English match.\n */\nexport const SEMANTIC_BADGE_MAP_ES: Readonly<Record<string, BadgeVariant>> = {\n 'Activo': 'green', 'Inactivo': 'gray', 'Apagado': 'gray', 'Desactivado': 'red', 'Deshabilitado': 'red', 'Pausado': 'amber',\n 'Pendiente': 'blue', 'En progreso': 'cyan', 'Completado': 'emerald', 'Resuelto': 'green', 'Borrador': 'slate', 'Anulado': 'slate',\n 'Creado': 'green', 'Actualizado': 'blue', 'Eliminado': 'red', 'Inicio de sesión': 'amber', 'Cierre de sesión': 'gray', 'Exportado': 'pink', 'Importado': 'orange',\n 'Enviado': 'blue', 'Entregado': 'green', 'Abierto': 'teal', 'Con clic': 'emerald', 'Rebotado': 'amber', 'Programado': 'sky',\n 'Fallido': 'red', 'Cancelado': 'gray', 'Vencido': 'orange', 'Rechazado': 'red', 'Firmado': 'emerald', 'Pagado': 'green',\n 'Alta': 'red', 'Media': 'amber', 'Baja': 'slate',\n 'Entrante': 'cyan', 'Saliente': 'teal',\n 'Sí': 'green', 'Aceptó': 'green', 'No aceptó': 'red',\n 'Texto': 'indigo', 'Correo electrónico': 'sky',\n};\n\nconst foldLabel = (label: string): string => label.normalize('NFD').replace(/[\\u0300-\\u036f]/g, '').trim().toLowerCase();\nconst SEMANTIC_ES_FOLDED: ReadonlyMap<string, BadgeVariant> = new Map(Object.entries(SEMANTIC_BADGE_MAP_ES).map(([k, v]) => [foldLabel(k), v]));\n\n/**\n * The semantic colour of a label, or `undefined` when it has none: the exact English entry of `SEMANTIC_BADGE_MAP` first, then - only while the app's\n * active locale is Spanish (the Spanish dictionary or `setLocale('es-..')`) - the Spanish alias, ignoring case and accents (\"ACTIVO\", \"sí\" and \"si\" are\n * all green). An English app never reaches the Spanish table, so an English label such as \"Media\" keeps its hash colour exactly as before.\n */\nexport function semanticBadgeVariant(label: string | null | undefined, locale: string = uiLocale()): BadgeVariant | undefined {\n if (!label) return undefined;\n const exact = SEMANTIC_BADGE_MAP[label];\n if (exact) return exact;\n return locale.toLowerCase().startsWith('es') ? SEMANTIC_ES_FOLDED.get(foldLabel(label)) : undefined;\n}\n\n/** Visually distinct variants used for auto-color assignment. */\nconst AUTO_COLOR_PALETTE: BadgeVariant[] = [\n 'green', 'blue', 'teal', 'pink', 'sky', 'ocean', 'cyan', 'rose',\n 'amber', 'purple', 'orange', 'sage', 'indigo', 'emerald', 'violet',\n 'lime', 'steel', 'coral', 'plum', 'slate', 'fuchsia', 'jade', 'navy',\n 'sienna', 'mauve', 'gold', 'bronze', 'walnut',\n];\n\n/**\n * Deterministic color from a string value — same value always gets the\n * same color, and adjacent values in the palette are visually distinct.\n */\nexport function autoVariant(value: string): BadgeVariant {\n let hash = 0;\n for (let i = 0; i < value.length; i++) {\n hash = (hash * 31 + value.charCodeAt(i)) & 0xffff;\n }\n return AUTO_COLOR_PALETTE[Math.abs(hash) % AUTO_COLOR_PALETTE.length];\n}\n\nexport interface BadgeConfig {\n label: string;\n variant: BadgeVariant;\n}\n\n// ── Toolbar actions ────────────────────────────────────────────\nexport interface ToolbarAction {\n type: string;\n label: string;\n /** SVG path data for an icon (optional) */\n icon?: string;\n /** 'primary' = blue standalone button, 'secondary' = gray outlined standalone button, omit = inside More Actions dropdown */\n variant?: 'primary' | 'secondary';\n /** Optional count badge shown on the button */\n badge?: number;\n /** Hide this action entirely */\n hidden?: boolean;\n /** Documentation of intent: marks a mutating action (\"Add …\", bulk mutations). It does not change behavior - the table hides\n * EVERY page-defined toolbar action for any `permission` other than 'full', unless it is marked `allowReadOnly`. */\n requiresFull?: boolean;\n /**\n * Keep this action when the table is empty and unfiltered. By default only `variant: 'primary'` buttons survive that\n * state; set this on secondary buttons and More Actions items that must stay reachable on an empty table (e.g. an\n * \"Import\" or \"Invite\" that is how the first record gets created). A kept More Actions item brings the More Actions\n * menu back (with its usual items).\n */\n keepWhenEmpty?: boolean;\n /**\n * Keep this action for a read-only table (`permission` other than 'full'). By default a read-only table drops every\n * page-defined toolbar action and keeps only Export; set this on a PURE READ - e.g. a \"Board View\" / \"List View\" switch\n * that changes what is shown but writes nothing. Never set it on an action that creates, changes or deletes a record.\n * On an empty, unfiltered table only primary buttons survive: add `keepWhenEmpty` as well to keep a view switch there.\n */\n allowReadOnly?: boolean;\n /**\n * Standalone toggle buttons (e.g. \"Assigned to Me\"): true / false renders `aria-pressed` so screen readers announce\n * the on / off state. Leave unset for ordinary buttons (no attribute).\n */\n pressed?: boolean;\n /**\n * Optional confirmation before the click is reported (library source 2026-11-05, not yet published). Set it ONLY on an action that needs a\n * confirm dialog (pause / run now / send to all): the table shows its confirm modal first, emits `(tableButtonClick)` only when the user\n * confirms, and emits nothing on Cancel / Escape / backdrop. An action without `confirm` behaves exactly as before. Not used for the\n * table's own Import and Export. Same copy fields as a row action's `modal` (`message` may be a function read at click time, for text that\n * depends on the host's current state); say what happens before -> after and what is NOT affected.\n */\n confirm?: ToolbarConfirm;\n}\n\n/** Confirm dialog copy of a toolbar action (see `ToolbarAction.confirm`). */\nexport interface ToolbarConfirm {\n title: string;\n message: string | (() => string);\n confirmLabel?: string;\n cancelLabel?: string;\n variant?: 'danger' | 'primary' | 'warning';\n details?: string[];\n}\n\n// ── Confirm config (used by RowAction.modal and ConfirmService) ─\nexport interface ConfirmConfig {\n title: string;\n /** Message text. In actionsFn context item is already in scope so a plain string is fine.\n * Pass a function when defining actions as a static array outside actionsFn. */\n message: string | ((item: any) => string);\n confirmLabel?: string; // default 'Confirm'\n cancelLabel?: string; // default 'Cancel'\n variant?: 'danger' | 'primary' | 'warning'; // default 'danger'; 'warning' makes the confirm button amber\n /** Bullet list shown under the message (consequences, what is NOT affected, undoable or not). Plain text only (never HTML).\n * Rendered by the confirm dialog (`data-testid=\"confirm-details\"`, aria-label \"What will happen\") and by the built-in row delete. */\n details?: string[];\n}\n\n// ── Row actions (for actions cell type) ───────────────────────\nexport interface RowAction {\n type: string;\n label: string;\n /** SVG path data string (the <path> or <line> etc. content only, no outer <svg>) */\n icon?: string;\n variant?: 'default' | 'danger';\n hidden?: (item: any) => boolean;\n disabled?: (item: any) => boolean;\n /**\n * Why a disabled action is disabled (library source 2026-11-21, additive). Shown in the row menu as visible text under the action's label, linked to it with `aria-describedby` and also set as its `title`.\n * A function receives the row (inside `<ui-data-table>`; a standalone `ui-more-menu` calls it with `null`); `null` / `undefined` / empty = no reason. Only used while the action is disabled. An action with a\n * reason stays focusable (`aria-disabled`, so a screen-reader user can reach it and hear the reason) but never runs, and is never clickable.\n */\n disabledReason?: string | ((item: any) => string | null | undefined);\n /** How the table handles this action when clicked.\n * 'modal' — table shows a built-in confirm modal; onAction is called only if confirmed.\n * 'panel' — table emits (panelActionClick); host component opens the right panel or form modal.\n * Omit — onAction is called directly (navigate, toggle, call, etc.) */\n opens?: 'modal' | 'panel';\n /** Required when opens === 'modal'. Drives the confirm dialog shown by the table. */\n modal?: ConfirmConfig;\n /** Documentation of intent: marks a mutating action (edit, delete, ...). It does not change behavior - for any `permission`\n * other than 'full' the table offers only View and actions marked `allowReadOnly`, with or without this flag.\n * The built-in `type: 'delete'` action is never offered to read-only users. */\n requiresFull?: boolean;\n /** Keep this action for read-only users too (download, preview: reads that change nothing). Without it a read-only table offers only\n * View. Never applies to the built-in delete, and the table still drops the Actions column when no row has any visible action. */\n allowReadOnly?: boolean;\n}\n\n/** Page-level permission passed to `<ui-data-table [permission]>`. Anything other than 'full' is read-only\n * (apps use values like 'read-only' / 'hidden'). */\nexport type TablePermission = 'full' | 'read' | 'read-only' | 'none' | 'hidden';\n\n// ── Cell types ────────────────────────────────────────────────\nexport type CellType =\n | 'text' // default — renders item[col.key] as string\n | 'badge' // renders a colored badge pill\n | 'date' // formats a date value\n | 'phone' // formats a phone number\n | 'number' // right-aligns header + cell; renders via render() or item[col.key]\n | 'avatar-name' // avatar circle + full name\n | 'days-ago' // \"Xd ago\" / \"Never\" with overdue styling\n | 'progress' // progress bar + label, driven by progressFn\n | 'tags' // first tag badge + \"+N more\"\n | 'image' // thumbnail driven by imageFn (placeholder icon when there is no URL / it fails to load)\n | 'link' // real <a> driven by linkFn (mailto:, tel:, http(s):, or an in-app route); plain text when linkFn gives no target\n | 'actions'; // more-menu dropdown\n\n// ── Link cells ────────────────────────────────────────────────\n/**\n * Where a `cellType: 'link'` cell points. Return a plain string from `linkFn` as shorthand for `{ href }`.\n *\n * - `routerLink` (+ `queryParams`) is an in-app route: the anchor gets the real URL as its `href` (so right-click,\n * middle-click, ctrl/cmd-click, \"open in new tab\" and \"copy link address\" all work) and a plain left click\n * navigates through the Angular `Router` without a page reload. `routerLink` wins when `href` is also set.\n * - `href` accepts ONLY `mailto:`, `tel:`, `http:`, `https:` and root-relative paths (`/cases/12`). Anything else\n * (`javascript:`, `data:`, `//host`, empty, control characters) is never rendered as an href: the cell shows plain\n * text. A root-relative `href` is a normal link (full page load); use `routerLink` for in-app navigation.\n * - `target: '_blank'` (default `'_self'`) adds `rel=\"noopener noreferrer\"` and a \"(opens in a new tab)\" screen-reader\n * hint. `http(s):` hrefs always get the same `rel`.\n * - `label` is the link text when the cell has no text of its own (`render` and `item[key]` are empty).\n * - `ariaLabel` replaces the link's accessible name (default: its text).\n * - `download` adds the `download` attribute.\n */\nexport interface LinkTarget {\n href?: string;\n routerLink?: string | readonly any[];\n queryParams?: Record<string, any>;\n target?: '_self' | '_blank';\n label?: string;\n ariaLabel?: string;\n download?: boolean;\n}\n\n/** Payload of `(linkClick)`: a link cell's anchor was activated by a click (the row click is NOT also emitted). */\nexport interface LinkClickEvent<T = any> {\n item: T;\n column: ColumnDef;\n /** The anchor's href (null only for a routerLink that could not be resolved, which renders no anchor anyway). */\n href: string | null;\n}\n\n// ── Column definition ─────────────────────────────────────────\nexport interface ColumnDef {\n key: string;\n label: string;\n sortable?: boolean;\n defaultVisible?: boolean;\n /**\n * Wire name of this column's FILTER, when it must differ from `key`. Defaults to `key` (unset = unchanged behaviour).\n * Replaces `key` only for: the column-filter query param on rows and export requests, the key read from the\n * `/filter-counts` response for this column's options/counts (also the bulk \"Change <column>\" options), and the key\n * stored in saved views (a view saved under the plain `key` still restores). Everything else stays on `key`:\n * sort (`sort=<key>`), cell values, visibility, `lockedColumn`, `searchFields`, `bulkUpdateOptions` and the\n * `/bulk/<field>` request body. It also names the header filter and the phone-card filter chips' request param. It must not equal a reserved table param (`page`, `size`, `search`, `searchFields`, `sort`, `direction`, `filter`) nor an `Object.prototype` member name such as `constructor` — there is no runtime guard. Example: `{ key: 'direction', filterParam: 'messageDirection' }` keeps the filter\n * from colliding with the table's own `direction=asc|desc` sort param.\n */\n filterParam?: string;\n /** If true, this column's label appears in the search input placeholder when the column is visible. */\n searchable?: boolean;\n /** Values a bulk \"Change <label>\" may set. When omitted the options come from /filter-counts.\n * Use it when only some values are user-settable or when a valid value may currently have no rows. */\n bulkOptions?: string[];\n /** Fixed column width (any CSS length, e.g. '140px'). Applied as width, min-width and max-width; cell text longer than\n * it is cut with an ellipsis. Omit for an automatic width. Not applied to the Actions column's cell clipping. */\n width?: string;\n align?: 'left' | 'right' | 'center';\n headerAlign?: 'left' | 'right' | 'center';\n\n /** How to render cell content. Defaults to 'text'. */\n cellType?: CellType;\n\n // ── badge ──\n /**\n * Maps a cell value (or full item) to a { label, variant } config.\n * When omitted, auto-color is applied using the value string.\n * Return null to render a plain '—' instead of a badge (e.g. for an empty value).\n */\n badgeFn?: (value: any, item?: any) => BadgeConfig | null;\n\n // ── star (text cells, e.g. the name column) ──\n /**\n * Puts a gold `<ui-star>` to the LEFT of the cell's text when it returns a non-empty string; that string is the star's tooltip\n * (hover / keyboard focus) and accessible name. Return null / undefined / '' for no star. The star is always gold.\n * Applies to plain text cells (and the title of the phone card); the row's accessible name is unchanged (`nameFn` / `render`).\n * Example: `{ key: 'name', label: 'Name', starFn: (doc) => doc.isAuthForm ? 'Authorization Form' : null }`\n */\n starFn?: (item: any) => string | null | undefined;\n\n // ── leading icon (text-like cells) ──\n /**\n * Library source 2026-11-05, not yet published. Draws a small decorative icon (16px, `aria-hidden`, currentColor, on the first text line, never shrinks)\n * to the LEFT of the cell text, in desktop cells and in the phone card (title, badge pills, detail rows). Returns a `<ui-icon>` key (see `iconPath()`) or a\n * raw 24x24 stroke SVG path (drawing commands and numbers only, same rule as ui-radio's `icon`); null / undefined / '' / anything else draws nothing.\n * Applies to text, badge, date, phone and number cells; never to avatar-name, link, tags, progress, image, days-ago or actions. The cell's text and the row's\n * accessible name are unchanged (see `iconLabelFn` for meaningful icons). Placed before a `starFn` star.\n * Example: `{ key: 'name', label: 'Name', iconFn: (r) => r.kind === 'rental' ? 'wrench' : 'cup' }`\n */\n iconFn?: (item: any) => string | null | undefined;\n /**\n * Library source 2026-11-05, not yet published. Accessible text for a MEANINGFUL `iconFn` icon: rendered as visually hidden text right after the icon\n * (the icon stays `aria-hidden`). Default (absent / null / '') = the icon is decorative. Ignored when no icon is drawn for the row.\n */\n iconLabelFn?: (item: any) => string | null | undefined;\n\n // ── footer totals ──\n /**\n * Footer text for this column, from the table's `totalsEndpoint` response (shown only while the table has rows and the totals loaded).\n * Return null / undefined / '' for an empty footer cell. `cellType: 'number'` columns are right-aligned like their body cells.\n * The table's `totalsLabel` goes in the footer cell of the first visible column; when that column has a `footerFn` too, the label is\n * kept as visually hidden text before the value (\"Total: $1,200\") so it is still announced once.\n * Example: `{ key: 'amount', label: 'Amount', cellType: 'number', footerFn: t => t['amount'] == null ? null : '$' + t['amount'] }`\n */\n footerFn?: (totals: Record<string, string | number | null>) => string | null | undefined;\n\n // ── date ──\n /** Date format string. Default: 'MMM d, y' */\n dateFormat?: string;\n\n // ── avatar-name ──\n /** Returns the display name for the row. Default: item[col.key] */\n nameFn?: (item: any) => string;\n /** Returns initials for the avatar. Default: first char of nameFn result */\n initialsFn?: (item: any) => string;\n\n // ── days-ago ──\n /** Key in item holding the days-since count. Defaults to col.key. */\n daysKey?: string;\n /** Days after which the cell is styled as overdue. Default: 30 */\n overdueThreshold?: number;\n\n // ── progress ──\n /**\n * Maps a row to a progress bar. Return null to render a plain '—' (e.g. nothing to track).\n * `label` is the text beside the bar (e.g. \"3/5\"); `tooltip` is the hover text. `ariaLabel` is the bar's accessible name (e.g. the row's name + \" cap progress\"); leave it out and the bar is named by its `label` text — which, with only \"80%\" to go on, tells a screen-reader user nothing about WHICH row it belongs to, so set it whenever several rows show a bar. Leave `variant` out and the bar colors itself by completion (red / amber / blue / green).\n */\n progressFn?: (item: any) => { value: number; max: number; label?: string; variant?: 'blue' | 'green' | 'amber' | 'red' | 'slate'; tooltip?: string; ariaLabel?: string } | null;\n\n // ── tags ──\n /** Key in item holding the tags array. Defaults to col.key.\n * Expected shape: { name: string; variant?: BadgeVariant; color?: string; colorName?: string }[]. `colorName` is the colour (or state) in words, e.g. 'red' or 'error': it is read by screen readers after the tag name (hidden visually) so the colour is never the only signal; omit it and nothing changes. `color` is a custom hex colour (`#rgb` / `#rrggbb`,\n * e.g. the colour a user picked for the tag): it becomes the chip background with dark or white text for contrast and wins over `variant`;\n * an invalid value is ignored. */\n tagsKey?: string;\n\n // ── link ──\n /**\n * `cellType: 'link'` — returns where the cell points for a row (`value` is `item[key]`), or null / undefined /\n * '' for no link (the cell then shows plain text). A string is shorthand for `{ href }`. See {@link LinkTarget}\n * for the contract and the allowed schemes. Text shown: `render(item)` if set, else `item[key]`, else the\n * target's `label`, else '—'. The text is always escaped. A throwing `linkFn` renders plain text.\n * Sorting, search, filters and export are independent of the link (export uses the host's `exportRow`).\n * Clicking or keying the anchor never emits `rowClick`; it emits `(linkClick)`.\n */\n linkFn?: (item: any, value: any) => LinkTarget | string | null | undefined;\n\n // ── image ──\n /** Returns the image URL for the row. A falsy value (null / undefined / '') shows the placeholder icon. */\n imageFn?: (item: any) => string | null | undefined;\n /** Focal point (percent, 50/50 = centered) of the cropped image, applied as CSS object-position. */\n imagePositionFn?: (item: any) => { x: number | null | undefined; y: number | null | undefined } | null | undefined;\n /** Alt text for the row's image. When omitted the image is decorative (`alt=\"\"`). */\n imageAlt?: (item: any) => string;\n /** 'circle' (default) or 'rounded' (3:2 rounded rectangle). */\n imageShape?: 'circle' | 'rounded';\n /** 'md' (default) or 'sm'. circle: 40px / 28px; rounded: 48x32 / 36x24. */\n imageSize?: 'sm' | 'md';\n /** Neutral icon shown when there is no URL or the image fails to load. Default: 'image'. */\n imagePlaceholder?: 'person' | 'image';\n\n // ── actions ──\n /** Returns the list of actions for a given row item. */\n actionsFn?: (item: any) => RowAction[];\n /** Called when the user clicks an action. */\n onAction?: (type: string, item: any) => void;\n\n // ── fallback ──\n /** Custom plain-text render function. Only used for 'text' type. */\n render?: (item: any) => string;\n\n // ── mobile ──\n /** Hide this column in the card-view detail rows on mobile (≤640px).\n * The title (avatar-name) and badge columns are always shown. */\n mobileHidden?: boolean;\n}\n\n// ── Quick filter tab ──────────────────────────────────────────\nexport interface QuickFilterTab {\n value: string;\n label: string;\n /** When true, the tab is shown as informational only and cannot be clicked. */\n disabled?: boolean;\n}\n\n// ── Column filter ─────────────────────────────────────────────\nexport interface FilterOption {\n value: string;\n label: string;\n color?: string;\n count?: number;\n}\n\n// ── Saved view ────────────────────────────────────────────────\nexport interface SavedView {\n id: string;\n name: string;\n isSystem?: boolean;\n /** Active quick-filter tab value at time of save */\n quickFilter?: string | null;\n /** Active sort column key at time of save */\n sortField?: string | null;\n /** Sort direction at time of save */\n sortDir?: string | null;\n /** Visible column keys at time of save (empty = use defaultVisible) */\n visibleColumns?: string[];\n /**\n * Active column filters at time of save: column key → comma-joined selected values (the same wire format the\n * table sends as query params). `undefined`/`null` (views saved before this existed, or a backend that doesn't\n * store it) leaves the current column filters untouched on load; `{}` clears them.\n */\n columnFilters?: Record<string, string> | null;\n /**\n * Active numeric range filters at save time (only tables with `rangeFilters`): column key -> `{ min, max }` (a bound is a number or\n * absent). Written only when a range is set. `undefined` / `null` (views saved before ranges existed, or a backend that doesn't store\n * it) leaves the current ranges untouched on load; `{}` clears them.\n */\n rangeFilters?: Record<string, { min?: number | null; max?: number | null }> | null;\n}\n\n// ── Numeric range column filter ───────────────────────────────\n\n/**\n * One `<ui-data-table [rangeFilters]>` entry: gives the visible column `key` a numeric Min / Max filter (same funnel icon and popover as\n * the value-list filter). Opt-in at the TABLE: a column that is not listed (or is hidden) has no range filter, and an empty list changes\n * nothing. When applied, the table sends `<minParam>=<n>` and `<maxParam>=<n>` (a bound that is empty is omitted) on the rows, export and\n * totals requests (not on /counts or /filter-counts, like every column filter); the BACKEND does the filtering.\n *\n * readonly rangeFilters: RangeFilterConfig[] = [{ key: 'rentableSf', minParam: 'rentableSfMin', maxParam: 'rentableSfMax', min: 0, step: 100, format: 'number' }];\n */\nexport interface RangeFilterConfig {\n /** Key of a column of the table. */\n key: string;\n /** Query param for the lower bound. Default `<key>Min`. */\n minParam?: string;\n /** Query param for the upper bound. Default `<key>Max`. */\n maxParam?: string;\n /** Lowest value the user may enter (default 0, so negatives are refused; pass a negative number to allow them). */\n min?: number;\n /** Highest value the user may enter (default: no limit). */\n max?: number;\n /** Step of the number fields; also sets the decimals allowed (step 0.01 = 2 decimals, whole-number steps = whole numbers). Default 1. */\n step?: number;\n /** How bounds are written in the chip / active label: plain number (default), US dollars or a percent. Values sent are always plain numbers. */\n format?: 'number' | 'currency' | 'percent';\n /** Text appended to a bound in the label when `format` is 'number' (e.g. 'SF'). */\n unit?: string;\n}\n\n// ── Bulk actions ──────────────────────────────────────────────\n\n/**\n * Declares a bulk action available in the table's selection bar.\n * Options for select-based actions are derived automatically from the table's\n * column configuration (columnFilters → quickFilterTabs → filterCounts → distinct values).\n */\n/**\n * One `bulkUpdateOptions` entry:\n * - `'delete'` — the built-in bulk delete;\n * - a column key (e.g. `'status'`) — \"Change <column label>\" with options from /filter-counts;\n * - `{ field, exclude }` — the same, minus values users can't set by hand (e.g. a status only the\n * system sets). Excluded values are left out of the bulk select only — the column filter, quick-filter\n * tabs and counts still show them. Matching ignores case, spaces, dashes and underscores.\n *\n * readonly bulkUpdateOptions: BulkUpdateOption[] = [{ field: 'status', exclude: ['EXPIRED'] }, 'delete'];\n * - `{ field, allowedFrom }` — the status workflow: a map of TARGET value -> the values a row may currently\n * have to move to it, e.g. `{ SENT: ['DRAFT'], VOIDED: ['DRAFT', 'SENT'] }`. The bulk select then offers only\n * targets that at least one selected row can legally move to (a target with no entry is not selectable), and rows\n * whose current value is not in the target's list are skipped (counted, never sent). Without `allowedFrom` every\n * row can move to any value it does not already have. Combine with `exclude` freely (exact, case-sensitive values).\n *\n * { field: 'status', allowedFrom: { SENT: ['DRAFT'], VOIDED: ['DRAFT', 'SENT'] } }\n */\nexport type BulkUpdateOption<T = any> = string | {\n field: string;\n /**\n * Field changes (`{ field, label }`): the bulk bar button text instead of \"Change <column label>\", e.g. `{ field: 'state', label: 'Archive / Restore' }`.\n * It is also the inline select's accessible name, the default confirm's title and confirm button, and the default confirm message reads\n * \"<label>: <option> for N items?\" (instead of \"Change <column> to <option> for N items?\"). Host `confirm` copy still wins; its\n * `ctx.columnLabel` stays the column's label. Trimmed; blank = ignored. Ignored for the reserved `delete` key. Omit it and nothing changes.\n * Direct actions (`action: true`): the bar button text, default confirm title and confirm button (required in practice; trimmed,\n * blank = the key split on `_`, `-` and camelCase with only the first word capitalised: 'resend' -> 'Resend', 'send_reminder' / 'sendReminder' -> 'Send reminder'); `ctx.columnLabel` is this label.\n *\n * { field: 'state', label: 'Archive / Restore' }\n */\n label?: string;\n exclude?: string[];\n allowedFrom?: Record<string, string[]>;\n /**\n * Host-written confirm copy (see `BulkConfirmFn`): one function for every target value, or a map target value -> function\n * (a target without an entry keeps the library's default wording). For the reserved delete key use\n * `{ field: 'delete', confirm }`. Omit it and the confirm keeps today's default wording.\n */\n confirm?: BulkConfirmFn<T> | Record<string, BulkConfirmFn<T>>;\n /**\n * Bulk Delete only (`{ field: 'delete', deletable }`): true when the server will accept deleting this row. Keep it identical\n * to the backend rule. Only deletable rows are counted in the confirm, sent to `/bulk/delete` and shown as deleted; the others\n * are skipped (\"N selected rows can't be deleted and will be skipped.\"). The Delete button is disabled (with a reason) when\n * no selected row is deletable. Omit it and every selected row is sent, as before.\n *\n * { field: 'delete', deletable: (row: Invoice) => row.status === 'DRAFT' }\n */\n deletable?: (row: T) => boolean;\n /**\n * Field changes (`{ field, canChange }`): true when the server will accept moving THIS row to `target` (a value the select offers).\n * For rules the field values alone can't express, e.g. a draft can only be sent when it has a document and a recipient. Keep it\n * identical to the backend rule. Rows it refuses are skipped like rows `allowedFrom` refuses (\"N selected rows can't be changed to X\n * and will be skipped.\" / `ctx.skippedBlocked` + `ctx.skippedRows` for host `confirm` copy), are never sent, and a target is offered\n * only while some selected row can move to it. It runs after `allowedFrom` and only sees rows on the loaded page. Omit it and\n * nothing changes.\n *\n * { field: 'status', allowedFrom: { SENT: ['DRAFT'] }, canChange: (row, target) => target !== 'SENT' || canSend(row) }\n */\n canChange?: (row: T, target: string) => boolean;\n /**\n * Field changes (`{ field, skipReason }`): WHY a row is skipped, in the host's words. Called for every selected row that will be skipped because it cannot move to `target`\n * (`allowedFrom` / `canChange` refused it; a row that already holds the target is NOT asked: the standard \"already has this value\" wording covers it) with the row and the\n * target value. Return a short plain sentence (\"Needs a document and a recipient first.\") or `null` / `''` for no reason. A function that throws counts as no reason.\n * The reasons are grouped (the same text is one line with the number of rows: \"Needs a document and a recipient first. (3)\"), listed as bullets in the confirm (`confirm-details`,\n * after the host's own `details`), and passed to a host `confirm` function as `ctx.skippedReasons` (one entry per row, so the copy can name them). It only sees rows on the loaded\n * page. It changes no rule: it never makes a row skipped or eligible. Omit it and nothing changes.\n *\n * { field: 'status', allowedFrom: { SENT: ['DRAFT'] }, canChange: (row, target) => target !== 'SENT' || canSend(row),\n * skipReason: (row, target) => (target === 'SENT' && row.status === 'DRAFT' && !canSend(row)) ? 'Needs a document and a recipient first.' : null }\n */\n skipReason?: (row: T, target: string) => string | null | undefined;\n /**\n * Field changes (`{ field, canApply }`): a rule on the WHOLE selection, in addition to the per-row `allowedFrom` / `canChange`. Called with every\n * selected row of the loaded page and the target value; return `true` to allow, `false` (generic reason) or a string (the reason shown to the\n * user) to refuse. Use it for a rule no single row can express (\"an Archived invoice batch must all belong to one customer\", \"all rows must\n * share the same status\"). Keep it identical to the backend rule. A target it refuses is listed in the select but disabled, with a visible\n * \"<option>: <reason>\" hint, and Apply re-checks it (a refused target is never confirmed or sent; the reason is shown as an error toast). A function that throws counts as\n * refused. It only sees rows on the loaded page. Ignored for Delete and direct actions. Omit it and nothing changes.\n *\n * { field: 'status', canApply: (rows, target) => target !== 'MERGED' || new Set(rows.map(r => r.customerId)).size === 1 || 'Rows must belong to one customer.' }\n */\n canApply?: (rows: T[], target: string) => boolean | string;\n /**\n * Field changes (`{ field, listAll }`): list the FULL set of values in the \"Change <column>\" select instead of only the values the\n * /filter-counts response currently carries (which omits values no row has yet). `true` = the filter-count values plus every target of\n * `allowedFrom` that is not already listed; a list of values = exactly that set, in that order (labelled through the column's `badgeFn`). The\n * `exclude`, `allowedFrom`, `canChange` and `canApply` rules and the \"not already held by every selected row\" rule still apply, so listing a\n * value never offers a change the table knows the server refuses. An empty list is ignored. Omit it and nothing changes.\n *\n * { field: 'status', listAll: ['DRAFT', 'SENT', 'SIGNED', 'VOIDED'], allowedFrom: { SENT: ['DRAFT'], SIGNED: ['SENT'], VOIDED: ['DRAFT', 'SENT'] } }\n */\n listAll?: true | readonly string[];\n /**\n * Field changes (`{ field, order }`): the order of the \"Change <column>\" select. Values listed in `order` come first, in that order (matched\n * exactly to the option values, case-sensitive); the remaining options follow in their existing order. Values in `order` that are not among\n * the options are ignored (nothing is added). It only sorts: `exclude`, `allowedFrom`, `canChange`, `canApply`, `listAll` and the \"not already\n * held by every selected row\" rule decide WHICH options appear. Ignored for Delete and direct actions. Omit it and nothing changes.\n *\n * { field: 'type', order: ['office', 'retail', 'industrial', 'multifamily'] }\n */\n order?: readonly string[];\n /**\n * Direct bulk action (`{ field: 'resend', action: true, label: 'Resend' }`): a bulk-bar button that is neither a field change nor\n * Delete. `field` is the action key (no column needed), the button type is `action-<field>` and there is no inline select.\n * Clicking it opens the library confirm, then POSTs `<endpoint>/bulk/<field>` with exactly `{ ids }` (the eligible rows). The response is\n * handled like a field change (`updated`, `skipped`, `notAllowed`, readable `message`). Ignored for the reserved `delete` key.\n * Read-only users get no bulk bar, so nothing changes for them. Omit it and nothing changes.\n * `confirm` on an action takes only the function form; a map (target value -> function) is ignored and the default copy is used.\n *\n * { field: 'resend', action: true, label: 'Resend', eligible: (row: Request) => row.status === 'PENDING' }\n */\n action?: boolean;\n /** Direct action only: button style, default 'secondary'. 'danger' also makes the default confirm button red. */\n variant?: 'secondary' | 'danger';\n /**\n * Direct action only: true when the server will accept the action for this row (keep it identical to the backend rule). Rows it\n * refuses are skipped (counted, NEVER sent; \"N selected rows don't qualify for <label lower-cased> and will be skipped.\"). When no selected loaded row passes,\n * the button is disabled with a visible reason (\"None of the selected rows qualify for <label lower-cased>.\"). Omit it and every selected row is sent. A predicate that throws counts as \"row not eligible\" (never breaks rendering).\n */\n eligible?: (row: T) => boolean;\n /**\n * Direct action only: the past-tense word in the result toast. \"N <doneLabel>, M skipped.\" when anything was skipped / not allowed,\n * else \"N <itemLabel>(s) <doneLabel>.\". Default 'updated'.\n * English keeps the past-tense word ('resent' -> \"N contacts resent.\"). In Spanish the summary reads \"<doneLabel>: N <items>.\" and the word is\n * a capitalised NOUN, not a participle: pass 'Reenvío' (\"Reenvío: 3 contactos.\"), not 'enviados' (\"enviados: 3 contactos.\"). The built-in\n * default ('updated') is translated by the dictionary and needs nothing.\n */\n doneLabel?: string;\n /**\n * Direct action only: the request returns a FILE instead of JSON (a ZIP of PDFs, a CSV...). The table still confirms first and POSTs\n * `<endpoint>/bulk/<field>` with exactly `{ ids }`, but asks for a blob response and saves it as one download (one file, so browsers do not\n * block it the way several automatic downloads are blocked). The file name is the response's `Content-Disposition` filename, else\n * `fileName`, else the action key. The toast reads \"N <itemLabel>(s) <doneLabel>.\" (`doneLabel` defaults to 'downloaded' here); the server may\n * send an `X-Skipped-Count` header with the number of selected rows it left out of the file (\"N downloaded, M skipped.\"). The rows do not change,\n * so the table is not refreshed; the selection is cleared and `(bulkAction)` is emitted. An error response is read as `{ message }` JSON and shown\n * in an error toast. Omit it and the action expects JSON as before.\n *\n * { field: 'download-pdfs', action: true, label: 'Download PDFs', download: { fileName: 'inspections.zip' } }\n */\n download?: { fileName?: string };\n /**\n * Direct action only (`opens: 'panel'`): the button does not confirm and does not POST. It emits `(bulkPanelClick)` with the\n * eligible rows and the host opens its own panel or form (compose an e-mail, add a charge...) and does the work itself.\n * The host calls `clearSelection()` and `refresh()` on the table when it is done. `confirm` and `doneLabel` are ignored for a panel action (no confirm is shown; `variant: 'danger'` still colours the button); `eligible` still applies (refused rows are never passed on). Omit it and nothing changes.\n *\n * { field: 'email', action: true, opens: 'panel', label: 'Email', eligible: (r: Resident) => !!r.email }\n */\n opens?: 'panel';\n /**\n * Panel action only (`opens: 'panel'`): true while the action is not available right now (e.g. text messaging is switched off). The button is\n * then not shown at all. Read every time the bar renders, so it can read signals; a function that throws counts as \"not hidden\". A panel\n * action is also not shown while none of the selected rows is `eligible`. Omit it and the button shows whenever a selected row is eligible.\n */\n hidden?: () => boolean;\n};\n\n/** What a bulk confirm function receives. For a direct bulk action: `columnLabel` is the action label, `targetValue`/`targetLabel` are '', `rows`/`skippedRows` the eligible / refused selected rows. For bulk Delete: `targetValue`/`targetLabel` are '', `columnLabel` is 'Delete', skipped counts are 0. */\nexport interface BulkConfirmContext<T = any> {\n /** Rows that WILL be sent (eligible). For Delete: the selected count. */\n count: number;\n /** Selected rows skipped because they already hold the target value. */\n skippedAlready: number;\n /** Selected rows skipped because `allowedFrom` does not allow the move. */\n skippedBlocked: number;\n /** Everything the user selected (`count + skippedAlready + skippedBlocked`). */\n selectedCount: number;\n /** Singular / plural item label (the table's `itemLabel` / `itemLabelPlural`). */\n itemLabel: string;\n itemLabelPlural: string;\n /** Label of the column being changed (\"Status\"). */\n columnLabel: string;\n /** Raw target value (\"APPROVED\") and its display label (\"Approved\"). */\n targetValue: string;\n targetLabel: string;\n /**\n * The eligible row objects (name records, show before -> after). A selection never spans pages (any reload clears it and\n * select-all takes the loaded page), so these are every row that will be sent.\n */\n rows: T[];\n /** The selected rows that will be skipped. */\n skippedRows: T[];\n /**\n * Field changes with a `skipReason` callback: one `{ row, reason }` per skipped row the callback gave a reason for (trimmed, single line, at most 300 characters; rows that already hold the\n * target value are not asked). Empty when the entry has no `skipReason`; always `[]` for Delete and direct actions. The library already lists the grouped reasons in the confirm; use this to\n * word the message yourself (`omitSkippedNote`).\n */\n skippedReasons?: { row: T; reason: string }[];\n}\n\n/** Host copy for one bulk confirm. Plain text only (never HTML); `\\n` in `message` shows as a line break. */\nexport interface BulkConfirmCopy {\n /** Default: the action label (\"Change Status\") / \"Delete <Items>\" built from the table's item label (\"template\" → \"Delete Templates\"). */\n title?: string;\n message: string;\n /** Rendered as a bullet list under the message (consequences, what is NOT affected, undoable or not). */\n details?: string[];\n /** Default: the action label / \"Delete\". */\n confirmLabel?: string;\n /** Default: 'primary' for a field change, 'danger' for Delete. 'danger' makes the confirm button red. */\n variant?: 'primary' | 'danger' | 'warning';\n /** By default the library appends its standard \"N selected rows ... will be skipped.\" sentence (change actions); set true to write it yourself. */\n omitSkippedNote?: boolean;\n}\n\nexport type BulkConfirmFn<T = any> = (ctx: BulkConfirmContext<T>) => BulkConfirmCopy | string;\n\nexport interface BulkActionDef {\n /** Action key — passed through to the (bulkAction) event. */\n type: string;\n /** Button label shown in the bulk bar. */\n label: string;\n /** True when `label` came from the entry's custom `label` (the default confirm message then reads \"<label>: <option> for N items?\"). Only set then. */\n customLabel?: boolean;\n /** Button style. Default: 'secondary'. Use 'danger' for destructive actions. */\n variant?: 'secondary' | 'danger';\n /** Values left out of this field's bulk select (from a `{ field, exclude }` bulkUpdateOptions entry). */\n exclude?: string[];\n /** Workflow rules (from `{ field, allowedFrom }`): target value -> source values a row may move from. */\n allowedFrom?: Record<string, string[]>;\n /** Host confirm copy (from `{ field, confirm }`). */\n confirm?: BulkConfirmFn | Record<string, BulkConfirmFn>;\n /** Bulk Delete only: which rows the server will delete (from `{ field: 'delete', deletable }`). */\n deletable?: (row: any) => boolean;\n /** Field changes: per-row check that the server will accept the move to a target (from `{ field, canChange }`). */\n canChange?: (row: any, target: string) => boolean;\n /** Field changes: why a skipped row is skipped (from `{ field, skipReason }`). */\n skipReason?: (row: any, target: string) => string | null | undefined;\n /** Field changes: rule on the whole selection (from `{ field, canApply }`): true = allowed, false / a string = refused (the string is the reason). */\n canApply?: (rows: any[], target: string) => boolean | string;\n /** Field changes: list the full value set (from `{ field, listAll }`): `true` or the exact list of values. */\n listAll?: true | readonly string[];\n /** Field changes: option order (from `{ field, order }`): these values first, in this order. */\n order?: readonly string[];\n /** True for a direct bulk action (from `{ field, action: true, label }`); `type` is `action-<key>` and `field` is not set (no inline select). */\n action?: boolean;\n /** Direct action: which rows the server will accept (from `{ field, action: true, eligible }`). */\n eligible?: (row: any) => boolean;\n /** Direct action: past-tense word in the result toast (from `{ doneLabel }`), default 'updated'. */\n doneLabel?: string;\n /** Direct action that returns a file (from `{ download }`): the response is saved as a download instead of read as JSON. */\n download?: { fileName?: string };\n /** True for a direct action that opens a host panel instead of confirming and POSTing (from `{ opens: 'panel' }`). */\n opensPanel?: boolean;\n /** Panel action: true while it is not available (from `{ hidden }`); the button is not shown. */\n hidden?: () => boolean;\n /**\n * The item field this action targets (e.g. 'status', 'type').\n * When set the table shows an inline select populated from the column's option sources.\n * Omit for direct actions like delete that need no value selection.\n */\n field?: string;\n}\n\n/** Emitted by (bulkAction) after the user selects a value and clicks Apply. */\nexport interface BulkActionEvent {\n type: string;\n ids: string[];\n value?: string;\n skippedCount: number;\n}\n\n/** Emitted by (bulkPanelClick) when the user clicks a bulk action declared with `opens: 'panel'`. */\nexport interface BulkPanelEvent<T = any> {\n /** `action-<key>` of the clicked bulk option. */\n type: string;\n /** The option's `field` (its key), e.g. 'email'. */\n key: string;\n /** Ids of the eligible selected rows. */\n ids: string[];\n /** The eligible selected rows (loaded page). */\n rows: T[];\n /** Selected rows the option's `eligible` refused. */\n skippedCount: number;\n}\n\n/** Emitted by (rowReorder) after the user moves a row (`reorderable`). */\nexport interface TableRowReorderEvent<T = any> {\n /** The row that was moved. */\n item: T;\n /** Its index on the page before and after the move (0-based). */\n from: number;\n to: number;\n /** The rows on the page in their new order. */\n items: T[];\n /** How many rows come before this page (0 on the first page), so `offset + to` is the row's position in the whole list. */\n offset: number;\n}\n\n// ── Page response from backend ────────────────────────────────\nexport interface PageResponse<T> {\n content: T[];\n totalElements: number;\n totalPages: number;\n number: number;\n size: number;\n}\n"],"mappings":"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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forgeroute/ui",
3
- "version": "0.5.18",
3
+ "version": "0.5.20",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=22.0.0",
6
6
  "@angular/core": ">=22.0.0",
@@ -10,8 +10,7 @@
10
10
  "chart.js": ">=4.0.0",
11
11
  "leaflet": ">=1.9.0 <2",
12
12
  "pdfjs-dist": ">=5.0.0",
13
- "@stripe/stripe-js": ">=5.0.0",
14
- "@stripe/connect-js": ">=3.3.0"
13
+ "@stripe/stripe-js": ">=5.0.0"
15
14
  },
16
15
  "peerDependenciesMeta": {
17
16
  "@angular/forms": {
@@ -28,9 +27,6 @@
28
27
  },
29
28
  "@stripe/stripe-js": {
30
29
  "optional": true
31
- },
32
- "@stripe/connect-js": {
33
- "optional": true
34
30
  }
35
31
  },
36
32
  "publishConfig": {
@@ -42,7 +42,12 @@ export declare class ChipComponent implements ControlValueAccessor {
42
42
  /** Emitted when the ✕ dismiss button is clicked. */
43
43
  readonly dismiss: import("@angular/core").OutputEmitterRef<void>;
44
44
  private readonly _cvActive;
45
- protected readonly _disabled: import("@angular/core").WritableSignal<boolean>;
45
+ private readonly _cvDisabled;
46
+ /**
47
+ * Library source 2026-11-21 (additive): `true` disables the chip like a form-disabled one (native `disabled` + `aria-disabled` on the button(s), no `select` / `dismiss`). Also disabled when the form control is.
48
+ */
49
+ readonly disabled: import("@angular/core").InputSignal<boolean>;
50
+ protected readonly _disabled: import("@angular/core").Signal<boolean>;
46
51
  /**
47
52
  * Single source of truth for the active visual state:
48
53
  * - CVA value wins when the chip is form-bound (writeValue has been called)
@@ -81,6 +86,11 @@ export declare class ChipComponent implements ControlValueAccessor {
81
86
  "required": false;
82
87
  "isSignal": true;
83
88
  };
89
+ "disabled": {
90
+ "alias": "disabled";
91
+ "required": false;
92
+ "isSignal": true;
93
+ };
84
94
  }, {
85
95
  "select": "select";
86
96
  "dismiss": "dismiss";
@@ -961,6 +961,19 @@ export declare const UI_DEFAULT_LABELS: {
961
961
  readonly 'paymentSidePanel.readerTimeout': "The reader did not respond within {{ span }}. Check that the reader is powered on and connected to WiFi.";
962
962
  readonly 'paymentSidePanel.recordFailed': "Failed to record payment";
963
963
  readonly 'paymentSidePanel.removeEntry': "Remove {{ method }} {{ amount }}";
964
+ readonly 'paymentBlocked.default': "Payments are not available right now.";
965
+ readonly 'paymentHeld.default': "A payment started from this panel may still be open. Wait for it to finish, or check it, before starting another.";
966
+ readonly 'paymentHeld.check': "Check again";
967
+ readonly 'paymentHeld.retryCancel': "Try canceling again";
968
+ readonly 'paymentHeld.stillOpen': "The payment is still open. Wait for it to finish or cancel it, then check again.";
969
+ readonly 'paymentHeld.inconclusive': "The payment could not be confirmed either way. Check it in your payment processor, then confirm below.";
970
+ readonly 'paymentHeld.checkFailed': "The check could not be completed. Try again.";
971
+ readonly 'paymentHeld.release': "I checked: nothing is open. Continue";
972
+ readonly 'paymentHeld.released': "Checked: no payment is open any more.";
973
+ readonly 'paymentHeld.succeeded': "The payment went through.";
974
+ readonly 'paymentHeld.closedBeforeDone': "The payment was taken but the panel was closed before it was finished. Check the payment before starting another.";
975
+ readonly 'paymentHeld.releasedByUser': "The payment could not be confirmed; the user confirmed that nothing is open.";
976
+ readonly 'paymentSidePanel.cancelUnconfirmed': "The reader payment could not be confirmed as canceled. It may still be open. Check the reader before starting another payment.";
964
977
  readonly 'paymentSidePanel.removedFromSplit': "Removed {{ method }} {{ amount }} from the split.";
965
978
  readonly 'paymentSidePanel.selectAtLeastOneCharge': "Select at least one charge to apply this payment to.";
966
979
  readonly 'paymentSidePanel.span.minute_one': "{{ count }} minute";
@@ -2336,7 +2349,7 @@ export declare const UI_DEFAULT_LABELS: {
2336
2349
  readonly 'qboErrors.status.unavailable': "The payment service is unavailable right now. Please try again in a few minutes.";
2337
2350
  readonly 'paymentAttempt.checking': "Checking your payment...";
2338
2351
  readonly 'paymentAttempt.checkingHelp': "Please wait and do not pay again. We are making sure your payment went through.";
2339
- readonly 'paymentAttempt.stillUnknown': "We could not confirm your payment yet. Please check again in a moment and do not pay again.";
2352
+ readonly 'paymentAttempt.stillChecking': "We could not confirm your payment yet. Please check again in a moment and do not pay again.";
2340
2353
  readonly 'paymentAttempt.checkAgain': "Check again";
2341
2354
  readonly 'paymentAttempt.waiting': "Waiting for your payment to be confirmed...";
2342
2355
  readonly 'paymentAttempt.startOver': "Start over";
@@ -2376,7 +2389,7 @@ export declare const UI_DEFAULT_LABELS: {
2376
2389
  readonly 'paymentReadiness.storageWarning': "Your browser limits storage, so a page reload or a second tab during a payment cannot be recovered automatically. Please do not reload or open this page twice while paying.";
2377
2390
  readonly 'paymentSetup.checking': "Checking that your payment method was saved...";
2378
2391
  readonly 'paymentSetup.checkingHelp': "Please wait and do not save it again. We are making sure your payment method was saved.";
2379
- readonly 'paymentSetup.stillUnknown': "We could not confirm yet that your payment method was saved. Please check again in a moment and do not save it again.";
2392
+ readonly 'paymentSetup.stillChecking': "We could not confirm yet that your payment method was saved. Please check again in a moment and do not save it again.";
2380
2393
  readonly 'paymentSetup.waiting': "Waiting for your payment method to be confirmed...";
2381
2394
  readonly 'paymentSetup.paid': "A payment method was just saved for this. If you need to save another one, please wait a moment or contact support.";
2382
2395
  readonly 'paymentSetup.queuedOffline': "You appear to be offline. Your payment method was not saved. Please check your connection and try again.";
@@ -2384,7 +2397,7 @@ export declare const UI_DEFAULT_LABELS: {
2384
2397
  readonly 'paymentSetup.awaitingVerification': "Bank verification required: your bank account has NOT been saved yet. Until you verify the small deposits (or descriptor code) from your bank, it cannot be used and nothing will be charged.";
2385
2398
  readonly 'paymentSetup.slowConnection': "Your connection is too slow to save your payment method safely. Please try again on a better connection.";
2386
2399
  readonly 'paymentSetup.serviceUnavailable': "Saving payment methods is temporarily unavailable. Please try again in a few minutes.";
2387
- readonly 'paymentSetup.outcomeUnknown': "We are still confirming the result of an earlier attempt to save a payment method. Please wait and do not save it again.";
2400
+ readonly 'paymentSetup.outcomeChecking': "We are still confirming the result of an earlier attempt to save a payment method. Please wait and do not save it again.";
2388
2401
  readonly 'paymentSetup.inFlight': "A payment method for this is already being saved. Please wait and check again shortly.";
2389
2402
  readonly 'paymentSetup.readinessChecking': "Checking that saving a payment method is available...";
2390
2403
  readonly 'paymentSetup.readinessGeneric': "Saving a payment method is not available right now. Please try again shortly.";
@@ -2425,12 +2438,12 @@ export declare const UI_DEFAULT_LABELS: {
2425
2438
  readonly 'stripeReader.status.reader_busy.text': "A payment is waiting on {{ reader }}. Finish or cancel it before starting another.";
2426
2439
  readonly 'stripeReader.status.merchant_not_ready.title': "Payments are not set up";
2427
2440
  readonly 'stripeReader.status.merchant_not_ready.text': "Finish setting up payments before card payments can be taken, including with a card reader.";
2428
- readonly 'stripeReader.status.unknown.title': "Could not check the card reader";
2429
- readonly 'stripeReader.status.unknown.text': "The card reader could not be checked right now. Nothing was changed. Check again in a moment.";
2441
+ readonly 'stripeReader.status.checking.title': "Checking the card reader";
2442
+ readonly 'stripeReader.status.checking.text': "The card reader has not been confirmed yet. Nothing was changed. Check again in a moment.";
2430
2443
  readonly 'stripeReader.status.reconnect_required.title': "Payment account needs reconnecting";
2431
2444
  readonly 'stripeReader.status.reconnect_required.text': "Your payment account needs to be reconnected before card payments can be taken, including with a card reader.";
2432
- readonly 'stripeReader.status.unknown_attention.title': "The payment account needs attention";
2433
- readonly 'stripeReader.status.unknown_attention.text': "The card reader could not be checked because the payment account needs attention. Nothing was changed. Reconnect payments, then check again.";
2445
+ readonly 'stripeReader.status.stale_attention.title': "The payment account needs attention";
2446
+ readonly 'stripeReader.status.stale_attention.text': "The card reader could not be checked because the payment account needs attention. Nothing was changed. Reconnect payments, then check again.";
2434
2447
  readonly 'stripeReader.status.reader_ready.live': "Card reader ready: {{ reader }}";
2435
2448
  readonly 'stripeReader.status.connect': "Connect a reader";
2436
2449
  readonly 'stripeReader.status.get': "Get a card reader";
@@ -2439,6 +2452,12 @@ export declare const UI_DEFAULT_LABELS: {
2439
2452
  readonly 'stripeReader.status.reconnect': "Reconnect payments";
2440
2453
  readonly 'stripeReader.status.cancelBusy': "Cancel that payment";
2441
2454
  readonly 'stripeReader.status.manual': "Take a manual payment instead";
2455
+ readonly 'stripeReader.status.getInfo': "How to get a card reader";
2456
+ readonly 'stripeReaderBanner.getReader': "Get a card reader to take in-person card payments.";
2457
+ readonly 'stripeReaderBanner.setupFirst': "Set up payments to take card payments, including in person with a card reader.";
2458
+ readonly 'stripeReaderBanner.sandbox': "Card readers are not available in a sandbox account.";
2459
+ readonly 'stripeReaderBanner.serviceDisabled': "Card readers are turned off for this account.";
2460
+ readonly 'stripeReaderBanner.processorUnsupported': "Card readers are not available with this payment processor.";
2442
2461
  readonly 'stripeReader.mode.label': "How is the card paid?";
2443
2462
  readonly 'stripeReader.mode.reader': "Card reader";
2444
2463
  readonly 'stripeReader.mode.manual': "Enter card manually";
@@ -2503,7 +2522,7 @@ export declare const UI_DEFAULT_LABELS: {
2503
2522
  readonly 'stripeReader.refusal.duplicate_suspected': "An identical payment was made moments ago. Check the payments before taking another.";
2504
2523
  readonly 'stripeReader.refusal.paid': "A payment for this was already received. Check the payments before taking another one.";
2505
2524
  readonly 'stripeReader.refusal.offline': "You are offline. Nothing was sent.";
2506
- readonly 'stripeReader.refusal.outcome_unknown': "We are still confirming the result of an earlier payment. Do not start another one.";
2525
+ readonly 'stripeReader.refusal.outcome_checking': "We are still confirming the result of an earlier payment. Do not start another one.";
2507
2526
  readonly 'stripeReader.refusal.queued_offline': "You appear to be offline. The payment was not sent. Check your connection and try again.";
2508
2527
  readonly 'stripeReader.refusal.start_not_received': "We have no record of this payment, so it was not started. You can start again.";
2509
2528
  readonly 'stripeReader.refusal.retry_unreachable': "The payment could not be sent to the reader again. It was not changed: check it in a moment.";
@@ -2597,8 +2616,22 @@ export declare const UI_DEFAULT_LABELS: {
2597
2616
  readonly 'stripeReader.cancelBusy.timeout': "The payment could not be canceled in time. It may still be open: check the card reader again before taking another payment.";
2598
2617
  readonly 'stripeReader.fees.unavailable': "The card reader fees are not available, so nothing can be sent to the reader. Try again in a moment.";
2599
2618
  readonly 'stripeReaders.failed.timeout': "The card reader service did not answer in time. The list was checked again: look at it before trying once more.";
2619
+ readonly 'paymentAttempt.stillUnknown': "We could not confirm your payment yet. Please check again in a moment and do not pay again.";
2620
+ readonly 'paymentSetup.stillUnknown': "We could not confirm yet that your payment method was saved. Please check again in a moment and do not save it again.";
2621
+ readonly 'paymentSetup.outcomeUnknown': "We are still confirming the result of an earlier attempt to save a payment method. Please wait and do not save it again.";
2622
+ readonly 'stripeReader.status.unknown.title': "Checking the card reader";
2623
+ readonly 'stripeReader.status.unknown.text': "The card reader has not been confirmed yet. Nothing was changed. Check again in a moment.";
2624
+ readonly 'stripeReader.status.unknown_attention.title': "The payment account needs attention";
2625
+ readonly 'stripeReader.status.unknown_attention.text': "The card reader could not be checked because the payment account needs attention. Nothing was changed. Reconnect payments, then check again.";
2626
+ readonly 'stripeReader.refusal.outcome_unknown': "We are still confirming the result of an earlier payment. Do not start another one.";
2600
2627
  };
2601
2628
  export type UiLabelKey = keyof typeof UI_DEFAULT_LABELS;
2629
+ /**
2630
+ * DEPRECATED label keys that existed in 0.5.18 and were renamed on 2026-11-21 (the "unknown" payment / reader state became "checking"). Each old key maps to its replacement.
2631
+ * The old keys stay in `UiLabelKey` and in both dictionaries (same text as the replacement), so an app that overrides one still compiles; `UiLabelsService.setLabels` copies such an
2632
+ * override onto the replacement (unless the dictionary also sets the replacement) and `t(oldKey)` returns the replacement's text. New code uses the replacement keys.
2633
+ */
2634
+ export declare const DEPRECATED_LABEL_ALIASES: Readonly<Record<string, UiLabelKey>>;
2602
2635
  export type UiLabelDictionary = Partial<Record<UiLabelKey, string>>;
2603
2636
  /** The English default text of a key. For plain helper functions that run without the service (their `ui` argument is optional). */
2604
2637
  export declare function defaultLabel(key: UiLabelKey, params?: Readonly<Record<string, string | number>>): string;
@@ -2667,7 +2700,7 @@ export declare class ButtonComponent {
2667
2700
  * `ghost-start`: a ghost button for list / section toggles - a full-width row with its content aligned to the start, transparent
2668
2701
  * background, hover tint and the normal focus ring. Pair it with `ariaExpanded` / `ariaPressed`; the label may contain a heading element.
2669
2702
  */
2670
- readonly variant: import("@angular/core").InputSignal<"primary" | "danger" | "warning" | "secondary" | "link" | "ghost" | "ghost-start" | "tab" | "icon" | "icon-danger">;
2703
+ readonly variant: import("@angular/core").InputSignal<"warning" | "primary" | "secondary" | "danger" | "link" | "ghost" | "ghost-start" | "tab" | "icon" | "icon-danger">;
2671
2704
  /** Renders an anchor to this route instead of a button (use with `variant="link"` for an inline text link). `['/settings']` or `'/settings'`. While `disabled` or `loading` it renders a non-clickable `<span role="link" aria-disabled>` with no href (like `href`). */
2672
2705
  readonly routerLink: import("@angular/core").InputSignal<string | readonly unknown[] | null>;
2673
2706
  /** Query params of the `routerLink` (e.g. `{ section: 'deal-defaults' }`). */
@@ -2713,7 +2746,7 @@ export declare class ButtonComponent {
2713
2746
  readonly color: import("@angular/core").InputSignal<string | undefined>;
2714
2747
  readonly active: import("@angular/core").InputSignal<boolean>;
2715
2748
  readonly size: import("@angular/core").InputSignal<"sm" | "md" | "lg" | "xs">;
2716
- readonly type: import("@angular/core").InputSignal<"reset" | "submit" | "button">;
2749
+ readonly type: import("@angular/core").InputSignal<"button" | "submit" | "reset">;
2717
2750
  readonly disabled: import("@angular/core").InputSignal<boolean>;
2718
2751
  readonly loading: import("@angular/core").InputSignal<boolean>;
2719
2752
  readonly fullWidth: import("@angular/core").InputSignal<boolean>;
@@ -2862,7 +2895,7 @@ export declare class ModalComponent implements OnInit, OnDestroy {
2862
2895
  */
2863
2896
  readonly describedBy: import("@angular/core").InputSignal<string | null>;
2864
2897
  readonly maxWidth: import("@angular/core").InputSignal<string>;
2865
- readonly bodyOverflow: import("@angular/core").InputSignal<"auto" | "visible" | "hidden">;
2898
+ readonly bodyOverflow: import("@angular/core").InputSignal<"auto" | "hidden" | "visible">;
2866
2899
  /** `data-testid` of the dialog element itself (the host `<ui-modal>` is always in the page, the dialog only while open). None when empty. */
2867
2900
  readonly dialogTestId: import("@angular/core").InputSignal<string>;
2868
2901
  /** Hides the header X button (e.g. while a request is running). Escape and a backdrop click still close unless `closable` is false. */
@@ -2900,6 +2933,14 @@ export declare class ModalComponent implements OnInit, OnDestroy {
2900
2933
  private readonly el;
2901
2934
  private readonly ren;
2902
2935
  private readonly doc;
2936
+ private readonly injector;
2937
+ /**
2938
+ * Stacking layer: the position of this dialog in the OverlayStack when it opened (0 = nothing else open). Each layer is 2 z-index steps (backdrop 200 + 2n, dialog 201 + 2n), so a dialog opened
2939
+ * later - a confirm or another ui-modal opened from inside this one or from a ui-side-panel inside it - always paints ABOVE the one it was opened from, whatever the order of their host elements in <body>.
2940
+ */
2941
+ private readonly _layer;
2942
+ protected readonly backdropZ: import("@angular/core").Signal<number>;
2943
+ protected readonly dialogZ: import("@angular/core").Signal<number>;
2903
2944
  private readonly _overlays;
2904
2945
  private _prevFocus;
2905
2946
  private _scrollLocked;
@@ -3005,7 +3046,7 @@ export declare class SidePanelComponent implements OnDestroy {
3005
3046
  readonly cancelLabel: import("@angular/core").Signal<string>;
3006
3047
  /** Right-aligned primary action button label. Empty string = hidden. */
3007
3048
  readonly primaryLabel: import("@angular/core").InputSignal<string>;
3008
- readonly primaryVariant: import("@angular/core").InputSignal<"primary" | "danger" | "warning">;
3049
+ readonly primaryVariant: import("@angular/core").InputSignal<"warning" | "primary" | "danger">;
3009
3050
  readonly primaryLoading: import("@angular/core").InputSignal<boolean>;
3010
3051
  readonly primaryDisabled: import("@angular/core").InputSignal<boolean>;
3011
3052
  /** `data-testid` of the Cancel button; none when empty (default). */
@@ -3037,7 +3078,12 @@ export declare class SidePanelComponent implements OnDestroy {
3037
3078
  private _stopViewport;
3038
3079
  private _stopIframeKeys;
3039
3080
  private readonly _interaction;
3081
+ private readonly _injector;
3040
3082
  constructor();
3083
+ /** `OverlayStack.pruneDetached`: this open panel's host is no longer in the page (the `ui-modal` it was projected into closed and removed its content). */
3084
+ isDetached(): boolean;
3085
+ /** The panel's modal closed under it: release the stack place and the scroll lock (the page must not stay locked) and tell the host, which resets its own open state. */
3086
+ onOrphaned(): void;
3041
3087
  /**
3042
3088
  * Re-measures the body now (`scrollHeight` vs `clientHeight`, 1px tolerance for sub-pixel rounding) and updates
3043
3089
  * `bodyScrollable`. Called by the observers; also usable by a host that changes the body content in a way no observer sees.
@@ -3618,6 +3664,13 @@ export declare class OverlayStack {
3618
3664
  private readonly stack;
3619
3665
  push(overlay: object): void;
3620
3666
  remove(overlay: object): void;
3667
+ /** Position of `overlay` in the stack (0 = bottom), -1 when it is not open. */
3668
+ indexOf(overlay: object): number;
3669
+ /**
3670
+ * Closes the open overlays that left the page without closing (a `ui-side-panel` projected into a `ui-modal` whose content was removed when the modal closed): an overlay that
3671
+ * implements `isDetached()` (true) gets `onOrphaned()`, which releases its place in the stack and the page scroll lock and emits its own `closed` so the host can reset its state.
3672
+ */
3673
+ pruneDetached(): void;
3621
3674
  isTop(overlay: object): boolean;
3622
3675
  get isEmpty(): boolean;
3623
3676
  static ɵfac: i0.ɵɵFactoryDeclaration<OverlayStack, never>;