@forgeroute/ui 0.5.28 → 0.5.29

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 (37) hide show
  1. package/fesm2022/forgeroute-ui-calendar.mjs +103 -4
  2. package/fesm2022/forgeroute-ui-calendar.mjs.map +1 -1
  3. package/fesm2022/forgeroute-ui-card-list-item.mjs +147 -14
  4. package/fesm2022/forgeroute-ui-card-list-item.mjs.map +1 -1
  5. package/fesm2022/forgeroute-ui-contact-picker.mjs +2 -2
  6. package/fesm2022/forgeroute-ui-contact-picker.mjs.map +1 -1
  7. package/fesm2022/{forgeroute-ui-core-ui-labels.es-Dzvm992V.mjs → forgeroute-ui-core-ui-labels.es-BViJSCO-.mjs} +4 -1
  8. package/fesm2022/{forgeroute-ui-core-ui-labels.es-Dzvm992V.mjs.map → forgeroute-ui-core-ui-labels.es-BViJSCO-.mjs.map} +1 -1
  9. package/fesm2022/forgeroute-ui-core.mjs +4 -1
  10. package/fesm2022/forgeroute-ui-core.mjs.map +1 -1
  11. package/fesm2022/forgeroute-ui-data-table-core.mjs +59 -28
  12. package/fesm2022/forgeroute-ui-data-table-core.mjs.map +1 -1
  13. package/fesm2022/forgeroute-ui-kpi-card.mjs +2 -2
  14. package/fesm2022/forgeroute-ui-kpi-card.mjs.map +1 -1
  15. package/fesm2022/forgeroute-ui-notes.mjs +20 -22
  16. package/fesm2022/forgeroute-ui-notes.mjs.map +1 -1
  17. package/fesm2022/forgeroute-ui-panel-info-list.mjs +26 -4
  18. package/fesm2022/forgeroute-ui-panel-info-list.mjs.map +1 -1
  19. package/fesm2022/forgeroute-ui-payments.mjs +2 -1
  20. package/fesm2022/forgeroute-ui-payments.mjs.map +1 -1
  21. package/fesm2022/forgeroute-ui-setup.mjs +2 -1
  22. package/fesm2022/forgeroute-ui-setup.mjs.map +1 -1
  23. package/fesm2022/forgeroute-ui-stripe.mjs +78 -6
  24. package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
  25. package/fesm2022/forgeroute-ui-table-types.mjs.map +1 -1
  26. package/package.json +1 -1
  27. package/types/forgeroute-ui-calendar.d.ts +28 -1
  28. package/types/forgeroute-ui-card-list-item.d.ts +25 -1
  29. package/types/forgeroute-ui-core.d.ts +3 -0
  30. package/types/forgeroute-ui-data-table-core.d.ts +10 -1
  31. package/types/forgeroute-ui-messaging.d.ts +5 -5
  32. package/types/forgeroute-ui-panel-info-list.d.ts +11 -0
  33. package/types/forgeroute-ui-payments.d.ts +1 -1
  34. package/types/forgeroute-ui-quickbooks.d.ts +1 -1
  35. package/types/forgeroute-ui-square.d.ts +3 -3
  36. package/types/forgeroute-ui-stripe.d.ts +31 -1
  37. package/types/forgeroute-ui-table-types.d.ts +5 -0
@@ -1 +1 @@
1
- {"version":3,"file":"forgeroute-ui-panel-info-list.mjs","names":[],"sources":["../../../projects/forgeroute-ui/panel-info-list/src/lib/panel-info-list/panel-info-list.component.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, input, computed, inject } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink } from '@angular/router';\nimport { BadgeComponent } from '@forgeroute/ui/badge';\nimport { ButtonComponent } from '@forgeroute/ui/core';\nimport { EmptyStateComponent } from '@forgeroute/ui/empty-state';\nimport { IconComponent, iconPath } from '@forgeroute/ui/icon';\nimport { BADGE_VARIANT_STYLES, BadgeVariant } from '@forgeroute/ui/table-types';\nimport { UiLabelsService } from '@forgeroute/ui/core';\n\nexport interface PanelInfoItem {\n label: string;\n value?: string | null;\n badge?: { label: string; variant: BadgeVariant };\n badges?: Array<{ label: string; variant: BadgeVariant }>;\n /** Router link for the value. */\n link?: string;\n /**\n * A real `<a href>` for the value (the visible `value` is the link text). Only `mailto:`, `tel:`, `http:` and `https:` are\n * allowed; any other scheme (`javascript:`, `data:` ...) renders the value as plain text. `http(s)` links open in a new tab with\n * `rel=\"noopener noreferrer\"`. Wins over `email` / `phone` / `link`.\n */\n href?: string;\n /** Shortcut: the value becomes a `mailto:` link to this address (the value defaults to the address). */\n email?: string;\n /** Shortcut: the value becomes a `tel:` link to this number (digits and a leading + are kept; the value defaults to the number as written). */\n phone?: string;\n /** Show the value with an \"open\" icon instead of blue link styling. */\n linkIcon?: boolean;\n /** Renders a small edit (pencil) `ui-icon` button after the value; `editTooltip` is its tooltip and accessible name (default \"Edit\"). */\n editAction?: () => void;\n editTooltip?: string;\n /** Renders a small delete (bin) `ui-icon` button after the edit pencil; the host asks for confirmation and does the deleting. `deleteTooltip` is its tooltip and accessible name (default \"Delete\"). */\n deleteAction?: () => void;\n deleteTooltip?: string;\n muted?: boolean;\n danger?: boolean;\n hidden?: boolean;\n /** Keep the line breaks of `value` (an address, a note); long lines still wrap. Plain values only. */\n multiline?: boolean;\n /** Bold row: the label and the value in the strong text colour and weight (a total, a balance due). */\n emphasis?: boolean;\n}\n\nexport interface PanelInfoSection {\n title?: string;\n headerLink?: { label: string; url: string };\n /**\n * A small secondary button at the end of the section's header bar (e.g. \"Add item\" for a list of line items). `action` runs on\n * click; `ariaLabel` is the accessible name when the visible label is not enough (default: the label). The header bar is shown\n * for a section with a `headerAction` even when it has no `title`. Not rendered for a section with no visible items unless\n * `showEmptyState` keeps the section. `icon` is an optional SVG path (the `d` value, 24x24 grid, same convention as a toolbar action's\n * `icon`) drawn before the label; it is decorative, so the accessible name stays the label / `ariaLabel`.\n */\n headerAction?: { label: string; action: () => void; ariaLabel?: string; disabled?: boolean; icon?: string };\n items: PanelInfoItem[];\n columns?: 2;\n /**\n * A state mark drawn before the section's title in the header bar: a round tile in the colours of the badge `variant` holding a check (`icon: 'check'`)\n * or a cross (`icon: 'close'`). `label` (\"Done\", \"Not done\") is the mark's accessible name (the tile has no visible text; the shape tells check from cross,\n * so the colour is never the only signal) and its hover tooltip. The header bar is shown for a section with a `status` even without a `title`.\n * Absent: the header bar is as before.\n */\n status?: { icon: 'check' | 'close'; label: string; variant: BadgeVariant };\n}\n\n/**\n * Read-only label/value list for side panels and detail views, grouped into bordered\n * sections. Items with `hidden: true` are skipped; sections with no visible items are\n * dropped unless `showEmptyState` is set (then they show an empty-state message).\n *\n * Usage:\n * <ui-panel-info-list [sections]=\"[{ title: 'DETAILS', items: [\n * { label: 'Status', badge: { label: 'Pending', variant: 'yellow' } },\n * { label: 'Notes', value: notes, hidden: !notes },\n * ] }]\" />\n */\n@Component({\n selector: 'ui-panel-info-list',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet, BadgeComponent, ButtonComponent, RouterLink, EmptyStateComponent, IconComponent],\n host: { '[class.pil-fill]': 'fill()' },\n template: `\n @for (section of displaySections(); track $index) {\n <div class=\"pil-section\">\n @if (section.title || section.headerAction || section.headerLink || section.status) {\n <div class=\"pil-section-label\">\n @if (section.status; as st) {\n <span class=\"pil-status\" role=\"img\" [attr.aria-label]=\"st.label\" [attr.title]=\"st.label\" [attr.data-status]=\"st.icon\" [style.background]=\"statusStyle(st.variant).bg\" [style.color]=\"statusStyle(st.variant).color\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path [attr.d]=\"statusPath(st.icon)\" /></svg>\n </span>\n }\n <span>{{ section.title }}</span>\n @if (section.headerLink) {\n <a class=\"pil-header-link\" [routerLink]=\"section.headerLink.url\">{{ section.headerLink.label }}</a>\n }\n @if (section.headerAction; as ha) {\n <ui-button class=\"pil-header-action\" variant=\"secondary\" size=\"xs\" [disabled]=\"!!ha.disabled\" [ariaLabel]=\"ha.ariaLabel ?? ha.label\" (click)=\"runHeaderAction(ha)\">\n @if (ha.icon) {\n <svg class=\"pil-header-action-icon\" width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path [attr.d]=\"ha.icon\"/></svg>\n }{{ ha.label }}</ui-button>\n }\n </div>\n }\n @if (visibleItems(section).length === 0) {\n <ui-empty-state [message]=\"labels.t('panelInfoList.noInformationAvailable')\" />\n } @else if (section.columns === 2) {\n <div class=\"pil-grid-2\">\n @for (item of visibleItems(section); track $index) {\n <div class=\"pil-grid-cell\" [class.pil-strong]=\"item.emphasis\">\n <span class=\"pil-label\">{{ item.label }}{{ labelColon() ? ':' : '' }}</span>{{ labelColon() ? ' ' : '' }}\n <span class=\"pil-value pil-value--block\">\n <ng-container *ngTemplateOutlet=\"valueTpl; context: { $implicit: item }\" />\n </span>\n </div>\n }\n </div>\n } @else {\n @for (item of visibleItems(section); track $index) {\n <div class=\"pil-row\" [class.pil-row--inline]=\"labelColon()\" [class.pil-strong]=\"item.emphasis\">\n <span class=\"pil-label\">{{ item.label }}{{ labelColon() ? ':' : '' }}</span>{{ labelColon() ? ' ' : '' }}\n <span class=\"pil-value\">\n <ng-container *ngTemplateOutlet=\"valueTpl; context: { $implicit: item }\" />\n </span>\n </div>\n }\n }\n </div>\n }\n <ng-template #valueTpl let-item>\n @if (item.badges) {\n <span class=\"pil-badges\">\n @for (b of item.badges; track $index) {\n <ui-badge [label]=\"b.label\" [variant]=\"b.variant\" />\n }\n </span>\n } @else if (item.badge) {\n <ui-badge [label]=\"item.badge.label\" [variant]=\"item.badge.variant\" />\n } @else if (hrefOf(item); as h) {\n <a class=\"pil-link pil-link--href\" [attr.href]=\"h\" [attr.target]=\"isWeb(h) ? '_blank' : null\" [attr.rel]=\"isWeb(h) ? 'noopener noreferrer' : null\">{{ textOf(item) }}</a>\n } @else if (item.link && item.value && item.linkIcon) {\n <a class=\"pil-link-icon\" [routerLink]=\"item.link\">\n {{ item.value }}\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"/><polyline points=\"15 3 21 3 21 9\"/><line x1=\"10\" y1=\"14\" x2=\"21\" y2=\"3\"/></svg>\n </a>\n } @else if (item.link && item.value) {\n <a class=\"pil-link\" [routerLink]=\"item.link\">{{ item.value }}</a>\n } @else {\n <span [class.pil-muted]=\"item.muted\" [class.pil-danger]=\"item.danger\" [class.pil-multiline]=\"item.multiline\">{{ valueOf(item) }}</span>\n }\n @if (item.editAction) {\n <ui-icon class=\"pil-edit-btn\" name=\"edit\" [size]=\"14\" [tooltip]=\"item.editTooltip ?? labels.t('common.edit')\" (iconClick)=\"item.editAction()\" />\n }\n @if (item.deleteAction) {\n <ui-icon class=\"pil-edit-btn\" name=\"delete\" variant=\"danger\" [size]=\"14\" [tooltip]=\"item.deleteTooltip ?? labels.t('common.delete')\" (iconClick)=\"item.deleteAction()\" />\n }\n </ng-template>\n `,\n styles: [`\n :host { display: flex; flex-direction: column; gap: 12px; }\n /* fill: the list grows to the height of its container (a grid cell / flex item) and its section's box stretches with it */\n :host(.pil-fill) { flex: 1; min-height: 0; }\n :host(.pil-fill) .pil-section { flex: 1; }\n\n .pil-section {\n border: 1px solid #e2e8f0;\n border-radius: 8px;\n overflow: hidden;\n }\n\n .pil-section-label {\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 0.6875rem;\n font-weight: 700;\n letter-spacing: 0.07em;\n color: #64748b; /* slate-500: 4.55:1 on #f8fafc (slate-400 was 2.45:1) */\n text-transform: uppercase;\n padding: 8px 14px;\n background: #f8fafc;\n border-bottom: 1px solid #e2e8f0;\n }\n\n /* the header action sits at the end of the bar; the bar keeps its height with a button in it */\n .pil-header-action { text-transform: none; letter-spacing: 0; margin: -4px 0; flex-shrink: 0; }\n .pil-header-action-icon { margin-right: 6px; vertical-align: -2px; flex-shrink: 0; }\n\n /* status: the mark sits next to the title (the title takes the free space, so a link or action still ends the bar) */\n .pil-status { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 20px; height: 20px; margin: -2px 8px -2px 0; border-radius: 50%; }\n .pil-status + span { margin-right: auto; }\n\n .pil-header-link {\n font-size: 0.75rem;\n font-weight: 500;\n color: #2563eb;\n text-decoration: none;\n text-transform: none;\n letter-spacing: 0;\n &:hover { text-decoration: underline; }\n }\n\n .pil-row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 12px;\n padding: 9px 14px;\n border-bottom: 1px solid #f1f5f9;\n &:last-child { border-bottom: none; }\n }\n\n /* labelColon: \"Label: value\" on one line, value next to the label */\n .pil-row--inline { justify-content: flex-start; }\n .pil-row--inline .pil-value { text-align: left; justify-content: flex-start; flex-wrap: wrap; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }\n\n .pil-label {\n font-size: 0.8125rem;\n color: #64748b;\n flex-shrink: 0;\n }\n\n .pil-value {\n font-size: 0.875rem;\n font-weight: 500;\n color: #1e293b;\n text-align: right;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n min-width: 0; /* a long unbroken value wraps instead of pushing the row wider than the panel */\n overflow-wrap: anywhere;\n word-break: break-word;\n }\n\n /* multiline: keep the line breaks of the value; strong: a bold row */\n .pil-multiline { white-space: pre-line; overflow-wrap: anywhere; word-break: break-word; }\n .pil-strong .pil-label { font-weight: 700; color: #0f172a; }\n .pil-strong .pil-value, .pil-strong .pil-muted { font-weight: 700; color: #0f172a; }\n .pil-badges { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }\n\n .pil-edit-btn { margin-left: 4px; flex-shrink: 0; }\n\n ui-empty-state { padding: 12px 0; }\n .pil-muted { color: #1e293b; font-weight: 400; }\n .pil-danger { color: #dc2626; font-weight: 600; } /* #dc2626 on white = 4.83:1 (the old #ef4444 was 3.76:1, below WCAG AA 4.5:1) */\n\n .pil-link {\n font-size: 0.875rem;\n font-weight: 500;\n color: #2563eb;\n text-decoration: none;\n &:hover { text-decoration: underline; }\n }\n\n /* Touch targets: the value links (phone, email, web, record link) and the section header link get a >= 44px tall hit area through an invisible ::after\n (the visible text stays as it is, desktop unchanged). position: relative is set at every width so the ::after has its containing block. */\n .pil-link, .pil-link-icon, .pil-header-link { position: relative; }\n @media (pointer: coarse), (max-width: 480px) {\n .pil-link::after, .pil-link-icon::after, .pil-header-link::after { content: ''; position: absolute; inset: -14px -4px; }\n }\n\n .pil-link--href { overflow-wrap: anywhere; word-break: break-word; } /* word-break: Safari < 15.4 has no overflow-wrap: anywhere */\n .pil-link:focus-visible, .pil-link-icon:focus-visible, .pil-header-link:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; border-radius: 2px; }\n\n .pil-link-icon {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n font-size: 0.875rem;\n font-weight: 500;\n color: #1e293b;\n text-decoration: none;\n svg { color: #94a3b8; flex-shrink: 0; }\n }\n\n .pil-grid-2 {\n display: grid;\n grid-template-columns: 1fr 1fr;\n }\n\n .pil-grid-cell {\n display: flex;\n flex-direction: column;\n gap: 3px;\n padding: 10px 14px;\n min-width: 0;\n border-right: 1px solid #f1f5f9;\n &:last-child { border-right: none; }\n &:nth-child(even) { border-right: none; }\n }\n\n /* phones: one column, so two long values never squeeze each other */\n @media (max-width: 480px) {\n .pil-grid-2 { grid-template-columns: 1fr; }\n .pil-grid-cell { border-right: none; border-bottom: 1px solid #f1f5f9; &:last-child { border-bottom: none; } }\n }\n\n .pil-value--block {\n text-align: left;\n justify-content: flex-start;\n }\n `],\n})\nexport class PanelInfoListComponent {\n protected readonly labels = inject(UiLabelsService);\n readonly sections = input<PanelInfoSection[]>([]);\n readonly showEmptyState = input(false);\n /**\n * true = each row reads \"Label: value\" (a colon after the label and a real space, so `textContent` is \"Label: value\") with the value\n * next to the label instead of pushed to the right edge. Works with plain values, links (href / email / phone / link) and badges.\n * Default false = the label and value as before.\n */\n readonly labelColon = input(false);\n /**\n * The list stretches to the height of its container (a grid cell or flex item with a definite height), so lists side by side in\n * one grid row end at the same height; with one section, that section's box fills the height. Default false = as tall as its content.\n */\n readonly fill = input(false);\n\n readonly displaySections = computed(() =>\n this.showEmptyState()\n ? this.sections()\n : this.sections().filter(s => s.items.some(i => !i.hidden))\n );\n\n /**\n * The safe href of an item, or null: `href` first, else `mailto:`/`tel:` built from `email`/`phone`. Only mailto, tel, http and https\n * are allowed (the scheme is checked after removing control characters and spaces, like browsers do).\n */\n hrefOf(item: PanelInfoItem): string | null {\n // control characters (tab, newline ...) are dropped, as browsers do, so the sanitised href and the scheme check see the same text\n let raw = item.href?.replace(/[\\u0000-\\u001F]/g, '').trim() ?? '';\n if (!raw && item.email?.trim()) {\n // encode what would start a mailto: header (?bcc=..., &body=...) or break the URL\n raw = 'mailto:' + item.email.trim().replace(/[?#&%\\s<>\"]/g, c => encodeURIComponent(c));\n }\n if (!raw && item.phone?.trim()) {\n // \"555-0100 ext 12\" / \"x12\" / \"#12\": the extension is its own ;ext= part, never glued onto the number\n const m = /^(.*?)(?:\\s*(?:ext\\.?|x|#)\\s*(\\d+))?\\s*$/i.exec(item.phone.trim())!;\n const num = m[1];\n const digits = num.replace(/\\D/g, '');\n if (digits) raw = 'tel:' + (num.trim().startsWith('+') ? '+' : '') + digits + (m[2] ? ';ext=' + m[2] : '');\n }\n if (!raw) return null;\n const scheme = /^([a-z][a-z0-9+.\\-]*):/i.exec(raw.replace(/[\\u0000-\\u0020]/g, ''));\n return scheme && ['mailto', 'tel', 'http', 'https'].includes(scheme[1].toLowerCase()) ? raw : null;\n }\n isWeb(href: string): boolean { return /^https?:/i.test(href.replace(/[\\u0000-\\u0020]/g, '')); }\n /** Link text: the value, else the email / phone as written. */\n textOf(item: PanelInfoItem): string { return item.value || item.email || item.phone || item.href || ''; }\n\n /** Plain value, or the dash for an empty / blank one. */\n valueOf(item: PanelInfoItem): string { return item.value?.trim() ? item.value : '—'; }\n\n /** Colours of a section's `status` mark: the badge colours of its variant (an unknown variant falls back to gray, like the badge). */\n statusStyle(variant: BadgeVariant): { bg: string; color: string } { return BADGE_VARIANT_STYLES[variant] ?? BADGE_VARIANT_STYLES['gray']; }\n\n /** SVG path of a section's `status` icon (the library's own check and close icons). */\n statusPath(icon: 'check' | 'close'): string { return iconPath(icon)!; }\n\n /** A disabled header action never runs, even when the click reaches the host element. */\n runHeaderAction(ha: NonNullable<PanelInfoSection['headerAction']>): void { if (!ha.disabled) ha.action(); }\n\n visibleItems(section: PanelInfoSection): PanelInfoItem[] {\n return section.items.filter(i => !i.hidden);\n }\n}\n"],"mappings":";;;;;;;;;AAiTA,IAAa,yBAAb,MAAa,uBAAsB;CApOnC,cAAA;EAqOqB,KAAA,SAAS,OAAO,eAAe;EACzC,KAAA,WAAiB,MAA0B,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;EAC9C,KAAA,iBAAiB,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,iBAAA,CAAA,+BAAA,CAAA,CAAA;EAM7B,KAAA,aAAiB,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;EAK7B,KAAA,OAAiB,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;EAE7B,KAAA,kBAAkB,eACzB,KAAK,eAAc,IACf,KAAK,SAAQ,IACb,KAAK,SAAQ,CAAE,CAAC,QAAO,MAAK,EAAE,MAAM,MAAK,MAAK,CAAC,EAAE,MAAM,CAAC,GAC7D,GAAA,YAAA,CAAA,EAAA,WAAA,kBAAA,CAAA,+BAAA,CAAA,CAAA;CA2CF;CArCC,OAAO,MAAmB;EAExB,IAAI,MAAM,KAAK,MAAM,QAAQ,oBAAoB,EAAE,CAAC,CAAC,KAAI,KAAM;EAC/D,IAAI,CAAC,OAAO,KAAK,OAAO,KAAI,GAE1B,MAAM,YAAY,KAAK,MAAM,KAAI,CAAE,CAAC,QAAQ,iBAAgB,MAAK,mBAAmB,CAAC,CAAC;EAExF,IAAI,CAA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QAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;KAAA;KAAA,SAAA,CAAA,WAAA;IAAA;GAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AAgOhG,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAsB,YAAA,CAAA;EApOlC,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAoB,YAClB;GAAI,iBACC,wBAAwB;GAAM,SACtC;IAAC;IAAkB;IAAgB;IAAiB;IAAY;IAAqB;GAAa;GAAC,MACtG,EAAE,oBAAoB,SAAQ;GAAE,UAC5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2ET,QAAA,CAAA,yoGAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"forgeroute-ui-panel-info-list.mjs","names":[],"sources":["../../../projects/forgeroute-ui/panel-info-list/src/lib/panel-info-list/panel-info-list.component.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, input, computed, inject } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink } from '@angular/router';\nimport { BadgeComponent } from '@forgeroute/ui/badge';\nimport { ButtonComponent } from '@forgeroute/ui/core';\nimport { EmptyStateComponent } from '@forgeroute/ui/empty-state';\nimport { IconComponent, iconPath } from '@forgeroute/ui/icon';\nimport { BADGE_VARIANT_STYLES, BadgeVariant } from '@forgeroute/ui/table-types';\nimport { UiLabelsService } from '@forgeroute/ui/core';\n\nexport interface PanelInfoItem {\n label: string;\n value?: string | null;\n badge?: { label: string; variant: BadgeVariant };\n badges?: Array<{ label: string; variant: BadgeVariant }>;\n /** Router link for the value. */\n link?: string;\n /**\n * A real `<a href>` for the value (the visible `value` is the link text). Only `mailto:`, `tel:`, `http:` and `https:` are\n * allowed; any other scheme (`javascript:`, `data:` ...) renders the value as plain text. `http(s)` links open in a new tab with\n * `rel=\"noopener noreferrer\"`. Wins over `email` / `phone` / `link`.\n */\n href?: string;\n /** Shortcut: the value becomes a `mailto:` link to this address (the value defaults to the address). */\n email?: string;\n /** Shortcut: the value becomes a `tel:` link to this number (digits and a leading + are kept; the value defaults to the number as written). */\n phone?: string;\n /** Show the value with an \"open\" icon instead of blue link styling. */\n linkIcon?: boolean;\n /** Renders a small edit (pencil) `ui-icon` button after the value; `editTooltip` is its tooltip and accessible name (default \"Edit\"). */\n editAction?: () => void;\n editTooltip?: string;\n /** Renders a small delete (bin) `ui-icon` button after the edit pencil; the host asks for confirmation and does the deleting. `deleteTooltip` is its tooltip and accessible name (default \"Delete\"). */\n deleteAction?: () => void;\n deleteTooltip?: string;\n muted?: boolean;\n danger?: boolean;\n hidden?: boolean;\n /** Keep the line breaks of `value` (an address, a note); long lines still wrap. Plain values only. */\n multiline?: boolean;\n /** Bold row: the label and the value in the strong text colour and weight (a total, a balance due). */\n emphasis?: boolean;\n}\n\nexport interface PanelInfoSection {\n title?: string;\n headerLink?: { label: string; url: string };\n /**\n * A small secondary button at the end of the section's header bar (e.g. \"Add item\" for a list of line items). `action` runs on\n * click; `ariaLabel` is the accessible name when the visible label is not enough (default: the label). The header bar is shown\n * for a section with a `headerAction` even when it has no `title`. Not rendered for a section with no visible items unless\n * `showEmptyState` keeps the section. `icon` is an optional SVG path (the `d` value, 24x24 grid, same convention as a toolbar action's\n * `icon`) drawn before the label; it is decorative, so the accessible name stays the label / `ariaLabel`.\n */\n headerAction?: { label: string; action: () => void; ariaLabel?: string; disabled?: boolean; icon?: string };\n items: PanelInfoItem[];\n columns?: 2;\n /**\n * A state mark drawn before the section's title in the header bar: a round tile in the colours of the badge `variant` holding a check (`icon: 'check'`)\n * or a cross (`icon: 'close'`). `label` (\"Done\", \"Not done\") is the mark's accessible name (the tile has no visible text; the shape tells check from cross,\n * so the colour is never the only signal) and its hover tooltip. The header bar is shown for a section with a `status` even without a `title`.\n * Absent: the header bar is as before.\n */\n status?: { icon: 'check' | 'close'; label: string; variant: BadgeVariant };\n}\n\n/**\n * Read-only label/value list for side panels and detail views, grouped into bordered\n * sections. Items with `hidden: true` are skipped; sections with no visible items are\n * dropped unless `showEmptyState` is set (then they show an empty-state message).\n *\n * Usage:\n * <ui-panel-info-list [sections]=\"[{ title: 'DETAILS', items: [\n * { label: 'Status', badge: { label: 'Pending', variant: 'yellow' } },\n * { label: 'Notes', value: notes, hidden: !notes },\n * ] }]\" />\n */\n@Component({\n selector: 'ui-panel-info-list',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgTemplateOutlet, BadgeComponent, ButtonComponent, RouterLink, EmptyStateComponent, IconComponent],\n host: { '[class.pil-fill]': 'fill()', '[class.pil-flat]': 'flat()' },\n template: `\n @for (section of displaySections(); track $index) {\n <div class=\"pil-section\">\n @if (section.title || section.headerAction || section.headerLink || section.status) {\n <div class=\"pil-section-label\">\n @if (section.status; as st) {\n <span class=\"pil-status\" role=\"img\" [attr.aria-label]=\"st.label\" [attr.title]=\"st.label\" [attr.data-status]=\"st.icon\" [style.background]=\"statusStyle(st.variant).bg\" [style.color]=\"statusStyle(st.variant).color\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path [attr.d]=\"statusPath(st.icon)\" /></svg>\n </span>\n }\n <span>{{ section.title }}</span>\n @if (section.headerLink) {\n <a class=\"pil-header-link\" [routerLink]=\"section.headerLink.url\">{{ section.headerLink.label }}</a>\n }\n @if (section.headerAction; as ha) {\n <ui-button class=\"pil-header-action\" variant=\"secondary\" size=\"xs\" [disabled]=\"!!ha.disabled\" [ariaLabel]=\"ha.ariaLabel ?? ha.label\" (click)=\"runHeaderAction(ha)\">\n @if (ha.icon) {\n <svg class=\"pil-header-action-icon\" width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path [attr.d]=\"ha.icon\"/></svg>\n }{{ ha.label }}</ui-button>\n }\n </div>\n }\n @if (visibleItems(section).length === 0) {\n <ui-empty-state [message]=\"labels.t('panelInfoList.noInformationAvailable')\" />\n } @else if (section.columns === 2) {\n <div class=\"pil-grid-2\">\n @for (item of visibleItems(section); track $index) {\n <div class=\"pil-grid-cell\" [class.pil-strong]=\"item.emphasis\">\n <span class=\"pil-label\">{{ item.label }}{{ labelColon() ? ':' : '' }}</span>{{ labelColon() ? ' ' : '' }}\n <span class=\"pil-value pil-value--block\">\n <ng-container *ngTemplateOutlet=\"valueTpl; context: { $implicit: item }\" />\n </span>\n </div>\n }\n </div>\n } @else {\n @for (item of visibleItems(section); track $index) {\n <div class=\"pil-row\" [class.pil-row--inline]=\"labelColon()\" [class.pil-strong]=\"item.emphasis\">\n <span class=\"pil-label\">{{ item.label }}{{ labelColon() ? ':' : '' }}</span>{{ labelColon() ? ' ' : '' }}\n <span class=\"pil-value\">\n <ng-container *ngTemplateOutlet=\"valueTpl; context: { $implicit: item }\" />\n </span>\n </div>\n }\n }\n </div>\n }\n <ng-template #valueTpl let-item>\n @if (item.badges) {\n <span class=\"pil-badges\">\n @for (b of item.badges; track $index) {\n <ui-badge [label]=\"b.label\" [variant]=\"b.variant\" />\n }\n </span>\n } @else if (item.badge) {\n <ui-badge [label]=\"item.badge.label\" [variant]=\"item.badge.variant\" />\n } @else if (hrefOf(item); as h) {\n <a class=\"pil-link pil-link--href\" [attr.href]=\"h\" [attr.target]=\"isWeb(h) ? '_blank' : null\" [attr.rel]=\"isWeb(h) ? 'noopener noreferrer' : null\">{{ textOf(item) }}</a>\n } @else if (item.link && item.value && item.linkIcon) {\n <a class=\"pil-link-icon\" [routerLink]=\"item.link\">\n {{ item.value }}\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\"/><polyline points=\"15 3 21 3 21 9\"/><line x1=\"10\" y1=\"14\" x2=\"21\" y2=\"3\"/></svg>\n </a>\n } @else if (item.link && item.value) {\n <a class=\"pil-link\" [routerLink]=\"item.link\">{{ item.value }}</a>\n } @else {\n <span [class.pil-muted]=\"item.muted\" [class.pil-danger]=\"item.danger\" [class.pil-multiline]=\"item.multiline\">{{ valueOf(item) }}</span>\n }\n @if (item.editAction) {\n <ui-icon class=\"pil-edit-btn\" name=\"edit\" [size]=\"14\" [tooltip]=\"item.editTooltip ?? labels.t('common.edit')\" (iconClick)=\"item.editAction()\" />\n }\n @if (item.deleteAction) {\n <ui-icon class=\"pil-edit-btn\" name=\"delete\" variant=\"danger\" [size]=\"14\" [tooltip]=\"item.deleteTooltip ?? labels.t('common.delete')\" (iconClick)=\"item.deleteAction()\" />\n }\n </ng-template>\n `,\n styles: [`\n :host { display: flex; flex-direction: column; gap: 12px; }\n /* fill: the list grows to the height of its container (a grid cell / flex item) and its section's box stretches with it */\n :host(.pil-fill) { flex: 1; min-height: 0; }\n :host(.pil-fill) .pil-section { flex: 1; }\n /* flat: for a list inside a card that already has a box (no card within a card): no border or radius, and each row reads\n as a small capital label ABOVE a bold value with a thin divider between rows (the Contact Info look). */\n :host(.pil-flat) .pil-section { border: none; border-radius: 0; }\n :host(.pil-flat) .pil-row, :host(.pil-flat) .pil-grid-cell {\n flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 3px; padding: 10px 0;\n }\n :host(.pil-flat) .pil-section > :first-child .pil-row:first-child, :host(.pil-flat) .pil-row:first-child { padding-top: 0; }\n :host(.pil-flat) .pil-label { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: #64748b; }\n :host(.pil-flat) .pil-value { font-size: 0.875rem; font-weight: 600; color: #1e293b; text-align: left; justify-content: flex-start; }\n :host(.pil-flat) .pil-badges { justify-content: flex-start; }\n\n .pil-section {\n border: 1px solid #e2e8f0;\n border-radius: 8px;\n overflow: hidden;\n }\n\n .pil-section-label {\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 0.6875rem;\n font-weight: 700;\n letter-spacing: 0.07em;\n color: #64748b; /* slate-500: 4.55:1 on #f8fafc (slate-400 was 2.45:1) */\n text-transform: uppercase;\n padding: 8px 14px;\n background: #f8fafc;\n border-bottom: 1px solid #e2e8f0;\n }\n\n /* the header action sits at the end of the bar; the bar keeps its height with a button in it */\n .pil-header-action { text-transform: none; letter-spacing: 0; margin: -4px 0; flex-shrink: 0; }\n .pil-header-action-icon { margin-right: 6px; vertical-align: -2px; flex-shrink: 0; }\n\n /* status: the mark sits next to the title (the title takes the free space, so a link or action still ends the bar) */\n .pil-status { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 20px; height: 20px; margin: -2px 8px -2px 0; border-radius: 50%; }\n .pil-status + span { margin-right: auto; }\n\n .pil-header-link {\n font-size: 0.75rem;\n font-weight: 500;\n color: #2563eb;\n text-decoration: none;\n text-transform: none;\n letter-spacing: 0;\n &:hover { text-decoration: underline; }\n }\n\n .pil-row {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 12px;\n padding: 9px 14px;\n border-bottom: 1px solid #f1f5f9;\n &:last-child { border-bottom: none; }\n }\n\n /* labelColon: \"Label: value\" on one line, value next to the label */\n .pil-row--inline { justify-content: flex-start; }\n .pil-row--inline .pil-value { text-align: left; justify-content: flex-start; flex-wrap: wrap; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }\n\n .pil-label {\n font-size: 0.8125rem;\n color: #64748b;\n flex-shrink: 0;\n }\n\n .pil-value {\n font-size: 0.875rem;\n font-weight: 500;\n color: #1e293b;\n text-align: right;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n min-width: 0; /* a long unbroken value wraps instead of pushing the row wider than the panel */\n overflow-wrap: anywhere;\n word-break: break-word;\n }\n\n /* multiline: keep the line breaks of the value; strong: a bold row */\n .pil-multiline { white-space: pre-line; overflow-wrap: anywhere; word-break: break-word; }\n .pil-strong .pil-label { font-weight: 700; color: #0f172a; }\n .pil-strong .pil-value, .pil-strong .pil-muted { font-weight: 700; color: #0f172a; }\n .pil-badges { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }\n\n .pil-edit-btn { margin-left: 4px; flex-shrink: 0; }\n\n ui-empty-state { padding: 12px 0; }\n .pil-muted { color: #1e293b; font-weight: 400; }\n .pil-danger { color: #dc2626; font-weight: 600; } /* #dc2626 on white = 4.83:1 (the old #ef4444 was 3.76:1, below WCAG AA 4.5:1) */\n\n .pil-link {\n font-size: 0.875rem;\n font-weight: 500;\n color: #2563eb;\n text-decoration: none;\n &:hover { text-decoration: underline; }\n }\n\n /* Touch targets: the value links (phone, email, web, record link) and the section header link get a >= 44px tall hit area through an invisible ::after\n (the visible text stays as it is, desktop unchanged). position: relative is set at every width so the ::after has its containing block. */\n .pil-link, .pil-link-icon, .pil-header-link { position: relative; }\n @media (pointer: coarse), (max-width: 480px) {\n .pil-link::after, .pil-link-icon::after, .pil-header-link::after { content: ''; position: absolute; inset: -14px -4px; }\n }\n\n .pil-link--href { overflow-wrap: anywhere; word-break: break-word; } /* word-break: Safari < 15.4 has no overflow-wrap: anywhere */\n .pil-link:focus-visible, .pil-link-icon:focus-visible, .pil-header-link:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; border-radius: 2px; }\n\n .pil-link-icon {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n font-size: 0.875rem;\n font-weight: 500;\n color: #1e293b;\n text-decoration: none;\n svg { color: #94a3b8; flex-shrink: 0; }\n }\n\n .pil-grid-2 {\n display: grid;\n grid-template-columns: 1fr 1fr;\n }\n\n .pil-grid-cell {\n display: flex;\n flex-direction: column;\n gap: 3px;\n padding: 10px 14px;\n min-width: 0;\n border-right: 1px solid #f1f5f9;\n &:last-child { border-right: none; }\n &:nth-child(even) { border-right: none; }\n }\n\n /* phones: one column, so two long values never squeeze each other */\n @media (max-width: 480px) {\n .pil-grid-2 { grid-template-columns: 1fr; }\n .pil-grid-cell { border-right: none; border-bottom: 1px solid #f1f5f9; &:last-child { border-bottom: none; } }\n }\n\n .pil-value--block {\n text-align: left;\n justify-content: flex-start;\n }\n `],\n})\nexport class PanelInfoListComponent {\n protected readonly labels = inject(UiLabelsService);\n readonly sections = input<PanelInfoSection[]>([]);\n readonly showEmptyState = input(false);\n /**\n * true = each row reads \"Label: value\" (a colon after the label and a real space, so `textContent` is \"Label: value\") with the value\n * next to the label instead of pushed to the right edge. Works with plain values, links (href / email / phone / link) and badges.\n * Default false = the label and value as before.\n */\n readonly labelColon = input(false);\n /**\n * The list stretches to the height of its container (a grid cell or flex item with a definite height), so lists side by side in\n * one grid row end at the same height; with one section, that section's box fills the height. Default false = as tall as its content.\n */\n readonly fill = input(false);\n /**\n * For a list placed inside a card (`ui-detail-card`, a side panel) that already has a box: no card within a card. Draws the list\n * without its own border and rounded box, and each row as a small capital label above a bold value with a thin divider between rows.\n * Default false = the bordered box with the label left and the value right, as before.\n */\n readonly flat = input(false);\n\n readonly displaySections = computed(() =>\n this.showEmptyState()\n ? this.sections()\n : this.sections().filter(s => s.items.some(i => !i.hidden))\n );\n\n /**\n * The safe href of an item, or null: `href` first, else `mailto:`/`tel:` built from `email`/`phone`. Only mailto, tel, http and https\n * are allowed (the scheme is checked after removing control characters and spaces, like browsers do).\n */\n hrefOf(item: PanelInfoItem): string | null {\n // control characters (tab, newline ...) are dropped, as browsers do, so the sanitised href and the scheme check see the same text\n let raw = item.href?.replace(/[\\u0000-\\u001F]/g, '').trim() ?? '';\n if (!raw && item.email?.trim()) {\n // encode what would start a mailto: header (?bcc=..., &body=...) or break the URL\n raw = 'mailto:' + item.email.trim().replace(/[?#&%\\s<>\"]/g, c => encodeURIComponent(c));\n }\n if (!raw && item.phone?.trim()) {\n // \"555-0100 ext 12\" / \"x12\" / \"#12\": the extension is its own ;ext= part, never glued onto the number\n const m = /^(.*?)(?:\\s*(?:ext\\.?|x|#)\\s*(\\d+))?\\s*$/i.exec(item.phone.trim())!;\n const num = m[1];\n const digits = num.replace(/\\D/g, '');\n if (digits) raw = 'tel:' + (num.trim().startsWith('+') ? '+' : '') + digits + (m[2] ? ';ext=' + m[2] : '');\n }\n if (!raw) return null;\n const scheme = /^([a-z][a-z0-9+.\\-]*):/i.exec(raw.replace(/[\\u0000-\\u0020]/g, ''));\n return scheme && ['mailto', 'tel', 'http', 'https'].includes(scheme[1].toLowerCase()) ? raw : null;\n }\n isWeb(href: string): boolean { return /^https?:/i.test(href.replace(/[\\u0000-\\u0020]/g, '')); }\n /** Link text: the value, else the email / phone as written. */\n textOf(item: PanelInfoItem): string { return item.value || item.email || item.phone || item.href || ''; }\n\n /** Plain value, or the dash for an empty / blank one. */\n valueOf(item: PanelInfoItem): string { return item.value?.trim() ? item.value : '—'; }\n\n /** Colours of a section's `status` mark: the badge colours of its variant (an unknown variant falls back to gray, like the badge). */\n statusStyle(variant: BadgeVariant): { bg: string; color: string } { return BADGE_VARIANT_STYLES[variant] ?? BADGE_VARIANT_STYLES['gray']; }\n\n /** SVG path of a section's `status` icon (the library's own check and close icons). */\n statusPath(icon: 'check' | 'close'): string { return iconPath(icon)!; }\n\n /** A disabled header action never runs, even when the click reaches the host element. */\n runHeaderAction(ha: NonNullable<PanelInfoSection['headerAction']>): void { if (!ha.disabled) ha.action(); }\n\n visibleItems(section: PanelInfoSection): PanelInfoItem[] {\n return section.items.filter(i => !i.hidden);\n }\n}\n"],"mappings":";;;;;;;;;AA2TA,IAAa,yBAAb,MAAa,uBAAsB;CA9OnC,cAAA;EA+OqB,KAAA,SAAS,OAAO,eAAe;EACzC,KAAA,WAAiB,MAA0B,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;EAC9C,KAAA,iBAAiB,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,SACtC;IAAC;IAAkB;IAAgB;IAAiB;IAAY;IAAqB;GAAa;GAAC,MACtG;IAAE,oBAAoB;IAAU,oBAAoB;GAAQ;GAAE,UAC1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2ET,QAAA,CAAA,uvHAAA;EAAA,CAAA"}
@@ -6692,7 +6692,8 @@ var RefundPanelComponent = class RefundPanelComponent {
6692
6692
  "sections",
6693
6693
  "showEmptyState",
6694
6694
  "labelColon",
6695
- "fill"
6695
+ "fill",
6696
+ "flat"
6696
6697
  ]
6697
6698
  },
6698
6699
  {