@forgeroute/ui 0.5.29 → 0.5.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/forgeroute-ui-card-list-item.mjs +18 -2
- package/fesm2022/forgeroute-ui-card-list-item.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-core.mjs +34 -4
- package/fesm2022/forgeroute-ui-core.mjs.map +1 -1
- package/fesm2022/forgeroute-ui-icon.mjs +7 -6
- package/fesm2022/forgeroute-ui-icon.mjs.map +1 -1
- package/package.json +1 -1
- package/types/forgeroute-ui-card-list-item.d.ts +7 -0
- package/types/forgeroute-ui-core.d.ts +10 -5
- package/types/forgeroute-ui-icon.d.ts +2 -0
- package/types/forgeroute-ui-messaging.d.ts +1 -0
|
@@ -111,6 +111,7 @@ var CardListItemComponent = class CardListItemComponent {
|
|
|
111
111
|
this.actionLabel = input("", ...ngDevMode ? [{ debugName: "actionLabel" }] : /* istanbul ignore next */ []);
|
|
112
112
|
this.actionIcon = input("", ...ngDevMode ? [{ debugName: "actionIcon" }] : /* istanbul ignore next */ []);
|
|
113
113
|
this.actionTestId = input("", ...ngDevMode ? [{ debugName: "actionTestId" }] : /* istanbul ignore next */ []);
|
|
114
|
+
this.actionColor = input("", ...ngDevMode ? [{ debugName: "actionColor" }] : /* istanbul ignore next */ []);
|
|
114
115
|
this.actionAriaLabel = input("", ...ngDevMode ? [{ debugName: "actionAriaLabel" }] : /* istanbul ignore next */ []);
|
|
115
116
|
this.editClick = output();
|
|
116
117
|
this.viewClick = output();
|
|
@@ -333,6 +334,13 @@ var CardListItemComponent = class CardListItemComponent {
|
|
|
333
334
|
isRequired: false,
|
|
334
335
|
transformFunction: null
|
|
335
336
|
},
|
|
337
|
+
actionColor: {
|
|
338
|
+
classPropertyName: "actionColor",
|
|
339
|
+
publicName: "actionColor",
|
|
340
|
+
isSignal: true,
|
|
341
|
+
isRequired: false,
|
|
342
|
+
transformFunction: null
|
|
343
|
+
},
|
|
336
344
|
actionAriaLabel: {
|
|
337
345
|
classPropertyName: "actionAriaLabel",
|
|
338
346
|
publicName: "actionAriaLabel",
|
|
@@ -397,7 +405,7 @@ var CardListItemComponent = class CardListItemComponent {
|
|
|
397
405
|
</button>
|
|
398
406
|
}
|
|
399
407
|
@if (actionLabel()) {
|
|
400
|
-
<button class="cli-icon-btn cli-icon-btn--action" type="button" [attr.data-testid]="actionTestId() || null" [attr.aria-label]="actionAriaLabel() || actionLabel()" [uiTooltip]="actionAriaLabel() || actionLabel()" (click)="action.emit()">
|
|
408
|
+
<button class="cli-icon-btn cli-icon-btn--action" type="button" [style.color]="actionColor() || null" [attr.data-testid]="actionTestId() || null" [attr.aria-label]="actionAriaLabel() || actionLabel()" [uiTooltip]="actionAriaLabel() || actionLabel()" (click)="action.emit()">
|
|
401
409
|
<svg width="13" height="13" 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]="actionIcon() || actionFallbackPath" /></svg>
|
|
402
410
|
</button>
|
|
403
411
|
}
|
|
@@ -497,7 +505,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
497
505
|
</button>
|
|
498
506
|
}
|
|
499
507
|
@if (actionLabel()) {
|
|
500
|
-
<button class="cli-icon-btn cli-icon-btn--action" type="button" [attr.data-testid]="actionTestId() || null" [attr.aria-label]="actionAriaLabel() || actionLabel()" [uiTooltip]="actionAriaLabel() || actionLabel()" (click)="action.emit()">
|
|
508
|
+
<button class="cli-icon-btn cli-icon-btn--action" type="button" [style.color]="actionColor() || null" [attr.data-testid]="actionTestId() || null" [attr.aria-label]="actionAriaLabel() || actionLabel()" [uiTooltip]="actionAriaLabel() || actionLabel()" (click)="action.emit()">
|
|
501
509
|
<svg width="13" height="13" 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]="actionIcon() || actionFallbackPath" /></svg>
|
|
502
510
|
</button>
|
|
503
511
|
}
|
|
@@ -695,6 +703,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
695
703
|
required: false
|
|
696
704
|
}]
|
|
697
705
|
}],
|
|
706
|
+
actionColor: [{
|
|
707
|
+
type: i0.Input,
|
|
708
|
+
args: [{
|
|
709
|
+
isSignal: true,
|
|
710
|
+
alias: "actionColor",
|
|
711
|
+
required: false
|
|
712
|
+
}]
|
|
713
|
+
}],
|
|
698
714
|
actionAriaLabel: [{
|
|
699
715
|
type: i0.Input,
|
|
700
716
|
args: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forgeroute-ui-card-list-item.mjs","names":[],"sources":["../../../projects/forgeroute-ui/card-list-item/src/lib/card-list-item/card-list-item.component.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewEncapsulation, computed, input, output, inject, viewChild, ViewContainerRef, ElementRef, DestroyRef, afterNextRender, ComponentRef } from '@angular/core';\nimport { BadgeComponent } from '@forgeroute/ui/badge';\nimport { TooltipDirective } from '@forgeroute/ui/tooltip';\nimport { BadgeVariant } from '@forgeroute/ui/table-types';\nimport { UiLabelKey, UiLabelsService } from '@forgeroute/ui/core';\n\n/** Colour of the priority dot (`high` red, `medium` amber, `low` grey, `blue`, `green`); `none` = no dot. */\nexport type CardListIndicator = 'high' | 'medium' | 'low' | 'blue' | 'green' | 'none';\n/** Icon of the round marker on the left. */\nexport type CardListIcon = 'call' | 'email' | 'sms' | 'task' | 'doc' | 'money' | 'deal' | 'survey' | 'property' | 'search' | 'heart' | 'calc' | 'repeat';\n\n/** SVG path data (24x24 viewBox, stroke icons) of every `CardListIcon`. */\nconst ICON_PATHS: Record<CardListIcon, string> = {\n call: 'M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07A19.5 19.5 0 0 1 4.69 12a19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 3.6 1.27h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L7.91 8.91a16 16 0 0 0 6 6l1-1a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z',\n email: 'M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z M22 7l-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7',\n sms: 'M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z',\n task: 'M9 11l3 3L22 4 M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11',\n doc: 'M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z M14 2v6h6',\n money: 'M12 1v22 M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6',\n deal: 'M22 7l-8.5 8.5-5-5L2 17 M16 7h6v6',\n survey: 'M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2 M10 3h4a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z M9 12h6 M9 16h4',\n property: 'M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z M9 22V12h6v10',\n search: 'M11 3a8 8 0 1 0 0 16 8 8 0 0 0 0-16z M21 21l-4.35-4.35',\n heart: 'M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z',\n calc: 'M6 2h12a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z M8 6h8 M8 10h2 M14 10h2 M8 14h2 M14 14h2 M8 18h2 M14 18h2',\n repeat: 'M17 1l4 4-4 4 M3 11V9a4 4 0 0 1 4-4h14 M7 23l-4-4 4-4 M21 13v2a4 4 0 0 1-4 4H3',\n};\nconst CALENDAR_PATH = 'M5 4h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z M16 2v4 M8 2v4 M3 10h18';\nconst EDIT_PATH = 'M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7 M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z';\nconst ACTION_FALLBACK_PATH = 'M5 12h14 M12 5l7 7-7 7';\nconst EYE_PATH = 'M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z';\nconst TRASH_PATH = 'M3 6h18 M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2 M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6 M10 11v6 M14 11v6';\n\n/**\n * Internal: wraps ONE projected `[card-list-action]` element (a link or a button the app owns) so the library draws it as an icon right of the title\n * and gives it the `uiTooltip` bubble. Never used by apps.\n */\n@Component({\n selector: 'ui-card-list-action-wrap',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n hostDirectives: [{ directive: TooltipDirective, inputs: ['uiTooltip'] }],\n host: { class: 'cli-action-wrap' },\n template: `<ng-content />`,\n})\nexport class CardListActionWrapComponent {}\n\n/**\n * Record row for the cards of a detail page (tasks, documents, deals, expenses, matches, surveys...). The layout is fixed;\n * pass inputs only:\n *\n * [dot | round icon] [title] [edit] [view] [action] [delete] [type badge] [status badge]\n * [description] [inline link]\n * [calendar icon + date]\n *\n * Each row is a bordered rounded box, 8px apart; put the rows straight in a `ui-detail-card` body (or in a `ui-list` template).\n *\n * <ui-card-list-item title=\"Call John\" indicator=\"high\" type=\"Meeting\" status=\"Pending\" statusVariant=\"gray\"\n * date=\"Due Aug 21, 2026\" description=\"Follow up about the offer\"\n * [editButton]=\"true\" (editClick)=\"edit(t)\" [viewButton]=\"true\" (viewClick)=\"view(t)\" />\n *\n * Links: the library has no router, so a link is content you project and the app owns (`routerLink` etc.):\n * - `<a card-list-action class=\"cli-chip cli-chip--view\" routerLink=\"/x\">View</a>`: the library draws it as the same eye icon button as `[viewButton]` (the word is not painted; the `aria-label` is the tooltip via `uiTooltip` and the accessible name) right of the title, next to the other icon actions. Any other projected `[card-list-action]` element (an icon `ui-button`...) is placed there too with a tooltip from its aria-label / title. Apps change nothing;\n * - `<a card-list-inline class=\"cli-inline-link\" routerLink=\"/x\">View ...</a>` at the end of the description line.\n * Other projected content (default slot) shows at the row end; `[card-stats]` and `[card-detail]` add a footer row\n * under the row (use the `.cli-stat`, `.cli-stat-label`, `.cli-stat-value`, `.cli-stat-divider` classes inside `[card-stats]`).\n *\n * Actions are ICONS, never text buttons: Edit, View, a generic action and Delete are small icon buttons to the right of the title (in that order), each with a tooltip\n * (the `uiTooltip` directive) that says what it is, so the icon alone is always clear on hover and keyboard focus. The tooltip text is also the accessible name.\n * - `[editButton]=\"true\"` -> `(editClick)`; `editAriaLabel` names it (\"Edit task Call John\"), default \"Edit\".\n * - `[viewButton]=\"true\"` -> `(viewClick)`; `viewAriaLabel`, default \"View\".\n * - `actionLabel=\"Download\"` -> `(action)`: the label is the tooltip and the accessible name (`actionAriaLabel` wins when given); `actionIcon` (the `d` of a 24x24 stroke path)\n * is its icon (a right arrow when none is given: always pass one); `actionTestId` sets its `data-testid`.\n * - `[deletable]=\"true\"` -> `(delete)`; `deleteLabel` names it (default \"Delete\"), `deleteTestId` sets its `data-testid`. The page owns the confirmation (the component never deletes anything itself).\n *\n * Accessibility: every icon is a real button with an accessible name; give it a longer one with `editAriaLabel` / `viewAriaLabel` / `deleteLabel`\n * (\"Edit task Call John\") to tell the rows of a list apart. The priority dot (`high`/`medium`/`low`) has a tooltip and an\n * accessible name (`High priority`, ...), is focusable so the tooltip works by keyboard; `blue`/`green` dots are decorative. The icon circle is decorative.\n */\n@Component({\n selector: 'ui-card-list-item',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [BadgeComponent, TooltipDirective],\n template: `\n @if (hasBadges()) {\n <div class=\"cli-badges\">\n @if (type()) { <ui-badge [label]=\"type()!\" [variant]=\"typeVariant()\" /> }\n @if (status() && statusVariant()) { <ui-badge [label]=\"status()!\" [variant]=\"statusVariant()!\" /> }\n </div>\n }\n <div class=\"cli-row\" [class.cli-row--badges]=\"hasBadges()\" [class.cli-row--badges-2]=\"hasBadges() && !!type() && !!status() && !!statusVariant()\">\n @if (iconPath(); as d) {\n <div class=\"cli-icon-circle\" [class]=\"'cli-icon-circle cli-icon-circle--' + icon()\" aria-hidden=\"true\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" focusable=\"false\"><path [attr.d]=\"d\" /></svg>\n </div>\n } @else if (indicator() !== 'none') {\n @if (indicatorLabel(); as label) {\n <div class=\"cli-dot\" [class]=\"'cli-dot cli-dot--' + indicator()\" [uiTooltip]=\"label\" tabindex=\"0\" role=\"img\" [attr.aria-label]=\"label\"></div>\n } @else {\n <div class=\"cli-dot\" [class]=\"'cli-dot cli-dot--' + indicator()\" aria-hidden=\"true\"></div>\n }\n }\n\n <div class=\"cli-body\">\n <div class=\"cli-title-row\">\n <span class=\"cli-title\">{{ title() }}</span>\n <span class=\"cli-title-actions\">\n @if (editButton()) {\n <button class=\"cli-icon-btn cli-icon-btn--edit\" type=\"button\" [attr.aria-label]=\"editAriaLabel() || labels.t('common.edit')\" [uiTooltip]=\"editAriaLabel() || labels.t('common.edit')\" (click)=\"editClick.emit()\">\n <svg width=\"13\" height=\"13\" 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]=\"editPath\" /></svg>\n </button>\n }\n @if (viewButton()) {\n <button class=\"cli-icon-btn cli-icon-btn--view\" type=\"button\" [attr.aria-label]=\"viewAriaLabel() || labels.t('common.view')\" [uiTooltip]=\"viewAriaLabel() || labels.t('common.view')\" (click)=\"viewClick.emit()\">\n <svg width=\"13\" height=\"13\" 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]=\"eyePath\" /></svg>\n </button>\n }\n @if (actionLabel()) {\n <button class=\"cli-icon-btn cli-icon-btn--action\" type=\"button\" [attr.data-testid]=\"actionTestId() || null\" [attr.aria-label]=\"actionAriaLabel() || actionLabel()\" [uiTooltip]=\"actionAriaLabel() || actionLabel()\" (click)=\"action.emit()\">\n <svg width=\"13\" height=\"13\" 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]=\"actionIcon() || actionFallbackPath\" /></svg>\n </button>\n }\n <ng-container #actionSlot />\n @if (deletable()) {\n <button class=\"cli-icon-btn cli-icon-btn--delete\" type=\"button\" [attr.data-testid]=\"deleteTestId() || null\" [attr.aria-label]=\"deleteLabel() || labels.t('common.delete')\" [uiTooltip]=\"deleteLabel() || labels.t('common.delete')\" (click)=\"delete.emit()\">\n <svg width=\"13\" height=\"13\" 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]=\"trashPath\" /></svg>\n </button>\n }\n </span>\n </div>\n <div class=\"cli-desc-row\">\n @if (description()) { <span class=\"cli-description\">{{ description() }}</span> }\n <ng-content select=\"[card-list-inline]\" />\n </div>\n @if (date()) {\n <span class=\"cli-date\">\n <svg width=\"11\" height=\"11\" 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]=\"calendarPath\" /></svg>\n {{ date() }}\n </span>\n }\n </div>\n\n <span class=\"cli-action-stage\" hidden #actionStage><ng-content select=\"[card-list-action]\" /></span>\n <ng-content />\n </div>\n <ng-content select=\"[card-stats]\" />\n <ng-content select=\"[card-detail]\" />\n `,\n styles: [`\n ui-card-list-item { position: relative; display: block; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; margin-bottom: 8px; }\n ui-card-list-item:last-child { margin-bottom: 0; }\n ui-card-list-item .cli-row { display: flex; align-items: flex-start; gap: 12px; padding: 13px 18px; transition: background 0.12s; }\n ui-card-list-item .cli-row:hover { background: #f8fafc; }\n @media (prefers-reduced-motion: reduce) { ui-card-list-item .cli-row { transition: none; } }\n\n ui-card-list-item .cli-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }\n ui-card-list-item .cli-dot:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }\n ui-card-list-item .cli-dot--high { background: #ef4444; }\n ui-card-list-item .cli-dot--medium { background: #f59e0b; }\n ui-card-list-item .cli-dot--low { background: #94a3b8; }\n ui-card-list-item .cli-dot--blue { background: #3b82f6; }\n ui-card-list-item .cli-dot--green { background: #22c55e; }\n\n ui-card-list-item .cli-icon-circle { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }\n ui-card-list-item .cli-icon-circle--call { background: #dbeafe; color: #2563eb; }\n ui-card-list-item .cli-icon-circle--email { background: #dcfce7; color: #16a34a; }\n ui-card-list-item .cli-icon-circle--sms { background: #fef9c3; color: #ca8a04; }\n ui-card-list-item .cli-icon-circle--task { background: #dbeafe; color: #2563eb; }\n ui-card-list-item .cli-icon-circle--doc { background: #ffedd5; color: #ea580c; }\n ui-card-list-item .cli-icon-circle--money { background: #d1fae5; color: #059669; }\n ui-card-list-item .cli-icon-circle--deal { background: #e0f2fe; color: #0284c7; }\n ui-card-list-item .cli-icon-circle--survey { background: #dbeafe; color: #2563eb; }\n ui-card-list-item .cli-icon-circle--property { background: #fef3c7; color: #d97706; }\n ui-card-list-item .cli-icon-circle--search { background: #e0f2fe; color: #0284c7; }\n ui-card-list-item .cli-icon-circle--heart { background: #fce7f3; color: #db2777; }\n ui-card-list-item .cli-icon-circle--calc { background: #d1fae5; color: #059669; }\n ui-card-list-item .cli-icon-circle--repeat { background: #e0f2fe; color: #0284c7; }\n\n ui-card-list-item .cli-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; overflow-wrap: anywhere; word-break: break-word; } /* word-break: Safari < 15.4 has no overflow-wrap: anywhere */\n /* The type / status badges always sit in the upper right corner of the card; the text keeps clear of them; the Edit / View / action / Delete icon buttons sit right of the title, and only a projected [card-list-action] link drops to the bottom right. */\n ui-card-list-item .cli-badges { position: absolute; top: 10px; right: 12px; display: flex; align-items: center; gap: 6px; z-index: 1; }\n ui-card-list-item .cli-row--badges .cli-body { padding-right: 96px; }\n ui-card-list-item .cli-row--badges-2 .cli-body { padding-right: 190px; }\n ui-card-list-item .cli-title-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }\n ui-card-list-item .cli-title { font-size: 0.875rem; font-weight: 600; color: #1e293b; }\n ui-card-list-item .cli-desc-row { display: flex; align-items: center; gap: 8px; }\n ui-card-list-item .cli-desc-row:empty { display: none; }\n ui-card-list-item .cli-description { font-size: 0.8125rem; color: #64748b; min-width: 0; }\n ui-card-list-item .cli-date { display: flex; align-items: center; gap: 4px; font-size: 0.75rem; color: #64748b; } /* #64748b: 4.76:1 on white (WCAG AA); the old #94a3b8 was 2.6:1 */\n\n /* Row-end chips: the built-in Edit / View buttons, and any projected link given the same classes. */\n ui-card-list-item .cli-chip {\n flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; align-self: center; box-sizing: border-box;\n font-family: inherit; font-size: 0.8rem; font-weight: 500; line-height: 1.4; background: none; cursor: pointer;\n padding: 4px 10px; border-radius: 6px; text-decoration: none; transition: background 0.15s, color 0.15s, border-color 0.15s;\n }\n ui-card-list-item .cli-chip--view { color: #2563eb; border: 1px solid #dbeafe; }\n ui-card-list-item .cli-chip--view:hover { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }\n /* Edit and Delete are small icon buttons to the right of the title (a 44px hit area on touch through ::after); the View / action chips stay at the row end. */\n ui-card-list-item .cli-title-actions { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }\n ui-card-list-item .cli-icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 26px; height: 26px; padding: 0; font-family: inherit; line-height: 1; background: none; cursor: pointer; border-radius: 6px; transition: background 0.15s, color 0.15s, border-color 0.15s; }\n ui-card-list-item .cli-icon-btn::after { content: ''; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }\n ui-card-list-item .cli-icon-btn--edit { color: #64748b; border: 1px solid #e2e8f0; }\n ui-card-list-item .cli-icon-btn--edit:hover { background: #f1f5f9; color: #1e293b; }\n ui-card-list-item .cli-icon-btn--view { color: #2563eb; border: 1px solid #dbeafe; }\n ui-card-list-item .cli-icon-btn--view:hover { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }\n ui-card-list-item .cli-icon-btn--action { color: #475569; border: 1px solid #e2e8f0; }\n ui-card-list-item .cli-icon-btn--action:hover { background: #f1f5f9; color: #1e293b; }\n ui-card-list-item .cli-icon-btn--delete { color: #b91c1c; border: 1px solid #fecaca; }\n ui-card-list-item .cli-icon-btn--delete:hover { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }\n /* Projected [card-list-action] elements are moved into .cli-action-wrap (right of the title, with a tooltip). A projected View chip (cli-chip--view) is drawn as the same eye icon button as the built-in View: its text stays in the DOM (screen readers read the aria-label) but is not painted. */\n ui-card-list-item .cli-action-wrap { display: inline-flex; align-items: center; }\n ui-card-list-item .cli-action-wrap .cli-chip--view { position: relative; justify-content: center; gap: 0; width: 26px; height: 26px; min-height: 0; padding: 0; font-size: 0; line-height: 0; border-radius: 6px; }\n ui-card-list-item .cli-action-wrap .cli-chip--view::before { content: ''; width: 13px; height: 13px; background: currentColor; -webkit-mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Cpath d='M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z'/%3E%3C/svg%3E\") center / contain no-repeat; mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Cpath d='M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z'/%3E%3C/svg%3E\") center / contain no-repeat; }\n ui-card-list-item .cli-action-wrap .cli-chip--view::after { content: ''; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }\n ui-card-list-item .cli-chip:focus-visible,\n ui-card-list-item .cli-icon-btn:focus-visible,\n ui-card-list-item .cli-inline-link:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }\n ui-card-list-item .cli-inline-link {\n flex-shrink: 0; margin-left: auto; display: inline-flex; align-items: center; gap: 4px;\n font-size: 0.8rem; font-weight: 500; color: #2563eb; text-decoration: none; transition: color 0.15s;\n }\n ui-card-list-item .cli-inline-link:hover { color: #1d4ed8; }\n @media (pointer: coarse), (max-width: 480px) {\n ui-card-list-item .cli-chip { min-height: 44px; padding: 4px 14px; } /* touch target */\n }\n /* Narrow rows (phones, 320px): the badges leave the corner and sit in a row above the text (so the text keeps its full width instead of\n 96-190px of padding), the row padding shrinks and the 44px chips wrap under the text instead of squeezing it. Declared after the touch rules above so it wins. */\n @media (max-width: 480px) {\n ui-card-list-item .cli-row { flex-wrap: wrap; gap: 8px 12px; padding: 12px; }\n ui-card-list-item .cli-body { flex: 1 1 160px; }\n ui-card-list-item .cli-badges { position: static; flex-wrap: wrap; padding: 10px 12px 0; }\n ui-card-list-item .cli-row--badges .cli-body, ui-card-list-item .cli-row--badges-2 .cli-body { padding-right: 0; }\n }\n\n ui-card-list-item [card-stats] { display: flex; align-items: stretch; background: #f8fafc; border-top: 1px solid #f1f5f9; }\n ui-card-list-item [card-detail] { background: #f8fafc; border-top: 1px solid #e2e8f0; }\n ui-card-list-item .cli-stat { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; }\n ui-card-list-item .cli-stat-label { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #64748b; }\n ui-card-list-item .cli-stat-value { font-size: 0.9375rem; font-weight: 600; color: #0f172a; }\n ui-card-list-item .cli-stat-divider { width: 1px; background: #e2e8f0; margin: 8px 0; }\n `],\n})\nexport class CardListItemComponent {\n protected readonly labels = inject(UiLabelsService);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n private readonly destroyRef = inject(DestroyRef);\n private readonly actionSlot = viewChild('actionSlot', { read: ViewContainerRef });\n private readonly actionStage = viewChild<ElementRef<HTMLElement>>('actionStage');\n private readonly wraps = new Map<HTMLElement, { ref: ComponentRef<CardListActionWrapComponent>; observer: MutationObserver }>();\n\n constructor() {\n // The app projects `[card-list-action]` links / buttons (it owns the router). They wait in a hidden stage, then each one is moved into a\n // tooltip wrapper placed right of the title, so every app gets icon actions with tooltips without changing a template. Elements the app\n // adds later (an @if turning true) are picked up by the observer; an element the app removes takes its wrapper with it.\n afterNextRender(() => {\n const stage = this.actionStage()?.nativeElement;\n if (!stage) return;\n const adopt = () => Array.from(stage.children).forEach(child => this.adopt(child as HTMLElement));\n adopt();\n const observer = new MutationObserver(adopt);\n observer.observe(stage, { childList: true });\n this.destroyRef.onDestroy(() => { observer.disconnect(); this.wraps.forEach(w => { w.observer.disconnect(); w.ref.destroy(); }); this.wraps.clear(); });\n });\n }\n\n /** The text a projected action is named by: its aria-label (or the host attribute of a `ui-button`), else its title, else its text. */\n private static actionLabelOf(el: HTMLElement): string {\n return (el.getAttribute('aria-label') || el.getAttribute('arialabel') || el.getAttribute('title') || el.textContent || '').trim();\n }\n\n private adopt(el: HTMLElement) {\n const slot = this.actionSlot();\n if (!slot || this.wraps.has(el)) return;\n const ref = slot.createComponent(CardListActionWrapComponent, { projectableNodes: [[el]] });\n const sync = () => ref.setInput('uiTooltip', CardListItemComponent.actionLabelOf(el));\n sync();\n const observer = new MutationObserver(records => {\n if (el.parentElement !== ref.location.nativeElement) { observer.disconnect(); this.wraps.delete(el); ref.destroy(); return; } // the app removed it\n if (records.some(r => r.type === 'attributes')) sync();\n });\n observer.observe(el, { attributes: true, attributeFilter: ['aria-label', 'arialabel', 'title'] });\n observer.observe(ref.location.nativeElement, { childList: true });\n this.wraps.set(el, { ref, observer });\n }\n readonly title = input('');\n readonly description = input<string | undefined>(undefined);\n /** Date text with a small calendar icon, e.g. \"Due Aug 21, 2026\". Pre-formatted by the page. */\n readonly date = input<string | undefined>(undefined);\n /** Badge after the title; `typeVariant` colours it (default `gray`). */\n readonly type = input<string | undefined>(undefined);\n readonly typeVariant = input<BadgeVariant>('gray');\n /** Second badge; shown only together with `statusVariant`. */\n readonly status = input<string | undefined>(undefined);\n readonly statusVariant = input<BadgeVariant | undefined>(undefined);\n /** Priority dot on the left (ignored when `icon` is set). */\n readonly indicator = input<CardListIndicator>('none');\n /** Round icon on the left (wins over `indicator`). */\n readonly icon = input<CardListIcon | undefined>(undefined);\n /** A type badge or a status badge (with its variant) shows: they sit in the card's upper right corner. */\n protected readonly hasBadges = computed(() => !!this.type() || (!!this.status() && !!this.statusVariant()));\n /** Built-in \"Edit\" chip button -> `editClick`. */\n readonly editButton = input(false);\n /** Built-in \"View\" chip button -> `viewClick`. */\n readonly viewButton = input(false);\n /** Accessible names for the buttons when the visible word is not enough (\"Edit task Call John\"). */\n readonly editAriaLabel = input('');\n readonly viewAriaLabel = input('');\n /** Built-in red chip (trash icon + the word Delete, like the Edit chip) -> `delete`. The accessible name comes from `deleteLabel` (\"Delete task Call John\"). */\n readonly deletable = input(false);\n readonly deleteLabelInput = input<string | null>(null, { alias: 'deleteLabel' });\n readonly deleteLabel = computed(() => this.deleteLabelInput() ?? this.labels.t('cardListItem.deleteLabel'));\n /** `data-testid` of the delete button (none when empty). */\n readonly deleteTestId = input('');\n /** Built-in secondary chip button (text = `actionLabel`, e.g. \"Download\") -> `action`; shown only while `actionLabel` is not empty. */\n readonly actionLabel = input('');\n /** Icon of the `actionLabel` chip: the `d` value of a 24x24 stroke path (like the Edit / View / delete chips, which always have one). Empty = no icon. */\n readonly actionIcon = input('');\n readonly actionTestId = input('');\n readonly actionAriaLabel = input('');\n readonly editClick = output<void>();\n readonly viewClick = output<void>();\n readonly delete = output<void>();\n readonly action = output<void>();\n\n protected readonly calendarPath = CALENDAR_PATH;\n protected readonly editPath = EDIT_PATH;\n protected readonly eyePath = EYE_PATH;\n protected readonly actionFallbackPath = ACTION_FALLBACK_PATH;\n protected readonly trashPath = TRASH_PATH;\n protected readonly iconPath = computed(() => { const i = this.icon(); return i ? ICON_PATHS[i] ?? null : null; });\n protected readonly indicatorLabel = computed(() => {\n const key = ({ high: 'cardListItem.priorityHigh', medium: 'cardListItem.priorityMedium', low: 'cardListItem.priorityLow' } as Record<string, UiLabelKey>)[this.indicator()];\n return key ? this.labels.t(key) : '';\n });\n}\n"],"mappings":";;;;;;AAYA,MA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,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,WAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,QAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,QAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"forgeroute-ui-card-list-item.mjs","names":[],"sources":["../../../projects/forgeroute-ui/card-list-item/src/lib/card-list-item/card-list-item.component.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, ViewEncapsulation, computed, input, output, inject, viewChild, ViewContainerRef, ElementRef, DestroyRef, afterNextRender, ComponentRef } from '@angular/core';\nimport { BadgeComponent } from '@forgeroute/ui/badge';\nimport { TooltipDirective } from '@forgeroute/ui/tooltip';\nimport { BadgeVariant } from '@forgeroute/ui/table-types';\nimport { UiLabelKey, UiLabelsService } from '@forgeroute/ui/core';\n\n/** Colour of the priority dot (`high` red, `medium` amber, `low` grey, `blue`, `green`); `none` = no dot. */\nexport type CardListIndicator = 'high' | 'medium' | 'low' | 'blue' | 'green' | 'none';\n/** Icon of the round marker on the left. */\nexport type CardListIcon = 'call' | 'email' | 'sms' | 'task' | 'doc' | 'money' | 'deal' | 'survey' | 'property' | 'search' | 'heart' | 'calc' | 'repeat';\n\n/** SVG path data (24x24 viewBox, stroke icons) of every `CardListIcon`. */\nconst ICON_PATHS: Record<CardListIcon, string> = {\n call: 'M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07A19.5 19.5 0 0 1 4.69 12a19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 3.6 1.27h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L7.91 8.91a16 16 0 0 0 6 6l1-1a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z',\n email: 'M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z M22 7l-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7',\n sms: 'M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z',\n task: 'M9 11l3 3L22 4 M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11',\n doc: 'M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z M14 2v6h6',\n money: 'M12 1v22 M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6',\n deal: 'M22 7l-8.5 8.5-5-5L2 17 M16 7h6v6',\n survey: 'M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2 M10 3h4a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z M9 12h6 M9 16h4',\n property: 'M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z M9 22V12h6v10',\n search: 'M11 3a8 8 0 1 0 0 16 8 8 0 0 0 0-16z M21 21l-4.35-4.35',\n heart: 'M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z',\n calc: 'M6 2h12a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z M8 6h8 M8 10h2 M14 10h2 M8 14h2 M14 14h2 M8 18h2 M14 18h2',\n repeat: 'M17 1l4 4-4 4 M3 11V9a4 4 0 0 1 4-4h14 M7 23l-4-4 4-4 M21 13v2a4 4 0 0 1-4 4H3',\n};\nconst CALENDAR_PATH = 'M5 4h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z M16 2v4 M8 2v4 M3 10h18';\nconst EDIT_PATH = 'M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7 M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z';\nconst ACTION_FALLBACK_PATH = 'M5 12h14 M12 5l7 7-7 7';\nconst EYE_PATH = 'M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z';\nconst TRASH_PATH = 'M3 6h18 M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2 M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6 M10 11v6 M14 11v6';\n\n/**\n * Internal: wraps ONE projected `[card-list-action]` element (a link or a button the app owns) so the library draws it as an icon right of the title\n * and gives it the `uiTooltip` bubble. Never used by apps.\n */\n@Component({\n selector: 'ui-card-list-action-wrap',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n hostDirectives: [{ directive: TooltipDirective, inputs: ['uiTooltip'] }],\n host: { class: 'cli-action-wrap' },\n template: `<ng-content />`,\n})\nexport class CardListActionWrapComponent {}\n\n/**\n * Record row for the cards of a detail page (tasks, documents, deals, expenses, matches, surveys...). The layout is fixed;\n * pass inputs only:\n *\n * [dot | round icon] [title] [edit] [view] [action] [delete] [type badge] [status badge]\n * [description] [inline link]\n * [calendar icon + date]\n *\n * Each row is a bordered rounded box, 8px apart; put the rows straight in a `ui-detail-card` body (or in a `ui-list` template).\n *\n * <ui-card-list-item title=\"Call John\" indicator=\"high\" type=\"Meeting\" status=\"Pending\" statusVariant=\"gray\"\n * date=\"Due Aug 21, 2026\" description=\"Follow up about the offer\"\n * [editButton]=\"true\" (editClick)=\"edit(t)\" [viewButton]=\"true\" (viewClick)=\"view(t)\" />\n *\n * Links: the library has no router, so a link is content you project and the app owns (`routerLink` etc.):\n * - `<a card-list-action class=\"cli-chip cli-chip--view\" routerLink=\"/x\">View</a>`: the library draws it as the same eye icon button as `[viewButton]` (the word is not painted; the `aria-label` is the tooltip via `uiTooltip` and the accessible name) right of the title, next to the other icon actions. Any other projected `[card-list-action]` element (an icon `ui-button`...) is placed there too with a tooltip from its aria-label / title. Apps change nothing;\n * - `<a card-list-inline class=\"cli-inline-link\" routerLink=\"/x\">View ...</a>` at the end of the description line.\n * Other projected content (default slot) shows at the row end; `[card-stats]` and `[card-detail]` add a footer row\n * under the row (use the `.cli-stat`, `.cli-stat-label`, `.cli-stat-value`, `.cli-stat-divider` classes inside `[card-stats]`).\n *\n * Actions are ICONS, never text buttons: Edit, View, a generic action and Delete are small icon buttons to the right of the title (in that order), each with a tooltip\n * (the `uiTooltip` directive) that says what it is, so the icon alone is always clear on hover and keyboard focus. The tooltip text is also the accessible name.\n * - `[editButton]=\"true\"` -> `(editClick)`; `editAriaLabel` names it (\"Edit task Call John\"), default \"Edit\".\n * - `[viewButton]=\"true\"` -> `(viewClick)`; `viewAriaLabel`, default \"View\".\n * - `actionLabel=\"Download\"` -> `(action)`: the label is the tooltip and the accessible name (`actionAriaLabel` wins when given); `actionIcon` (the `d` of a 24x24 stroke path)\n * is its icon (a right arrow when none is given: always pass one); `actionTestId` sets its `data-testid`.\n * - `[deletable]=\"true\"` -> `(delete)`; `deleteLabel` names it (default \"Delete\"), `deleteTestId` sets its `data-testid`. The page owns the confirmation (the component never deletes anything itself).\n *\n * Accessibility: every icon is a real button with an accessible name; give it a longer one with `editAriaLabel` / `viewAriaLabel` / `deleteLabel`\n * (\"Edit task Call John\") to tell the rows of a list apart. The priority dot (`high`/`medium`/`low`) has a tooltip and an\n * accessible name (`High priority`, ...), is focusable so the tooltip works by keyboard; `blue`/`green` dots are decorative. The icon circle is decorative.\n */\n@Component({\n selector: 'ui-card-list-item',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [BadgeComponent, TooltipDirective],\n template: `\n @if (hasBadges()) {\n <div class=\"cli-badges\">\n @if (type()) { <ui-badge [label]=\"type()!\" [variant]=\"typeVariant()\" /> }\n @if (status() && statusVariant()) { <ui-badge [label]=\"status()!\" [variant]=\"statusVariant()!\" /> }\n </div>\n }\n <div class=\"cli-row\" [class.cli-row--badges]=\"hasBadges()\" [class.cli-row--badges-2]=\"hasBadges() && !!type() && !!status() && !!statusVariant()\">\n @if (iconPath(); as d) {\n <div class=\"cli-icon-circle\" [class]=\"'cli-icon-circle cli-icon-circle--' + icon()\" aria-hidden=\"true\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" focusable=\"false\"><path [attr.d]=\"d\" /></svg>\n </div>\n } @else if (indicator() !== 'none') {\n @if (indicatorLabel(); as label) {\n <div class=\"cli-dot\" [class]=\"'cli-dot cli-dot--' + indicator()\" [uiTooltip]=\"label\" tabindex=\"0\" role=\"img\" [attr.aria-label]=\"label\"></div>\n } @else {\n <div class=\"cli-dot\" [class]=\"'cli-dot cli-dot--' + indicator()\" aria-hidden=\"true\"></div>\n }\n }\n\n <div class=\"cli-body\">\n <div class=\"cli-title-row\">\n <span class=\"cli-title\">{{ title() }}</span>\n <span class=\"cli-title-actions\">\n @if (editButton()) {\n <button class=\"cli-icon-btn cli-icon-btn--edit\" type=\"button\" [attr.aria-label]=\"editAriaLabel() || labels.t('common.edit')\" [uiTooltip]=\"editAriaLabel() || labels.t('common.edit')\" (click)=\"editClick.emit()\">\n <svg width=\"13\" height=\"13\" 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]=\"editPath\" /></svg>\n </button>\n }\n @if (viewButton()) {\n <button class=\"cli-icon-btn cli-icon-btn--view\" type=\"button\" [attr.aria-label]=\"viewAriaLabel() || labels.t('common.view')\" [uiTooltip]=\"viewAriaLabel() || labels.t('common.view')\" (click)=\"viewClick.emit()\">\n <svg width=\"13\" height=\"13\" 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]=\"eyePath\" /></svg>\n </button>\n }\n @if (actionLabel()) {\n <button class=\"cli-icon-btn cli-icon-btn--action\" type=\"button\" [style.color]=\"actionColor() || null\" [attr.data-testid]=\"actionTestId() || null\" [attr.aria-label]=\"actionAriaLabel() || actionLabel()\" [uiTooltip]=\"actionAriaLabel() || actionLabel()\" (click)=\"action.emit()\">\n <svg width=\"13\" height=\"13\" 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]=\"actionIcon() || actionFallbackPath\" /></svg>\n </button>\n }\n <ng-container #actionSlot />\n @if (deletable()) {\n <button class=\"cli-icon-btn cli-icon-btn--delete\" type=\"button\" [attr.data-testid]=\"deleteTestId() || null\" [attr.aria-label]=\"deleteLabel() || labels.t('common.delete')\" [uiTooltip]=\"deleteLabel() || labels.t('common.delete')\" (click)=\"delete.emit()\">\n <svg width=\"13\" height=\"13\" 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]=\"trashPath\" /></svg>\n </button>\n }\n </span>\n </div>\n <div class=\"cli-desc-row\">\n @if (description()) { <span class=\"cli-description\">{{ description() }}</span> }\n <ng-content select=\"[card-list-inline]\" />\n </div>\n @if (date()) {\n <span class=\"cli-date\">\n <svg width=\"11\" height=\"11\" 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]=\"calendarPath\" /></svg>\n {{ date() }}\n </span>\n }\n </div>\n\n <span class=\"cli-action-stage\" hidden #actionStage><ng-content select=\"[card-list-action]\" /></span>\n <ng-content />\n </div>\n <ng-content select=\"[card-stats]\" />\n <ng-content select=\"[card-detail]\" />\n `,\n styles: [`\n ui-card-list-item { position: relative; display: block; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; margin-bottom: 8px; }\n ui-card-list-item:last-child { margin-bottom: 0; }\n ui-card-list-item .cli-row { display: flex; align-items: flex-start; gap: 12px; padding: 13px 18px; transition: background 0.12s; }\n ui-card-list-item .cli-row:hover { background: #f8fafc; }\n @media (prefers-reduced-motion: reduce) { ui-card-list-item .cli-row { transition: none; } }\n\n ui-card-list-item .cli-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }\n ui-card-list-item .cli-dot:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }\n ui-card-list-item .cli-dot--high { background: #ef4444; }\n ui-card-list-item .cli-dot--medium { background: #f59e0b; }\n ui-card-list-item .cli-dot--low { background: #94a3b8; }\n ui-card-list-item .cli-dot--blue { background: #3b82f6; }\n ui-card-list-item .cli-dot--green { background: #22c55e; }\n\n ui-card-list-item .cli-icon-circle { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }\n ui-card-list-item .cli-icon-circle--call { background: #dbeafe; color: #2563eb; }\n ui-card-list-item .cli-icon-circle--email { background: #dcfce7; color: #16a34a; }\n ui-card-list-item .cli-icon-circle--sms { background: #fef9c3; color: #ca8a04; }\n ui-card-list-item .cli-icon-circle--task { background: #dbeafe; color: #2563eb; }\n ui-card-list-item .cli-icon-circle--doc { background: #ffedd5; color: #ea580c; }\n ui-card-list-item .cli-icon-circle--money { background: #d1fae5; color: #059669; }\n ui-card-list-item .cli-icon-circle--deal { background: #e0f2fe; color: #0284c7; }\n ui-card-list-item .cli-icon-circle--survey { background: #dbeafe; color: #2563eb; }\n ui-card-list-item .cli-icon-circle--property { background: #fef3c7; color: #d97706; }\n ui-card-list-item .cli-icon-circle--search { background: #e0f2fe; color: #0284c7; }\n ui-card-list-item .cli-icon-circle--heart { background: #fce7f3; color: #db2777; }\n ui-card-list-item .cli-icon-circle--calc { background: #d1fae5; color: #059669; }\n ui-card-list-item .cli-icon-circle--repeat { background: #e0f2fe; color: #0284c7; }\n\n ui-card-list-item .cli-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; overflow-wrap: anywhere; word-break: break-word; } /* word-break: Safari < 15.4 has no overflow-wrap: anywhere */\n /* The type / status badges always sit in the upper right corner of the card; the text keeps clear of them; the Edit / View / action / Delete icon buttons sit right of the title, and only a projected [card-list-action] link drops to the bottom right. */\n ui-card-list-item .cli-badges { position: absolute; top: 10px; right: 12px; display: flex; align-items: center; gap: 6px; z-index: 1; }\n ui-card-list-item .cli-row--badges .cli-body { padding-right: 96px; }\n ui-card-list-item .cli-row--badges-2 .cli-body { padding-right: 190px; }\n ui-card-list-item .cli-title-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }\n ui-card-list-item .cli-title { font-size: 0.875rem; font-weight: 600; color: #1e293b; }\n ui-card-list-item .cli-desc-row { display: flex; align-items: center; gap: 8px; }\n ui-card-list-item .cli-desc-row:empty { display: none; }\n ui-card-list-item .cli-description { font-size: 0.8125rem; color: #64748b; min-width: 0; }\n ui-card-list-item .cli-date { display: flex; align-items: center; gap: 4px; font-size: 0.75rem; color: #64748b; } /* #64748b: 4.76:1 on white (WCAG AA); the old #94a3b8 was 2.6:1 */\n\n /* Row-end chips: the built-in Edit / View buttons, and any projected link given the same classes. */\n ui-card-list-item .cli-chip {\n flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; align-self: center; box-sizing: border-box;\n font-family: inherit; font-size: 0.8rem; font-weight: 500; line-height: 1.4; background: none; cursor: pointer;\n padding: 4px 10px; border-radius: 6px; text-decoration: none; transition: background 0.15s, color 0.15s, border-color 0.15s;\n }\n ui-card-list-item .cli-chip--view { color: #2563eb; border: 1px solid #dbeafe; }\n ui-card-list-item .cli-chip--view:hover { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }\n /* Edit and Delete are small icon buttons to the right of the title (a 44px hit area on touch through ::after); the View / action chips stay at the row end. */\n ui-card-list-item .cli-title-actions { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }\n ui-card-list-item .cli-icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 26px; height: 26px; padding: 0; font-family: inherit; line-height: 1; background: none; cursor: pointer; border-radius: 6px; transition: background 0.15s, color 0.15s, border-color 0.15s; }\n ui-card-list-item .cli-icon-btn::after { content: ''; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }\n ui-card-list-item .cli-icon-btn--edit { color: #64748b; border: 1px solid #e2e8f0; }\n ui-card-list-item .cli-icon-btn--edit:hover { background: #f1f5f9; color: #1e293b; }\n ui-card-list-item .cli-icon-btn--view { color: #2563eb; border: 1px solid #dbeafe; }\n ui-card-list-item .cli-icon-btn--view:hover { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }\n ui-card-list-item .cli-icon-btn--action { color: #475569; border: 1px solid #e2e8f0; }\n ui-card-list-item .cli-icon-btn--action:hover { background: #f1f5f9; color: #1e293b; }\n ui-card-list-item .cli-icon-btn--delete { color: #b91c1c; border: 1px solid #fecaca; }\n ui-card-list-item .cli-icon-btn--delete:hover { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }\n /* Projected [card-list-action] elements are moved into .cli-action-wrap (right of the title, with a tooltip). A projected View chip (cli-chip--view) is drawn as the same eye icon button as the built-in View: its text stays in the DOM (screen readers read the aria-label) but is not painted. */\n ui-card-list-item .cli-action-wrap { display: inline-flex; align-items: center; }\n ui-card-list-item .cli-action-wrap .cli-chip--view { position: relative; justify-content: center; gap: 0; width: 26px; height: 26px; min-height: 0; padding: 0; font-size: 0; line-height: 0; border-radius: 6px; }\n ui-card-list-item .cli-action-wrap .cli-chip--view::before { content: ''; width: 13px; height: 13px; background: currentColor; -webkit-mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Cpath d='M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z'/%3E%3C/svg%3E\") center / contain no-repeat; mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Cpath d='M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6z'/%3E%3C/svg%3E\") center / contain no-repeat; }\n ui-card-list-item .cli-action-wrap .cli-chip--view::after { content: ''; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%); }\n ui-card-list-item .cli-chip:focus-visible,\n ui-card-list-item .cli-icon-btn:focus-visible,\n ui-card-list-item .cli-inline-link:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }\n ui-card-list-item .cli-inline-link {\n flex-shrink: 0; margin-left: auto; display: inline-flex; align-items: center; gap: 4px;\n font-size: 0.8rem; font-weight: 500; color: #2563eb; text-decoration: none; transition: color 0.15s;\n }\n ui-card-list-item .cli-inline-link:hover { color: #1d4ed8; }\n @media (pointer: coarse), (max-width: 480px) {\n ui-card-list-item .cli-chip { min-height: 44px; padding: 4px 14px; } /* touch target */\n }\n /* Narrow rows (phones, 320px): the badges leave the corner and sit in a row above the text (so the text keeps its full width instead of\n 96-190px of padding), the row padding shrinks and the 44px chips wrap under the text instead of squeezing it. Declared after the touch rules above so it wins. */\n @media (max-width: 480px) {\n ui-card-list-item .cli-row { flex-wrap: wrap; gap: 8px 12px; padding: 12px; }\n ui-card-list-item .cli-body { flex: 1 1 160px; }\n ui-card-list-item .cli-badges { position: static; flex-wrap: wrap; padding: 10px 12px 0; }\n ui-card-list-item .cli-row--badges .cli-body, ui-card-list-item .cli-row--badges-2 .cli-body { padding-right: 0; }\n }\n\n ui-card-list-item [card-stats] { display: flex; align-items: stretch; background: #f8fafc; border-top: 1px solid #f1f5f9; }\n ui-card-list-item [card-detail] { background: #f8fafc; border-top: 1px solid #e2e8f0; }\n ui-card-list-item .cli-stat { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; }\n ui-card-list-item .cli-stat-label { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #64748b; }\n ui-card-list-item .cli-stat-value { font-size: 0.9375rem; font-weight: 600; color: #0f172a; }\n ui-card-list-item .cli-stat-divider { width: 1px; background: #e2e8f0; margin: 8px 0; }\n `],\n})\nexport class CardListItemComponent {\n protected readonly labels = inject(UiLabelsService);\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n private readonly destroyRef = inject(DestroyRef);\n private readonly actionSlot = viewChild('actionSlot', { read: ViewContainerRef });\n private readonly actionStage = viewChild<ElementRef<HTMLElement>>('actionStage');\n private readonly wraps = new Map<HTMLElement, { ref: ComponentRef<CardListActionWrapComponent>; observer: MutationObserver }>();\n\n constructor() {\n // The app projects `[card-list-action]` links / buttons (it owns the router). They wait in a hidden stage, then each one is moved into a\n // tooltip wrapper placed right of the title, so every app gets icon actions with tooltips without changing a template. Elements the app\n // adds later (an @if turning true) are picked up by the observer; an element the app removes takes its wrapper with it.\n afterNextRender(() => {\n const stage = this.actionStage()?.nativeElement;\n if (!stage) return;\n const adopt = () => Array.from(stage.children).forEach(child => this.adopt(child as HTMLElement));\n adopt();\n const observer = new MutationObserver(adopt);\n observer.observe(stage, { childList: true });\n this.destroyRef.onDestroy(() => { observer.disconnect(); this.wraps.forEach(w => { w.observer.disconnect(); w.ref.destroy(); }); this.wraps.clear(); });\n });\n }\n\n /** The text a projected action is named by: its aria-label (or the host attribute of a `ui-button`), else its title, else its text. */\n private static actionLabelOf(el: HTMLElement): string {\n return (el.getAttribute('aria-label') || el.getAttribute('arialabel') || el.getAttribute('title') || el.textContent || '').trim();\n }\n\n private adopt(el: HTMLElement) {\n const slot = this.actionSlot();\n if (!slot || this.wraps.has(el)) return;\n const ref = slot.createComponent(CardListActionWrapComponent, { projectableNodes: [[el]] });\n const sync = () => ref.setInput('uiTooltip', CardListItemComponent.actionLabelOf(el));\n sync();\n const observer = new MutationObserver(records => {\n if (el.parentElement !== ref.location.nativeElement) { observer.disconnect(); this.wraps.delete(el); ref.destroy(); return; } // the app removed it\n if (records.some(r => r.type === 'attributes')) sync();\n });\n observer.observe(el, { attributes: true, attributeFilter: ['aria-label', 'arialabel', 'title'] });\n observer.observe(ref.location.nativeElement, { childList: true });\n this.wraps.set(el, { ref, observer });\n }\n readonly title = input('');\n readonly description = input<string | undefined>(undefined);\n /** Date text with a small calendar icon, e.g. \"Due Aug 21, 2026\". Pre-formatted by the page. */\n readonly date = input<string | undefined>(undefined);\n /** Badge after the title; `typeVariant` colours it (default `gray`). */\n readonly type = input<string | undefined>(undefined);\n readonly typeVariant = input<BadgeVariant>('gray');\n /** Second badge; shown only together with `statusVariant`. */\n readonly status = input<string | undefined>(undefined);\n readonly statusVariant = input<BadgeVariant | undefined>(undefined);\n /** Priority dot on the left (ignored when `icon` is set). */\n readonly indicator = input<CardListIndicator>('none');\n /** Round icon on the left (wins over `indicator`). */\n readonly icon = input<CardListIcon | undefined>(undefined);\n /** A type badge or a status badge (with its variant) shows: they sit in the card's upper right corner. */\n protected readonly hasBadges = computed(() => !!this.type() || (!!this.status() && !!this.statusVariant()));\n /** Built-in \"Edit\" chip button -> `editClick`. */\n readonly editButton = input(false);\n /** Built-in \"View\" chip button -> `viewClick`. */\n readonly viewButton = input(false);\n /** Accessible names for the buttons when the visible word is not enough (\"Edit task Call John\"). */\n readonly editAriaLabel = input('');\n readonly viewAriaLabel = input('');\n /** Built-in red chip (trash icon + the word Delete, like the Edit chip) -> `delete`. The accessible name comes from `deleteLabel` (\"Delete task Call John\"). */\n readonly deletable = input(false);\n readonly deleteLabelInput = input<string | null>(null, { alias: 'deleteLabel' });\n readonly deleteLabel = computed(() => this.deleteLabelInput() ?? this.labels.t('cardListItem.deleteLabel'));\n /** `data-testid` of the delete button (none when empty). */\n readonly deleteTestId = input('');\n /** Built-in secondary chip button (text = `actionLabel`, e.g. \"Download\") -> `action`; shown only while `actionLabel` is not empty. */\n readonly actionLabel = input('');\n /** Icon of the `actionLabel` chip: the `d` value of a 24x24 stroke path (like the Edit / View / delete chips, which always have one). Empty = no icon. */\n readonly actionIcon = input('');\n readonly actionTestId = input('');\n /** Colour of the `actionLabel` icon (any CSS colour, e.g. `#16a34a` for a \"Mark done\" tick); empty = the standard slate. */\n readonly actionColor = input('');\n readonly actionAriaLabel = input('');\n readonly editClick = output<void>();\n readonly viewClick = output<void>();\n readonly delete = output<void>();\n readonly action = output<void>();\n\n protected readonly calendarPath = CALENDAR_PATH;\n protected readonly editPath = EDIT_PATH;\n protected readonly eyePath = EYE_PATH;\n protected readonly actionFallbackPath = ACTION_FALLBACK_PATH;\n protected readonly trashPath = TRASH_PATH;\n protected readonly iconPath = computed(() => { const i = this.icon(); return i ? ICON_PATHS[i] ?? null : null; });\n protected readonly indicatorLabel = computed(() => {\n const key = ({ high: 'cardListItem.priorityHigh', medium: 'cardListItem.priorityMedium', low: 'cardListItem.priorityLow' } as Record<string, UiLabelKey>)[this.indicator()];\n return key ? this.labels.t(key) : '';\n });\n}\n"],"mappings":";;;;;;AAYA,MAAM,aAA2C;CAC/C,MAAM;CACN,OAAO;CACP,KAAK;CACL,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,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,iBAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,WAAA;EAAA,CAAA;EAAA,WAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,WAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,QAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,QAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { ApplicationRef, ChangeDetectionStrategy, Component, ElementRef, EnvironmentInjector, Injectable, InjectionToken, Injector, Input, PLATFORM_ID, Renderer2, afterNextRender, computed, createComponent, effect, forwardRef, inject, input, isDevMode, makeEnvironmentProviders, output, provideAppInitializer, signal, untracked, viewChild } from "@angular/core";
|
|
2
|
+
import { ApplicationRef, ChangeDetectionStrategy, Component, DestroyRef, ElementRef, EnvironmentInjector, Injectable, InjectionToken, Injector, Input, PLATFORM_ID, Renderer2, afterNextRender, computed, createComponent, effect, forwardRef, inject, input, isDevMode, makeEnvironmentProviders, output, provideAppInitializer, signal, untracked, viewChild } from "@angular/core";
|
|
3
3
|
import { HttpErrorResponse } from "@angular/common/http";
|
|
4
4
|
import { Subject, catchError, throwError } from "rxjs";
|
|
5
5
|
import { DATE_PIPE_DEFAULT_OPTIONS, DATE_PIPE_DEFAULT_TIMEZONE, DOCUMENT, NgTemplateOutlet, formatDate, isPlatformBrowser } from "@angular/common";
|
|
@@ -3428,23 +3428,53 @@ function maxLengthIssue(text, max) {
|
|
|
3428
3428
|
const UI_FIELD_REVEAL_HOST = new InjectionToken("UI_FIELD_REVEAL_HOST");
|
|
3429
3429
|
function createFieldReveal(showErrors) {
|
|
3430
3430
|
const touched = signal(false, ...ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []);
|
|
3431
|
+
const element = inject(ElementRef, { optional: true })?.nativeElement;
|
|
3432
|
+
const hasHost = !!element && typeof element.addEventListener === "function";
|
|
3433
|
+
const interacted = signal(!hasHost, ...ngDevMode ? [{ debugName: "interacted" }] : /* istanbul ignore next */ []);
|
|
3434
|
+
if (hasHost) {
|
|
3435
|
+
const mark = () => interacted.set(true);
|
|
3436
|
+
const key = (e) => {
|
|
3437
|
+
if (e.key !== "Escape") interacted.set(true);
|
|
3438
|
+
};
|
|
3439
|
+
element.addEventListener("pointerdown", mark, true);
|
|
3440
|
+
element.addEventListener("mousedown", mark, true);
|
|
3441
|
+
element.addEventListener("touchstart", mark, true);
|
|
3442
|
+
element.addEventListener("click", mark, true);
|
|
3443
|
+
element.addEventListener("input", mark, true);
|
|
3444
|
+
element.addEventListener("change", mark, true);
|
|
3445
|
+
element.addEventListener("keydown", key, true);
|
|
3446
|
+
inject(DestroyRef).onDestroy(() => {
|
|
3447
|
+
element.removeEventListener("pointerdown", mark, true);
|
|
3448
|
+
element.removeEventListener("mousedown", mark, true);
|
|
3449
|
+
element.removeEventListener("touchstart", mark, true);
|
|
3450
|
+
element.removeEventListener("click", mark, true);
|
|
3451
|
+
element.removeEventListener("input", mark, true);
|
|
3452
|
+
element.removeEventListener("change", mark, true);
|
|
3453
|
+
element.removeEventListener("keydown", key, true);
|
|
3454
|
+
});
|
|
3455
|
+
}
|
|
3456
|
+
const forget = () => {
|
|
3457
|
+
touched.set(false);
|
|
3458
|
+
if (hasHost) interacted.set(false);
|
|
3459
|
+
};
|
|
3431
3460
|
const host = inject(UI_FIELD_REVEAL_HOST, { optional: true });
|
|
3432
3461
|
let previous = false;
|
|
3433
3462
|
effect(() => {
|
|
3434
3463
|
const show = showErrors();
|
|
3435
|
-
if (previous && !show)
|
|
3464
|
+
if (previous && !show) forget();
|
|
3436
3465
|
previous = show;
|
|
3437
3466
|
});
|
|
3438
3467
|
let hostOpen = null;
|
|
3439
3468
|
effect(() => {
|
|
3440
3469
|
if (!host) return;
|
|
3441
3470
|
const open = host.open();
|
|
3442
|
-
if (hostOpen !== null && open !== hostOpen)
|
|
3471
|
+
if (hostOpen !== null && open !== hostOpen) forget();
|
|
3443
3472
|
hostOpen = open;
|
|
3444
3473
|
});
|
|
3445
3474
|
return {
|
|
3446
3475
|
touched,
|
|
3447
|
-
|
|
3476
|
+
interacted,
|
|
3477
|
+
revealed: computed(() => touched() && interacted() || showErrors())
|
|
3448
3478
|
};
|
|
3449
3479
|
}
|
|
3450
3480
|
const isEnglishLocale = (locale) => {
|