@4sh/ui-kit 0.13.0 → 0.14.0
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/4sh-ui-kit-actions-ui-button-split.mjs +2 -2
- package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +26 -2
- package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +6 -0
- package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs +14 -0
- package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +7 -0
- package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs +2 -0
- package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +6 -0
- package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +101 -10
- package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
- package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +3 -0
- package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
- package/mcp/data/component-api.json +11710 -0
- package/mcp/data/text-search-docs.json +76 -66
- package/mcp/data/ui-config.json +6457 -5
- package/mcp/index.js +24 -2
- package/mcp/package.json +1 -1
- package/package.json +1 -1
- package/styles/component-vars.scss +6 -1
- package/types/4sh-ui-kit-actions-ui-button.d.ts +24 -0
- package/types/4sh-ui-kit-actions-ui-link.d.ts +6 -0
- package/types/4sh-ui-kit-base-ui-image.d.ts +14 -0
- package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +7 -0
- package/types/4sh-ui-kit-forms-ui-input-date.d.ts +2 -0
- package/types/4sh-ui-kit-informative-ui-badge.d.ts +6 -0
- package/types/4sh-ui-kit-navigation-ui-stepper.d.ts +42 -3
- package/types/4sh-ui-kit-table-ui-paginator.d.ts +3 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4sh-ui-kit-actions-ui-button.mjs","sources":["../../../projects/ui-kit/actions/ui-button/src/lib/ui-button.ts","../../../projects/ui-kit/actions/ui-button/src/lib/ui-button.html","../../../projects/ui-kit/actions/ui-button/src/public-api.ts","../../../projects/ui-kit/actions/ui-button/src/4sh-ui-kit-actions-ui-button.ts"],"sourcesContent":["import {\n afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n Component,\n computed,\n effect,\n ElementRef,\n input,\n isDevMode,\n output,\n signal,\n TemplateRef,\n viewChild,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink } from '@angular/router';\nimport { UiLevel } from '@4sh/ui-kit/types';\nimport { UiIcon } from '@4sh/ui-kit/base/ui-icon';\n\nexport type ButtonType = 'button' | 'submit' | 'reset';\nexport type ButtonSize = 'default' | 'small';\nexport type ButtonVariant = 'filled' | 'outlined' | 'ghost';\n/** Luminosité du fond sur lequel le bouton est posé (voir l'input `onColor`). */\nexport type ButtonOnColor = 'dark' | 'light';\nexport type ButtonIconPos = 'left' | 'right' | 'top' | 'bottom';\nexport type ButtonNativeProps = Record<string, string | number | boolean | null | undefined>;\n\n@Component({\n selector: 'ui-button',\n imports: [UiIcon, NgTemplateOutlet, RouterLink],\n templateUrl: './ui-button.html',\n styleUrl: './ui-button.scss',\n host: {\n '[style.display]': \"expanded() ? 'flex' : 'inline-flex'\",\n '[style.width]': \"expanded() ? '100%' : null\",\n },\n})\nexport class UiButton {\n label = input<string>();\n ariaLabel = input<string>();\n type = input<ButtonType>('button');\n level = input<UiLevel>('high');\n variant = input<ButtonVariant>('filled');\n /**\n * À renseigner **uniquement** quand le bouton est posé sur un fond de couleur\n * (bandeau, carte teintée, image) : indique la luminosité de ce fond, et le\n * bouton épingle son chrome en conséquence — `'dark'` ⇒ blanc, `'light'` ⇒\n * sombre. Orthogonal à `level` et `variant`. Volontairement **insensible au\n * thème** : un bandeau violet reste violet en clair comme en sombre.\n */\n onColor = input<ButtonOnColor | null>(null);\n size = input<ButtonSize>('default');\n icon = input<string>();\n iconPos = input<ButtonIconPos>('left');\n iconOnly = input(false, { transform: booleanAttribute });\n loading = input(false, { transform: booleanAttribute });\n loadingIcon = input<string>('circle-notch');\n expanded = input(false, { transform: booleanAttribute });\n rounded = input(false, { transform: booleanAttribute });\n disabled = input(false, { transform: booleanAttribute });\n /** Ripple Effect */\n ripple = input(true, { transform: booleanAttribute });\n tabindex = input<number>();\n buttonProps = input<ButtonNativeProps>();\n iconTemplate = input<TemplateRef<unknown>>();\n loadingIconTemplate = input<TemplateRef<unknown>>();\n\n // --- Link mode (polymorphic host) ------------------------------------\n // When `href` or `routerLink` is set, the host renders a real <a> styled\n // as a button — preserving native anchor behavior (Cmd/Ctrl+click, middle\n // click, \"open/copy link\"…). No JS-router navigation in a click handler.\n /** External / plain URL. Presence switches the host to an <a>. */\n href = input<string>();\n /** Angular router target. Presence switches the host to an <a> (RouterLink). */\n routerLink = input<string | unknown[]>();\n /** Anchor target (e.g. \"_blank\"). Only applies in link mode. */\n target = input<string>();\n /** Anchor rel. Defaults to \"noopener noreferrer\" when target=\"_blank\". */\n rel = input<string>();\n\n /** Triggered on click (never if disabled or loading). */\n buttonClick = output<MouseEvent>();\n /** Fired when the button receives focus. */\n buttonFocus = output<FocusEvent>();\n /** Fired when the button loses focus. */\n buttonBlur = output<FocusEvent>();\n\n /** @ignore Host element (either the <button> or the <a>). */\n private readonly hostEl = viewChild.required<ElementRef<HTMLElement>>('host');\n /** @ignore */\n private readonly contentWrap = viewChild<ElementRef<HTMLElement>>('contentWrap');\n /** @ignore Content actually rendered via <ng-content> (detected after rendering). */\n private readonly hasProjectedContent = signal(false);\n\n constructor() {\n // Detection of rendered content (<ng-content>) — SSR-safe (browser only).\n afterNextRender(() => {\n const el = this.contentWrap()?.nativeElement;\n const has =\n !!el &&\n Array.from(el.childNodes).some(\n (n) =>\n n.nodeType === Node.ELEMENT_NODE ||\n (n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim()),\n );\n this.hasProjectedContent.set(has);\n });\n\n // Pass additional native attributes (buttonProps) to the host element.\n afterRenderEffect(() => {\n const props = this.buttonProps();\n if (!props) return;\n const el = this.hostEl().nativeElement;\n for (const [key, value] of Object.entries(props)) {\n if (value === null || value === undefined || value === false) {\n el.removeAttribute(key);\n } else {\n el.setAttribute(key, value === true ? '' : String(value));\n }\n }\n });\n\n // A11y safeguard: An icon-only button must have an accessible name.\n if (isDevMode()) {\n effect(() => {\n if (this.isIconOnly() && !this.accessibleLabel()) {\n console.warn(\n '[ui-button] Icon-only button has no accessible name: provide `ariaLabel` (or `label`).',\n );\n }\n });\n }\n }\n\n /** @ignore */\n protected readonly iconSize = computed(() => (this.size() === 'small' ? 'sm' : 'default'));\n\n /** @ignore An icon (or its template) is available. */\n protected readonly hasIcon = computed(() => !!this.icon() || !!this.iconTemplate());\n\n /** @ignore Visible text content (label or displayed content). */\n protected readonly hasVisibleText = computed(() => !!this.label() || this.hasProjectedContent());\n\n /** @ignore The icon appears before the content (left/top) or after it (right/bottom). */\n protected readonly iconBefore = computed(() => {\n const pos = this.iconPos();\n return pos === 'left' || pos === 'top';\n });\n\n /** @ignore Icon-only mode: forced, or inferred (icon only, with no visible text). */\n protected readonly isIconOnly = computed(() => {\n if (this.iconOnly()) return true;\n const pos = this.iconPos();\n if (pos === 'top' || pos === 'bottom') return false;\n return !this.hasVisibleText() && this.hasIcon();\n });\n\n /** @ignore Accessible name: explicit; otherwise, the label is hidden as “icon-only”; otherwise, the text is visible. */\n protected readonly accessibleLabel = computed(() => {\n if (this.ariaLabel()) return this.ariaLabel()!;\n if (this.isIconOnly()) return this.label() ?? null;\n return null;\n });\n\n /** @ignore Host renders an <a> (a URL or a router target was provided). */\n protected readonly isLink = computed(() => !!this.href() || this.routerLink() != null);\n\n /** @ignore Link mode uses the Angular RouterLink directive. */\n protected readonly useRouterLink = computed(() => this.routerLink() != null);\n\n /** @ignore Anchor rel: explicit, or a safe default for target=\"_blank\". */\n protected readonly computedRel = computed(() => {\n if (this.rel()) return this.rel()!;\n if (this.target() === '_blank') return 'noopener noreferrer';\n return null;\n });\n\n /** @ignore Anchor tabindex: -1 when disabled (an <a> has no native disabled). */\n protected readonly linkTabindex = computed(() =>\n this.disabled() ? -1 : (this.tabindex() ?? null),\n );\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-button', `_${this.level()}`];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (this.variant() !== 'filled') c.push(`_${this.variant()}`);\n if (this.onColor()) c.push(`_on-${this.onColor()}`);\n if (this.expanded()) c.push('_expanded');\n if (this.rounded()) c.push('_rounded');\n if (this.isIconOnly()) c.push('_icon-only');\n if (this.loading()) c.push('_loading');\n if (this.isLink() && this.disabled()) c.push('_disabled');\n const pos = this.iconPos();\n if (pos === 'top') c.push('_icon-top');\n else if (pos === 'bottom') c.push('_icon-bottom');\n return c.join(' ');\n });\n\n /** Sets the focus on the button (useful for controlling focus programmatically). */\n focus(options?: FocusOptions): void {\n this.hostEl().nativeElement.focus(options);\n }\n\n /** @ignore */\n protected onClick(event: MouseEvent): void {\n if (this.disabled() || this.loading()) {\n event.preventDefault();\n return;\n }\n this.buttonClick.emit(event);\n }\n}\n","@if (isLink()) {\n @if (useRouterLink()) {\n <a\n #host\n [class]=\"classes()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"computedRel()\"\n [attr.tabindex]=\"linkTabindex()\"\n [attr.role]=\"'button'\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n (click)=\"onClick($event)\"\n (focus)=\"buttonFocus.emit($event)\"\n (blur)=\"buttonBlur.emit($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </a>\n } @else {\n <a\n #host\n [class]=\"classes()\"\n [attr.href]=\"disabled() ? null : href()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"computedRel()\"\n [attr.tabindex]=\"linkTabindex()\"\n [attr.role]=\"'button'\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n (click)=\"onClick($event)\"\n (focus)=\"buttonFocus.emit($event)\"\n (blur)=\"buttonBlur.emit($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </a>\n }\n} @else {\n <button\n #host\n [class]=\"classes()\"\n [type]=\"type()\"\n [disabled]=\"disabled() || loading()\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n (click)=\"onClick($event)\"\n (focus)=\"buttonFocus.emit($event)\"\n (blur)=\"buttonBlur.emit($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </button>\n}\n\n<ng-template #inner>\n @if (iconBefore()) {\n <ng-container [ngTemplateOutlet]=\"iconSlot\" />\n }\n\n <!-- Always rendered: `hasProjectedContent` is detected from this very element, so gating it on\n `isIconOnly()` (which itself derives from that detection) made projected-only content\n undetectable — and silently dropped. Collapsed by `.ui-button-content:empty` when unused. -->\n <span class=\"ui-button-content\" #contentWrap>\n @if (label() && !isIconOnly()) {\n <span class=\"ui-button-label\">{{ label() }}</span>\n }\n <ng-content />\n </span>\n\n @if (!iconBefore()) {\n <ng-container [ngTemplateOutlet]=\"iconSlot\" />\n }\n</ng-template>\n\n<ng-template #iconSlot>\n @if (loading()) {\n @if (loadingIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <i\n class=\"ui-button-icon ui-button-icon-loading fa-solid fa-{{ loadingIcon() }} fa-spin\"\n aria-hidden=\"true\"\n ></i>\n }\n } @else if (iconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else if (icon()) {\n <ui-icon class=\"ui-button-icon\" [name]=\"icon()!\" [size]=\"iconSize()\" />\n }\n</ng-template>\n","/*\n * Public API Surface of ui-kit/ui-button\n */\n\nexport * from './lib/ui-button';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAsCa,QAAQ,CAAA;AAyDnB,IAAA,WAAA,GAAA;AAxDA,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK;6FAAU;AACvB,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK;iGAAU;QAC3B,IAAA,CAAA,IAAI,GAAG,KAAK,CAAa,QAAQ;iFAAC;QAClC,IAAA,CAAA,KAAK,GAAG,KAAK,CAAU,MAAM;kFAAC;QAC9B,IAAA,CAAA,OAAO,GAAG,KAAK,CAAgB,QAAQ;oFAAC;AACxC;;;;;;AAMG;QACH,IAAA,CAAA,OAAO,GAAG,KAAK,CAAuB,IAAI;oFAAC;QAC3C,IAAA,CAAA,IAAI,GAAG,KAAK,CAAa,SAAS;iFAAC;AACnC,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK;4FAAU;QACtB,IAAA,CAAA,OAAO,GAAG,KAAK,CAAgB,MAAM;oFAAC;QACtC,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;QACxD,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,KAAK,+EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;QACvD,IAAA,CAAA,WAAW,GAAG,KAAK,CAAS,cAAc;wFAAC;QAC3C,IAAA,CAAA,QAA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AAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,QAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,GAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,KAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,MAAM,qEAEV,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE3FjF;;AAEG;;ACFH;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"4sh-ui-kit-actions-ui-button.mjs","sources":["../../../projects/ui-kit/actions/ui-button/src/lib/ui-button.ts","../../../projects/ui-kit/actions/ui-button/src/lib/ui-button.html","../../../projects/ui-kit/actions/ui-button/src/public-api.ts","../../../projects/ui-kit/actions/ui-button/src/4sh-ui-kit-actions-ui-button.ts"],"sourcesContent":["import {\n afterNextRender,\n afterRenderEffect,\n booleanAttribute,\n Component,\n computed,\n effect,\n ElementRef,\n input,\n isDevMode,\n output,\n signal,\n TemplateRef,\n viewChild,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink } from '@angular/router';\nimport { UiLevel } from '@4sh/ui-kit/types';\nimport { UiIcon } from '@4sh/ui-kit/base/ui-icon';\n\nexport type ButtonType = 'button' | 'submit' | 'reset';\nexport type ButtonSize = 'default' | 'small';\nexport type ButtonVariant = 'filled' | 'outlined' | 'ghost';\n/** Luminosité du fond sur lequel le bouton est posé (voir l'input `onColor`). */\nexport type ButtonOnColor = 'dark' | 'light';\nexport type ButtonIconPos = 'left' | 'right' | 'top' | 'bottom';\nexport type ButtonNativeProps = Record<string, string | number | boolean | null | undefined>;\n\n@Component({\n selector: 'ui-button',\n imports: [UiIcon, NgTemplateOutlet, RouterLink],\n templateUrl: './ui-button.html',\n styleUrl: './ui-button.scss',\n host: {\n '[style.display]': \"expanded() ? 'flex' : 'inline-flex'\",\n '[style.width]': \"expanded() ? '100%' : null\",\n },\n})\nexport class UiButton {\n /** Button text. Absent: icon-only button, or content projected through `<ng-content>`. */\n label = input<string>();\n /** Accessible name. Required in icon-only mode; falls back to `label` otherwise. */\n ariaLabel = input<string>();\n /** Native `type` of the `<button>`. */\n type = input<ButtonType>('button');\n /**\n * Semantic level: `high`/`low` for importance, `success`/`warning`/`error` for contextual\n * feedback.\n */\n level = input<UiLevel>('high');\n /**\n * Appearance: `filled` (solid), `outlined` (border) or `ghost` (text only). Composes with `level`\n * and `onColor`.\n */\n variant = input<ButtonVariant>('filled');\n /**\n * À renseigner **uniquement** quand le bouton est posé sur un fond de couleur\n * (bandeau, carte teintée, image) : indique la luminosité de ce fond, et le\n * bouton épingle son chrome en conséquence — `'dark'` ⇒ blanc, `'light'` ⇒\n * sombre. Orthogonal à `level` et `variant`. Volontairement **insensible au\n * thème** : un bandeau violet reste violet en clair comme en sombre.\n */\n onColor = input<ButtonOnColor | null>(null);\n /** Button size. */\n size = input<ButtonSize>('default');\n /** FontAwesome icon name (e.g. `check`, `arrow-right`). */\n icon = input<string>();\n /** Icon position relative to the content. */\n iconPos = input<ButtonIconPos>('left');\n /** Forces the square icon-only style even when there is content. */\n iconOnly = input(false, { transform: booleanAttribute });\n /** Loading state: shows a spinner and disables the button. */\n loading = input(false, { transform: booleanAttribute });\n /** FontAwesome icon of the loading spinner (spun with `fa-spin`). */\n loadingIcon = input<string>('circle-notch');\n /** Full width (100%). */\n expanded = input(false, { transform: booleanAttribute });\n /** Pill shape (fully rounded corners). */\n rounded = input(false, { transform: booleanAttribute });\n /** Disables the button (native attribute). */\n disabled = input(false, { transform: booleanAttribute });\n /** Ripple Effect */\n ripple = input(true, { transform: booleanAttribute });\n /** Native `tabindex` of the button. */\n tabindex = input<number>();\n /** Extra native attributes forwarded to the `<button>` (e.g. `{ form: 'login', value: '1' }`). */\n buttonProps = input<ButtonNativeProps>();\n /** Custom icon template (replaces `icon`). */\n iconTemplate = input<TemplateRef<unknown>>();\n /** Custom loading icon template (replaces `loadingIcon`). */\n loadingIconTemplate = input<TemplateRef<unknown>>();\n\n // --- Link mode (polymorphic host) ------------------------------------\n // When `href` or `routerLink` is set, the host renders a real <a> styled\n // as a button — preserving native anchor behavior (Cmd/Ctrl+click, middle\n // click, \"open/copy link\"…). No JS-router navigation in a click handler.\n /** External / plain URL. Presence switches the host to an <a>. */\n href = input<string>();\n /** Angular router target. Presence switches the host to an <a> (RouterLink). */\n routerLink = input<string | unknown[]>();\n /** Anchor target (e.g. \"_blank\"). Only applies in link mode. */\n target = input<string>();\n /** Anchor rel. Defaults to \"noopener noreferrer\" when target=\"_blank\". */\n rel = input<string>();\n\n /** Triggered on click (never if disabled or loading). */\n buttonClick = output<MouseEvent>();\n /** Fired when the button receives focus. */\n buttonFocus = output<FocusEvent>();\n /** Fired when the button loses focus. */\n buttonBlur = output<FocusEvent>();\n\n /** @ignore Host element (either the <button> or the <a>). */\n private readonly hostEl = viewChild.required<ElementRef<HTMLElement>>('host');\n /** @ignore */\n private readonly contentWrap = viewChild<ElementRef<HTMLElement>>('contentWrap');\n /** @ignore Content actually rendered via <ng-content> (detected after rendering). */\n private readonly hasProjectedContent = signal(false);\n\n constructor() {\n // Detection of rendered content (<ng-content>) — SSR-safe (browser only).\n afterNextRender(() => {\n const el = this.contentWrap()?.nativeElement;\n const has =\n !!el &&\n Array.from(el.childNodes).some(\n (n) =>\n n.nodeType === Node.ELEMENT_NODE ||\n (n.nodeType === Node.TEXT_NODE && !!n.textContent?.trim()),\n );\n this.hasProjectedContent.set(has);\n });\n\n // Pass additional native attributes (buttonProps) to the host element.\n afterRenderEffect(() => {\n const props = this.buttonProps();\n if (!props) return;\n const el = this.hostEl().nativeElement;\n for (const [key, value] of Object.entries(props)) {\n if (value === null || value === undefined || value === false) {\n el.removeAttribute(key);\n } else {\n el.setAttribute(key, value === true ? '' : String(value));\n }\n }\n });\n\n // A11y safeguard: An icon-only button must have an accessible name.\n if (isDevMode()) {\n effect(() => {\n if (this.isIconOnly() && !this.accessibleLabel()) {\n console.warn(\n '[ui-button] Icon-only button has no accessible name: provide `ariaLabel` (or `label`).',\n );\n }\n });\n }\n }\n\n /** @ignore */\n protected readonly iconSize = computed(() => (this.size() === 'small' ? 'sm' : 'default'));\n\n /** @ignore An icon (or its template) is available. */\n protected readonly hasIcon = computed(() => !!this.icon() || !!this.iconTemplate());\n\n /** @ignore Visible text content (label or displayed content). */\n protected readonly hasVisibleText = computed(() => !!this.label() || this.hasProjectedContent());\n\n /** @ignore The icon appears before the content (left/top) or after it (right/bottom). */\n protected readonly iconBefore = computed(() => {\n const pos = this.iconPos();\n return pos === 'left' || pos === 'top';\n });\n\n /** @ignore Icon-only mode: forced, or inferred (icon only, with no visible text). */\n protected readonly isIconOnly = computed(() => {\n if (this.iconOnly()) return true;\n const pos = this.iconPos();\n if (pos === 'top' || pos === 'bottom') return false;\n return !this.hasVisibleText() && this.hasIcon();\n });\n\n /** @ignore Accessible name: explicit; otherwise, the label is hidden as “icon-only”; otherwise, the text is visible. */\n protected readonly accessibleLabel = computed(() => {\n if (this.ariaLabel()) return this.ariaLabel()!;\n if (this.isIconOnly()) return this.label() ?? null;\n return null;\n });\n\n /** @ignore Host renders an <a> (a URL or a router target was provided). */\n protected readonly isLink = computed(() => !!this.href() || this.routerLink() != null);\n\n /** @ignore Link mode uses the Angular RouterLink directive. */\n protected readonly useRouterLink = computed(() => this.routerLink() != null);\n\n /** @ignore Anchor rel: explicit, or a safe default for target=\"_blank\". */\n protected readonly computedRel = computed(() => {\n if (this.rel()) return this.rel()!;\n if (this.target() === '_blank') return 'noopener noreferrer';\n return null;\n });\n\n /** @ignore Anchor tabindex: -1 when disabled (an <a> has no native disabled). */\n protected readonly linkTabindex = computed(() =>\n this.disabled() ? -1 : (this.tabindex() ?? null),\n );\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-button', `_${this.level()}`];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (this.variant() !== 'filled') c.push(`_${this.variant()}`);\n if (this.onColor()) c.push(`_on-${this.onColor()}`);\n if (this.expanded()) c.push('_expanded');\n if (this.rounded()) c.push('_rounded');\n if (this.isIconOnly()) c.push('_icon-only');\n if (this.loading()) c.push('_loading');\n if (this.isLink() && this.disabled()) c.push('_disabled');\n const pos = this.iconPos();\n if (pos === 'top') c.push('_icon-top');\n else if (pos === 'bottom') c.push('_icon-bottom');\n return c.join(' ');\n });\n\n /** Sets the focus on the button (useful for controlling focus programmatically). */\n focus(options?: FocusOptions): void {\n this.hostEl().nativeElement.focus(options);\n }\n\n /** @ignore */\n protected onClick(event: MouseEvent): void {\n if (this.disabled() || this.loading()) {\n event.preventDefault();\n return;\n }\n this.buttonClick.emit(event);\n }\n}\n","@if (isLink()) {\n @if (useRouterLink()) {\n <a\n #host\n [class]=\"classes()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"computedRel()\"\n [attr.tabindex]=\"linkTabindex()\"\n [attr.role]=\"'button'\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n (click)=\"onClick($event)\"\n (focus)=\"buttonFocus.emit($event)\"\n (blur)=\"buttonBlur.emit($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </a>\n } @else {\n <a\n #host\n [class]=\"classes()\"\n [attr.href]=\"disabled() ? null : href()\"\n [attr.target]=\"target()\"\n [attr.rel]=\"computedRel()\"\n [attr.tabindex]=\"linkTabindex()\"\n [attr.role]=\"'button'\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n (click)=\"onClick($event)\"\n (focus)=\"buttonFocus.emit($event)\"\n (blur)=\"buttonBlur.emit($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </a>\n }\n} @else {\n <button\n #host\n [class]=\"classes()\"\n [type]=\"type()\"\n [disabled]=\"disabled() || loading()\"\n [attr.tabindex]=\"tabindex()\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.data-ripple]=\"ripple() ? 'on' : 'off'\"\n (click)=\"onClick($event)\"\n (focus)=\"buttonFocus.emit($event)\"\n (blur)=\"buttonBlur.emit($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </button>\n}\n\n<ng-template #inner>\n @if (iconBefore()) {\n <ng-container [ngTemplateOutlet]=\"iconSlot\" />\n }\n\n <!-- Always rendered: `hasProjectedContent` is detected from this very element, so gating it on\n `isIconOnly()` (which itself derives from that detection) made projected-only content\n undetectable — and silently dropped. Collapsed by `.ui-button-content:empty` when unused. -->\n <span class=\"ui-button-content\" #contentWrap>\n @if (label() && !isIconOnly()) {\n <span class=\"ui-button-label\">{{ label() }}</span>\n }\n <ng-content />\n </span>\n\n @if (!iconBefore()) {\n <ng-container [ngTemplateOutlet]=\"iconSlot\" />\n }\n</ng-template>\n\n<ng-template #iconSlot>\n @if (loading()) {\n @if (loadingIconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else {\n <i\n class=\"ui-button-icon ui-button-icon-loading fa-solid fa-{{ loadingIcon() }} fa-spin\"\n aria-hidden=\"true\"\n ></i>\n }\n } @else if (iconTemplate(); as tpl) {\n <ng-container [ngTemplateOutlet]=\"tpl\" />\n } @else if (icon()) {\n <ui-icon class=\"ui-button-icon\" [name]=\"icon()!\" [size]=\"iconSize()\" />\n }\n</ng-template>\n","/*\n * Public API Surface of ui-kit/ui-button\n */\n\nexport * from './lib/ui-button';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAsCa,QAAQ,CAAA;AAiFnB,IAAA,WAAA,GAAA;;AA/EA,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK;6FAAU;;AAEvB,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK;iGAAU;;QAE3B,IAAA,CAAA,IAAI,GAAG,KAAK,CAAa,QAAQ;iFAAC;AAClC;;;AAGG;QACH,IAAA,CAAA,KAAK,GAAG,KAAK,CAAU,MAAM;kFAAC;AAC9B;;;AAGG;QACH,IAAA,CAAA,OAAO,GAAG,KAAK,CAAgB,QAAQ;oFAAC;AACxC;;;;;;AAMG;QACH,IAAA,CAAA,OAAO,GAAG,KAAK,CAAuB,IAAI;oFAAC;;QAE3C,IAAA,CAAA,IAAI,GAAG,KAAK,CAAa,SAAS;iFAAC;;AAEnC,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK;4FAAU;;QAEtB,IAAA,CAAA,OAAO,GAAG,KAAK,CAAgB,MAAM;oFAAC;;QAEtC,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;QAExD,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,KAAK,+EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;QAEvD,IAAA,CAAA,WAAW,GA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QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,QAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,GAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,KAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,MAAM,qEAEV,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEnHjF;;AAEG;;ACFH;;AAEG;;"}
|
|
@@ -20,8 +20,10 @@ class UiLink {
|
|
|
20
20
|
/** Visible link text (optional when using projected content or icon-only). */
|
|
21
21
|
this.label = input(/* @ts-ignore */
|
|
22
22
|
...(ngDevMode ? [undefined, { debugName: "label" }] : /* istanbul ignore next */ []));
|
|
23
|
+
/** Accessible name. Required in icon-only mode; falls back to the label otherwise. */
|
|
23
24
|
this.ariaLabel = input(/* @ts-ignore */
|
|
24
25
|
...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
26
|
+
/** Link size. */
|
|
25
27
|
this.size = input('default', /* @ts-ignore */
|
|
26
28
|
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
27
29
|
// --- Destination -----------------------------------------------------
|
|
@@ -46,7 +48,11 @@ class UiLink {
|
|
|
46
48
|
/** FontAwesome icon name shown after the text. */
|
|
47
49
|
this.iconRight = input(/* @ts-ignore */
|
|
48
50
|
...(ngDevMode ? [undefined, { debugName: "iconRight" }] : /* istanbul ignore next */ []));
|
|
51
|
+
/**
|
|
52
|
+
* Disables the link: drops `href`/`routerLink`, sets `aria-disabled` and leaves the tab order.
|
|
53
|
+
*/
|
|
49
54
|
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
55
|
+
/** Native `tabindex` of the link. */
|
|
50
56
|
this.tabindex = input(/* @ts-ignore */
|
|
51
57
|
...(ngDevMode ? [undefined, { debugName: "tabindex" }] : /* istanbul ignore next */ []));
|
|
52
58
|
/** aria-current exposed on the anchor (e.g. "page" for the current breadcrumb item). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4sh-ui-kit-actions-ui-link.mjs","sources":["../../../projects/ui-kit/actions/ui-link/src/lib/ui-link.ts","../../../projects/ui-kit/actions/ui-link/src/lib/ui-link.html","../../../projects/ui-kit/actions/ui-link/src/public-api.ts","../../../projects/ui-kit/actions/ui-link/src/4sh-ui-kit-actions-ui-link.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n computed,\n effect,\n ElementRef,\n input,\n isDevMode,\n output,\n viewChild,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink } from '@angular/router';\nimport { UiIcon } from '@4sh/ui-kit/base/ui-icon';\n\nexport type LinkSize = 'default' | 'small';\n\n/**\n * ui-link — inline textual link (renders a real <a>), for prose / navigation.\n *\n * Choose by semantics, not appearance:\n * • Something that NAVIGATES (URL/route) → this component, or `ui-button`\n * with `href`/`routerLink` when it must look like a button.\n * • Something that triggers an ACTION (submit, open a modal…) → `ui-button`.\n *\n * Accepts a plain `href` (external) or a `routerLink` (internal navigation).\n * Interactive states (hover/focus/pressed) are CSS-driven, never Angular props.\n */\n@Component({\n selector: 'ui-link',\n imports: [UiIcon, RouterLink, NgTemplateOutlet],\n templateUrl: './ui-link.html',\n styleUrl: './ui-link.scss',\n host: { '[style.display]': \"'inline-flex'\" },\n})\nexport class UiLink {\n /** Visible link text (optional when using projected content or icon-only). */\n label = input<string>();\n ariaLabel = input<string>();\n size = input<LinkSize>('default');\n\n // --- Destination -----------------------------------------------------\n /** External / plain URL. */\n href = input<string>();\n /** Angular router target (internal navigation, uses RouterLink). */\n routerLink = input<string | unknown[]>();\n /** Anchor target (e.g. \"_blank\"). */\n target = input<string>();\n /** Anchor rel. Defaults to \"noopener noreferrer\" for external links. */\n rel = input<string>();\n /** Convenience for external links: sets target=\"_blank\" + a safe rel. */\n external = input(false, { transform: booleanAttribute });\n\n // --- Icons (presence-based, same as ui-button) -----------------------\n /** FontAwesome icon name shown before the text. */\n iconLeft = input<string>();\n /** FontAwesome icon name shown after the text. */\n iconRight = input<string>();\n\n disabled = input(false, { transform: booleanAttribute });\n tabindex = input<number>();\n /** aria-current exposed on the anchor (e.g. \"page\" for the current breadcrumb item). */\n ariaCurrent = input<string>();\n\n /** Emitted on click (never when disabled). Navigation stays native. */\n linkClick = output<MouseEvent>();\n /** Fired when the link receives focus. */\n linkFocus = output<FocusEvent>();\n /** Fired when the link loses focus. */\n linkBlur = output<FocusEvent>();\n\n /** @ignore */\n private readonly hostEl = viewChild.required<ElementRef<HTMLAnchorElement>>('host');\n\n constructor() {\n // A11y safeguard: an icon-only link must have an accessible name.\n if (isDevMode()) {\n effect(() => {\n if (this.isIconOnly() && !this.accessibleLabel()) {\n console.warn(\n '[ui-link] Icon-only link has no accessible name: provide `ariaLabel` (or `label`).',\n );\n }\n });\n }\n }\n\n /** @ignore Icon size follows the text size. */\n protected readonly iconSize = computed(() => (this.size() === 'small' ? 'sm' : 'default'));\n\n /** @ignore No visible text but at least one icon → icon-only. */\n protected readonly isIconOnly = computed(\n () => !this.label() && (!!this.iconLeft() || !!this.iconRight()),\n );\n\n /** @ignore Link mode uses the Angular RouterLink directive. */\n protected readonly useRouterLink = computed(() => this.routerLink() != null);\n\n /** @ignore Effective anchor target (external forces _blank). */\n protected readonly computedTarget = computed(\n () => this.target() ?? (this.external() ? '_blank' : null),\n );\n\n /** @ignore Anchor rel: explicit, or a safe default for _blank / external. */\n protected readonly computedRel = computed(() => {\n if (this.rel()) return this.rel()!;\n if (this.computedTarget() === '_blank') return 'noopener noreferrer';\n return null;\n });\n\n /** @ignore Tabindex: -1 when disabled (an <a> has no native disabled). */\n protected readonly linkTabindex = computed(() =>\n this.disabled() ? -1 : (this.tabindex() ?? null),\n );\n\n /** @ignore Accessible name: explicit, or the label when icon-only. */\n protected readonly accessibleLabel = computed(() => {\n if (this.ariaLabel()) return this.ariaLabel()!;\n if (this.isIconOnly()) return this.label() ?? null;\n return null;\n });\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-link'];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (this.isIconOnly()) c.push('_icon-only');\n if (this.disabled()) c.push('_disabled');\n return c.join(' ');\n });\n\n /** Sets the focus on the link (useful for controlling focus programmatically). */\n focus(options?: FocusOptions): void {\n this.hostEl().nativeElement.focus(options);\n }\n\n /** @ignore */\n protected onClick(event: MouseEvent): void {\n if (this.disabled()) {\n event.preventDefault();\n return;\n }\n this.linkClick.emit(event);\n }\n}\n","@if (useRouterLink()) {\n <a\n #host\n [class]=\"classes()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [attr.target]=\"computedTarget()\"\n [attr.rel]=\"computedRel()\"\n [attr.tabindex]=\"linkTabindex()\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-current]=\"ariaCurrent() ?? null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (click)=\"onClick($event)\"\n (focus)=\"linkFocus.emit($event)\"\n (blur)=\"linkBlur.emit($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </a>\n} @else {\n <a\n #host\n [class]=\"classes()\"\n [attr.href]=\"disabled() ? null : href()\"\n [attr.target]=\"computedTarget()\"\n [attr.rel]=\"computedRel()\"\n [attr.tabindex]=\"linkTabindex()\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-current]=\"ariaCurrent() ?? null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (click)=\"onClick($event)\"\n (focus)=\"linkFocus.emit($event)\"\n (blur)=\"linkBlur.emit($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </a>\n}\n\n<ng-template #inner>\n @if (iconLeft()) {\n <ui-icon class=\"ui-link-icon\" [name]=\"iconLeft()!\" [size]=\"iconSize()\" />\n }\n\n <span class=\"ui-link-content\">\n @if (label() && !isIconOnly()) {\n <span class=\"ui-link-label\">{{ label() }}</span>\n }\n <ng-content />\n </span>\n\n @if (iconRight()) {\n <ui-icon class=\"ui-link-icon\" [name]=\"iconRight()!\" [size]=\"iconSize()\" />\n }\n</ng-template>\n","/*\n * Public API Surface of ui-kit/ui-link\n */\n\nexport * from './lib/ui-link';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAiBA;;;;;;;;;;AAUG;MAQU,MAAM,CAAA;AAuCjB,IAAA,WAAA,GAAA;;AArCA,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK;6FAAU;AACvB,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK;iGAAU;QAC3B,IAAA,CAAA,IAAI,GAAG,KAAK,CAAW,SAAS;iFAAC;;;AAIjC,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK;4FAAU;;AAEtB,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK;k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AAA,EAAA,CAAA;kBAPlB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,SAAS,EAAA,OAAA,EACV,CAAC,MAAM,EAAE,UAAU,EAAE,gBAAgB,CAAC,EAAA,IAAA,EAGzC,EAAE,iBAAiB,EAAE,eAAe,EAAE,EAAA,QAAA,EAAA,ohDAAA,EAAA,MAAA,EAAA,CAAA,w8DAAA,CAAA,EAAA;28CAuCgC,MAAM,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AExEpF;;AAEG;;ACFH;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"4sh-ui-kit-actions-ui-link.mjs","sources":["../../../projects/ui-kit/actions/ui-link/src/lib/ui-link.ts","../../../projects/ui-kit/actions/ui-link/src/lib/ui-link.html","../../../projects/ui-kit/actions/ui-link/src/public-api.ts","../../../projects/ui-kit/actions/ui-link/src/4sh-ui-kit-actions-ui-link.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n computed,\n effect,\n ElementRef,\n input,\n isDevMode,\n output,\n viewChild,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { RouterLink } from '@angular/router';\nimport { UiIcon } from '@4sh/ui-kit/base/ui-icon';\n\nexport type LinkSize = 'default' | 'small';\n\n/**\n * ui-link — inline textual link (renders a real <a>), for prose / navigation.\n *\n * Choose by semantics, not appearance:\n * • Something that NAVIGATES (URL/route) → this component, or `ui-button`\n * with `href`/`routerLink` when it must look like a button.\n * • Something that triggers an ACTION (submit, open a modal…) → `ui-button`.\n *\n * Accepts a plain `href` (external) or a `routerLink` (internal navigation).\n * Interactive states (hover/focus/pressed) are CSS-driven, never Angular props.\n */\n@Component({\n selector: 'ui-link',\n imports: [UiIcon, RouterLink, NgTemplateOutlet],\n templateUrl: './ui-link.html',\n styleUrl: './ui-link.scss',\n host: { '[style.display]': \"'inline-flex'\" },\n})\nexport class UiLink {\n /** Visible link text (optional when using projected content or icon-only). */\n label = input<string>();\n /** Accessible name. Required in icon-only mode; falls back to the label otherwise. */\n ariaLabel = input<string>();\n /** Link size. */\n size = input<LinkSize>('default');\n\n // --- Destination -----------------------------------------------------\n /** External / plain URL. */\n href = input<string>();\n /** Angular router target (internal navigation, uses RouterLink). */\n routerLink = input<string | unknown[]>();\n /** Anchor target (e.g. \"_blank\"). */\n target = input<string>();\n /** Anchor rel. Defaults to \"noopener noreferrer\" for external links. */\n rel = input<string>();\n /** Convenience for external links: sets target=\"_blank\" + a safe rel. */\n external = input(false, { transform: booleanAttribute });\n\n // --- Icons (presence-based, same as ui-button) -----------------------\n /** FontAwesome icon name shown before the text. */\n iconLeft = input<string>();\n /** FontAwesome icon name shown after the text. */\n iconRight = input<string>();\n\n /**\n * Disables the link: drops `href`/`routerLink`, sets `aria-disabled` and leaves the tab order.\n */\n disabled = input(false, { transform: booleanAttribute });\n /** Native `tabindex` of the link. */\n tabindex = input<number>();\n /** aria-current exposed on the anchor (e.g. \"page\" for the current breadcrumb item). */\n ariaCurrent = input<string>();\n\n /** Emitted on click (never when disabled). Navigation stays native. */\n linkClick = output<MouseEvent>();\n /** Fired when the link receives focus. */\n linkFocus = output<FocusEvent>();\n /** Fired when the link loses focus. */\n linkBlur = output<FocusEvent>();\n\n /** @ignore */\n private readonly hostEl = viewChild.required<ElementRef<HTMLAnchorElement>>('host');\n\n constructor() {\n // A11y safeguard: an icon-only link must have an accessible name.\n if (isDevMode()) {\n effect(() => {\n if (this.isIconOnly() && !this.accessibleLabel()) {\n console.warn(\n '[ui-link] Icon-only link has no accessible name: provide `ariaLabel` (or `label`).',\n );\n }\n });\n }\n }\n\n /** @ignore Icon size follows the text size. */\n protected readonly iconSize = computed(() => (this.size() === 'small' ? 'sm' : 'default'));\n\n /** @ignore No visible text but at least one icon → icon-only. */\n protected readonly isIconOnly = computed(\n () => !this.label() && (!!this.iconLeft() || !!this.iconRight()),\n );\n\n /** @ignore Link mode uses the Angular RouterLink directive. */\n protected readonly useRouterLink = computed(() => this.routerLink() != null);\n\n /** @ignore Effective anchor target (external forces _blank). */\n protected readonly computedTarget = computed(\n () => this.target() ?? (this.external() ? '_blank' : null),\n );\n\n /** @ignore Anchor rel: explicit, or a safe default for _blank / external. */\n protected readonly computedRel = computed(() => {\n if (this.rel()) return this.rel()!;\n if (this.computedTarget() === '_blank') return 'noopener noreferrer';\n return null;\n });\n\n /** @ignore Tabindex: -1 when disabled (an <a> has no native disabled). */\n protected readonly linkTabindex = computed(() =>\n this.disabled() ? -1 : (this.tabindex() ?? null),\n );\n\n /** @ignore Accessible name: explicit, or the label when icon-only. */\n protected readonly accessibleLabel = computed(() => {\n if (this.ariaLabel()) return this.ariaLabel()!;\n if (this.isIconOnly()) return this.label() ?? null;\n return null;\n });\n\n /** @ignore */\n protected readonly classes = computed(() => {\n const c = ['ui-link'];\n if (this.size() !== 'default') c.push(`_${this.size()}`);\n if (this.isIconOnly()) c.push('_icon-only');\n if (this.disabled()) c.push('_disabled');\n return c.join(' ');\n });\n\n /** Sets the focus on the link (useful for controlling focus programmatically). */\n focus(options?: FocusOptions): void {\n this.hostEl().nativeElement.focus(options);\n }\n\n /** @ignore */\n protected onClick(event: MouseEvent): void {\n if (this.disabled()) {\n event.preventDefault();\n return;\n }\n this.linkClick.emit(event);\n }\n}\n","@if (useRouterLink()) {\n <a\n #host\n [class]=\"classes()\"\n [routerLink]=\"disabled() ? null : routerLink()\"\n [attr.target]=\"computedTarget()\"\n [attr.rel]=\"computedRel()\"\n [attr.tabindex]=\"linkTabindex()\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-current]=\"ariaCurrent() ?? null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (click)=\"onClick($event)\"\n (focus)=\"linkFocus.emit($event)\"\n (blur)=\"linkBlur.emit($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </a>\n} @else {\n <a\n #host\n [class]=\"classes()\"\n [attr.href]=\"disabled() ? null : href()\"\n [attr.target]=\"computedTarget()\"\n [attr.rel]=\"computedRel()\"\n [attr.tabindex]=\"linkTabindex()\"\n [attr.aria-label]=\"accessibleLabel()\"\n [attr.aria-current]=\"ariaCurrent() ?? null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (click)=\"onClick($event)\"\n (focus)=\"linkFocus.emit($event)\"\n (blur)=\"linkBlur.emit($event)\"\n >\n <ng-container [ngTemplateOutlet]=\"inner\" />\n </a>\n}\n\n<ng-template #inner>\n @if (iconLeft()) {\n <ui-icon class=\"ui-link-icon\" [name]=\"iconLeft()!\" [size]=\"iconSize()\" />\n }\n\n <span class=\"ui-link-content\">\n @if (label() && !isIconOnly()) {\n <span class=\"ui-link-label\">{{ label() }}</span>\n }\n <ng-content />\n </span>\n\n @if (iconRight()) {\n <ui-icon class=\"ui-link-icon\" [name]=\"iconRight()!\" [size]=\"iconSize()\" />\n }\n</ng-template>\n","/*\n * Public API Surface of ui-kit/ui-link\n */\n\nexport * from './lib/ui-link';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAiBA;;;;;;;;;;AAUG;MAQU,MAAM,CAAA;AA6CjB,IAAA,WAAA,GAAA;;AA3CA,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK;6FAAU;;AAEvB,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK;iGAAU;;QAE3B,IAAA,CAAA,IAAI,GAAG,KAAK,CAAW,SAAS;iFAAC;;;AAIjC,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK;4FAAU;;AAEtB,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK;kGAAsB;;AAExC,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK;8FAAU;;AAExB,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK;2FAAU;;QAErB,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;;;AAIxD,QA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EAAA,QAAA,EAAA,ohDAAA,EAAA,MAAA,EAAA,CAAA,w8DAAA,CAAA,EAAA;28CA6CgC,MAAM,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE9EpF;;AAEG;;ACFH;;AAEG;;"}
|
|
@@ -54,18 +54,25 @@ class UiImagePreview {
|
|
|
54
54
|
...(ngDevMode ? [undefined, { debugName: "downloadName" }] : /* istanbul ignore next */ []));
|
|
55
55
|
/** Close when the mask around the image is clicked. */
|
|
56
56
|
this.dismissableMask = input(true, { ...(ngDevMode ? { debugName: "dismissableMask" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
57
|
+
/** Accessible name of the zoom-in button. */
|
|
57
58
|
this.zoomInAriaLabel = input('Zoom avant', /* @ts-ignore */
|
|
58
59
|
...(ngDevMode ? [{ debugName: "zoomInAriaLabel" }] : /* istanbul ignore next */ []));
|
|
60
|
+
/** Accessible name of the zoom-out button. */
|
|
59
61
|
this.zoomOutAriaLabel = input('Zoom arrière', /* @ts-ignore */
|
|
60
62
|
...(ngDevMode ? [{ debugName: "zoomOutAriaLabel" }] : /* istanbul ignore next */ []));
|
|
63
|
+
/** Accessible name of the rotate-left button. */
|
|
61
64
|
this.rotateLeftAriaLabel = input('Pivoter vers la gauche', /* @ts-ignore */
|
|
62
65
|
...(ngDevMode ? [{ debugName: "rotateLeftAriaLabel" }] : /* istanbul ignore next */ []));
|
|
66
|
+
/** Accessible name of the rotate-right button. */
|
|
63
67
|
this.rotateRightAriaLabel = input('Pivoter vers la droite', /* @ts-ignore */
|
|
64
68
|
...(ngDevMode ? [{ debugName: "rotateRightAriaLabel" }] : /* istanbul ignore next */ []));
|
|
69
|
+
/** Accessible name of the button that resets zoom and rotation. */
|
|
65
70
|
this.resetAriaLabel = input('Réinitialiser l’affichage', /* @ts-ignore */
|
|
66
71
|
...(ngDevMode ? [{ debugName: "resetAriaLabel" }] : /* istanbul ignore next */ []));
|
|
72
|
+
/** Accessible name of the download button. */
|
|
67
73
|
this.downloadAriaLabel = input('Télécharger l’image', /* @ts-ignore */
|
|
68
74
|
...(ngDevMode ? [{ debugName: "downloadAriaLabel" }] : /* istanbul ignore next */ []));
|
|
75
|
+
/** Accessible name of the close button. */
|
|
69
76
|
this.closeAriaLabel = input('Fermer l’aperçu', /* @ts-ignore */
|
|
70
77
|
...(ngDevMode ? [{ debugName: "closeAriaLabel" }] : /* istanbul ignore next */ []));
|
|
71
78
|
/** Emitted when the view asks to be dismissed (Escape, close button, mask click). */
|
|
@@ -345,18 +352,25 @@ class UiImage {
|
|
|
345
352
|
/** Local asset name (`assets-map.json` key) displayed when the main image fails to load. */
|
|
346
353
|
this.fallback = input(/* @ts-ignore */
|
|
347
354
|
...(ngDevMode ? [undefined, { debugName: "fallback" }] : /* istanbul ignore next */ []));
|
|
355
|
+
/** Loads the image eagerly with a high fetch priority (above-the-fold images); lazy otherwise. */
|
|
348
356
|
this.priority = input(false, /* @ts-ignore */
|
|
349
357
|
...(ngDevMode ? [{ debugName: "priority" }] : /* istanbul ignore next */ []));
|
|
358
|
+
/** Fills the parent box instead of using `width`/`height` (the parent must be positioned). */
|
|
350
359
|
this.fill = input(false, /* @ts-ignore */
|
|
351
360
|
...(ngDevMode ? [{ debugName: "fill" }] : /* istanbul ignore next */ []));
|
|
361
|
+
/** Rendered width; a number is read in `widthUnit`. */
|
|
352
362
|
this.width = input(/* @ts-ignore */
|
|
353
363
|
...(ngDevMode ? [undefined, { debugName: "width" }] : /* istanbul ignore next */ []));
|
|
364
|
+
/** Unit of a numeric `width` (`px` when absent). */
|
|
354
365
|
this.widthUnit = input(/* @ts-ignore */
|
|
355
366
|
...(ngDevMode ? [undefined, { debugName: "widthUnit" }] : /* istanbul ignore next */ []));
|
|
367
|
+
/** Rendered height; a number is read in `heightUnit`. Absent: the image keeps its ratio. */
|
|
356
368
|
this.height = input(/* @ts-ignore */
|
|
357
369
|
...(ngDevMode ? [undefined, { debugName: "height" }] : /* istanbul ignore next */ []));
|
|
370
|
+
/** Unit of a numeric `height` (`px` when absent). */
|
|
358
371
|
this.heightUnit = input(/* @ts-ignore */
|
|
359
372
|
...(ngDevMode ? [undefined, { debugName: "heightUnit" }] : /* istanbul ignore next */ []));
|
|
373
|
+
/** Alternative text. Absent: the image is decorative (`aria-hidden`). */
|
|
360
374
|
this.alt = input(/* @ts-ignore */
|
|
361
375
|
...(ngDevMode ? [undefined, { debugName: "alt" }] : /* istanbul ignore next */ []));
|
|
362
376
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"4sh-ui-kit-base-ui-image.mjs","sources":["../../../projects/ui-kit/base/ui-image/src/lib/ui-image-preview.ts","../../../projects/ui-kit/base/ui-image/src/lib/ui-image-preview.html","../../../projects/ui-kit/base/ui-image/src/lib/ui-image-svg.ts","../../../projects/ui-kit/base/ui-image/src/lib/ui-image.ts","../../../projects/ui-kit/base/ui-image/src/lib/ui-image.html","../../../projects/ui-kit/base/ui-image/src/public-api.ts","../../../projects/ui-kit/base/ui-image/src/4sh-ui-kit-base-ui-image.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n inject,\n input,\n numberAttribute,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { UiIcon } from '@4sh/ui-kit/base/ui-icon';\nimport { lockBodyScroll, unlockBodyScroll } from '@4sh/ui-kit/overlay';\n\n/** Clamp `value` into `[min, max]`. */\nfunction clamp(value: number, min: number, max: number): number {\n return Math.min(max, Math.max(min, value));\n}\n\n/**\n * ui-image-preview — the enlarged view (lightbox) opened by `ui-image`'s\n * `preview` mode.\n *\n * A viewport mask holding a toolbar (zoom in/out, rotate, reset, optional\n * download, close) and the image itself, which the three transforms drive\n * through a single `transform`: pan, scale, rotation. Zoom is reachable at the\n * pointer (toolbar, wheel) and at the keyboard (`+`/`-`/`0`/`r`, arrows to pan)\n * — a zoom a keyboard user cannot pan is a zoom they cannot read.\n *\n * Lives in `ui-image`'s entry point: it renders that component's resolved\n * source, so a separate entry point would be a cycle. Mount it directly only to\n * drive the enlarged view yourself.\n */\n@Component({\n selector: 'ui-image-preview',\n imports: [A11yModule, UiIcon],\n templateUrl: './ui-image-preview.html',\n styleUrl: './ui-image-preview.scss',\n})\nexport class UiImagePreview {\n private readonly document = inject(DOCUMENT);\n\n /** URL of the image to show enlarged (already resolved — `http(s)`, `blob:` or `data:`). */\n src = input.required<string>();\n /** Alt text of the enlarged image (empty = decorative). */\n alt = input<string>('');\n /** Accessible name of the dialog. */\n ariaLabel = input<string>('Aperçu de l’image');\n\n /** Zoom increment applied by one toolbar click, one wheel notch or one `+`/`-` press. */\n zoomStep = input(0.25, { transform: numberAttribute });\n /** Lower zoom bound. */\n minZoom = input(0.5, { transform: numberAttribute });\n /** Upper zoom bound. */\n maxZoom = input(4, { transform: numberAttribute });\n\n /** Offer a download action in the toolbar. */\n downloadable = input(false, { transform: booleanAttribute });\n /** Filename proposed by the download action (defaults to the browser's choice). */\n downloadName = input<string>();\n\n /** Close when the mask around the image is clicked. */\n dismissableMask = input(true, { transform: booleanAttribute });\n\n zoomInAriaLabel = input('Zoom avant');\n zoomOutAriaLabel = input('Zoom arrière');\n rotateLeftAriaLabel = input('Pivoter vers la gauche');\n rotateRightAriaLabel = input('Pivoter vers la droite');\n resetAriaLabel = input('Réinitialiser l’affichage');\n downloadAriaLabel = input('Télécharger l’image');\n closeAriaLabel = input('Fermer l’aperçu');\n\n /** Emitted when the view asks to be dismissed (Escape, close button, mask click). */\n closed = output<void>();\n\n private readonly stage = viewChild.required<ElementRef<HTMLElement>>('stage');\n\n protected readonly scale = signal(1);\n protected readonly rotation = signal(0);\n protected readonly panX = signal(0);\n protected readonly panY = signal(0);\n\n protected readonly canZoomIn = computed(() => this.scale() < this.maxZoom());\n protected readonly canZoomOut = computed(() => this.scale() > this.minZoom());\n /** Nothing to reset while the three transforms are at their neutral value. */\n protected readonly isPristine = computed(\n () => this.scale() === 1 && this.rotation() === 0 && this.panX() === 0 && this.panY() === 0,\n );\n /** Panning only makes sense once the image overflows its stage. */\n protected readonly canPan = computed(() => this.scale() > 1);\n /** A quarter turn: what is drawn no longer fits the layout box's axes. */\n protected readonly isQuarterTurned = computed(() => this.rotation() % 180 !== 0);\n\n protected readonly transform = computed(\n () =>\n `translate(${this.panX()}px, ${this.panY()}px) scale(${this.scale()}) rotate(${this.rotation()}deg)`,\n );\n\n constructor() {\n lockBodyScroll(this.document);\n inject(DestroyRef).onDestroy(() => unlockBodyScroll(this.document));\n }\n\n protected zoomIn(): void {\n this.setScale(this.scale() + this.zoomStep());\n }\n\n protected zoomOut(): void {\n this.setScale(this.scale() - this.zoomStep());\n }\n\n protected rotateLeft(): void {\n this.rotation.update((deg) => deg - 90);\n }\n\n protected rotateRight(): void {\n this.rotation.update((deg) => deg + 90);\n }\n\n protected reset(): void {\n this.scale.set(1);\n this.rotation.set(0);\n this.panX.set(0);\n this.panY.set(0);\n }\n\n protected close(): void {\n this.closed.emit();\n }\n\n /** A press that lands on the stage itself (not on the image) is a press outside. */\n protected onStagePointerDown(event: PointerEvent): void {\n if (this.dismissableMask() && event.target === this.stage().nativeElement) this.close();\n }\n\n protected onWheel(event: WheelEvent): void {\n event.preventDefault();\n this.setScale(this.scale() + (event.deltaY < 0 ? this.zoomStep() : -this.zoomStep()));\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n const step = 24;\n switch (event.key) {\n case 'Escape':\n this.close();\n break;\n case '+':\n case '=':\n this.zoomIn();\n break;\n case '-':\n this.zoomOut();\n break;\n case '0':\n this.reset();\n break;\n case 'r':\n case 'R':\n this.rotateRight();\n break;\n case 'ArrowLeft':\n this.panX.update((x) => x - step);\n break;\n case 'ArrowRight':\n this.panX.update((x) => x + step);\n break;\n case 'ArrowUp':\n this.panY.update((y) => y - step);\n break;\n case 'ArrowDown':\n this.panY.update((y) => y + step);\n break;\n default:\n return;\n }\n // Only a handled key is swallowed: Tab must keep cycling the focus trap.\n event.preventDefault();\n event.stopPropagation();\n }\n\n // --- Drag to pan ------------------------------------------------------\n private dragOrigin: { x: number; y: number; panX: number; panY: number } | null = null;\n\n protected onPointerDown(event: PointerEvent): void {\n if (!this.canPan() || event.button !== 0) return;\n this.dragOrigin = { x: event.clientX, y: event.clientY, panX: this.panX(), panY: this.panY() };\n (event.target as Element).setPointerCapture?.(event.pointerId);\n event.preventDefault();\n }\n\n protected onPointerMove(event: PointerEvent): void {\n const origin = this.dragOrigin;\n if (!origin) return;\n this.panX.set(origin.panX + (event.clientX - origin.x));\n this.panY.set(origin.panY + (event.clientY - origin.y));\n }\n\n protected onPointerUp(event: PointerEvent): void {\n if (!this.dragOrigin) return;\n this.dragOrigin = null;\n (event.target as Element).releasePointerCapture?.(event.pointerId);\n }\n\n private setScale(value: number): void {\n const next = clamp(Number(value.toFixed(4)), this.minZoom(), this.maxZoom());\n this.scale.set(next);\n // Back to fit: the pan offset would otherwise strand the image off-centre.\n if (next <= 1) {\n this.panX.set(0);\n this.panY.set(0);\n }\n }\n}\n","<!-- The host is the mask; this is the dialog that owns the focus, the keyboard\n shortcuts and the aria wiring. -->\n<div\n class=\"ui-image-preview\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"ariaLabel() || null\"\n tabindex=\"-1\"\n [cdkTrapFocus]=\"true\"\n [cdkTrapFocusAutoCapture]=\"true\"\n (keydown)=\"onKeydown($event)\"\n>\n <!-- Unavailable actions are `aria-disabled`, not `disabled`: a real `disabled`\n drops the focus to the body the moment the button that holds it hits a\n bound, and `Escape` then no longer reaches the dialog. The handlers clamp,\n so a press at the bound is a no-op. -->\n <div class=\"ui-image-preview-toolbar\">\n <button\n type=\"button\"\n class=\"ui-image-preview-action\"\n [attr.aria-label]=\"zoomOutAriaLabel() || null\"\n [attr.aria-disabled]=\"!canZoomOut() || null\"\n (click)=\"zoomOut()\"\n >\n <ui-icon name=\"magnifying-glass-minus\" size=\"sm\" />\n </button>\n\n <button\n type=\"button\"\n class=\"ui-image-preview-action\"\n [attr.aria-label]=\"zoomInAriaLabel() || null\"\n [attr.aria-disabled]=\"!canZoomIn() || null\"\n (click)=\"zoomIn()\"\n >\n <ui-icon name=\"magnifying-glass-plus\" size=\"sm\" />\n </button>\n\n <button\n type=\"button\"\n class=\"ui-image-preview-action\"\n [attr.aria-label]=\"rotateLeftAriaLabel() || null\"\n (click)=\"rotateLeft()\"\n >\n <ui-icon name=\"rotate-left\" size=\"sm\" />\n </button>\n\n <button\n type=\"button\"\n class=\"ui-image-preview-action\"\n [attr.aria-label]=\"rotateRightAriaLabel() || null\"\n (click)=\"rotateRight()\"\n >\n <ui-icon name=\"rotate-right\" size=\"sm\" />\n </button>\n\n <button\n type=\"button\"\n class=\"ui-image-preview-action\"\n [attr.aria-label]=\"resetAriaLabel() || null\"\n [attr.aria-disabled]=\"isPristine() || null\"\n (click)=\"reset()\"\n >\n <ui-icon name=\"arrows-rotate\" size=\"sm\" />\n </button>\n\n @if (downloadable()) {\n <a\n class=\"ui-image-preview-action\"\n [href]=\"src()\"\n [attr.download]=\"downloadName() || ''\"\n [attr.aria-label]=\"downloadAriaLabel() || null\"\n target=\"_blank\"\n rel=\"noopener\"\n >\n <ui-icon name=\"download\" size=\"sm\" />\n </a>\n }\n\n <button\n type=\"button\"\n class=\"ui-image-preview-action\"\n [attr.aria-label]=\"closeAriaLabel() || null\"\n (click)=\"close()\"\n >\n <ui-icon name=\"xmark\" size=\"sm\" />\n </button>\n </div>\n\n <!-- The stage is the dismiss-on-outside target: a press that lands on it, and\n not on the image, closes. Escape is its keyboard equivalent, which is why\n there is no key handler here. -->\n <div\n #stage\n class=\"ui-image-preview-stage\"\n (pointerdown)=\"onStagePointerDown($event)\"\n (wheel)=\"onWheel($event)\"\n >\n <img\n class=\"ui-image-preview-media\"\n [class._pannable]=\"canPan()\"\n [class._rotated]=\"isQuarterTurned()\"\n [src]=\"src()\"\n [alt]=\"alt()\"\n [style.transform]=\"transform()\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerUp($event)\"\n draggable=\"false\"\n />\n </div>\n</div>\n","/**\n * Assainissement des SVG inlinés par `ui-image`.\n *\n * Angular's HTML sanitizer strips `<svg>` wholesale, so inlining an SVG — which\n * is what lets the asset inherit `currentColor` and the theme's CSS — has no\n * choice but to go through `bypassSecurityTrustHtml()`. That bypass is only\n * defensible if the markup has already been scrubbed here, which is the single\n * reason this file exists. See `docs/SECURITY-PRACTICES.md`.\n *\n * The threat model is not \"the kit's own assets\": it is a project serving\n * `assets/img/` from a CDN, or letting a client drop its own logo in a brand\n * folder (white-label). In both cases the SVG is markup of unknown origin\n * rendered into the application's own origin.\n */\n\n/**\n * Tags dropped WITH their content — unwrapping them would put their body in the\n * document as text, or leave the vector intact.\n *\n * `foreignObject` re-opens the whole HTML namespace inside the SVG, and the SMIL\n * elements (`animate`, `set`…) can retarget an attribute *after* this scrub ran.\n */\nconst VOIDED_TAGS =\n 'script, foreignObject, iframe, object, embed, animate, animateTransform, animateMotion, set, handler';\n\n/** Attributes carrying a reference — the only ones allowed to name a target. */\nconst REF_ATTRS = new Set(['href', 'xlink:href', 'src']);\n\n/** A reference either stays inside the document, or navigates over http(s). */\nconst ALLOWED_REF_PROTOCOLS = ['http:', 'https:'];\n\n/**\n * Strips from an SVG everything that can execute or fetch, and returns the\n * scrubbed markup.\n *\n * Parsing happens inside a detached `<template>`: its content is inert, so\n * nothing runs and nothing is fetched while we inspect it. Returns `''` when\n * there is no DOM to parse with (SSR) — failing closed, since un-scrubbed\n * markup must never reach the bypass.\n */\nexport function sanitizeInlineSvg(raw: string): string {\n if (typeof document === 'undefined') return '';\n\n const template = document.createElement('template');\n /* eslint-disable-next-line no-restricted-syntax -- EXCEPTION JUSTIFIÉE : on\n écrit DANS un `<template>` détaché, dont le contenu est inerte — rien ne\n s'exécute et rien n'est chargé. C'est l'étape de PARSING du scrub, pas une\n injection dans le document. Registre : docs/SECURITY-PRACTICES.md. */\n template.innerHTML = raw;\n\n for (const el of Array.from(template.content.querySelectorAll(VOIDED_TAGS))) el.remove();\n\n for (const el of Array.from(template.content.querySelectorAll('*'))) {\n for (const attr of Array.from(el.attributes)) {\n const name = attr.name.toLowerCase();\n // Every event handler, whatever the element it sits on.\n if (name.startsWith('on')) {\n el.removeAttributeNode(attr);\n continue;\n }\n if (REF_ATTRS.has(name) && !isSafeRef(attr.value)) el.removeAttributeNode(attr);\n }\n }\n\n return template.innerHTML;\n}\n\n/** @internal Rejects `javascript:`, `data:` and the other non-navigational schemes. */\nfunction isSafeRef(value: string): boolean {\n const ref = value.trim();\n // `<use href=\"#icon\">` — a same-document reference names no external target.\n if (ref.startsWith('#')) return true;\n try {\n return ALLOWED_REF_PROTOCOLS.includes(new URL(ref, document.baseURI).protocol);\n } catch {\n return false;\n }\n}\n","import {\n booleanAttribute,\n Component,\n computed,\n contentChild,\n effect,\n inject,\n InjectionToken,\n input,\n isDevMode,\n linkedSignal,\n model,\n numberAttribute,\n output,\n PLATFORM_ID,\n Provider,\n signal,\n TemplateRef,\n} from '@angular/core';\nimport { isPlatformBrowser, NgOptimizedImage, NgTemplateOutlet } from '@angular/common';\nimport { httpResource } from '@angular/common/http';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { ThemeService } from '@4sh/ui-kit/theming';\nimport { BrandService } from '@4sh/ui-kit/theming';\nimport { UiIcon } from '@4sh/ui-kit/base/ui-icon';\nimport { UiSpinner } from '@4sh/ui-kit/informative/ui-spinner';\nimport { UiMotion } from '@4sh/ui-kit/motion';\nimport { sanitizeInlineSvg } from './ui-image-svg';\nimport { UiImagePreview } from './ui-image-preview';\n\ninterface ModeMap {\n base?: string;\n light?: string;\n dark?: string;\n}\ntype ThemeMap = Record<string, ModeMap>;\n/** filename → { brand|'common' → { base|light|dark → extension } }. */\nexport type UiImageAssetsMap = Record<string, ThemeMap>;\n\n/**\n * Map of the LOCAL assets available to `ui-image` (its `name` input).\n *\n * The kit cannot know a project's assets, so the map is injected rather than\n * bundled: generate it in your app (see the `generate:assets` script in the\n * starter, which writes `src/assets/assets-map.json`) and provide it with\n * `provideUiImageAssets()`. Without it, `name` resolves to nothing and the\n * component falls back to its placeholder — `src` (remote URLs) still works.\n */\nexport const UI_IMAGE_ASSETS = new InjectionToken<UiImageAssetsMap>('UI_IMAGE_ASSETS');\n\n/**\n * Registers the local asset map consumed by `ui-image`.\n *\n * ```ts\n * import assetsMap from './assets/assets-map.json';\n * providers: [provideUiImageAssets(assetsMap)]\n * ```\n */\nexport function provideUiImageAssets(map: UiImageAssetsMap): Provider {\n return { provide: UI_IMAGE_ASSETS, useValue: map };\n}\n\n/**\n * Cross-instance memoization: the same resolved URL is fetched once (logos\n * repeated across the app).\n *\n * Holds the **scrubbed** markup, never the raw response — nothing that skipped\n * `sanitizeInlineSvg()` may ever be read back out of here.\n */\nconst SVG_CACHE = new Map<string, string>();\n\n/** Payload carried in the URL itself (`data:image/png;base64,…`). */\nconst DATA_URL = /^data:/i;\n\n/**\n * ui-image — theme/brand-aware image.\n *\n * Three sources: `name` (local asset key resolved through `assets-map.json`,\n * theme/brand variants), `src` (remote/absolute URL — takes precedence), and\n * `src` + `secured` (the URL is fetched through `HttpClient`, so the app's\n * interceptors authenticate it, and the response `Blob` is shown from an object\n * URL revoked with the component).\n * Local `.svg` assets are inlined (`innerHTML`) so they can inherit CSS — after\n * being scrubbed by `sanitizeInlineSvg()`; remote URLs always render through\n * `<img [ngSrc]>` (never inlined), except `data:`/`blob:` payloads, which\n * `NgOptimizedImage` rejects and a plain `<img>` renders.\n * On load failure the `fallback` local asset is shown, then a token-styled\n * placeholder if the fallback also fails (or none is provided).\n *\n * `preview` turns the image into a trigger for the enlarged view\n * (`ui-image-preview`): zoom, rotation, pan, reset, optional download.\n */\n@Component({\n selector: 'ui-image',\n templateUrl: './ui-image.html',\n styleUrl: './ui-image.scss',\n imports: [NgOptimizedImage, NgTemplateOutlet, UiIcon, UiSpinner, UiMotion, UiImagePreview],\n})\nexport class UiImage {\n private readonly sanitizer = inject(DomSanitizer);\n private readonly assetsMap = inject(UI_IMAGE_ASSETS, { optional: true }) ?? {};\n private readonly themeService = inject(ThemeService);\n private readonly brandService = inject(BrandService);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n /** Local asset key in `assets-map.json` (theme/brand-aware resolution). */\n name = input<string>();\n /** Remote/absolute URL, rendered via `NgOptimizedImage` — takes precedence over `name`. */\n src = input<string>();\n /** Local asset name (`assets-map.json` key) displayed when the main image fails to load. */\n fallback = input<string>();\n priority = input(false);\n fill = input(false);\n width = input<string | number>();\n widthUnit = input<string>();\n height = input<string | number>();\n heightUnit = input<string>();\n alt = input<string>();\n\n /**\n * Fetch `src` through `HttpClient` instead of letting the browser load it.\n *\n * That is what an endpoint behind an `Authorization` header needs: an `<img\n * src>` is a plain browser request, which carries no interceptor and no\n * bearer token. The response `Blob` is shown from an object URL, revoked as\n * soon as the source changes or the component goes away.\n *\n * Cross-origin still applies: the endpoint must answer the CORS preflight\n * (`Access-Control-Allow-Origin`, and `Access-Control-Allow-Headers` for the\n * auth header) — an `<img>` would have displayed it without any of that.\n */\n secured = input(false, { transform: booleanAttribute });\n /** Send cookies/TLS credentials with the `secured` request (cross-origin sessions). */\n withCredentials = input(false, { transform: booleanAttribute });\n /** Visible text of the loading indicator shown while a `secured` fetch is in flight. */\n loadingLabel = input<string>();\n /** Accessible name of that loading indicator. */\n loadingAriaLabel = input('Chargement de l’image');\n\n /** Clicking the image opens the enlarged view (`ui-image-preview`). */\n preview = input(false, { transform: booleanAttribute });\n /** Enlarged view open state (two-way — set it to open the preview yourself). */\n previewVisible = model(false);\n /** Accessible name of the trigger (defaults to the image's own `alt`). */\n previewAriaLabel = input<string>();\n /** Accessible name of the enlarged view dialog. */\n previewDialogAriaLabel = input('Aperçu de l’image');\n /** Zoom increment of one toolbar click, wheel notch or `+`/`-` press in the preview. */\n zoomStep = input(0.25, { transform: numberAttribute });\n /** Lower zoom bound in the preview. */\n minZoom = input(0.5, { transform: numberAttribute });\n /** Upper zoom bound in the preview. */\n maxZoom = input(4, { transform: numberAttribute });\n /** Offer a download action in the preview toolbar. */\n downloadable = input(false, { transform: booleanAttribute });\n /** Filename proposed by that download action. */\n downloadName = input<string>();\n\n /** Emitted with the failed URL when an image fails to load. */\n loadFailed = output<string>();\n\n /**\n * Replaces the hover indicator of the `preview` mode (the magnifier). Rendered\n * over the image, decorative — the accessible name stays on the trigger.\n *\n * ```html\n * <ui-image src=\"…\" preview>\n * <ng-template #previewIndicator>Agrandir</ng-template>\n * </ui-image>\n * ```\n */\n protected readonly previewIndicator = contentChild<TemplateRef<unknown>>('previewIndicator');\n\n protected readonly isRemote = computed(() => !!this.src());\n /** Inline SVG is reserved for LOCAL assets — a remote `.svg` renders through `<img>` (no XSS surface). */\n protected readonly isInlineSvg = computed(\n () => !this.isRemote() && !!this.name()?.toLowerCase().endsWith('.svg'),\n );\n /** `secured` only means anything with a `src` to fetch. */\n protected readonly isSecured = computed(() => this.secured() && !!this.src());\n /** A `data:` payload is already the image — `NgOptimizedImage` refuses it. */\n protected readonly isDataUrl = computed(() => DATA_URL.test(this.src() ?? ''));\n\n protected readonly localSrc = computed(() => this.resolveLocal(this.name()));\n protected readonly fallbackSrc = computed(() => this.resolveLocal(this.fallback()));\n\n // --- Secured source (HttpClient → Blob → object URL) ------------------\n private readonly blobResource = httpResource.blob(() =>\n this.isSecured() ? { url: this.src()!, withCredentials: this.withCredentials() } : undefined,\n );\n private readonly blobUrl = signal<string | null>(null);\n\n protected readonly securedLoading = computed(\n () => this.isSecured() && this.blobResource.isLoading(),\n );\n private readonly securedFailed = computed(\n () => this.isSecured() && this.blobResource.status() === 'error',\n );\n\n protected readonly primarySrc = computed(() =>\n this.isSecured() ? (this.blobUrl() ?? '') : this.src() || this.localSrc(),\n );\n\n // Failure flags auto-reset when their source URL changes (theme/brand/src swap → automatic retry).\n private readonly primaryImgFailed = linkedSignal({\n source: this.primarySrc,\n computation: () => false,\n });\n private readonly fallbackImgFailed = linkedSignal({\n source: this.fallbackSrc,\n computation: () => false,\n });\n\n private readonly svgResource = httpResource.text(() => {\n if (!this.isInlineSvg()) return undefined;\n const url = this.localSrc();\n return !url || SVG_CACHE.has(url) ? undefined : url;\n });\n\n /**\n * The inlined SVG, scrubbed then trusted.\n *\n * FSHSP-177 — this is the kit's ONLY `bypassSecurityTrust*()`. It is not\n * avoidable: Angular's HTML sanitizer strips `<svg>` wholesale, so passing the\n * asset through `sanitize(SecurityContext.HTML, …)` would render nothing, and\n * inlining is the whole point (the asset inherits `currentColor` and the\n * theme's CSS — an `<img>` cannot). What makes the bypass defensible is that\n * the markup went through `sanitizeInlineSvg()` first: scripts, `foreignObject`,\n * SMIL, event handlers and non-navigational references are already gone.\n * Justified in `docs/SECURITY-PRACTICES.md`.\n */\n protected readonly svgContent = computed<SafeHtml | null>(() => {\n if (!this.isInlineSvg()) return null;\n const url = this.localSrc();\n if (!url) return null;\n const safe =\n SVG_CACHE.get(url) ??\n (this.svgResource.hasValue() ? sanitizeInlineSvg(this.svgResource.value()) : undefined);\n /* eslint-disable-next-line no-restricted-syntax -- EXCEPTION JUSTIFIÉE :\n seul bypass du kit. Inévitable (l'assainisseur d'Angular supprime `<svg>`\n en entier) et sûr parce que `sanitizeInlineSvg()` a déjà retiré scripts,\n foreignObject, SMIL, gestionnaires d'événements et références non\n navigationnelles. Registre : docs/SECURITY-PRACTICES.md. */\n return safe === undefined ? null : this.sanitizer.bypassSecurityTrustHtml(safe);\n });\n\n protected readonly primaryFailed = computed(() => {\n if (this.isInlineSvg()) return this.svgResource.status() === 'error';\n return this.securedFailed() || this.primaryImgFailed();\n });\n protected readonly showFallback = computed(\n () => this.primaryFailed() && !!this.fallbackSrc() && !this.fallbackImgFailed(),\n );\n protected readonly showPlaceholder = computed(\n () =>\n !this.securedLoading() &&\n (!this.primarySrc() ||\n (this.primaryFailed() && (!this.fallbackSrc() || this.fallbackImgFailed()))),\n );\n protected readonly displayedSrc = computed(() =>\n this.showFallback() ? this.fallbackSrc() : this.primarySrc(),\n );\n /** `blob:`/`data:` bypass `NgOptimizedImage`; a local fallback never does. */\n protected readonly isRawSrc = computed(\n () => !this.showFallback() && (this.isSecured() || this.isDataUrl()),\n );\n\n /** The image is a preview trigger only once there is something to enlarge. */\n protected readonly canPreview = computed(\n () => this.preview() && !this.showPlaceholder() && !this.securedLoading(),\n );\n\n protected readonly cssWidth = computed(() =>\n this.width() != null ? `${this.width()}${this.widthUnit() || 'px'}` : null,\n );\n protected readonly cssHeight = computed(() =>\n this.height() != null ? `${this.height()}${this.heightUnit() || 'px'}` : null,\n );\n\n constructor() {\n // Side effect only: populate the module-level SVG cache once a fetch\n // resolves. Scrubbed on the way in — the cache is read straight into the\n // bypass, so it must never hold a raw response.\n effect(() => {\n if (!this.isInlineSvg()) return;\n const url = this.localSrc();\n if (url && this.svgResource.hasValue())\n SVG_CACHE.set(url, sanitizeInlineSvg(this.svgResource.value()));\n });\n\n // The object URL's whole lifetime: created when a Blob arrives, revoked by\n // the cleanup — which runs before the next source AND on destroy. That is\n // what keeps a list of secured images from leaking one URL per render.\n effect((onCleanup) => {\n const blob = this.blobResource.hasValue() ? this.blobResource.value() : undefined;\n if (!blob || !this.isBrowser) {\n this.blobUrl.set(null);\n return;\n }\n const url = URL.createObjectURL(blob);\n this.blobUrl.set(url);\n onCleanup(() => URL.revokeObjectURL(url));\n });\n\n // A failed fetch never reaches an `<img>`, so `(error)` cannot report it.\n effect(() => {\n if (this.securedFailed()) this.loadFailed.emit(this.src()!);\n });\n\n // Nothing left to enlarge (source swapped, load failed): close rather than\n // leave the dialog on a stale image.\n effect(() => {\n if (this.previewVisible() && !this.canPreview()) this.previewVisible.set(false);\n });\n\n if (isDevMode()) {\n effect(() => {\n if (this.src() && this.name()) {\n console.warn('[ui-image] `src` and `name` are both set — `src` takes precedence.');\n }\n if (!this.src() && !this.name()) {\n console.warn(\n '[ui-image] Neither `src` nor `name` is set — the placeholder is displayed.',\n );\n }\n if (this.secured() && !this.src()) {\n console.warn('[ui-image] `secured` has no effect without `src` — nothing to fetch.');\n }\n if (this.preview() && !this.alt() && !this.previewAriaLabel()) {\n console.warn(\n '[ui-image] `preview` renders a button with no accessible name — set `alt` or `previewAriaLabel`.',\n );\n }\n });\n }\n }\n\n protected onImgError(): void {\n const failed = this.displayedSrc();\n if (this.showFallback()) this.fallbackImgFailed.set(true);\n else this.primaryImgFailed.set(true);\n if (failed) this.loadFailed.emit(failed);\n }\n\n private resolveLocal(filename: string | undefined): string {\n if (!filename) return '';\n const mode = this.themeService.currentMode();\n const brand = this.brandService.currentBrand();\n\n const fileEntry = this.assetsMap[filename];\n if (!fileEntry) return '';\n\n if (fileEntry[brand]) {\n const path = this.resolvePath(brand, fileEntry[brand], mode, filename);\n if (path) return path;\n }\n\n if (fileEntry['common']) {\n return this.buildPath('common', fileEntry['common'], mode, filename);\n }\n\n return '';\n }\n\n private resolvePath(\n themeFolder: string,\n variants: ModeMap,\n currentMode: 'light' | 'dark',\n filename: string,\n ): string | null {\n if (variants[currentMode]) {\n const type = variants[currentMode]!;\n return `assets/img/${themeFolder}/${type}/${currentMode}/${filename}`;\n }\n\n if (variants.base) {\n const type = variants.base;\n return `assets/img/${themeFolder}/${type}/${filename}`;\n }\n\n return null;\n }\n\n private buildPath(\n themeName: string,\n variants: ModeMap,\n currentMode: 'light' | 'dark',\n filename: string,\n ): string {\n if (variants[currentMode]) {\n const type = variants[currentMode]!;\n return `assets/img/${themeName}/${type}/${currentMode}/${filename}`;\n }\n\n if (variants.base) {\n const type = variants.base;\n return `assets/img/${themeName}/${type}/${filename}`;\n }\n\n return '';\n }\n}\n","<!-- The media is written once and rendered either bare, or inside the preview\n trigger — a `<button>` cannot wrap three `@else if` branches otherwise. -->\n<ng-template #media>\n @if (securedLoading()) {\n <div\n class=\"ui-image-placeholder _loading\"\n [style.width]=\"cssWidth()\"\n [style.height]=\"cssHeight()\"\n >\n <ui-spinner size=\"small\" [label]=\"loadingLabel()\" [ariaLabel]=\"loadingAriaLabel()\" />\n </div>\n } @else if (showPlaceholder()) {\n <div\n class=\"ui-image-placeholder\"\n [style.width]=\"cssWidth()\"\n [style.height]=\"cssHeight()\"\n [attr.role]=\"alt() ? 'img' : null\"\n [attr.aria-label]=\"alt() || null\"\n [attr.aria-hidden]=\"alt() ? null : true\"\n >\n <ui-icon name=\"image\" />\n </div>\n } @else if (isInlineSvg() && !primaryFailed()) {\n <!--\n EXCEPTION JUSTIFIÉE (FSHSP-177) : le SVG local est inliné pour hériter du CSS\n (currentColor, thème) — un <img> ne le permet pas. La valeur est assainie par\n sanitizeInlineSvg() puis passée à bypassSecurityTrustHtml() dans ui-image.ts.\n Registre : docs/SECURITY-PRACTICES.md.\n Une paire disable/enable et non un disable-next-line : un commentaire HTML ne\n peut pas se glisser à l'intérieur d'une balise ouvrante.\n -->\n <!-- eslint-disable no-restricted-syntax -->\n <div\n class=\"ui-image-svg\"\n [style.width]=\"cssWidth()\"\n [style.height]=\"cssHeight()\"\n [innerHTML]=\"svgContent()\"\n ></div>\n <!-- eslint-enable no-restricted-syntax -->\n } @else if (isRawSrc()) {\n <!-- `blob:` / `data:` : NgOptimizedImage refuses both, a plain <img> shows them. -->\n <img\n class=\"ui-image\"\n [src]=\"displayedSrc()!\"\n [alt]=\"alt() || ''\"\n [style.width]=\"!fill() ? cssWidth() : null\"\n [style.height]=\"!fill() ? cssHeight() : null\"\n [attr.loading]=\"priority() ? null : 'lazy'\"\n [attr.fetchpriority]=\"priority() ? 'high' : null\"\n (error)=\"onImgError()\"\n />\n } @else {\n <img\n class=\"ui-image\"\n [ngSrc]=\"displayedSrc()!\"\n [alt]=\"alt() || ''\"\n [width]=\"!fill() ? width() : null\"\n [height]=\"!fill() ? (height() ? height() : width()) : null\"\n [fill]=\"fill()\"\n [priority]=\"priority()\"\n (error)=\"onImgError()\"\n />\n }\n</ng-template>\n\n@if (canPreview()) {\n <button\n type=\"button\"\n class=\"ui-image-trigger\"\n aria-haspopup=\"dialog\"\n [attr.aria-label]=\"previewAriaLabel() || null\"\n (click)=\"previewVisible.set(true)\"\n >\n <ng-container [ngTemplateOutlet]=\"media\" />\n\n <!-- Decorative: the affordance is already carried by the button's role and\n its accessible name. -->\n <span class=\"ui-image-indicator\" aria-hidden=\"true\">\n @if (previewIndicator(); as indicator) {\n <ng-container [ngTemplateOutlet]=\"indicator\" />\n } @else {\n <ui-icon name=\"magnifying-glass-plus\" />\n }\n </span>\n </button>\n} @else {\n <ng-container [ngTemplateOutlet]=\"media\" />\n}\n\n@if (previewVisible()) {\n <ui-image-preview\n [src]=\"displayedSrc()!\"\n [alt]=\"alt() || ''\"\n [ariaLabel]=\"previewDialogAriaLabel()\"\n [zoomStep]=\"zoomStep()\"\n [minZoom]=\"minZoom()\"\n [maxZoom]=\"maxZoom()\"\n [downloadable]=\"downloadable()\"\n [downloadName]=\"downloadName()\"\n (closed)=\"previewVisible.set(false)\"\n [uiMotion]=\"'fade'\"\n #previewMotion=\"uiMotion\"\n [animate.enter]=\"previewMotion.enter()\"\n [animate.leave]=\"previewMotion.leave()\"\n />\n}\n","/*\n * Public API Surface of ui-kit/ui-image\n *\n * Includes `ui-image-preview`: it renders the source `ui-image` has already\n * resolved, so the two live in one entry point (a separate one would be a cycle).\n */\n\nexport * from './lib/ui-image-preview';\nexport * from './lib/ui-image';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAkBA;AACA,SAAS,KAAK,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW,EAAA;AACpD,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;AAC5C;AAEA;;;;;;;;;;;;;AAaG;MAOU,cAAc,CAAA;AA2DzB,IAAA,WAAA,GAA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AAA,MAAA,EAAA,mBAAA,EAAA,OAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,QAAQ,qQAAE,cAAc,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,KAAA,EAAA,KAAA,EAAA,WAAA,EAAA,UAAA,EAAA,SAAA,EAAA,SAAA,EAAA,cAAA,EAAA,cAAA,EAAA,iBAAA,EAAA,iBAAA,EAAA,kBAAA,EAAA,qBAAA,EAAA,sBAAA,EAAA,gBAAA,EAAA,mBAAA,EAAA,gBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAE9E,OAAO,EAAA,UAAA,EAAA,CAAA;kBANnB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,UAAU,EAAA,OAAA,EAGX,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,CAAC,EAAA,QAAA,EAAA,soHAAA,EAAA,MAAA,EAAA,CAAA,+xDAAA,CAAA,EAAA;u7EA2EjB,kBAAkB,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE3K7F;;;;;AAKG;;ACLH;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"4sh-ui-kit-base-ui-image.mjs","sources":["../../../projects/ui-kit/base/ui-image/src/lib/ui-image-preview.ts","../../../projects/ui-kit/base/ui-image/src/lib/ui-image-preview.html","../../../projects/ui-kit/base/ui-image/src/lib/ui-image-svg.ts","../../../projects/ui-kit/base/ui-image/src/lib/ui-image.ts","../../../projects/ui-kit/base/ui-image/src/lib/ui-image.html","../../../projects/ui-kit/base/ui-image/src/public-api.ts","../../../projects/ui-kit/base/ui-image/src/4sh-ui-kit-base-ui-image.ts"],"sourcesContent":["import {\n booleanAttribute,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n inject,\n input,\n numberAttribute,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { DOCUMENT } from '@angular/common';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { UiIcon } from '@4sh/ui-kit/base/ui-icon';\nimport { lockBodyScroll, unlockBodyScroll } from '@4sh/ui-kit/overlay';\n\n/** Clamp `value` into `[min, max]`. */\nfunction clamp(value: number, min: number, max: number): number {\n return Math.min(max, Math.max(min, value));\n}\n\n/**\n * ui-image-preview — the enlarged view (lightbox) opened by `ui-image`'s\n * `preview` mode.\n *\n * A viewport mask holding a toolbar (zoom in/out, rotate, reset, optional\n * download, close) and the image itself, which the three transforms drive\n * through a single `transform`: pan, scale, rotation. Zoom is reachable at the\n * pointer (toolbar, wheel) and at the keyboard (`+`/`-`/`0`/`r`, arrows to pan)\n * — a zoom a keyboard user cannot pan is a zoom they cannot read.\n *\n * Lives in `ui-image`'s entry point: it renders that component's resolved\n * source, so a separate entry point would be a cycle. Mount it directly only to\n * drive the enlarged view yourself.\n */\n@Component({\n selector: 'ui-image-preview',\n imports: [A11yModule, UiIcon],\n templateUrl: './ui-image-preview.html',\n styleUrl: './ui-image-preview.scss',\n})\nexport class UiImagePreview {\n private readonly document = inject(DOCUMENT);\n\n /** URL of the image to show enlarged (already resolved — `http(s)`, `blob:` or `data:`). */\n src = input.required<string>();\n /** Alt text of the enlarged image (empty = decorative). */\n alt = input<string>('');\n /** Accessible name of the dialog. */\n ariaLabel = input<string>('Aperçu de l’image');\n\n /** Zoom increment applied by one toolbar click, one wheel notch or one `+`/`-` press. */\n zoomStep = input(0.25, { transform: numberAttribute });\n /** Lower zoom bound. */\n minZoom = input(0.5, { transform: numberAttribute });\n /** Upper zoom bound. */\n maxZoom = input(4, { transform: numberAttribute });\n\n /** Offer a download action in the toolbar. */\n downloadable = input(false, { transform: booleanAttribute });\n /** Filename proposed by the download action (defaults to the browser's choice). */\n downloadName = input<string>();\n\n /** Close when the mask around the image is clicked. */\n dismissableMask = input(true, { transform: booleanAttribute });\n\n /** Accessible name of the zoom-in button. */\n zoomInAriaLabel = input('Zoom avant');\n /** Accessible name of the zoom-out button. */\n zoomOutAriaLabel = input('Zoom arrière');\n /** Accessible name of the rotate-left button. */\n rotateLeftAriaLabel = input('Pivoter vers la gauche');\n /** Accessible name of the rotate-right button. */\n rotateRightAriaLabel = input('Pivoter vers la droite');\n /** Accessible name of the button that resets zoom and rotation. */\n resetAriaLabel = input('Réinitialiser l’affichage');\n /** Accessible name of the download button. */\n downloadAriaLabel = input('Télécharger l’image');\n /** Accessible name of the close button. */\n closeAriaLabel = input('Fermer l’aperçu');\n\n /** Emitted when the view asks to be dismissed (Escape, close button, mask click). */\n closed = output<void>();\n\n private readonly stage = viewChild.required<ElementRef<HTMLElement>>('stage');\n\n protected readonly scale = signal(1);\n protected readonly rotation = signal(0);\n protected readonly panX = signal(0);\n protected readonly panY = signal(0);\n\n protected readonly canZoomIn = computed(() => this.scale() < this.maxZoom());\n protected readonly canZoomOut = computed(() => this.scale() > this.minZoom());\n /** Nothing to reset while the three transforms are at their neutral value. */\n protected readonly isPristine = computed(\n () => this.scale() === 1 && this.rotation() === 0 && this.panX() === 0 && this.panY() === 0,\n );\n /** Panning only makes sense once the image overflows its stage. */\n protected readonly canPan = computed(() => this.scale() > 1);\n /** A quarter turn: what is drawn no longer fits the layout box's axes. */\n protected readonly isQuarterTurned = computed(() => this.rotation() % 180 !== 0);\n\n protected readonly transform = computed(\n () =>\n `translate(${this.panX()}px, ${this.panY()}px) scale(${this.scale()}) rotate(${this.rotation()}deg)`,\n );\n\n constructor() {\n lockBodyScroll(this.document);\n inject(DestroyRef).onDestroy(() => unlockBodyScroll(this.document));\n }\n\n protected zoomIn(): void {\n this.setScale(this.scale() + this.zoomStep());\n }\n\n protected zoomOut(): void {\n this.setScale(this.scale() - this.zoomStep());\n }\n\n protected rotateLeft(): void {\n this.rotation.update((deg) => deg - 90);\n }\n\n protected rotateRight(): void {\n this.rotation.update((deg) => deg + 90);\n }\n\n protected reset(): void {\n this.scale.set(1);\n this.rotation.set(0);\n this.panX.set(0);\n this.panY.set(0);\n }\n\n protected close(): void {\n this.closed.emit();\n }\n\n /** A press that lands on the stage itself (not on the image) is a press outside. */\n protected onStagePointerDown(event: PointerEvent): void {\n if (this.dismissableMask() && event.target === this.stage().nativeElement) this.close();\n }\n\n protected onWheel(event: WheelEvent): void {\n event.preventDefault();\n this.setScale(this.scale() + (event.deltaY < 0 ? this.zoomStep() : -this.zoomStep()));\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n const step = 24;\n switch (event.key) {\n case 'Escape':\n this.close();\n break;\n case '+':\n case '=':\n this.zoomIn();\n break;\n case '-':\n this.zoomOut();\n break;\n case '0':\n this.reset();\n break;\n case 'r':\n case 'R':\n this.rotateRight();\n break;\n case 'ArrowLeft':\n this.panX.update((x) => x - step);\n break;\n case 'ArrowRight':\n this.panX.update((x) => x + step);\n break;\n case 'ArrowUp':\n this.panY.update((y) => y - step);\n break;\n case 'ArrowDown':\n this.panY.update((y) => y + step);\n break;\n default:\n return;\n }\n // Only a handled key is swallowed: Tab must keep cycling the focus trap.\n event.preventDefault();\n event.stopPropagation();\n }\n\n // --- Drag to pan ------------------------------------------------------\n private dragOrigin: { x: number; y: number; panX: number; panY: number } | null = null;\n\n protected onPointerDown(event: PointerEvent): void {\n if (!this.canPan() || event.button !== 0) return;\n this.dragOrigin = { x: event.clientX, y: event.clientY, panX: this.panX(), panY: this.panY() };\n (event.target as Element).setPointerCapture?.(event.pointerId);\n event.preventDefault();\n }\n\n protected onPointerMove(event: PointerEvent): void {\n const origin = this.dragOrigin;\n if (!origin) return;\n this.panX.set(origin.panX + (event.clientX - origin.x));\n this.panY.set(origin.panY + (event.clientY - origin.y));\n }\n\n protected onPointerUp(event: PointerEvent): void {\n if (!this.dragOrigin) return;\n this.dragOrigin = null;\n (event.target as Element).releasePointerCapture?.(event.pointerId);\n }\n\n private setScale(value: number): void {\n const next = clamp(Number(value.toFixed(4)), this.minZoom(), this.maxZoom());\n this.scale.set(next);\n // Back to fit: the pan offset would otherwise strand the image off-centre.\n if (next <= 1) {\n this.panX.set(0);\n this.panY.set(0);\n }\n }\n}\n","<!-- The host is the mask; this is the dialog that owns the focus, the keyboard\n shortcuts and the aria wiring. -->\n<div\n class=\"ui-image-preview\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"ariaLabel() || null\"\n tabindex=\"-1\"\n [cdkTrapFocus]=\"true\"\n [cdkTrapFocusAutoCapture]=\"true\"\n (keydown)=\"onKeydown($event)\"\n>\n <!-- Unavailable actions are `aria-disabled`, not `disabled`: a real `disabled`\n drops the focus to the body the moment the button that holds it hits a\n bound, and `Escape` then no longer reaches the dialog. The handlers clamp,\n so a press at the bound is a no-op. -->\n <div class=\"ui-image-preview-toolbar\">\n <button\n type=\"button\"\n class=\"ui-image-preview-action\"\n [attr.aria-label]=\"zoomOutAriaLabel() || null\"\n [attr.aria-disabled]=\"!canZoomOut() || null\"\n (click)=\"zoomOut()\"\n >\n <ui-icon name=\"magnifying-glass-minus\" size=\"sm\" />\n </button>\n\n <button\n type=\"button\"\n class=\"ui-image-preview-action\"\n [attr.aria-label]=\"zoomInAriaLabel() || null\"\n [attr.aria-disabled]=\"!canZoomIn() || null\"\n (click)=\"zoomIn()\"\n >\n <ui-icon name=\"magnifying-glass-plus\" size=\"sm\" />\n </button>\n\n <button\n type=\"button\"\n class=\"ui-image-preview-action\"\n [attr.aria-label]=\"rotateLeftAriaLabel() || null\"\n (click)=\"rotateLeft()\"\n >\n <ui-icon name=\"rotate-left\" size=\"sm\" />\n </button>\n\n <button\n type=\"button\"\n class=\"ui-image-preview-action\"\n [attr.aria-label]=\"rotateRightAriaLabel() || null\"\n (click)=\"rotateRight()\"\n >\n <ui-icon name=\"rotate-right\" size=\"sm\" />\n </button>\n\n <button\n type=\"button\"\n class=\"ui-image-preview-action\"\n [attr.aria-label]=\"resetAriaLabel() || null\"\n [attr.aria-disabled]=\"isPristine() || null\"\n (click)=\"reset()\"\n >\n <ui-icon name=\"arrows-rotate\" size=\"sm\" />\n </button>\n\n @if (downloadable()) {\n <a\n class=\"ui-image-preview-action\"\n [href]=\"src()\"\n [attr.download]=\"downloadName() || ''\"\n [attr.aria-label]=\"downloadAriaLabel() || null\"\n target=\"_blank\"\n rel=\"noopener\"\n >\n <ui-icon name=\"download\" size=\"sm\" />\n </a>\n }\n\n <button\n type=\"button\"\n class=\"ui-image-preview-action\"\n [attr.aria-label]=\"closeAriaLabel() || null\"\n (click)=\"close()\"\n >\n <ui-icon name=\"xmark\" size=\"sm\" />\n </button>\n </div>\n\n <!-- The stage is the dismiss-on-outside target: a press that lands on it, and\n not on the image, closes. Escape is its keyboard equivalent, which is why\n there is no key handler here. -->\n <div\n #stage\n class=\"ui-image-preview-stage\"\n (pointerdown)=\"onStagePointerDown($event)\"\n (wheel)=\"onWheel($event)\"\n >\n <img\n class=\"ui-image-preview-media\"\n [class._pannable]=\"canPan()\"\n [class._rotated]=\"isQuarterTurned()\"\n [src]=\"src()\"\n [alt]=\"alt()\"\n [style.transform]=\"transform()\"\n (pointerdown)=\"onPointerDown($event)\"\n (pointermove)=\"onPointerMove($event)\"\n (pointerup)=\"onPointerUp($event)\"\n (pointercancel)=\"onPointerUp($event)\"\n draggable=\"false\"\n />\n </div>\n</div>\n","/**\n * Assainissement des SVG inlinés par `ui-image`.\n *\n * Angular's HTML sanitizer strips `<svg>` wholesale, so inlining an SVG — which\n * is what lets the asset inherit `currentColor` and the theme's CSS — has no\n * choice but to go through `bypassSecurityTrustHtml()`. That bypass is only\n * defensible if the markup has already been scrubbed here, which is the single\n * reason this file exists. See `docs/SECURITY-PRACTICES.md`.\n *\n * The threat model is not \"the kit's own assets\": it is a project serving\n * `assets/img/` from a CDN, or letting a client drop its own logo in a brand\n * folder (white-label). In both cases the SVG is markup of unknown origin\n * rendered into the application's own origin.\n */\n\n/**\n * Tags dropped WITH their content — unwrapping them would put their body in the\n * document as text, or leave the vector intact.\n *\n * `foreignObject` re-opens the whole HTML namespace inside the SVG, and the SMIL\n * elements (`animate`, `set`…) can retarget an attribute *after* this scrub ran.\n */\nconst VOIDED_TAGS =\n 'script, foreignObject, iframe, object, embed, animate, animateTransform, animateMotion, set, handler';\n\n/** Attributes carrying a reference — the only ones allowed to name a target. */\nconst REF_ATTRS = new Set(['href', 'xlink:href', 'src']);\n\n/** A reference either stays inside the document, or navigates over http(s). */\nconst ALLOWED_REF_PROTOCOLS = ['http:', 'https:'];\n\n/**\n * Strips from an SVG everything that can execute or fetch, and returns the\n * scrubbed markup.\n *\n * Parsing happens inside a detached `<template>`: its content is inert, so\n * nothing runs and nothing is fetched while we inspect it. Returns `''` when\n * there is no DOM to parse with (SSR) — failing closed, since un-scrubbed\n * markup must never reach the bypass.\n */\nexport function sanitizeInlineSvg(raw: string): string {\n if (typeof document === 'undefined') return '';\n\n const template = document.createElement('template');\n /* eslint-disable-next-line no-restricted-syntax -- EXCEPTION JUSTIFIÉE : on\n écrit DANS un `<template>` détaché, dont le contenu est inerte — rien ne\n s'exécute et rien n'est chargé. C'est l'étape de PARSING du scrub, pas une\n injection dans le document. Registre : docs/SECURITY-PRACTICES.md. */\n template.innerHTML = raw;\n\n for (const el of Array.from(template.content.querySelectorAll(VOIDED_TAGS))) el.remove();\n\n for (const el of Array.from(template.content.querySelectorAll('*'))) {\n for (const attr of Array.from(el.attributes)) {\n const name = attr.name.toLowerCase();\n // Every event handler, whatever the element it sits on.\n if (name.startsWith('on')) {\n el.removeAttributeNode(attr);\n continue;\n }\n if (REF_ATTRS.has(name) && !isSafeRef(attr.value)) el.removeAttributeNode(attr);\n }\n }\n\n return template.innerHTML;\n}\n\n/** @internal Rejects `javascript:`, `data:` and the other non-navigational schemes. */\nfunction isSafeRef(value: string): boolean {\n const ref = value.trim();\n // `<use href=\"#icon\">` — a same-document reference names no external target.\n if (ref.startsWith('#')) return true;\n try {\n return ALLOWED_REF_PROTOCOLS.includes(new URL(ref, document.baseURI).protocol);\n } catch {\n return false;\n }\n}\n","import {\n booleanAttribute,\n Component,\n computed,\n contentChild,\n effect,\n inject,\n InjectionToken,\n input,\n isDevMode,\n linkedSignal,\n model,\n numberAttribute,\n output,\n PLATFORM_ID,\n Provider,\n signal,\n TemplateRef,\n} from '@angular/core';\nimport { isPlatformBrowser, NgOptimizedImage, NgTemplateOutlet } from '@angular/common';\nimport { httpResource } from '@angular/common/http';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\nimport { ThemeService } from '@4sh/ui-kit/theming';\nimport { BrandService } from '@4sh/ui-kit/theming';\nimport { UiIcon } from '@4sh/ui-kit/base/ui-icon';\nimport { UiSpinner } from '@4sh/ui-kit/informative/ui-spinner';\nimport { UiMotion } from '@4sh/ui-kit/motion';\nimport { sanitizeInlineSvg } from './ui-image-svg';\nimport { UiImagePreview } from './ui-image-preview';\n\ninterface ModeMap {\n base?: string;\n light?: string;\n dark?: string;\n}\ntype ThemeMap = Record<string, ModeMap>;\n/** filename → { brand|'common' → { base|light|dark → extension } }. */\nexport type UiImageAssetsMap = Record<string, ThemeMap>;\n\n/**\n * Map of the LOCAL assets available to `ui-image` (its `name` input).\n *\n * The kit cannot know a project's assets, so the map is injected rather than\n * bundled: generate it in your app (see the `generate:assets` script in the\n * starter, which writes `src/assets/assets-map.json`) and provide it with\n * `provideUiImageAssets()`. Without it, `name` resolves to nothing and the\n * component falls back to its placeholder — `src` (remote URLs) still works.\n */\nexport const UI_IMAGE_ASSETS = new InjectionToken<UiImageAssetsMap>('UI_IMAGE_ASSETS');\n\n/**\n * Registers the local asset map consumed by `ui-image`.\n *\n * ```ts\n * import assetsMap from './assets/assets-map.json';\n * providers: [provideUiImageAssets(assetsMap)]\n * ```\n */\nexport function provideUiImageAssets(map: UiImageAssetsMap): Provider {\n return { provide: UI_IMAGE_ASSETS, useValue: map };\n}\n\n/**\n * Cross-instance memoization: the same resolved URL is fetched once (logos\n * repeated across the app).\n *\n * Holds the **scrubbed** markup, never the raw response — nothing that skipped\n * `sanitizeInlineSvg()` may ever be read back out of here.\n */\nconst SVG_CACHE = new Map<string, string>();\n\n/** Payload carried in the URL itself (`data:image/png;base64,…`). */\nconst DATA_URL = /^data:/i;\n\n/**\n * ui-image — theme/brand-aware image.\n *\n * Three sources: `name` (local asset key resolved through `assets-map.json`,\n * theme/brand variants), `src` (remote/absolute URL — takes precedence), and\n * `src` + `secured` (the URL is fetched through `HttpClient`, so the app's\n * interceptors authenticate it, and the response `Blob` is shown from an object\n * URL revoked with the component).\n * Local `.svg` assets are inlined (`innerHTML`) so they can inherit CSS — after\n * being scrubbed by `sanitizeInlineSvg()`; remote URLs always render through\n * `<img [ngSrc]>` (never inlined), except `data:`/`blob:` payloads, which\n * `NgOptimizedImage` rejects and a plain `<img>` renders.\n * On load failure the `fallback` local asset is shown, then a token-styled\n * placeholder if the fallback also fails (or none is provided).\n *\n * `preview` turns the image into a trigger for the enlarged view\n * (`ui-image-preview`): zoom, rotation, pan, reset, optional download.\n */\n@Component({\n selector: 'ui-image',\n templateUrl: './ui-image.html',\n styleUrl: './ui-image.scss',\n imports: [NgOptimizedImage, NgTemplateOutlet, UiIcon, UiSpinner, UiMotion, UiImagePreview],\n})\nexport class UiImage {\n private readonly sanitizer = inject(DomSanitizer);\n private readonly assetsMap = inject(UI_IMAGE_ASSETS, { optional: true }) ?? {};\n private readonly themeService = inject(ThemeService);\n private readonly brandService = inject(BrandService);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n /** Local asset key in `assets-map.json` (theme/brand-aware resolution). */\n name = input<string>();\n /** Remote/absolute URL, rendered via `NgOptimizedImage` — takes precedence over `name`. */\n src = input<string>();\n /** Local asset name (`assets-map.json` key) displayed when the main image fails to load. */\n fallback = input<string>();\n /** Loads the image eagerly with a high fetch priority (above-the-fold images); lazy otherwise. */\n priority = input(false);\n /** Fills the parent box instead of using `width`/`height` (the parent must be positioned). */\n fill = input(false);\n /** Rendered width; a number is read in `widthUnit`. */\n width = input<string | number>();\n /** Unit of a numeric `width` (`px` when absent). */\n widthUnit = input<string>();\n /** Rendered height; a number is read in `heightUnit`. Absent: the image keeps its ratio. */\n height = input<string | number>();\n /** Unit of a numeric `height` (`px` when absent). */\n heightUnit = input<string>();\n /** Alternative text. Absent: the image is decorative (`aria-hidden`). */\n alt = input<string>();\n\n /**\n * Fetch `src` through `HttpClient` instead of letting the browser load it.\n *\n * That is what an endpoint behind an `Authorization` header needs: an `<img\n * src>` is a plain browser request, which carries no interceptor and no\n * bearer token. The response `Blob` is shown from an object URL, revoked as\n * soon as the source changes or the component goes away.\n *\n * Cross-origin still applies: the endpoint must answer the CORS preflight\n * (`Access-Control-Allow-Origin`, and `Access-Control-Allow-Headers` for the\n * auth header) — an `<img>` would have displayed it without any of that.\n */\n secured = input(false, { transform: booleanAttribute });\n /** Send cookies/TLS credentials with the `secured` request (cross-origin sessions). */\n withCredentials = input(false, { transform: booleanAttribute });\n /** Visible text of the loading indicator shown while a `secured` fetch is in flight. */\n loadingLabel = input<string>();\n /** Accessible name of that loading indicator. */\n loadingAriaLabel = input('Chargement de l’image');\n\n /** Clicking the image opens the enlarged view (`ui-image-preview`). */\n preview = input(false, { transform: booleanAttribute });\n /** Enlarged view open state (two-way — set it to open the preview yourself). */\n previewVisible = model(false);\n /** Accessible name of the trigger (defaults to the image's own `alt`). */\n previewAriaLabel = input<string>();\n /** Accessible name of the enlarged view dialog. */\n previewDialogAriaLabel = input('Aperçu de l’image');\n /** Zoom increment of one toolbar click, wheel notch or `+`/`-` press in the preview. */\n zoomStep = input(0.25, { transform: numberAttribute });\n /** Lower zoom bound in the preview. */\n minZoom = input(0.5, { transform: numberAttribute });\n /** Upper zoom bound in the preview. */\n maxZoom = input(4, { transform: numberAttribute });\n /** Offer a download action in the preview toolbar. */\n downloadable = input(false, { transform: booleanAttribute });\n /** Filename proposed by that download action. */\n downloadName = input<string>();\n\n /** Emitted with the failed URL when an image fails to load. */\n loadFailed = output<string>();\n\n /**\n * Replaces the hover indicator of the `preview` mode (the magnifier). Rendered\n * over the image, decorative — the accessible name stays on the trigger.\n *\n * ```html\n * <ui-image src=\"…\" preview>\n * <ng-template #previewIndicator>Agrandir</ng-template>\n * </ui-image>\n * ```\n */\n protected readonly previewIndicator = contentChild<TemplateRef<unknown>>('previewIndicator');\n\n protected readonly isRemote = computed(() => !!this.src());\n /** Inline SVG is reserved for LOCAL assets — a remote `.svg` renders through `<img>` (no XSS surface). */\n protected readonly isInlineSvg = computed(\n () => !this.isRemote() && !!this.name()?.toLowerCase().endsWith('.svg'),\n );\n /** `secured` only means anything with a `src` to fetch. */\n protected readonly isSecured = computed(() => this.secured() && !!this.src());\n /** A `data:` payload is already the image — `NgOptimizedImage` refuses it. */\n protected readonly isDataUrl = computed(() => DATA_URL.test(this.src() ?? ''));\n\n protected readonly localSrc = computed(() => this.resolveLocal(this.name()));\n protected readonly fallbackSrc = computed(() => this.resolveLocal(this.fallback()));\n\n // --- Secured source (HttpClient → Blob → object URL) ------------------\n private readonly blobResource = httpResource.blob(() =>\n this.isSecured() ? { url: this.src()!, withCredentials: this.withCredentials() } : undefined,\n );\n private readonly blobUrl = signal<string | null>(null);\n\n protected readonly securedLoading = computed(\n () => this.isSecured() && this.blobResource.isLoading(),\n );\n private readonly securedFailed = computed(\n () => this.isSecured() && this.blobResource.status() === 'error',\n );\n\n protected readonly primarySrc = computed(() =>\n this.isSecured() ? (this.blobUrl() ?? '') : this.src() || this.localSrc(),\n );\n\n // Failure flags auto-reset when their source URL changes (theme/brand/src swap → automatic retry).\n private readonly primaryImgFailed = linkedSignal({\n source: this.primarySrc,\n computation: () => false,\n });\n private readonly fallbackImgFailed = linkedSignal({\n source: this.fallbackSrc,\n computation: () => false,\n });\n\n private readonly svgResource = httpResource.text(() => {\n if (!this.isInlineSvg()) return undefined;\n const url = this.localSrc();\n return !url || SVG_CACHE.has(url) ? undefined : url;\n });\n\n /**\n * The inlined SVG, scrubbed then trusted.\n *\n * FSHSP-177 — this is the kit's ONLY `bypassSecurityTrust*()`. It is not\n * avoidable: Angular's HTML sanitizer strips `<svg>` wholesale, so passing the\n * asset through `sanitize(SecurityContext.HTML, …)` would render nothing, and\n * inlining is the whole point (the asset inherits `currentColor` and the\n * theme's CSS — an `<img>` cannot). What makes the bypass defensible is that\n * the markup went through `sanitizeInlineSvg()` first: scripts, `foreignObject`,\n * SMIL, event handlers and non-navigational references are already gone.\n * Justified in `docs/SECURITY-PRACTICES.md`.\n */\n protected readonly svgContent = computed<SafeHtml | null>(() => {\n if (!this.isInlineSvg()) return null;\n const url = this.localSrc();\n if (!url) return null;\n const safe =\n SVG_CACHE.get(url) ??\n (this.svgResource.hasValue() ? sanitizeInlineSvg(this.svgResource.value()) : undefined);\n /* eslint-disable-next-line no-restricted-syntax -- EXCEPTION JUSTIFIÉE :\n seul bypass du kit. Inévitable (l'assainisseur d'Angular supprime `<svg>`\n en entier) et sûr parce que `sanitizeInlineSvg()` a déjà retiré scripts,\n foreignObject, SMIL, gestionnaires d'événements et références non\n navigationnelles. Registre : docs/SECURITY-PRACTICES.md. */\n return safe === undefined ? null : this.sanitizer.bypassSecurityTrustHtml(safe);\n });\n\n protected readonly primaryFailed = computed(() => {\n if (this.isInlineSvg()) return this.svgResource.status() === 'error';\n return this.securedFailed() || this.primaryImgFailed();\n });\n protected readonly showFallback = computed(\n () => this.primaryFailed() && !!this.fallbackSrc() && !this.fallbackImgFailed(),\n );\n protected readonly showPlaceholder = computed(\n () =>\n !this.securedLoading() &&\n (!this.primarySrc() ||\n (this.primaryFailed() && (!this.fallbackSrc() || this.fallbackImgFailed()))),\n );\n protected readonly displayedSrc = computed(() =>\n this.showFallback() ? this.fallbackSrc() : this.primarySrc(),\n );\n /** `blob:`/`data:` bypass `NgOptimizedImage`; a local fallback never does. */\n protected readonly isRawSrc = computed(\n () => !this.showFallback() && (this.isSecured() || this.isDataUrl()),\n );\n\n /** The image is a preview trigger only once there is something to enlarge. */\n protected readonly canPreview = computed(\n () => this.preview() && !this.showPlaceholder() && !this.securedLoading(),\n );\n\n protected readonly cssWidth = computed(() =>\n this.width() != null ? `${this.width()}${this.widthUnit() || 'px'}` : null,\n );\n protected readonly cssHeight = computed(() =>\n this.height() != null ? `${this.height()}${this.heightUnit() || 'px'}` : null,\n );\n\n constructor() {\n // Side effect only: populate the module-level SVG cache once a fetch\n // resolves. Scrubbed on the way in — the cache is read straight into the\n // bypass, so it must never hold a raw response.\n effect(() => {\n if (!this.isInlineSvg()) return;\n const url = this.localSrc();\n if (url && this.svgResource.hasValue())\n SVG_CACHE.set(url, sanitizeInlineSvg(this.svgResource.value()));\n });\n\n // The object URL's whole lifetime: created when a Blob arrives, revoked by\n // the cleanup — which runs before the next source AND on destroy. That is\n // what keeps a list of secured images from leaking one URL per render.\n effect((onCleanup) => {\n const blob = this.blobResource.hasValue() ? this.blobResource.value() : undefined;\n if (!blob || !this.isBrowser) {\n this.blobUrl.set(null);\n return;\n }\n const url = URL.createObjectURL(blob);\n this.blobUrl.set(url);\n onCleanup(() => URL.revokeObjectURL(url));\n });\n\n // A failed fetch never reaches an `<img>`, so `(error)` cannot report it.\n effect(() => {\n if (this.securedFailed()) this.loadFailed.emit(this.src()!);\n });\n\n // Nothing left to enlarge (source swapped, load failed): close rather than\n // leave the dialog on a stale image.\n effect(() => {\n if (this.previewVisible() && !this.canPreview()) this.previewVisible.set(false);\n });\n\n if (isDevMode()) {\n effect(() => {\n if (this.src() && this.name()) {\n console.warn('[ui-image] `src` and `name` are both set — `src` takes precedence.');\n }\n if (!this.src() && !this.name()) {\n console.warn(\n '[ui-image] Neither `src` nor `name` is set — the placeholder is displayed.',\n );\n }\n if (this.secured() && !this.src()) {\n console.warn('[ui-image] `secured` has no effect without `src` — nothing to fetch.');\n }\n if (this.preview() && !this.alt() && !this.previewAriaLabel()) {\n console.warn(\n '[ui-image] `preview` renders a button with no accessible name — set `alt` or `previewAriaLabel`.',\n );\n }\n });\n }\n }\n\n protected onImgError(): void {\n const failed = this.displayedSrc();\n if (this.showFallback()) this.fallbackImgFailed.set(true);\n else this.primaryImgFailed.set(true);\n if (failed) this.loadFailed.emit(failed);\n }\n\n private resolveLocal(filename: string | undefined): string {\n if (!filename) return '';\n const mode = this.themeService.currentMode();\n const brand = this.brandService.currentBrand();\n\n const fileEntry = this.assetsMap[filename];\n if (!fileEntry) return '';\n\n if (fileEntry[brand]) {\n const path = this.resolvePath(brand, fileEntry[brand], mode, filename);\n if (path) return path;\n }\n\n if (fileEntry['common']) {\n return this.buildPath('common', fileEntry['common'], mode, filename);\n }\n\n return '';\n }\n\n private resolvePath(\n themeFolder: string,\n variants: ModeMap,\n currentMode: 'light' | 'dark',\n filename: string,\n ): string | null {\n if (variants[currentMode]) {\n const type = variants[currentMode]!;\n return `assets/img/${themeFolder}/${type}/${currentMode}/${filename}`;\n }\n\n if (variants.base) {\n const type = variants.base;\n return `assets/img/${themeFolder}/${type}/${filename}`;\n }\n\n return null;\n }\n\n private buildPath(\n themeName: string,\n variants: ModeMap,\n currentMode: 'light' | 'dark',\n filename: string,\n ): string {\n if (variants[currentMode]) {\n const type = variants[currentMode]!;\n return `assets/img/${themeName}/${type}/${currentMode}/${filename}`;\n }\n\n if (variants.base) {\n const type = variants.base;\n return `assets/img/${themeName}/${type}/${filename}`;\n }\n\n return '';\n }\n}\n","<!-- The media is written once and rendered either bare, or inside the preview\n trigger — a `<button>` cannot wrap three `@else if` branches otherwise. -->\n<ng-template #media>\n @if (securedLoading()) {\n <div\n class=\"ui-image-placeholder _loading\"\n [style.width]=\"cssWidth()\"\n [style.height]=\"cssHeight()\"\n >\n <ui-spinner size=\"small\" [label]=\"loadingLabel()\" [ariaLabel]=\"loadingAriaLabel()\" />\n </div>\n } @else if (showPlaceholder()) {\n <div\n class=\"ui-image-placeholder\"\n [style.width]=\"cssWidth()\"\n [style.height]=\"cssHeight()\"\n [attr.role]=\"alt() ? 'img' : null\"\n [attr.aria-label]=\"alt() || null\"\n [attr.aria-hidden]=\"alt() ? null : true\"\n >\n <ui-icon name=\"image\" />\n </div>\n } @else if (isInlineSvg() && !primaryFailed()) {\n <!--\n EXCEPTION JUSTIFIÉE (FSHSP-177) : le SVG local est inliné pour hériter du CSS\n (currentColor, thème) — un <img> ne le permet pas. La valeur est assainie par\n sanitizeInlineSvg() puis passée à bypassSecurityTrustHtml() dans ui-image.ts.\n Registre : docs/SECURITY-PRACTICES.md.\n Une paire disable/enable et non un disable-next-line : un commentaire HTML ne\n peut pas se glisser à l'intérieur d'une balise ouvrante.\n -->\n <!-- eslint-disable no-restricted-syntax -->\n <div\n class=\"ui-image-svg\"\n [style.width]=\"cssWidth()\"\n [style.height]=\"cssHeight()\"\n [innerHTML]=\"svgContent()\"\n ></div>\n <!-- eslint-enable no-restricted-syntax -->\n } @else if (isRawSrc()) {\n <!-- `blob:` / `data:` : NgOptimizedImage refuses both, a plain <img> shows them. -->\n <img\n class=\"ui-image\"\n [src]=\"displayedSrc()!\"\n [alt]=\"alt() || ''\"\n [style.width]=\"!fill() ? cssWidth() : null\"\n [style.height]=\"!fill() ? cssHeight() : null\"\n [attr.loading]=\"priority() ? null : 'lazy'\"\n [attr.fetchpriority]=\"priority() ? 'high' : null\"\n (error)=\"onImgError()\"\n />\n } @else {\n <img\n class=\"ui-image\"\n [ngSrc]=\"displayedSrc()!\"\n [alt]=\"alt() || ''\"\n [width]=\"!fill() ? width() : null\"\n [height]=\"!fill() ? (height() ? height() : width()) : null\"\n [fill]=\"fill()\"\n [priority]=\"priority()\"\n (error)=\"onImgError()\"\n />\n }\n</ng-template>\n\n@if (canPreview()) {\n <button\n type=\"button\"\n class=\"ui-image-trigger\"\n aria-haspopup=\"dialog\"\n [attr.aria-label]=\"previewAriaLabel() || null\"\n (click)=\"previewVisible.set(true)\"\n >\n <ng-container [ngTemplateOutlet]=\"media\" />\n\n <!-- Decorative: the affordance is already carried by the button's role and\n its accessible name. -->\n <span class=\"ui-image-indicator\" aria-hidden=\"true\">\n @if (previewIndicator(); as indicator) {\n <ng-container [ngTemplateOutlet]=\"indicator\" />\n } @else {\n <ui-icon name=\"magnifying-glass-plus\" />\n }\n </span>\n </button>\n} @else {\n <ng-container [ngTemplateOutlet]=\"media\" />\n}\n\n@if (previewVisible()) {\n <ui-image-preview\n [src]=\"displayedSrc()!\"\n [alt]=\"alt() || ''\"\n [ariaLabel]=\"previewDialogAriaLabel()\"\n [zoomStep]=\"zoomStep()\"\n [minZoom]=\"minZoom()\"\n [maxZoom]=\"maxZoom()\"\n [downloadable]=\"downloadable()\"\n [downloadName]=\"downloadName()\"\n (closed)=\"previewVisible.set(false)\"\n [uiMotion]=\"'fade'\"\n #previewMotion=\"uiMotion\"\n [animate.enter]=\"previewMotion.enter()\"\n [animate.leave]=\"previewMotion.leave()\"\n />\n}\n","/*\n * Public API Surface of ui-kit/ui-image\n *\n * Includes `ui-image-preview`: it renders the source `ui-image` has already\n * resolved, so the two live in one entry point (a separate one would be a cycle).\n */\n\nexport * from './lib/ui-image-preview';\nexport * from './lib/ui-image';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAkBA;AACA,SAAS,KAAK,CAAC,KAAa,EAAE,GAAW,EAAE,GAAW,EAAA;AACpD,IAAA,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;AAC5C;AAEA;;;;;;;;;;;;;AAaG;MAOU,cAAc,CAAA;AAkEzB,IAAA,WAAA,GAAA;AAjEiB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;;QAG5C,IAAA,CAAA,GAAG,GAAG,KAAK,CAAC,QAAQ;gFAAU;;QAE9B,IAAA,CAAA,GAAG,GAAG,KAAK,CAAS,EAAE;gFAAC;;QAEvB,IAAA,CAAA,SAAS,GAAG,KAAK,CAAS,mBAAmB;sFAAC;;QAG9C,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,IAAI,gFAAI,SAAS,EAAE,eAA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