@4sh/ui-kit 0.15.0 → 0.17.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.
Files changed (220) hide show
  1. package/README.fr.md +18 -10
  2. package/README.md +18 -10
  3. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +542 -150
  4. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
  5. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +622 -248
  6. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
  7. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +385 -152
  8. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
  9. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +748 -433
  10. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -1
  11. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +227 -135
  12. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs.map +1 -1
  13. package/fesm2022/4sh-ui-kit-base-ui-image.mjs +1200 -633
  14. package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
  15. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +1675 -953
  16. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
  17. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +243 -117
  18. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
  19. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +2294 -2039
  20. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
  21. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +1058 -1113
  22. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -1
  23. package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs +1108 -0
  24. package/fesm2022/4sh-ui-kit-forms-ui-field-sign.mjs.map +1 -0
  25. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +397 -141
  26. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
  27. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +1529 -583
  28. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
  29. package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs +383 -224
  30. package/fesm2022/4sh-ui-kit-forms-ui-input-date.mjs.map +1 -1
  31. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +345 -177
  32. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
  33. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +280 -130
  34. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
  35. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +507 -246
  36. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
  37. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +401 -291
  38. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
  39. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +1277 -697
  40. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
  41. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +467 -194
  42. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
  43. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +394 -270
  44. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -1
  45. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +140 -60
  46. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
  47. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +386 -167
  48. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
  49. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +150 -87
  50. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
  51. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +345 -180
  52. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
  53. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +582 -392
  54. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
  55. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +1552 -888
  56. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
  57. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +485 -338
  58. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
  59. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +503 -311
  60. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -1
  61. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +271 -131
  62. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
  63. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs +457 -214
  64. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs.map +1 -1
  65. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +711 -371
  66. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -1
  67. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +235 -121
  68. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
  69. package/fesm2022/4sh-ui-kit-forms.mjs +723 -596
  70. package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
  71. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +546 -242
  72. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
  73. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +335 -157
  74. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
  75. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +53 -33
  76. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs.map +1 -1
  77. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +218 -121
  78. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
  79. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +192 -100
  80. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
  81. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +456 -204
  82. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
  83. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +314 -147
  84. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
  85. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +179 -82
  86. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
  87. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +268 -123
  88. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
  89. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +391 -146
  90. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
  91. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +158 -76
  92. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
  93. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +159 -80
  94. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs.map +1 -1
  95. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +295 -131
  96. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
  97. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +211 -83
  98. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
  99. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +784 -414
  100. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
  101. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +822 -476
  102. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
  103. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs +1014 -599
  104. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs.map +1 -1
  105. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +403 -189
  106. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
  107. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +707 -272
  108. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
  109. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +1146 -568
  110. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
  111. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +519 -308
  112. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
  113. package/fesm2022/4sh-ui-kit-motion.mjs +252 -150
  114. package/fesm2022/4sh-ui-kit-motion.mjs.map +1 -1
  115. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +793 -341
  116. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -1
  117. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +351 -194
  118. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
  119. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +511 -220
  120. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
  121. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +910 -548
  122. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
  123. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +1128 -555
  124. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
  125. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +915 -470
  126. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
  127. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +931 -474
  128. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
  129. package/fesm2022/4sh-ui-kit-overlay.mjs +26 -109
  130. package/fesm2022/4sh-ui-kit-overlay.mjs.map +1 -1
  131. package/fesm2022/4sh-ui-kit-ripple.mjs +329 -290
  132. package/fesm2022/4sh-ui-kit-ripple.mjs.map +1 -1
  133. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +709 -248
  134. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
  135. package/fesm2022/4sh-ui-kit-table-ui-table.mjs +2633 -1370
  136. package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
  137. package/fesm2022/4sh-ui-kit-theming.mjs +112 -113
  138. package/fesm2022/4sh-ui-kit-theming.mjs.map +1 -1
  139. package/fesm2022/4sh-ui-kit-types.mjs +0 -12
  140. package/fesm2022/4sh-ui-kit.mjs +3 -15
  141. package/fesm2022/4sh-ui-kit.mjs.map +1 -1
  142. package/mcp/data/component-api.json +313 -2
  143. package/mcp/data/text-search-docs.json +177 -17
  144. package/mcp/data/ui-config.json +378 -1
  145. package/mcp/index.js +8190 -2876
  146. package/mcp/package.json +1 -1
  147. package/package.json +5 -1
  148. package/styles/component-vars.scss +22 -1
  149. package/styles/utils/_mixins.scss +11 -0
  150. package/types/4sh-ui-kit-actions-ui-button-split.d.ts +198 -87
  151. package/types/4sh-ui-kit-actions-ui-button.d.ts +240 -116
  152. package/types/4sh-ui-kit-actions-ui-link.d.ts +136 -67
  153. package/types/4sh-ui-kit-actions-ui-speed-dial.d.ts +287 -180
  154. package/types/4sh-ui-kit-base-ui-icon.d.ts +92 -58
  155. package/types/4sh-ui-kit-base-ui-image.d.ts +406 -205
  156. package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +577 -367
  157. package/types/4sh-ui-kit-forms-ui-checkbox.d.ts +77 -42
  158. package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +953 -700
  159. package/types/4sh-ui-kit-forms-ui-editor.d.ts +374 -340
  160. package/types/4sh-ui-kit-forms-ui-field-sign.d.ts +325 -0
  161. package/types/4sh-ui-kit-forms-ui-field.d.ts +150 -64
  162. package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +583 -241
  163. package/types/4sh-ui-kit-forms-ui-input-date.d.ts +152 -103
  164. package/types/4sh-ui-kit-forms-ui-input-group.d.ts +109 -63
  165. package/types/4sh-ui-kit-forms-ui-input-mask.d.ts +93 -57
  166. package/types/4sh-ui-kit-forms-ui-input-number.d.ts +171 -93
  167. package/types/4sh-ui-kit-forms-ui-input-otp.d.ts +137 -100
  168. package/types/4sh-ui-kit-forms-ui-input-tags.d.ts +469 -309
  169. package/types/4sh-ui-kit-forms-ui-input.d.ts +198 -116
  170. package/types/4sh-ui-kit-forms-ui-knob.d.ts +132 -80
  171. package/types/4sh-ui-kit-forms-ui-label.d.ts +47 -22
  172. package/types/4sh-ui-kit-forms-ui-nudger.d.ts +134 -67
  173. package/types/4sh-ui-kit-forms-ui-radio.d.ts +48 -33
  174. package/types/4sh-ui-kit-forms-ui-rating.d.ts +120 -86
  175. package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +221 -147
  176. package/types/4sh-ui-kit-forms-ui-select.d.ts +561 -357
  177. package/types/4sh-ui-kit-forms-ui-slider.d.ts +156 -105
  178. package/types/4sh-ui-kit-forms-ui-swatch-picker.d.ts +133 -97
  179. package/types/4sh-ui-kit-forms-ui-textarea.d.ts +90 -54
  180. package/types/4sh-ui-kit-forms-ui-toggle-block.d.ts +158 -94
  181. package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +314 -178
  182. package/types/4sh-ui-kit-forms-ui-toggle.d.ts +88 -54
  183. package/types/4sh-ui-kit-forms.d.ts +291 -186
  184. package/types/4sh-ui-kit-informative-ui-accordion.d.ts +162 -92
  185. package/types/4sh-ui-kit-informative-ui-alert.d.ts +128 -62
  186. package/types/4sh-ui-kit-informative-ui-avatar-group.d.ts +8 -8
  187. package/types/4sh-ui-kit-informative-ui-avatar.d.ts +81 -44
  188. package/types/4sh-ui-kit-informative-ui-badge.d.ts +71 -41
  189. package/types/4sh-ui-kit-informative-ui-chip.d.ts +194 -99
  190. package/types/4sh-ui-kit-informative-ui-empty-state.d.ts +105 -65
  191. package/types/4sh-ui-kit-informative-ui-helper.d.ts +64 -34
  192. package/types/4sh-ui-kit-informative-ui-progress-bar.d.ts +120 -65
  193. package/types/4sh-ui-kit-informative-ui-read-only.d.ts +147 -67
  194. package/types/4sh-ui-kit-informative-ui-separator.d.ts +65 -35
  195. package/types/4sh-ui-kit-informative-ui-skeleton.d.ts +62 -32
  196. package/types/4sh-ui-kit-informative-ui-spinner.d.ts +111 -50
  197. package/types/4sh-ui-kit-informative-ui-tag.d.ts +77 -37
  198. package/types/4sh-ui-kit-informative-ui-toast.d.ts +300 -180
  199. package/types/4sh-ui-kit-informative-ui-tooltip.d.ts +269 -141
  200. package/types/4sh-ui-kit-layout-ui-bottom-sheet.d.ts +360 -221
  201. package/types/4sh-ui-kit-layout-ui-card.d.ts +119 -79
  202. package/types/4sh-ui-kit-layout-ui-drawer.d.ts +244 -120
  203. package/types/4sh-ui-kit-layout-ui-modal.d.ts +409 -222
  204. package/types/4sh-ui-kit-layout-ui-popover.d.ts +149 -91
  205. package/types/4sh-ui-kit-motion.d.ts +117 -67
  206. package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +279 -145
  207. package/types/4sh-ui-kit-navigation-ui-breadcrumb.d.ts +134 -96
  208. package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +148 -89
  209. package/types/4sh-ui-kit-navigation-ui-menu.d.ts +282 -201
  210. package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +425 -261
  211. package/types/4sh-ui-kit-navigation-ui-stepper.d.ts +279 -183
  212. package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +275 -173
  213. package/types/4sh-ui-kit-overlay.d.ts +6 -6
  214. package/types/4sh-ui-kit-ripple.d.ts +99 -74
  215. package/types/4sh-ui-kit-table-ui-paginator.d.ts +237 -133
  216. package/types/4sh-ui-kit-table-ui-table.d.ts +769 -470
  217. package/types/4sh-ui-kit-theming.d.ts +27 -29
  218. package/types/4sh-ui-kit-types.d.ts +6 -5
  219. package/types/4sh-ui-kit.d.ts +4 -3
  220. package/fesm2022/4sh-ui-kit-types.mjs.map +0 -1
@@ -1,643 +1,1210 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, input, numberAttribute, booleanAttribute, output, viewChild, signal, computed, DestroyRef, Component, InjectionToken, PLATFORM_ID, model, contentChild, linkedSignal, effect, isDevMode } from '@angular/core';
3
- import { DOCUMENT, isPlatformBrowser, NgOptimizedImage, NgTemplateOutlet } from '@angular/common';
4
- import * as i1 from '@angular/cdk/a11y';
5
- import { A11yModule } from '@angular/cdk/a11y';
6
- import { UiIcon } from '@4sh/ui-kit/base/ui-icon';
7
- import { lockBodyScroll, unlockBodyScroll } from '@4sh/ui-kit/overlay';
8
- import { httpResource } from '@angular/common/http';
9
- import { DomSanitizer } from '@angular/platform-browser';
10
- import { ThemeService, BrandService } from '@4sh/ui-kit/theming';
11
- import { UiSpinner } from '@4sh/ui-kit/informative/ui-spinner';
12
- import { UiMotion } from '@4sh/ui-kit/motion';
13
-
14
- /** Clamp `value` into `[min, max]`. */
1
+ import * as i0 from "@angular/core";
2
+ import { Component, DestroyRef, InjectionToken, PLATFORM_ID, booleanAttribute, computed, contentChild, effect, inject, input, isDevMode, linkedSignal, model, numberAttribute, output, signal, viewChild } from "@angular/core";
3
+ import { DOCUMENT, NgOptimizedImage, NgTemplateOutlet, isPlatformBrowser } from "@angular/common";
4
+ import * as i1 from "@angular/cdk/a11y";
5
+ import { A11yModule } from "@angular/cdk/a11y";
6
+ import { UiIcon } from "@4sh/ui-kit/base/ui-icon";
7
+ import { lockBodyScroll, unlockBodyScroll } from "@4sh/ui-kit/overlay";
8
+ import { httpResource } from "@angular/common/http";
9
+ import { DomSanitizer } from "@angular/platform-browser";
10
+ import { BrandService, ThemeService } from "@4sh/ui-kit/theming";
11
+ import { UiSpinner } from "@4sh/ui-kit/informative/ui-spinner";
12
+ import { UiMotion } from "@4sh/ui-kit/motion";
15
13
  function clamp(value, min, max) {
16
- return Math.min(max, Math.max(min, value));
17
- }
18
- /**
19
- * ui-image-preview — the enlarged view (lightbox) opened by `ui-image`'s
20
- * `preview` mode.
21
- *
22
- * A viewport mask holding a toolbar (zoom in/out, rotate, reset, optional
23
- * download, close) and the image itself, which the three transforms drive
24
- * through a single `transform`: pan, scale, rotation. Zoom is reachable at the
25
- * pointer (toolbar, wheel) and at the keyboard (`+`/`-`/`0`/`r`, arrows to pan)
26
- * — a zoom a keyboard user cannot pan is a zoom they cannot read.
27
- *
28
- * Lives in `ui-image`'s entry point: it renders that component's resolved
29
- * source, so a separate entry point would be a cycle. Mount it directly only to
30
- * drive the enlarged view yourself.
31
- */
32
- class UiImagePreview {
33
- constructor() {
34
- this.document = inject(DOCUMENT);
35
- /** URL of the image to show enlarged (already resolved — `http(s)`, `blob:` or `data:`). */
36
- this.src = input.required(/* @ts-ignore */
37
- ...(ngDevMode ? [{ debugName: "src" }] : /* istanbul ignore next */ []));
38
- /** Alt text of the enlarged image (empty = decorative). */
39
- this.alt = input('', /* @ts-ignore */
40
- ...(ngDevMode ? [{ debugName: "alt" }] : /* istanbul ignore next */ []));
41
- /** Accessible name of the dialog. */
42
- this.ariaLabel = input('Aperçu de l’image', /* @ts-ignore */
43
- ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
44
- /** Zoom increment applied by one toolbar click, one wheel notch or one `+`/`-` press. */
45
- this.zoomStep = input(0.25, { ...(ngDevMode ? { debugName: "zoomStep" } : /* istanbul ignore next */ {}), transform: numberAttribute });
46
- /** Lower zoom bound. */
47
- this.minZoom = input(0.5, { ...(ngDevMode ? { debugName: "minZoom" } : /* istanbul ignore next */ {}), transform: numberAttribute });
48
- /** Upper zoom bound. */
49
- this.maxZoom = input(4, { ...(ngDevMode ? { debugName: "maxZoom" } : /* istanbul ignore next */ {}), transform: numberAttribute });
50
- /** Offer a download action in the toolbar. */
51
- this.downloadable = input(false, { ...(ngDevMode ? { debugName: "downloadable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
52
- /** Filename proposed by the download action (defaults to the browser's choice). */
53
- this.downloadName = input(/* @ts-ignore */
54
- ...(ngDevMode ? [undefined, { debugName: "downloadName" }] : /* istanbul ignore next */ []));
55
- /** Close when the mask around the image is clicked. */
56
- this.dismissableMask = input(true, { ...(ngDevMode ? { debugName: "dismissableMask" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
57
- /** Accessible name of the zoom-in button. */
58
- this.zoomInAriaLabel = input('Zoom avant', /* @ts-ignore */
59
- ...(ngDevMode ? [{ debugName: "zoomInAriaLabel" }] : /* istanbul ignore next */ []));
60
- /** Accessible name of the zoom-out button. */
61
- this.zoomOutAriaLabel = input('Zoom arrière', /* @ts-ignore */
62
- ...(ngDevMode ? [{ debugName: "zoomOutAriaLabel" }] : /* istanbul ignore next */ []));
63
- /** Accessible name of the rotate-left button. */
64
- this.rotateLeftAriaLabel = input('Pivoter vers la gauche', /* @ts-ignore */
65
- ...(ngDevMode ? [{ debugName: "rotateLeftAriaLabel" }] : /* istanbul ignore next */ []));
66
- /** Accessible name of the rotate-right button. */
67
- this.rotateRightAriaLabel = input('Pivoter vers la droite', /* @ts-ignore */
68
- ...(ngDevMode ? [{ debugName: "rotateRightAriaLabel" }] : /* istanbul ignore next */ []));
69
- /** Accessible name of the button that resets zoom and rotation. */
70
- this.resetAriaLabel = input('Réinitialiser l’affichage', /* @ts-ignore */
71
- ...(ngDevMode ? [{ debugName: "resetAriaLabel" }] : /* istanbul ignore next */ []));
72
- /** Accessible name of the download button. */
73
- this.downloadAriaLabel = input('Télécharger l’image', /* @ts-ignore */
74
- ...(ngDevMode ? [{ debugName: "downloadAriaLabel" }] : /* istanbul ignore next */ []));
75
- /** Accessible name of the close button. */
76
- this.closeAriaLabel = input('Fermer l’aperçu', /* @ts-ignore */
77
- ...(ngDevMode ? [{ debugName: "closeAriaLabel" }] : /* istanbul ignore next */ []));
78
- /** Emitted when the view asks to be dismissed (Escape, close button, mask click). */
79
- this.closed = output();
80
- this.stage = viewChild.required('stage', /* @ts-ignore */
81
- ...(ngDevMode ? [{ debugName: "stage" }] : /* istanbul ignore next */ []));
82
- this.scale = signal(1, /* @ts-ignore */
83
- ...(ngDevMode ? [{ debugName: "scale" }] : /* istanbul ignore next */ []));
84
- this.rotation = signal(0, /* @ts-ignore */
85
- ...(ngDevMode ? [{ debugName: "rotation" }] : /* istanbul ignore next */ []));
86
- this.panX = signal(0, /* @ts-ignore */
87
- ...(ngDevMode ? [{ debugName: "panX" }] : /* istanbul ignore next */ []));
88
- this.panY = signal(0, /* @ts-ignore */
89
- ...(ngDevMode ? [{ debugName: "panY" }] : /* istanbul ignore next */ []));
90
- this.canZoomIn = computed(() => this.scale() < this.maxZoom(), /* @ts-ignore */
91
- ...(ngDevMode ? [{ debugName: "canZoomIn" }] : /* istanbul ignore next */ []));
92
- this.canZoomOut = computed(() => this.scale() > this.minZoom(), /* @ts-ignore */
93
- ...(ngDevMode ? [{ debugName: "canZoomOut" }] : /* istanbul ignore next */ []));
94
- /** Nothing to reset while the three transforms are at their neutral value. */
95
- this.isPristine = computed(() => this.scale() === 1 && this.rotation() === 0 && this.panX() === 0 && this.panY() === 0, /* @ts-ignore */
96
- ...(ngDevMode ? [{ debugName: "isPristine" }] : /* istanbul ignore next */ []));
97
- /** Panning only makes sense once the image overflows its stage. */
98
- this.canPan = computed(() => this.scale() > 1, /* @ts-ignore */
99
- ...(ngDevMode ? [{ debugName: "canPan" }] : /* istanbul ignore next */ []));
100
- /** A quarter turn: what is drawn no longer fits the layout box's axes. */
101
- this.isQuarterTurned = computed(() => this.rotation() % 180 !== 0, /* @ts-ignore */
102
- ...(ngDevMode ? [{ debugName: "isQuarterTurned" }] : /* istanbul ignore next */ []));
103
- this.transform = computed(() => `translate(${this.panX()}px, ${this.panY()}px) scale(${this.scale()}) rotate(${this.rotation()}deg)`, /* @ts-ignore */
104
- ...(ngDevMode ? [{ debugName: "transform" }] : /* istanbul ignore next */ []));
105
- // --- Drag to pan ------------------------------------------------------
106
- this.dragOrigin = null;
107
- lockBodyScroll(this.document);
108
- inject(DestroyRef).onDestroy(() => unlockBodyScroll(this.document));
109
- }
110
- zoomIn() {
111
- this.setScale(this.scale() + this.zoomStep());
112
- }
113
- zoomOut() {
114
- this.setScale(this.scale() - this.zoomStep());
115
- }
116
- rotateLeft() {
117
- this.rotation.update((deg) => deg - 90);
118
- }
119
- rotateRight() {
120
- this.rotation.update((deg) => deg + 90);
121
- }
122
- reset() {
123
- this.scale.set(1);
124
- this.rotation.set(0);
125
- this.panX.set(0);
126
- this.panY.set(0);
127
- }
128
- close() {
129
- this.closed.emit();
130
- }
131
- /** A press that lands on the stage itself (not on the image) is a press outside. */
132
- onStagePointerDown(event) {
133
- if (this.dismissableMask() && event.target === this.stage().nativeElement)
134
- this.close();
135
- }
136
- onWheel(event) {
137
- event.preventDefault();
138
- this.setScale(this.scale() + (event.deltaY < 0 ? this.zoomStep() : -this.zoomStep()));
139
- }
140
- onKeydown(event) {
141
- const step = 24;
142
- switch (event.key) {
143
- case 'Escape':
144
- this.close();
145
- break;
146
- case '+':
147
- case '=':
148
- this.zoomIn();
149
- break;
150
- case '-':
151
- this.zoomOut();
152
- break;
153
- case '0':
154
- this.reset();
155
- break;
156
- case 'r':
157
- case 'R':
158
- this.rotateRight();
159
- break;
160
- case 'ArrowLeft':
161
- this.panX.update((x) => x - step);
162
- break;
163
- case 'ArrowRight':
164
- this.panX.update((x) => x + step);
165
- break;
166
- case 'ArrowUp':
167
- this.panY.update((y) => y - step);
168
- break;
169
- case 'ArrowDown':
170
- this.panY.update((y) => y + step);
171
- break;
172
- default:
173
- return;
174
- }
175
- // Only a handled key is swallowed: Tab must keep cycling the focus trap.
176
- event.preventDefault();
177
- event.stopPropagation();
178
- }
179
- onPointerDown(event) {
180
- if (!this.canPan() || event.button !== 0)
181
- return;
182
- this.dragOrigin = { x: event.clientX, y: event.clientY, panX: this.panX(), panY: this.panY() };
183
- event.target.setPointerCapture?.(event.pointerId);
184
- event.preventDefault();
185
- }
186
- onPointerMove(event) {
187
- const origin = this.dragOrigin;
188
- if (!origin)
189
- return;
190
- this.panX.set(origin.panX + (event.clientX - origin.x));
191
- this.panY.set(origin.panY + (event.clientY - origin.y));
192
- }
193
- onPointerUp(event) {
194
- if (!this.dragOrigin)
195
- return;
196
- this.dragOrigin = null;
197
- event.target.releasePointerCapture?.(event.pointerId);
198
- }
199
- setScale(value) {
200
- const next = clamp(Number(value.toFixed(4)), this.minZoom(), this.maxZoom());
201
- this.scale.set(next);
202
- // Back to fit: the pan offset would otherwise strand the image off-centre.
203
- if (next <= 1) {
204
- this.panX.set(0);
205
- this.panY.set(0);
206
- }
207
- }
208
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiImagePreview, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
209
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: UiImagePreview, isStandalone: true, selector: "ui-image-preview", inputs: { src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: true, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, zoomStep: { classPropertyName: "zoomStep", publicName: "zoomStep", isSignal: true, isRequired: false, transformFunction: null }, minZoom: { classPropertyName: "minZoom", publicName: "minZoom", isSignal: true, isRequired: false, transformFunction: null }, maxZoom: { classPropertyName: "maxZoom", publicName: "maxZoom", isSignal: true, isRequired: false, transformFunction: null }, downloadable: { classPropertyName: "downloadable", publicName: "downloadable", isSignal: true, isRequired: false, transformFunction: null }, downloadName: { classPropertyName: "downloadName", publicName: "downloadName", isSignal: true, isRequired: false, transformFunction: null }, dismissableMask: { classPropertyName: "dismissableMask", publicName: "dismissableMask", isSignal: true, isRequired: false, transformFunction: null }, zoomInAriaLabel: { classPropertyName: "zoomInAriaLabel", publicName: "zoomInAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, zoomOutAriaLabel: { classPropertyName: "zoomOutAriaLabel", publicName: "zoomOutAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, rotateLeftAriaLabel: { classPropertyName: "rotateLeftAriaLabel", publicName: "rotateLeftAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, rotateRightAriaLabel: { classPropertyName: "rotateRightAriaLabel", publicName: "rotateRightAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, resetAriaLabel: { classPropertyName: "resetAriaLabel", publicName: "resetAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, downloadAriaLabel: { classPropertyName: "downloadAriaLabel", publicName: "downloadAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, closeAriaLabel: { classPropertyName: "closeAriaLabel", publicName: "closeAriaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, viewQueries: [{ propertyName: "stage", first: true, predicate: ["stage"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- 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", styles: [":host{position:fixed;inset:0;z-index:var(--ui-image-preview-z-index, 1100);display:block;background-color:var(--ui-image-preview-mask-background, var(--primitives-black-80))}.ui-image-preview{display:flex;flex-direction:column;gap:var(--ui-image-preview-gap, var(--units-md));box-sizing:border-box;width:100%;height:100%;padding:var(--ui-image-preview-padding, var(--units-lg));outline:none}.ui-image-preview-toolbar{flex:0 0 auto;display:flex;flex-wrap:wrap;align-self:center;justify-content:center;gap:var(--ui-image-preview-toolbar-gap, var(--units-2xs));padding:var(--ui-image-preview-toolbar-padding, var(--units-2xs));border-radius:var(--ui-image-preview-toolbar-radius, var(--radius-full));background-color:var(--ui-image-preview-toolbar-background, var(--primitives-black-50))}.ui-image-preview-action{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-image-preview-action-size, 2.25rem);height:var(--ui-image-preview-action-size, 2.25rem);padding:0;border:none;border-radius:var(--ui-image-preview-action-radius, var(--radius-full));background:transparent;color:var(--ui-image-preview-action-color, var(--primitives-white-base));line-height:0;text-decoration:none;cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-image-preview-action:hover:not([aria-disabled]){background-color:var(--ui-image-preview-action-surface-hover, var(--primitives-white-20))}.ui-image-preview-action:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-image-preview-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-image-preview-action-focus-ring-color, var(--global-border-focus))}.ui-image-preview-action[aria-disabled=true]{opacity:var(--ui-image-preview-action-opacity-disabled, .4);cursor:not-allowed}@media(prefers-reduced-motion:reduce){.ui-image-preview-action{transition-duration:.01ms}}:root[data-motion=off] .ui-image-preview-action{transition-duration:.01ms}.ui-image-preview-stage{flex:1 1 auto;display:flex;align-items:center;justify-content:center;min-height:0;overflow:hidden;container-type:size}.ui-image-preview-media{max-width:var(--ui-image-preview-media-max-width, 100%);max-height:var(--ui-image-preview-media-max-height, 100%);box-shadow:var(--ui-image-preview-media-shadow, var(--shadow-default-lg));object-fit:contain;transform-origin:center;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}.ui-image-preview-media._rotated{max-width:var(--ui-image-preview-media-max-width-rotated, 100cqh);max-height:var(--ui-image-preview-media-max-height-rotated, 100cqw)}.ui-image-preview-media._pannable{cursor:grab}.ui-image-preview-media._pannable:active{cursor:grabbing}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }] }); }
14
+ return Math.min(max, Math.max(min, value));
210
15
  }
211
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiImagePreview, decorators: [{
212
- type: Component,
213
- args: [{ selector: 'ui-image-preview', imports: [A11yModule, UiIcon], template: "<!-- 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", styles: [":host{position:fixed;inset:0;z-index:var(--ui-image-preview-z-index, 1100);display:block;background-color:var(--ui-image-preview-mask-background, var(--primitives-black-80))}.ui-image-preview{display:flex;flex-direction:column;gap:var(--ui-image-preview-gap, var(--units-md));box-sizing:border-box;width:100%;height:100%;padding:var(--ui-image-preview-padding, var(--units-lg));outline:none}.ui-image-preview-toolbar{flex:0 0 auto;display:flex;flex-wrap:wrap;align-self:center;justify-content:center;gap:var(--ui-image-preview-toolbar-gap, var(--units-2xs));padding:var(--ui-image-preview-toolbar-padding, var(--units-2xs));border-radius:var(--ui-image-preview-toolbar-radius, var(--radius-full));background-color:var(--ui-image-preview-toolbar-background, var(--primitives-black-50))}.ui-image-preview-action{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-image-preview-action-size, 2.25rem);height:var(--ui-image-preview-action-size, 2.25rem);padding:0;border:none;border-radius:var(--ui-image-preview-action-radius, var(--radius-full));background:transparent;color:var(--ui-image-preview-action-color, var(--primitives-white-base));line-height:0;text-decoration:none;cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-image-preview-action:hover:not([aria-disabled]){background-color:var(--ui-image-preview-action-surface-hover, var(--primitives-white-20))}.ui-image-preview-action:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-image-preview-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-image-preview-action-focus-ring-color, var(--global-border-focus))}.ui-image-preview-action[aria-disabled=true]{opacity:var(--ui-image-preview-action-opacity-disabled, .4);cursor:not-allowed}@media(prefers-reduced-motion:reduce){.ui-image-preview-action{transition-duration:.01ms}}:root[data-motion=off] .ui-image-preview-action{transition-duration:.01ms}.ui-image-preview-stage{flex:1 1 auto;display:flex;align-items:center;justify-content:center;min-height:0;overflow:hidden;container-type:size}.ui-image-preview-media{max-width:var(--ui-image-preview-media-max-width, 100%);max-height:var(--ui-image-preview-media-max-height, 100%);box-shadow:var(--ui-image-preview-media-shadow, var(--shadow-default-lg));object-fit:contain;transform-origin:center;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}.ui-image-preview-media._rotated{max-width:var(--ui-image-preview-media-max-width-rotated, 100cqh);max-height:var(--ui-image-preview-media-max-height-rotated, 100cqw)}.ui-image-preview-media._pannable{cursor:grab}.ui-image-preview-media._pannable:active{cursor:grabbing}\n"] }]
214
- }], ctorParameters: () => [], propDecorators: { src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: true }] }], alt: [{ type: i0.Input, args: [{ isSignal: true, alias: "alt", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], zoomStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "zoomStep", required: false }] }], minZoom: [{ type: i0.Input, args: [{ isSignal: true, alias: "minZoom", required: false }] }], maxZoom: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxZoom", required: false }] }], downloadable: [{ type: i0.Input, args: [{ isSignal: true, alias: "downloadable", required: false }] }], downloadName: [{ type: i0.Input, args: [{ isSignal: true, alias: "downloadName", required: false }] }], dismissableMask: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissableMask", required: false }] }], zoomInAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "zoomInAriaLabel", required: false }] }], zoomOutAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "zoomOutAriaLabel", required: false }] }], rotateLeftAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "rotateLeftAriaLabel", required: false }] }], rotateRightAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "rotateRightAriaLabel", required: false }] }], resetAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "resetAriaLabel", required: false }] }], downloadAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "downloadAriaLabel", required: false }] }], closeAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeAriaLabel", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], stage: [{ type: i0.ViewChild, args: ['stage', { isSignal: true }] }] } });
215
-
216
- /**
217
- * Assainissement des SVG inlinés par `ui-image`.
218
- *
219
- * Angular's HTML sanitizer strips `<svg>` wholesale, so inlining an SVG — which
220
- * is what lets the asset inherit `currentColor` and the theme's CSS — has no
221
- * choice but to go through `bypassSecurityTrustHtml()`. That bypass is only
222
- * defensible if the markup has already been scrubbed here, which is the single
223
- * reason this file exists. See `docs/SECURITY-PRACTICES.md`.
224
- *
225
- * The threat model is not "the kit's own assets": it is a project serving
226
- * `assets/img/` from a CDN, or letting a client drop its own logo in a brand
227
- * folder (white-label). In both cases the SVG is markup of unknown origin
228
- * rendered into the application's own origin.
229
- */
230
- /**
231
- * Tags dropped WITH their content — unwrapping them would put their body in the
232
- * document as text, or leave the vector intact.
233
- *
234
- * `foreignObject` re-opens the whole HTML namespace inside the SVG, and the SMIL
235
- * elements (`animate`, `set`…) can retarget an attribute *after* this scrub ran.
236
- */
237
- const VOIDED_TAGS = 'script, foreignObject, iframe, object, embed, animate, animateTransform, animateMotion, set, handler';
238
- /** Attributes carrying a reference — the only ones allowed to name a target. */
239
- const REF_ATTRS = new Set(['href', 'xlink:href', 'src']);
240
- /** A reference either stays inside the document, or navigates over http(s). */
241
- const ALLOWED_REF_PROTOCOLS = ['http:', 'https:'];
242
- /**
243
- * Strips from an SVG everything that can execute or fetch, and returns the
244
- * scrubbed markup.
245
- *
246
- * Parsing happens inside a detached `<template>`: its content is inert, so
247
- * nothing runs and nothing is fetched while we inspect it. Returns `''` when
248
- * there is no DOM to parse with (SSR) — failing closed, since un-scrubbed
249
- * markup must never reach the bypass.
250
- */
16
+ var UiImagePreview = class UiImagePreview {
17
+ constructor() {
18
+ this.document = inject(DOCUMENT);
19
+ this.src = input.required(...ngDevMode ? [{ debugName: "src" }] : /* istanbul ignore next */ []);
20
+ this.alt = input("", ...ngDevMode ? [{ debugName: "alt" }] : /* istanbul ignore next */ []);
21
+ this.ariaLabel = input("Aperçu de l’image", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
22
+ this.zoomStep = input(.25, {
23
+ ...ngDevMode ? { debugName: "zoomStep" } : /* istanbul ignore next */ {},
24
+ transform: numberAttribute
25
+ });
26
+ this.minZoom = input(.5, {
27
+ ...ngDevMode ? { debugName: "minZoom" } : /* istanbul ignore next */ {},
28
+ transform: numberAttribute
29
+ });
30
+ this.maxZoom = input(4, {
31
+ ...ngDevMode ? { debugName: "maxZoom" } : /* istanbul ignore next */ {},
32
+ transform: numberAttribute
33
+ });
34
+ this.downloadable = input(false, {
35
+ ...ngDevMode ? { debugName: "downloadable" } : /* istanbul ignore next */ {},
36
+ transform: booleanAttribute
37
+ });
38
+ this.downloadName = input(...ngDevMode ? [void 0, { debugName: "downloadName" }] : /* istanbul ignore next */ []);
39
+ this.dismissableMask = input(true, {
40
+ ...ngDevMode ? { debugName: "dismissableMask" } : /* istanbul ignore next */ {},
41
+ transform: booleanAttribute
42
+ });
43
+ this.zoomInAriaLabel = input("Zoom avant", ...ngDevMode ? [{ debugName: "zoomInAriaLabel" }] : /* istanbul ignore next */ []);
44
+ this.zoomOutAriaLabel = input("Zoom arrière", ...ngDevMode ? [{ debugName: "zoomOutAriaLabel" }] : /* istanbul ignore next */ []);
45
+ this.rotateLeftAriaLabel = input("Pivoter vers la gauche", ...ngDevMode ? [{ debugName: "rotateLeftAriaLabel" }] : /* istanbul ignore next */ []);
46
+ this.rotateRightAriaLabel = input("Pivoter vers la droite", ...ngDevMode ? [{ debugName: "rotateRightAriaLabel" }] : /* istanbul ignore next */ []);
47
+ this.resetAriaLabel = input("Réinitialiser l’affichage", ...ngDevMode ? [{ debugName: "resetAriaLabel" }] : /* istanbul ignore next */ []);
48
+ this.downloadAriaLabel = input("Télécharger l’image", ...ngDevMode ? [{ debugName: "downloadAriaLabel" }] : /* istanbul ignore next */ []);
49
+ this.closeAriaLabel = input("Fermer l’aperçu", ...ngDevMode ? [{ debugName: "closeAriaLabel" }] : /* istanbul ignore next */ []);
50
+ this.closed = output();
51
+ this.stage = viewChild.required("stage", ...ngDevMode ? [{ debugName: "stage" }] : /* istanbul ignore next */ []);
52
+ this.scale = signal(1, ...ngDevMode ? [{ debugName: "scale" }] : /* istanbul ignore next */ []);
53
+ this.rotation = signal(0, ...ngDevMode ? [{ debugName: "rotation" }] : /* istanbul ignore next */ []);
54
+ this.panX = signal(0, ...ngDevMode ? [{ debugName: "panX" }] : /* istanbul ignore next */ []);
55
+ this.panY = signal(0, ...ngDevMode ? [{ debugName: "panY" }] : /* istanbul ignore next */ []);
56
+ this.canZoomIn = computed(() => this.scale() < this.maxZoom(), ...ngDevMode ? [{ debugName: "canZoomIn" }] : /* istanbul ignore next */ []);
57
+ this.canZoomOut = computed(() => this.scale() > this.minZoom(), ...ngDevMode ? [{ debugName: "canZoomOut" }] : /* istanbul ignore next */ []);
58
+ this.isPristine = computed(() => this.scale() === 1 && this.rotation() === 0 && this.panX() === 0 && this.panY() === 0, ...ngDevMode ? [{ debugName: "isPristine" }] : /* istanbul ignore next */ []);
59
+ this.canPan = computed(() => this.scale() > 1, ...ngDevMode ? [{ debugName: "canPan" }] : /* istanbul ignore next */ []);
60
+ this.isQuarterTurned = computed(() => this.rotation() % 180 !== 0, ...ngDevMode ? [{ debugName: "isQuarterTurned" }] : /* istanbul ignore next */ []);
61
+ this.transform = computed(() => `translate(${this.panX()}px, ${this.panY()}px) scale(${this.scale()}) rotate(${this.rotation()}deg)`, ...ngDevMode ? [{ debugName: "transform" }] : /* istanbul ignore next */ []);
62
+ this.dragOrigin = null;
63
+ lockBodyScroll(this.document);
64
+ inject(DestroyRef).onDestroy(() => unlockBodyScroll(this.document));
65
+ }
66
+ zoomIn() {
67
+ this.setScale(this.scale() + this.zoomStep());
68
+ }
69
+ zoomOut() {
70
+ this.setScale(this.scale() - this.zoomStep());
71
+ }
72
+ rotateLeft() {
73
+ this.rotation.update((deg) => deg - 90);
74
+ }
75
+ rotateRight() {
76
+ this.rotation.update((deg) => deg + 90);
77
+ }
78
+ reset() {
79
+ this.scale.set(1);
80
+ this.rotation.set(0);
81
+ this.panX.set(0);
82
+ this.panY.set(0);
83
+ }
84
+ close() {
85
+ this.closed.emit();
86
+ }
87
+ onStagePointerDown(event) {
88
+ if (this.dismissableMask() && event.target === this.stage().nativeElement) this.close();
89
+ }
90
+ onWheel(event) {
91
+ event.preventDefault();
92
+ this.setScale(this.scale() + (event.deltaY < 0 ? this.zoomStep() : -this.zoomStep()));
93
+ }
94
+ onKeydown(event) {
95
+ const step = 24;
96
+ switch (event.key) {
97
+ case "Escape":
98
+ this.close();
99
+ break;
100
+ case "+":
101
+ case "=":
102
+ this.zoomIn();
103
+ break;
104
+ case "-":
105
+ this.zoomOut();
106
+ break;
107
+ case "0":
108
+ this.reset();
109
+ break;
110
+ case "r":
111
+ case "R":
112
+ this.rotateRight();
113
+ break;
114
+ case "ArrowLeft":
115
+ this.panX.update((x) => x - step);
116
+ break;
117
+ case "ArrowRight":
118
+ this.panX.update((x) => x + step);
119
+ break;
120
+ case "ArrowUp":
121
+ this.panY.update((y) => y - step);
122
+ break;
123
+ case "ArrowDown":
124
+ this.panY.update((y) => y + step);
125
+ break;
126
+ default: return;
127
+ }
128
+ event.preventDefault();
129
+ event.stopPropagation();
130
+ }
131
+ onPointerDown(event) {
132
+ if (!this.canPan() || event.button !== 0) return;
133
+ this.dragOrigin = {
134
+ x: event.clientX,
135
+ y: event.clientY,
136
+ panX: this.panX(),
137
+ panY: this.panY()
138
+ };
139
+ event.target.setPointerCapture?.(event.pointerId);
140
+ event.preventDefault();
141
+ }
142
+ onPointerMove(event) {
143
+ const origin = this.dragOrigin;
144
+ if (!origin) return;
145
+ this.panX.set(origin.panX + (event.clientX - origin.x));
146
+ this.panY.set(origin.panY + (event.clientY - origin.y));
147
+ }
148
+ onPointerUp(event) {
149
+ if (!this.dragOrigin) return;
150
+ this.dragOrigin = null;
151
+ event.target.releasePointerCapture?.(event.pointerId);
152
+ }
153
+ setScale(value) {
154
+ const next = clamp(Number(value.toFixed(4)), this.minZoom(), this.maxZoom());
155
+ this.scale.set(next);
156
+ if (next <= 1) {
157
+ this.panX.set(0);
158
+ this.panY.set(0);
159
+ }
160
+ }
161
+ static {
162
+ this.ɵfac = i0.ɵɵngDeclareFactory({
163
+ minVersion: "12.0.0",
164
+ version: "22.3.0",
165
+ ngImport: i0,
166
+ type: UiImagePreview,
167
+ deps: [],
168
+ target: i0.ɵɵFactoryTarget.Component
169
+ });
170
+ }
171
+ static {
172
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
173
+ minVersion: "17.0.0",
174
+ version: "22.3.0",
175
+ type: UiImagePreview,
176
+ isStandalone: true,
177
+ selector: "ui-image-preview",
178
+ inputs: {
179
+ src: {
180
+ classPropertyName: "src",
181
+ publicName: "src",
182
+ isSignal: true,
183
+ isRequired: true,
184
+ transformFunction: null
185
+ },
186
+ alt: {
187
+ classPropertyName: "alt",
188
+ publicName: "alt",
189
+ isSignal: true,
190
+ isRequired: false,
191
+ transformFunction: null
192
+ },
193
+ ariaLabel: {
194
+ classPropertyName: "ariaLabel",
195
+ publicName: "ariaLabel",
196
+ isSignal: true,
197
+ isRequired: false,
198
+ transformFunction: null
199
+ },
200
+ zoomStep: {
201
+ classPropertyName: "zoomStep",
202
+ publicName: "zoomStep",
203
+ isSignal: true,
204
+ isRequired: false,
205
+ transformFunction: null
206
+ },
207
+ minZoom: {
208
+ classPropertyName: "minZoom",
209
+ publicName: "minZoom",
210
+ isSignal: true,
211
+ isRequired: false,
212
+ transformFunction: null
213
+ },
214
+ maxZoom: {
215
+ classPropertyName: "maxZoom",
216
+ publicName: "maxZoom",
217
+ isSignal: true,
218
+ isRequired: false,
219
+ transformFunction: null
220
+ },
221
+ downloadable: {
222
+ classPropertyName: "downloadable",
223
+ publicName: "downloadable",
224
+ isSignal: true,
225
+ isRequired: false,
226
+ transformFunction: null
227
+ },
228
+ downloadName: {
229
+ classPropertyName: "downloadName",
230
+ publicName: "downloadName",
231
+ isSignal: true,
232
+ isRequired: false,
233
+ transformFunction: null
234
+ },
235
+ dismissableMask: {
236
+ classPropertyName: "dismissableMask",
237
+ publicName: "dismissableMask",
238
+ isSignal: true,
239
+ isRequired: false,
240
+ transformFunction: null
241
+ },
242
+ zoomInAriaLabel: {
243
+ classPropertyName: "zoomInAriaLabel",
244
+ publicName: "zoomInAriaLabel",
245
+ isSignal: true,
246
+ isRequired: false,
247
+ transformFunction: null
248
+ },
249
+ zoomOutAriaLabel: {
250
+ classPropertyName: "zoomOutAriaLabel",
251
+ publicName: "zoomOutAriaLabel",
252
+ isSignal: true,
253
+ isRequired: false,
254
+ transformFunction: null
255
+ },
256
+ rotateLeftAriaLabel: {
257
+ classPropertyName: "rotateLeftAriaLabel",
258
+ publicName: "rotateLeftAriaLabel",
259
+ isSignal: true,
260
+ isRequired: false,
261
+ transformFunction: null
262
+ },
263
+ rotateRightAriaLabel: {
264
+ classPropertyName: "rotateRightAriaLabel",
265
+ publicName: "rotateRightAriaLabel",
266
+ isSignal: true,
267
+ isRequired: false,
268
+ transformFunction: null
269
+ },
270
+ resetAriaLabel: {
271
+ classPropertyName: "resetAriaLabel",
272
+ publicName: "resetAriaLabel",
273
+ isSignal: true,
274
+ isRequired: false,
275
+ transformFunction: null
276
+ },
277
+ downloadAriaLabel: {
278
+ classPropertyName: "downloadAriaLabel",
279
+ publicName: "downloadAriaLabel",
280
+ isSignal: true,
281
+ isRequired: false,
282
+ transformFunction: null
283
+ },
284
+ closeAriaLabel: {
285
+ classPropertyName: "closeAriaLabel",
286
+ publicName: "closeAriaLabel",
287
+ isSignal: true,
288
+ isRequired: false,
289
+ transformFunction: null
290
+ }
291
+ },
292
+ outputs: { closed: "closed" },
293
+ viewQueries: [{
294
+ propertyName: "stage",
295
+ first: true,
296
+ predicate: ["stage"],
297
+ descendants: true,
298
+ isSignal: true
299
+ }],
300
+ ngImport: i0,
301
+ template: "<!-- 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",
302
+ styles: [":host{position:fixed;inset:0;z-index:var(--ui-image-preview-z-index, 1100);display:block;background-color:var(--ui-image-preview-mask-background, var(--primitives-black-80))}.ui-image-preview{display:flex;flex-direction:column;gap:var(--ui-image-preview-gap, var(--units-md));box-sizing:border-box;width:100%;height:100%;padding:var(--ui-image-preview-padding, var(--units-lg));outline:none}.ui-image-preview-toolbar{flex:0 0 auto;display:flex;flex-wrap:wrap;align-self:center;justify-content:center;gap:var(--ui-image-preview-toolbar-gap, var(--units-2xs));padding:var(--ui-image-preview-toolbar-padding, var(--units-2xs));border-radius:var(--ui-image-preview-toolbar-radius, var(--radius-full));background-color:var(--ui-image-preview-toolbar-background, var(--primitives-black-50))}.ui-image-preview-action{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-image-preview-action-size, 2.25rem);height:var(--ui-image-preview-action-size, 2.25rem);padding:0;border:none;border-radius:var(--ui-image-preview-action-radius, var(--radius-full));background:transparent;color:var(--ui-image-preview-action-color, var(--primitives-white-base));line-height:0;text-decoration:none;cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-image-preview-action:hover:not([aria-disabled]){background-color:var(--ui-image-preview-action-surface-hover, var(--primitives-white-20))}.ui-image-preview-action:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-image-preview-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-image-preview-action-focus-ring-color, var(--global-border-focus))}.ui-image-preview-action[aria-disabled=true]{opacity:var(--ui-image-preview-action-opacity-disabled, .4);cursor:not-allowed}@media(prefers-reduced-motion:reduce){.ui-image-preview-action{transition-duration:.01ms}}:root[data-motion=off] .ui-image-preview-action{transition-duration:.01ms}.ui-image-preview-stage{flex:1 1 auto;display:flex;align-items:center;justify-content:center;min-height:0;overflow:hidden;container-type:size}.ui-image-preview-media{max-width:var(--ui-image-preview-media-max-width, 100%);max-height:var(--ui-image-preview-media-max-height, 100%);box-shadow:var(--ui-image-preview-media-shadow, var(--shadow-default-lg));object-fit:contain;transform-origin:center;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}.ui-image-preview-media._rotated{max-width:var(--ui-image-preview-media-max-width-rotated, 100cqh);max-height:var(--ui-image-preview-media-max-height-rotated, 100cqw)}.ui-image-preview-media._pannable{cursor:grab}.ui-image-preview-media._pannable:active{cursor:grabbing}\n"],
303
+ dependencies: [
304
+ {
305
+ kind: "ngmodule",
306
+ type: A11yModule
307
+ },
308
+ {
309
+ kind: "directive",
310
+ type: i1.CdkTrapFocus,
311
+ selector: "[cdkTrapFocus]",
312
+ inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"],
313
+ exportAs: ["cdkTrapFocus"]
314
+ },
315
+ {
316
+ kind: "component",
317
+ type: UiIcon,
318
+ selector: "ui-icon",
319
+ inputs: [
320
+ "name",
321
+ "size",
322
+ "type",
323
+ "family",
324
+ "decorative",
325
+ "ariaLabel"
326
+ ]
327
+ }
328
+ ]
329
+ });
330
+ }
331
+ };
332
+ i0.ɵɵngDeclareClassMetadata({
333
+ minVersion: "12.0.0",
334
+ version: "22.3.0",
335
+ ngImport: i0,
336
+ type: UiImagePreview,
337
+ decorators: [{
338
+ type: Component,
339
+ args: [{
340
+ selector: "ui-image-preview",
341
+ imports: [A11yModule, UiIcon],
342
+ template: "<!-- 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",
343
+ styles: [":host{position:fixed;inset:0;z-index:var(--ui-image-preview-z-index, 1100);display:block;background-color:var(--ui-image-preview-mask-background, var(--primitives-black-80))}.ui-image-preview{display:flex;flex-direction:column;gap:var(--ui-image-preview-gap, var(--units-md));box-sizing:border-box;width:100%;height:100%;padding:var(--ui-image-preview-padding, var(--units-lg));outline:none}.ui-image-preview-toolbar{flex:0 0 auto;display:flex;flex-wrap:wrap;align-self:center;justify-content:center;gap:var(--ui-image-preview-toolbar-gap, var(--units-2xs));padding:var(--ui-image-preview-toolbar-padding, var(--units-2xs));border-radius:var(--ui-image-preview-toolbar-radius, var(--radius-full));background-color:var(--ui-image-preview-toolbar-background, var(--primitives-black-50))}.ui-image-preview-action{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--ui-image-preview-action-size, 2.25rem);height:var(--ui-image-preview-action-size, 2.25rem);padding:0;border:none;border-radius:var(--ui-image-preview-action-radius, var(--radius-full));background:transparent;color:var(--ui-image-preview-action-color, var(--primitives-white-base));line-height:0;text-decoration:none;cursor:pointer;transition:background-color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout))),color var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}.ui-image-preview-action:hover:not([aria-disabled]){background-color:var(--ui-image-preview-action-surface-hover, var(--primitives-white-20))}.ui-image-preview-action:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-image-preview-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-image-preview-action-focus-ring-color, var(--global-border-focus))}.ui-image-preview-action[aria-disabled=true]{opacity:var(--ui-image-preview-action-opacity-disabled, .4);cursor:not-allowed}@media(prefers-reduced-motion:reduce){.ui-image-preview-action{transition-duration:.01ms}}:root[data-motion=off] .ui-image-preview-action{transition-duration:.01ms}.ui-image-preview-stage{flex:1 1 auto;display:flex;align-items:center;justify-content:center;min-height:0;overflow:hidden;container-type:size}.ui-image-preview-media{max-width:var(--ui-image-preview-media-max-width, 100%);max-height:var(--ui-image-preview-media-max-height, 100%);box-shadow:var(--ui-image-preview-media-shadow, var(--shadow-default-lg));object-fit:contain;transform-origin:center;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}.ui-image-preview-media._rotated{max-width:var(--ui-image-preview-media-max-width-rotated, 100cqh);max-height:var(--ui-image-preview-media-max-height-rotated, 100cqw)}.ui-image-preview-media._pannable{cursor:grab}.ui-image-preview-media._pannable:active{cursor:grabbing}\n"]
344
+ }]
345
+ }],
346
+ ctorParameters: () => [],
347
+ propDecorators: {
348
+ src: [{
349
+ type: i0.Input,
350
+ args: [{
351
+ isSignal: true,
352
+ alias: "src",
353
+ required: true
354
+ }]
355
+ }],
356
+ alt: [{
357
+ type: i0.Input,
358
+ args: [{
359
+ isSignal: true,
360
+ alias: "alt",
361
+ required: false
362
+ }]
363
+ }],
364
+ ariaLabel: [{
365
+ type: i0.Input,
366
+ args: [{
367
+ isSignal: true,
368
+ alias: "ariaLabel",
369
+ required: false
370
+ }]
371
+ }],
372
+ zoomStep: [{
373
+ type: i0.Input,
374
+ args: [{
375
+ isSignal: true,
376
+ alias: "zoomStep",
377
+ required: false
378
+ }]
379
+ }],
380
+ minZoom: [{
381
+ type: i0.Input,
382
+ args: [{
383
+ isSignal: true,
384
+ alias: "minZoom",
385
+ required: false
386
+ }]
387
+ }],
388
+ maxZoom: [{
389
+ type: i0.Input,
390
+ args: [{
391
+ isSignal: true,
392
+ alias: "maxZoom",
393
+ required: false
394
+ }]
395
+ }],
396
+ downloadable: [{
397
+ type: i0.Input,
398
+ args: [{
399
+ isSignal: true,
400
+ alias: "downloadable",
401
+ required: false
402
+ }]
403
+ }],
404
+ downloadName: [{
405
+ type: i0.Input,
406
+ args: [{
407
+ isSignal: true,
408
+ alias: "downloadName",
409
+ required: false
410
+ }]
411
+ }],
412
+ dismissableMask: [{
413
+ type: i0.Input,
414
+ args: [{
415
+ isSignal: true,
416
+ alias: "dismissableMask",
417
+ required: false
418
+ }]
419
+ }],
420
+ zoomInAriaLabel: [{
421
+ type: i0.Input,
422
+ args: [{
423
+ isSignal: true,
424
+ alias: "zoomInAriaLabel",
425
+ required: false
426
+ }]
427
+ }],
428
+ zoomOutAriaLabel: [{
429
+ type: i0.Input,
430
+ args: [{
431
+ isSignal: true,
432
+ alias: "zoomOutAriaLabel",
433
+ required: false
434
+ }]
435
+ }],
436
+ rotateLeftAriaLabel: [{
437
+ type: i0.Input,
438
+ args: [{
439
+ isSignal: true,
440
+ alias: "rotateLeftAriaLabel",
441
+ required: false
442
+ }]
443
+ }],
444
+ rotateRightAriaLabel: [{
445
+ type: i0.Input,
446
+ args: [{
447
+ isSignal: true,
448
+ alias: "rotateRightAriaLabel",
449
+ required: false
450
+ }]
451
+ }],
452
+ resetAriaLabel: [{
453
+ type: i0.Input,
454
+ args: [{
455
+ isSignal: true,
456
+ alias: "resetAriaLabel",
457
+ required: false
458
+ }]
459
+ }],
460
+ downloadAriaLabel: [{
461
+ type: i0.Input,
462
+ args: [{
463
+ isSignal: true,
464
+ alias: "downloadAriaLabel",
465
+ required: false
466
+ }]
467
+ }],
468
+ closeAriaLabel: [{
469
+ type: i0.Input,
470
+ args: [{
471
+ isSignal: true,
472
+ alias: "closeAriaLabel",
473
+ required: false
474
+ }]
475
+ }],
476
+ closed: [{
477
+ type: i0.Output,
478
+ args: ["closed"]
479
+ }],
480
+ stage: [{
481
+ type: i0.ViewChild,
482
+ args: ["stage", { isSignal: true }]
483
+ }]
484
+ }
485
+ });
486
+ const VOIDED_TAGS = "script, foreignObject, iframe, object, embed, animate, animateTransform, animateMotion, set, handler";
487
+ const REF_ATTRS = /* @__PURE__ */ new Set([
488
+ "href",
489
+ "xlink:href",
490
+ "src"
491
+ ]);
492
+ const ALLOWED_REF_PROTOCOLS = ["http:", "https:"];
251
493
  function sanitizeInlineSvg(raw) {
252
- if (typeof document === 'undefined')
253
- return '';
254
- const template = document.createElement('template');
255
- /* eslint-disable-next-line no-restricted-syntax -- EXCEPTION JUSTIFIÉE : on
256
- écrit DANS un `<template>` détaché, dont le contenu est inerte — rien ne
257
- s'exécute et rien n'est chargé. C'est l'étape de PARSING du scrub, pas une
258
- injection dans le document. Registre : docs/SECURITY-PRACTICES.md. */
259
- template.innerHTML = raw;
260
- for (const el of Array.from(template.content.querySelectorAll(VOIDED_TAGS)))
261
- el.remove();
262
- for (const el of Array.from(template.content.querySelectorAll('*'))) {
263
- for (const attr of Array.from(el.attributes)) {
264
- const name = attr.name.toLowerCase();
265
- // Every event handler, whatever the element it sits on.
266
- if (name.startsWith('on')) {
267
- el.removeAttributeNode(attr);
268
- continue;
269
- }
270
- if (REF_ATTRS.has(name) && !isSafeRef(attr.value))
271
- el.removeAttributeNode(attr);
272
- }
273
- }
274
- return template.innerHTML;
494
+ if (typeof document === "undefined") return "";
495
+ const template = document.createElement("template");
496
+ template.innerHTML = raw;
497
+ for (const el of Array.from(template.content.querySelectorAll(VOIDED_TAGS))) el.remove();
498
+ for (const el of Array.from(template.content.querySelectorAll("*"))) for (const attr of Array.from(el.attributes)) {
499
+ const name = attr.name.toLowerCase();
500
+ if (name.startsWith("on")) {
501
+ el.removeAttributeNode(attr);
502
+ continue;
503
+ }
504
+ if (REF_ATTRS.has(name) && !isSafeRef(attr.value)) el.removeAttributeNode(attr);
505
+ }
506
+ return template.innerHTML;
275
507
  }
276
- /** @internal Rejects `javascript:`, `data:` and the other non-navigational schemes. */
277
508
  function isSafeRef(value) {
278
- const ref = value.trim();
279
- // `<use href="#icon">` — a same-document reference names no external target.
280
- if (ref.startsWith('#'))
281
- return true;
282
- try {
283
- return ALLOWED_REF_PROTOCOLS.includes(new URL(ref, document.baseURI).protocol);
284
- }
285
- catch {
286
- return false;
287
- }
509
+ const ref = value.trim();
510
+ if (ref.startsWith("#")) return true;
511
+ try {
512
+ return ALLOWED_REF_PROTOCOLS.includes(new URL(ref, document.baseURI).protocol);
513
+ } catch {
514
+ return false;
515
+ }
288
516
  }
289
-
290
- /**
291
- * Map of the LOCAL assets available to `ui-image` (its `name` input).
292
- *
293
- * The kit cannot know a project's assets, so the map is injected rather than
294
- * bundled: generate it in your app (see the `generate:assets` script in the
295
- * starter, which writes `src/assets/assets-map.json`) and provide it with
296
- * `provideUiImageAssets()`. Without it, `name` resolves to nothing and the
297
- * component falls back to its placeholder — `src` (remote URLs) still works.
298
- */
299
- const UI_IMAGE_ASSETS = new InjectionToken('UI_IMAGE_ASSETS');
300
- /**
301
- * Registers the local asset map consumed by `ui-image`.
302
- *
303
- * ```ts
304
- * import assetsMap from './assets/assets-map.json';
305
- * providers: [provideUiImageAssets(assetsMap)]
306
- * ```
307
- */
517
+ const UI_IMAGE_ASSETS = new InjectionToken("UI_IMAGE_ASSETS");
308
518
  function provideUiImageAssets(map) {
309
- return { provide: UI_IMAGE_ASSETS, useValue: map };
519
+ return {
520
+ provide: UI_IMAGE_ASSETS,
521
+ useValue: map
522
+ };
310
523
  }
311
- /**
312
- * Cross-instance memoization: the same resolved URL is fetched once (logos
313
- * repeated across the app).
314
- *
315
- * Holds the **scrubbed** markup, never the raw response — nothing that skipped
316
- * `sanitizeInlineSvg()` may ever be read back out of here.
317
- */
318
- const SVG_CACHE = new Map();
319
- /** Payload carried in the URL itself (`data:image/png;base64,…`). */
524
+ const SVG_CACHE = /* @__PURE__ */ new Map();
320
525
  const DATA_URL = /^data:/i;
321
- /**
322
- * ui-image — theme/brand-aware image.
323
- *
324
- * Three sources: `name` (local asset key resolved through `assets-map.json`,
325
- * theme/brand variants), `src` (remote/absolute URL — takes precedence), and
326
- * `src` + `secured` (the URL is fetched through `HttpClient`, so the app's
327
- * interceptors authenticate it, and the response `Blob` is shown from an object
328
- * URL revoked with the component).
329
- * Local `.svg` assets are inlined (`innerHTML`) so they can inherit CSS — after
330
- * being scrubbed by `sanitizeInlineSvg()`; remote URLs always render through
331
- * `<img [ngSrc]>` (never inlined), except `data:`/`blob:` payloads, which
332
- * `NgOptimizedImage` rejects and a plain `<img>` renders.
333
- * On load failure the `fallback` local asset is shown, then a token-styled
334
- * placeholder if the fallback also fails (or none is provided).
335
- *
336
- * `preview` turns the image into a trigger for the enlarged view
337
- * (`ui-image-preview`): zoom, rotation, pan, reset, optional download.
338
- */
339
- class UiImage {
340
- constructor() {
341
- this.sanitizer = inject(DomSanitizer);
342
- this.assetsMap = inject(UI_IMAGE_ASSETS, { optional: true }) ?? {};
343
- this.themeService = inject(ThemeService);
344
- this.brandService = inject(BrandService);
345
- this.isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
346
- /** Local asset key in `assets-map.json` (theme/brand-aware resolution). */
347
- this.name = input(/* @ts-ignore */
348
- ...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
349
- /** Remote/absolute URL, rendered via `NgOptimizedImage` — takes precedence over `name`. */
350
- this.src = input(/* @ts-ignore */
351
- ...(ngDevMode ? [undefined, { debugName: "src" }] : /* istanbul ignore next */ []));
352
- /** Local asset name (`assets-map.json` key) displayed when the main image fails to load. */
353
- this.fallback = input(/* @ts-ignore */
354
- ...(ngDevMode ? [undefined, { debugName: "fallback" }] : /* istanbul ignore next */ []));
355
- /** Loads the image eagerly with a high fetch priority (above-the-fold images); lazy otherwise. */
356
- this.priority = input(false, /* @ts-ignore */
357
- ...(ngDevMode ? [{ debugName: "priority" }] : /* istanbul ignore next */ []));
358
- /** Fills the parent box instead of using `width`/`height` (the parent must be positioned). */
359
- this.fill = input(false, /* @ts-ignore */
360
- ...(ngDevMode ? [{ debugName: "fill" }] : /* istanbul ignore next */ []));
361
- /** Rendered width; a number is read in `widthUnit`. */
362
- this.width = input(/* @ts-ignore */
363
- ...(ngDevMode ? [undefined, { debugName: "width" }] : /* istanbul ignore next */ []));
364
- /** Unit of a numeric `width` (`px` when absent). */
365
- this.widthUnit = input(/* @ts-ignore */
366
- ...(ngDevMode ? [undefined, { debugName: "widthUnit" }] : /* istanbul ignore next */ []));
367
- /** Rendered height; a number is read in `heightUnit`. Absent: the image keeps its ratio. */
368
- this.height = input(/* @ts-ignore */
369
- ...(ngDevMode ? [undefined, { debugName: "height" }] : /* istanbul ignore next */ []));
370
- /** Unit of a numeric `height` (`px` when absent). */
371
- this.heightUnit = input(/* @ts-ignore */
372
- ...(ngDevMode ? [undefined, { debugName: "heightUnit" }] : /* istanbul ignore next */ []));
373
- /** Alternative text. Absent: the image is decorative (`aria-hidden`). */
374
- this.alt = input(/* @ts-ignore */
375
- ...(ngDevMode ? [undefined, { debugName: "alt" }] : /* istanbul ignore next */ []));
376
- /**
377
- * Fetch `src` through `HttpClient` instead of letting the browser load it.
378
- *
379
- * That is what an endpoint behind an `Authorization` header needs: an `<img
380
- * src>` is a plain browser request, which carries no interceptor and no
381
- * bearer token. The response `Blob` is shown from an object URL, revoked as
382
- * soon as the source changes or the component goes away.
383
- *
384
- * Cross-origin still applies: the endpoint must answer the CORS preflight
385
- * (`Access-Control-Allow-Origin`, and `Access-Control-Allow-Headers` for the
386
- * auth header) — an `<img>` would have displayed it without any of that.
387
- */
388
- this.secured = input(false, { ...(ngDevMode ? { debugName: "secured" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
389
- /** Send cookies/TLS credentials with the `secured` request (cross-origin sessions). */
390
- this.withCredentials = input(false, { ...(ngDevMode ? { debugName: "withCredentials" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
391
- /** Visible text of the loading indicator shown while a `secured` fetch is in flight. */
392
- this.loadingLabel = input(/* @ts-ignore */
393
- ...(ngDevMode ? [undefined, { debugName: "loadingLabel" }] : /* istanbul ignore next */ []));
394
- /** Accessible name of that loading indicator. */
395
- this.loadingAriaLabel = input('Chargement de l’image', /* @ts-ignore */
396
- ...(ngDevMode ? [{ debugName: "loadingAriaLabel" }] : /* istanbul ignore next */ []));
397
- /** Clicking the image opens the enlarged view (`ui-image-preview`). */
398
- this.preview = input(false, { ...(ngDevMode ? { debugName: "preview" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
399
- /** Enlarged view open state (two-way — set it to open the preview yourself). */
400
- this.previewVisible = model(false, /* @ts-ignore */
401
- ...(ngDevMode ? [{ debugName: "previewVisible" }] : /* istanbul ignore next */ []));
402
- /** Accessible name of the trigger (defaults to the image's own `alt`). */
403
- this.previewAriaLabel = input(/* @ts-ignore */
404
- ...(ngDevMode ? [undefined, { debugName: "previewAriaLabel" }] : /* istanbul ignore next */ []));
405
- /** Accessible name of the enlarged view dialog. */
406
- this.previewDialogAriaLabel = input('Aperçu de l’image', /* @ts-ignore */
407
- ...(ngDevMode ? [{ debugName: "previewDialogAriaLabel" }] : /* istanbul ignore next */ []));
408
- /** Zoom increment of one toolbar click, wheel notch or `+`/`-` press in the preview. */
409
- this.zoomStep = input(0.25, { ...(ngDevMode ? { debugName: "zoomStep" } : /* istanbul ignore next */ {}), transform: numberAttribute });
410
- /** Lower zoom bound in the preview. */
411
- this.minZoom = input(0.5, { ...(ngDevMode ? { debugName: "minZoom" } : /* istanbul ignore next */ {}), transform: numberAttribute });
412
- /** Upper zoom bound in the preview. */
413
- this.maxZoom = input(4, { ...(ngDevMode ? { debugName: "maxZoom" } : /* istanbul ignore next */ {}), transform: numberAttribute });
414
- /** Offer a download action in the preview toolbar. */
415
- this.downloadable = input(false, { ...(ngDevMode ? { debugName: "downloadable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
416
- /** Filename proposed by that download action. */
417
- this.downloadName = input(/* @ts-ignore */
418
- ...(ngDevMode ? [undefined, { debugName: "downloadName" }] : /* istanbul ignore next */ []));
419
- /** Emitted with the failed URL when an image fails to load. */
420
- this.loadFailed = output();
421
- /**
422
- * Replaces the hover indicator of the `preview` mode (the magnifier). Rendered
423
- * over the image, decorative — the accessible name stays on the trigger.
424
- *
425
- * ```html
426
- * <ui-image src="…" preview>
427
- * <ng-template #previewIndicator>Agrandir</ng-template>
428
- * </ui-image>
429
- * ```
430
- */
431
- this.previewIndicator = contentChild('previewIndicator', /* @ts-ignore */
432
- ...(ngDevMode ? [{ debugName: "previewIndicator" }] : /* istanbul ignore next */ []));
433
- this.isRemote = computed(() => !!this.src(), /* @ts-ignore */
434
- ...(ngDevMode ? [{ debugName: "isRemote" }] : /* istanbul ignore next */ []));
435
- /** Inline SVG is reserved for LOCAL assets — a remote `.svg` renders through `<img>` (no XSS surface). */
436
- this.isInlineSvg = computed(() => !this.isRemote() && !!this.name()?.toLowerCase().endsWith('.svg'), /* @ts-ignore */
437
- ...(ngDevMode ? [{ debugName: "isInlineSvg" }] : /* istanbul ignore next */ []));
438
- /** `secured` only means anything with a `src` to fetch. */
439
- this.isSecured = computed(() => this.secured() && !!this.src(), /* @ts-ignore */
440
- ...(ngDevMode ? [{ debugName: "isSecured" }] : /* istanbul ignore next */ []));
441
- /** A `data:` payload is already the image — `NgOptimizedImage` refuses it. */
442
- this.isDataUrl = computed(() => DATA_URL.test(this.src() ?? ''), /* @ts-ignore */
443
- ...(ngDevMode ? [{ debugName: "isDataUrl" }] : /* istanbul ignore next */ []));
444
- this.localSrc = computed(() => this.resolveLocal(this.name()), /* @ts-ignore */
445
- ...(ngDevMode ? [{ debugName: "localSrc" }] : /* istanbul ignore next */ []));
446
- this.fallbackSrc = computed(() => this.resolveLocal(this.fallback()), /* @ts-ignore */
447
- ...(ngDevMode ? [{ debugName: "fallbackSrc" }] : /* istanbul ignore next */ []));
448
- // --- Secured source (HttpClient → Blob → object URL) ------------------
449
- this.blobResource = httpResource.blob(() => this.isSecured() ? { url: this.src(), withCredentials: this.withCredentials() } : undefined, /* @ts-ignore */
450
- ...(ngDevMode ? [{ debugName: "blobResource" }] : /* istanbul ignore next */ []));
451
- this.blobUrl = signal(null, /* @ts-ignore */
452
- ...(ngDevMode ? [{ debugName: "blobUrl" }] : /* istanbul ignore next */ []));
453
- this.securedLoading = computed(() => this.isSecured() && this.blobResource.isLoading(), /* @ts-ignore */
454
- ...(ngDevMode ? [{ debugName: "securedLoading" }] : /* istanbul ignore next */ []));
455
- this.securedFailed = computed(() => this.isSecured() && this.blobResource.status() === 'error', /* @ts-ignore */
456
- ...(ngDevMode ? [{ debugName: "securedFailed" }] : /* istanbul ignore next */ []));
457
- this.primarySrc = computed(() => this.isSecured() ? (this.blobUrl() ?? '') : this.src() || this.localSrc(), /* @ts-ignore */
458
- ...(ngDevMode ? [{ debugName: "primarySrc" }] : /* istanbul ignore next */ []));
459
- // Failure flags auto-reset when their source URL changes (theme/brand/src swap → automatic retry).
460
- this.primaryImgFailed = linkedSignal({ ...(ngDevMode ? { debugName: "primaryImgFailed" } : /* istanbul ignore next */ {}), source: this.primarySrc,
461
- computation: () => false });
462
- this.fallbackImgFailed = linkedSignal({ ...(ngDevMode ? { debugName: "fallbackImgFailed" } : /* istanbul ignore next */ {}), source: this.fallbackSrc,
463
- computation: () => false });
464
- this.svgResource = httpResource.text(() => {
465
- if (!this.isInlineSvg())
466
- return undefined;
467
- const url = this.localSrc();
468
- return !url || SVG_CACHE.has(url) ? undefined : url;
469
- }, /* @ts-ignore */
470
- ...(ngDevMode ? [{ debugName: "svgResource" }] : /* istanbul ignore next */ []));
471
- /**
472
- * The inlined SVG, scrubbed then trusted.
473
- *
474
- * FSHSP-177 — this is the kit's ONLY `bypassSecurityTrust*()`. It is not
475
- * avoidable: Angular's HTML sanitizer strips `<svg>` wholesale, so passing the
476
- * asset through `sanitize(SecurityContext.HTML, …)` would render nothing, and
477
- * inlining is the whole point (the asset inherits `currentColor` and the
478
- * theme's CSS — an `<img>` cannot). What makes the bypass defensible is that
479
- * the markup went through `sanitizeInlineSvg()` first: scripts, `foreignObject`,
480
- * SMIL, event handlers and non-navigational references are already gone.
481
- * Justified in `docs/SECURITY-PRACTICES.md`.
482
- */
483
- this.svgContent = computed(() => {
484
- if (!this.isInlineSvg())
485
- return null;
486
- const url = this.localSrc();
487
- if (!url)
488
- return null;
489
- const safe = SVG_CACHE.get(url) ??
490
- (this.svgResource.hasValue() ? sanitizeInlineSvg(this.svgResource.value()) : undefined);
491
- /* eslint-disable-next-line no-restricted-syntax -- EXCEPTION JUSTIFIÉE :
492
- seul bypass du kit. Inévitable (l'assainisseur d'Angular supprime `<svg>`
493
- en entier) et sûr parce que `sanitizeInlineSvg()` a déjà retiré scripts,
494
- foreignObject, SMIL, gestionnaires d'événements et références non
495
- navigationnelles. Registre : docs/SECURITY-PRACTICES.md. */
496
- return safe === undefined ? null : this.sanitizer.bypassSecurityTrustHtml(safe);
497
- }, /* @ts-ignore */
498
- ...(ngDevMode ? [{ debugName: "svgContent" }] : /* istanbul ignore next */ []));
499
- this.primaryFailed = computed(() => {
500
- if (this.isInlineSvg())
501
- return this.svgResource.status() === 'error';
502
- return this.securedFailed() || this.primaryImgFailed();
503
- }, /* @ts-ignore */
504
- ...(ngDevMode ? [{ debugName: "primaryFailed" }] : /* istanbul ignore next */ []));
505
- this.showFallback = computed(() => this.primaryFailed() && !!this.fallbackSrc() && !this.fallbackImgFailed(), /* @ts-ignore */
506
- ...(ngDevMode ? [{ debugName: "showFallback" }] : /* istanbul ignore next */ []));
507
- this.showPlaceholder = computed(() => !this.securedLoading() &&
508
- (!this.primarySrc() ||
509
- (this.primaryFailed() && (!this.fallbackSrc() || this.fallbackImgFailed()))), /* @ts-ignore */
510
- ...(ngDevMode ? [{ debugName: "showPlaceholder" }] : /* istanbul ignore next */ []));
511
- this.displayedSrc = computed(() => this.showFallback() ? this.fallbackSrc() : this.primarySrc(), /* @ts-ignore */
512
- ...(ngDevMode ? [{ debugName: "displayedSrc" }] : /* istanbul ignore next */ []));
513
- /** `blob:`/`data:` bypass `NgOptimizedImage`; a local fallback never does. */
514
- this.isRawSrc = computed(() => !this.showFallback() && (this.isSecured() || this.isDataUrl()), /* @ts-ignore */
515
- ...(ngDevMode ? [{ debugName: "isRawSrc" }] : /* istanbul ignore next */ []));
516
- /** The image is a preview trigger only once there is something to enlarge. */
517
- this.canPreview = computed(() => this.preview() && !this.showPlaceholder() && !this.securedLoading(), /* @ts-ignore */
518
- ...(ngDevMode ? [{ debugName: "canPreview" }] : /* istanbul ignore next */ []));
519
- this.cssWidth = computed(() => this.width() != null ? `${this.width()}${this.widthUnit() || 'px'}` : null, /* @ts-ignore */
520
- ...(ngDevMode ? [{ debugName: "cssWidth" }] : /* istanbul ignore next */ []));
521
- this.cssHeight = computed(() => this.height() != null ? `${this.height()}${this.heightUnit() || 'px'}` : null, /* @ts-ignore */
522
- ...(ngDevMode ? [{ debugName: "cssHeight" }] : /* istanbul ignore next */ []));
523
- // Side effect only: populate the module-level SVG cache once a fetch
524
- // resolves. Scrubbed on the way in — the cache is read straight into the
525
- // bypass, so it must never hold a raw response.
526
- effect(() => {
527
- if (!this.isInlineSvg())
528
- return;
529
- const url = this.localSrc();
530
- if (url && this.svgResource.hasValue())
531
- SVG_CACHE.set(url, sanitizeInlineSvg(this.svgResource.value()));
532
- });
533
- // The object URL's whole lifetime: created when a Blob arrives, revoked by
534
- // the cleanup — which runs before the next source AND on destroy. That is
535
- // what keeps a list of secured images from leaking one URL per render.
536
- effect((onCleanup) => {
537
- const blob = this.blobResource.hasValue() ? this.blobResource.value() : undefined;
538
- if (!blob || !this.isBrowser) {
539
- this.blobUrl.set(null);
540
- return;
541
- }
542
- const url = URL.createObjectURL(blob);
543
- this.blobUrl.set(url);
544
- onCleanup(() => URL.revokeObjectURL(url));
545
- });
546
- // A failed fetch never reaches an `<img>`, so `(error)` cannot report it.
547
- effect(() => {
548
- if (this.securedFailed())
549
- this.loadFailed.emit(this.src());
550
- });
551
- // Nothing left to enlarge (source swapped, load failed): close rather than
552
- // leave the dialog on a stale image.
553
- effect(() => {
554
- if (this.previewVisible() && !this.canPreview())
555
- this.previewVisible.set(false);
556
- });
557
- if (isDevMode()) {
558
- effect(() => {
559
- if (this.src() && this.name()) {
560
- console.warn('[ui-image] `src` and `name` are both set — `src` takes precedence.');
561
- }
562
- if (!this.src() && !this.name()) {
563
- console.warn('[ui-image] Neither `src` nor `name` is set — the placeholder is displayed.');
564
- }
565
- if (this.secured() && !this.src()) {
566
- console.warn('[ui-image] `secured` has no effect without `src` — nothing to fetch.');
567
- }
568
- if (this.preview() && !this.alt() && !this.previewAriaLabel()) {
569
- console.warn('[ui-image] `preview` renders a button with no accessible name — set `alt` or `previewAriaLabel`.');
570
- }
571
- });
572
- }
573
- }
574
- onImgError() {
575
- const failed = this.displayedSrc();
576
- if (this.showFallback())
577
- this.fallbackImgFailed.set(true);
578
- else
579
- this.primaryImgFailed.set(true);
580
- if (failed)
581
- this.loadFailed.emit(failed);
582
- }
583
- resolveLocal(filename) {
584
- if (!filename)
585
- return '';
586
- const mode = this.themeService.currentMode();
587
- const brand = this.brandService.currentBrand();
588
- const fileEntry = this.assetsMap[filename];
589
- if (!fileEntry)
590
- return '';
591
- if (fileEntry[brand]) {
592
- const path = this.resolvePath(brand, fileEntry[brand], mode, filename);
593
- if (path)
594
- return path;
595
- }
596
- if (fileEntry['common']) {
597
- return this.buildPath('common', fileEntry['common'], mode, filename);
598
- }
599
- return '';
600
- }
601
- resolvePath(themeFolder, variants, currentMode, filename) {
602
- if (variants[currentMode]) {
603
- const type = variants[currentMode];
604
- return `assets/img/${themeFolder}/${type}/${currentMode}/${filename}`;
605
- }
606
- if (variants.base) {
607
- const type = variants.base;
608
- return `assets/img/${themeFolder}/${type}/${filename}`;
609
- }
610
- return null;
611
- }
612
- buildPath(themeName, variants, currentMode, filename) {
613
- if (variants[currentMode]) {
614
- const type = variants[currentMode];
615
- return `assets/img/${themeName}/${type}/${currentMode}/${filename}`;
616
- }
617
- if (variants.base) {
618
- const type = variants.base;
619
- return `assets/img/${themeName}/${type}/${filename}`;
620
- }
621
- return '';
622
- }
623
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiImage, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
624
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: UiImage, isStandalone: true, selector: "ui-image", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null }, fallback: { classPropertyName: "fallback", publicName: "fallback", isSignal: true, isRequired: false, transformFunction: null }, priority: { classPropertyName: "priority", publicName: "priority", isSignal: true, isRequired: false, transformFunction: null }, fill: { classPropertyName: "fill", publicName: "fill", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, widthUnit: { classPropertyName: "widthUnit", publicName: "widthUnit", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, heightUnit: { classPropertyName: "heightUnit", publicName: "heightUnit", isSignal: true, isRequired: false, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, secured: { classPropertyName: "secured", publicName: "secured", isSignal: true, isRequired: false, transformFunction: null }, withCredentials: { classPropertyName: "withCredentials", publicName: "withCredentials", isSignal: true, isRequired: false, transformFunction: null }, loadingLabel: { classPropertyName: "loadingLabel", publicName: "loadingLabel", isSignal: true, isRequired: false, transformFunction: null }, loadingAriaLabel: { classPropertyName: "loadingAriaLabel", publicName: "loadingAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, preview: { classPropertyName: "preview", publicName: "preview", isSignal: true, isRequired: false, transformFunction: null }, previewVisible: { classPropertyName: "previewVisible", publicName: "previewVisible", isSignal: true, isRequired: false, transformFunction: null }, previewAriaLabel: { classPropertyName: "previewAriaLabel", publicName: "previewAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, previewDialogAriaLabel: { classPropertyName: "previewDialogAriaLabel", publicName: "previewDialogAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, zoomStep: { classPropertyName: "zoomStep", publicName: "zoomStep", isSignal: true, isRequired: false, transformFunction: null }, minZoom: { classPropertyName: "minZoom", publicName: "minZoom", isSignal: true, isRequired: false, transformFunction: null }, maxZoom: { classPropertyName: "maxZoom", publicName: "maxZoom", isSignal: true, isRequired: false, transformFunction: null }, downloadable: { classPropertyName: "downloadable", publicName: "downloadable", isSignal: true, isRequired: false, transformFunction: null }, downloadName: { classPropertyName: "downloadName", publicName: "downloadName", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { previewVisible: "previewVisibleChange", loadFailed: "loadFailed" }, queries: [{ propertyName: "previewIndicator", first: true, predicate: ["previewIndicator"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- The media is written once and rendered either bare, or inside the preview\n trigger \u2014 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\u00C9E (FSHSP-177) : le SVG local est inlin\u00E9 pour h\u00E9riter du CSS\n (currentColor, th\u00E8me) \u2014 un <img> ne le permet pas. La valeur est assainie par\n sanitizeInlineSvg() puis pass\u00E9e \u00E0 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 \u00E0 l'int\u00E9rieur 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", styles: ["@charset \"UTF-8\";:host{display:flex;align-items:center;justify-content:center}.ui-image{object-fit:var(--ui-image-object-fit, contain)}.ui-image-svg{display:flex;width:100%}.ui-image-svg ::ng-deep svg{width:100%;height:100%}.ui-image-placeholder{display:flex;align-items:center;justify-content:center;min-width:var(--ui-image-placeholder-min-width, var(--units-xl));min-height:var(--ui-image-placeholder-min-height, var(--units-xl));border-radius:var(--ui-image-placeholder-radius, var(--radius-default));background:var(--ui-image-placeholder-surface, var(--global-background-muted));color:var(--ui-image-placeholder-color, var(--global-text-muted))}.ui-image-trigger{position:relative;display:inline-flex;padding:0;border:none;border-radius:var(--ui-image-trigger-radius, 0);background:none;line-height:0;cursor:pointer}.ui-image-trigger:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-image-trigger-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-image-trigger-focus-ring-color, var(--global-border-focus))}.ui-image-trigger:hover .ui-image-indicator,.ui-image-trigger:focus-visible .ui-image-indicator{opacity:1}.ui-image-indicator{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;border-radius:inherit;background:var(--ui-image-indicator-background, var(--primitives-black-50));color:var(--ui-image-indicator-color, var(--primitives-white-base));font-size:var(--ui-image-indicator-font-size, var(--size-typography-text-lg));line-height:1;opacity:0;transition:opacity var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}@media(prefers-reduced-motion:reduce){.ui-image-indicator{transition-duration:.01ms}}:root[data-motion=off] .ui-image-indicator{transition-duration:.01ms}\n"], dependencies: [{ kind: "directive", type: NgOptimizedImage, selector: "img[ngSrc]", inputs: ["ngSrc", "ngSrcset", "sizes", "width", "height", "decoding", "loading", "priority", "loaderParams", "disableOptimizedSrcset", "fill", "placeholder", "placeholderConfig", "src", "srcset"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: UiIcon, selector: "ui-icon", inputs: ["name", "size", "type", "family", "decorative", "ariaLabel"] }, { kind: "component", type: UiSpinner, selector: "ui-spinner", inputs: ["size", "orientation", "label", "ariaLabel", "spinnerTemplate", "image", "imageAlt", "icon", "strokeWidth", "fill", "animationDuration", "delay"] }, { kind: "directive", type: UiMotion, selector: "[uiMotion]", inputs: ["uiMotion", "motionDuration", "motionDelay", "motionEasing", "motionEnterEasing", "motionLeaveEasing", "motionDistance", "motionScale", "motionDisabled", "motionOnInsert"], exportAs: ["uiMotion"] }, { kind: "component", type: UiImagePreview, selector: "ui-image-preview", inputs: ["src", "alt", "ariaLabel", "zoomStep", "minZoom", "maxZoom", "downloadable", "downloadName", "dismissableMask", "zoomInAriaLabel", "zoomOutAriaLabel", "rotateLeftAriaLabel", "rotateRightAriaLabel", "resetAriaLabel", "downloadAriaLabel", "closeAriaLabel"], outputs: ["closed"] }] }); }
625
- }
626
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: UiImage, decorators: [{
627
- type: Component,
628
- args: [{ selector: 'ui-image', imports: [NgOptimizedImage, NgTemplateOutlet, UiIcon, UiSpinner, UiMotion, UiImagePreview], template: "<!-- The media is written once and rendered either bare, or inside the preview\n trigger \u2014 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\u00C9E (FSHSP-177) : le SVG local est inlin\u00E9 pour h\u00E9riter du CSS\n (currentColor, th\u00E8me) \u2014 un <img> ne le permet pas. La valeur est assainie par\n sanitizeInlineSvg() puis pass\u00E9e \u00E0 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 \u00E0 l'int\u00E9rieur 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", styles: ["@charset \"UTF-8\";:host{display:flex;align-items:center;justify-content:center}.ui-image{object-fit:var(--ui-image-object-fit, contain)}.ui-image-svg{display:flex;width:100%}.ui-image-svg ::ng-deep svg{width:100%;height:100%}.ui-image-placeholder{display:flex;align-items:center;justify-content:center;min-width:var(--ui-image-placeholder-min-width, var(--units-xl));min-height:var(--ui-image-placeholder-min-height, var(--units-xl));border-radius:var(--ui-image-placeholder-radius, var(--radius-default));background:var(--ui-image-placeholder-surface, var(--global-background-muted));color:var(--ui-image-placeholder-color, var(--global-text-muted))}.ui-image-trigger{position:relative;display:inline-flex;padding:0;border:none;border-radius:var(--ui-image-trigger-radius, 0);background:none;line-height:0;cursor:pointer}.ui-image-trigger:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-image-trigger-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-image-trigger-focus-ring-color, var(--global-border-focus))}.ui-image-trigger:hover .ui-image-indicator,.ui-image-trigger:focus-visible .ui-image-indicator{opacity:1}.ui-image-indicator{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;border-radius:inherit;background:var(--ui-image-indicator-background, var(--primitives-black-50));color:var(--ui-image-indicator-color, var(--primitives-white-base));font-size:var(--ui-image-indicator-font-size, var(--size-typography-text-lg));line-height:1;opacity:0;transition:opacity var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}@media(prefers-reduced-motion:reduce){.ui-image-indicator{transition-duration:.01ms}}:root[data-motion=off] .ui-image-indicator{transition-duration:.01ms}\n"] }]
629
- }], ctorParameters: () => [], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], src: [{ type: i0.Input, args: [{ isSignal: true, alias: "src", required: false }] }], fallback: [{ type: i0.Input, args: [{ isSignal: true, alias: "fallback", required: false }] }], priority: [{ type: i0.Input, args: [{ isSignal: true, alias: "priority", required: false }] }], fill: [{ type: i0.Input, args: [{ isSignal: true, alias: "fill", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], widthUnit: [{ type: i0.Input, args: [{ isSignal: true, alias: "widthUnit", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], heightUnit: [{ type: i0.Input, args: [{ isSignal: true, alias: "heightUnit", required: false }] }], alt: [{ type: i0.Input, args: [{ isSignal: true, alias: "alt", required: false }] }], secured: [{ type: i0.Input, args: [{ isSignal: true, alias: "secured", required: false }] }], withCredentials: [{ type: i0.Input, args: [{ isSignal: true, alias: "withCredentials", required: false }] }], loadingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingLabel", required: false }] }], loadingAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingAriaLabel", required: false }] }], preview: [{ type: i0.Input, args: [{ isSignal: true, alias: "preview", required: false }] }], previewVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "previewVisible", required: false }] }, { type: i0.Output, args: ["previewVisibleChange"] }], previewAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "previewAriaLabel", required: false }] }], previewDialogAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "previewDialogAriaLabel", required: false }] }], zoomStep: [{ type: i0.Input, args: [{ isSignal: true, alias: "zoomStep", required: false }] }], minZoom: [{ type: i0.Input, args: [{ isSignal: true, alias: "minZoom", required: false }] }], maxZoom: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxZoom", required: false }] }], downloadable: [{ type: i0.Input, args: [{ isSignal: true, alias: "downloadable", required: false }] }], downloadName: [{ type: i0.Input, args: [{ isSignal: true, alias: "downloadName", required: false }] }], loadFailed: [{ type: i0.Output, args: ["loadFailed"] }], previewIndicator: [{ type: i0.ContentChild, args: ['previewIndicator', { isSignal: true }] }] } });
630
-
631
- /*
632
- * Public API Surface of ui-kit/ui-image
633
- *
634
- * Includes `ui-image-preview`: it renders the source `ui-image` has already
635
- * resolved, so the two live in one entry point (a separate one would be a cycle).
636
- */
637
-
638
- /**
639
- * Generated bundle index. Do not edit.
640
- */
641
-
526
+ var UiImage = class UiImage {
527
+ constructor() {
528
+ this.sanitizer = inject(DomSanitizer);
529
+ this.assetsMap = inject(UI_IMAGE_ASSETS, { optional: true }) ?? {};
530
+ this.themeService = inject(ThemeService);
531
+ this.brandService = inject(BrandService);
532
+ this.isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
533
+ this.name = input(...ngDevMode ? [void 0, { debugName: "name" }] : /* istanbul ignore next */ []);
534
+ this.src = input(...ngDevMode ? [void 0, { debugName: "src" }] : /* istanbul ignore next */ []);
535
+ this.fallback = input(...ngDevMode ? [void 0, { debugName: "fallback" }] : /* istanbul ignore next */ []);
536
+ this.priority = input(false, ...ngDevMode ? [{ debugName: "priority" }] : /* istanbul ignore next */ []);
537
+ this.fill = input(false, ...ngDevMode ? [{ debugName: "fill" }] : /* istanbul ignore next */ []);
538
+ this.width = input(...ngDevMode ? [void 0, { debugName: "width" }] : /* istanbul ignore next */ []);
539
+ this.widthUnit = input(...ngDevMode ? [void 0, { debugName: "widthUnit" }] : /* istanbul ignore next */ []);
540
+ this.height = input(...ngDevMode ? [void 0, { debugName: "height" }] : /* istanbul ignore next */ []);
541
+ this.heightUnit = input(...ngDevMode ? [void 0, { debugName: "heightUnit" }] : /* istanbul ignore next */ []);
542
+ this.alt = input(...ngDevMode ? [void 0, { debugName: "alt" }] : /* istanbul ignore next */ []);
543
+ this.secured = input(false, {
544
+ ...ngDevMode ? { debugName: "secured" } : /* istanbul ignore next */ {},
545
+ transform: booleanAttribute
546
+ });
547
+ this.withCredentials = input(false, {
548
+ ...ngDevMode ? { debugName: "withCredentials" } : /* istanbul ignore next */ {},
549
+ transform: booleanAttribute
550
+ });
551
+ this.loadingLabel = input(...ngDevMode ? [void 0, { debugName: "loadingLabel" }] : /* istanbul ignore next */ []);
552
+ this.loadingAriaLabel = input("Chargement de l’image", ...ngDevMode ? [{ debugName: "loadingAriaLabel" }] : /* istanbul ignore next */ []);
553
+ this.preview = input(false, {
554
+ ...ngDevMode ? { debugName: "preview" } : /* istanbul ignore next */ {},
555
+ transform: booleanAttribute
556
+ });
557
+ this.previewVisible = model(false, ...ngDevMode ? [{ debugName: "previewVisible" }] : /* istanbul ignore next */ []);
558
+ this.previewAriaLabel = input(...ngDevMode ? [void 0, { debugName: "previewAriaLabel" }] : /* istanbul ignore next */ []);
559
+ this.previewDialogAriaLabel = input("Aperçu de l’image", ...ngDevMode ? [{ debugName: "previewDialogAriaLabel" }] : /* istanbul ignore next */ []);
560
+ this.zoomStep = input(.25, {
561
+ ...ngDevMode ? { debugName: "zoomStep" } : /* istanbul ignore next */ {},
562
+ transform: numberAttribute
563
+ });
564
+ this.minZoom = input(.5, {
565
+ ...ngDevMode ? { debugName: "minZoom" } : /* istanbul ignore next */ {},
566
+ transform: numberAttribute
567
+ });
568
+ this.maxZoom = input(4, {
569
+ ...ngDevMode ? { debugName: "maxZoom" } : /* istanbul ignore next */ {},
570
+ transform: numberAttribute
571
+ });
572
+ this.downloadable = input(false, {
573
+ ...ngDevMode ? { debugName: "downloadable" } : /* istanbul ignore next */ {},
574
+ transform: booleanAttribute
575
+ });
576
+ this.downloadName = input(...ngDevMode ? [void 0, { debugName: "downloadName" }] : /* istanbul ignore next */ []);
577
+ this.loadFailed = output();
578
+ this.previewIndicator = contentChild("previewIndicator", ...ngDevMode ? [{ debugName: "previewIndicator" }] : /* istanbul ignore next */ []);
579
+ this.isRemote = computed(() => !!this.src(), ...ngDevMode ? [{ debugName: "isRemote" }] : /* istanbul ignore next */ []);
580
+ this.isInlineSvg = computed(() => !this.isRemote() && !!this.name()?.toLowerCase().endsWith(".svg"), ...ngDevMode ? [{ debugName: "isInlineSvg" }] : /* istanbul ignore next */ []);
581
+ this.isSecured = computed(() => this.secured() && !!this.src(), ...ngDevMode ? [{ debugName: "isSecured" }] : /* istanbul ignore next */ []);
582
+ this.isDataUrl = computed(() => DATA_URL.test(this.src() ?? ""), ...ngDevMode ? [{ debugName: "isDataUrl" }] : /* istanbul ignore next */ []);
583
+ this.localSrc = computed(() => this.resolveLocal(this.name()), ...ngDevMode ? [{ debugName: "localSrc" }] : /* istanbul ignore next */ []);
584
+ this.fallbackSrc = computed(() => this.resolveLocal(this.fallback()), ...ngDevMode ? [{ debugName: "fallbackSrc" }] : /* istanbul ignore next */ []);
585
+ this.blobResource = httpResource.blob(() => this.isSecured() ? {
586
+ url: this.src(),
587
+ withCredentials: this.withCredentials()
588
+ } : void 0, ...ngDevMode ? [{ debugName: "blobResource" }] : /* istanbul ignore next */ []);
589
+ this.blobUrl = signal(null, ...ngDevMode ? [{ debugName: "blobUrl" }] : /* istanbul ignore next */ []);
590
+ this.securedLoading = computed(() => this.isSecured() && this.blobResource.isLoading(), ...ngDevMode ? [{ debugName: "securedLoading" }] : /* istanbul ignore next */ []);
591
+ this.securedFailed = computed(() => this.isSecured() && this.blobResource.status() === "error", ...ngDevMode ? [{ debugName: "securedFailed" }] : /* istanbul ignore next */ []);
592
+ this.primarySrc = computed(() => this.isSecured() ? this.blobUrl() ?? "" : this.src() || this.localSrc(), ...ngDevMode ? [{ debugName: "primarySrc" }] : /* istanbul ignore next */ []);
593
+ this.primaryImgFailed = linkedSignal({
594
+ ...ngDevMode ? { debugName: "primaryImgFailed" } : /* istanbul ignore next */ {},
595
+ source: this.primarySrc,
596
+ computation: () => false
597
+ });
598
+ this.fallbackImgFailed = linkedSignal({
599
+ ...ngDevMode ? { debugName: "fallbackImgFailed" } : /* istanbul ignore next */ {},
600
+ source: this.fallbackSrc,
601
+ computation: () => false
602
+ });
603
+ this.svgResource = httpResource.text(() => {
604
+ if (!this.isInlineSvg()) return void 0;
605
+ const url = this.localSrc();
606
+ return !url || SVG_CACHE.has(url) ? void 0 : url;
607
+ }, ...ngDevMode ? [{ debugName: "svgResource" }] : /* istanbul ignore next */ []);
608
+ this.svgContent = computed(() => {
609
+ if (!this.isInlineSvg()) return null;
610
+ const url = this.localSrc();
611
+ if (!url) return null;
612
+ const safe = SVG_CACHE.get(url) ?? (this.svgResource.hasValue() ? sanitizeInlineSvg(this.svgResource.value()) : void 0);
613
+ return safe === void 0 ? null : this.sanitizer.bypassSecurityTrustHtml(safe);
614
+ }, ...ngDevMode ? [{ debugName: "svgContent" }] : /* istanbul ignore next */ []);
615
+ this.primaryFailed = computed(() => {
616
+ if (this.isInlineSvg()) return this.svgResource.status() === "error";
617
+ return this.securedFailed() || this.primaryImgFailed();
618
+ }, ...ngDevMode ? [{ debugName: "primaryFailed" }] : /* istanbul ignore next */ []);
619
+ this.showFallback = computed(() => this.primaryFailed() && !!this.fallbackSrc() && !this.fallbackImgFailed(), ...ngDevMode ? [{ debugName: "showFallback" }] : /* istanbul ignore next */ []);
620
+ this.showPlaceholder = computed(() => !this.securedLoading() && (!this.primarySrc() || this.primaryFailed() && (!this.fallbackSrc() || this.fallbackImgFailed())), ...ngDevMode ? [{ debugName: "showPlaceholder" }] : /* istanbul ignore next */ []);
621
+ this.displayedSrc = computed(() => this.showFallback() ? this.fallbackSrc() : this.primarySrc(), ...ngDevMode ? [{ debugName: "displayedSrc" }] : /* istanbul ignore next */ []);
622
+ this.isRawSrc = computed(() => !this.showFallback() && (this.isSecured() || this.isDataUrl()), ...ngDevMode ? [{ debugName: "isRawSrc" }] : /* istanbul ignore next */ []);
623
+ this.canPreview = computed(() => this.preview() && !this.showPlaceholder() && !this.securedLoading(), ...ngDevMode ? [{ debugName: "canPreview" }] : /* istanbul ignore next */ []);
624
+ this.cssWidth = computed(() => this.width() != null ? `${this.width()}${this.widthUnit() || "px"}` : null, ...ngDevMode ? [{ debugName: "cssWidth" }] : /* istanbul ignore next */ []);
625
+ this.cssHeight = computed(() => this.height() != null ? `${this.height()}${this.heightUnit() || "px"}` : null, ...ngDevMode ? [{ debugName: "cssHeight" }] : /* istanbul ignore next */ []);
626
+ effect(() => {
627
+ if (!this.isInlineSvg()) return;
628
+ const url = this.localSrc();
629
+ if (url && this.svgResource.hasValue()) SVG_CACHE.set(url, sanitizeInlineSvg(this.svgResource.value()));
630
+ });
631
+ effect((onCleanup) => {
632
+ const blob = this.blobResource.hasValue() ? this.blobResource.value() : void 0;
633
+ if (!blob || !this.isBrowser) {
634
+ this.blobUrl.set(null);
635
+ return;
636
+ }
637
+ const url = URL.createObjectURL(blob);
638
+ this.blobUrl.set(url);
639
+ onCleanup(() => URL.revokeObjectURL(url));
640
+ });
641
+ effect(() => {
642
+ if (this.securedFailed()) this.loadFailed.emit(this.src());
643
+ });
644
+ effect(() => {
645
+ if (this.previewVisible() && !this.canPreview()) this.previewVisible.set(false);
646
+ });
647
+ if (isDevMode()) effect(() => {
648
+ if (this.src() && this.name()) console.warn("[ui-image] `src` and `name` are both set — `src` takes precedence.");
649
+ if (!this.src() && !this.name()) console.warn("[ui-image] Neither `src` nor `name` is set — the placeholder is displayed.");
650
+ if (this.secured() && !this.src()) console.warn("[ui-image] `secured` has no effect without `src` — nothing to fetch.");
651
+ if (this.preview() && !this.alt() && !this.previewAriaLabel()) console.warn("[ui-image] `preview` renders a button with no accessible name — set `alt` or `previewAriaLabel`.");
652
+ });
653
+ }
654
+ onImgError() {
655
+ const failed = this.displayedSrc();
656
+ if (this.showFallback()) this.fallbackImgFailed.set(true);
657
+ else this.primaryImgFailed.set(true);
658
+ if (failed) this.loadFailed.emit(failed);
659
+ }
660
+ resolveLocal(filename) {
661
+ if (!filename) return "";
662
+ const mode = this.themeService.currentMode();
663
+ const brand = this.brandService.currentBrand();
664
+ const fileEntry = this.assetsMap[filename];
665
+ if (!fileEntry) return "";
666
+ if (fileEntry[brand]) {
667
+ const path = this.resolvePath(brand, fileEntry[brand], mode, filename);
668
+ if (path) return path;
669
+ }
670
+ if (fileEntry["common"]) return this.buildPath("common", fileEntry["common"], mode, filename);
671
+ return "";
672
+ }
673
+ resolvePath(themeFolder, variants, currentMode, filename) {
674
+ if (variants[currentMode]) return `assets/img/${themeFolder}/${variants[currentMode]}/${currentMode}/${filename}`;
675
+ if (variants.base) return `assets/img/${themeFolder}/${variants.base}/${filename}`;
676
+ return null;
677
+ }
678
+ buildPath(themeName, variants, currentMode, filename) {
679
+ if (variants[currentMode]) return `assets/img/${themeName}/${variants[currentMode]}/${currentMode}/${filename}`;
680
+ if (variants.base) return `assets/img/${themeName}/${variants.base}/${filename}`;
681
+ return "";
682
+ }
683
+ static {
684
+ this.ɵfac = i0.ɵɵngDeclareFactory({
685
+ minVersion: "12.0.0",
686
+ version: "22.3.0",
687
+ ngImport: i0,
688
+ type: UiImage,
689
+ deps: [],
690
+ target: i0.ɵɵFactoryTarget.Component
691
+ });
692
+ }
693
+ static {
694
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
695
+ minVersion: "17.0.0",
696
+ version: "22.3.0",
697
+ type: UiImage,
698
+ isStandalone: true,
699
+ selector: "ui-image",
700
+ inputs: {
701
+ name: {
702
+ classPropertyName: "name",
703
+ publicName: "name",
704
+ isSignal: true,
705
+ isRequired: false,
706
+ transformFunction: null
707
+ },
708
+ src: {
709
+ classPropertyName: "src",
710
+ publicName: "src",
711
+ isSignal: true,
712
+ isRequired: false,
713
+ transformFunction: null
714
+ },
715
+ fallback: {
716
+ classPropertyName: "fallback",
717
+ publicName: "fallback",
718
+ isSignal: true,
719
+ isRequired: false,
720
+ transformFunction: null
721
+ },
722
+ priority: {
723
+ classPropertyName: "priority",
724
+ publicName: "priority",
725
+ isSignal: true,
726
+ isRequired: false,
727
+ transformFunction: null
728
+ },
729
+ fill: {
730
+ classPropertyName: "fill",
731
+ publicName: "fill",
732
+ isSignal: true,
733
+ isRequired: false,
734
+ transformFunction: null
735
+ },
736
+ width: {
737
+ classPropertyName: "width",
738
+ publicName: "width",
739
+ isSignal: true,
740
+ isRequired: false,
741
+ transformFunction: null
742
+ },
743
+ widthUnit: {
744
+ classPropertyName: "widthUnit",
745
+ publicName: "widthUnit",
746
+ isSignal: true,
747
+ isRequired: false,
748
+ transformFunction: null
749
+ },
750
+ height: {
751
+ classPropertyName: "height",
752
+ publicName: "height",
753
+ isSignal: true,
754
+ isRequired: false,
755
+ transformFunction: null
756
+ },
757
+ heightUnit: {
758
+ classPropertyName: "heightUnit",
759
+ publicName: "heightUnit",
760
+ isSignal: true,
761
+ isRequired: false,
762
+ transformFunction: null
763
+ },
764
+ alt: {
765
+ classPropertyName: "alt",
766
+ publicName: "alt",
767
+ isSignal: true,
768
+ isRequired: false,
769
+ transformFunction: null
770
+ },
771
+ secured: {
772
+ classPropertyName: "secured",
773
+ publicName: "secured",
774
+ isSignal: true,
775
+ isRequired: false,
776
+ transformFunction: null
777
+ },
778
+ withCredentials: {
779
+ classPropertyName: "withCredentials",
780
+ publicName: "withCredentials",
781
+ isSignal: true,
782
+ isRequired: false,
783
+ transformFunction: null
784
+ },
785
+ loadingLabel: {
786
+ classPropertyName: "loadingLabel",
787
+ publicName: "loadingLabel",
788
+ isSignal: true,
789
+ isRequired: false,
790
+ transformFunction: null
791
+ },
792
+ loadingAriaLabel: {
793
+ classPropertyName: "loadingAriaLabel",
794
+ publicName: "loadingAriaLabel",
795
+ isSignal: true,
796
+ isRequired: false,
797
+ transformFunction: null
798
+ },
799
+ preview: {
800
+ classPropertyName: "preview",
801
+ publicName: "preview",
802
+ isSignal: true,
803
+ isRequired: false,
804
+ transformFunction: null
805
+ },
806
+ previewVisible: {
807
+ classPropertyName: "previewVisible",
808
+ publicName: "previewVisible",
809
+ isSignal: true,
810
+ isRequired: false,
811
+ transformFunction: null
812
+ },
813
+ previewAriaLabel: {
814
+ classPropertyName: "previewAriaLabel",
815
+ publicName: "previewAriaLabel",
816
+ isSignal: true,
817
+ isRequired: false,
818
+ transformFunction: null
819
+ },
820
+ previewDialogAriaLabel: {
821
+ classPropertyName: "previewDialogAriaLabel",
822
+ publicName: "previewDialogAriaLabel",
823
+ isSignal: true,
824
+ isRequired: false,
825
+ transformFunction: null
826
+ },
827
+ zoomStep: {
828
+ classPropertyName: "zoomStep",
829
+ publicName: "zoomStep",
830
+ isSignal: true,
831
+ isRequired: false,
832
+ transformFunction: null
833
+ },
834
+ minZoom: {
835
+ classPropertyName: "minZoom",
836
+ publicName: "minZoom",
837
+ isSignal: true,
838
+ isRequired: false,
839
+ transformFunction: null
840
+ },
841
+ maxZoom: {
842
+ classPropertyName: "maxZoom",
843
+ publicName: "maxZoom",
844
+ isSignal: true,
845
+ isRequired: false,
846
+ transformFunction: null
847
+ },
848
+ downloadable: {
849
+ classPropertyName: "downloadable",
850
+ publicName: "downloadable",
851
+ isSignal: true,
852
+ isRequired: false,
853
+ transformFunction: null
854
+ },
855
+ downloadName: {
856
+ classPropertyName: "downloadName",
857
+ publicName: "downloadName",
858
+ isSignal: true,
859
+ isRequired: false,
860
+ transformFunction: null
861
+ }
862
+ },
863
+ outputs: {
864
+ previewVisible: "previewVisibleChange",
865
+ loadFailed: "loadFailed"
866
+ },
867
+ queries: [{
868
+ propertyName: "previewIndicator",
869
+ first: true,
870
+ predicate: ["previewIndicator"],
871
+ descendants: true,
872
+ isSignal: true
873
+ }],
874
+ ngImport: i0,
875
+ template: "<!-- 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",
876
+ styles: ["@charset \"UTF-8\";:host{display:flex;align-items:center;justify-content:center}.ui-image{object-fit:var(--ui-image-object-fit, contain)}.ui-image-svg{display:flex;width:100%}.ui-image-svg ::ng-deep svg{width:100%;height:100%}.ui-image-placeholder{display:flex;align-items:center;justify-content:center;min-width:var(--ui-image-placeholder-min-width, var(--units-xl));min-height:var(--ui-image-placeholder-min-height, var(--units-xl));border-radius:var(--ui-image-placeholder-radius, var(--radius-default));background:var(--ui-image-placeholder-surface, var(--global-background-muted));color:var(--ui-image-placeholder-color, var(--global-text-muted))}.ui-image-trigger{position:relative;display:inline-flex;padding:0;border:none;border-radius:var(--ui-image-trigger-radius, 0);background:none;line-height:0;cursor:pointer}.ui-image-trigger:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-image-trigger-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-image-trigger-focus-ring-color, var(--global-border-focus))}.ui-image-trigger:hover .ui-image-indicator,.ui-image-trigger:focus-visible .ui-image-indicator{opacity:1}.ui-image-indicator{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;border-radius:inherit;background:var(--ui-image-indicator-background, var(--primitives-black-50));color:var(--ui-image-indicator-color, var(--primitives-white-base));font-size:var(--ui-image-indicator-font-size, var(--size-typography-text-lg));line-height:1;opacity:0;transition:opacity var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}@media(prefers-reduced-motion:reduce){.ui-image-indicator{transition-duration:.01ms}}:root[data-motion=off] .ui-image-indicator{transition-duration:.01ms}\n"],
877
+ dependencies: [
878
+ {
879
+ kind: "directive",
880
+ type: NgOptimizedImage,
881
+ selector: "img[ngSrc]",
882
+ inputs: [
883
+ "ngSrc",
884
+ "ngSrcset",
885
+ "sizes",
886
+ "width",
887
+ "height",
888
+ "decoding",
889
+ "loading",
890
+ "priority",
891
+ "loaderParams",
892
+ "disableOptimizedSrcset",
893
+ "fill",
894
+ "placeholder",
895
+ "placeholderConfig",
896
+ "src",
897
+ "srcset"
898
+ ]
899
+ },
900
+ {
901
+ kind: "directive",
902
+ type: NgTemplateOutlet,
903
+ selector: "[ngTemplateOutlet]",
904
+ inputs: [
905
+ "ngTemplateOutletContext",
906
+ "ngTemplateOutlet",
907
+ "ngTemplateOutletInjector"
908
+ ]
909
+ },
910
+ {
911
+ kind: "component",
912
+ type: UiIcon,
913
+ selector: "ui-icon",
914
+ inputs: [
915
+ "name",
916
+ "size",
917
+ "type",
918
+ "family",
919
+ "decorative",
920
+ "ariaLabel"
921
+ ]
922
+ },
923
+ {
924
+ kind: "component",
925
+ type: UiSpinner,
926
+ selector: "ui-spinner",
927
+ inputs: [
928
+ "size",
929
+ "orientation",
930
+ "label",
931
+ "ariaLabel",
932
+ "spinnerTemplate",
933
+ "image",
934
+ "imageAlt",
935
+ "icon",
936
+ "strokeWidth",
937
+ "fill",
938
+ "animationDuration",
939
+ "delay"
940
+ ]
941
+ },
942
+ {
943
+ kind: "directive",
944
+ type: UiMotion,
945
+ selector: "[uiMotion]",
946
+ inputs: [
947
+ "uiMotion",
948
+ "motionDuration",
949
+ "motionDelay",
950
+ "motionEasing",
951
+ "motionEnterEasing",
952
+ "motionLeaveEasing",
953
+ "motionDistance",
954
+ "motionScale",
955
+ "motionDisabled",
956
+ "motionOnInsert"
957
+ ],
958
+ exportAs: ["uiMotion"]
959
+ },
960
+ {
961
+ kind: "component",
962
+ type: UiImagePreview,
963
+ selector: "ui-image-preview",
964
+ inputs: [
965
+ "src",
966
+ "alt",
967
+ "ariaLabel",
968
+ "zoomStep",
969
+ "minZoom",
970
+ "maxZoom",
971
+ "downloadable",
972
+ "downloadName",
973
+ "dismissableMask",
974
+ "zoomInAriaLabel",
975
+ "zoomOutAriaLabel",
976
+ "rotateLeftAriaLabel",
977
+ "rotateRightAriaLabel",
978
+ "resetAriaLabel",
979
+ "downloadAriaLabel",
980
+ "closeAriaLabel"
981
+ ],
982
+ outputs: ["closed"]
983
+ }
984
+ ]
985
+ });
986
+ }
987
+ };
988
+ i0.ɵɵngDeclareClassMetadata({
989
+ minVersion: "12.0.0",
990
+ version: "22.3.0",
991
+ ngImport: i0,
992
+ type: UiImage,
993
+ decorators: [{
994
+ type: Component,
995
+ args: [{
996
+ selector: "ui-image",
997
+ imports: [
998
+ NgOptimizedImage,
999
+ NgTemplateOutlet,
1000
+ UiIcon,
1001
+ UiSpinner,
1002
+ UiMotion,
1003
+ UiImagePreview
1004
+ ],
1005
+ template: "<!-- 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",
1006
+ styles: ["@charset \"UTF-8\";:host{display:flex;align-items:center;justify-content:center}.ui-image{object-fit:var(--ui-image-object-fit, contain)}.ui-image-svg{display:flex;width:100%}.ui-image-svg ::ng-deep svg{width:100%;height:100%}.ui-image-placeholder{display:flex;align-items:center;justify-content:center;min-width:var(--ui-image-placeholder-min-width, var(--units-xl));min-height:var(--ui-image-placeholder-min-height, var(--units-xl));border-radius:var(--ui-image-placeholder-radius, var(--radius-default));background:var(--ui-image-placeholder-surface, var(--global-background-muted));color:var(--ui-image-placeholder-color, var(--global-text-muted))}.ui-image-trigger{position:relative;display:inline-flex;padding:0;border:none;border-radius:var(--ui-image-trigger-radius, 0);background:none;line-height:0;cursor:pointer}.ui-image-trigger:focus-visible{outline:none;box-shadow:0 0 0 var(--ui-image-trigger-focus-ring-width, var(--ui-focus-ring-width, var(--units-2xs))) var(--ui-image-trigger-focus-ring-color, var(--global-border-focus))}.ui-image-trigger:hover .ui-image-indicator,.ui-image-trigger:focus-visible .ui-image-indicator{opacity:1}.ui-image-indicator{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;border-radius:inherit;background:var(--ui-image-indicator-background, var(--primitives-black-50));color:var(--ui-image-indicator-color, var(--primitives-white-base));font-size:var(--ui-image-indicator-font-size, var(--size-typography-text-lg));line-height:1;opacity:0;transition:opacity var(--ui-control-transition-duration, var(--motion-hover-duration, var(--transition-default))) var(--ui-control-transition-easing, var(--motion-hover-easing, var(--transition-easeinout)))}@media(prefers-reduced-motion:reduce){.ui-image-indicator{transition-duration:.01ms}}:root[data-motion=off] .ui-image-indicator{transition-duration:.01ms}\n"]
1007
+ }]
1008
+ }],
1009
+ ctorParameters: () => [],
1010
+ propDecorators: {
1011
+ name: [{
1012
+ type: i0.Input,
1013
+ args: [{
1014
+ isSignal: true,
1015
+ alias: "name",
1016
+ required: false
1017
+ }]
1018
+ }],
1019
+ src: [{
1020
+ type: i0.Input,
1021
+ args: [{
1022
+ isSignal: true,
1023
+ alias: "src",
1024
+ required: false
1025
+ }]
1026
+ }],
1027
+ fallback: [{
1028
+ type: i0.Input,
1029
+ args: [{
1030
+ isSignal: true,
1031
+ alias: "fallback",
1032
+ required: false
1033
+ }]
1034
+ }],
1035
+ priority: [{
1036
+ type: i0.Input,
1037
+ args: [{
1038
+ isSignal: true,
1039
+ alias: "priority",
1040
+ required: false
1041
+ }]
1042
+ }],
1043
+ fill: [{
1044
+ type: i0.Input,
1045
+ args: [{
1046
+ isSignal: true,
1047
+ alias: "fill",
1048
+ required: false
1049
+ }]
1050
+ }],
1051
+ width: [{
1052
+ type: i0.Input,
1053
+ args: [{
1054
+ isSignal: true,
1055
+ alias: "width",
1056
+ required: false
1057
+ }]
1058
+ }],
1059
+ widthUnit: [{
1060
+ type: i0.Input,
1061
+ args: [{
1062
+ isSignal: true,
1063
+ alias: "widthUnit",
1064
+ required: false
1065
+ }]
1066
+ }],
1067
+ height: [{
1068
+ type: i0.Input,
1069
+ args: [{
1070
+ isSignal: true,
1071
+ alias: "height",
1072
+ required: false
1073
+ }]
1074
+ }],
1075
+ heightUnit: [{
1076
+ type: i0.Input,
1077
+ args: [{
1078
+ isSignal: true,
1079
+ alias: "heightUnit",
1080
+ required: false
1081
+ }]
1082
+ }],
1083
+ alt: [{
1084
+ type: i0.Input,
1085
+ args: [{
1086
+ isSignal: true,
1087
+ alias: "alt",
1088
+ required: false
1089
+ }]
1090
+ }],
1091
+ secured: [{
1092
+ type: i0.Input,
1093
+ args: [{
1094
+ isSignal: true,
1095
+ alias: "secured",
1096
+ required: false
1097
+ }]
1098
+ }],
1099
+ withCredentials: [{
1100
+ type: i0.Input,
1101
+ args: [{
1102
+ isSignal: true,
1103
+ alias: "withCredentials",
1104
+ required: false
1105
+ }]
1106
+ }],
1107
+ loadingLabel: [{
1108
+ type: i0.Input,
1109
+ args: [{
1110
+ isSignal: true,
1111
+ alias: "loadingLabel",
1112
+ required: false
1113
+ }]
1114
+ }],
1115
+ loadingAriaLabel: [{
1116
+ type: i0.Input,
1117
+ args: [{
1118
+ isSignal: true,
1119
+ alias: "loadingAriaLabel",
1120
+ required: false
1121
+ }]
1122
+ }],
1123
+ preview: [{
1124
+ type: i0.Input,
1125
+ args: [{
1126
+ isSignal: true,
1127
+ alias: "preview",
1128
+ required: false
1129
+ }]
1130
+ }],
1131
+ previewVisible: [{
1132
+ type: i0.Input,
1133
+ args: [{
1134
+ isSignal: true,
1135
+ alias: "previewVisible",
1136
+ required: false
1137
+ }]
1138
+ }, {
1139
+ type: i0.Output,
1140
+ args: ["previewVisibleChange"]
1141
+ }],
1142
+ previewAriaLabel: [{
1143
+ type: i0.Input,
1144
+ args: [{
1145
+ isSignal: true,
1146
+ alias: "previewAriaLabel",
1147
+ required: false
1148
+ }]
1149
+ }],
1150
+ previewDialogAriaLabel: [{
1151
+ type: i0.Input,
1152
+ args: [{
1153
+ isSignal: true,
1154
+ alias: "previewDialogAriaLabel",
1155
+ required: false
1156
+ }]
1157
+ }],
1158
+ zoomStep: [{
1159
+ type: i0.Input,
1160
+ args: [{
1161
+ isSignal: true,
1162
+ alias: "zoomStep",
1163
+ required: false
1164
+ }]
1165
+ }],
1166
+ minZoom: [{
1167
+ type: i0.Input,
1168
+ args: [{
1169
+ isSignal: true,
1170
+ alias: "minZoom",
1171
+ required: false
1172
+ }]
1173
+ }],
1174
+ maxZoom: [{
1175
+ type: i0.Input,
1176
+ args: [{
1177
+ isSignal: true,
1178
+ alias: "maxZoom",
1179
+ required: false
1180
+ }]
1181
+ }],
1182
+ downloadable: [{
1183
+ type: i0.Input,
1184
+ args: [{
1185
+ isSignal: true,
1186
+ alias: "downloadable",
1187
+ required: false
1188
+ }]
1189
+ }],
1190
+ downloadName: [{
1191
+ type: i0.Input,
1192
+ args: [{
1193
+ isSignal: true,
1194
+ alias: "downloadName",
1195
+ required: false
1196
+ }]
1197
+ }],
1198
+ loadFailed: [{
1199
+ type: i0.Output,
1200
+ args: ["loadFailed"]
1201
+ }],
1202
+ previewIndicator: [{
1203
+ type: i0.ContentChild,
1204
+ args: ["previewIndicator", { isSignal: true }]
1205
+ }]
1206
+ }
1207
+ });
642
1208
  export { UI_IMAGE_ASSETS, UiImage, UiImagePreview, provideUiImageAssets };
643
- //# sourceMappingURL=4sh-ui-kit-base-ui-image.mjs.map
1209
+
1210
+ //# sourceMappingURL=4sh-ui-kit-base-ui-image.mjs.map