@forgeroute/ui 0.5.15 → 0.5.17

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 (340) hide show
  1. package/fesm2022/forgeroute-ui-action-bar.mjs +190 -0
  2. package/fesm2022/forgeroute-ui-action-bar.mjs.map +1 -0
  3. package/fesm2022/forgeroute-ui-address-input.mjs +1164 -0
  4. package/fesm2022/forgeroute-ui-address-input.mjs.map +1 -0
  5. package/fesm2022/forgeroute-ui-alert.mjs +223 -0
  6. package/fesm2022/forgeroute-ui-alert.mjs.map +1 -0
  7. package/fesm2022/forgeroute-ui-avatar.mjs +320 -0
  8. package/fesm2022/forgeroute-ui-avatar.mjs.map +1 -0
  9. package/fesm2022/forgeroute-ui-badge.mjs +158 -0
  10. package/fesm2022/forgeroute-ui-badge.mjs.map +1 -0
  11. package/fesm2022/forgeroute-ui-bar-row.mjs +255 -0
  12. package/fesm2022/forgeroute-ui-bar-row.mjs.map +1 -0
  13. package/fesm2022/forgeroute-ui-boards.mjs +2201 -0
  14. package/fesm2022/forgeroute-ui-boards.mjs.map +1 -0
  15. package/fesm2022/forgeroute-ui-bulk-eligible.mjs +172 -0
  16. package/fesm2022/forgeroute-ui-bulk-eligible.mjs.map +1 -0
  17. package/fesm2022/forgeroute-ui-business-hours.mjs +771 -0
  18. package/fesm2022/forgeroute-ui-business-hours.mjs.map +1 -0
  19. package/fesm2022/forgeroute-ui-calendar.mjs +2006 -0
  20. package/fesm2022/forgeroute-ui-calendar.mjs.map +1 -0
  21. package/fesm2022/forgeroute-ui-card-list-item.mjs +556 -0
  22. package/fesm2022/forgeroute-ui-card-list-item.mjs.map +1 -0
  23. package/fesm2022/forgeroute-ui-charts.mjs +1 -1
  24. package/fesm2022/forgeroute-ui-charts.mjs.map +1 -1
  25. package/fesm2022/forgeroute-ui-checkbox.mjs +815 -0
  26. package/fesm2022/forgeroute-ui-checkbox.mjs.map +1 -0
  27. package/fesm2022/forgeroute-ui-chip.mjs +379 -0
  28. package/fesm2022/forgeroute-ui-chip.mjs.map +1 -0
  29. package/fesm2022/forgeroute-ui-color-input.mjs +492 -0
  30. package/fesm2022/forgeroute-ui-color-input.mjs.map +1 -0
  31. package/fesm2022/forgeroute-ui-column-filter.mjs +645 -0
  32. package/fesm2022/forgeroute-ui-column-filter.mjs.map +1 -0
  33. package/fesm2022/forgeroute-ui-columns.mjs +351 -0
  34. package/fesm2022/forgeroute-ui-columns.mjs.map +1 -0
  35. package/fesm2022/forgeroute-ui-combobox.mjs +772 -0
  36. package/fesm2022/forgeroute-ui-combobox.mjs.map +1 -0
  37. package/fesm2022/forgeroute-ui-confirm.mjs +48 -0
  38. package/fesm2022/forgeroute-ui-confirm.mjs.map +1 -0
  39. package/fesm2022/forgeroute-ui-contact-picker.mjs +865 -0
  40. package/fesm2022/forgeroute-ui-contact-picker.mjs.map +1 -0
  41. package/fesm2022/forgeroute-ui-conversations.mjs +3627 -0
  42. package/fesm2022/forgeroute-ui-conversations.mjs.map +1 -0
  43. package/fesm2022/forgeroute-ui-copy-field.mjs +378 -0
  44. package/fesm2022/forgeroute-ui-copy-field.mjs.map +1 -0
  45. package/fesm2022/forgeroute-ui-data-table-core.mjs +6150 -0
  46. package/fesm2022/forgeroute-ui-data-table-core.mjs.map +1 -0
  47. package/fesm2022/forgeroute-ui-date-input.mjs +384 -0
  48. package/fesm2022/forgeroute-ui-date-input.mjs.map +1 -0
  49. package/fesm2022/forgeroute-ui-date-range-picker.mjs +453 -0
  50. package/fesm2022/forgeroute-ui-date-range-picker.mjs.map +1 -0
  51. package/fesm2022/forgeroute-ui-datetime-input.mjs +375 -0
  52. package/fesm2022/forgeroute-ui-datetime-input.mjs.map +1 -0
  53. package/fesm2022/forgeroute-ui-detail-card.mjs +655 -0
  54. package/fesm2022/forgeroute-ui-detail-card.mjs.map +1 -0
  55. package/fesm2022/forgeroute-ui-discount-selector.mjs +259 -0
  56. package/fesm2022/forgeroute-ui-discount-selector.mjs.map +1 -0
  57. package/fesm2022/forgeroute-ui-divider.mjs +111 -0
  58. package/fesm2022/forgeroute-ui-divider.mjs.map +1 -0
  59. package/fesm2022/forgeroute-ui-dropdown.mjs +550 -0
  60. package/fesm2022/forgeroute-ui-dropdown.mjs.map +1 -0
  61. package/fesm2022/forgeroute-ui-editor.mjs +4545 -0
  62. package/fesm2022/forgeroute-ui-editor.mjs.map +1 -0
  63. package/fesm2022/forgeroute-ui-empty-state.mjs +231 -0
  64. package/fesm2022/forgeroute-ui-empty-state.mjs.map +1 -0
  65. package/fesm2022/forgeroute-ui-error-state.mjs +195 -0
  66. package/fesm2022/forgeroute-ui-error-state.mjs.map +1 -0
  67. package/fesm2022/forgeroute-ui-error.mjs +93 -0
  68. package/fesm2022/forgeroute-ui-error.mjs.map +1 -0
  69. package/fesm2022/forgeroute-ui-fade.mjs +117 -0
  70. package/fesm2022/forgeroute-ui-fade.mjs.map +1 -0
  71. package/fesm2022/forgeroute-ui-file-input.mjs +999 -0
  72. package/fesm2022/forgeroute-ui-file-input.mjs.map +1 -0
  73. package/fesm2022/forgeroute-ui-fixed-footer.mjs +115 -0
  74. package/fesm2022/forgeroute-ui-fixed-footer.mjs.map +1 -0
  75. package/fesm2022/forgeroute-ui-form-row.mjs +126 -0
  76. package/fesm2022/forgeroute-ui-form-row.mjs.map +1 -0
  77. package/fesm2022/forgeroute-ui-form-section.mjs +93 -0
  78. package/fesm2022/forgeroute-ui-form-section.mjs.map +1 -0
  79. package/fesm2022/forgeroute-ui-form.mjs +139 -0
  80. package/fesm2022/forgeroute-ui-form.mjs.map +1 -0
  81. package/fesm2022/forgeroute-ui-hint.mjs +47 -0
  82. package/fesm2022/forgeroute-ui-hint.mjs.map +1 -0
  83. package/fesm2022/forgeroute-ui-icon-picker.mjs +424 -0
  84. package/fesm2022/forgeroute-ui-icon-picker.mjs.map +1 -0
  85. package/fesm2022/forgeroute-ui-icon.mjs +311 -0
  86. package/fesm2022/forgeroute-ui-icon.mjs.map +1 -0
  87. package/fesm2022/forgeroute-ui-image-preview.mjs +237 -0
  88. package/fesm2022/forgeroute-ui-image-preview.mjs.map +1 -0
  89. package/fesm2022/forgeroute-ui-keypad.mjs +278 -0
  90. package/fesm2022/forgeroute-ui-keypad.mjs.map +1 -0
  91. package/fesm2022/forgeroute-ui-kpi-card.mjs +490 -0
  92. package/fesm2022/forgeroute-ui-kpi-card.mjs.map +1 -0
  93. package/fesm2022/forgeroute-ui-language-switcher.mjs +134 -0
  94. package/fesm2022/forgeroute-ui-language-switcher.mjs.map +1 -0
  95. package/fesm2022/forgeroute-ui-layout.mjs +18 -0
  96. package/fesm2022/forgeroute-ui-layout.mjs.map +1 -0
  97. package/fesm2022/forgeroute-ui-list-item.mjs +620 -0
  98. package/fesm2022/forgeroute-ui-list-item.mjs.map +1 -0
  99. package/fesm2022/forgeroute-ui-list.mjs +866 -0
  100. package/fesm2022/forgeroute-ui-list.mjs.map +1 -0
  101. package/fesm2022/forgeroute-ui-live-region.mjs +118 -0
  102. package/fesm2022/forgeroute-ui-live-region.mjs.map +1 -0
  103. package/fesm2022/forgeroute-ui-map.mjs +5 -1
  104. package/fesm2022/forgeroute-ui-map.mjs.map +1 -1
  105. package/fesm2022/forgeroute-ui-maps.mjs +2 -1
  106. package/fesm2022/forgeroute-ui-maps.mjs.map +1 -1
  107. package/fesm2022/forgeroute-ui-media.mjs +4615 -0
  108. package/fesm2022/forgeroute-ui-media.mjs.map +1 -0
  109. package/fesm2022/forgeroute-ui-messaging.mjs +20 -1
  110. package/fesm2022/forgeroute-ui-messaging.mjs.map +1 -1
  111. package/fesm2022/forgeroute-ui-more-menu.mjs +418 -0
  112. package/fesm2022/forgeroute-ui-more-menu.mjs.map +1 -0
  113. package/fesm2022/forgeroute-ui-multi-select.mjs +532 -0
  114. package/fesm2022/forgeroute-ui-multi-select.mjs.map +1 -0
  115. package/fesm2022/forgeroute-ui-notes.mjs +768 -0
  116. package/fesm2022/forgeroute-ui-notes.mjs.map +1 -0
  117. package/fesm2022/forgeroute-ui-notification-bell.mjs +587 -0
  118. package/fesm2022/forgeroute-ui-notification-bell.mjs.map +1 -0
  119. package/fesm2022/forgeroute-ui-offline-banner.mjs +156 -0
  120. package/fesm2022/forgeroute-ui-offline-banner.mjs.map +1 -0
  121. package/fesm2022/forgeroute-ui-option-card.mjs +379 -0
  122. package/fesm2022/forgeroute-ui-option-card.mjs.map +1 -0
  123. package/fesm2022/forgeroute-ui-page.mjs +317 -0
  124. package/fesm2022/forgeroute-ui-page.mjs.map +1 -0
  125. package/fesm2022/forgeroute-ui-pagination.mjs +225 -0
  126. package/fesm2022/forgeroute-ui-pagination.mjs.map +1 -0
  127. package/fesm2022/forgeroute-ui-panel-info-list.mjs +422 -0
  128. package/fesm2022/forgeroute-ui-panel-info-list.mjs.map +1 -0
  129. package/fesm2022/forgeroute-ui-password-requirements.mjs +237 -0
  130. package/fesm2022/forgeroute-ui-password-requirements.mjs.map +1 -0
  131. package/fesm2022/forgeroute-ui-payments.mjs +6243 -0
  132. package/fesm2022/forgeroute-ui-payments.mjs.map +1 -0
  133. package/fesm2022/forgeroute-ui-pdf.mjs +9 -1
  134. package/fesm2022/forgeroute-ui-pdf.mjs.map +1 -1
  135. package/fesm2022/forgeroute-ui-phone-number-picker.mjs +840 -0
  136. package/fesm2022/forgeroute-ui-phone-number-picker.mjs.map +1 -0
  137. package/fesm2022/forgeroute-ui-pill-tabs.mjs +546 -0
  138. package/fesm2022/forgeroute-ui-pill-tabs.mjs.map +1 -0
  139. package/fesm2022/forgeroute-ui-print.mjs +76 -0
  140. package/fesm2022/forgeroute-ui-print.mjs.map +1 -0
  141. package/fesm2022/forgeroute-ui-progress-bar.mjs +252 -0
  142. package/fesm2022/forgeroute-ui-progress-bar.mjs.map +1 -0
  143. package/fesm2022/forgeroute-ui-progress-ring.mjs +277 -0
  144. package/fesm2022/forgeroute-ui-progress-ring.mjs.map +1 -0
  145. package/fesm2022/forgeroute-ui-quick-filter-tabs.mjs +301 -0
  146. package/fesm2022/forgeroute-ui-quick-filter-tabs.mjs.map +1 -0
  147. package/fesm2022/forgeroute-ui-quickbooks.mjs +20 -3
  148. package/fesm2022/forgeroute-ui-quickbooks.mjs.map +1 -1
  149. package/fesm2022/forgeroute-ui-radio-matrix.mjs +471 -0
  150. package/fesm2022/forgeroute-ui-radio-matrix.mjs.map +1 -0
  151. package/fesm2022/forgeroute-ui-radio.mjs +911 -0
  152. package/fesm2022/forgeroute-ui-radio.mjs.map +1 -0
  153. package/fesm2022/forgeroute-ui-read-only-mode.mjs +15 -0
  154. package/fesm2022/forgeroute-ui-read-only-mode.mjs.map +1 -0
  155. package/fesm2022/forgeroute-ui-readonly-fieldset.mjs +146 -0
  156. package/fesm2022/forgeroute-ui-readonly-fieldset.mjs.map +1 -0
  157. package/fesm2022/forgeroute-ui-reminder-alerts.mjs +249 -0
  158. package/fesm2022/forgeroute-ui-reminder-alerts.mjs.map +1 -0
  159. package/fesm2022/forgeroute-ui-search-input.mjs +373 -0
  160. package/fesm2022/forgeroute-ui-search-input.mjs.map +1 -0
  161. package/fesm2022/forgeroute-ui-section-header.mjs +296 -0
  162. package/fesm2022/forgeroute-ui-section-header.mjs.map +1 -0
  163. package/fesm2022/forgeroute-ui-select.mjs +498 -0
  164. package/fesm2022/forgeroute-ui-select.mjs.map +1 -0
  165. package/fesm2022/forgeroute-ui-setup.mjs +4649 -0
  166. package/fesm2022/forgeroute-ui-setup.mjs.map +1 -0
  167. package/fesm2022/forgeroute-ui-share-menu.mjs +461 -0
  168. package/fesm2022/forgeroute-ui-share-menu.mjs.map +1 -0
  169. package/fesm2022/forgeroute-ui-shell.mjs +981 -0
  170. package/fesm2022/forgeroute-ui-shell.mjs.map +1 -0
  171. package/fesm2022/forgeroute-ui-show.mjs +129 -0
  172. package/fesm2022/forgeroute-ui-show.mjs.map +1 -0
  173. package/fesm2022/forgeroute-ui-sidebar-layout.mjs +355 -0
  174. package/fesm2022/forgeroute-ui-sidebar-layout.mjs.map +1 -0
  175. package/fesm2022/forgeroute-ui-skeleton.mjs +152 -0
  176. package/fesm2022/forgeroute-ui-skeleton.mjs.map +1 -0
  177. package/fesm2022/forgeroute-ui-skip-link.mjs +129 -0
  178. package/fesm2022/forgeroute-ui-skip-link.mjs.map +1 -0
  179. package/fesm2022/forgeroute-ui-snackbar.mjs +200 -0
  180. package/fesm2022/forgeroute-ui-snackbar.mjs.map +1 -0
  181. package/fesm2022/forgeroute-ui-square.mjs +17 -3
  182. package/fesm2022/forgeroute-ui-square.mjs.map +1 -1
  183. package/fesm2022/forgeroute-ui-stack.mjs +233 -0
  184. package/fesm2022/forgeroute-ui-stack.mjs.map +1 -0
  185. package/fesm2022/forgeroute-ui-stacked-bar.mjs +200 -0
  186. package/fesm2022/forgeroute-ui-stacked-bar.mjs.map +1 -0
  187. package/fesm2022/forgeroute-ui-stacking-plan.mjs +365 -0
  188. package/fesm2022/forgeroute-ui-stacking-plan.mjs.map +1 -0
  189. package/fesm2022/forgeroute-ui-star-rating.mjs +498 -0
  190. package/fesm2022/forgeroute-ui-star-rating.mjs.map +1 -0
  191. package/fesm2022/forgeroute-ui-star.mjs +184 -0
  192. package/fesm2022/forgeroute-ui-star.mjs.map +1 -0
  193. package/fesm2022/forgeroute-ui-stepper.mjs +615 -0
  194. package/fesm2022/forgeroute-ui-stepper.mjs.map +1 -0
  195. package/fesm2022/forgeroute-ui-stripe.mjs +16 -3
  196. package/fesm2022/forgeroute-ui-stripe.mjs.map +1 -1
  197. package/fesm2022/forgeroute-ui-swatch-picker.mjs +416 -0
  198. package/fesm2022/forgeroute-ui-swatch-picker.mjs.map +1 -0
  199. package/fesm2022/forgeroute-ui-table-toolbar.mjs +770 -0
  200. package/fesm2022/forgeroute-ui-table-toolbar.mjs.map +1 -0
  201. package/fesm2022/forgeroute-ui-table-types.mjs +277 -0
  202. package/fesm2022/forgeroute-ui-table-types.mjs.map +1 -0
  203. package/fesm2022/forgeroute-ui-text-input.mjs +1003 -0
  204. package/fesm2022/forgeroute-ui-text-input.mjs.map +1 -0
  205. package/fesm2022/forgeroute-ui-text-template-picker.mjs +356 -0
  206. package/fesm2022/forgeroute-ui-text-template-picker.mjs.map +1 -0
  207. package/fesm2022/forgeroute-ui-text.mjs +195 -0
  208. package/fesm2022/forgeroute-ui-text.mjs.map +1 -0
  209. package/fesm2022/forgeroute-ui-textarea-input.mjs +542 -0
  210. package/fesm2022/forgeroute-ui-textarea-input.mjs.map +1 -0
  211. package/fesm2022/forgeroute-ui-time-input.mjs +401 -0
  212. package/fesm2022/forgeroute-ui-time-input.mjs.map +1 -0
  213. package/fesm2022/forgeroute-ui-timeline.mjs +549 -0
  214. package/fesm2022/forgeroute-ui-timeline.mjs.map +1 -0
  215. package/fesm2022/forgeroute-ui-toast.mjs +507 -0
  216. package/fesm2022/forgeroute-ui-toast.mjs.map +1 -0
  217. package/fesm2022/forgeroute-ui-toggle-badge.mjs +177 -0
  218. package/fesm2022/forgeroute-ui-toggle-badge.mjs.map +1 -0
  219. package/fesm2022/forgeroute-ui-toggle.mjs +275 -0
  220. package/fesm2022/forgeroute-ui-toggle.mjs.map +1 -0
  221. package/fesm2022/forgeroute-ui-tooltip.mjs +155 -0
  222. package/fesm2022/forgeroute-ui-tooltip.mjs.map +1 -0
  223. package/fesm2022/forgeroute-ui-utils.mjs +1071 -0
  224. package/fesm2022/forgeroute-ui-utils.mjs.map +1 -0
  225. package/fesm2022/forgeroute-ui.mjs +105 -70663
  226. package/package.json +417 -1
  227. package/types/forgeroute-ui-action-bar.d.ts +74 -0
  228. package/types/forgeroute-ui-address-input.d.ts +354 -0
  229. package/types/forgeroute-ui-alert.d.ts +89 -0
  230. package/types/forgeroute-ui-avatar.d.ts +85 -0
  231. package/types/forgeroute-ui-badge.d.ts +45 -0
  232. package/types/forgeroute-ui-bar-row.d.ts +90 -0
  233. package/types/forgeroute-ui-boards.d.ts +575 -0
  234. package/types/forgeroute-ui-bulk-eligible.d.ts +53 -0
  235. package/types/forgeroute-ui-business-hours.d.ts +191 -0
  236. package/types/forgeroute-ui-calendar.d.ts +544 -0
  237. package/types/forgeroute-ui-card-list-item.d.ts +186 -0
  238. package/types/forgeroute-ui-charts.d.ts +1 -1
  239. package/types/forgeroute-ui-checkbox.d.ts +270 -0
  240. package/types/forgeroute-ui-chip.d.ts +125 -0
  241. package/types/forgeroute-ui-color-input.d.ts +160 -0
  242. package/types/forgeroute-ui-column-filter.d.ts +130 -0
  243. package/types/forgeroute-ui-columns.d.ts +150 -0
  244. package/types/forgeroute-ui-combobox.d.ts +252 -0
  245. package/types/forgeroute-ui-confirm.d.ts +34 -0
  246. package/types/forgeroute-ui-contact-picker.d.ts +173 -0
  247. package/types/forgeroute-ui-conversations.d.ts +993 -0
  248. package/types/forgeroute-ui-copy-field.d.ts +122 -0
  249. package/types/forgeroute-ui-data-table-core.d.ts +1221 -0
  250. package/types/forgeroute-ui-date-input.d.ts +101 -0
  251. package/types/forgeroute-ui-date-range-picker.d.ts +109 -0
  252. package/types/forgeroute-ui-datetime-input.d.ts +97 -0
  253. package/types/forgeroute-ui-detail-card.d.ts +252 -0
  254. package/types/forgeroute-ui-discount-selector.d.ts +57 -0
  255. package/types/forgeroute-ui-divider.d.ts +40 -0
  256. package/types/forgeroute-ui-dropdown.d.ts +156 -0
  257. package/types/forgeroute-ui-editor.d.ts +873 -0
  258. package/types/forgeroute-ui-empty-state.d.ts +29 -0
  259. package/types/forgeroute-ui-error-state.d.ts +38 -0
  260. package/types/forgeroute-ui-error.d.ts +29 -0
  261. package/types/forgeroute-ui-fade.d.ts +39 -0
  262. package/types/forgeroute-ui-file-input.d.ts +337 -0
  263. package/types/forgeroute-ui-fixed-footer.d.ts +53 -0
  264. package/types/forgeroute-ui-form-row.d.ts +30 -0
  265. package/types/forgeroute-ui-form-section.d.ts +18 -0
  266. package/types/forgeroute-ui-form.d.ts +68 -0
  267. package/types/forgeroute-ui-hint.d.ts +10 -0
  268. package/types/forgeroute-ui-icon-picker.d.ts +122 -0
  269. package/types/forgeroute-ui-icon.d.ts +95 -0
  270. package/types/forgeroute-ui-image-preview.d.ts +88 -0
  271. package/types/forgeroute-ui-keypad.d.ts +73 -0
  272. package/types/forgeroute-ui-kpi-card.d.ts +161 -0
  273. package/types/forgeroute-ui-language-switcher.d.ts +41 -0
  274. package/types/forgeroute-ui-layout.d.ts +13 -0
  275. package/types/forgeroute-ui-list-item.d.ts +253 -0
  276. package/types/forgeroute-ui-list.d.ts +282 -0
  277. package/types/forgeroute-ui-live-region.d.ts +49 -0
  278. package/types/forgeroute-ui-map.d.ts +1 -1
  279. package/types/forgeroute-ui-maps.d.ts +1 -1
  280. package/types/forgeroute-ui-media.d.ts +1221 -0
  281. package/types/forgeroute-ui-messaging.d.ts +11 -6
  282. package/types/forgeroute-ui-more-menu.d.ts +91 -0
  283. package/types/forgeroute-ui-multi-select.d.ts +119 -0
  284. package/types/forgeroute-ui-notes.d.ts +172 -0
  285. package/types/forgeroute-ui-notification-bell.d.ts +135 -0
  286. package/types/forgeroute-ui-offline-banner.d.ts +44 -0
  287. package/types/forgeroute-ui-option-card.d.ts +106 -0
  288. package/types/forgeroute-ui-page.d.ts +115 -0
  289. package/types/forgeroute-ui-pagination.d.ts +55 -0
  290. package/types/forgeroute-ui-panel-info-list.d.ts +147 -0
  291. package/types/forgeroute-ui-password-requirements.d.ts +89 -0
  292. package/types/forgeroute-ui-payments.d.ts +1818 -0
  293. package/types/forgeroute-ui-pdf.d.ts +1 -1
  294. package/types/forgeroute-ui-phone-number-picker.d.ts +199 -0
  295. package/types/forgeroute-ui-pill-tabs.d.ts +208 -0
  296. package/types/forgeroute-ui-print.d.ts +40 -0
  297. package/types/forgeroute-ui-progress-bar.d.ts +88 -0
  298. package/types/forgeroute-ui-progress-ring.d.ts +102 -0
  299. package/types/forgeroute-ui-quick-filter-tabs.d.ts +51 -0
  300. package/types/forgeroute-ui-quickbooks.d.ts +6 -3
  301. package/types/forgeroute-ui-radio-matrix.d.ts +131 -0
  302. package/types/forgeroute-ui-radio.d.ts +311 -0
  303. package/types/forgeroute-ui-read-only-mode.d.ts +26 -0
  304. package/types/forgeroute-ui-readonly-fieldset.d.ts +62 -0
  305. package/types/forgeroute-ui-reminder-alerts.d.ts +71 -0
  306. package/types/forgeroute-ui-search-input.d.ts +93 -0
  307. package/types/forgeroute-ui-section-header.d.ts +149 -0
  308. package/types/forgeroute-ui-select.d.ts +183 -0
  309. package/types/forgeroute-ui-setup.d.ts +775 -0
  310. package/types/forgeroute-ui-share-menu.d.ts +99 -0
  311. package/types/forgeroute-ui-shell.d.ts +173 -0
  312. package/types/forgeroute-ui-show.d.ts +40 -0
  313. package/types/forgeroute-ui-sidebar-layout.d.ts +161 -0
  314. package/types/forgeroute-ui-skeleton.d.ts +51 -0
  315. package/types/forgeroute-ui-skip-link.d.ts +51 -0
  316. package/types/forgeroute-ui-snackbar.d.ts +50 -0
  317. package/types/forgeroute-ui-square.d.ts +5 -3
  318. package/types/forgeroute-ui-stack.d.ts +99 -0
  319. package/types/forgeroute-ui-stacked-bar.d.ts +84 -0
  320. package/types/forgeroute-ui-stacking-plan.d.ts +116 -0
  321. package/types/forgeroute-ui-star-rating.d.ts +151 -0
  322. package/types/forgeroute-ui-star.d.ts +46 -0
  323. package/types/forgeroute-ui-stepper.d.ts +273 -0
  324. package/types/forgeroute-ui-stripe.d.ts +4 -2
  325. package/types/forgeroute-ui-swatch-picker.d.ts +118 -0
  326. package/types/forgeroute-ui-table-toolbar.d.ts +116 -0
  327. package/types/forgeroute-ui-table-types.d.ts +624 -0
  328. package/types/forgeroute-ui-text-input.d.ts +359 -0
  329. package/types/forgeroute-ui-text-template-picker.d.ts +100 -0
  330. package/types/forgeroute-ui-text.d.ts +76 -0
  331. package/types/forgeroute-ui-textarea-input.d.ts +174 -0
  332. package/types/forgeroute-ui-time-input.d.ts +105 -0
  333. package/types/forgeroute-ui-timeline.d.ts +196 -0
  334. package/types/forgeroute-ui-toast.d.ts +131 -0
  335. package/types/forgeroute-ui-toggle-badge.d.ts +64 -0
  336. package/types/forgeroute-ui-toggle.d.ts +92 -0
  337. package/types/forgeroute-ui-tooltip.d.ts +36 -0
  338. package/types/forgeroute-ui-utils.d.ts +210 -0
  339. package/types/forgeroute-ui.d.ts +106 -19539
  340. package/fesm2022/forgeroute-ui.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forgeroute-ui-notes.mjs","names":[],"sources":["../../../projects/forgeroute-ui/notes/src/lib/notes/notes.component.ts"],"sourcesContent":["import { Component, ChangeDetectionStrategy, DestroyRef, computed, inject, input, output, signal, effect, untracked } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { HttpClient } from '@angular/common/http';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ButtonComponent } from '@forgeroute/ui/core';\nimport { ModalComponent } from '@forgeroute/ui/core';\nimport { EmptyStateComponent } from '@forgeroute/ui/empty-state';\nimport { PaginationComponent } from '@forgeroute/ui/pagination';\nimport { AvatarComponent } from '@forgeroute/ui/avatar';\nimport { TextareaInputComponent } from '@forgeroute/ui/textarea-input';\nimport { IconComponent } from '@forgeroute/ui/icon';\nimport { ToastService } from '@forgeroute/ui/core';\nimport { getErrorMessage } from '@forgeroute/ui/core';\nimport { FORGEROUTE_CONFIG } from '@forgeroute/ui/core';\nimport { UiLabelsService } from '@forgeroute/ui/core';\nimport { LiveRegionComponent } from '@forgeroute/ui/live-region';\nimport { QueuedNote, UI_NOTES_QUEUE } from '@forgeroute/ui/core';\n\n/** A note as the notes API returns it. */\nexport interface NoteItem {\n id: string;\n body: string;\n createdByName: string;\n createdAt: string;\n updatedAt: string;\n}\n\n/** A note as listed: a server note, or one saved on the device (`queued`) that the server does not have yet / has a pending change for. */\ninterface NoteView extends NoteItem {\n queued?: { kind: QueuedNote['kind']; state: QueuedNote['state'] };\n}\n\ninterface NotePage {\n content: NoteItem[];\n totalElements: number;\n totalPages: number;\n page?: number;\n /** Spring's name for the page index; used when `page` is absent. */\n number?: number;\n size: number;\n}\n\n/**\n * Longest note body, in characters, counted AFTER trimming. Matches the backend `NoteController` cap (10000 after trim; the server trims first,\n * so leading / trailing spaces never count). The add box and the edit box block Add Note / Save above it and show \"Too long (max 10000 characters).\".\n */\nexport const NOTES_MAX_LENGTH = 10000;\n\n/** Which state is the \"worst\" when several saved changes belong to one note. */\nconst STATE_RANK: Record<QueuedNote['state'], number> = { waiting: 1, sending: 2, failed: 3, conflict: 4 };\n\n/** Notes shown per page (the size sent as `?size=`). */\nconst NOTES_PAGE_SIZE = 5;\n\n/**\n * Notes for one record: a soft \"Add a note\" panel, then one clean card per note (author avatar, name, date, edit / delete icons, the text),\n * inline edit and a delete confirmation. Notes are listed 5 per page in the server's order. It talks to the notes API itself, so a page only names the record:\n *\n * <ui-notes resourceType=\"contact\" [resourceId]=\"contactId\" [readOnly]=\"!canEdit()\" (totalChange)=\"notesTotal.set($event)\" />\n *\n * API (under `FORGEROUTE_CONFIG.baseUrl`, default `/api`):\n * - `GET /notes/{resourceType}/{resourceId}?page=<0-based>&size=5` -> `{ content: NoteItem[], totalElements, totalPages, page, size }`\n * - `POST /notes/{resourceType}/{resourceId}` `{ body }` -> the new note\n * - `PUT /notes/{noteId}` `{ body }` -> the updated note\n * - `DELETE /notes/{noteId}`\n *\n * `readOnly` lists the notes only (no box, no edit / delete). `totalChange` emits the total after every load. Failures show a\n * library toast with the server's message. Put it in a `ui-detail-card`: the card's body padding is the only outer inset.\n * A note may hold at most `NOTES_MAX_LENGTH` (10000) characters after trimming; longer text (typed or pasted) shows the field's\n * \"Too long\" message at once and Add Note / Save stay disabled, so no request is sent.\n * Pagination is the library `ui-pagination` (shown only above one page). Cmd/Ctrl+Enter in the add box adds the note.\n *\n * Offline (optional): when an offline layer provides `UI_NOTES_QUEUE` (`provideOfflineSupport` from `@forgeroute/ui/offline` does), a note added, edited\n * or deleted while offline is shown at once with \"Waiting to send\" (text in the card, announced in a live region), replaced by the real note after the\n * layer delivered it, and marked \"Not sent\" when the change failed or conflicted (it disappears if the user discards it). A note that is waiting has no\n * edit / delete icons. Without a provider nothing of this exists. See `docs/notes-offline.md`.\n */\n@Component({\n selector: 'ui-notes',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [FormsModule, ButtonComponent, ModalComponent, EmptyStateComponent, PaginationComponent, TextareaInputComponent, IconComponent, AvatarComponent, LiveRegionComponent],\n template: `\n @if (!readOnly()) {\n <div class=\"note-add\">\n <ui-textarea-input [ariaLabel]=\"labels.t('notes.addANote')\" [placeholder]=\"labels.t('notes.addANote2')\" [rows]=\"3\" [maxlength]=\"maxLength()\" [showErrors]=\"tooLong(newBody)\" [disabled]=\"saving()\" [(ngModel)]=\"newBody\"\n (keydown.meta.enter)=\"addNote()\" (keydown.control.enter)=\"addNote()\" />\n <div class=\"note-add-footer\">\n <ui-button variant=\"primary\" size=\"sm\" data-testid=\"note-add-btn\" [loading]=\"saving()\" [disabled]=\"!validBody(newBody)\" (click)=\"addNote()\">{{ labels.t('notes.addNote') }}</ui-button>\n </div>\n </div>\n }\n\n @if (queue) {\n <ui-live-region [message]=\"announcement()\" />\n }\n\n @if (offlineLoadFailed() && shown().length > 0) {\n <p class=\"note-offline-hint\" data-testid=\"note-offline-hint\">{{ labels.t('notes.queued.offlineSome') }}</p>\n }\n\n @if (loading() && shown().length === 0) {\n <div class=\"note-loading\" role=\"status\">{{ labels.t('notes.loadingNotes') }}</div>\n } @else if (shown().length === 0 && offlineLoadFailed()) {\n <p class=\"note-offline-hint\" data-testid=\"note-offline-hint\">{{ labels.t('notes.queued.offlineNone') }}</p>\n } @else if (shown().length === 0) {\n <ui-empty-state iconType=\"person\" [title]=\"labels.t('notes.noNotesYet')\" [message]=\"readOnly() ? labels.t('notes.noNotesAdded') : labels.t('notes.addFirstNote')\" />\n } @else {\n <ul class=\"note-list\" [attr.aria-label]=\"labels.t('notes.notes')\">\n @for (note of shown(); track note.id) {\n <li class=\"note-item\" [class.editing]=\"editingId() === note.id\">\n <ui-avatar class=\"note-avatar\" [initials]=\"initials(note.createdByName)\" [name]=\"note.createdByName || labels.t('notes.you')\" [size]=\"32\" />\n <div class=\"note-main\">\n <div class=\"note-head\">\n <span class=\"note-author\">{{ note.createdByName || labels.t('notes.you') }}</span>\n <span class=\"note-dot\" aria-hidden=\"true\">·</span>\n <time class=\"note-date\" [attr.datetime]=\"note.createdAt\">{{ labels.formatDate(note.createdAt, 'MMM d, yyyy h:mm a') }}</time>\n @if (note.updatedAt !== note.createdAt) {\n <span class=\"note-edited\">{{ labels.t('notes.edited') }}</span>\n }\n @if (note.queued; as q) {\n <span class=\"note-queued\" [class.note-queued-bad]=\"q.state === 'failed' || q.state === 'conflict'\" data-testid=\"note-queued\">{{ queuedText(q) }}</span>\n }\n @if (!readOnly() && editingId() !== note.id && !note.queued) {\n <div class=\"note-actions\">\n @if (editable()) {\n <ui-icon name=\"edit\" [size]=\"14\" [tooltip]=\"labels.t('notes.editNote')\" (iconClick)=\"startEdit(note)\" />\n }\n <ui-icon name=\"delete\" variant=\"danger\" [size]=\"14\" [tooltip]=\"labels.t('notes.deleteNote')\" (iconClick)=\"confirmDelete(note.id)\" />\n </div>\n }\n </div>\n @if (editingId() === note.id) {\n <ui-textarea-input [ariaLabel]=\"labels.t('notes.editNote')\" [rows]=\"3\" [maxlength]=\"maxLength()\" [showErrors]=\"tooLong(editBody)\" [disabled]=\"saving()\" [(ngModel)]=\"editBody\" />\n <div class=\"note-item-footer\">\n <ui-button variant=\"secondary\" size=\"sm\" (click)=\"cancelEdit()\">{{ labels.t('common.cancel') }}</ui-button>\n <ui-button variant=\"primary\" size=\"sm\" [loading]=\"saving()\" [disabled]=\"!validBody(editBody)\" (click)=\"saveEdit(note.id)\">{{ labels.t('common.save') }}</ui-button>\n </div>\n } @else {\n <p class=\"note-body\">{{ note.body }}</p>\n }\n </div>\n </li>\n }\n </ul>\n <ui-pagination [page]=\"page() + 1\" [pageSize]=\"pageSize\" [totalItems]=\"totalElements()\" (pageChange)=\"loadPage($event - 1)\" />\n }\n\n <ui-modal [open]=\"!!deletingId()\" [title]=\"labels.t('notes.deleteNote2')\" maxWidth=\"420px\" dialogTestId=\"delete-note-modal\" describedBy=\"ui-note-delete-msg\" (close)=\"deletingId.set(null)\">\n <p class=\"note-delete-msg\" id=\"ui-note-delete-msg\" data-testid=\"delete-note-message\">{{ labels.t('notes.deleteThisNoteItIs') }}</p>\n <ui-button modal-footer-left variant=\"secondary\" size=\"sm\" data-testid=\"delete-note-cancel\" (click)=\"deletingId.set(null)\">{{ labels.t('common.cancel') }}</ui-button>\n <ui-button modal-footer-right variant=\"danger\" size=\"sm\" data-testid=\"delete-note-confirm\" [loading]=\"saving()\" (click)=\"deleteNote()\">{{ labels.t('notes.deleteNote2') }}</ui-button>\n </ui-modal>\n `,\n styles: [`\n :host { display: block; }\n /* Add box: a soft panel above the list */\n .note-add { padding: 14px; margin-bottom: 18px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; }\n .note-add-footer { display: flex; justify-content: flex-end; margin-top: 10px; }\n .note-offline-hint { margin: 0 0 12px; font-size: 0.875rem; color: #475569; }\n .note-loading { padding: 24px 0; font-size: 0.875rem; color: #64748b; text-align: center; }\n /* One soft card per note: avatar, then author / date / actions over the text */\n .note-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }\n .note-item { display: flex; gap: 12px; padding: 14px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; transition: border-color 0.15s, box-shadow 0.15s; }\n @media (hover: hover) { .note-item:hover { border-color: #cbd5e1; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06); } }\n .note-item.editing { background: #f8fafc; border-color: #bfdbfe; }\n @media (prefers-reduced-motion: reduce) { .note-item { transition: none; } }\n .note-avatar { flex-shrink: 0; }\n .note-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }\n .note-head { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; min-height: 28px; }\n .note-author { font-size: 0.875rem; font-weight: 600; color: #0f172a; }\n .note-dot { color: #94a3b8; font-size: 0.75rem; }\n .note-date { font-size: 0.75rem; color: #64748b; } /* 4.76:1 on white (WCAG AA) */\n .note-edited { font-size: 0.75rem; font-style: italic; color: #64748b; }\n /* Saved on this device, not delivered yet: a text pill (never colour alone); the \"not sent\" states add a bold weight and a border */\n .note-queued { font-size: 0.75rem; font-weight: 500; color: #475569; background: #f1f5f9; border: 1px dashed #94a3b8; border-radius: 999px; padding: 1px 8px; }\n .note-queued-bad { color: #991b1b; background: #fef2f2; border: 1px solid #b91c1c; font-weight: 700; }\n .note-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; }\n .note-body { margin: 0; font-size: 0.9375rem; line-height: 1.6; color: #1e293b; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; } /* word-break: Safari < 15.4 has no overflow-wrap: anywhere */\n .note-item-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }\n .note-delete-msg { margin: 0; font-size: 0.9375rem; line-height: 1.5; color: #334155; }\n @media (max-width: 480px) { .note-item { padding: 12px; gap: 10px; } .note-add { padding: 12px; } }\n `],\n})\nexport class NotesComponent {\n protected readonly labels = inject(UiLabelsService);\n /** What the notes belong to, as the API names it: `contact`, `transaction`, `property`, `task`, ... */\n readonly resourceType = input('');\n readonly resourceId = input('');\n /**\n * Resource-specific notes API (optional). When set (e.g. `/permits/42/notes`, relative to `FORGEROUTE_CONFIG.baseUrl`), the component uses it instead of\n * the generic `/notes/{resourceType}/{resourceId}` API and `resourceType` / `resourceId` are not needed:\n * - `GET {basePath}?page=<0-based>&size=5` -> `{ content, totalElements, ... }` (`page` or Spring's `number` is accepted for the page index)\n * - `POST {basePath}` `{ content }` -> the new note\n * - `PUT {basePath}/{noteId}` `{ content }` (only when `editable` is true)\n * - `DELETE {basePath}/{noteId}`\n * A note's text may come as `body` or `content`; a missing `updatedAt` counts as `createdAt` (no \"edited\" tag). Empty (default) = the generic API.\n */\n readonly basePath = input('');\n /** True: list only, no add box, edit or delete. */\n readonly readOnly = input(false);\n /** False hides the edit icon (for APIs without an update endpoint). Default true. */\n readonly editable = input(true);\n /** Longest note, in characters after trimming (default `NOTES_MAX_LENGTH`, 10000). Set it to the API's column size, e.g. 255 for customer notes. */\n readonly maxLength = input(NOTES_MAX_LENGTH);\n /** Total number of notes after every load / add / delete. */\n readonly totalChange = output<number>();\n\n private readonly http = inject(HttpClient);\n private readonly toast = inject(ToastService);\n private readonly destroyRef = inject(DestroyRef);\n private readonly apiBase = inject(FORGEROUTE_CONFIG, { optional: true })?.baseUrl ?? '/api';\n\n readonly pageSize = NOTES_PAGE_SIZE;\n readonly notes = signal<NoteItem[]>([]);\n readonly loading = signal(false);\n readonly saving = signal(false);\n /** 0-based page index, as the server numbers it. */\n readonly page = signal(0);\n readonly totalElements = signal(0);\n readonly editingId = signal<string | null>(null);\n readonly deletingId = signal<string | null>(null);\n\n /** Optional offline layer (see `UI_NOTES_QUEUE`). Absent = every queue-related behaviour below is off. */\n protected readonly queue = inject(UI_NOTES_QUEUE, { optional: true });\n protected readonly announcement = signal('');\n\n /** Saved changes that just left the queue (delivered) and are still shown until the reload that fetches the real data has answered. Each knows its list. */\n private readonly settling = signal<readonly (QueuedNote & { list: string })[]>([]);\n /** Overlay clean-ups waiting for the NEWEST load to answer (an older, superseded load never runs them). */\n private afters: (() => void)[] = [];\n /** Number of the newest load; an answer from an older load is ignored. */\n private loadSeq = 0;\n /** True when the last load failed while the offline layer says we are offline (the list then shows only what is saved on this device). */\n readonly offlineLoadFailed = signal(false);\n\n /**\n * What the list shows: with an offline layer, notes saved on this device are shown right away - new notes first on page 1 (newest first, like the\n * server's order), and a note with a saved edit / delete keeps its place, marked as waiting. Without one it is exactly `notes()`.\n */\n readonly shown = computed((): NoteView[] => {\n const server = this.notes();\n const queue = this.queue;\n if (!queue || !this.ready) return server;\n const list = this.listUrl;\n const settling = this.settling().filter(q => q.list === list).map((q): QueuedNote => ({ ...q, state: 'sending' }));\n const queued = [...queue.queuedFor(this.listUrl, this.itemPrefix), ...settling];\n if (queued.length === 0) return server;\n // Queued adds are shown ABOVE the server page: they do not count in the page size or the pagination total.\n const added: NoteView[] = queued.filter(q => q.kind === 'add' && this.page() === 0)\n .sort((a, b) => b.createdAt - a.createdAt)\n .map(q => ({\n id: `queued-${q.rowId}`, body: q.text, createdByName: '', createdAt: new Date(q.createdAt).toISOString(), updatedAt: new Date(q.createdAt).toISOString(),\n queued: { kind: 'add', state: q.state },\n }));\n // Per loaded note: a delete wins over edits, the latest edit text wins, and the WORST state of its changes is shown.\n const byNote = new Map<string, QueuedNote[]>();\n for (const q of queued) if (q.kind !== 'add') byNote.set(q.noteId, [...(byNote.get(q.noteId) ?? []), q]);\n const existing = server.map((n): NoteView => {\n const changes = byNote.get(n.id);\n if (!changes) return n;\n const del = changes.some(c => c.kind === 'delete');\n const lastEdit = [...changes].reverse().find(c => c.kind === 'edit');\n const state = changes.reduce((worst, c) => (STATE_RANK[c.state] > STATE_RANK[worst] ? c.state : worst), changes[0].state);\n return { ...n, body: del || !lastEdit ? n.body : lastEdit.text, queued: { kind: del ? 'delete' : 'edit', state } };\n });\n return [...added, ...existing];\n });\n\n newBody = '';\n editBody = '';\n\n /** Up to two initials of the author's name for the avatar (\"Ana Lopez\" -> \"AL\"); \"Y\" for the current user's own unnamed notes. */\n protected initials(name: string): string {\n const parts = (name || this.labels.t('notes.you')).trim().split(/\\s+/).filter(Boolean);\n return ((parts[0]?.[0] ?? '') + (parts.length > 1 ? parts[parts.length - 1][0] : '')).toUpperCase();\n }\n\n /** True when the trimmed text is longer than the limit. */\n protected tooLong(text: string): boolean { return text.trim().length > this.maxLength(); }\n\n /** True when the trimmed text is not empty and within the limit. */\n protected validBody(text: string): boolean { const n = text.trim().length; return n > 0 && n <= this.maxLength(); }\n\n private get listUrl() { return this.basePath() ? `${this.apiBase}${this.basePath()}` : `${this.apiBase}/notes/${this.resourceType()}/${this.resourceId()}`; }\n private noteUrl(id: string) { const e = encodeURIComponent(id); return this.basePath() ? `${this.apiBase}${this.basePath()}/${e}` : `${this.apiBase}/notes/${e}`; }\n /** The URL of one note up to its id (`.../notes/` or `<basePath>/`). */\n private get itemPrefix() { return this.basePath() ? `${this.apiBase}${this.basePath()}/` : `${this.apiBase}/notes/`; }\n private get ready() { return !!this.basePath() || (!!this.resourceType() && !!this.resourceId()); }\n /** Request body for create / update: `{ content }` for a `basePath` API, `{ body }` for the generic one. */\n private payload(text: string) { return this.basePath() ? { content: text.trim() } : { body: text.trim() }; }\n /** Accepts `body` or `content` as the text and a missing `updatedAt`. */\n private normalize(n: NoteItem & { content?: string }): NoteItem {\n return { ...n, body: n.body ?? n.content ?? '', updatedAt: n.updatedAt ?? n.createdAt };\n }\n\n constructor() {\n const queue = this.queue;\n if (queue) {\n // A saved change left the queue. If the user discarded it, it just disappears. Otherwise it was delivered: reload at once and keep showing it\n // (as \"Sending…\") until that load has answered, so it neither flashes away, shows old text, nor appears twice.\n let known = new Map<string, QueuedNote>();\n let knownList = '';\n effect(() => {\n if (!this.ready) return;\n const list = this.listUrl;\n const now = new Map(queue.queuedFor(list, this.itemPrefix).map(q => [q.rowId, q] as const));\n const before = known;\n const sameList = list === knownList;\n known = now;\n knownList = list;\n if (!sameList) {\n // Another list: nothing of the old one may be shown, and its pending clean-ups are void (the new load replaces it).\n untracked(() => { this.settling.set([]); this.afters = []; });\n return;\n }\n const gone = [...before.values()].filter(q => !now.has(q.rowId) && !queue.wasDiscarded(q.rowId));\n if (gone.length === 0) return;\n untracked(() => {\n this.settling.update(s => [...s, ...gone.map(g => ({ ...g, list }))]);\n const ids = new Set(gone.map(g => g.rowId));\n this.loadPage(this.page(), () => this.settling.update(s => s.filter(q => !ids.has(q.rowId))));\n });\n });\n // A saved change that could not be sent is announced once per state it enters (a row that is retried and fails again is announced again).\n const flagged = new Set<string>();\n effect(() => {\n const bad = this.ready ? queue.queuedFor(this.listUrl, this.itemPrefix).filter(q => q.state === 'failed' || q.state === 'conflict') : [];\n const keys = new Set(bad.map(q => `${q.rowId}:${q.state}`));\n for (const k of [...flagged]) if (!keys.has(k)) flagged.delete(k);\n const fresh = [...keys].filter(k => !flagged.has(k));\n for (const k of keys) flagged.add(k);\n if (fresh.length > 0) untracked(() => this.announce(this.labels.t('notes.queued.problemAnnounce')));\n });\n }\n effect(() => {\n const id = this.resourceId();\n const type = this.resourceType();\n const base = this.basePath();\n if (base || (id && type)) untracked(() => this.loadPage(0));\n else untracked(() => {\n // The record went away (inputs emptied) while a load may be in flight: that answer belongs to the old list and must be ignored.\n this.loadSeq++; this.settling.set([]); this.afters = []; this.loading.set(false);\n });\n });\n }\n\n /** The label under a queued note: what is waiting and why it may be stuck (text, not colour alone). */\n protected queuedText(q: { kind: QueuedNote['kind']; state: QueuedNote['state'] }): string {\n if (q.state === 'failed') return this.labels.t('notes.queued.failed');\n if (q.state === 'conflict') return this.labels.t('notes.queued.conflict');\n if (q.kind === 'delete') return this.labels.t(q.state === 'sending' ? 'notes.queued.deleteSending' : 'notes.queued.deleteWaiting');\n return this.labels.t(q.state === 'sending' ? 'notes.queued.sending' : 'notes.queued.waiting');\n }\n\n /** Says it in the live region; clears first so the same words twice in a row are read twice. */\n private announce(message: string) {\n this.announcement.set('');\n queueMicrotask(() => this.announcement.set(message));\n }\n\n /** True when the answer is the offline layer's \"saved on this device\" reply (and an offline layer is present). */\n private savedOffline(res: unknown): boolean {\n return !!this.queue && !!res && typeof res === 'object' && (res as { _offline?: unknown })._offline === true;\n }\n\n /**\n * Loads one page. Only the NEWEST load's answer is applied (an older answer arriving late is ignored, so stale data never overwrites newer data and\n * `loading` stays true until the latest answer). `after` (overlay clean-up of delivered changes) runs when the newest load has answered - also when\n * a later load superseded the one it was given to, so the overlay drops in the same render the replacing data arrives.\n */\n loadPage(p: number, after?: () => void) {\n if (!this.ready) return;\n const seq = ++this.loadSeq;\n if (after) this.afters.push(after);\n this.loading.set(true);\n const finish = () => { const run = this.afters; this.afters = []; run.forEach(fn => fn()); };\n this.http.get<NotePage>(`${this.listUrl}?page=${p}&size=${this.pageSize}`).pipe(takeUntilDestroyed(this.destroyRef)).subscribe({\n next: (res) => {\n if (seq !== this.loadSeq) return;\n this.notes.set(res.content.map(n => this.normalize(n)));\n this.page.set(res.page ?? res.number ?? p);\n this.totalElements.set(res.totalElements);\n this.loading.set(false);\n this.offlineLoadFailed.set(false);\n this.totalChange.emit(res.totalElements);\n finish();\n },\n error: (err) => {\n if (seq !== this.loadSeq) return;\n this.loading.set(false);\n const offline = !!this.queue?.offline();\n this.offlineLoadFailed.set(offline);\n // A reload that follows a delivery also fails quietly when the user was signed out meanwhile (401 / 403): the sign-in flow takes over.\n const afterDelivery = this.afters.length > 0 && [401, 403].includes((err as { status?: number })?.status ?? 0);\n if (!offline && !afterDelivery) this.toast.error(getErrorMessage(err, 'notes'));\n finish();\n },\n });\n }\n\n addNote() {\n if (this.readOnly() || !this.validBody(this.newBody) || this.saving()) return;\n this.saving.set(true);\n this.http.post<NoteItem>(this.listUrl, this.payload(this.newBody)).pipe(takeUntilDestroyed(this.destroyRef)).subscribe({\n next: (res) => {\n this.newBody = ''; this.saving.set(false);\n if (this.savedOffline(res)) { this.announce(this.labels.t('notes.queued.addedAnnounce')); return; }\n this.loadPage(0);\n },\n error: (err) => { this.saving.set(false); this.toast.error(getErrorMessage(err, 'note', 'create')); },\n });\n }\n\n startEdit(note: NoteItem) {\n if (this.readOnly() || !this.editable()) return;\n this.editingId.set(note.id);\n this.editBody = note.body;\n }\n\n cancelEdit() {\n this.editingId.set(null);\n this.editBody = '';\n }\n\n saveEdit(noteId: string) {\n if (this.readOnly() || !this.editable() || !this.validBody(this.editBody) || this.saving()) return;\n this.saving.set(true);\n this.http.put<NoteItem>(this.noteUrl(noteId), this.payload(this.editBody)).pipe(takeUntilDestroyed(this.destroyRef)).subscribe({\n next: (updated) => {\n if (this.savedOffline(updated)) {\n this.editingId.set(null);\n this.saving.set(false);\n this.announce(this.labels.t('notes.queued.editedAnnounce'));\n return;\n }\n this.notes.update(arr => arr.map(n => (n.id === noteId ? this.normalize(updated) : n)));\n this.editingId.set(null);\n this.saving.set(false);\n },\n error: (err) => { this.saving.set(false); this.toast.error(getErrorMessage(err, 'note', 'update')); },\n });\n }\n\n confirmDelete(id: string) {\n if (this.readOnly()) return;\n this.deletingId.set(id);\n }\n\n deleteNote() {\n const id = this.deletingId();\n if (this.readOnly() || !id || this.saving()) return;\n this.saving.set(true);\n this.http.delete(this.noteUrl(id)).pipe(takeUntilDestroyed(this.destroyRef)).subscribe({\n next: (res) => {\n this.deletingId.set(null);\n this.saving.set(false);\n if (this.savedOffline(res)) { this.announce(this.labels.t('notes.queued.deletedAnnounce')); return; }\n this.loadPage(this.notes().length === 1 && this.page() > 0 ? this.page() - 1 : this.page());\n },\n error: (err) => { this.deletingId.set(null); this.saving.set(false); this.toast.error(getErrorMessage(err, 'note', 'delete')); },\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;AA8CA,MAAa,mBAAmB;AAGhC,MAAM,aAAkD;CAAE,SAAS;CAAG,SAAS;CAAG,QAAQ;CAAG,UAAU;AAAC;AAGxG,MAAM,kBAAkB;AAoIxB,IAAa,iBAAb,MAAa,eAAc;CAyFf,SAAS,MAAY;EAC7B,MAAM,SAAS,QAAQ,KAAK,OAAO,EAAE,WAAW,EAAA,CAAG,KAAI,CAAE,CAAC,MAAM,KAAK,CAAC,CAAC,OAAO,OAAO;EACrF,SAAS,MAAM,EAAE,GAAG,MAAM,OAAO,MAAM,SAAS,IAAI,MAAM,MAAM,SAAS,EAAE,CAAC,KAAK,IAAA,CAAK,YAAW;CACnG;CAGU,QAAQ,MAAY;EAAa,OAAO,KAAK,KAAI,CAAE,CAAC,SAAS,KAAK,UAAS;CAAI;CAG/E,UAAU,MAAY;EAAa,MAAM,IAAI,KAAK,KAAI,CAAE,CAAC;EAAQ,OAAO,IAAI,KAAK,KAAK,KAAK,UAAS;CAAI;CAElH,IAAY,UAAO;EAAK,OAAO,KAAK,SAAQ,IAAK,GAAG,KAAK,UAAU,KAAK,SAAQ,MAAO,GAAG,KAAK,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,MAAE;KAAe,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;MAAA;KAAA;KAAA,SAAA,CAAA,aAAA,YAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MAAE;KAAmB,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;MAAA;KAAA;IAAA;GAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AAuGlK,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAc,YAAA,CAAA;EA3G1B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAU,YACR;GAAI,iBACC,wBAAwB;GAAM,SACtC;IAAC;IAAa;IAAiB;IAAgB;IAAqB;IAAqB;IAAwB;IAAe;IAAiB;GAAmB;GAAC,UACpK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuET,QAAA,CAAA,20DAAA;EAAA,CAAA"}
@@ -0,0 +1,587 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, computed, effect, inject, input, model, output, signal, untracked } from "@angular/core";
3
+ import { ButtonComponent, SidePanelComponent, UiLabelsService } from "@forgeroute/ui/core";
4
+ import { LiveRegionComponent } from "@forgeroute/ui/live-region";
5
+ import { BadgeComponent } from "@forgeroute/ui/badge";
6
+ import { EmptyStateComponent } from "@forgeroute/ui/empty-state";
7
+ import { ErrorStateComponent } from "@forgeroute/ui/error-state";
8
+ import { IconComponent } from "@forgeroute/ui/icon";
9
+ import { ListItemComponent } from "@forgeroute/ui/list-item";
10
+ import { SkeletonComponent } from "@forgeroute/ui/skeleton";
11
+ import { StackComponent } from "@forgeroute/ui/stack";
12
+ var NotificationBellComponent = class NotificationBellComponent {
13
+ constructor() {
14
+ this.items = input([], ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
15
+ this.unreadCount = input(0, ...ngDevMode ? [{ debugName: "unreadCount" }] : /* istanbul ignore next */ []);
16
+ this.loading = input(false, ...ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []);
17
+ this.loadingMore = input(false, ...ngDevMode ? [{ debugName: "loadingMore" }] : /* istanbul ignore next */ []);
18
+ this.error = input("", ...ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []);
19
+ this.hasMore = input(false, ...ngDevMode ? [{ debugName: "hasMore" }] : /* istanbul ignore next */ []);
20
+ this.ariaLabelInput = input(null, {
21
+ ...ngDevMode ? { debugName: "ariaLabelInput" } : /* istanbul ignore next */ {},
22
+ alias: "ariaLabel"
23
+ });
24
+ this.panelTitleInput = input(null, {
25
+ ...ngDevMode ? { debugName: "panelTitleInput" } : /* istanbul ignore next */ {},
26
+ alias: "panelTitle"
27
+ });
28
+ this.emptyMessageInput = input(null, {
29
+ ...ngDevMode ? { debugName: "emptyMessageInput" } : /* istanbul ignore next */ {},
30
+ alias: "emptyMessage"
31
+ });
32
+ this.maxCount = input(99, ...ngDevMode ? [{ debugName: "maxCount" }] : /* istanbul ignore next */ []);
33
+ this.open = model(false, ...ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []);
34
+ this.opened = output();
35
+ this.itemSelect = output();
36
+ this.markRead = output();
37
+ this.markAllRead = output();
38
+ this.loadMore = output();
39
+ this.retry = output();
40
+ this.labels = inject(UiLabelsService);
41
+ this.announcement = signal("", ...ngDevMode ? [{ debugName: "announcement" }] : /* istanbul ignore next */ []);
42
+ this.baseLabel = computed(() => this.ariaLabelInput() ?? this.labels.t("notificationBell.label"), ...ngDevMode ? [{ debugName: "baseLabel" }] : /* istanbul ignore next */ []);
43
+ this.panelTitleText = computed(() => this.panelTitleInput() ?? this.labels.t("notificationBell.label"), ...ngDevMode ? [{ debugName: "panelTitleText" }] : /* istanbul ignore next */ []);
44
+ this.emptyText = computed(() => this.emptyMessageInput() ?? this.labels.t("notificationBell.empty"), ...ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []);
45
+ this.countText = computed(() => this.unreadCount() > this.maxCount() ? `${this.maxCount()}+` : String(this.unreadCount()), ...ngDevMode ? [{ debugName: "countText" }] : /* istanbul ignore next */ []);
46
+ this.triggerLabel = computed(() => this.unreadCount() > 0 ? this.labels.t("notificationBell.labelUnread", {
47
+ label: this.baseLabel(),
48
+ count: this.unreadCount()
49
+ }) : this.baseLabel(), ...ngDevMode ? [{ debugName: "triggerLabel" }] : /* istanbul ignore next */ []);
50
+ this.summaryText = computed(() => this.unreadCount() > 0 ? this.labels.t("notificationBell.unread", { count: this.unreadCount() }) : this.labels.t("notificationBell.allCaughtUp"), ...ngDevMode ? [{ debugName: "summaryText" }] : /* istanbul ignore next */ []);
51
+ this.lastCount = null;
52
+ effect(() => {
53
+ const count = this.unreadCount();
54
+ untracked(() => {
55
+ const previous = this.lastCount;
56
+ this.lastCount = count;
57
+ if (previous === null || previous === count) return;
58
+ this.announcement.set(count === 0 ? this.labels.t("notificationBell.announce.none") : count === 1 ? this.labels.t("notificationBell.announce.one") : this.labels.t("notificationBell.announce.other", { count }));
59
+ });
60
+ });
61
+ }
62
+ toggle() {
63
+ const next = !this.open();
64
+ this.open.set(next);
65
+ if (next) this.opened.emit();
66
+ }
67
+ close() {
68
+ this.open.set(false);
69
+ }
70
+ static {
71
+ this.ɵfac = i0.ɵɵngDeclareFactory({
72
+ minVersion: "12.0.0",
73
+ version: "22.2.2",
74
+ ngImport: i0,
75
+ type: NotificationBellComponent,
76
+ deps: [],
77
+ target: i0.ɵɵFactoryTarget.Component
78
+ });
79
+ }
80
+ static {
81
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
82
+ minVersion: "17.0.0",
83
+ version: "22.2.2",
84
+ type: NotificationBellComponent,
85
+ isStandalone: true,
86
+ selector: "ui-notification-bell",
87
+ inputs: {
88
+ items: {
89
+ classPropertyName: "items",
90
+ publicName: "items",
91
+ isSignal: true,
92
+ isRequired: false,
93
+ transformFunction: null
94
+ },
95
+ unreadCount: {
96
+ classPropertyName: "unreadCount",
97
+ publicName: "unreadCount",
98
+ isSignal: true,
99
+ isRequired: false,
100
+ transformFunction: null
101
+ },
102
+ loading: {
103
+ classPropertyName: "loading",
104
+ publicName: "loading",
105
+ isSignal: true,
106
+ isRequired: false,
107
+ transformFunction: null
108
+ },
109
+ loadingMore: {
110
+ classPropertyName: "loadingMore",
111
+ publicName: "loadingMore",
112
+ isSignal: true,
113
+ isRequired: false,
114
+ transformFunction: null
115
+ },
116
+ error: {
117
+ classPropertyName: "error",
118
+ publicName: "error",
119
+ isSignal: true,
120
+ isRequired: false,
121
+ transformFunction: null
122
+ },
123
+ hasMore: {
124
+ classPropertyName: "hasMore",
125
+ publicName: "hasMore",
126
+ isSignal: true,
127
+ isRequired: false,
128
+ transformFunction: null
129
+ },
130
+ ariaLabelInput: {
131
+ classPropertyName: "ariaLabelInput",
132
+ publicName: "ariaLabel",
133
+ isSignal: true,
134
+ isRequired: false,
135
+ transformFunction: null
136
+ },
137
+ panelTitleInput: {
138
+ classPropertyName: "panelTitleInput",
139
+ publicName: "panelTitle",
140
+ isSignal: true,
141
+ isRequired: false,
142
+ transformFunction: null
143
+ },
144
+ emptyMessageInput: {
145
+ classPropertyName: "emptyMessageInput",
146
+ publicName: "emptyMessage",
147
+ isSignal: true,
148
+ isRequired: false,
149
+ transformFunction: null
150
+ },
151
+ maxCount: {
152
+ classPropertyName: "maxCount",
153
+ publicName: "maxCount",
154
+ isSignal: true,
155
+ isRequired: false,
156
+ transformFunction: null
157
+ },
158
+ open: {
159
+ classPropertyName: "open",
160
+ publicName: "open",
161
+ isSignal: true,
162
+ isRequired: false,
163
+ transformFunction: null
164
+ }
165
+ },
166
+ outputs: {
167
+ open: "openChange",
168
+ opened: "opened",
169
+ itemSelect: "itemSelect",
170
+ markRead: "markRead",
171
+ markAllRead: "markAllRead",
172
+ loadMore: "loadMore",
173
+ retry: "retry"
174
+ },
175
+ ngImport: i0,
176
+ template: `
177
+ <span class="bell-wrap">
178
+ <ui-button variant="icon" [ariaLabel]="triggerLabel()" [ariaExpanded]="open()" data-testid="notification-bell" (click)="toggle()">
179
+ <ui-icon name="bell" [size]="20" [interactive]="false" />
180
+ </ui-button>
181
+ @if (unreadCount() > 0) {
182
+ <ui-badge class="bell-count" aria-hidden="true" [label]="countText()" variant="red" data-testid="notification-count" />
183
+ }
184
+ </span>
185
+ <ui-live-region [message]="announcement()" data-testid="notification-live" />
186
+
187
+ <ui-side-panel [open]="open()" [title]="panelTitleText()" [cancelLabel]="labels.t('notificationBell.close')" (closed)="close()">
188
+ <ui-stack gap="12px">
189
+ <div class="bell-head">
190
+ <span class="bell-summary" data-testid="notification-summary" role="status">{{ summaryText() }}</span>
191
+ <ui-button variant="link" size="sm" [disabled]="unreadCount() === 0" data-testid="notification-mark-all" (click)="markAllRead.emit()">{{ labels.t('notificationBell.markAllRead') }}</ui-button>
192
+ </div>
193
+
194
+ @if (loading() && items().length === 0) {
195
+ <div role="status" aria-busy="true" [attr.aria-label]="labels.t('notificationBell.loading')" data-testid="notification-loading">
196
+ <ui-skeleton [height]="56" [mb]="8" />
197
+ <ui-skeleton [height]="56" [mb]="8" />
198
+ <ui-skeleton [height]="56" />
199
+ </div>
200
+ } @else if (error()) {
201
+ <div data-testid="notification-error"><ui-error-state [message]="error()" [retryLabel]="labels.t('notificationBell.retry')" (retry)="retry.emit()" /></div>
202
+ } @else if (items().length === 0) {
203
+ <ui-empty-state iconType="message" [message]="emptyText()" data-testid="notification-empty" />
204
+ } @else {
205
+ <ui-stack gap="8px" data-testid="notification-list">
206
+ @for (n of items(); track n.id) {
207
+ <ui-list-item [attr.data-testid]="'notification-' + n.id" [bordered]="true" [highlighted]="!n.read" [title]="n.title" [details]="[n.body, n.time]"
208
+ [badge]="n.read ? null : labels.t('notificationBell.new')" badgeVariant="blue" [alwaysShowBadge]="true" [wrapText]="true" (select)="itemSelect.emit(n)">
209
+ @if (!n.read) {
210
+ <ui-button list-item-action variant="secondary" size="xs" [ariaLabel]="labels.t('notificationBell.markReadNamed', { title: n.title })" [attr.data-testid]="'notification-read-' + n.id" (click)="markRead.emit(n)">{{ labels.t('notificationBell.markRead') }}</ui-button>
211
+ }
212
+ </ui-list-item>
213
+ }
214
+ </ui-stack>
215
+ @if (hasMore()) {
216
+ <ui-button variant="secondary" size="sm" [loading]="loadingMore()" data-testid="notification-more" (click)="loadMore.emit()">{{ labels.t('notificationBell.loadMore') }}</ui-button>
217
+ }
218
+ }
219
+ </ui-stack>
220
+ </ui-side-panel>
221
+ `,
222
+ isInline: true,
223
+ styles: [":host{display:inline-flex;position:relative}.bell-wrap{position:relative;display:inline-flex}.bell-count{position:absolute;top:-4px;right:-6px;pointer-events:none}.bell-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.bell-summary{font-size:.8125rem;color:#475569}\n"],
224
+ dependencies: [
225
+ {
226
+ kind: "component",
227
+ type: BadgeComponent,
228
+ selector: "ui-badge",
229
+ inputs: [
230
+ "label",
231
+ "variant",
232
+ "color"
233
+ ]
234
+ },
235
+ {
236
+ kind: "component",
237
+ type: ButtonComponent,
238
+ selector: "ui-button",
239
+ inputs: [
240
+ "variant",
241
+ "routerLink",
242
+ "queryParams",
243
+ "fragment",
244
+ "state",
245
+ "href",
246
+ "target",
247
+ "rel",
248
+ "shortLabel",
249
+ "shortBelow",
250
+ "color",
251
+ "active",
252
+ "size",
253
+ "type",
254
+ "disabled",
255
+ "loading",
256
+ "fullWidth",
257
+ "ariaLabel",
258
+ "ariaExpanded",
259
+ "ariaPressed",
260
+ "ariaDescribedBy",
261
+ "modal-footer-left",
262
+ "modal-footer-right"
263
+ ]
264
+ },
265
+ {
266
+ kind: "component",
267
+ type: EmptyStateComponent,
268
+ selector: "ui-empty-state",
269
+ inputs: [
270
+ "message",
271
+ "title",
272
+ "iconType"
273
+ ]
274
+ },
275
+ {
276
+ kind: "component",
277
+ type: ErrorStateComponent,
278
+ selector: "ui-error-state",
279
+ inputs: [
280
+ "title",
281
+ "message",
282
+ "retryLabel",
283
+ "retrying"
284
+ ],
285
+ outputs: ["retry"]
286
+ },
287
+ {
288
+ kind: "component",
289
+ type: IconComponent,
290
+ selector: "ui-icon",
291
+ inputs: [
292
+ "name",
293
+ "tooltip",
294
+ "ariaLabel",
295
+ "size",
296
+ "variant",
297
+ "disabled",
298
+ "loading",
299
+ "interactive"
300
+ ],
301
+ outputs: ["iconClick"]
302
+ },
303
+ {
304
+ kind: "component",
305
+ type: ListItemComponent,
306
+ selector: "ui-list-item",
307
+ inputs: [
308
+ "leading",
309
+ "inputName",
310
+ "inputId",
311
+ "checked",
312
+ "highlighted",
313
+ "bordered",
314
+ "interactive",
315
+ "alwaysShowBadge",
316
+ "wrapText",
317
+ "disabled",
318
+ "busy",
319
+ "title",
320
+ "badge",
321
+ "badgeVariant",
322
+ "details",
323
+ "icon",
324
+ "iconColor"
325
+ ],
326
+ outputs: ["select"]
327
+ },
328
+ {
329
+ kind: "component",
330
+ type: LiveRegionComponent,
331
+ selector: "ui-live-region",
332
+ inputs: [
333
+ "message",
334
+ "politeness",
335
+ "atomic",
336
+ "visible"
337
+ ]
338
+ },
339
+ {
340
+ kind: "component",
341
+ type: SidePanelComponent,
342
+ selector: "ui-side-panel",
343
+ inputs: [
344
+ "open",
345
+ "title",
346
+ "subtitle",
347
+ "wide",
348
+ "extraWide",
349
+ "cancelLabel",
350
+ "primaryLabel",
351
+ "primaryVariant",
352
+ "primaryLoading",
353
+ "primaryDisabled",
354
+ "cancelTestId",
355
+ "primaryTestId",
356
+ "returnFocusTo"
357
+ ],
358
+ outputs: ["closed", "primaryClick"]
359
+ },
360
+ {
361
+ kind: "component",
362
+ type: SkeletonComponent,
363
+ selector: "ui-skeleton",
364
+ inputs: [
365
+ "height",
366
+ "width",
367
+ "radius",
368
+ "mb",
369
+ "ariaLabel"
370
+ ]
371
+ },
372
+ {
373
+ kind: "component",
374
+ type: StackComponent,
375
+ selector: "ui-stack",
376
+ inputs: [
377
+ "gap",
378
+ "direction",
379
+ "align",
380
+ "justify",
381
+ "wrap",
382
+ "minHeight",
383
+ "width",
384
+ "maxWidth",
385
+ "padding",
386
+ "centered"
387
+ ]
388
+ }
389
+ ],
390
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
391
+ });
392
+ }
393
+ };
394
+ i0.ɵɵngDeclareClassMetadata({
395
+ minVersion: "12.0.0",
396
+ version: "22.2.2",
397
+ ngImport: i0,
398
+ type: NotificationBellComponent,
399
+ decorators: [{
400
+ type: Component,
401
+ args: [{
402
+ selector: "ui-notification-bell",
403
+ standalone: true,
404
+ changeDetection: ChangeDetectionStrategy.OnPush,
405
+ imports: [
406
+ BadgeComponent,
407
+ ButtonComponent,
408
+ EmptyStateComponent,
409
+ ErrorStateComponent,
410
+ IconComponent,
411
+ ListItemComponent,
412
+ LiveRegionComponent,
413
+ SidePanelComponent,
414
+ SkeletonComponent,
415
+ StackComponent
416
+ ],
417
+ template: `
418
+ <span class="bell-wrap">
419
+ <ui-button variant="icon" [ariaLabel]="triggerLabel()" [ariaExpanded]="open()" data-testid="notification-bell" (click)="toggle()">
420
+ <ui-icon name="bell" [size]="20" [interactive]="false" />
421
+ </ui-button>
422
+ @if (unreadCount() > 0) {
423
+ <ui-badge class="bell-count" aria-hidden="true" [label]="countText()" variant="red" data-testid="notification-count" />
424
+ }
425
+ </span>
426
+ <ui-live-region [message]="announcement()" data-testid="notification-live" />
427
+
428
+ <ui-side-panel [open]="open()" [title]="panelTitleText()" [cancelLabel]="labels.t('notificationBell.close')" (closed)="close()">
429
+ <ui-stack gap="12px">
430
+ <div class="bell-head">
431
+ <span class="bell-summary" data-testid="notification-summary" role="status">{{ summaryText() }}</span>
432
+ <ui-button variant="link" size="sm" [disabled]="unreadCount() === 0" data-testid="notification-mark-all" (click)="markAllRead.emit()">{{ labels.t('notificationBell.markAllRead') }}</ui-button>
433
+ </div>
434
+
435
+ @if (loading() && items().length === 0) {
436
+ <div role="status" aria-busy="true" [attr.aria-label]="labels.t('notificationBell.loading')" data-testid="notification-loading">
437
+ <ui-skeleton [height]="56" [mb]="8" />
438
+ <ui-skeleton [height]="56" [mb]="8" />
439
+ <ui-skeleton [height]="56" />
440
+ </div>
441
+ } @else if (error()) {
442
+ <div data-testid="notification-error"><ui-error-state [message]="error()" [retryLabel]="labels.t('notificationBell.retry')" (retry)="retry.emit()" /></div>
443
+ } @else if (items().length === 0) {
444
+ <ui-empty-state iconType="message" [message]="emptyText()" data-testid="notification-empty" />
445
+ } @else {
446
+ <ui-stack gap="8px" data-testid="notification-list">
447
+ @for (n of items(); track n.id) {
448
+ <ui-list-item [attr.data-testid]="'notification-' + n.id" [bordered]="true" [highlighted]="!n.read" [title]="n.title" [details]="[n.body, n.time]"
449
+ [badge]="n.read ? null : labels.t('notificationBell.new')" badgeVariant="blue" [alwaysShowBadge]="true" [wrapText]="true" (select)="itemSelect.emit(n)">
450
+ @if (!n.read) {
451
+ <ui-button list-item-action variant="secondary" size="xs" [ariaLabel]="labels.t('notificationBell.markReadNamed', { title: n.title })" [attr.data-testid]="'notification-read-' + n.id" (click)="markRead.emit(n)">{{ labels.t('notificationBell.markRead') }}</ui-button>
452
+ }
453
+ </ui-list-item>
454
+ }
455
+ </ui-stack>
456
+ @if (hasMore()) {
457
+ <ui-button variant="secondary" size="sm" [loading]="loadingMore()" data-testid="notification-more" (click)="loadMore.emit()">{{ labels.t('notificationBell.loadMore') }}</ui-button>
458
+ }
459
+ }
460
+ </ui-stack>
461
+ </ui-side-panel>
462
+ `,
463
+ styles: [":host{display:inline-flex;position:relative}.bell-wrap{position:relative;display:inline-flex}.bell-count{position:absolute;top:-4px;right:-6px;pointer-events:none}.bell-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.bell-summary{font-size:.8125rem;color:#475569}\n"]
464
+ }]
465
+ }],
466
+ ctorParameters: () => [],
467
+ propDecorators: {
468
+ items: [{
469
+ type: i0.Input,
470
+ args: [{
471
+ isSignal: true,
472
+ alias: "items",
473
+ required: false
474
+ }]
475
+ }],
476
+ unreadCount: [{
477
+ type: i0.Input,
478
+ args: [{
479
+ isSignal: true,
480
+ alias: "unreadCount",
481
+ required: false
482
+ }]
483
+ }],
484
+ loading: [{
485
+ type: i0.Input,
486
+ args: [{
487
+ isSignal: true,
488
+ alias: "loading",
489
+ required: false
490
+ }]
491
+ }],
492
+ loadingMore: [{
493
+ type: i0.Input,
494
+ args: [{
495
+ isSignal: true,
496
+ alias: "loadingMore",
497
+ required: false
498
+ }]
499
+ }],
500
+ error: [{
501
+ type: i0.Input,
502
+ args: [{
503
+ isSignal: true,
504
+ alias: "error",
505
+ required: false
506
+ }]
507
+ }],
508
+ hasMore: [{
509
+ type: i0.Input,
510
+ args: [{
511
+ isSignal: true,
512
+ alias: "hasMore",
513
+ required: false
514
+ }]
515
+ }],
516
+ ariaLabelInput: [{
517
+ type: i0.Input,
518
+ args: [{
519
+ isSignal: true,
520
+ alias: "ariaLabel",
521
+ required: false
522
+ }]
523
+ }],
524
+ panelTitleInput: [{
525
+ type: i0.Input,
526
+ args: [{
527
+ isSignal: true,
528
+ alias: "panelTitle",
529
+ required: false
530
+ }]
531
+ }],
532
+ emptyMessageInput: [{
533
+ type: i0.Input,
534
+ args: [{
535
+ isSignal: true,
536
+ alias: "emptyMessage",
537
+ required: false
538
+ }]
539
+ }],
540
+ maxCount: [{
541
+ type: i0.Input,
542
+ args: [{
543
+ isSignal: true,
544
+ alias: "maxCount",
545
+ required: false
546
+ }]
547
+ }],
548
+ open: [{
549
+ type: i0.Input,
550
+ args: [{
551
+ isSignal: true,
552
+ alias: "open",
553
+ required: false
554
+ }]
555
+ }, {
556
+ type: i0.Output,
557
+ args: ["openChange"]
558
+ }],
559
+ opened: [{
560
+ type: i0.Output,
561
+ args: ["opened"]
562
+ }],
563
+ itemSelect: [{
564
+ type: i0.Output,
565
+ args: ["itemSelect"]
566
+ }],
567
+ markRead: [{
568
+ type: i0.Output,
569
+ args: ["markRead"]
570
+ }],
571
+ markAllRead: [{
572
+ type: i0.Output,
573
+ args: ["markAllRead"]
574
+ }],
575
+ loadMore: [{
576
+ type: i0.Output,
577
+ args: ["loadMore"]
578
+ }],
579
+ retry: [{
580
+ type: i0.Output,
581
+ args: ["retry"]
582
+ }]
583
+ }
584
+ });
585
+ export { NotificationBellComponent };
586
+
587
+ //# sourceMappingURL=forgeroute-ui-notification-bell.mjs.map