@lucca-front/ng 22.0.0-rc.4 → 22.0.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 (319) hide show
  1. package/README.md +1 -1
  2. package/fesm2022/lucca-front-ng-a11y.mjs +10 -10
  3. package/fesm2022/lucca-front-ng-a11y.mjs.map +1 -1
  4. package/fesm2022/lucca-front-ng-activity-feed.mjs +14 -14
  5. package/fesm2022/lucca-front-ng-activity-feed.mjs.map +1 -1
  6. package/fesm2022/lucca-front-ng-api.mjs +40 -40
  7. package/fesm2022/lucca-front-ng-app-layout.mjs +7 -6
  8. package/fesm2022/lucca-front-ng-app-layout.mjs.map +1 -1
  9. package/fesm2022/lucca-front-ng-approbation-inbox.mjs +517 -0
  10. package/fesm2022/lucca-front-ng-approbation-inbox.mjs.map +1 -0
  11. package/fesm2022/lucca-front-ng-box.mjs +12 -12
  12. package/fesm2022/lucca-front-ng-box.mjs.map +1 -1
  13. package/fesm2022/lucca-front-ng-breadcrumbs.mjs +9 -9
  14. package/fesm2022/lucca-front-ng-breadcrumbs.mjs.map +1 -1
  15. package/fesm2022/lucca-front-ng-bubble-icon.mjs +4 -4
  16. package/fesm2022/lucca-front-ng-bubble-icon.mjs.map +1 -1
  17. package/fesm2022/lucca-front-ng-bubble-illustration.mjs +7 -6
  18. package/fesm2022/lucca-front-ng-bubble-illustration.mjs.map +1 -1
  19. package/fesm2022/lucca-front-ng-callout.mjs +38 -38
  20. package/fesm2022/lucca-front-ng-callout.mjs.map +1 -1
  21. package/fesm2022/lucca-front-ng-chip.mjs +10 -10
  22. package/fesm2022/lucca-front-ng-chip.mjs.map +1 -1
  23. package/fesm2022/lucca-front-ng-clear.mjs +7 -7
  24. package/fesm2022/lucca-front-ng-clear.mjs.map +1 -1
  25. package/fesm2022/lucca-front-ng-code.mjs +6 -5
  26. package/fesm2022/lucca-front-ng-code.mjs.map +1 -1
  27. package/fesm2022/lucca-front-ng-color.mjs +7 -6
  28. package/fesm2022/lucca-front-ng-color.mjs.map +1 -1
  29. package/fesm2022/lucca-front-ng-comment.mjs +18 -17
  30. package/fesm2022/lucca-front-ng-comment.mjs.map +1 -1
  31. package/fesm2022/lucca-front-ng-container.mjs +8 -7
  32. package/fesm2022/lucca-front-ng-container.mjs.map +1 -1
  33. package/fesm2022/lucca-front-ng-core-select-api.mjs +17 -40
  34. package/fesm2022/lucca-front-ng-core-select-api.mjs.map +1 -1
  35. package/fesm2022/lucca-front-ng-core-select-department.mjs +18 -20
  36. package/fesm2022/lucca-front-ng-core-select-department.mjs.map +1 -1
  37. package/fesm2022/lucca-front-ng-core-select-establishment.mjs +28 -16
  38. package/fesm2022/lucca-front-ng-core-select-establishment.mjs.map +1 -1
  39. package/fesm2022/lucca-front-ng-core-select-job-qualification.mjs +19 -9
  40. package/fesm2022/lucca-front-ng-core-select-job-qualification.mjs.map +1 -1
  41. package/fesm2022/lucca-front-ng-core-select-legal-units.mjs +34 -21
  42. package/fesm2022/lucca-front-ng-core-select-legal-units.mjs.map +1 -1
  43. package/fesm2022/lucca-front-ng-core-select-occupation-category.mjs +16 -6
  44. package/fesm2022/lucca-front-ng-core-select-occupation-category.mjs.map +1 -1
  45. package/fesm2022/lucca-front-ng-core-select-user.mjs +41 -36
  46. package/fesm2022/lucca-front-ng-core-select-user.mjs.map +1 -1
  47. package/fesm2022/lucca-front-ng-core-select.mjs +252 -114
  48. package/fesm2022/lucca-front-ng-core-select.mjs.map +1 -1
  49. package/fesm2022/lucca-front-ng-core.mjs +113 -38
  50. package/fesm2022/lucca-front-ng-core.mjs.map +1 -1
  51. package/fesm2022/lucca-front-ng-data-table.mjs +50 -50
  52. package/fesm2022/lucca-front-ng-data-table.mjs.map +1 -1
  53. package/fesm2022/lucca-front-ng-date.mjs +42 -43
  54. package/fesm2022/lucca-front-ng-date.mjs.map +1 -1
  55. package/fesm2022/lucca-front-ng-date2.mjs +50 -48
  56. package/fesm2022/lucca-front-ng-date2.mjs.map +1 -1
  57. package/fesm2022/lucca-front-ng-department.mjs +28 -27
  58. package/fesm2022/lucca-front-ng-department.mjs.map +1 -1
  59. package/fesm2022/lucca-front-ng-dialog.mjs +85 -59
  60. package/fesm2022/lucca-front-ng-dialog.mjs.map +1 -1
  61. package/fesm2022/lucca-front-ng-divider.mjs +9 -9
  62. package/fesm2022/lucca-front-ng-divider.mjs.map +1 -1
  63. package/fesm2022/lucca-front-ng-dropdown.mjs +46 -46
  64. package/fesm2022/lucca-front-ng-dropdown.mjs.map +1 -1
  65. package/fesm2022/lucca-front-ng-empty-state.mjs +56 -31
  66. package/fesm2022/lucca-front-ng-empty-state.mjs.map +1 -1
  67. package/fesm2022/lucca-front-ng-error-page.mjs +4 -4
  68. package/fesm2022/lucca-front-ng-error-page.mjs.map +1 -1
  69. package/fesm2022/lucca-front-ng-establishment.mjs +38 -37
  70. package/fesm2022/lucca-front-ng-establishment.mjs.map +1 -1
  71. package/fesm2022/lucca-front-ng-fancy-box.mjs +4 -4
  72. package/fesm2022/lucca-front-ng-fancy-box.mjs.map +1 -1
  73. package/fesm2022/lucca-front-ng-file-upload.mjs +86 -48
  74. package/fesm2022/lucca-front-ng-file-upload.mjs.map +1 -1
  75. package/fesm2022/lucca-front-ng-filter-pills.mjs +150 -27
  76. package/fesm2022/lucca-front-ng-filter-pills.mjs.map +1 -1
  77. package/fesm2022/lucca-front-ng-footer.mjs +10 -9
  78. package/fesm2022/lucca-front-ng-footer.mjs.map +1 -1
  79. package/fesm2022/lucca-front-ng-form-field.mjs +35 -36
  80. package/fesm2022/lucca-front-ng-form-field.mjs.map +1 -1
  81. package/fesm2022/lucca-front-ng-form-header.mjs +5 -5
  82. package/fesm2022/lucca-front-ng-form-header.mjs.map +1 -1
  83. package/fesm2022/lucca-front-ng-form-label.mjs +19 -52
  84. package/fesm2022/lucca-front-ng-form-label.mjs.map +1 -1
  85. package/fesm2022/lucca-front-ng-form.mjs +9 -8
  86. package/fesm2022/lucca-front-ng-form.mjs.map +1 -1
  87. package/fesm2022/lucca-front-ng-formly.mjs +64 -64
  88. package/fesm2022/lucca-front-ng-formly.mjs.map +1 -1
  89. package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs +8 -8
  90. package/fesm2022/lucca-front-ng-forms-phone-number-input.mjs.map +1 -1
  91. package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-html.mjs +3 -3
  92. package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-markdown.mjs +6 -6
  93. package/fesm2022/lucca-front-ng-forms-rich-text-input-formatters-plain-text.mjs +3 -3
  94. package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs +68 -55
  95. package/fesm2022/lucca-front-ng-forms-rich-text-input.mjs.map +1 -1
  96. package/fesm2022/lucca-front-ng-forms.mjs +127 -113
  97. package/fesm2022/lucca-front-ng-forms.mjs.map +1 -1
  98. package/fesm2022/lucca-front-ng-gauge.mjs +11 -11
  99. package/fesm2022/lucca-front-ng-gauge.mjs.map +1 -1
  100. package/fesm2022/lucca-front-ng-grid.mjs +18 -17
  101. package/fesm2022/lucca-front-ng-grid.mjs.map +1 -1
  102. package/fesm2022/lucca-front-ng-highlight-data.mjs +11 -18
  103. package/fesm2022/lucca-front-ng-highlight-data.mjs.map +1 -1
  104. package/fesm2022/lucca-front-ng-highlight-section.mjs +85 -0
  105. package/fesm2022/lucca-front-ng-highlight-section.mjs.map +1 -0
  106. package/fesm2022/lucca-front-ng-highlight-text.mjs +3 -3
  107. package/fesm2022/lucca-front-ng-horizontal-navigation.mjs +17 -17
  108. package/fesm2022/lucca-front-ng-horizontal-navigation.mjs.map +1 -1
  109. package/fesm2022/lucca-front-ng-impersonation.mjs +7 -7
  110. package/fesm2022/lucca-front-ng-impersonation.mjs.map +1 -1
  111. package/fesm2022/lucca-front-ng-index-table.mjs +50 -50
  112. package/fesm2022/lucca-front-ng-index-table.mjs.map +1 -1
  113. package/fesm2022/lucca-front-ng-inline-message.mjs +6 -6
  114. package/fesm2022/lucca-front-ng-inline-message.mjs.map +1 -1
  115. package/fesm2022/lucca-front-ng-input.mjs +22 -22
  116. package/fesm2022/lucca-front-ng-input.mjs.map +1 -1
  117. package/fesm2022/lucca-front-ng-link.mjs +24 -16
  118. package/fesm2022/lucca-front-ng-link.mjs.map +1 -1
  119. package/fesm2022/lucca-front-ng-listbox.mjs +67 -33
  120. package/fesm2022/lucca-front-ng-listbox.mjs.map +1 -1
  121. package/fesm2022/lucca-front-ng-listing.mjs +17 -16
  122. package/fesm2022/lucca-front-ng-listing.mjs.map +1 -1
  123. package/fesm2022/lucca-front-ng-loading.mjs +8 -8
  124. package/fesm2022/lucca-front-ng-loading.mjs.map +1 -1
  125. package/fesm2022/lucca-front-ng-main-layout.mjs +131 -15
  126. package/fesm2022/lucca-front-ng-main-layout.mjs.map +1 -1
  127. package/fesm2022/lucca-front-ng-mobile-push.mjs +3 -3
  128. package/fesm2022/lucca-front-ng-mobile-push.mjs.map +1 -1
  129. package/fesm2022/lucca-front-ng-modal.mjs +27 -27
  130. package/fesm2022/lucca-front-ng-modal.mjs.map +1 -1
  131. package/fesm2022/lucca-front-ng-multi-select.mjs +216 -135
  132. package/fesm2022/lucca-front-ng-multi-select.mjs.map +1 -1
  133. package/fesm2022/lucca-front-ng-new-badge.mjs +3 -3
  134. package/fesm2022/lucca-front-ng-number-format.mjs +6 -6
  135. package/fesm2022/lucca-front-ng-number.mjs +7 -7
  136. package/fesm2022/lucca-front-ng-numeric-badge.mjs +1 -84
  137. package/fesm2022/lucca-front-ng-numeric-badge.mjs.map +1 -1
  138. package/fesm2022/lucca-front-ng-option.mjs +145 -139
  139. package/fesm2022/lucca-front-ng-option.mjs.map +1 -1
  140. package/fesm2022/lucca-front-ng-page-header.mjs +8 -8
  141. package/fesm2022/lucca-front-ng-page-header.mjs.map +1 -1
  142. package/fesm2022/lucca-front-ng-pagination.mjs +13 -16
  143. package/fesm2022/lucca-front-ng-pagination.mjs.map +1 -1
  144. package/fesm2022/lucca-front-ng-plg-push.mjs +6 -6
  145. package/fesm2022/lucca-front-ng-plg-push.mjs.map +1 -1
  146. package/fesm2022/lucca-front-ng-popover.mjs +17 -17
  147. package/fesm2022/lucca-front-ng-popover2.mjs +15 -16
  148. package/fesm2022/lucca-front-ng-popover2.mjs.map +1 -1
  149. package/fesm2022/lucca-front-ng-popup.mjs +10 -10
  150. package/fesm2022/lucca-front-ng-progress-bar.mjs +8 -7
  151. package/fesm2022/lucca-front-ng-progress-bar.mjs.map +1 -1
  152. package/fesm2022/lucca-front-ng-progress-stepper.mjs +9 -9
  153. package/fesm2022/lucca-front-ng-progress-stepper.mjs.map +1 -1
  154. package/fesm2022/lucca-front-ng-read-more.mjs +17 -12
  155. package/fesm2022/lucca-front-ng-read-more.mjs.map +1 -1
  156. package/fesm2022/lucca-front-ng-resource-card.mjs +21 -20
  157. package/fesm2022/lucca-front-ng-resource-card.mjs.map +1 -1
  158. package/fesm2022/lucca-front-ng-safe-content.mjs +10 -10
  159. package/fesm2022/lucca-front-ng-scroll-box.mjs +6 -5
  160. package/fesm2022/lucca-front-ng-scroll-box.mjs.map +1 -1
  161. package/fesm2022/lucca-front-ng-scroll.mjs +9 -9
  162. package/fesm2022/lucca-front-ng-scroll.mjs.map +1 -1
  163. package/fesm2022/lucca-front-ng-segmented-control-tabs.mjs +12 -12
  164. package/fesm2022/lucca-front-ng-segmented-control-tabs.mjs.map +1 -1
  165. package/fesm2022/lucca-front-ng-segmented-control.mjs +17 -14
  166. package/fesm2022/lucca-front-ng-segmented-control.mjs.map +1 -1
  167. package/fesm2022/lucca-front-ng-select.mjs +22 -22
  168. package/fesm2022/lucca-front-ng-select.mjs.map +1 -1
  169. package/fesm2022/lucca-front-ng-sidepanel.mjs +7 -7
  170. package/fesm2022/lucca-front-ng-simple-select.mjs +53 -39
  171. package/fesm2022/lucca-front-ng-simple-select.mjs.map +1 -1
  172. package/fesm2022/lucca-front-ng-skeleton.mjs +1 -237
  173. package/fesm2022/lucca-front-ng-skeleton.mjs.map +1 -1
  174. package/fesm2022/lucca-front-ng-software-icon-wrapper.mjs +11 -11
  175. package/fesm2022/lucca-front-ng-software-icon-wrapper.mjs.map +1 -1
  176. package/fesm2022/lucca-front-ng-software-icon.mjs +8 -7
  177. package/fesm2022/lucca-front-ng-software-icon.mjs.map +1 -1
  178. package/fesm2022/lucca-front-ng-sortable-list.mjs +13 -13
  179. package/fesm2022/lucca-front-ng-sortable-list.mjs.map +1 -1
  180. package/fesm2022/lucca-front-ng-status-badge.mjs +6 -6
  181. package/fesm2022/lucca-front-ng-status-badge.mjs.map +1 -1
  182. package/fesm2022/lucca-front-ng-table-of-content.mjs +6 -6
  183. package/fesm2022/lucca-front-ng-tag.mjs +1 -72
  184. package/fesm2022/lucca-front-ng-tag.mjs.map +1 -1
  185. package/fesm2022/lucca-front-ng-text-flow.mjs +4 -4
  186. package/fesm2022/lucca-front-ng-text-flow.mjs.map +1 -1
  187. package/fesm2022/lucca-front-ng-time.mjs +46 -47
  188. package/fesm2022/lucca-front-ng-time.mjs.map +1 -1
  189. package/fesm2022/lucca-front-ng-title.mjs +24 -14
  190. package/fesm2022/lucca-front-ng-title.mjs.map +1 -1
  191. package/fesm2022/lucca-front-ng-toast.mjs +13 -14
  192. package/fesm2022/lucca-front-ng-toast.mjs.map +1 -1
  193. package/fesm2022/lucca-front-ng-tooltip.mjs +1 -556
  194. package/fesm2022/lucca-front-ng-tooltip.mjs.map +1 -1
  195. package/fesm2022/lucca-front-ng-tree-select.mjs +58 -42
  196. package/fesm2022/lucca-front-ng-tree-select.mjs.map +1 -1
  197. package/fesm2022/lucca-front-ng-user-popover.mjs +22 -19
  198. package/fesm2022/lucca-front-ng-user-popover.mjs.map +1 -1
  199. package/fesm2022/lucca-front-ng-user.mjs +75 -73
  200. package/fesm2022/lucca-front-ng-user.mjs.map +1 -1
  201. package/fesm2022/lucca-front-ng-vertical-navigation.mjs +21 -22
  202. package/fesm2022/lucca-front-ng-vertical-navigation.mjs.map +1 -1
  203. package/package.json +12 -4
  204. package/schematics/action-icon/migration.spec.js +2 -2
  205. package/schematics/alignment-utilities/migration.spec.js +2 -2
  206. package/schematics/cdn-urls/migration.spec.js +2 -2
  207. package/schematics/class-prefix/migration.spec.js +2 -2
  208. package/schematics/color-text/migration.spec.js +2 -2
  209. package/schematics/component-path/migration.spec.js +2 -2
  210. package/schematics/deprecated-resolver/migration.spec.js +1 -1
  211. package/schematics/empty-state-title/migration.spec.js +1 -1
  212. package/schematics/lib/migration-test.js +6 -1
  213. package/schematics/lu-button/migration.spec.js +1 -1
  214. package/schematics/lu-container/migration.spec.js +1 -1
  215. package/schematics/lu-grid/migration.js +24 -16
  216. package/schematics/lu-grid/migration.spec.js +1 -1
  217. package/schematics/lu-icon/migration.spec.js +1 -1
  218. package/schematics/lu-loading/migration.spec.js +1 -1
  219. package/schematics/lu-select/migration.spec.js +1 -1
  220. package/schematics/lu-text-input/migration.spec.js +1 -1
  221. package/schematics/new-icons/migration.spec.js +2 -2
  222. package/schematics/palettes/index.js +28 -8
  223. package/schematics/palettes/migration.spec.js +2 -2
  224. package/schematics/tokens-radius/migration.spec.js +2 -2
  225. package/schematics/tokens-spacing/migration.spec.js +2 -2
  226. package/schematics/tokens-typo/migration.spec.js +2 -2
  227. package/src/_components.scss +1 -0
  228. package/src/components/_listbox.scss +8 -0
  229. package/src/components/_picker.scss +0 -34
  230. package/src/components/_popover.scss +1 -1
  231. package/src/components/_popup.scss +6 -6
  232. package/src/components/_sidepanel.scss +1 -1
  233. package/src/definitions/option/_option-item.scss +1 -8
  234. package/title/README.md +22 -7
  235. package/types/lucca-front-ng-app-layout.d.ts +1 -1
  236. package/types/lucca-front-ng-approbation-inbox.d.ts +142 -0
  237. package/types/lucca-front-ng-box.d.ts +4 -4
  238. package/types/lucca-front-ng-breadcrumbs.d.ts +1 -1
  239. package/types/lucca-front-ng-bubble-icon.d.ts +1 -1
  240. package/types/lucca-front-ng-bubble-illustration.d.ts +1 -1
  241. package/types/lucca-front-ng-callout.d.ts +9 -9
  242. package/types/lucca-front-ng-chip.d.ts +3 -3
  243. package/types/lucca-front-ng-clear.d.ts +2 -2
  244. package/types/lucca-front-ng-code.d.ts +1 -1
  245. package/types/lucca-front-ng-color.d.ts +1 -1
  246. package/types/lucca-front-ng-comment.d.ts +6 -5
  247. package/types/lucca-front-ng-container.d.ts +2 -2
  248. package/types/lucca-front-ng-core-select-api.d.ts +10 -4
  249. package/types/lucca-front-ng-core-select-department.d.ts +2 -2
  250. package/types/lucca-front-ng-core-select-establishment.d.ts +3 -1
  251. package/types/lucca-front-ng-core-select-job-qualification.d.ts +2 -0
  252. package/types/lucca-front-ng-core-select-legal-units.d.ts +3 -1
  253. package/types/lucca-front-ng-core-select-occupation-category.d.ts +2 -0
  254. package/types/lucca-front-ng-core-select-user.d.ts +4 -3
  255. package/types/lucca-front-ng-core-select.d.ts +82 -16
  256. package/types/lucca-front-ng-core.d.ts +77 -3
  257. package/types/lucca-front-ng-data-table.d.ts +14 -14
  258. package/types/lucca-front-ng-date.d.ts +1 -1
  259. package/types/lucca-front-ng-date2.d.ts +19 -19
  260. package/types/lucca-front-ng-department.d.ts +2 -2
  261. package/types/lucca-front-ng-dialog.d.ts +7 -6
  262. package/types/lucca-front-ng-divider.d.ts +3 -3
  263. package/types/lucca-front-ng-dropdown.d.ts +2 -2
  264. package/types/lucca-front-ng-empty-state.d.ts +15 -6
  265. package/types/lucca-front-ng-establishment.d.ts +2 -2
  266. package/types/lucca-front-ng-file-upload.d.ts +22 -11
  267. package/types/lucca-front-ng-filter-pills.d.ts +43 -3
  268. package/types/lucca-front-ng-footer.d.ts +4 -4
  269. package/types/lucca-front-ng-form-field.d.ts +10 -10
  270. package/types/lucca-front-ng-form-header.d.ts +1 -1
  271. package/types/lucca-front-ng-form-label.d.ts +5 -9
  272. package/types/lucca-front-ng-form.d.ts +2 -2
  273. package/types/lucca-front-ng-forms-phone-number-input.d.ts +5 -5
  274. package/types/lucca-front-ng-forms-rich-text-input.d.ts +9 -5
  275. package/types/lucca-front-ng-forms.d.ts +50 -37
  276. package/types/lucca-front-ng-gauge.d.ts +6 -6
  277. package/types/lucca-front-ng-grid.d.ts +8 -8
  278. package/types/lucca-front-ng-highlight-data.d.ts +3 -5
  279. package/types/lucca-front-ng-highlight-section.d.ts +44 -0
  280. package/types/lucca-front-ng-horizontal-navigation.d.ts +4 -4
  281. package/types/lucca-front-ng-impersonation.d.ts +1 -1
  282. package/types/lucca-front-ng-index-table.d.ts +12 -12
  283. package/types/lucca-front-ng-inline-message.d.ts +1 -1
  284. package/types/lucca-front-ng-link.d.ts +4 -4
  285. package/types/lucca-front-ng-listbox.d.ts +33 -13
  286. package/types/lucca-front-ng-listing.d.ts +9 -9
  287. package/types/lucca-front-ng-loading.d.ts +3 -3
  288. package/types/lucca-front-ng-main-layout.d.ts +40 -9
  289. package/types/lucca-front-ng-modal.d.ts +1 -1
  290. package/types/lucca-front-ng-multi-select.d.ts +33 -7
  291. package/types/lucca-front-ng-numeric-badge.d.ts +1 -46
  292. package/types/lucca-front-ng-option.d.ts +2 -0
  293. package/types/lucca-front-ng-page-header.d.ts +2 -2
  294. package/types/lucca-front-ng-pagination.d.ts +5 -5
  295. package/types/lucca-front-ng-plg-push.d.ts +1 -1
  296. package/types/lucca-front-ng-popover2.d.ts +14 -14
  297. package/types/lucca-front-ng-progress-bar.d.ts +2 -2
  298. package/types/lucca-front-ng-progress-stepper.d.ts +1 -1
  299. package/types/lucca-front-ng-read-more.d.ts +9 -4
  300. package/types/lucca-front-ng-resource-card.d.ts +6 -6
  301. package/types/lucca-front-ng-scroll-box.d.ts +1 -1
  302. package/types/lucca-front-ng-scroll.d.ts +1 -1
  303. package/types/lucca-front-ng-segmented-control-tabs.d.ts +2 -2
  304. package/types/lucca-front-ng-segmented-control.d.ts +5 -3
  305. package/types/lucca-front-ng-select.d.ts +2 -1
  306. package/types/lucca-front-ng-simple-select.d.ts +6 -5
  307. package/types/lucca-front-ng-skeleton.d.ts +1 -158
  308. package/types/lucca-front-ng-software-icon-wrapper.d.ts +3 -3
  309. package/types/lucca-front-ng-software-icon.d.ts +2 -2
  310. package/types/lucca-front-ng-sortable-list.d.ts +5 -5
  311. package/types/lucca-front-ng-status-badge.d.ts +1 -1
  312. package/types/lucca-front-ng-tag.d.ts +1 -53
  313. package/types/lucca-front-ng-time.d.ts +17 -17
  314. package/types/lucca-front-ng-title.d.ts +4 -4
  315. package/types/lucca-front-ng-toast.d.ts +1 -1
  316. package/types/lucca-front-ng-tooltip.d.ts +1 -80
  317. package/types/lucca-front-ng-tree-select.d.ts +3 -4
  318. package/types/lucca-front-ng-user.d.ts +8 -6
  319. package/types/lucca-front-ng-vertical-navigation.d.ts +4 -4
@@ -1,8 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, DestroyRef, Inject, Injectable, NgModule } from '@angular/core';
2
+ import { InjectionToken, inject, DestroyRef, Inject, Injectable, NgModule, isSignal } from '@angular/core';
3
3
  import * as i1 from '@angular/router';
4
4
  import { ActivationEnd, RouterModule, TitleStrategy } from '@angular/router';
5
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
+ import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
6
6
  import { BehaviorSubject, combineLatest, of, isObservable } from 'rxjs';
7
7
  import { switchMap, map, filter, distinctUntilChanged, tap } from 'rxjs/operators';
8
8
  import * as i2 from '@angular/platform-browser';
@@ -43,10 +43,10 @@ class LuTitleService {
43
43
  overrideFirstTitlePart(title) {
44
44
  this.titlePartsSubject.next([title, ...this.titlePartsSubject.value.slice(1)]);
45
45
  }
46
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuTitleService, deps: [{ token: i1.Router }, { token: i2.Title }, { token: LU_TITLE_TRANSLATE_SERVICE }], target: i0.ɵɵFactoryTarget.Injectable }); }
47
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuTitleService }); }
46
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuTitleService, deps: [{ token: i1.Router }, { token: i2.Title }, { token: LU_TITLE_TRANSLATE_SERVICE }], target: i0.ɵɵFactoryTarget.Injectable }); }
47
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuTitleService }); }
48
48
  }
49
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuTitleService, decorators: [{
49
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuTitleService, decorators: [{
50
50
  type: Injectable
51
51
  }], ctorParameters: () => [{ type: i1.Router }, { type: i2.Title }, { type: undefined, decorators: [{
52
52
  type: Inject,
@@ -67,11 +67,11 @@ function uniqTitle$1(titleParts) {
67
67
  * @deprecated use title streatgy instead
68
68
  */
69
69
  class LuTitleModule {
70
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuTitleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
71
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.7", ngImport: i0, type: LuTitleModule, imports: [RouterModule] }); }
72
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuTitleModule, providers: [LuTitleService], imports: [RouterModule] }); }
70
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuTitleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
71
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: LuTitleModule, imports: [RouterModule] }); }
72
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuTitleModule, providers: [LuTitleService], imports: [RouterModule] }); }
73
73
  }
74
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuTitleModule, decorators: [{
74
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuTitleModule, decorators: [{
75
75
  type: NgModule,
76
76
  args: [{
77
77
  imports: [RouterModule],
@@ -96,7 +96,7 @@ class LuTitleStrategy extends TitleStrategy {
96
96
  this.namingStrategy = inject(ɵNAMING_STRATEGY);
97
97
  this.readTitleByLiveAnnouncer = inject(ɵREAD_TITLE_BY_LIVE_ANNOUNCER);
98
98
  this.liveAnnouncer = inject(LiveAnnouncer);
99
- this.luccaTitle$ = isObservable(this.appTitle) ? this.appTitle.pipe(map((title) => this.#luccaTitle(title))) : of(this.#luccaTitle(this.appTitle));
99
+ this.luccaTitle$ = this.#toLuccaTitle$(this.appTitle);
100
100
  this.titlePartsSubject = new BehaviorSubject([Lucca]);
101
101
  this.titleParts$ = this.titlePartsSubject.asObservable();
102
102
  this.title$ = this.titleParts$.pipe(switchMap((titleParts) => combineLatest(titleParts.map((part) => (typeof part === 'string' ? of(part) : part)))), map((parts) => parts.join(TitleSeparator)), distinctUntilChanged());
@@ -113,7 +113,8 @@ class LuTitleStrategy extends TitleStrategy {
113
113
  // Title page is display from child to root
114
114
  const pageTitles = this.#getPageTitleParts(routerState.root).reverse();
115
115
  const translatedPageTitles = uniqTitle(pageTitles)
116
- .filter(({ title }) => title !== '')
116
+ // Routes without a title expose it as nil, which must not reach the consumer's translate service
117
+ .filter(({ title }) => !!title)
117
118
  .map(({ title, params }) => (this.translateService ? this.translateService.translate(title, params) : title));
118
119
  // Add the name app
119
120
  const titleParts = [...translatedPageTitles, this.luccaTitle$].filter((x) => !!x);
@@ -132,6 +133,15 @@ class LuTitleStrategy extends TitleStrategy {
132
133
  };
133
134
  return snapshot.firstChild ? [pageTitle, ...this.#getPageTitleParts(snapshot.firstChild)] : [pageTitle];
134
135
  }
136
+ #toLuccaTitle$(appTitle) {
137
+ if (isSignal(appTitle)) {
138
+ return toObservable(appTitle).pipe(map((title) => this.#luccaTitle(title)));
139
+ }
140
+ if (isObservable(appTitle)) {
141
+ return appTitle.pipe(map((title) => this.#luccaTitle(title)));
142
+ }
143
+ return of(this.#luccaTitle(appTitle));
144
+ }
135
145
  #luccaTitle(appTitle) {
136
146
  if (appTitle.includes(Lucca)) {
137
147
  return appTitle;
@@ -141,10 +151,10 @@ class LuTitleStrategy extends TitleStrategy {
141
151
  }
142
152
  return `${appTitle}${TitleSeparator}${Lucca}`;
143
153
  }
144
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuTitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
145
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuTitleStrategy, providedIn: 'root' }); }
154
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuTitleStrategy, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
155
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuTitleStrategy, providedIn: 'root' }); }
146
156
  }
147
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuTitleStrategy, decorators: [{
157
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuTitleStrategy, decorators: [{
148
158
  type: Injectable,
149
159
  args: [{ providedIn: 'root' }]
150
160
  }], ctorParameters: () => [] });
@@ -1 +1 @@
1
- {"version":3,"file":"lucca-front-ng-title.mjs","sources":["../../../packages/ng/title/title-translate.service.ts","../../../packages/ng/title/title.model.ts","../../../packages/ng/title/title.service.ts","../../../packages/ng/title/title.module.ts","../../../packages/ng/title/title.strategy.ts","../../../packages/ng/title/lucca-front-ng-title.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nexport const LU_TITLE_TRANSLATE_SERVICE = new InjectionToken<ILuTitleTranslateService>('LU_TITLE_TRANSLATE_SERVICE');\n\nexport interface ILuTitleTranslateService {\n\ttranslate(key: string, args?: Record<string, unknown>): string | Observable<string>;\n}\n","export type PageTitle = { title: string; params?: { [param: string]: string } };\nexport const TitleSeparator = ' – ';\n","import { DestroyRef, Inject, inject, Injectable } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { Title } from '@angular/platform-browser';\nimport { ActivatedRouteSnapshot, ActivationEnd, Router } from '@angular/router';\nimport { BehaviorSubject, combineLatest, ObservableInput, of } from 'rxjs';\nimport { distinctUntilChanged, filter, map, switchMap, tap } from 'rxjs/operators';\nimport { ILuTitleTranslateService, LU_TITLE_TRANSLATE_SERVICE } from './title-translate.service';\nimport { PageTitle, TitleSeparator } from './title.model';\n\n/**\n * @deprecated use Title strategy instead\n */\n@Injectable()\nexport class LuTitleService {\n\tprivate destroyRef = inject(DestroyRef);\n\n\tprivate titlePartsSubject = new BehaviorSubject<Array<string | ObservableInput<string>>>(['Lucca']);\n\treadonly titleParts$ = this.titlePartsSubject.asObservable();\n\treadonly title$ = this.titleParts$.pipe(\n\t\tswitchMap((titleParts) => combineLatest(titleParts.map((part) => (typeof part === 'string' ? of(part) : part)))),\n\t\tmap((parts) => parts.join(TitleSeparator)),\n\t);\n\n\tconstructor(\n\t\tprivate router: Router,\n\t\tprivate title: Title,\n\t\t@Inject(LU_TITLE_TRANSLATE_SERVICE) private translateService: ILuTitleTranslateService,\n\t) {}\n\n\tinit(applicationNameTranslationKey: string) {\n\t\tthis.router.events\n\t\t\t.pipe(\n\t\t\t\tfilter((event) => {\n\t\t\t\t\treturn event instanceof ActivationEnd && event.snapshot.children.length === 0;\n\t\t\t\t}),\n\t\t\t\tmap((event: ActivationEnd) => getPageTitleParts(event.snapshot)),\n\t\t\t\tmap((titleParts) => uniqTitle(titleParts)),\n\t\t\t\tmap((titleParts) => titleParts.filter(({ title }) => title !== '').map(({ title, params }) => this.translateService.translate(title, params))),\n\t\t\t\tmap((titleParts: Array<string>) => [...titleParts, this.translateService.translate(applicationNameTranslationKey, {}), 'Lucca'].filter((x) => !!x)),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttap((titleParts) => this.titlePartsSubject.next(titleParts)),\n\t\t\t\ttakeUntilDestroyed(this.destroyRef),\n\t\t\t)\n\t\t\t.subscribe();\n\n\t\tthis.title$\n\t\t\t.pipe(\n\t\t\t\ttap((title) => this.title.setTitle(title)),\n\t\t\t\ttakeUntilDestroyed(this.destroyRef),\n\t\t\t)\n\t\t\t.subscribe();\n\t}\n\n\tprependTitle(title: string | ObservableInput<string>) {\n\t\tthis.titlePartsSubject.next([title, ...this.titlePartsSubject.value]);\n\t}\n\n\toverrideFirstTitlePart(title: string | ObservableInput<string>) {\n\t\tthis.titlePartsSubject.next([title, ...this.titlePartsSubject.value.slice(1)]);\n\t}\n}\n\nfunction getPageTitleParts(snapshot: ActivatedRouteSnapshot): Array<PageTitle> {\n\tconst pageTitle: PageTitle = {\n\t\ttitle: (snapshot.data?.['title'] || '') as string,\n\t\tparams: { ...snapshot.params, ...snapshot.data },\n\t};\n\treturn snapshot.parent ? [pageTitle, ...getPageTitleParts(snapshot.parent)] : [pageTitle];\n}\n\nfunction uniqTitle(titleParts: Array<PageTitle>): Array<PageTitle> {\n\treturn titleParts.filter(({ title }, index) => titleParts.findIndex((pageTitle) => pageTitle.title === title) === index);\n}\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { LuTitleService } from './title.service';\n\n/**\n * @deprecated use title streatgy instead\n */\n@NgModule({\n\timports: [RouterModule],\n\tproviders: [LuTitleService],\n})\nexport class LuTitleModule {}\n","import { LiveAnnouncer } from '@angular/cdk/a11y';\nimport { inject, Injectable, InjectionToken, Provider } from '@angular/core';\nimport { Title } from '@angular/platform-browser';\nimport { ActivatedRouteSnapshot, RouterStateSnapshot, TitleStrategy } from '@angular/router';\nimport { isNotNil } from '@lucca-front/ng/core';\nimport { BehaviorSubject, combineLatest, isObservable, Observable, ObservableInput, of } from 'rxjs';\nimport { distinctUntilChanged, map, switchMap, tap } from 'rxjs/operators';\nimport { ILuTitleTranslateService, LU_TITLE_TRANSLATE_SERVICE } from './title-translate.service';\nimport { PageTitle, TitleSeparator } from './title.model';\n\nexport const ɵAPP_TITLE = new InjectionToken<string | Observable<string>>('APP_TITLE');\nexport type LuTitleNamingStrategy = 'product' | 'other';\nexport const ɵNAMING_STRATEGY = new InjectionToken<LuTitleNamingStrategy>('NAMING_STRATEGY', { factory: () => 'product' });\nexport const ɵREAD_TITLE_BY_LIVE_ANNOUNCER = new InjectionToken<boolean>('READ_TITLE_BY_LIVE_ANNOUNCEMENT', { factory: () => false });\n\n/**\n * @deprecated Use `provideLuTitleStrategy` instead.\n */\nexport const APP_TITLE = ɵAPP_TITLE;\n\nconst Lucca = 'Lucca';\n\n@Injectable({ providedIn: 'root' })\nexport class LuTitleStrategy extends TitleStrategy {\n\tprivate title = inject(Title);\n\tprivate translateService = inject<ILuTitleTranslateService>(LU_TITLE_TRANSLATE_SERVICE, { optional: true });\n\tprivate appTitle = inject(ɵAPP_TITLE);\n\tprivate namingStrategy = inject(ɵNAMING_STRATEGY);\n\tprivate readTitleByLiveAnnouncer = inject(ɵREAD_TITLE_BY_LIVE_ANNOUNCER);\n\tprivate liveAnnouncer = inject(LiveAnnouncer);\n\n\tprivate readonly luccaTitle$ = isObservable(this.appTitle) ? this.appTitle.pipe(map((title) => this.#luccaTitle(title))) : of(this.#luccaTitle(this.appTitle));\n\n\tprivate titlePartsSubject = new BehaviorSubject<Array<string | ObservableInput<string>>>([Lucca]);\n\treadonly titleParts$ = this.titlePartsSubject.asObservable();\n\treadonly title$ = this.titleParts$.pipe(\n\t\tswitchMap((titleParts) => combineLatest(titleParts.map((part) => (typeof part === 'string' ? of(part) : part)))),\n\t\tmap((parts) => parts.join(TitleSeparator)),\n\t\tdistinctUntilChanged(),\n\t);\n\tconstructor() {\n\t\tsuper();\n\t\tthis.title$\n\t\t\t.pipe(\n\t\t\t\ttap((title) => {\n\t\t\t\t\tthis.title.setTitle(title);\n\t\t\t\t\tif (this.readTitleByLiveAnnouncer) {\n\t\t\t\t\t\tvoid this.liveAnnouncer.announce(title, 'polite');\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe();\n\t}\n\n\toverride updateTitle(routerState: RouterStateSnapshot) {\n\t\t// Title page is display from child to root\n\t\tconst pageTitles = this.#getPageTitleParts(routerState.root).reverse();\n\t\tconst translatedPageTitles = uniqTitle(pageTitles)\n\t\t\t.filter(({ title }) => title !== '')\n\t\t\t.map(({ title, params }) => (this.translateService ? this.translateService.translate(title, params) : title));\n\t\t// Add the name app\n\t\tconst titleParts = [...translatedPageTitles, this.luccaTitle$].filter((x) => !!x);\n\t\tthis.titlePartsSubject.next(titleParts);\n\t}\n\n\tprependTitle(title: string | ObservableInput<string>) {\n\t\tthis.titlePartsSubject.next([title, ...this.titlePartsSubject.value]);\n\t}\n\n\toverrideFirstTitlePart(title: string | ObservableInput<string>) {\n\t\tthis.titlePartsSubject.next([title, ...this.titlePartsSubject.value.slice(1)]);\n\t}\n\n\t#getPageTitleParts(snapshot: ActivatedRouteSnapshot): Array<PageTitle> {\n\t\tconst pageTitle: PageTitle = {\n\t\t\ttitle: this.getResolvedTitleForRoute(snapshot) as string,\n\t\t\tparams: { ...snapshot.params, ...snapshot.data },\n\t\t};\n\t\treturn snapshot.firstChild ? [pageTitle, ...this.#getPageTitleParts(snapshot.firstChild)] : [pageTitle];\n\t}\n\n\t#luccaTitle(appTitle: string) {\n\t\tif (appTitle.includes(Lucca)) {\n\t\t\treturn appTitle;\n\t\t}\n\t\tif (this.namingStrategy === 'product') {\n\t\t\treturn `${Lucca} ${appTitle}`;\n\t\t}\n\t\treturn `${appTitle}${TitleSeparator}${Lucca}`;\n\t}\n}\n\nfunction uniqTitle(titleParts: Array<PageTitle>): Array<PageTitle> {\n\treturn titleParts.filter(({ title }, index) => titleParts.findIndex((pageTitle) => pageTitle.title === title) === index);\n}\n\nexport interface LuTitleStrategyOptions {\n\tappTitle?: () => string | Observable<string>;\n\ttranslateService?: () => ILuTitleTranslateService;\n\tnamingStrategy?: LuTitleNamingStrategy;\n\treadTitleByLiveAnnouncer?: boolean;\n}\n\nexport function provideLuTitleStrategy(options: LuTitleStrategyOptions): Provider[] {\n\tconst providers: Provider[] = [{ provide: TitleStrategy, useClass: LuTitleStrategy }];\n\n\tif (options.appTitle) {\n\t\tproviders.push({ provide: ɵAPP_TITLE, useFactory: options.appTitle });\n\t}\n\tif (options.translateService) {\n\t\tproviders.push({ provide: LU_TITLE_TRANSLATE_SERVICE, useFactory: options.translateService });\n\t}\n\tif (options.namingStrategy) {\n\t\tproviders.push({ provide: ɵNAMING_STRATEGY, useValue: options.namingStrategy });\n\t}\n\tif (isNotNil(options.readTitleByLiveAnnouncer)) {\n\t\tproviders.push({ provide: ɵREAD_TITLE_BY_LIVE_ANNOUNCER, useValue: options.readTitleByLiveAnnouncer });\n\t}\n\n\treturn providers;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["uniqTitle"],"mappings":";;;;;;;;;;;;MAGa,0BAA0B,GAAG,IAAI,cAAc,CAA2B,4BAA4B;;ACF5G,MAAM,cAAc,GAAG;;ACQ9B;;AAEG;MAEU,cAAc,CAAA;AAU1B,IAAA,WAAA,CACS,MAAc,EACd,KAAY,EACwB,gBAA0C,EAAA;QAF9E,IAAA,CAAA,MAAM,GAAN,MAAM;QACN,IAAA,CAAA,KAAK,GAAL,KAAK;QAC+B,IAAA,CAAA,gBAAgB,GAAhB,gBAAgB;AAZrD,QAAA,IAAA,CAAA,UAAU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AQ,EAAE,OAAO,CAAC,cAAc,EAAE,CAAC;IAChF;AACA,IAAA,IAAI,QAAQ,CAAC,OAAO,CAAC,wBAAwB,CAAC,EAAE;AAC/C,QAAA,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,6BAA6B,EAAE,QAAQ,EAAE,OAAO,CAAC,wBAAwB,EAAE,CAAC;IACvG;AAEA,IAAA,OAAO,SAAS;AACjB;;ACxHA;;AAEG;;;;"}
1
+ {"version":3,"file":"lucca-front-ng-title.mjs","sources":["../../../packages/ng/title/title-translate.service.ts","../../../packages/ng/title/title.model.ts","../../../packages/ng/title/title.service.ts","../../../packages/ng/title/title.module.ts","../../../packages/ng/title/title.strategy.ts","../../../packages/ng/title/lucca-front-ng-title.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nexport const LU_TITLE_TRANSLATE_SERVICE = new InjectionToken<ILuTitleTranslateService>('LU_TITLE_TRANSLATE_SERVICE');\n\nexport interface ILuTitleTranslateService {\n\ttranslate(key: string, args?: Record<string, unknown>): string | Observable<string>;\n}\n","export type PageTitle = { title: string; params?: { [param: string]: string } };\nexport const TitleSeparator = ' – ';\n","import { DestroyRef, Inject, inject, Injectable } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { Title } from '@angular/platform-browser';\nimport { ActivatedRouteSnapshot, ActivationEnd, Router } from '@angular/router';\nimport { BehaviorSubject, combineLatest, ObservableInput, of } from 'rxjs';\nimport { distinctUntilChanged, filter, map, switchMap, tap } from 'rxjs/operators';\nimport { ILuTitleTranslateService, LU_TITLE_TRANSLATE_SERVICE } from './title-translate.service';\nimport { PageTitle, TitleSeparator } from './title.model';\n\n/**\n * @deprecated use Title strategy instead\n */\n@Injectable()\nexport class LuTitleService {\n\tprivate destroyRef = inject(DestroyRef);\n\n\tprivate titlePartsSubject = new BehaviorSubject<Array<string | ObservableInput<string>>>(['Lucca']);\n\treadonly titleParts$ = this.titlePartsSubject.asObservable();\n\treadonly title$ = this.titleParts$.pipe(\n\t\tswitchMap((titleParts) => combineLatest(titleParts.map((part) => (typeof part === 'string' ? of(part) : part)))),\n\t\tmap((parts) => parts.join(TitleSeparator)),\n\t);\n\n\tconstructor(\n\t\tprivate router: Router,\n\t\tprivate title: Title,\n\t\t@Inject(LU_TITLE_TRANSLATE_SERVICE) private translateService: ILuTitleTranslateService,\n\t) {}\n\n\tinit(applicationNameTranslationKey: string) {\n\t\tthis.router.events\n\t\t\t.pipe(\n\t\t\t\tfilter((event) => {\n\t\t\t\t\treturn event instanceof ActivationEnd && event.snapshot.children.length === 0;\n\t\t\t\t}),\n\t\t\t\tmap((event: ActivationEnd) => getPageTitleParts(event.snapshot)),\n\t\t\t\tmap((titleParts) => uniqTitle(titleParts)),\n\t\t\t\tmap((titleParts) => titleParts.filter(({ title }) => title !== '').map(({ title, params }) => this.translateService.translate(title, params))),\n\t\t\t\tmap((titleParts: Array<string>) => [...titleParts, this.translateService.translate(applicationNameTranslationKey, {}), 'Lucca'].filter((x) => !!x)),\n\t\t\t\tdistinctUntilChanged(),\n\t\t\t\ttap((titleParts) => this.titlePartsSubject.next(titleParts)),\n\t\t\t\ttakeUntilDestroyed(this.destroyRef),\n\t\t\t)\n\t\t\t.subscribe();\n\n\t\tthis.title$\n\t\t\t.pipe(\n\t\t\t\ttap((title) => this.title.setTitle(title)),\n\t\t\t\ttakeUntilDestroyed(this.destroyRef),\n\t\t\t)\n\t\t\t.subscribe();\n\t}\n\n\tprependTitle(title: string | ObservableInput<string>) {\n\t\tthis.titlePartsSubject.next([title, ...this.titlePartsSubject.value]);\n\t}\n\n\toverrideFirstTitlePart(title: string | ObservableInput<string>) {\n\t\tthis.titlePartsSubject.next([title, ...this.titlePartsSubject.value.slice(1)]);\n\t}\n}\n\nfunction getPageTitleParts(snapshot: ActivatedRouteSnapshot): Array<PageTitle> {\n\tconst pageTitle: PageTitle = {\n\t\ttitle: (snapshot.data?.['title'] || '') as string,\n\t\tparams: { ...snapshot.params, ...snapshot.data },\n\t};\n\treturn snapshot.parent ? [pageTitle, ...getPageTitleParts(snapshot.parent)] : [pageTitle];\n}\n\nfunction uniqTitle(titleParts: Array<PageTitle>): Array<PageTitle> {\n\treturn titleParts.filter(({ title }, index) => titleParts.findIndex((pageTitle) => pageTitle.title === title) === index);\n}\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { LuTitleService } from './title.service';\n\n/**\n * @deprecated use title streatgy instead\n */\n@NgModule({\n\timports: [RouterModule],\n\tproviders: [LuTitleService],\n})\nexport class LuTitleModule {}\n","import { LiveAnnouncer } from '@angular/cdk/a11y';\nimport { inject, Injectable, InjectionToken, isSignal, Provider, Signal } from '@angular/core';\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport { Title } from '@angular/platform-browser';\nimport { ActivatedRouteSnapshot, RouterStateSnapshot, TitleStrategy } from '@angular/router';\nimport { isNotNil } from '@lucca-front/ng/core';\nimport { BehaviorSubject, combineLatest, isObservable, Observable, ObservableInput, of } from 'rxjs';\nimport { distinctUntilChanged, map, switchMap, tap } from 'rxjs/operators';\nimport { ILuTitleTranslateService, LU_TITLE_TRANSLATE_SERVICE } from './title-translate.service';\nimport { PageTitle, TitleSeparator } from './title.model';\n\nexport const ɵAPP_TITLE = new InjectionToken<string | Observable<string> | Signal<string>>('APP_TITLE');\nexport type LuTitleNamingStrategy = 'product' | 'other';\nexport const ɵNAMING_STRATEGY = new InjectionToken<LuTitleNamingStrategy>('NAMING_STRATEGY', { factory: () => 'product' });\nexport const ɵREAD_TITLE_BY_LIVE_ANNOUNCER = new InjectionToken<boolean>('READ_TITLE_BY_LIVE_ANNOUNCEMENT', { factory: () => false });\n\n/**\n * @deprecated Use `provideLuTitleStrategy` instead.\n */\nexport const APP_TITLE = ɵAPP_TITLE;\n\nconst Lucca = 'Lucca';\n\n@Injectable({ providedIn: 'root' })\nexport class LuTitleStrategy extends TitleStrategy {\n\tprivate title = inject(Title);\n\tprivate translateService = inject<ILuTitleTranslateService>(LU_TITLE_TRANSLATE_SERVICE, { optional: true });\n\tprivate appTitle = inject(ɵAPP_TITLE);\n\tprivate namingStrategy = inject(ɵNAMING_STRATEGY);\n\tprivate readTitleByLiveAnnouncer = inject(ɵREAD_TITLE_BY_LIVE_ANNOUNCER);\n\tprivate liveAnnouncer = inject(LiveAnnouncer);\n\n\tprivate readonly luccaTitle$ = this.#toLuccaTitle$(this.appTitle);\n\n\tprivate titlePartsSubject = new BehaviorSubject<Array<string | ObservableInput<string>>>([Lucca]);\n\treadonly titleParts$ = this.titlePartsSubject.asObservable();\n\treadonly title$ = this.titleParts$.pipe(\n\t\tswitchMap((titleParts) => combineLatest(titleParts.map((part) => (typeof part === 'string' ? of(part) : part)))),\n\t\tmap((parts) => parts.join(TitleSeparator)),\n\t\tdistinctUntilChanged(),\n\t);\n\tconstructor() {\n\t\tsuper();\n\t\tthis.title$\n\t\t\t.pipe(\n\t\t\t\ttap((title) => {\n\t\t\t\t\tthis.title.setTitle(title);\n\t\t\t\t\tif (this.readTitleByLiveAnnouncer) {\n\t\t\t\t\t\tvoid this.liveAnnouncer.announce(title, 'polite');\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t)\n\t\t\t.subscribe();\n\t}\n\n\toverride updateTitle(routerState: RouterStateSnapshot) {\n\t\t// Title page is display from child to root\n\t\tconst pageTitles = this.#getPageTitleParts(routerState.root).reverse();\n\t\tconst translatedPageTitles = uniqTitle(pageTitles)\n\t\t\t// Routes without a title expose it as nil, which must not reach the consumer's translate service\n\t\t\t.filter(({ title }) => !!title)\n\t\t\t.map(({ title, params }) => (this.translateService ? this.translateService.translate(title, params) : title));\n\t\t// Add the name app\n\t\tconst titleParts = [...translatedPageTitles, this.luccaTitle$].filter((x) => !!x);\n\t\tthis.titlePartsSubject.next(titleParts);\n\t}\n\n\tprependTitle(title: string | ObservableInput<string>) {\n\t\tthis.titlePartsSubject.next([title, ...this.titlePartsSubject.value]);\n\t}\n\n\toverrideFirstTitlePart(title: string | ObservableInput<string>) {\n\t\tthis.titlePartsSubject.next([title, ...this.titlePartsSubject.value.slice(1)]);\n\t}\n\n\t#getPageTitleParts(snapshot: ActivatedRouteSnapshot): Array<PageTitle> {\n\t\tconst pageTitle: PageTitle = {\n\t\t\ttitle: this.getResolvedTitleForRoute(snapshot) as string,\n\t\t\tparams: { ...snapshot.params, ...snapshot.data },\n\t\t};\n\t\treturn snapshot.firstChild ? [pageTitle, ...this.#getPageTitleParts(snapshot.firstChild)] : [pageTitle];\n\t}\n\n\t#toLuccaTitle$(appTitle: string | Observable<string> | Signal<string>): Observable<string> {\n\t\tif (isSignal(appTitle)) {\n\t\t\treturn toObservable(appTitle).pipe(map((title) => this.#luccaTitle(title)));\n\t\t}\n\t\tif (isObservable(appTitle)) {\n\t\t\treturn appTitle.pipe(map((title) => this.#luccaTitle(title)));\n\t\t}\n\t\treturn of(this.#luccaTitle(appTitle));\n\t}\n\n\t#luccaTitle(appTitle: string) {\n\t\tif (appTitle.includes(Lucca)) {\n\t\t\treturn appTitle;\n\t\t}\n\t\tif (this.namingStrategy === 'product') {\n\t\t\treturn `${Lucca} ${appTitle}`;\n\t\t}\n\t\treturn `${appTitle}${TitleSeparator}${Lucca}`;\n\t}\n}\n\nfunction uniqTitle(titleParts: Array<PageTitle>): Array<PageTitle> {\n\treturn titleParts.filter(({ title }, index) => titleParts.findIndex((pageTitle) => pageTitle.title === title) === index);\n}\n\nexport interface LuTitleStrategyOptions {\n\tappTitle?: () => string | Observable<string> | Signal<string>;\n\ttranslateService?: () => ILuTitleTranslateService;\n\tnamingStrategy?: LuTitleNamingStrategy;\n\treadTitleByLiveAnnouncer?: boolean;\n}\n\nexport function provideLuTitleStrategy(options: LuTitleStrategyOptions): Provider[] {\n\tconst providers: Provider[] = [{ provide: TitleStrategy, useClass: LuTitleStrategy }];\n\n\tif (options.appTitle) {\n\t\tproviders.push({ provide: ɵAPP_TITLE, useFactory: options.appTitle });\n\t}\n\tif (options.translateService) {\n\t\tproviders.push({ provide: LU_TITLE_TRANSLATE_SERVICE, useFactory: options.translateService });\n\t}\n\tif (options.namingStrategy) {\n\t\tproviders.push({ provide: ɵNAMING_STRATEGY, useValue: options.namingStrategy });\n\t}\n\tif (isNotNil(options.readTitleByLiveAnnouncer)) {\n\t\tproviders.push({ provide: ɵREAD_TITLE_BY_LIVE_ANNOUNCER, useValue: options.readTitleByLiveAnnouncer });\n\t}\n\n\treturn providers;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["uniqTitle"],"mappings":";;;;;;;;;;;;MAGa,0BAA0B,GAAG,IAAI,cAAc,CAA2B,4BAA4B;;ACF5G,MAAM,cAAc,GAAG;;ACQ9B;;AAEG;MAEU,cAAc,CAAA;AAU1B,IAAA,WAAA,CACS,MAAc,EACd,KAAY,EACwB,gBAA0C,EAAA;QAF9E,IAAA,CAAA,MAAM,GAAN,MAAM;QACN,IAAA,CAAA,KAAK,GAAL,KAAK;QAC+B,IAAA,CAAA,gBAAgB,GAAhB,gBAAgB;AAZrD,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QAE/B,IAAA,CAAA,iBAAiB,GAAG,IAAI,eAAe,CAA0C,CAAC,OAAO,CAAC,CAAC;AAC1F,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE;AACnD,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CACtC,SAAS,CAAC,CAAC,UAAU,KAAK,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,MAAM,OAAO,IAAI,KAAK,QAAQ,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,EAChH,GAAG,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAC1C;IAME;AAEH,IAAA,IAAI,CAAC,6BAA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S;AACjB;;ACpIA;;AAEG;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { AsyncPipe } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
3
  import { Injectable, InjectionToken, inject, input, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
4
- import { intlInputOptions, ɵeffectWithDeps as _effectWithDeps, isNotNil, PortalDirective } from '@lucca-front/ng/core';
4
+ import { luBooleanAttribute, intlInputOptions, ɵeffectWithDeps as _effectWithDeps, isNotNil, PortalDirective } from '@lucca-front/ng/core';
5
5
  import { BehaviorSubject, merge } from 'rxjs';
6
6
 
7
7
  const defaultToastDuration = 5000;
@@ -31,10 +31,10 @@ class LuToastsService {
31
31
  const randomString = Math.random().toString(36).substring(2, 9);
32
32
  return `_${randomString}`;
33
33
  }
34
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuToastsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
35
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuToastsService, providedIn: 'root' }); }
34
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuToastsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
35
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuToastsService, providedIn: 'root' }); }
36
36
  }
37
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuToastsService, decorators: [{
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuToastsService, decorators: [{
38
38
  type: Injectable,
39
39
  args: [{ providedIn: 'root' }]
40
40
  }] });
@@ -78,8 +78,7 @@ class LuToastsComponent {
78
78
  #toastsService;
79
79
  constructor() {
80
80
  this.#toastsService = inject(LuToastsService);
81
- this.bottom = input(false, /* @ts-ignore */
82
- ...(ngDevMode ? [{ debugName: "bottom" }] : /* istanbul ignore next */ []));
81
+ this.bottom = input(false, { ...(ngDevMode ? { debugName: "bottom" } : /* istanbul ignore next */ {}), transform: luBooleanAttribute });
83
82
  this.sources = input(/* @ts-ignore */
84
83
  ...(ngDevMode ? [undefined, { debugName: "sources" }] : /* istanbul ignore next */ []));
85
84
  this.toasts$ = this.#toastsService.toasts$;
@@ -115,23 +114,23 @@ class LuToastsComponent {
115
114
  isOnlyDismissibleManually(toast) {
116
115
  return this.#toastsService.isOnlyDismissibleManually(toast);
117
116
  }
118
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuToastsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
119
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: LuToastsComponent, isStandalone: true, selector: "lu-toasts", inputs: { bottom: { classPropertyName: "bottom", publicName: "bottom", isSignal: true, isRequired: false, transformFunction: null }, sources: { classPropertyName: "sources", publicName: "sources", isSignal: true, isRequired: false, transformFunction: null }, intl: { classPropertyName: "intl", publicName: "intl", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"toasts\" aria-live=\"polite\" [class.mod-bottom]=\"bottom()\">\n\t@for (toast of toasts$ | async; track toast.id) {\n\t\t<div class=\"toasts-item\" [class]=\"paletteClassByToastType[toast.type]\">\n\t\t\t@if (toast.type) {\n\t\t\t\t<span class=\"toast-item-icon lucca-icon\" aria-hidden=\"true\" [class]=\"iconClassByToastType[toast.type]\"></span>\n\t\t\t}\n\t\t\t<div class=\"toast-item-content\">\n\t\t\t\t@if (toast.title) {\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<strong>{{ toast.title }}</strong>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t@if (isStringPortalContent(toast.message)) {\n\t\t\t\t\t<p class=\"toast-item-content-description\" [innerHtml]=\"toast.message\"></p>\n\t\t\t\t} @else {\n\t\t\t\t\t<ng-container *luPortal=\"toast.message\" />\n\t\t\t\t}\n\t\t\t</div>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"toasts-item-kill button\"\n\t\t\t\t(click)=\"removeToast(toast)\"\n\t\t\t\t(animationend)=\"!isOnlyDismissibleManually(toast) && toast.duration > 0 ? removeToast(toast) : null\"\n\t\t\t\t[style.animation-duration]=\"!isOnlyDismissibleManually(toast) && toast.duration > 0 ? toast.duration + 'ms' : null\"\n\t\t\t>\n\t\t\t\t<span class=\"lucca-icon icon-signClose\" aria-hidden=\"true\"></span>\n\t\t\t\t<span class=\"pr-u-mask\">{{ intl().close }}</span>\n\t\t\t</button>\n\t\t</div>\n\t}\n</div>\n", styles: ["@layer components{.toasts{--components-toasts-color: var(--pr-t-color-text-reverse);--components-toasts-top: var(--pr-t-spacings-300);--components-toasts-right: calc(var(--pr-t-spacings-300) + var(--commons-pushPanel-inlineSize));--components-toasts-left: var(--pr-t-spacings-300);--components-toasts-bottom: var(--pr-t-spacings-300);--components-toasts-margin-bottom: var(--pr-t-spacings-50);--components-toasts-maxwidth: min(22.5rem, calc(100dvw - (var(--components-toasts-right) * 2)));--components-toasts-inset: var(--components-toasts-top) var(--components-toasts-right) auto auto;--components-toasts-footerHeight: 4.5rem;--components-toasts-background: var(--palettes-neutral-800);--components-toasts-padding: var(--pr-t-spacings-100) var(--pr-t-spacings-200);max-inline-size:var(--components-toasts-maxwidth);display:flex;flex-direction:column;align-items:flex-end;position:fixed;z-index:9999;inset:var(--components-toasts-inset)}html:has(.main-content .footer.mod-sticky,.dialog.mod-drawer .dialog-inside-footer) .toasts{--components-toasts-bottom: calc(var(--components-toasts-footerHeight) + var(--pr-t-spacings-300))}.toasts-item{display:flex;gap:var(--pr-t-spacings-50);color:var(--components-toasts-color);padding:var(--pr-t-spacings-50);margin-block-end:var(--components-toasts-margin-bottom);background-color:var(--palettes-neutral-800);animation-name:toastsItem;animation-duration:var(--commons-animations-durations-standard);animation-iteration-count:1;border-radius:var(--pr-t-border-radius-structure);overflow:hidden;position:relative;transform-origin:top}@keyframes toastsItem{0%{transform:translateY(var(--pr-t-spacings-200));opacity:0}to{opacity:1}}.toasts-item:hover .toasts-item-kill,.toasts-item:focus-within .toasts-item-kill{animation-play-state:paused}.toast-item-icon{background:var(--palettes-700, var(--palettes-product-700));border-radius:var(--pr-t-border-radius-default);padding-block:var(--pr-t-spacings-100);padding-inline:var(--pr-t-spacings-50)}.toast-item-content{display:flex;flex-grow:1;flex-direction:column;gap:var(--pr-t-spacings-50);padding-block:var(--pr-t-spacings-100);padding-inline:var(--pr-t-spacings-100) 0}.toast-item-content-description{margin:0;overflow-wrap:anywhere}.toasts-item-kill.button,.toasts-item-kill:not(.button){align-self:flex-start;border-radius:var(--pr-t-border-radius-default);animation-name:timer;--components-button-padding: var(--pr-t-spacings-100);--components-button-backgroundColor: transparent;--components-button-color: var(--palettes-700, var(--pr-t-color-text-subtle));--components-button-boxShadow: none}.toasts-item-kill.button:hover,.toasts-item-kill.button:focus-visible,.toasts-item-kill:not(.button):hover,.toasts-item-kill:not(.button):focus-visible{--components-button-color: var(--palettes-700, var(--pr-t-color-text-subtle));--components-button-backgroundColor: var(--palettes-50, var(--palettes-neutral-50))}.toasts-item-kill.button:active,.toasts-item-kill:not(.button):active{--components-button-backgroundColor: var(--palettes-100, var(--palettes-neutral-100))}.toasts-item-kill.button:disabled,.toasts-item-kill:not(.button):disabled{--components-button-backgroundColor: transparent;--components-button-color: var(--pr-t-color-text-disabled)}.toasts-item-kill.button,.toasts-item-kill:not(.button){--components-button-color: var(--palettes-neutral-0)}.toasts-item-kill.button:hover,.toasts-item-kill.button:focus-visible,.toasts-item-kill:not(.button):hover,.toasts-item-kill:not(.button):focus-visible{--components-button-color: var(--palettes-neutral-0);--components-button-backgroundColor: var(--palettes-neutral-900)}.toasts-item-kill.button:active,.toasts-item-kill:not(.button):active{--components-button-backgroundColor: var(--palettes-neutral-700)}@keyframes timer{}}@layer mods{.toasts.mod-bottom{--components-toasts-inset: auto var(--components-toasts-right) var(--components-toasts-bottom) auto}}\n"], dependencies: [{ kind: "directive", type: PortalDirective, selector: "[luPortal]", inputs: ["luPortal", "luPortalContext"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
117
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuToastsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
118
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: LuToastsComponent, isStandalone: true, selector: "lu-toasts", inputs: { bottom: { classPropertyName: "bottom", publicName: "bottom", isSignal: true, isRequired: false, transformFunction: null }, sources: { classPropertyName: "sources", publicName: "sources", isSignal: true, isRequired: false, transformFunction: null }, intl: { classPropertyName: "intl", publicName: "intl", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"toasts\" aria-live=\"polite\" [class.mod-bottom]=\"bottom()\">\n\t@for (toast of toasts$ | async; track toast.id) {\n\t\t<div class=\"toasts-item\" [class]=\"toast.type ? paletteClassByToastType[toast.type] : null\">\n\t\t\t@if (toast.type) {\n\t\t\t\t<span class=\"toast-item-icon lucca-icon\" aria-hidden=\"true\" [class]=\"iconClassByToastType[toast.type]\"></span>\n\t\t\t}\n\t\t\t<div class=\"toast-item-content\">\n\t\t\t\t@if (toast.title) {\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<strong>{{ toast.title }}</strong>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t@if (isStringPortalContent(toast.message)) {\n\t\t\t\t\t<p class=\"toast-item-content-description\" [innerHtml]=\"toast.message\"></p>\n\t\t\t\t} @else {\n\t\t\t\t\t<ng-container *luPortal=\"toast.message\" />\n\t\t\t\t}\n\t\t\t</div>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"toasts-item-kill button\"\n\t\t\t\t(click)=\"removeToast(toast)\"\n\t\t\t\t(animationend)=\"!isOnlyDismissibleManually(toast) && (toast.duration ?? 0) > 0 ? removeToast(toast) : null\"\n\t\t\t\t[style.animation-duration]=\"!isOnlyDismissibleManually(toast) && (toast.duration ?? 0) > 0 ? toast.duration + 'ms' : null\"\n\t\t\t>\n\t\t\t\t<span class=\"lucca-icon icon-signClose\" aria-hidden=\"true\"></span>\n\t\t\t\t<span class=\"pr-u-mask\">{{ intl().close }}</span>\n\t\t\t</button>\n\t\t</div>\n\t}\n</div>\n", styles: ["@layer components{.toasts{--components-toasts-color: var(--pr-t-color-text-reverse);--components-toasts-top: var(--pr-t-spacings-300);--components-toasts-right: calc(var(--pr-t-spacings-300) + var(--commons-pushPanel-inlineSize));--components-toasts-left: var(--pr-t-spacings-300);--components-toasts-bottom: var(--pr-t-spacings-300);--components-toasts-margin-bottom: var(--pr-t-spacings-50);--components-toasts-maxwidth: min(22.5rem, calc(100dvi - (var(--components-toasts-right) * 2)));--components-toasts-inset: var(--components-toasts-top) var(--components-toasts-right) auto auto;--components-toasts-footerHeight: 4.5rem;--components-toasts-background: var(--palettes-neutral-800);--components-toasts-padding: var(--pr-t-spacings-100) var(--pr-t-spacings-200);max-inline-size:var(--components-toasts-maxwidth);display:flex;flex-direction:column;align-items:flex-end;position:fixed;z-index:9999;inset:var(--components-toasts-inset)}html:has(.main-content .footer.mod-sticky,.dialog.mod-drawer .dialog-inside-footer) .toasts{--components-toasts-bottom: calc(var(--components-toasts-footerHeight) + var(--pr-t-spacings-300))}.toasts-item{display:flex;gap:var(--pr-t-spacings-50);color:var(--components-toasts-color);padding:var(--pr-t-spacings-50);margin-block-end:var(--components-toasts-margin-bottom);background-color:var(--palettes-neutral-800);animation-name:toastsItem;animation-duration:var(--commons-animations-durations-standard);animation-iteration-count:1;border-radius:var(--pr-t-border-radius-structure);overflow:hidden;position:relative;transform-origin:top}@keyframes toastsItem{0%{transform:translateY(var(--pr-t-spacings-200));opacity:0}to{opacity:1}}.toasts-item:hover .toasts-item-kill,.toasts-item:focus-within .toasts-item-kill{animation-play-state:paused}.toast-item-icon{background:var(--palettes-700, var(--palettes-product-700));border-radius:var(--pr-t-border-radius-default);padding-block:var(--pr-t-spacings-100);padding-inline:var(--pr-t-spacings-50)}.toast-item-content{display:flex;flex-grow:1;flex-direction:column;gap:var(--pr-t-spacings-50);padding-block:var(--pr-t-spacings-100);padding-inline:var(--pr-t-spacings-100) 0}.toast-item-content-description{margin:0;overflow-wrap:anywhere}.toasts-item-kill.button,.toasts-item-kill:not(.button){align-self:flex-start;border-radius:var(--pr-t-border-radius-default);animation-name:timer;--components-button-padding: var(--pr-t-spacings-100);--components-button-backgroundColor: transparent;--components-button-color: var(--palettes-700, var(--pr-t-color-text-subtle));--components-button-boxShadow: none}.toasts-item-kill.button:hover,.toasts-item-kill.button:focus-visible,.toasts-item-kill:not(.button):hover,.toasts-item-kill:not(.button):focus-visible{--components-button-color: var(--palettes-700, var(--pr-t-color-text-subtle));--components-button-backgroundColor: var(--palettes-50, var(--palettes-neutral-50))}.toasts-item-kill.button:active,.toasts-item-kill:not(.button):active{--components-button-backgroundColor: var(--palettes-100, var(--palettes-neutral-100))}.toasts-item-kill.button:disabled,.toasts-item-kill:not(.button):disabled{--components-button-backgroundColor: transparent;--components-button-color: var(--pr-t-color-text-disabled)}.toasts-item-kill.button,.toasts-item-kill:not(.button){--components-button-color: var(--palettes-neutral-0)}.toasts-item-kill.button:hover,.toasts-item-kill.button:focus-visible,.toasts-item-kill:not(.button):hover,.toasts-item-kill:not(.button):focus-visible{--components-button-color: var(--palettes-neutral-0);--components-button-backgroundColor: var(--palettes-neutral-900)}.toasts-item-kill.button:active,.toasts-item-kill:not(.button):active{--components-button-backgroundColor: var(--palettes-neutral-700)}@keyframes timer{}}@layer mods{.toasts.mod-bottom{--components-toasts-inset: auto var(--components-toasts-right) var(--components-toasts-bottom) auto}}\n"], dependencies: [{ kind: "directive", type: PortalDirective, selector: "[luPortal]", inputs: ["luPortal", "luPortalContext"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
120
119
  }
121
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuToastsComponent, decorators: [{
120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuToastsComponent, decorators: [{
122
121
  type: Component,
123
- args: [{ selector: 'lu-toasts', changeDetection: ChangeDetectionStrategy.OnPush, imports: [AsyncPipe, PortalDirective], template: "<div class=\"toasts\" aria-live=\"polite\" [class.mod-bottom]=\"bottom()\">\n\t@for (toast of toasts$ | async; track toast.id) {\n\t\t<div class=\"toasts-item\" [class]=\"paletteClassByToastType[toast.type]\">\n\t\t\t@if (toast.type) {\n\t\t\t\t<span class=\"toast-item-icon lucca-icon\" aria-hidden=\"true\" [class]=\"iconClassByToastType[toast.type]\"></span>\n\t\t\t}\n\t\t\t<div class=\"toast-item-content\">\n\t\t\t\t@if (toast.title) {\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<strong>{{ toast.title }}</strong>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t@if (isStringPortalContent(toast.message)) {\n\t\t\t\t\t<p class=\"toast-item-content-description\" [innerHtml]=\"toast.message\"></p>\n\t\t\t\t} @else {\n\t\t\t\t\t<ng-container *luPortal=\"toast.message\" />\n\t\t\t\t}\n\t\t\t</div>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"toasts-item-kill button\"\n\t\t\t\t(click)=\"removeToast(toast)\"\n\t\t\t\t(animationend)=\"!isOnlyDismissibleManually(toast) && toast.duration > 0 ? removeToast(toast) : null\"\n\t\t\t\t[style.animation-duration]=\"!isOnlyDismissibleManually(toast) && toast.duration > 0 ? toast.duration + 'ms' : null\"\n\t\t\t>\n\t\t\t\t<span class=\"lucca-icon icon-signClose\" aria-hidden=\"true\"></span>\n\t\t\t\t<span class=\"pr-u-mask\">{{ intl().close }}</span>\n\t\t\t</button>\n\t\t</div>\n\t}\n</div>\n", styles: ["@layer components{.toasts{--components-toasts-color: var(--pr-t-color-text-reverse);--components-toasts-top: var(--pr-t-spacings-300);--components-toasts-right: calc(var(--pr-t-spacings-300) + var(--commons-pushPanel-inlineSize));--components-toasts-left: var(--pr-t-spacings-300);--components-toasts-bottom: var(--pr-t-spacings-300);--components-toasts-margin-bottom: var(--pr-t-spacings-50);--components-toasts-maxwidth: min(22.5rem, calc(100dvw - (var(--components-toasts-right) * 2)));--components-toasts-inset: var(--components-toasts-top) var(--components-toasts-right) auto auto;--components-toasts-footerHeight: 4.5rem;--components-toasts-background: var(--palettes-neutral-800);--components-toasts-padding: var(--pr-t-spacings-100) var(--pr-t-spacings-200);max-inline-size:var(--components-toasts-maxwidth);display:flex;flex-direction:column;align-items:flex-end;position:fixed;z-index:9999;inset:var(--components-toasts-inset)}html:has(.main-content .footer.mod-sticky,.dialog.mod-drawer .dialog-inside-footer) .toasts{--components-toasts-bottom: calc(var(--components-toasts-footerHeight) + var(--pr-t-spacings-300))}.toasts-item{display:flex;gap:var(--pr-t-spacings-50);color:var(--components-toasts-color);padding:var(--pr-t-spacings-50);margin-block-end:var(--components-toasts-margin-bottom);background-color:var(--palettes-neutral-800);animation-name:toastsItem;animation-duration:var(--commons-animations-durations-standard);animation-iteration-count:1;border-radius:var(--pr-t-border-radius-structure);overflow:hidden;position:relative;transform-origin:top}@keyframes toastsItem{0%{transform:translateY(var(--pr-t-spacings-200));opacity:0}to{opacity:1}}.toasts-item:hover .toasts-item-kill,.toasts-item:focus-within .toasts-item-kill{animation-play-state:paused}.toast-item-icon{background:var(--palettes-700, var(--palettes-product-700));border-radius:var(--pr-t-border-radius-default);padding-block:var(--pr-t-spacings-100);padding-inline:var(--pr-t-spacings-50)}.toast-item-content{display:flex;flex-grow:1;flex-direction:column;gap:var(--pr-t-spacings-50);padding-block:var(--pr-t-spacings-100);padding-inline:var(--pr-t-spacings-100) 0}.toast-item-content-description{margin:0;overflow-wrap:anywhere}.toasts-item-kill.button,.toasts-item-kill:not(.button){align-self:flex-start;border-radius:var(--pr-t-border-radius-default);animation-name:timer;--components-button-padding: var(--pr-t-spacings-100);--components-button-backgroundColor: transparent;--components-button-color: var(--palettes-700, var(--pr-t-color-text-subtle));--components-button-boxShadow: none}.toasts-item-kill.button:hover,.toasts-item-kill.button:focus-visible,.toasts-item-kill:not(.button):hover,.toasts-item-kill:not(.button):focus-visible{--components-button-color: var(--palettes-700, var(--pr-t-color-text-subtle));--components-button-backgroundColor: var(--palettes-50, var(--palettes-neutral-50))}.toasts-item-kill.button:active,.toasts-item-kill:not(.button):active{--components-button-backgroundColor: var(--palettes-100, var(--palettes-neutral-100))}.toasts-item-kill.button:disabled,.toasts-item-kill:not(.button):disabled{--components-button-backgroundColor: transparent;--components-button-color: var(--pr-t-color-text-disabled)}.toasts-item-kill.button,.toasts-item-kill:not(.button){--components-button-color: var(--palettes-neutral-0)}.toasts-item-kill.button:hover,.toasts-item-kill.button:focus-visible,.toasts-item-kill:not(.button):hover,.toasts-item-kill:not(.button):focus-visible{--components-button-color: var(--palettes-neutral-0);--components-button-backgroundColor: var(--palettes-neutral-900)}.toasts-item-kill.button:active,.toasts-item-kill:not(.button):active{--components-button-backgroundColor: var(--palettes-neutral-700)}@keyframes timer{}}@layer mods{.toasts.mod-bottom{--components-toasts-inset: auto var(--components-toasts-right) var(--components-toasts-bottom) auto}}\n"] }]
122
+ args: [{ selector: 'lu-toasts', changeDetection: ChangeDetectionStrategy.OnPush, imports: [AsyncPipe, PortalDirective], template: "<div class=\"toasts\" aria-live=\"polite\" [class.mod-bottom]=\"bottom()\">\n\t@for (toast of toasts$ | async; track toast.id) {\n\t\t<div class=\"toasts-item\" [class]=\"toast.type ? paletteClassByToastType[toast.type] : null\">\n\t\t\t@if (toast.type) {\n\t\t\t\t<span class=\"toast-item-icon lucca-icon\" aria-hidden=\"true\" [class]=\"iconClassByToastType[toast.type]\"></span>\n\t\t\t}\n\t\t\t<div class=\"toast-item-content\">\n\t\t\t\t@if (toast.title) {\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<strong>{{ toast.title }}</strong>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t@if (isStringPortalContent(toast.message)) {\n\t\t\t\t\t<p class=\"toast-item-content-description\" [innerHtml]=\"toast.message\"></p>\n\t\t\t\t} @else {\n\t\t\t\t\t<ng-container *luPortal=\"toast.message\" />\n\t\t\t\t}\n\t\t\t</div>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"toasts-item-kill button\"\n\t\t\t\t(click)=\"removeToast(toast)\"\n\t\t\t\t(animationend)=\"!isOnlyDismissibleManually(toast) && (toast.duration ?? 0) > 0 ? removeToast(toast) : null\"\n\t\t\t\t[style.animation-duration]=\"!isOnlyDismissibleManually(toast) && (toast.duration ?? 0) > 0 ? toast.duration + 'ms' : null\"\n\t\t\t>\n\t\t\t\t<span class=\"lucca-icon icon-signClose\" aria-hidden=\"true\"></span>\n\t\t\t\t<span class=\"pr-u-mask\">{{ intl().close }}</span>\n\t\t\t</button>\n\t\t</div>\n\t}\n</div>\n", styles: ["@layer components{.toasts{--components-toasts-color: var(--pr-t-color-text-reverse);--components-toasts-top: var(--pr-t-spacings-300);--components-toasts-right: calc(var(--pr-t-spacings-300) + var(--commons-pushPanel-inlineSize));--components-toasts-left: var(--pr-t-spacings-300);--components-toasts-bottom: var(--pr-t-spacings-300);--components-toasts-margin-bottom: var(--pr-t-spacings-50);--components-toasts-maxwidth: min(22.5rem, calc(100dvi - (var(--components-toasts-right) * 2)));--components-toasts-inset: var(--components-toasts-top) var(--components-toasts-right) auto auto;--components-toasts-footerHeight: 4.5rem;--components-toasts-background: var(--palettes-neutral-800);--components-toasts-padding: var(--pr-t-spacings-100) var(--pr-t-spacings-200);max-inline-size:var(--components-toasts-maxwidth);display:flex;flex-direction:column;align-items:flex-end;position:fixed;z-index:9999;inset:var(--components-toasts-inset)}html:has(.main-content .footer.mod-sticky,.dialog.mod-drawer .dialog-inside-footer) .toasts{--components-toasts-bottom: calc(var(--components-toasts-footerHeight) + var(--pr-t-spacings-300))}.toasts-item{display:flex;gap:var(--pr-t-spacings-50);color:var(--components-toasts-color);padding:var(--pr-t-spacings-50);margin-block-end:var(--components-toasts-margin-bottom);background-color:var(--palettes-neutral-800);animation-name:toastsItem;animation-duration:var(--commons-animations-durations-standard);animation-iteration-count:1;border-radius:var(--pr-t-border-radius-structure);overflow:hidden;position:relative;transform-origin:top}@keyframes toastsItem{0%{transform:translateY(var(--pr-t-spacings-200));opacity:0}to{opacity:1}}.toasts-item:hover .toasts-item-kill,.toasts-item:focus-within .toasts-item-kill{animation-play-state:paused}.toast-item-icon{background:var(--palettes-700, var(--palettes-product-700));border-radius:var(--pr-t-border-radius-default);padding-block:var(--pr-t-spacings-100);padding-inline:var(--pr-t-spacings-50)}.toast-item-content{display:flex;flex-grow:1;flex-direction:column;gap:var(--pr-t-spacings-50);padding-block:var(--pr-t-spacings-100);padding-inline:var(--pr-t-spacings-100) 0}.toast-item-content-description{margin:0;overflow-wrap:anywhere}.toasts-item-kill.button,.toasts-item-kill:not(.button){align-self:flex-start;border-radius:var(--pr-t-border-radius-default);animation-name:timer;--components-button-padding: var(--pr-t-spacings-100);--components-button-backgroundColor: transparent;--components-button-color: var(--palettes-700, var(--pr-t-color-text-subtle));--components-button-boxShadow: none}.toasts-item-kill.button:hover,.toasts-item-kill.button:focus-visible,.toasts-item-kill:not(.button):hover,.toasts-item-kill:not(.button):focus-visible{--components-button-color: var(--palettes-700, var(--pr-t-color-text-subtle));--components-button-backgroundColor: var(--palettes-50, var(--palettes-neutral-50))}.toasts-item-kill.button:active,.toasts-item-kill:not(.button):active{--components-button-backgroundColor: var(--palettes-100, var(--palettes-neutral-100))}.toasts-item-kill.button:disabled,.toasts-item-kill:not(.button):disabled{--components-button-backgroundColor: transparent;--components-button-color: var(--pr-t-color-text-disabled)}.toasts-item-kill.button,.toasts-item-kill:not(.button){--components-button-color: var(--palettes-neutral-0)}.toasts-item-kill.button:hover,.toasts-item-kill.button:focus-visible,.toasts-item-kill:not(.button):hover,.toasts-item-kill:not(.button):focus-visible{--components-button-color: var(--palettes-neutral-0);--components-button-backgroundColor: var(--palettes-neutral-900)}.toasts-item-kill.button:active,.toasts-item-kill:not(.button):active{--components-button-backgroundColor: var(--palettes-neutral-700)}@keyframes timer{}}@layer mods{.toasts.mod-bottom{--components-toasts-inset: auto var(--components-toasts-right) var(--components-toasts-bottom) auto}}\n"] }]
124
123
  }], ctorParameters: () => [], propDecorators: { bottom: [{ type: i0.Input, args: [{ isSignal: true, alias: "bottom", required: false }] }], sources: [{ type: i0.Input, args: [{ isSignal: true, alias: "sources", required: false }] }], intl: [{ type: i0.Input, args: [{ isSignal: true, alias: "intl", required: false }] }] } });
125
124
 
126
125
  /**
127
126
  * @deprecated use `LuToastsComponent` instead
128
127
  */
129
128
  class LuToastsModule {
130
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuToastsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
131
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.7", ngImport: i0, type: LuToastsModule, imports: [LuToastsComponent], exports: [LuToastsComponent] }); }
132
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuToastsModule }); }
129
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuToastsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
130
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: LuToastsModule, imports: [LuToastsComponent], exports: [LuToastsComponent] }); }
131
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuToastsModule }); }
133
132
  }
134
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: LuToastsModule, decorators: [{
133
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: LuToastsModule, decorators: [{
135
134
  type: NgModule,
136
135
  args: [{
137
136
  imports: [LuToastsComponent],
@@ -1 +1 @@
1
- {"version":3,"file":"lucca-front-ng-toast.mjs","sources":["../../../packages/ng/toast/toasts.model.ts","../../../packages/ng/toast/toasts.service.ts","../../../packages/ng/toast/translations.ts","../../../packages/ng/toast/toasts.translate.ts","../../../packages/ng/toast/toasts.component.ts","../../../packages/ng/toast/toasts.component.html","../../../packages/ng/toast/toasts.module.ts","../../../packages/ng/toast/public-api.ts","../../../packages/ng/toast/lucca-front-ng-toast.ts"],"sourcesContent":["import { PortalContent } from '@lucca-front/ng/core';\n\nexport type LuToastType = 'Info' | 'Error' | 'Success' | 'Warning';\n\nexport const defaultToastDuration = 5000;\n\nexport interface LuToastInput {\n\t/**\n\t * InnerHTML supported.\n\t */\n\tmessage: PortalContent;\n\t/**\n\t * Bold title.\n\t * InnerHTML not supported.\n\t */\n\ttitle?: string;\n\ttype?: LuToastType;\n\t/**\n\t * Auto kill default duration is 5000ms.\n\t * Null means manual dismiss only.\n\t */\n\tduration?: number | null;\n}\n\nexport interface LuToast extends LuToastInput {\n\tid: string;\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { defaultToastDuration, LuToast, LuToastInput } from './toasts.model';\n\n@Injectable({ providedIn: 'root' })\nexport class LuToastsService {\n\tpublic readonly toasts$ = new BehaviorSubject<LuToast[]>([]);\n\n\tpublic addToast(toastInput: LuToastInput): LuToast {\n\t\tconst toast = this.getToast(toastInput);\n\n\t\tthis.toasts$.next([...this.toasts$.value, toast]);\n\n\t\treturn toast;\n\t}\n\n\tpublic removeToast(toast: LuToast): void {\n\t\tconst updatedToasts = this.toasts$.value.filter(({ id }) => id !== toast.id);\n\t\tthis.toasts$.next(updatedToasts);\n\t}\n\n\tpublic isOnlyDismissibleManually({ duration }: LuToastInput): boolean {\n\t\treturn duration === null;\n\t}\n\n\tprivate getToast(toastInput: LuToastInput): LuToast {\n\t\tconst id = this.generateId();\n\t\tconst duration = this.isOnlyDismissibleManually(toastInput) ? toastInput.duration : (toastInput.duration ?? defaultToastDuration);\n\n\t\treturn { ...toastInput, id, duration };\n\t}\n\n\tprivate generateId(): string {\n\t\tconst randomString = Math.random().toString(36).substring(2, 9);\n\t\treturn `_${randomString}`;\n\t}\n}\n","export const Translations = {\n\tpt: {\n\t\tclose: 'Fechar',\n\t},\n\t'nl-BE': {\n\t\tclose: 'Sluiten',\n\t},\n\tnl: {\n\t\tclose: 'Sluiten',\n\t},\n\tit: {\n\t\tclose: 'Chiudere',\n\t},\n\tde: {\n\t\tclose: 'Schließen',\n\t},\n\tfr: {\n\t\tclose: 'Fermer',\n\t},\n\tes: {\n\t\tclose: 'Cerrar',\n\t},\n\ten: {\n\t\tclose: 'Close',\n\t},\n\tpl: {\n\t\tclose: 'Zamknij',\n\t},\n};\n","import { InjectionToken } from '@angular/core';\nimport { LuTranslation } from '@lucca-front/ng/core';\nimport { Translations } from './translations';\n\nexport const LU_TOAST_TRANSLATIONS = new InjectionToken('LuToastTranslations', {\n\tfactory: () => luToastTranslations,\n});\n\nexport interface ILuToastLabel {\n\tclose: string;\n}\n\nexport const luToastTranslations: LuTranslation<ILuToastLabel> = Translations;\n","import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject, input } from '@angular/core';\nimport { intlInputOptions, isNotNil, PortalContent, PortalDirective, ɵeffectWithDeps } from '@lucca-front/ng/core';\nimport { merge, Observable } from 'rxjs';\nimport { LuToast, LuToastInput, LuToastType } from './toasts.model';\nimport { LuToastsService } from './toasts.service';\nimport { LU_TOAST_TRANSLATIONS } from './toasts.translate';\n\n@Component({\n\tselector: 'lu-toasts',\n\ttemplateUrl: './toasts.component.html',\n\tstyleUrl: './toasts.component.scss',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [AsyncPipe, PortalDirective],\n})\nexport class LuToastsComponent {\n\treadonly #toastsService = inject(LuToastsService);\n\n\treadonly bottom = input(false);\n\treadonly sources = input<Array<Observable<LuToastInput>>>();\n\n\tconstructor() {\n\t\tɵeffectWithDeps([this.sources], (sources, onCleanup) => {\n\t\t\tif (isNotNil(sources)) {\n\t\t\t\tconst sub = merge(...sources).subscribe((toast) => this.#toastsService.addToast(toast));\n\n\t\t\t\tonCleanup(() => {\n\t\t\t\t\tsub.unsubscribe();\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\treadonly toasts$ = this.#toastsService.toasts$;\n\n\treadonly intl = input(...intlInputOptions(LU_TOAST_TRANSLATIONS));\n\n\treadonly iconClassByToastType: Record<LuToastType, string> = {\n\t\tInfo: 'icon-signInfo',\n\t\tSuccess: 'icon-signSuccess',\n\t\tError: 'icon-signError',\n\t\tWarning: 'icon-signWarning',\n\t};\n\n\treadonly paletteClassByToastType: Record<LuToastType, string> = {\n\t\tInfo: '',\n\t\tSuccess: 'palette-success',\n\t\tError: 'palette-error',\n\t\tWarning: 'palette-warning',\n\t};\n\n\tisStringPortalContent(message: PortalContent): message is string {\n\t\treturn typeof message === 'string';\n\t}\n\n\tremoveToast(toast: LuToast): void {\n\t\tthis.#toastsService.removeToast(toast);\n\t}\n\n\tisOnlyDismissibleManually(toast: LuToast): boolean {\n\t\treturn this.#toastsService.isOnlyDismissibleManually(toast);\n\t}\n}\n","<div class=\"toasts\" aria-live=\"polite\" [class.mod-bottom]=\"bottom()\">\n\t@for (toast of toasts$ | async; track toast.id) {\n\t\t<div class=\"toasts-item\" [class]=\"paletteClassByToastType[toast.type]\">\n\t\t\t@if (toast.type) {\n\t\t\t\t<span class=\"toast-item-icon lucca-icon\" aria-hidden=\"true\" [class]=\"iconClassByToastType[toast.type]\"></span>\n\t\t\t}\n\t\t\t<div class=\"toast-item-content\">\n\t\t\t\t@if (toast.title) {\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<strong>{{ toast.title }}</strong>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t@if (isStringPortalContent(toast.message)) {\n\t\t\t\t\t<p class=\"toast-item-content-description\" [innerHtml]=\"toast.message\"></p>\n\t\t\t\t} @else {\n\t\t\t\t\t<ng-container *luPortal=\"toast.message\" />\n\t\t\t\t}\n\t\t\t</div>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"toasts-item-kill button\"\n\t\t\t\t(click)=\"removeToast(toast)\"\n\t\t\t\t(animationend)=\"!isOnlyDismissibleManually(toast) && toast.duration > 0 ? removeToast(toast) : null\"\n\t\t\t\t[style.animation-duration]=\"!isOnlyDismissibleManually(toast) && toast.duration > 0 ? toast.duration + 'ms' : null\"\n\t\t\t>\n\t\t\t\t<span class=\"lucca-icon icon-signClose\" aria-hidden=\"true\"></span>\n\t\t\t\t<span class=\"pr-u-mask\">{{ intl().close }}</span>\n\t\t\t</button>\n\t\t</div>\n\t}\n</div>\n","import { NgModule } from '@angular/core';\nimport { LuToastsComponent } from './toasts.component';\n\n/**\n * @deprecated use `LuToastsComponent` instead\n */\n@NgModule({\n\timports: [LuToastsComponent],\n\texports: [LuToastsComponent],\n})\nexport class LuToastsModule {}\n","/*\n * Public API Surface of toast\n */\n\nexport * from './toasts.component';\nexport * from './toasts.model';\nexport * from './toasts.module';\nexport * from './toasts.service';\nexport * from './toasts.translate';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ɵeffectWithDeps"],"mappings":";;;;;;AAIO,MAAM,oBAAoB,GAAG;;MCCvB,eAAe,CAAA;AAD5B,IAAA,WAAA,GAAA;A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AAA,EAAA,yzCAAA,EAAA,MAAA,EAAA,CAAA,o0HAAA,CAAA,EAAA;;;AEVtC;;AAEG;MAKU,cAAc,CAAA;8GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAd,cAAc,EAAA,OAAA,EAAA,CAHhB,iBAAiB,CAAA,EAAA,OAAA,EAAA,CACjB,iBAAiB,CAAA,EAAA,CAAA,CAAA;+GAEf,cAAc,EAAA,CAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,OAAO,EAAE,CAAC,iBAAiB,CAAC;oBAC5B,OAAO,EAAE,CAAC,iBAAiB,CAAC;AAC5B,iBAAA;;;ACTD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"lucca-front-ng-toast.mjs","sources":["../../../packages/ng/toast/toasts.model.ts","../../../packages/ng/toast/toasts.service.ts","../../../packages/ng/toast/translations.ts","../../../packages/ng/toast/toasts.translate.ts","../../../packages/ng/toast/toasts.component.ts","../../../packages/ng/toast/toasts.component.html","../../../packages/ng/toast/toasts.module.ts","../../../packages/ng/toast/public-api.ts","../../../packages/ng/toast/lucca-front-ng-toast.ts"],"sourcesContent":["import { PortalContent } from '@lucca-front/ng/core';\n\nexport type LuToastType = 'Info' | 'Error' | 'Success' | 'Warning';\n\nexport const defaultToastDuration = 5000;\n\nexport interface LuToastInput {\n\t/**\n\t * InnerHTML supported.\n\t */\n\tmessage: PortalContent;\n\t/**\n\t * Bold title.\n\t * InnerHTML not supported.\n\t */\n\ttitle?: string;\n\ttype?: LuToastType;\n\t/**\n\t * Auto kill default duration is 5000ms.\n\t * Null means manual dismiss only.\n\t */\n\tduration?: number | null;\n}\n\nexport interface LuToast extends LuToastInput {\n\tid: string;\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { defaultToastDuration, LuToast, LuToastInput } from './toasts.model';\n\n@Injectable({ providedIn: 'root' })\nexport class LuToastsService {\n\tpublic readonly toasts$ = new BehaviorSubject<LuToast[]>([]);\n\n\tpublic addToast(toastInput: LuToastInput): LuToast {\n\t\tconst toast = this.getToast(toastInput);\n\n\t\tthis.toasts$.next([...this.toasts$.value, toast]);\n\n\t\treturn toast;\n\t}\n\n\tpublic removeToast(toast: LuToast): void {\n\t\tconst updatedToasts = this.toasts$.value.filter(({ id }) => id !== toast.id);\n\t\tthis.toasts$.next(updatedToasts);\n\t}\n\n\tpublic isOnlyDismissibleManually({ duration }: LuToastInput): boolean {\n\t\treturn duration === null;\n\t}\n\n\tprivate getToast(toastInput: LuToastInput): LuToast {\n\t\tconst id = this.generateId();\n\t\tconst duration = this.isOnlyDismissibleManually(toastInput) ? toastInput.duration : (toastInput.duration ?? defaultToastDuration);\n\n\t\treturn { ...toastInput, id, duration };\n\t}\n\n\tprivate generateId(): string {\n\t\tconst randomString = Math.random().toString(36).substring(2, 9);\n\t\treturn `_${randomString}`;\n\t}\n}\n","export const Translations = {\n\tpt: {\n\t\tclose: 'Fechar',\n\t},\n\t'nl-BE': {\n\t\tclose: 'Sluiten',\n\t},\n\tnl: {\n\t\tclose: 'Sluiten',\n\t},\n\tit: {\n\t\tclose: 'Chiudere',\n\t},\n\tde: {\n\t\tclose: 'Schließen',\n\t},\n\tfr: {\n\t\tclose: 'Fermer',\n\t},\n\tes: {\n\t\tclose: 'Cerrar',\n\t},\n\ten: {\n\t\tclose: 'Close',\n\t},\n\tpl: {\n\t\tclose: 'Zamknij',\n\t},\n};\n","import { InjectionToken } from '@angular/core';\nimport { LuTranslation } from '@lucca-front/ng/core';\nimport { Translations } from './translations';\n\nexport const LU_TOAST_TRANSLATIONS = new InjectionToken('LuToastTranslations', {\n\tfactory: () => luToastTranslations,\n});\n\nexport interface ILuToastLabel {\n\tclose: string;\n}\n\nexport const luToastTranslations: LuTranslation<ILuToastLabel> = Translations;\n","import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject, input } from '@angular/core';\nimport { intlInputOptions, isNotNil, luBooleanAttribute, PortalContent, PortalDirective, ɵeffectWithDeps } from '@lucca-front/ng/core';\nimport { merge, Observable } from 'rxjs';\nimport { LuToast, LuToastInput, LuToastType } from './toasts.model';\nimport { LuToastsService } from './toasts.service';\nimport { LU_TOAST_TRANSLATIONS } from './toasts.translate';\n\n@Component({\n\tselector: 'lu-toasts',\n\ttemplateUrl: './toasts.component.html',\n\tstyleUrl: './toasts.component.scss',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\timports: [AsyncPipe, PortalDirective],\n})\nexport class LuToastsComponent {\n\treadonly #toastsService = inject(LuToastsService);\n\n\treadonly bottom = input(false, { transform: luBooleanAttribute });\n\treadonly sources = input<Array<Observable<LuToastInput>>>();\n\n\tconstructor() {\n\t\tɵeffectWithDeps([this.sources], (sources, onCleanup) => {\n\t\t\tif (isNotNil(sources)) {\n\t\t\t\tconst sub = merge(...sources).subscribe((toast) => this.#toastsService.addToast(toast));\n\n\t\t\t\tonCleanup(() => {\n\t\t\t\t\tsub.unsubscribe();\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\treadonly toasts$ = this.#toastsService.toasts$;\n\n\treadonly intl = input(...intlInputOptions(LU_TOAST_TRANSLATIONS));\n\n\treadonly iconClassByToastType: Record<LuToastType, string> = {\n\t\tInfo: 'icon-signInfo',\n\t\tSuccess: 'icon-signSuccess',\n\t\tError: 'icon-signError',\n\t\tWarning: 'icon-signWarning',\n\t};\n\n\treadonly paletteClassByToastType: Record<LuToastType, string> = {\n\t\tInfo: '',\n\t\tSuccess: 'palette-success',\n\t\tError: 'palette-error',\n\t\tWarning: 'palette-warning',\n\t};\n\n\tisStringPortalContent(message: PortalContent): message is string {\n\t\treturn typeof message === 'string';\n\t}\n\n\tremoveToast(toast: LuToast): void {\n\t\tthis.#toastsService.removeToast(toast);\n\t}\n\n\tisOnlyDismissibleManually(toast: LuToast): boolean {\n\t\treturn this.#toastsService.isOnlyDismissibleManually(toast);\n\t}\n}\n","<div class=\"toasts\" aria-live=\"polite\" [class.mod-bottom]=\"bottom()\">\n\t@for (toast of toasts$ | async; track toast.id) {\n\t\t<div class=\"toasts-item\" [class]=\"toast.type ? paletteClassByToastType[toast.type] : null\">\n\t\t\t@if (toast.type) {\n\t\t\t\t<span class=\"toast-item-icon lucca-icon\" aria-hidden=\"true\" [class]=\"iconClassByToastType[toast.type]\"></span>\n\t\t\t}\n\t\t\t<div class=\"toast-item-content\">\n\t\t\t\t@if (toast.title) {\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<strong>{{ toast.title }}</strong>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t@if (isStringPortalContent(toast.message)) {\n\t\t\t\t\t<p class=\"toast-item-content-description\" [innerHtml]=\"toast.message\"></p>\n\t\t\t\t} @else {\n\t\t\t\t\t<ng-container *luPortal=\"toast.message\" />\n\t\t\t\t}\n\t\t\t</div>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclass=\"toasts-item-kill button\"\n\t\t\t\t(click)=\"removeToast(toast)\"\n\t\t\t\t(animationend)=\"!isOnlyDismissibleManually(toast) && (toast.duration ?? 0) > 0 ? removeToast(toast) : null\"\n\t\t\t\t[style.animation-duration]=\"!isOnlyDismissibleManually(toast) && (toast.duration ?? 0) > 0 ? toast.duration + 'ms' : null\"\n\t\t\t>\n\t\t\t\t<span class=\"lucca-icon icon-signClose\" aria-hidden=\"true\"></span>\n\t\t\t\t<span class=\"pr-u-mask\">{{ intl().close }}</span>\n\t\t\t</button>\n\t\t</div>\n\t}\n</div>\n","import { NgModule } from '@angular/core';\nimport { LuToastsComponent } from './toasts.component';\n\n/**\n * @deprecated use `LuToastsComponent` instead\n */\n@NgModule({\n\timports: [LuToastsComponent],\n\texports: [LuToastsComponent],\n})\nexport class LuToastsModule {}\n","/*\n * Public API Surface of toast\n */\n\nexport * from './toasts.component';\nexport * from './toasts.model';\nexport * from './toasts.module';\nexport * from './toasts.service';\nexport * from './toasts.translate';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["ɵeffectWithDeps"],"mappings":";;;;;;AAIO,MAAM,oBAAoB,GAAG;;MCCvB,eAAe,CAAA;AAD5B,IAAA,WAAA,GAAA;AAEiB,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,eAAe,CAAY,EAAE,CAAC;AA8B5D,IAAA;AA5BO,IAAA,QAAQ,CAAC,UAAwB,EAAA;QACvC,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC;AAEvC,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAEjD,QAAA,OAAO,KAAK;IACb;AAEO,IAAA,WAAW,CAAC,KAAc,EAAA;QAChC,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,KAAK,CAAC,EAAE,CAAC;AAC5E,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,CAAC;IACjC;IAEO,yBAAyB,CAAC,EAAE,QAAQ,EAAgB,EAAA;QAC1D,OAAO,QAAQ,KAAK,IAAI;IACzB;AAEQ,IAAA,QAAQ,CAAC,UAAwB,EAAA;AACxC,QAAA,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,EAAE;QAC5B,MAAM,QAAQ,GAAG,IAAI,CAAC,yBAAyB,CAAC,UAAU,CAAC,GAAG,UAAU,CAAC,QAAQ,IAAI,UAAU,CAAC,QAAQ,IAAI,oBAAoB,CAAC;QAEjI,OAAO,EAAE,GAAG,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE;IACvC;IAEQ,UAAU,GAAA;AACjB,QAAA,MAAM,YAAY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