@koobiq/components 21.0.0 → 21.1.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 (378) hide show
  1. package/badge/_badge-theme.scss +31 -0
  2. package/breadcrumbs/breadcrumbs.scss +5 -1
  3. package/checkbox/_checkbox-theme.scss +0 -17
  4. package/checkbox/checkbox-tokens.scss +0 -4
  5. package/code-block/_code-block-theme.scss +7 -6
  6. package/code-block/code-block-tokens.scss +8 -4
  7. package/code-block/code-block.scss +54 -32
  8. package/content-panel/content-panel-header.scss +2 -3
  9. package/content-panel/content-panel.scss +3 -0
  10. package/core/selection/pseudo-checkbox/pseudo-checkbox-tokens.scss +0 -2
  11. package/fesm2022/koobiq-components-accordion.mjs +4 -4
  12. package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
  13. package/fesm2022/koobiq-components-actions-panel.mjs +10 -2
  14. package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
  15. package/fesm2022/koobiq-components-app-switcher.mjs +1 -1
  16. package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
  17. package/fesm2022/koobiq-components-badge.mjs +2 -2
  18. package/fesm2022/koobiq-components-badge.mjs.map +1 -1
  19. package/fesm2022/koobiq-components-breadcrumbs.mjs +2 -2
  20. package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
  21. package/fesm2022/koobiq-components-button-toggle.mjs +1 -1
  22. package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
  23. package/fesm2022/koobiq-components-checkbox.mjs +18 -8
  24. package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
  25. package/fesm2022/koobiq-components-clamped-text.mjs +78 -10
  26. package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
  27. package/fesm2022/koobiq-components-code-block.mjs +106 -394
  28. package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
  29. package/fesm2022/koobiq-components-content-panel.mjs +4 -4
  30. package/fesm2022/koobiq-components-content-panel.mjs.map +1 -1
  31. package/fesm2022/koobiq-components-core.mjs +300 -37
  32. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  33. package/fesm2022/koobiq-components-datepicker.mjs +151 -60
  34. package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
  35. package/fesm2022/koobiq-components-divider.mjs +3 -3
  36. package/fesm2022/koobiq-components-divider.mjs.map +1 -1
  37. package/fesm2022/koobiq-components-dropdown.mjs +3 -3
  38. package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
  39. package/fesm2022/koobiq-components-file-upload.mjs +17 -8
  40. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  41. package/fesm2022/koobiq-components-filter-bar.mjs +124 -41
  42. package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
  43. package/fesm2022/koobiq-components-flag.mjs +3 -3
  44. package/fesm2022/koobiq-components-flag.mjs.map +1 -1
  45. package/fesm2022/koobiq-components-form-field.mjs +90 -27
  46. package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
  47. package/fesm2022/koobiq-components-icon.mjs +38 -17
  48. package/fesm2022/koobiq-components-icon.mjs.map +1 -1
  49. package/fesm2022/koobiq-components-inline-edit.mjs +19 -2
  50. package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
  51. package/fesm2022/koobiq-components-input.mjs +76 -17
  52. package/fesm2022/koobiq-components-input.mjs.map +1 -1
  53. package/fesm2022/koobiq-components-list.mjs +1 -1
  54. package/fesm2022/koobiq-components-list.mjs.map +1 -1
  55. package/fesm2022/koobiq-components-modal.mjs +3 -3
  56. package/fesm2022/koobiq-components-modal.mjs.map +1 -1
  57. package/fesm2022/koobiq-components-navbar.mjs +86 -25
  58. package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
  59. package/fesm2022/koobiq-components-notification-center.mjs +4 -4
  60. package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
  61. package/fesm2022/koobiq-components-overflow-items.mjs +116 -38
  62. package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
  63. package/fesm2022/koobiq-components-popover.mjs +86 -7
  64. package/fesm2022/koobiq-components-popover.mjs.map +1 -1
  65. package/fesm2022/koobiq-components-radio.mjs +41 -19
  66. package/fesm2022/koobiq-components-radio.mjs.map +1 -1
  67. package/fesm2022/koobiq-components-search-expandable.mjs +29 -17
  68. package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
  69. package/fesm2022/koobiq-components-select.mjs +49 -12
  70. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  71. package/fesm2022/koobiq-components-sidepanel.mjs +198 -186
  72. package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
  73. package/fesm2022/koobiq-components-splitter.mjs +49 -25
  74. package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
  75. package/fesm2022/koobiq-components-tabs.mjs +30 -11
  76. package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
  77. package/fesm2022/koobiq-components-tags.mjs +1 -1
  78. package/fesm2022/koobiq-components-tags.mjs.map +1 -1
  79. package/fesm2022/koobiq-components-textarea.mjs +28 -11
  80. package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
  81. package/fesm2022/koobiq-components-time-range.mjs +2 -2
  82. package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
  83. package/fesm2022/koobiq-components-timepicker.mjs +71 -16
  84. package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
  85. package/fesm2022/koobiq-components-timezone.mjs +2 -2
  86. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  87. package/fesm2022/koobiq-components-toast.mjs +2 -2
  88. package/fesm2022/koobiq-components-toast.mjs.map +1 -1
  89. package/fesm2022/koobiq-components-toggle.mjs +25 -9
  90. package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
  91. package/fesm2022/koobiq-components-tooltip.mjs +90 -17
  92. package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
  93. package/fesm2022/koobiq-components-top-bar.mjs +27 -7
  94. package/fesm2022/koobiq-components-top-bar.mjs.map +1 -1
  95. package/fesm2022/koobiq-components-tree-select.mjs +24 -9
  96. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  97. package/fesm2022/koobiq-components-tree.mjs +288 -109
  98. package/fesm2022/koobiq-components-tree.mjs.map +1 -1
  99. package/file-upload/_file-upload-theme.scss +0 -12
  100. package/file-upload/file-upload-tokens.scss +0 -1
  101. package/file-upload/file-upload.scss +0 -1
  102. package/filter-bar/_filter-bar-theme.scss +7 -8
  103. package/filter-bar/filter-bar.scss +0 -1
  104. package/filter-bar/pipes/base-pipe.scss +36 -2
  105. package/filter-bar/pipes/pipe-multi-tree-select.scss +27 -0
  106. package/form-field/_fieldset-theme.scss +2 -7
  107. package/form-field/_form-field-theme.scss +9 -22
  108. package/form-field/_hint-theme.scss +20 -0
  109. package/form-field/fieldset-tokens.scss +0 -1
  110. package/form-field/fieldset.scss +0 -3
  111. package/form-field/form-field-tokens.scss +1 -1
  112. package/form-field/form-field.scss +9 -0
  113. package/form-field/hint-tokens.scss +3 -0
  114. package/modal/modal.scss +2 -0
  115. package/navbar/_navbar-item_vertical.scss +48 -2
  116. package/navbar/_navbar-theme.scss +11 -3
  117. package/navbar/navbar-item.scss +17 -0
  118. package/navbar/navbar-tokens.scss +3 -0
  119. package/package.json +4 -4
  120. package/popover/popover.scss +1 -1
  121. package/radio/_radio-theme.scss +0 -30
  122. package/radio/radio-tokens.scss +0 -2
  123. package/schematics/collection.json +94 -89
  124. package/schematics/migrations/accordion-state-saving-default/{index.js → index.cjs} +5 -4
  125. package/schematics/migrations/actions-panel-overlay-container/{index.js → index.cjs} +5 -4
  126. package/schematics/migrations/alert-signals/{index.js → index.cjs} +14 -13
  127. package/schematics/migrations/angular-animations-removal/index.cjs +21 -0
  128. package/schematics/migrations/app-switcher-signals/{index.js → index.cjs} +7 -6
  129. package/schematics/migrations/autocomplete-panel-width-auto/{index.js → index.cjs} +6 -5
  130. package/schematics/migrations/autocomplete-signals/{index.js → index.cjs} +7 -6
  131. package/schematics/migrations/badge-signals/{index.js → index.cjs} +7 -6
  132. package/schematics/migrations/button-state-and-styles/{index.js → index.cjs} +7 -6
  133. package/schematics/migrations/button-supported-colors/{index.js → index.cjs} +7 -6
  134. package/schematics/migrations/button-toggle-signals-and-aria/{index.js → index.cjs} +7 -6
  135. package/schematics/migrations/button-truncation/{index.js → index.cjs} +7 -6
  136. package/schematics/migrations/checkbox-signals/{index.js → index.cjs} +9 -8
  137. package/schematics/migrations/clamped-text-disclosure/{index.js → index.cjs} +5 -4
  138. package/schematics/migrations/code-block-highlight-js-core/README.md +53 -0
  139. package/schematics/migrations/code-block-highlight-js-core/data.cjs +64 -0
  140. package/schematics/migrations/code-block-highlight-js-core/index.cjs +319 -0
  141. package/schematics/migrations/code-block-highlight-js-core/schema.json +20 -0
  142. package/schematics/migrations/code-block-signals/{index.js → index.cjs} +7 -6
  143. package/schematics/migrations/color-signals/index.cjs +20 -0
  144. package/schematics/migrations/core-mixins-removal/index.cjs +18 -0
  145. package/schematics/migrations/css-selectors/{index.js → index.cjs} +4 -3
  146. package/schematics/migrations/datepicker-signals/index.cjs +18 -0
  147. package/schematics/migrations/deprecated-icons/README.md +21 -5
  148. package/schematics/migrations/deprecated-icons/{index.js → index.cjs} +15 -28
  149. package/schematics/migrations/deprecated-icons/schema.json +1 -1
  150. package/schematics/migrations/design-tokens-v4/{index.js → index.cjs} +3 -2
  151. package/schematics/migrations/divider-signals-and-aria/{index.js → index.cjs} +5 -4
  152. package/schematics/migrations/dl-attribute-coercion/{index.js → index.cjs} +7 -6
  153. package/schematics/migrations/dl-standalone-names/{index.js → index.cjs} +11 -10
  154. package/schematics/migrations/dropdown-demote-overlay/{index.js → index.cjs} +7 -6
  155. package/schematics/migrations/dropdown-signals/index.cjs +20 -0
  156. package/schematics/migrations/empty-state-error-color/{index.js → index.cjs} +5 -4
  157. package/schematics/migrations/empty-state-size-attr/{index.js → index.cjs} +6 -5
  158. package/schematics/migrations/file-upload-cva-and-primitives/{index.js → index.cjs} +5 -4
  159. package/schematics/migrations/file-upload-deprecated-outputs/{index.js → index.cjs} +5 -4
  160. package/schematics/migrations/filter-bar-rename-action/{index.js → index.cjs} +5 -4
  161. package/schematics/migrations/filter-bar-signals/{index.js → index.cjs} +16 -15
  162. package/schematics/migrations/filter-bar-state-saving-default/{index.js → index.cjs} +5 -4
  163. package/schematics/migrations/flag-inner-html/{index.js → index.cjs} +5 -4
  164. package/schematics/migrations/form-field-signals/{index.js → index.cjs} +18 -17
  165. package/schematics/migrations/icon-semantics-and-api/{data.js → data.cjs} +4 -4
  166. package/schematics/migrations/icon-semantics-and-api/{index.js → index.cjs} +6 -5
  167. package/schematics/migrations/icons-replacement/README.md +16 -2
  168. package/schematics/migrations/icons-replacement/{index.js → index.cjs} +21 -18
  169. package/schematics/migrations/icons-replacement/schema.json +12 -3
  170. package/schematics/migrations/inline-edit-a11y-and-types/{index.js → index.cjs} +5 -4
  171. package/schematics/migrations/input-number-surface/{index.js → index.cjs} +5 -4
  172. package/schematics/migrations/input-signals/index.cjs +18 -0
  173. package/schematics/migrations/link-deprecated-path/{index.js → index.cjs} +4 -3
  174. package/schematics/migrations/link-signals/{index.js → index.cjs} +5 -4
  175. package/schematics/migrations/list-signals/index.cjs +18 -0
  176. package/schematics/migrations/list-tree-multiple-input/{index.js → index.cjs} +7 -6
  177. package/schematics/migrations/loader-overlay-signals/{index.js → index.cjs} +7 -6
  178. package/schematics/migrations/loader-overlay-size-attr/{index.js → index.cjs} +6 -5
  179. package/schematics/migrations/locale-configuration-providers/{index.js → index.cjs} +5 -4
  180. package/schematics/migrations/mandatory-peer-dependencies/{index.js → index.cjs} +3 -2
  181. package/schematics/migrations/markdown-signals/{index.js → index.cjs} +7 -6
  182. package/schematics/migrations/modal-dialog-semantics/{index.js → index.cjs} +5 -4
  183. package/schematics/migrations/modal-signals/index.cjs +20 -0
  184. package/schematics/migrations/navbar-signals-and-aria/{index.js → index.cjs} +7 -6
  185. package/schematics/migrations/new-icons-pack/README.md +37 -25
  186. package/schematics/migrations/new-icons-pack/{index.js → index.cjs} +29 -38
  187. package/schematics/migrations/new-icons-pack/replacement.json +2 -14
  188. package/schematics/migrations/new-icons-pack/schema.json +3 -3
  189. package/schematics/migrations/notification-center-signals/{index.js → index.cjs} +5 -4
  190. package/schematics/migrations/option-signals/index.cjs +20 -0
  191. package/schematics/migrations/popover-leave-delay/{index.js → index.cjs} +5 -4
  192. package/schematics/migrations/progress-bar-percentage-and-aria/{index.js → index.cjs} +5 -4
  193. package/schematics/migrations/progress-spinner-signals/{index.js → index.cjs} +7 -6
  194. package/schematics/migrations/query-list-signals/index.cjs +18 -0
  195. package/schematics/migrations/radio-signals-and-aria/{index.js → index.cjs} +9 -8
  196. package/schematics/migrations/read-state-dwell-handlers/{index.js → index.cjs} +5 -4
  197. package/schematics/migrations/scrollbar-deprecated-path/{index.js → index.cjs} +4 -3
  198. package/schematics/migrations/select-signal-inputs/{index.js → index.cjs} +5 -4
  199. package/schematics/migrations/sidepanel-non-modal-behavior/{index.js → index.cjs} +5 -4
  200. package/schematics/migrations/signal-inputs-subclasses/index.cjs +18 -0
  201. package/schematics/migrations/split-button-optional-disabled/{index.js → index.cjs} +5 -4
  202. package/schematics/migrations/splitter-deprecated-path/{index.js → index.cjs} +4 -3
  203. package/schematics/migrations/state-saving-default/{index.js → index.cjs} +5 -4
  204. package/schematics/migrations/table-cell-content/{index.js → index.cjs} +5 -4
  205. package/schematics/migrations/tabs-signals-and-aria/{index.js → index.cjs} +5 -4
  206. package/schematics/migrations/tag-list-cleaner/{index.js → index.cjs} +7 -6
  207. package/schematics/migrations/tag-slots/{index.js → index.cjs} +6 -5
  208. package/schematics/migrations/tags-signals/{index.js → index.cjs} +7 -6
  209. package/schematics/migrations/textarea-signals/{index.js → index.cjs} +7 -6
  210. package/schematics/migrations/time-range-title-for/{index.js → index.cjs} +5 -4
  211. package/schematics/migrations/timepicker-signals/{index.js → index.cjs} +7 -6
  212. package/schematics/migrations/timezone-grouping-utils/{index.js → index.cjs} +5 -4
  213. package/schematics/migrations/title-encapsulation/{index.js → index.cjs} +5 -4
  214. package/schematics/migrations/toast-stack-and-defaults/{index.js → index.cjs} +5 -4
  215. package/schematics/migrations/tooltip-pointer-events-and-types/{index.js → index.cjs} +5 -4
  216. package/schematics/migrations/top-bar-container-selectors/{index.js → index.cjs} +5 -4
  217. package/schematics/migrations/tree-select-signals/{index.js → index.cjs} +5 -4
  218. package/schematics/migrations/tree-signals/{index.js → index.cjs} +5 -4
  219. package/schematics/migrations/tree-state-saving-default/{index.js → index.cjs} +5 -4
  220. package/schematics/migrations/username-pipe-injection/{index.js → index.cjs} +5 -4
  221. package/schematics/migrations/v20-upgrade/{data.js → data.cjs} +7 -7
  222. package/schematics/migrations/v20-upgrade/index.cjs +19 -0
  223. package/schematics/migrations/v21-upgrade/{data.js → data.cjs} +22 -22
  224. package/schematics/migrations/v21-upgrade/{index.js → index.cjs} +11 -10
  225. package/schematics/migrations/zoneless-change-detection/index.cjs +21 -0
  226. package/schematics/migrations.json +87 -82
  227. package/schematics/ng-add/{index.js → index.cjs} +15 -289
  228. package/schematics/utils/{angular-parsing.js → angular-parsing.cjs} +2 -2
  229. package/schematics/utils/custom-data.cjs +64 -0
  230. package/schematics/utils/{deprecated-path-migration.js → deprecated-path-migration.cjs} +4 -3
  231. package/schematics/utils/html-config.cjs +148 -0
  232. package/schematics/utils/{icon-migration.js → icon-migration.cjs} +11 -5
  233. package/schematics/utils/list-item-pattern.cjs +16 -0
  234. package/schematics/utils/{messages.js → messages.cjs} +4 -0
  235. package/schematics/utils/package-config.cjs +99 -0
  236. package/schematics/utils/project-files.cjs +25 -0
  237. package/schematics/utils/replacement-driver.cjs +337 -0
  238. package/schematics/utils/safe-rule.cjs +23 -0
  239. package/schematics/utils/signal-members-migration.cjs +779 -0
  240. package/schematics/utils/tag-patterns.cjs +21 -0
  241. package/schematics/utils/template-ref-access.cjs +155 -0
  242. package/schematics/utils/{typescript.js → typescript.cjs} +1 -1
  243. package/schematics/utils/warn-only-migration.cjs +52 -0
  244. package/schematics/utils/workspace-styles.cjs +123 -0
  245. package/select/select.scss +7 -0
  246. package/tabs/_tabs-common.scss +23 -0
  247. package/textarea/textarea-tokens.scss +4 -1
  248. package/toast/toast.component.scss +1 -0
  249. package/toggle/_toggle-theme.scss +0 -17
  250. package/tooltip/tooltip.scss +1 -1
  251. package/top-bar/top-bar-tokens.scss +1 -0
  252. package/top-bar/top-bar.scss +10 -0
  253. package/types/koobiq-components-accordion.d.ts +25 -0
  254. package/types/koobiq-components-button-toggle.d.ts +6 -0
  255. package/types/koobiq-components-checkbox.d.ts +30 -0
  256. package/types/koobiq-components-clamped-text.d.ts +16 -3
  257. package/types/koobiq-components-code-block.d.ts +55 -14
  258. package/types/koobiq-components-core.d.ts +226 -13
  259. package/types/koobiq-components-datepicker.d.ts +28 -1
  260. package/types/koobiq-components-divider.d.ts +28 -10
  261. package/types/koobiq-components-dropdown.d.ts +19 -0
  262. package/types/koobiq-components-filter-bar.d.ts +79 -6
  263. package/types/koobiq-components-flag.d.ts +18 -0
  264. package/types/koobiq-components-form-field.d.ts +87 -6
  265. package/types/koobiq-components-icon.d.ts +15 -0
  266. package/types/koobiq-components-inline-edit.d.ts +8 -1
  267. package/types/koobiq-components-input.d.ts +22 -3
  268. package/types/koobiq-components-list.d.ts +6 -0
  269. package/types/koobiq-components-modal.d.ts +7 -0
  270. package/types/koobiq-components-navbar.d.ts +71 -7
  271. package/types/koobiq-components-notification-center.d.ts +13 -0
  272. package/types/koobiq-components-overflow-items.d.ts +26 -2
  273. package/types/koobiq-components-popover.d.ts +38 -3
  274. package/types/koobiq-components-radio.d.ts +30 -0
  275. package/types/koobiq-components-search-expandable.d.ts +10 -0
  276. package/types/koobiq-components-select.d.ts +36 -4
  277. package/types/koobiq-components-sidepanel.d.ts +52 -1
  278. package/types/koobiq-components-splitter.d.ts +13 -4
  279. package/types/koobiq-components-tabs.d.ts +4 -0
  280. package/types/koobiq-components-tags.d.ts +6 -0
  281. package/types/koobiq-components-textarea.d.ts +9 -2
  282. package/types/koobiq-components-timepicker.d.ts +15 -0
  283. package/types/koobiq-components-toggle.d.ts +30 -0
  284. package/types/koobiq-components-tooltip.d.ts +55 -10
  285. package/types/koobiq-components-top-bar.d.ts +11 -3
  286. package/types/koobiq-components-tree-select.d.ts +23 -8
  287. package/types/koobiq-components-tree.d.ts +144 -60
  288. package/schematics/migrations/angular-animations-removal/index.js +0 -20
  289. package/schematics/migrations/color-signals/index.js +0 -19
  290. package/schematics/migrations/core-mixins-removal/index.js +0 -17
  291. package/schematics/migrations/datepicker-signals/index.js +0 -17
  292. package/schematics/migrations/dropdown-signals/index.js +0 -19
  293. package/schematics/migrations/input-signals/index.js +0 -17
  294. package/schematics/migrations/list-signals/index.js +0 -17
  295. package/schematics/migrations/modal-signals/index.js +0 -19
  296. package/schematics/migrations/option-signals/index.js +0 -19
  297. package/schematics/migrations/query-list-signals/index.js +0 -17
  298. package/schematics/migrations/signal-inputs-subclasses/index.js +0 -17
  299. package/schematics/migrations/v20-upgrade/index.js +0 -18
  300. package/schematics/migrations/zoneless-change-detection/index.js +0 -20
  301. package/schematics/utils/package-config.js +0 -13
  302. /package/schematics/migrations/accordion-state-saving-default/{data.js → data.cjs} +0 -0
  303. /package/schematics/migrations/actions-panel-overlay-container/{data.js → data.cjs} +0 -0
  304. /package/schematics/migrations/alert-signals/{data.js → data.cjs} +0 -0
  305. /package/schematics/migrations/angular-animations-removal/{data.js → data.cjs} +0 -0
  306. /package/schematics/migrations/app-switcher-signals/{data.js → data.cjs} +0 -0
  307. /package/schematics/migrations/autocomplete-signals/{data.js → data.cjs} +0 -0
  308. /package/schematics/migrations/badge-signals/{data.js → data.cjs} +0 -0
  309. /package/schematics/migrations/button-state-and-styles/{data.js → data.cjs} +0 -0
  310. /package/schematics/migrations/button-supported-colors/{data.js → data.cjs} +0 -0
  311. /package/schematics/migrations/button-toggle-signals-and-aria/{data.js → data.cjs} +0 -0
  312. /package/schematics/migrations/button-truncation/{data.js → data.cjs} +0 -0
  313. /package/schematics/migrations/checkbox-signals/{data.js → data.cjs} +0 -0
  314. /package/schematics/migrations/clamped-text-disclosure/{data.js → data.cjs} +0 -0
  315. /package/schematics/migrations/code-block-signals/{data.js → data.cjs} +0 -0
  316. /package/schematics/migrations/color-signals/{data.js → data.cjs} +0 -0
  317. /package/schematics/migrations/core-mixins-removal/{data.js → data.cjs} +0 -0
  318. /package/schematics/migrations/css-selectors/{data.js → data.cjs} +0 -0
  319. /package/schematics/migrations/datepicker-signals/{data.js → data.cjs} +0 -0
  320. /package/schematics/migrations/deprecated-icons/{data.js → data.cjs} +0 -0
  321. /package/schematics/migrations/divider-signals-and-aria/{data.js → data.cjs} +0 -0
  322. /package/schematics/migrations/dl-attribute-coercion/{data.js → data.cjs} +0 -0
  323. /package/schematics/migrations/dl-standalone-names/{data.js → data.cjs} +0 -0
  324. /package/schematics/migrations/dropdown-demote-overlay/{data.js → data.cjs} +0 -0
  325. /package/schematics/migrations/dropdown-signals/{data.js → data.cjs} +0 -0
  326. /package/schematics/migrations/empty-state-error-color/{data.js → data.cjs} +0 -0
  327. /package/schematics/migrations/file-upload-cva-and-primitives/{data.js → data.cjs} +0 -0
  328. /package/schematics/migrations/file-upload-deprecated-outputs/{data.js → data.cjs} +0 -0
  329. /package/schematics/migrations/filter-bar-rename-action/{data.js → data.cjs} +0 -0
  330. /package/schematics/migrations/filter-bar-signals/{data.js → data.cjs} +0 -0
  331. /package/schematics/migrations/filter-bar-state-saving-default/{data.js → data.cjs} +0 -0
  332. /package/schematics/migrations/flag-inner-html/{data.js → data.cjs} +0 -0
  333. /package/schematics/migrations/form-field-signals/{data.js → data.cjs} +0 -0
  334. /package/schematics/migrations/icons-replacement/{data.js → data.cjs} +0 -0
  335. /package/schematics/migrations/inline-edit-a11y-and-types/{data.js → data.cjs} +0 -0
  336. /package/schematics/migrations/input-number-surface/{data.js → data.cjs} +0 -0
  337. /package/schematics/migrations/input-signals/{data.js → data.cjs} +0 -0
  338. /package/schematics/migrations/link-signals/{data.js → data.cjs} +0 -0
  339. /package/schematics/migrations/list-signals/{data.js → data.cjs} +0 -0
  340. /package/schematics/migrations/list-tree-multiple-input/{data.js → data.cjs} +0 -0
  341. /package/schematics/migrations/loader-overlay-signals/{data.js → data.cjs} +0 -0
  342. /package/schematics/migrations/locale-configuration-providers/{data.js → data.cjs} +0 -0
  343. /package/schematics/migrations/markdown-signals/{data.js → data.cjs} +0 -0
  344. /package/schematics/migrations/modal-dialog-semantics/{data.js → data.cjs} +0 -0
  345. /package/schematics/migrations/modal-signals/{data.js → data.cjs} +0 -0
  346. /package/schematics/migrations/navbar-signals-and-aria/{data.js → data.cjs} +0 -0
  347. /package/schematics/migrations/new-icons-pack/{data.js → data.cjs} +0 -0
  348. /package/schematics/migrations/notification-center-signals/{data.js → data.cjs} +0 -0
  349. /package/schematics/migrations/option-signals/{data.js → data.cjs} +0 -0
  350. /package/schematics/migrations/popover-leave-delay/{data.js → data.cjs} +0 -0
  351. /package/schematics/migrations/progress-bar-percentage-and-aria/{data.js → data.cjs} +0 -0
  352. /package/schematics/migrations/progress-spinner-signals/{data.js → data.cjs} +0 -0
  353. /package/schematics/migrations/query-list-signals/{data.js → data.cjs} +0 -0
  354. /package/schematics/migrations/radio-signals-and-aria/{data.js → data.cjs} +0 -0
  355. /package/schematics/migrations/read-state-dwell-handlers/{data.js → data.cjs} +0 -0
  356. /package/schematics/migrations/select-signal-inputs/{data.js → data.cjs} +0 -0
  357. /package/schematics/migrations/sidepanel-non-modal-behavior/{data.js → data.cjs} +0 -0
  358. /package/schematics/migrations/signal-inputs-subclasses/{data.js → data.cjs} +0 -0
  359. /package/schematics/migrations/split-button-optional-disabled/{data.js → data.cjs} +0 -0
  360. /package/schematics/migrations/state-saving-default/{data.js → data.cjs} +0 -0
  361. /package/schematics/migrations/table-cell-content/{data.js → data.cjs} +0 -0
  362. /package/schematics/migrations/tabs-signals-and-aria/{data.js → data.cjs} +0 -0
  363. /package/schematics/migrations/tag-list-cleaner/{data.js → data.cjs} +0 -0
  364. /package/schematics/migrations/tags-signals/{data.js → data.cjs} +0 -0
  365. /package/schematics/migrations/textarea-signals/{data.js → data.cjs} +0 -0
  366. /package/schematics/migrations/time-range-title-for/{data.js → data.cjs} +0 -0
  367. /package/schematics/migrations/timepicker-signals/{data.js → data.cjs} +0 -0
  368. /package/schematics/migrations/timezone-grouping-utils/{data.js → data.cjs} +0 -0
  369. /package/schematics/migrations/title-encapsulation/{data.js → data.cjs} +0 -0
  370. /package/schematics/migrations/toast-stack-and-defaults/{data.js → data.cjs} +0 -0
  371. /package/schematics/migrations/tooltip-pointer-events-and-types/{data.js → data.cjs} +0 -0
  372. /package/schematics/migrations/top-bar-container-selectors/{data.js → data.cjs} +0 -0
  373. /package/schematics/migrations/tree-select-signals/{data.js → data.cjs} +0 -0
  374. /package/schematics/migrations/tree-signals/{data.js → data.cjs} +0 -0
  375. /package/schematics/migrations/tree-state-saving-default/{data.js → data.cjs} +0 -0
  376. /package/schematics/migrations/username-pipe-injection/{data.js → data.cjs} +0 -0
  377. /package/schematics/migrations/zoneless-change-detection/{data.js → data.cjs} +0 -0
  378. /package/schematics/utils/{ast.js → ast.cjs} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"koobiq-components-notification-center.mjs","sources":["../../../packages/components/notification-center/notification-center.service.ts","../../../packages/components/notification-center/notification-center.tokens.ts","../../../packages/components/notification-center/notification-item.ts","../../../packages/components/notification-center/notification-item.html","../../../packages/components/notification-center/notification-center.ts","../../../packages/components/notification-center/notification-center.html","../../../packages/components/notification-center/notification-center.module.ts","../../../packages/components/notification-center/koobiq-components-notification-center.ts"],"sourcesContent":["import { computed, inject, Injectable, Signal, signal, TemplateRef, untracked, WritableSignal } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { DateAdapter, DateFormatter, KBQ_LOCALE_SERVICE } from '@koobiq/components/core';\nimport { KbqToastService, KbqToastStyle } from '@koobiq/components/toast';\nimport { BehaviorSubject, merge, Observable, Subject } from 'rxjs';\nimport { map, skip } from 'rxjs/operators';\n\n/** A single notification rendered by the notification center. */\nexport interface KbqNotificationItem {\n /**\n * Identity of the notification, unique across the list — it is the list's track key and the key\n * the toast is matched back by. Generated on ingestion when omitted, and replaced by a generated\n * one when the supplied value is already taken by another notification.\n */\n id?: string;\n\n /** Numeric id of the shown toast, set by `push()` and consumed by `hideToast()`. */\n toastId?: number;\n\n /** Heading of the notification. */\n title?: string | TemplateRef<unknown>;\n /** Visual style; also selects the built-in icon when `icon` is `true`. */\n style?: string | KbqToastStyle;\n\n /** `true` renders the built-in icon for `style`; a template renders that template instead. */\n icon?: boolean | TemplateRef<unknown>;\n /** Extra classes for the built-in icon. */\n iconClass?: string;\n /** Secondary line below the title. */\n caption?: string | TemplateRef<unknown>;\n\n /** Body of the notification. */\n content?: string | TemplateRef<unknown>;\n /** Template with the notification's action controls. */\n actions?: TemplateRef<unknown>;\n\n /**\n * When the notification happened. Any value the configured `DateAdapter` parses without an explicit\n * format — ISO 8601, RFC 2822 or SQL for the Luxon adapter. The value drives both the day group and\n * the ordering; values the adapter cannot parse are shown verbatim in their own group instead of\n * breaking the list.\n */\n date: string;\n\n /** Whether the user has already read the notification. Defaults to `false` on ingestion. */\n read?: boolean;\n}\n\n/** Number of unread notifications above which the trigger counter switches to `\"99+\"`. */\nexport const maxUnreadItemsLength = 99;\n\n/** Notifications that happened on the same day, as rendered by one sub-header of the panel. */\nexport type KbqNotificationsGroup = {\n /** Stable identity of the day group; used as the list's track key. */\n id: string;\n /** Localized day heading. */\n title: string;\n /** Notifications of that day, newest first. */\n items: KbqNotificationItem[];\n};\n\ntype KbqNotificationsGroups = Record<string, KbqNotificationsGroup>;\n\n/**\n * Everything derived from a notification's `date`, cached per item so each value is parsed once\n * instead of once per grouping pass plus twice per sort comparison.\n *\n * Only locale-independent values live here. The day heading is localized and `DateFormatter`\n * re-localizes at runtime, so caching it would freeze a group in the locale it was first rendered in.\n */\ntype KbqParsedNotificationDate = {\n /** Raw `date` this entry was derived from; a changed value invalidates the cache. */\n source: string;\n /** Day key, built from adapter accessors so it means the same under every date adapter. */\n groupId: string;\n /** Parsed value passed to `DateAdapter.compareDateTime`, or `null` when unparsable. */\n value: unknown;\n};\n\n/** Payload emitted by `KbqNotificationCenterService.onDelete`. */\nexport type KbqNotificationDeleteEvent = {\n /** What was removed: a single item, a whole date group, or all notifications. */\n type: 'item' | 'group' | 'all';\n /** The notification items that were removed. */\n items: KbqNotificationItem[];\n};\n\n/** Suffix appended to a generated id so items ingested within the same millisecond stay distinct. */\nlet uniqueIdCounter = 0;\n\n/** State and commands of the notification center: the list itself, its modes, and the removal events. */\n@Injectable({ providedIn: 'root' })\nexport class KbqNotificationCenterService {\n private readonly adapter: DateAdapter<unknown> = inject(DateAdapter);\n private readonly formatter: DateFormatter<unknown> = inject(DateFormatter);\n private readonly toastService = inject(KbqToastService);\n private readonly localeService = inject(KBQ_LOCALE_SERVICE, { optional: true });\n\n /** Parsed `date` per item. Keyed by the item itself, so no consumer-owned object is written to. */\n private readonly parsedDates = new WeakMap<KbqNotificationItem, KbqParsedNotificationDate>();\n\n private readonly _silentMode = signal(false);\n private readonly _loadingMode = signal(false);\n private readonly _errorMode = signal(false);\n private readonly _loadingMore = signal(false);\n private readonly _loadMoreErrorMode = signal(false);\n private readonly _hasMore = signal(true);\n private readonly originalItems = signal<KbqNotificationItem[]>([]);\n\n /**\n * Bumped on every `onRead` emission: `read` is flipped in place on the consumer's object, so the list\n * itself does not change when a notification is read.\n */\n private readonly readVersion = signal(0);\n\n /**\n * Read state of each notification a view follows, as last reported by `onRead` or a list update. One per\n * item, so that reading a notification refreshes its own row only.\n */\n private readonly readStates = new WeakMap<KbqNotificationItem, WritableSignal<boolean>>();\n\n /** Pinged by every state setter; `changes` merges it with `onRead`. */\n private readonly stateChanges = new Subject<void>();\n\n /** @docs-private */\n readonly silentMode: Signal<boolean> = this._silentMode.asReadonly();\n /** @docs-private */\n readonly loadingMode: Signal<boolean> = this._loadingMode.asReadonly();\n /** @docs-private */\n readonly errorMode: Signal<boolean> = this._errorMode.asReadonly();\n\n /**\n * Whether the bottom \"load more\" spinner is shown while the next page is being loaded.\n * Note: this is the infinite-scroll indicator and is distinct from `loadingMode`,\n * which renders the full-screen loader instead of the list. Set it with `setLoadingMore()`.\n */\n readonly loadingMore: Signal<boolean> = this._loadingMore.asReadonly();\n\n /**\n * Whether the bottom \"load more\" error row (with a retry button) is shown.\n * Distinct from `errorMode`, which replaces the whole list with the full-screen error state.\n * Set it with `setLoadMoreErrorMode()`.\n */\n readonly loadMoreErrorMode: Signal<boolean> = this._loadMoreErrorMode.asReadonly();\n\n /**\n * Whether there are more notifications to load. While `true`, scrolling to the bottom\n * emits `onNextPage`; set it to `false` with `setHasMore()` to stop further infinite-scroll requests.\n */\n readonly hasMore: Signal<boolean> = this._hasMore.asReadonly();\n\n /** Emits a notification the moment it flips from unread to read. */\n readonly onRead = new BehaviorSubject<KbqNotificationItem | null>(null);\n\n /** Triggers an event when the user presses the reload button. */\n readonly onReload = new Subject<void>();\n\n /** Triggers an event when the list is scrolled to the bottom and the next page should be loaded. */\n readonly onNextPage = new Subject<void>();\n\n /** Triggers an event when an item, a group, or all notifications are removed. */\n readonly onDelete = new Subject<KbqNotificationDeleteEvent>();\n\n /**\n * Grouped notifications, always ordered from newest to oldest: day groups are sorted by date\n * descending, and notifications within each day are sorted by date descending. Notifications whose\n * `date` the adapter cannot parse keep their raw value as a group heading and sort last.\n *\n * @docs-private\n */\n readonly groupedItems: Signal<KbqNotificationsGroup[]> = computed(() => {\n // The day headings are localized, so a runtime `setLocale()` has to rebuild them.\n this.localeService?.localeId();\n\n const result: KbqNotificationsGroups = {};\n\n this.originalItems().forEach((item) => this.makeGroup(item, result));\n\n const groups = Object.values(result);\n\n // Newest notifications first within each day.\n groups.forEach((group) => group.items.sort(this.compareByDateDesc));\n\n // Newest day first.\n return groups.sort((a, b) => this.compareByDateDesc(a.items[0], b.items[0]));\n });\n\n /**\n * Emits whenever any part of the center's state changes. Carries no payload — it is a ping — and\n * emits nothing on subscription.\n */\n readonly changes: Observable<void> = merge(\n this.stateChanges,\n // The replayed current value is not a change.\n this.onRead.pipe(skip(1))\n ).pipe(map(() => undefined));\n\n /**\n * Number of unread notifications, formatted for the trigger badge: empty while nothing is unread,\n * and `\"99+\"` above `maxUnreadItemsLength`.\n */\n readonly unreadItemsCounter: Signal<string> = computed(() => {\n this.readVersion();\n\n const value = this.originalItems().filter((item) => item.read === false).length;\n\n if (value > maxUnreadItemsLength) {\n return `${maxUnreadItemsLength}+`;\n }\n\n return value ? value.toString() : '';\n });\n\n /**\n * The notifications, as a snapshot: reading them does not make an `effect()` or a `computed()` depend on the\n * list, so an effect can read and reassign it. Follow `changes` to react to updates.\n */\n get items() {\n return this.currentItems();\n }\n\n set items(values: KbqNotificationItem[]) {\n this.setItems(this.setReadState(this.setIds(values)));\n }\n\n /** Whether there are no notifications. A snapshot, like `items`. */\n get isEmpty() {\n return this.currentItems().length === 0;\n }\n\n /**\n * Whether there are no notifications, for the center's own view to follow.\n *\n * @internal\n */\n readonly empty: Signal<boolean> = computed(() => this.originalItems().length === 0);\n\n constructor() {\n this.onRead.pipe(takeUntilDestroyed()).subscribe((item) => {\n this.readVersion.update((version) => version + 1);\n\n if (item) this.syncReadState(item);\n });\n\n this.toastService?.read.pipe(takeUntilDestroyed()).subscribe((toastData) => {\n const item = this.currentItems().find((item) => item.id === toastData?.id);\n\n if (item && !item.read) {\n item.read = true;\n\n this.onRead.next(item);\n }\n });\n }\n\n /**\n * Whether a notification is read, for a view to follow: `read` is flipped in place on the consumer's object,\n * so a view handed that object is not told.\n *\n * @internal\n */\n isRead(item: KbqNotificationItem): boolean {\n let state = this.readStates.get(item);\n\n if (!state) {\n state = signal(!!item.read);\n this.readStates.set(item, state);\n }\n\n // Followed for the dependency only: a view rendered anew shows the object as it is, even after a flip\n // nothing reported.\n state();\n\n return !!item.read;\n }\n\n /** Set silent mode */\n setSilentMode(value: boolean) {\n this._silentMode.set(value);\n this.notify();\n }\n\n /** Set loading mode */\n setLoadingMode(value: boolean) {\n this._loadingMode.set(value);\n this.notify();\n }\n\n /** Set error mode */\n setErrorMode(value: boolean) {\n this._errorMode.set(value);\n this.notify();\n }\n\n /** Set the bottom \"load more\" spinner visibility. */\n setLoadingMore(value: boolean) {\n this._loadingMore.set(value);\n this.notify();\n }\n\n /** Set the bottom \"load more\" error state visibility. */\n setLoadMoreErrorMode(value: boolean) {\n this._loadMoreErrorMode.set(value);\n this.notify();\n }\n\n /** Set whether there are more notifications to load via infinite scroll. */\n setHasMore(value: boolean) {\n this._hasMore.set(value);\n this.notify();\n }\n\n /**\n * Adds a notification to the list and, unless silent mode is on, shows it as a toast.\n * Re-pushing the very same notification object is a no-op: a duplicate would show a second toast\n * and produce a colliding list key. A different notification carrying an `id` the list already\n * uses is added under a freshly generated one instead of being dropped.\n */\n push(item: KbqNotificationItem) {\n if (this.currentItems().includes(item)) {\n return;\n }\n\n this.setReadState(this.setIds([item], this.currentItems()));\n\n if (!untracked(this.silentMode)) {\n item.toastId = this.toastService.show(item).id;\n }\n\n this.setItems([...this.currentItems(), item]);\n }\n\n /** Hides the toast that corresponds to the given notification item. */\n hideToast(item: KbqNotificationItem): void {\n if (item.toastId === undefined) {\n return;\n }\n\n this.toastService.hide(item.toastId);\n item.toastId = undefined;\n }\n\n /** Removes a notification. Removing one that is not in the list is a no-op and emits nothing. */\n remove(removedItem: KbqNotificationItem) {\n if (!this.currentItems().includes(removedItem)) {\n return;\n }\n\n this.hideToast(removedItem);\n\n this.setItems(this.currentItems().filter((item) => removedItem !== item));\n\n untracked(() => this.onDelete.next({ type: 'item', items: [removedItem] }));\n }\n\n /**\n * Removes a whole day group. Only the notifications that are actually in the list are removed and\n * reported; a group holding none of them — a stale reference kept from an earlier `groupedItems`\n * value — is a no-op and emits nothing.\n */\n removeGroup(group: KbqNotificationsGroup) {\n const removedItems = group.items.filter((item) => this.currentItems().includes(item));\n\n if (removedItems.length === 0) {\n return;\n }\n\n removedItems.forEach((item) => this.hideToast(item));\n\n this.setItems(this.currentItems().filter((item) => !removedItems.includes(item)));\n\n untracked(() => this.onDelete.next({ type: 'group', items: removedItems }));\n }\n\n /** Removes every notification. Removing from an already empty list is a no-op and emits nothing. */\n removeAll() {\n const items = this.currentItems();\n\n if (items.length === 0) {\n return;\n }\n\n items.forEach((item) => this.hideToast(item));\n\n this.setItems([]);\n\n untracked(() => this.onDelete.next({ type: 'all', items }));\n }\n\n /**\n * The list as the commands see it: untracked, so a command called from a reactive context does not\n * make it depend on the list it is about to write.\n */\n private currentItems(): KbqNotificationItem[] {\n return untracked(this.originalItems);\n }\n\n private setItems(items: KbqNotificationItem[]): void {\n this.originalItems.set(items);\n // The list may be handed back with `read` flipped in place.\n items.forEach((item) => this.syncReadState(item));\n this.notify();\n }\n\n /** Tells the view of `item` its read state, which refreshes it only when the state has changed. */\n private syncReadState(item: KbqNotificationItem): void {\n this.readStates.get(item)?.set(!!item.read);\n }\n\n /**\n * `changes` subscribers run synchronously, inside whatever called the command: untracked, so a command called\n * from an `effect()` does not make it depend on the signals they read.\n */\n private notify(): void {\n untracked(() => this.stateChanges.next());\n }\n\n private makeGroup = (item: KbqNotificationItem, groups: KbqNotificationsGroups) => {\n const { groupId, source, value } = this.getParsedDate(item);\n\n if (groups[groupId]) {\n groups[groupId].items.push(item);\n } else {\n groups[groupId] = {\n id: groupId,\n // Formatted on every recomputation rather than cached with the parsed value: the heading is\n // localized, and a cached one would leave the group in the locale it was built in while\n // a group created afterwards renders in the current one.\n title: value === null ? source : this.formatter.absoluteLongDate(value),\n items: [item]\n };\n }\n };\n\n /**\n * Parses a notification's `date` once and remembers the result.\n *\n * `DateAdapter.parse` returns `null` for anything it does not recognise, and both the Luxon and the\n * Moment adapter throw when a `null` is passed on to `format`, so every derived value is resolved\n * here behind a single validity check.\n */\n private getParsedDate(item: KbqNotificationItem): KbqParsedNotificationDate {\n const source = String(item.date ?? '');\n const cached = this.parsedDates.get(item);\n\n if (cached?.source === source) {\n return cached;\n }\n\n const parsed = this.adapter.parse(source, '');\n const isValid = parsed !== null && this.adapter.isValid(parsed);\n const entry: KbqParsedNotificationDate = isValid\n ? {\n source,\n // Built from adapter accessors instead of a format string: format tokens are not\n // portable, e.g. `'yyyyMMdd'` keys every day of a week identically under Moment.\n groupId: `date:${this.adapter.getYear(parsed)}-${this.adapter.getMonth(parsed)}-${this.adapter.getDate(parsed)}`,\n value: parsed\n }\n : { source, groupId: `raw:${source}`, value: null };\n\n this.parsedDates.set(item, entry);\n\n return entry;\n }\n\n /** Compares two notifications by date so the newest comes first; unparsable dates sort last. */\n private compareByDateDesc = (a: KbqNotificationItem, b: KbqNotificationItem): number => {\n const parsedA = this.getParsedDate(a).value;\n const parsedB = this.getParsedDate(b).value;\n\n if (parsedA === null || parsedB === null) {\n return Number(parsedA === null) - Number(parsedB === null);\n }\n\n return this.adapter.compareDateTime(parsedB, parsedA);\n };\n\n /**\n * Fills in the missing ids of `items` and re-keys the ones already taken, so that every ingested\n * notification ends up with an id of its own.\n *\n * @param existing notifications `items` is joining, whose ids are therefore taken as well; empty\n * when the list is being replaced wholesale.\n */\n private setIds(items: KbqNotificationItem[], existing: KbqNotificationItem[] = []) {\n const takenIds = new Set(existing.map((item) => item.id));\n\n items.forEach((item) => {\n // A supplied id is taken on trust only while it is free: a backend that repeats one across\n // pages would otherwise collide on the list's track key and on the toast-to-item lookup in\n // the constructor. `Date.now()` alone collides for every item ingested in the same tick.\n if (item.id === undefined || takenIds.has(item.id)) {\n item.id = `${Date.now()}-${uniqueIdCounter++}`;\n }\n\n takenIds.add(item.id);\n });\n\n return items;\n }\n\n private setReadState(items: KbqNotificationItem[]) {\n items.forEach((item) => (item.read = item.read ?? false));\n\n return items;\n }\n}\n","import { InjectionToken, Provider, Signal } from '@angular/core';\nimport {\n KbqDeepPartial,\n KbqNotificationCenterLocaleConfiguration,\n kbqLocaleConfigurationOverrideProvider,\n ruRULocaleData\n} from '@koobiq/components/core';\n\n/** Default configuration of notification-center. */\nexport const KBQ_NOTIFICATION_CENTER_DEFAULT_LOCALE_CONFIGURATION: KbqNotificationCenterLocaleConfiguration =\n ruRULocaleData.notificationCenter;\n\n/** Injection Token for providing configuration of notification-center. */\nexport const KBQ_NOTIFICATION_CENTER_LOCALE_CONFIGURATION =\n new InjectionToken<KbqNotificationCenterLocaleConfiguration>('KbqNotificationCenterLocaleConfiguration', {\n factory: () => KBQ_NOTIFICATION_CENTER_DEFAULT_LOCALE_CONFIGURATION\n });\n\n/**\n * Utility provider for `KBQ_NOTIFICATION_CENTER_LOCALE_CONFIGURATION`. Only the strings you pass are overridden; the\n * rest keep following the active locale.\n */\nexport const kbqNotificationCenterLocaleConfigurationProvider = (\n configuration: KbqDeepPartial<KbqNotificationCenterLocaleConfiguration>\n): Provider => kbqLocaleConfigurationOverrideProvider('notificationCenter', configuration);\n\n/** @deprecated Use {@link KBQ_NOTIFICATION_CENTER_DEFAULT_LOCALE_CONFIGURATION}. Will be removed in 22.0.0. */\nexport const KBQ_NOTIFICATION_CENTER_DEFAULT_CONFIGURATION = KBQ_NOTIFICATION_CENTER_DEFAULT_LOCALE_CONFIGURATION;\n/** @deprecated Use {@link KBQ_NOTIFICATION_CENTER_LOCALE_CONFIGURATION}. Will be removed in 22.0.0. */\nexport const KBQ_NOTIFICATION_CENTER_CONFIGURATION = KBQ_NOTIFICATION_CENTER_LOCALE_CONFIGURATION;\n\n/** The panel members a rendered notification item depends on. */\nexport interface KbqNotificationCenterPanel {\n /** Localized strings of the panel. */\n readonly localeConfiguration: Signal<KbqNotificationCenterLocaleConfiguration>;\n /** Moves focus to a control that survives the removal, once the delete button has unmounted. */\n restoreFocusAfterRemove(): void;\n}\n\n/**\n * Narrow contract a `kbq-notification-item` consumes from the panel that renders it, instead of\n * injecting the panel component itself.\n */\nexport const KBQ_NOTIFICATION_CENTER_PANEL = new InjectionToken<KbqNotificationCenterPanel>(\n 'KbqNotificationCenterPanel'\n);\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n input,\n OnChanges,\n SimpleChanges,\n TemplateRef,\n ViewEncapsulation\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { KbqButtonModule } from '@koobiq/components/button';\nimport { DateAdapter, KbqReadStateDirective } from '@koobiq/components/core';\nimport { KbqIconModule } from '@koobiq/components/icon';\nimport { KbqTitleModule } from '@koobiq/components/title';\nimport { KbqToastStyle } from '@koobiq/components/toast';\nimport { filter } from 'rxjs/operators';\nimport { KbqNotificationCenterService, KbqNotificationItem } from './notification-center.service';\nimport { KBQ_NOTIFICATION_CENTER_PANEL } from './notification-center.tokens';\n\n/** @docs-private */\n@Component({\n selector: 'kbq-notification-item',\n imports: [\n NgTemplateOutlet,\n KbqIconModule,\n KbqTitleModule,\n KbqButtonModule\n ],\n templateUrl: './notification-item.html',\n styleUrls: ['./notification-item.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'kbq-notification-item',\n '[class]': 'styleClass',\n 'data-testid': 'kbq-notification-item'\n },\n hostDirectives: [KbqReadStateDirective]\n})\nexport class KbqNotificationItemComponent implements OnChanges {\n private readonly adapter: DateAdapter<unknown> = inject(DateAdapter);\n protected readonly service = inject(KbqNotificationCenterService);\n protected readonly readStateDirective = inject<KbqReadStateDirective>(KbqReadStateDirective, { host: true });\n protected readonly panel = inject(KBQ_NOTIFICATION_CENTER_PANEL);\n\n /** Time of day the notification happened; empty when its `date` could not be parsed. */\n protected time: string;\n\n /** Style modifier class of the host, recomputed with `data` instead of allocated on every check. */\n protected styleClass: string = '';\n\n /** Context handed to the consumer's templates. Exposes the item only, never this component. */\n protected context: { $implicit: KbqNotificationItem };\n\n // `KbqToastService` used to write these defaults into the item handed to `push()`; it now leaves the\n // caller's object untouched, so the row resolves them itself instead of rendering an unstyled,\n // icon-less notification.\n protected get style(): string | KbqToastStyle {\n return this.data.style || KbqToastStyle.Contrast;\n }\n\n protected get icon(): boolean | TemplateRef<unknown> {\n return this.data.icon ?? true;\n }\n\n protected get read(): boolean {\n return this.service.isRead(this.data);\n }\n\n get data(): KbqNotificationItem {\n return this._data;\n }\n\n set data(value: KbqNotificationItem) {\n this._data = value;\n this.context = { $implicit: value };\n // Through `style`, so an item pushed without one still gets the contrast modifier rather than\n // no class at all.\n this.styleClass = `kbq-notification-item_${this.style}`;\n\n // `DateAdapter.parse` returns null for anything it does not recognise, and every adapter throws\n // when that null reaches `format` — which would take the whole panel down with it.\n const parsed = this.adapter.parse(value.date, '');\n\n this.time = parsed !== null && this.adapter.isValid(parsed) ? this.adapter.format(parsed, 'HH:mm') : '';\n }\n\n private _data: KbqNotificationItem;\n\n /** @docs-private */\n readonly dataInput = input<KbqNotificationItem | undefined>(undefined, { alias: 'data' });\n\n ngOnChanges(changes: SimpleChanges): void {\n // A bound input is handed to its member; unbound, it leaves what code wrote.\n if (changes['dataInput']) {\n const data = this.dataInput();\n\n if (data !== undefined) this.data = data;\n }\n }\n\n constructor() {\n this.readStateDirective.read\n .pipe(\n filter((value: boolean) => value),\n takeUntilDestroyed()\n )\n .subscribe(() => {\n if (this.data.read) {\n return;\n }\n\n this.data.read = true;\n\n this.service.onRead.next(this.data);\n });\n }\n\n /** Removes this notification, keeping keyboard focus inside the panel once the button unmounts. */\n protected remove(): void {\n this.panel.restoreFocusAfterRemove();\n\n this.service.remove(this.data);\n }\n\n protected isTemplateRef(value: unknown): boolean {\n return value instanceof TemplateRef;\n }\n}\n","@if (icon) {\n <div class=\"kbq-notification-item__icon-container layout-row layout-align-start-start\">\n @if (icon === true) {\n @switch (style) {\n @case ('contrast') {\n <i\n kbq-icon=\"kbq-circle-info_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"'contrast'\"\n [class]=\"data.iconClass\"\n ></i>\n }\n @case ('success') {\n <i\n kbq-icon=\"kbq-circle-check_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"'success'\"\n [class]=\"data.iconClass\"\n ></i>\n }\n @case ('warning') {\n <i\n kbq-icon=\"kbq-triangle-exclamation_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"'warning'\"\n [class]=\"data.iconClass\"\n ></i>\n }\n @case ('error') {\n <i\n kbq-icon=\"kbq-triangle-exclamation_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"'error'\"\n [class]=\"data.iconClass\"\n ></i>\n }\n }\n } @else if (isTemplateRef(icon)) {\n <ng-container [ngTemplateOutlet]=\"$any(icon)\" [ngTemplateOutletContext]=\"context\" />\n }\n </div>\n}\n\n<div class=\"kbq-notification-item__container\">\n @if (data.title) {\n <div\n kbq-title\n class=\"kbq-notification-item__title\"\n [class.kbq-notification-item__title_with-content]=\"data.caption || data.content\"\n >\n @if (isTemplateRef(data.title)) {\n <ng-container [ngTemplateOutlet]=\"$any(data.title)\" [ngTemplateOutletContext]=\"context\" />\n } @else {\n <p data-testid=\"kbq-notification-item-title\">{{ data.title }}</p>\n }\n\n @if (!read) {\n <!-- Unread is otherwise conveyed by the dot below alone. It sits outside the time block\n because that block is visually hidden while the row is hovered or focused, which would\n take the text out of the accessibility tree with it. -->\n <span class=\"cdk-visually-hidden\">{{ panel.localeConfiguration().unread }}</span>\n }\n\n <div\n class=\"kbq-notification-item-time\"\n data-testid=\"kbq-notification-item-time\"\n [class.kbq-notification-item-time_read]=\"read\"\n >\n <div class=\"kbq-notification-item-time__value\" data-testid=\"kbq-notification-item-time-value\">\n {{ time }}\n </div>\n <i\n class=\"kbq-notification-item-time__state\"\n kbq-icon=\"kbq-circle-xs_16\"\n aria-hidden=\"true\"\n [color]=\"'theme'\"\n ></i>\n </div>\n </div>\n }\n\n @if (data.caption) {\n <div\n kbq-title\n [class.kbq-notification-item__text]=\"data.title\"\n [class.kbq-notification-item__title]=\"!data.title\"\n >\n @if (isTemplateRef(data.caption)) {\n <ng-container [ngTemplateOutlet]=\"$any(data.caption)\" [ngTemplateOutletContext]=\"context\" />\n } @else {\n {{ data.caption }}\n }\n </div>\n }\n\n @if (data.content) {\n <div class=\"kbq-notification-item__content\">\n @if (isTemplateRef(data.content)) {\n <ng-container [ngTemplateOutlet]=\"$any(data.content)\" [ngTemplateOutletContext]=\"context\" />\n } @else {\n {{ data.content }}\n }\n </div>\n }\n\n @if (data.actions) {\n <div class=\"kbq-notification-item__actions\">\n @if (isTemplateRef(data.actions)) {\n <ng-container [ngTemplateOutlet]=\"$any(data.actions)\" [ngTemplateOutletContext]=\"context\" />\n } @else {\n {{ data.actions }}\n }\n </div>\n }\n</div>\n\n<button\n kbq-button\n class=\"kbq-notification-item__remove-button\"\n data-testid=\"kbq-notification-item-remove-button\"\n [attr.aria-label]=\"panel.localeConfiguration().remove\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n (click)=\"remove()\"\n>\n <i kbq-icon=\"kbq-trash_16\"></i>\n</button>\n","import {\n CdkTrapFocus,\n ConfigurableFocusTrapFactory,\n FOCUS_TRAP_INERT_STRATEGY,\n FocusMonitor,\n FocusTrapFactory,\n InputModalityDetector,\n _IdGenerator\n} from '@angular/cdk/a11y';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { FlexibleConnectedPositionStrategy, Overlay, OverlayConfig, ScrollStrategy } from '@angular/cdk/overlay';\nimport { CdkScrollable, ScrollDispatcher } from '@angular/cdk/scrolling';\nimport { DOCUMENT } from '@angular/common';\nimport {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n Directive,\n EventEmitter,\n InjectionToken,\n Injector,\n NgZone,\n OnChanges,\n RendererStyleFlags2,\n Signal,\n SimpleChanges,\n TemplateRef,\n Type,\n ViewEncapsulation,\n afterNextRender,\n booleanAttribute,\n forwardRef,\n inject,\n input,\n numberAttribute,\n viewChild\n} from '@angular/core';\nimport { outputFromObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { KbqBadgeModule } from '@koobiq/components/badge';\nimport { KbqButton, KbqButtonModule } from '@koobiq/components/button';\nimport {\n EmptyFocusTrapStrategy,\n KBQ_A11Y_LOCALE_CONFIGURATION,\n KbqLocaleOverridesDirective,\n KbqOverflowShadowBottom,\n KbqOverflowShadowContainer,\n KbqOverflowShadowTop,\n KbqPopUp,\n KbqPopUpPlacementValues,\n KbqPopUpSizeValues,\n KbqPopUpTrigger,\n KbqStickToWindowPlacementValues,\n POSITION_TO_CSS_MAP,\n PopUpPlacements,\n PopUpSizes,\n PopUpTriggers,\n applyPopupMargins,\n kbqSiblingPopupProvider\n} from '@koobiq/components/core';\nimport { KbqDividerModule } from '@koobiq/components/divider';\nimport { KbqDropdownModule } from '@koobiq/components/dropdown';\nimport { KbqIconModule } from '@koobiq/components/icon';\nimport { KbqLoaderOverlayModule } from '@koobiq/components/loader-overlay';\nimport { KbqProgressSpinnerModule } from '@koobiq/components/progress-spinner';\nimport { KbqScrollbarViewport } from '@koobiq/components/scrollbar';\nimport { KbqToolTipModule } from '@koobiq/components/tooltip';\nimport { Observable, Subject, merge } from 'rxjs';\nimport { auditTime, distinctUntilChanged, filter, map } from 'rxjs/operators';\nimport { KbqNotificationCenterService, KbqNotificationsGroup } from './notification-center.service';\nimport {\n KBQ_NOTIFICATION_CENTER_LOCALE_CONFIGURATION,\n KBQ_NOTIFICATION_CENTER_PANEL,\n KbqNotificationCenterPanel\n} from './notification-center.tokens';\nimport { KbqNotificationItemComponent } from './notification-item';\n\nconst defaultOffsetX = 8;\n\nconst defaultPlacement = PopUpPlacements.Right;\n\n/** Rate-limit window (ms) for the scroll-to-bottom check that drives infinite scroll. */\nconst SCROLLED_TO_BOTTOM_AUDIT_TIME = 100;\n\n/**\n * Tolerance (px) applied when checking whether the list has reached its bottom.\n *\n * `scrollHeight` and `clientHeight` are CSSOM `long`s (rounded to the nearest integer) while\n * `scrollTop` is an `unrestricted double`. At fractional browser zoom or a fractional\n * `devicePixelRatio` the layout lands on fractional CSS pixels and the two roundings go\n * independently, so at the true bottom `scrollHeight - scrollTop - clientHeight` lands anywhere in\n * (-1, 1) rather than on 0 — an exact `<= 0` check then succeeds only about half the time. Below\n * 100% zoom one device pixel is wider than one CSS pixel, which scales the residual by ~1/zoom and\n * pushes it past 1. 2px covers zoom down to 50% and is imperceptible as a trigger threshold.\n *\n * See [`Element.scrollHeight`](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight) on MDN.\n */\nconst SCROLLED_TO_BOTTOM_TOLERANCE = 2;\n\n/** Custom property the panel height is published through, so the stylesheet stays the single owner. */\nconst POPOVER_HEIGHT_PROPERTY = '--kbq-notification-center-popover-height';\n\n/** Delete buttons of the day groups and of the individual notifications. */\nconst REMOVE_BUTTON_SELECTOR = '.kbq-notification-center-sub-header__button, .kbq-notification-item__remove-button';\n\n/**\n * Rate-limit window (ms) the reposition scroll strategy runs on. The panel re-applies its\n * stick-to-window styles on the same window, so the two stay in step.\n */\nconst SCROLL_REPOSITION_THROTTLE = 20;\n\n/** @docs-private */\nexport const KBQ_NOTIFICATION_CENTER_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>(\n 'kbq-notification-center-scroll-strategy',\n {\n providedIn: 'root',\n factory: () => kbqNotificationCenterScrollStrategyFactory(inject(Overlay))\n }\n);\n\n/** @docs-private */\nexport function kbqNotificationCenterScrollStrategyFactory(overlay: Overlay): () => ScrollStrategy {\n return () => overlay.scrollStrategies.reposition({ scrollThrottle: SCROLL_REPOSITION_THROTTLE });\n}\n\n/** @docs-private */\n@Component({\n selector: 'kbq-notification-center',\n imports: [\n KbqIconModule,\n KbqBadgeModule,\n KbqScrollbarViewport,\n KbqButtonModule,\n KbqDividerModule,\n KbqDropdownModule,\n KbqToolTipModule,\n CdkTrapFocus,\n KbqNotificationItemComponent,\n KbqLoaderOverlayModule,\n KbqProgressSpinnerModule,\n KbqOverflowShadowContainer,\n KbqOverflowShadowTop,\n KbqOverflowShadowBottom\n ],\n templateUrl: './notification-center.html',\n styleUrls: ['./notification-center.scss', './notification-center-tokens.scss'],\n providers: [\n // The panel traps focus, so it needs a configurable trap even when it is imported standalone —\n // these used to be reachable only through KbqNotificationCenterModule.\n { provide: FocusTrapFactory, useClass: ConfigurableFocusTrapFactory },\n { provide: FOCUS_TRAP_INERT_STRATEGY, useClass: EmptyFocusTrapStrategy },\n { provide: KBQ_NOTIFICATION_CENTER_PANEL, useExisting: forwardRef(() => KbqNotificationCenterComponent) }\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'kbq-notification-center',\n role: 'dialog',\n '[attr.id]': 'panelId',\n '[attr.aria-labelledby]': 'titleId',\n '[class.kbq-notification-center_popover]': 'popoverMode',\n '(keydown.escape)': 'escapeHandler($any($event))'\n },\n // Carrier only: the panel is created through the overlay, so there is no element for a consumer to bind\n // on. It re-merges the carriers above the trigger and lets the panel read its strings through `read()`.\n hostDirectives: [KbqLocaleOverridesDirective],\n preserveWhitespaces: false\n})\nexport class KbqNotificationCenterComponent extends KbqPopUp implements AfterViewInit, KbqNotificationCenterPanel {\n /** @docs-private */\n protected readonly service = inject(KbqNotificationCenterService);\n\n private readonly injector = inject(Injector);\n private readonly ngZone = inject(NgZone);\n private readonly idGenerator = inject(_IdGenerator);\n private readonly scrollDispatcher = inject(ScrollDispatcher);\n private readonly document = inject(DOCUMENT);\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly inputModalityDetector = inject(InputModalityDetector);\n\n private readonly carrier = inject(KbqLocaleOverridesDirective, { self: true });\n\n /**\n * Accessible names for the icon-only toolbar buttons.\n *\n * @docs-private\n */\n protected readonly a11yLocaleConfiguration = this.carrier.read('a11y', KBQ_A11Y_LOCALE_CONFIGURATION);\n\n /**\n * Localized strings of the notification center.\n *\n * Read through a signal so that a runtime `setLocale()` reaches `KbqNotificationItemComponent`, which\n * renders these strings from its own `OnPush` view: a `markForCheck()` here would mark this component\n * only, never the already-rendered items.\n */\n readonly localeConfiguration = this.carrier.read(\n 'notificationCenter',\n KBQ_NOTIFICATION_CENTER_LOCALE_CONFIGURATION\n );\n\n /**\n * Id of the panel heading, referenced by the host's `aria-labelledby`.\n *\n * @docs-private\n */\n protected readonly titleId = this.idGenerator.getId('kbq-notification-center-title-');\n\n /**\n * Id of the panel element, set by the trigger so it can point `aria-controls` at it.\n *\n * @docs-private\n */\n protected panelId: string;\n\n /** @docs-private */\n protected popoverMode: boolean;\n\n /**\n * Distance in pixels from the bottom of the list at which the next page is requested.\n *\n * @docs-private\n */\n protected scrolledToBottomOffset: number = 0;\n\n /** Re-measures the list outside of a scroll event: on first render and whenever the state changes. */\n /** Whether a re-measurement is already queued for the next render. */\n private scrolledToBottomRecheckPending = false;\n\n private readonly scrolledToBottomRecheck = new Subject<void>();\n\n /**\n * Text of the panel's single live region. The panel keeps one persistent region and only changes\n * its text, because a region inserted together with its content is not reliably announced.\n *\n * @docs-private\n */\n protected get statusMessage(): string {\n // Branch in the template's own order, or the region announces a state that is not on screen:\n // the full-screen error wins over everything, then the full-screen loader, then the bottom\n // spinner, then the bottom error row, and only an otherwise idle empty list reads as empty.\n if (this.service.errorMode()) {\n return this.localeConfiguration().failedToLoadNotifications;\n }\n\n if (this.service.loadingMode() || this.service.loadingMore()) {\n return this.localeConfiguration().loadingMore;\n }\n\n if (this.service.loadMoreErrorMode()) {\n return this.localeConfiguration().failedToLoadNotifications;\n }\n\n return this.service.empty() ? this.localeConfiguration().noNotifications : '';\n }\n\n /** @docs-private */\n prefix = 'kbq-notification-center';\n /** @docs-private */\n trigger: KbqNotificationCenterTrigger;\n /** @docs-private */\n isTrapFocus: boolean = false;\n\n readonly switcher = viewChild.required<KbqButton>('notificationSwitcher');\n\n /** Scrollable list container; used to measure scroll position for infinite scroll. */\n private readonly scrollContainer = viewChild.required(KbqScrollbarViewport);\n\n get popoverHeight(): string {\n return this._popoverHeight;\n }\n\n set popoverHeight(value: string) {\n this._popoverHeight = value;\n\n if (value) {\n this.renderer.setStyle(\n this.elementRef.nativeElement,\n POPOVER_HEIGHT_PROPERTY,\n value,\n RendererStyleFlags2.DashCase\n );\n } else {\n this.renderer.removeStyle(\n this.elementRef.nativeElement,\n POPOVER_HEIGHT_PROPERTY,\n RendererStyleFlags2.DashCase\n );\n }\n }\n\n private _popoverHeight: string;\n\n constructor() {\n super();\n }\n\n ngAfterViewInit() {\n this.visibleChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((state) => {\n if (this.offset !== null && state) {\n applyPopupMargins(\n this.renderer,\n this.elementRef.nativeElement,\n this.prefix,\n `${this.offset!.toString()}px`\n );\n }\n\n this.setStickPosition();\n });\n\n // The reposition scroll strategy rewrites the pane's top/left/bottom/right on every scroll the\n // application makes — including the panel's own list, which is a registered `CdkScrollable` —\n // wiping the manual styles `setStickPosition()` writes. This subscription is created after the\n // strategy has been enabled (`OverlayRef.attach()` runs before the panel's first change\n // detection), so on the same audit window it re-applies them behind the strategy.\n // The panel is also rendered on its own, without a trigger, so the guard covers more than the\n // absent `stickToWindow`.\n this.scrollDispatcher\n .scrolled(SCROLL_REPOSITION_THROTTLE)\n .pipe(\n filter(() => !!this.trigger?.stickToWindow),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(() => this.setStickPosition());\n\n this.service.changes\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.scheduleScrolledToBottomCheck());\n\n // Focused with the modality the user actually opened the panel with, so a keyboard-driven open\n // keeps its focus ring while a click does not. Not `KbqButton.focusViaKeyboard()`, which hardcodes\n // `'keyboard'` and paints the ring on the toggle for a mouse user, and not FocusMonitor's own last\n // origin, which reports `program` for a click landing outside its detection window (same rule as\n // `KbqBasePipe.currentFocusOrigin`).\n const switcher = this.switcher();\n\n // Mirrors `focusViaKeyboard()`'s own early return, which this no longer goes through.\n if (!switcher.disabled) {\n this.focusMonitor.focusVia(\n switcher.getHostElement(),\n this.inputModalityDetector.mostRecentModality ?? 'program'\n );\n }\n\n this.subscribeToScrolledToBottom();\n this.subscribeToRevealLoadMoreRow();\n\n // A first page too short to overflow the viewport produces no scroll event at all, so measure\n // once the panel has rendered or infinite scroll would never start.\n this.scheduleScrolledToBottomCheck();\n }\n\n /**\n * Removes a whole day group, keeping keyboard focus inside the panel.\n *\n * @docs-private\n */\n protected removeGroup(group: KbqNotificationsGroup): void {\n this.restoreFocusAfterRemove();\n\n this.service.removeGroup(group);\n }\n\n /**\n * Removes every notification, keeping keyboard focus inside the panel.\n *\n * @docs-private\n */\n protected removeAll(): void {\n this.restoreFocusAfterRemove();\n\n this.service.removeAll();\n }\n\n /**\n * Moves focus to a surviving delete button — or to the list container when the last one is gone —\n * once the removal has rendered. Without it, focus falls back to `<body>` and the Escape handler\n * and the rest of the panel become unreachable.\n */\n restoreFocusAfterRemove(): void {\n // Read before the removal renders, while the activated button is still in the DOM: its place in\n // document order is what decides where focus goes next. Asking for the first match afterwards\n // would always answer with the first day group's \"delete this day\" button, wherever the user\n // actually was — a destructive control they never aimed at, hidden behind that group's own\n // sticky header.\n const removedIndex = this.getRemoveButtons().indexOf(this.document.activeElement as HTMLElement);\n\n afterNextRender(\n () => {\n const survivors = this.getRemoveButtons();\n // The button that took the removed one's place, or the last one before it. A removal\n // that did not start from a delete button — or that took the last one with it — falls\n // back to the list container, which keeps the panel operable without parking focus on\n // an arbitrary destructive control.\n const survivor =\n removedIndex < 0 ? undefined : survivors[removedIndex] || survivors[survivors.length - 1];\n\n if (survivor) {\n survivor.focus();\n } else {\n this.focusScrollContainer();\n }\n },\n { injector: this.injector }\n );\n }\n\n /** Delete buttons of the day groups and of the individual notifications, in document order. */\n private getRemoveButtons(): HTMLElement[] {\n return Array.from(this.elementRef.nativeElement.querySelectorAll<HTMLElement>(REMOVE_BUTTON_SELECTOR));\n }\n\n /**\n * Retries loading the next page from the bottom error row.\n *\n * @docs-private\n */\n protected retryLoadMore(): void {\n // The retry button is about to unmount; keep keyboard focus inside the panel instead of\n // letting it fall back to <body>.\n this.focusScrollContainer();\n\n // Clear the bottom error state here so the spinner and the error row can never be shown at\n // the same time, regardless of what the consumer's `onNextPage` handler does.\n this.service.setLoadMoreErrorMode(false);\n\n this.service.onNextPage.next();\n }\n\n /**\n * Requests the next page (via `service.onNextPage`) once the list is scrolled to within\n * `scrolledToBottomOffset` pixels of the bottom. Two triggers feed it: the user scrolling, and a\n * re-measurement after the panel's state has rendered. The latter keeps paging when a freshly\n * loaded page is too short to overflow the viewport — otherwise no further scroll event would fire\n * and pagination would stall. Suppressed while a load is in flight, errored, or when there is\n * nothing more to load.\n */\n private subscribeToScrolledToBottom(): void {\n const scrolledToBottom$ = this.scrollContainer().scrollChanges.pipe(\n auditTime(SCROLLED_TO_BOTTOM_AUDIT_TIME),\n map(() => this.isScrolledToBottom()),\n distinctUntilChanged(),\n filter(Boolean)\n );\n\n // Deliberately without `distinctUntilChanged`: a re-measurement that finds the list still at\n // the bottom must keep paging even though the previous measurement said the same.\n const rechecked$ = this.scrolledToBottomRecheck.pipe(\n auditTime(SCROLLED_TO_BOTTOM_AUDIT_TIME),\n filter(() => this.isScrolledToBottom())\n );\n\n merge(scrolledToBottom$, rechecked$)\n .pipe(takeUntilDestroyed(this.destroyRef))\n // `scrollChanges` is `CdkScrollable.elementScrolled()` and emits outside Angular's zone, so\n // re-enter before touching consumer-facing state.\n .subscribe(() => this.ngZone.run(() => this.requestNextPage()));\n }\n\n /** Queues a re-measurement for after the next render, when the DOM reflects the new state. */\n private scheduleScrolledToBottomCheck(): void {\n // At most one pending re-measurement: `requestNextPage` flips the service's own loading flags,\n // which ping `changes` in turn, so an unguarded schedule feeds itself for as long as the list\n // reports it is at the bottom — each render callback queueing the next one.\n if (this.scrolledToBottomRecheckPending) {\n return;\n }\n\n this.scrolledToBottomRecheckPending = true;\n\n afterNextRender(\n () => {\n this.scrolledToBottomRecheckPending = false;\n\n this.scrolledToBottomRecheck.next();\n },\n { injector: this.injector }\n );\n }\n\n /**\n * Whether the list is scrolled to within `scrolledToBottomOffset` pixels of the bottom.\n * Sub-pixel measurement error is absorbed by `SCROLLED_TO_BOTTOM_TOLERANCE`.\n */\n private isScrolledToBottom(): boolean {\n const { scrollTop, clientHeight, scrollHeight } = this.scrollContainer().getNativeElement();\n\n // A container that has not been laid out yet has no bottom to reach. Without this guard the\n // all-zero measurement reads as \"at the bottom\" and requests page after page into nothing.\n if (clientHeight === 0) {\n return false;\n }\n\n return scrollHeight - scrollTop - clientHeight <= this.scrolledToBottomOffset + SCROLLED_TO_BOTTOM_TOLERANCE;\n }\n\n /** Emits `onNextPage` unless a load is already in flight, errored, or there is nothing more to load. */\n private requestNextPage(): void {\n if (this.service.hasMore() && !this.service.loadingMore() && !this.service.loadMoreErrorMode()) {\n this.service.onNextPage.next();\n }\n }\n\n /**\n * Reveals the bottom \"load more\" spinner / error row when it first appears. Both rows are appended\n * below the last item and can land outside the viewport (the next page is requested while the user\n * is up to `scrolledToBottomOffset` px above the true bottom). Only a genuine false->true transition\n * after the panel opened reveals the row, so the panel always opens scrolled to the top — reopening\n * it while a load-more error is still set never jumps to the bottom.\n */\n private subscribeToRevealLoadMoreRow(): void {\n const reveal = (isShown: () => boolean): Observable<void> => {\n let wasShown = isShown();\n\n return this.service.changes.pipe(\n filter(() => {\n const shown = isShown();\n const appeared = shown && !wasShown;\n\n wasShown = shown;\n\n return appeared;\n }),\n auditTime(SCROLLED_TO_BOTTOM_AUDIT_TIME)\n );\n };\n\n merge(\n reveal(() => this.service.loadingMore()),\n reveal(() => this.service.loadMoreErrorMode())\n )\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.scrollToBottom());\n }\n\n /** Scrolls the list container to its bottom so a freshly-appended bottom row becomes visible. */\n private scrollToBottom(): void {\n const { scrollHeight } = this.scrollContainer().getNativeElement();\n\n this.scrollContainer().scrollTo({ top: scrollHeight });\n }\n\n private focusScrollContainer(): void {\n const element = this.scrollContainer().getNativeElement();\n\n // tabindex -1 keeps the container out of the Tab order while allowing programmatic focus.\n element.setAttribute('tabindex', '-1');\n element.focus({ preventScroll: true });\n }\n\n /** @docs-private */\n updateClassMap(placement: string, customClass: string, size: KbqPopUpSizeValues) {\n super.updateClassMap(placement, customClass, { [`${this.prefix}_${size}`]: !!size });\n }\n\n /** @docs-private */\n updateTrapFocus(isTrapFocus: boolean): void {\n this.isTrapFocus = isTrapFocus;\n }\n\n /**\n * Closes the panel on `Escape` inside it, unless a control there spent the key closing a popup of its own.\n *\n * @docs-private\n */\n escapeHandler(event?: KeyboardEvent) {\n if (event?.defaultPrevented) return;\n\n // Spent, so that a container closing on Escape underneath, such as a sidepanel, stays open.\n event?.preventDefault();\n this.hide(0);\n }\n}\n\n@Directive({\n selector: '[kbqNotificationCenterTrigger]',\n providers: [kbqSiblingPopupProvider(KbqNotificationCenterTrigger)],\n host: {\n '[class.kbq-notification-center_open]': 'isOpen',\n '[class.kbq-active]': 'hasClickTrigger && isOpen',\n '[attr.aria-expanded]': 'isOpen',\n '[attr.aria-controls]': 'isOpen ? panelId : null'\n },\n exportAs: 'kbqNotificationCenterTrigger'\n})\nexport class KbqNotificationCenterTrigger\n extends KbqPopUpTrigger<KbqNotificationCenterComponent>\n implements OnChanges, AfterContentInit\n{\n /** @docs-private */\n protected scrollStrategy: () => ScrollStrategy = inject(KBQ_NOTIFICATION_CENTER_SCROLL_STRATEGY);\n /** @docs-private */\n protected readonly service = inject(KbqNotificationCenterService);\n\n /**\n * Id handed to the panel so `aria-controls` can point at it while it is open.\n *\n * @docs-private\n */\n protected readonly panelId = inject(_IdGenerator).getId('kbq-notification-center-panel-');\n\n /**\n * Not used.\n *\n * @docs-private\n */\n arrow: boolean = false;\n\n /** @docs-private */\n customClass: string;\n /** @docs-private */\n content: string | TemplateRef<unknown>;\n\n /** Number of unread notifications, formatted for the trigger badge. */\n get unreadItemsCounter(): Signal<string> {\n return this.service.unreadItemsCounter;\n }\n\n /** Placement of popUp */\n placement: KbqPopUpPlacementValues = defaultPlacement;\n\n /** Class that will be used in the background */\n readonly backdropClass = input<string>('cdk-overlay-transparent-backdrop');\n\n /** Class that will be used in the panel */\n readonly panelClass = input<string>('', { alias: 'kbqNotificationCenterPanelClass' });\n\n /** Offset of popUp */\n readonly offset = input<number, unknown>(defaultOffsetX, { transform: numberAttribute });\n\n /** Distance in pixels from the bottom of the list at which the next page is requested via `onNextPage`. */\n readonly scrolledToBottomOffset = input<number, unknown>(0, { transform: numberAttribute });\n\n /** Use popover or not */\n get popoverMode(): boolean {\n return this._popoverMode;\n }\n\n set popoverMode(value: boolean) {\n if (value === this._popoverMode) {\n return;\n }\n\n this._popoverMode = value;\n\n // The placement in force before the mode took over is remembered rather than assumed: a consumer\n // may have bound one of its own, and turning the mode off used to leave the popover placement\n // behind for good.\n if (value) {\n this.placementBeforePopoverMode = { placement: this.placement, priority: this.placementPriority };\n\n this.placement = PopUpPlacements.Bottom;\n this.updatePlacementPriority(['bottomCenter', 'bottomLeft', 'bottomRight']);\n } else if (this.placementBeforePopoverMode) {\n this.placement = this.placementBeforePopoverMode.placement;\n this.updatePlacementPriority(this.placementBeforePopoverMode.priority as KbqPopUpPlacementValues[]);\n\n this.placementBeforePopoverMode = null;\n }\n }\n\n /** Placement and priority in force before `popoverMode` replaced them. */\n private placementBeforePopoverMode: {\n placement: KbqPopUpPlacementValues;\n priority: string | string[] | null;\n } | null = null;\n\n private _popoverMode: boolean = false;\n\n /** Set height of popover. Default is `calc(100vh - <navbar height>)`. */\n get popoverHeight(): string {\n return this._popoverHeight;\n }\n\n set popoverHeight(value: string) {\n this._popoverHeight = value;\n\n // Guarding on the open panel, not on its current height: the previous `instance?.popoverHeight`\n // check made the first set a no-op and made clearing the height impossible.\n if (this.instance) {\n this.instance.popoverHeight = value;\n }\n }\n\n private _popoverHeight: string;\n\n /** Whether the trigger is disabled. */\n get disabled(): boolean {\n return this._disabled;\n }\n\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n\n if (this._disabled) {\n this.hide();\n }\n }\n\n /**\n * Additionally positions the element relative to the window side (Top, Right, Bottom and Left).\n * If container is specified, the positioning will be relative to it.\n * */\n stickToWindow: KbqStickToWindowPlacementValues | undefined;\n\n /** Container for additional positioning, used with stickToWindow */\n container: HTMLElement | undefined;\n\n /** @docs-private */\n get hasClickTrigger(): boolean {\n return this.trigger.includes(PopUpTriggers.Click);\n }\n\n /** Emits a change event whenever the placement state changes. */\n readonly placementChange = new EventEmitter<KbqPopUpPlacementValues>();\n\n /** @docs-private */\n readonly placementChangeOutput = outputFromObservable(this.placementChange, { alias: 'kbqPlacementChange' });\n\n /** Emits a change event whenever the visible state changes. */\n readonly visibleChange = new EventEmitter<boolean>();\n\n /** @docs-private */\n readonly visibleChangeOutput = outputFromObservable(this.visibleChange, { alias: 'kbqVisibleChange' });\n\n /** @docs-private */\n trigger: string = `${PopUpTriggers.Click}, ${PopUpTriggers.Keydown}`;\n\n /** @docs-private */\n protected originSelector = '.kbq-notification-center';\n\n /** @docs-private */\n protected get overlayConfig(): OverlayConfig {\n const defaultPanelClass = 'kbq-notification-center__panel';\n const panelClass = this.panelClass();\n\n return {\n panelClass: panelClass ? [defaultPanelClass, panelClass] : defaultPanelClass,\n hasBackdrop: false,\n backdropClass: this.backdropClass()\n };\n }\n\n /** @docs-private */\n readonly placementInput = input<KbqPopUpPlacementValues | undefined>(undefined, {\n alias: 'kbqNotificationCenterPlacement'\n });\n\n /** @docs-private */\n readonly popoverModeInput = input<boolean | undefined, boolean | string | null | undefined>(undefined, {\n alias: 'popoverMode',\n transform: booleanAttribute\n });\n\n /** @docs-private */\n readonly popoverHeightInput = input<string | undefined>(undefined, { alias: 'popoverHeight' });\n\n /** @docs-private */\n readonly stickToWindowInput = input<KbqStickToWindowPlacementValues | undefined>(undefined, {\n alias: 'stickToWindow'\n });\n\n /** @docs-private */\n readonly containerInput = input<HTMLElement | undefined>(undefined, { alias: 'container' });\n\n /** @docs-private */\n readonly disabledInput = input<boolean | undefined, boolean | string | null | undefined>(undefined, {\n alias: 'disabled',\n transform: booleanAttribute\n });\n\n ngOnChanges(changes: SimpleChanges): void {\n // A bound input is handed to its member, a bound `undefined` as the member's default; unbound, it leaves\n // what code wrote.\n if (changes['placementInput']) {\n this.placement = this.placementInput() ?? defaultPlacement;\n }\n\n if (changes['popoverModeInput']) {\n const popoverMode = this.popoverModeInput();\n\n if (popoverMode !== undefined) this.popoverMode = popoverMode;\n }\n\n if (changes['popoverHeightInput']) {\n this.popoverHeight = this.popoverHeightInput() ?? '';\n }\n\n if (changes['stickToWindowInput']) {\n this.stickToWindow = this.stickToWindowInput();\n }\n\n if (changes['containerInput']) {\n this.container = this.containerInput();\n }\n\n if (changes['disabledInput']) {\n const disabled = this.disabledInput();\n\n if (disabled !== undefined) this.disabled = disabled;\n }\n }\n\n constructor() {\n super();\n\n this.updatePlacementPriority(['right', 'rightBottom', 'rightTop']);\n }\n\n ngAfterContentInit(): void {\n // On close, return focus to the trigger. Suppressing the close on an inner scroll lives in\n // `closingActions()`, so no per-visibility subscription is needed here.\n this.visibleChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((visible: boolean) => {\n if (!visible) {\n this.focus();\n }\n });\n }\n\n /** @docs-private */\n updateData() {\n if (!this.instance) return;\n\n this.instance.panelId = this.panelId;\n this.instance.content = this.content;\n this.instance.arrow = this.arrow;\n this.instance.offset = this.offset();\n this.instance.popoverMode = this.popoverMode;\n this.instance.popoverHeight = this.popoverHeight;\n this.instance.scrolledToBottomOffset = this.scrolledToBottomOffset();\n\n this.instance.updateTrapFocus(this.trigger !== PopUpTriggers.Focus);\n this.instance.detectChanges();\n\n if (this.isOpen) {\n this.updatePosition(true);\n }\n }\n\n /**\n * Updates the current position.\n *\n * @docs-private\n */\n updatePosition(reapplyPosition: boolean = false) {\n this.overlayRef = this.createOverlay();\n\n const position = (this.overlayRef.getConfig().positionStrategy as FlexibleConnectedPositionStrategy)\n .withPositions(this.getAdjustedPositions())\n .withPush(true);\n\n if (reapplyPosition) {\n setTimeout(() => position.reapplyLastPosition());\n }\n }\n\n /** @docs-private */\n getOverlayHandleComponentType(): Type<KbqNotificationCenterComponent> {\n return KbqNotificationCenterComponent;\n }\n\n /** @docs-private */\n updateClassMap(newPlacement: string = this.placement) {\n if (!this.instance) return;\n\n this.instance.updateClassMap(POSITION_TO_CSS_MAP[newPlacement], this.customClass, PopUpSizes.Medium);\n }\n\n /** @docs-private */\n closingActions() {\n return merge(\n this.overlayRef!.outsidePointerEvents(),\n this.overlayRef!.backdropClick(),\n // Only a scroll outside the panel should close it. The list viewport is a `CdkScrollable`,\n // so its own scrolling reaches the root `ScrollDispatcher` too — filtering it out here is\n // what keeps the panel open, instead of tagging the shared scrollable with a \"prevent hide\"\n // flag that would then follow it around the whole application.\n this.scrollDispatcher.scrolled().pipe(filter((scrollable) => !this.isInnerScroll(scrollable)))\n );\n }\n\n /** Whether a `ScrollDispatcher` emission originates from inside this panel's own scrollable content. */\n private isInnerScroll(scrollable: CdkScrollable | void): boolean {\n return (\n scrollable instanceof CdkScrollable &&\n !!scrollable.getElementRef().nativeElement.closest('.kbq-notification-center')\n );\n }\n}\n","<!-- `display: contents` keeps the trap out of the panel's flex layout while still scoping the focus trap\nto everything the panel renders. -->\n<div class=\"kbq-notification-center__trap\" [cdkTrapFocus]=\"isTrapFocus\">\n <div class=\"kbq-notification-center-header\">\n <div class=\"kbq-notification-center-title\">\n <div class=\"kbq-notification-center-title__text\" [id]=\"titleId\">\n {{ localeConfiguration().notifications }}\n </div>\n <button\n #notificationSwitcher\n kbq-button\n class=\"kbq-notification-center-title__button\"\n data-testid=\"kbq-notification-center-silent-mode-toggle\"\n [kbqDropdownTriggerFor]=\"notificationSwitcherDropdown\"\n [attr.aria-label]=\"\n service.silentMode()\n ? localeConfiguration().doNotDisturb\n : localeConfiguration().showPopUpNotifications\n \"\n [kbqTooltip]=\"\n service.silentMode()\n ? localeConfiguration().doNotDisturb\n : localeConfiguration().showPopUpNotifications\n \"\n [kbqTooltipArrow]=\"false\"\n [kbqPlacement]=\"'right'\"\n [kbqTooltipOffset]=\"4\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n >\n <i kbq-icon=\"{{ service.silentMode() ? 'kbq-bell-slash_16' : 'kbq-bell_16' }}\"></i>\n </button>\n </div>\n <div class=\"kbq-notification-center-toolbar\">\n @if (!service.empty()) {\n <button\n kbq-button\n class=\"kbq-notification-center-toolbar__button\"\n data-testid=\"kbq-notification-center-remove-all-button\"\n [attr.aria-label]=\"a11yLocaleConfiguration().removeAll\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n [kbqTooltip]=\"localeConfiguration().removeAll\"\n [kbqPlacement]=\"'bottom'\"\n [kbqTooltipArrow]=\"false\"\n (click)=\"removeAll()\"\n >\n <i kbq-icon=\"kbq-trash_16\"></i>\n </button>\n\n <kbq-divider [vertical]=\"true\" />\n }\n\n <button\n kbq-button\n class=\"kbq-notification-center-toolbar__button\"\n data-testid=\"kbq-notification-center-close-button\"\n [attr.aria-label]=\"a11yLocaleConfiguration().close\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n (click)=\"hide(0)\"\n >\n <i kbq-icon=\"kbq-xmark_16\"></i>\n </button>\n </div>\n </div>\n\n <!-- One persistent live region for the whole panel: a region inserted together with its text is\n not reliably announced, so only the text below ever changes. -->\n <div class=\"cdk-visually-hidden\" data-testid=\"kbq-notification-center-status\" role=\"status\" aria-live=\"polite\">\n {{ statusMessage }}\n </div>\n\n <div\n #notificationCenterContainer=\"kbqOverflowShadowContainer\"\n kbqScrollbarViewport\n kbqOverflowShadowContainer\n class=\"kbq-notification-center-container\"\n data-testid=\"kbq-notification-center-container\"\n [class.kbq-animations-disabled]=\"animationsDisabled\"\n [kbqOverflowShadowBottom]=\"notificationCenterContainer\"\n [shadow]=\"'var(--kbq-shadow-overflow-normal-bottom)'\"\n >\n @if (!service.errorMode()) {\n @if (!service.loadingMode()) {\n @for (group of service.groupedItems(); track group.id) {\n <div\n class=\"kbq-notification-center-sub-header\"\n data-testid=\"kbq-notification-center-group\"\n [kbqOverflowShadowTop]=\"$first ? notificationCenterContainer : undefined\"\n >\n <div class=\"kbq-notification-center-sub-header__date\">{{ group.title }}</div>\n\n <button\n kbq-button\n class=\"kbq-notification-center-sub-header__button\"\n data-testid=\"kbq-notification-center-remove-group-button\"\n [attr.aria-label]=\"localeConfiguration().remove\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n [kbqTooltip]=\"localeConfiguration().remove\"\n [kbqPlacement]=\"'right'\"\n [kbqTooltipArrow]=\"false\"\n (click)=\"removeGroup(group)\"\n >\n <i kbq-icon=\"kbq-trash_16\"></i>\n </button>\n </div>\n\n @for (item of group.items; track item.id) {\n <kbq-notification-item [data]=\"item\" />\n }\n } @empty {\n @if (!service.loadingMore() && !service.loadMoreErrorMode()) {\n <div\n class=\"kbq-notification-center-empty-container\"\n data-testid=\"kbq-notification-center-empty\"\n >\n <i kbq-icon-item=\"kbq-bell_16\" [big]=\"true\" [color]=\"'contrast-fade'\"></i>\n {{ localeConfiguration().noNotifications }}\n </div>\n }\n }\n\n @if (service.loadingMore()) {\n <div class=\"kbq-notification-center-load-more\" data-testid=\"kbq-notification-center-load-more\">\n <kbq-progress-spinner [mode]=\"'indeterminate'\" [size]=\"'compact'\" />\n </div>\n } @else if (service.loadMoreErrorMode()) {\n <div\n class=\"kbq-notification-center-load-more-error\"\n data-testid=\"kbq-notification-center-load-more-error\"\n >\n {{ localeConfiguration().failedToLoadNotifications }}\n <button\n kbq-button\n data-testid=\"kbq-notification-center-load-more-retry-button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'theme'\"\n (click)=\"retryLoadMore()\"\n >\n {{ localeConfiguration().repeat }}\n </button>\n </div>\n }\n } @else {\n <kbq-loader-overlay data-testid=\"kbq-notification-center-loader\" />\n }\n } @else {\n <div class=\"kbq-notification-center-error-container\" data-testid=\"kbq-notification-center-error\">\n <i kbq-icon-item=\"kbq-bell_16\" [big]=\"true\" [color]=\"'error'\" [fade]=\"true\"></i>\n {{ localeConfiguration().failedToLoadNotifications }}\n <button\n kbq-button\n data-testid=\"kbq-notification-center-reload-button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'theme'\"\n (click)=\"service.onReload.next()\"\n >\n {{ localeConfiguration().repeat }}\n </button>\n </div>\n }\n </div>\n\n <!-- `class` is KbqDropdown's own input: it moves the class onto the panel rendered in the overlay,\n which is where the check-mark width token has to be declared to reach the marks. -->\n <kbq-dropdown #notificationSwitcherDropdown=\"kbqDropdown\" class=\"kbq-notification-center-switcher\">\n <button\n kbq-dropdown-item\n data-testid=\"kbq-notification-center-show-notifications-button\"\n (click)=\"service.setSilentMode(false)\"\n >\n <i\n class=\"kbq-notification-center-switcher__mark\"\n kbq-icon=\"kbq-circle-xs_16\"\n [class.kbq-notification-center-switcher__mark_hidden]=\"service.silentMode()\"\n ></i>\n {{ localeConfiguration().showPopUpNotifications }}\n </button>\n <button\n kbq-dropdown-item\n data-testid=\"kbq-notification-center-do-not-disturb-button\"\n (click)=\"service.setSilentMode(true)\"\n >\n <i\n class=\"kbq-notification-center-switcher__mark\"\n kbq-icon=\"kbq-circle-xs_16\"\n [class.kbq-notification-center-switcher__mark_hidden]=\"!service.silentMode()\"\n ></i>\n {{ localeConfiguration().doNotDisturb }}\n </button>\n </kbq-dropdown>\n</div>\n","import { NgModule } from '@angular/core';\nimport { KbqNotificationCenterComponent, KbqNotificationCenterTrigger } from './notification-center';\n\n/**\n * Compatibility wrapper around the standalone notification center. Importing\n * `KbqNotificationCenterTrigger` directly is equivalent.\n */\n@NgModule({\n imports: [\n KbqNotificationCenterComponent,\n KbqNotificationCenterTrigger\n ],\n exports: [\n KbqNotificationCenterComponent,\n KbqNotificationCenterTrigger\n ]\n})\nexport class KbqNotificationCenterModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i4","i3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA;AACO,MAAM,oBAAoB,GAAG;AAsCpC;AACA,IAAI,eAAe,GAAG,CAAC;AAEvB;MAEa,4BAA4B,CAAA;AAyHrC;;;AAG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2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAA3B,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,YARhC,8BAA8B;AAC9B,YAAA,4BAA4B,aAG5B,8BAA8B;YAC9B,4BAA4B,CAAA,EAAA,CAAA,CAAA;AAGvB,uBAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,YARhC,8BAA8B,CAAA,EAAA,CAAA,CAAA;;4FAQzB,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAVvC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,8BAA8B;wBAC9B;AACH,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,8BAA8B;wBAC9B;AACH;AACJ,iBAAA;;;AChBD;;AAEG;;;;"}
1
+ {"version":3,"file":"koobiq-components-notification-center.mjs","sources":["../../../packages/components/notification-center/notification-center.service.ts","../../../packages/components/notification-center/notification-center.tokens.ts","../../../packages/components/notification-center/notification-item.ts","../../../packages/components/notification-center/notification-item.html","../../../packages/components/notification-center/notification-center.ts","../../../packages/components/notification-center/notification-center.html","../../../packages/components/notification-center/notification-center.module.ts","../../../packages/components/notification-center/koobiq-components-notification-center.ts"],"sourcesContent":["import { computed, inject, Injectable, Signal, signal, TemplateRef, untracked, WritableSignal } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { DateAdapter, DateFormatter, KBQ_LOCALE_SERVICE } from '@koobiq/components/core';\nimport { KbqToastService, KbqToastStyle } from '@koobiq/components/toast';\nimport { BehaviorSubject, merge, Observable, Subject } from 'rxjs';\nimport { map, skip } from 'rxjs/operators';\n\n/** A single notification rendered by the notification center. */\nexport interface KbqNotificationItem {\n /**\n * Identity of the notification, unique across the list — it is the list's track key and the key\n * the toast is matched back by. Generated on ingestion when omitted, and replaced by a generated\n * one when the supplied value is already taken by another notification.\n */\n id?: string;\n\n /** Numeric id of the shown toast, set by `push()` and consumed by `hideToast()`. */\n toastId?: number;\n\n /** Heading of the notification. */\n title?: string | TemplateRef<unknown>;\n /** Visual style; also selects the built-in icon when `icon` is `true`. */\n style?: string | KbqToastStyle;\n\n /** `true` renders the built-in icon for `style`; a template renders that template instead. */\n icon?: boolean | TemplateRef<unknown>;\n /** Extra classes for the built-in icon. */\n iconClass?: string;\n /** Secondary line below the title. */\n caption?: string | TemplateRef<unknown>;\n\n /** Body of the notification. */\n content?: string | TemplateRef<unknown>;\n /** Template with the notification's action controls. */\n actions?: TemplateRef<unknown>;\n\n /**\n * When the notification happened. Any value the configured `DateAdapter` parses without an explicit\n * format — ISO 8601, RFC 2822 or SQL for the Luxon adapter. The value drives both the day group and\n * the ordering; values the adapter cannot parse are shown verbatim in their own group instead of\n * breaking the list.\n */\n date: string;\n\n /** Whether the user has already read the notification. Defaults to `false` on ingestion. */\n read?: boolean;\n}\n\n/** Number of unread notifications above which the trigger counter switches to `\"99+\"`. */\nexport const maxUnreadItemsLength = 99;\n\n/** Notifications that happened on the same day, as rendered by one sub-header of the panel. */\nexport type KbqNotificationsGroup = {\n /** Stable identity of the day group; used as the list's track key. */\n id: string;\n /** Localized day heading. */\n title: string;\n /** Notifications of that day, newest first. */\n items: KbqNotificationItem[];\n};\n\ntype KbqNotificationsGroups = Record<string, KbqNotificationsGroup>;\n\n/**\n * Everything derived from a notification's `date`, cached per item so each value is parsed once\n * instead of once per grouping pass plus twice per sort comparison.\n *\n * Only locale-independent values live here. The day heading is localized and `DateFormatter`\n * re-localizes at runtime, so caching it would freeze a group in the locale it was first rendered in.\n */\ntype KbqParsedNotificationDate = {\n /** Raw `date` this entry was derived from; a changed value invalidates the cache. */\n source: string;\n /** Day key, built from adapter accessors so it means the same under every date adapter. */\n groupId: string;\n /** Parsed value passed to `DateAdapter.compareDateTime`, or `null` when unparsable. */\n value: unknown;\n};\n\n/** Payload emitted by `KbqNotificationCenterService.onDelete`. */\nexport type KbqNotificationDeleteEvent = {\n /** What was removed: a single item, a whole date group, or all notifications. */\n type: 'item' | 'group' | 'all';\n /** The notification items that were removed. */\n items: KbqNotificationItem[];\n};\n\n/** Suffix appended to a generated id so items ingested within the same millisecond stay distinct. */\nlet uniqueIdCounter = 0;\n\n/** State and commands of the notification center: the list itself, its modes, and the removal events. */\n@Injectable({ providedIn: 'root' })\nexport class KbqNotificationCenterService {\n private readonly adapter: DateAdapter<unknown> = inject(DateAdapter);\n private readonly formatter: DateFormatter<unknown> = inject(DateFormatter);\n private readonly toastService = inject(KbqToastService);\n private readonly localeService = inject(KBQ_LOCALE_SERVICE, { optional: true });\n\n /** Parsed `date` per item. Keyed by the item itself, so no consumer-owned object is written to. */\n private readonly parsedDates = new WeakMap<KbqNotificationItem, KbqParsedNotificationDate>();\n\n private readonly _silentMode = signal(false);\n private readonly _loadingMode = signal(false);\n private readonly _errorMode = signal(false);\n private readonly _loadingMore = signal(false);\n private readonly _loadMoreErrorMode = signal(false);\n private readonly _hasMore = signal(true);\n private readonly originalItems = signal<KbqNotificationItem[]>([]);\n\n /**\n * Bumped on every `onRead` emission: `read` is flipped in place on the consumer's object, so the list\n * itself does not change when a notification is read.\n */\n private readonly readVersion = signal(0);\n\n /**\n * Read state of each notification a view follows, as last reported by `onRead` or a list update. One per\n * item, so that reading a notification refreshes its own row only.\n */\n private readonly readStates = new WeakMap<KbqNotificationItem, WritableSignal<boolean>>();\n\n /** Pinged by every state setter; `changes` merges it with `onRead`. */\n private readonly stateChanges = new Subject<void>();\n\n /** @docs-private */\n readonly silentMode: Signal<boolean> = this._silentMode.asReadonly();\n /** @docs-private */\n readonly loadingMode: Signal<boolean> = this._loadingMode.asReadonly();\n /** @docs-private */\n readonly errorMode: Signal<boolean> = this._errorMode.asReadonly();\n\n /**\n * Whether the bottom \"load more\" spinner is shown while the next page is being loaded.\n * Note: this is the infinite-scroll indicator and is distinct from `loadingMode`,\n * which renders the full-screen loader instead of the list. Set it with `setLoadingMore()`.\n */\n readonly loadingMore: Signal<boolean> = this._loadingMore.asReadonly();\n\n /**\n * Whether the bottom \"load more\" error row (with a retry button) is shown.\n * Distinct from `errorMode`, which replaces the whole list with the full-screen error state.\n * Set it with `setLoadMoreErrorMode()`.\n */\n readonly loadMoreErrorMode: Signal<boolean> = this._loadMoreErrorMode.asReadonly();\n\n /**\n * Whether there are more notifications to load. While `true`, scrolling to the bottom\n * emits `onNextPage`; set it to `false` with `setHasMore()` to stop further infinite-scroll requests.\n */\n readonly hasMore: Signal<boolean> = this._hasMore.asReadonly();\n\n /** Emits a notification the moment it flips from unread to read. */\n readonly onRead = new BehaviorSubject<KbqNotificationItem | null>(null);\n\n /** Triggers an event when the user presses the reload button. */\n readonly onReload = new Subject<void>();\n\n /** Triggers an event when the list is scrolled to the bottom and the next page should be loaded. */\n readonly onNextPage = new Subject<void>();\n\n /** Triggers an event when an item, a group, or all notifications are removed. */\n readonly onDelete = new Subject<KbqNotificationDeleteEvent>();\n\n /**\n * Grouped notifications, always ordered from newest to oldest: day groups are sorted by date\n * descending, and notifications within each day are sorted by date descending. Notifications whose\n * `date` the adapter cannot parse keep their raw value as a group heading and sort last.\n *\n * @docs-private\n */\n readonly groupedItems: Signal<KbqNotificationsGroup[]> = computed(() => {\n // The day headings are localized, so a runtime `setLocale()` has to rebuild them.\n this.localeService?.localeId();\n\n const result: KbqNotificationsGroups = {};\n\n this.originalItems().forEach((item) => this.makeGroup(item, result));\n\n const groups = Object.values(result);\n\n // Newest notifications first within each day.\n groups.forEach((group) => group.items.sort(this.compareByDateDesc));\n\n // Newest day first.\n return groups.sort((a, b) => this.compareByDateDesc(a.items[0], b.items[0]));\n });\n\n /**\n * Emits whenever any part of the center's state changes. Carries no payload — it is a ping — and\n * emits nothing on subscription.\n */\n readonly changes: Observable<void> = merge(\n this.stateChanges,\n // The replayed current value is not a change.\n this.onRead.pipe(skip(1))\n ).pipe(map(() => undefined));\n\n /**\n * Number of unread notifications, formatted for the trigger badge: empty while nothing is unread,\n * and `\"99+\"` above `maxUnreadItemsLength`.\n */\n readonly unreadItemsCounter: Signal<string> = computed(() => {\n this.readVersion();\n\n const value = this.originalItems().filter((item) => item.read === false).length;\n\n if (value > maxUnreadItemsLength) {\n return `${maxUnreadItemsLength}+`;\n }\n\n return value ? value.toString() : '';\n });\n\n /**\n * The notifications, as a snapshot: reading them does not make an `effect()` or a `computed()` depend on the\n * list, so an effect can read and reassign it. Follow `changes` to react to updates.\n */\n get items() {\n return this.currentItems();\n }\n\n set items(values: KbqNotificationItem[]) {\n this.setItems(this.setReadState(this.setIds(values)));\n }\n\n /** Whether there are no notifications. A snapshot, like `items`. */\n get isEmpty() {\n return this.currentItems().length === 0;\n }\n\n /**\n * Whether there are no notifications, for the center's own view to follow.\n *\n * @docs-private\n */\n readonly empty: Signal<boolean> = computed(() => this.originalItems().length === 0);\n\n constructor() {\n this.onRead.pipe(takeUntilDestroyed()).subscribe((item) => {\n this.readVersion.update((version) => version + 1);\n\n if (item) this.syncReadState(item);\n });\n\n this.toastService?.read.pipe(takeUntilDestroyed()).subscribe((toastData) => {\n const item = this.currentItems().find((item) => item.id === toastData?.id);\n\n if (item && !item.read) {\n item.read = true;\n\n this.onRead.next(item);\n }\n });\n }\n\n /**\n * Whether a notification is read, for a view to follow: `read` is flipped in place on the consumer's object,\n * so a view handed that object is not told.\n *\n * @docs-private\n */\n isRead(item: KbqNotificationItem): boolean {\n let state = this.readStates.get(item);\n\n if (!state) {\n state = signal(!!item.read);\n this.readStates.set(item, state);\n }\n\n // Followed for the dependency only: a view rendered anew shows the object as it is, even after a flip\n // nothing reported.\n state();\n\n return !!item.read;\n }\n\n /** Set silent mode */\n setSilentMode(value: boolean) {\n this._silentMode.set(value);\n this.notify();\n }\n\n /** Set loading mode */\n setLoadingMode(value: boolean) {\n this._loadingMode.set(value);\n this.notify();\n }\n\n /** Set error mode */\n setErrorMode(value: boolean) {\n this._errorMode.set(value);\n this.notify();\n }\n\n /** Set the bottom \"load more\" spinner visibility. */\n setLoadingMore(value: boolean) {\n this._loadingMore.set(value);\n this.notify();\n }\n\n /** Set the bottom \"load more\" error state visibility. */\n setLoadMoreErrorMode(value: boolean) {\n this._loadMoreErrorMode.set(value);\n this.notify();\n }\n\n /** Set whether there are more notifications to load via infinite scroll. */\n setHasMore(value: boolean) {\n this._hasMore.set(value);\n this.notify();\n }\n\n /**\n * Adds a notification to the list and, unless silent mode is on, shows it as a toast.\n * Re-pushing the very same notification object is a no-op: a duplicate would show a second toast\n * and produce a colliding list key. A different notification carrying an `id` the list already\n * uses is added under a freshly generated one instead of being dropped.\n */\n push(item: KbqNotificationItem) {\n if (this.currentItems().includes(item)) {\n return;\n }\n\n this.setReadState(this.setIds([item], this.currentItems()));\n\n if (!untracked(this.silentMode)) {\n item.toastId = this.toastService.show(item).id;\n }\n\n this.setItems([...this.currentItems(), item]);\n }\n\n /** Hides the toast that corresponds to the given notification item. */\n hideToast(item: KbqNotificationItem): void {\n if (item.toastId === undefined) {\n return;\n }\n\n this.toastService.hide(item.toastId);\n item.toastId = undefined;\n }\n\n /** Removes a notification. Removing one that is not in the list is a no-op and emits nothing. */\n remove(removedItem: KbqNotificationItem) {\n if (!this.currentItems().includes(removedItem)) {\n return;\n }\n\n this.hideToast(removedItem);\n\n this.setItems(this.currentItems().filter((item) => removedItem !== item));\n\n untracked(() => this.onDelete.next({ type: 'item', items: [removedItem] }));\n }\n\n /**\n * Removes a whole day group. Only the notifications that are actually in the list are removed and\n * reported; a group holding none of them — a stale reference kept from an earlier `groupedItems`\n * value — is a no-op and emits nothing.\n */\n removeGroup(group: KbqNotificationsGroup) {\n const removedItems = group.items.filter((item) => this.currentItems().includes(item));\n\n if (removedItems.length === 0) {\n return;\n }\n\n removedItems.forEach((item) => this.hideToast(item));\n\n this.setItems(this.currentItems().filter((item) => !removedItems.includes(item)));\n\n untracked(() => this.onDelete.next({ type: 'group', items: removedItems }));\n }\n\n /** Removes every notification. Removing from an already empty list is a no-op and emits nothing. */\n removeAll() {\n const items = this.currentItems();\n\n if (items.length === 0) {\n return;\n }\n\n items.forEach((item) => this.hideToast(item));\n\n this.setItems([]);\n\n untracked(() => this.onDelete.next({ type: 'all', items }));\n }\n\n /**\n * The list as the commands see it: untracked, so a command called from a reactive context does not\n * make it depend on the list it is about to write.\n */\n private currentItems(): KbqNotificationItem[] {\n return untracked(this.originalItems);\n }\n\n private setItems(items: KbqNotificationItem[]): void {\n this.originalItems.set(items);\n // The list may be handed back with `read` flipped in place.\n items.forEach((item) => this.syncReadState(item));\n this.notify();\n }\n\n /** Tells the view of `item` its read state, which refreshes it only when the state has changed. */\n private syncReadState(item: KbqNotificationItem): void {\n this.readStates.get(item)?.set(!!item.read);\n }\n\n /**\n * `changes` subscribers run synchronously, inside whatever called the command: untracked, so a command called\n * from an `effect()` does not make it depend on the signals they read.\n */\n private notify(): void {\n untracked(() => this.stateChanges.next());\n }\n\n private makeGroup = (item: KbqNotificationItem, groups: KbqNotificationsGroups) => {\n const { groupId, source, value } = this.getParsedDate(item);\n\n if (groups[groupId]) {\n groups[groupId].items.push(item);\n } else {\n groups[groupId] = {\n id: groupId,\n // Formatted on every recomputation rather than cached with the parsed value: the heading is\n // localized, and a cached one would leave the group in the locale it was built in while\n // a group created afterwards renders in the current one.\n title: value === null ? source : this.formatter.absoluteLongDate(value),\n items: [item]\n };\n }\n };\n\n /**\n * Parses a notification's `date` once and remembers the result.\n *\n * `DateAdapter.parse` returns `null` for anything it does not recognise, and both the Luxon and the\n * Moment adapter throw when a `null` is passed on to `format`, so every derived value is resolved\n * here behind a single validity check.\n */\n private getParsedDate(item: KbqNotificationItem): KbqParsedNotificationDate {\n const source = String(item.date ?? '');\n const cached = this.parsedDates.get(item);\n\n if (cached?.source === source) {\n return cached;\n }\n\n const parsed = this.adapter.parse(source, '');\n const isValid = parsed !== null && this.adapter.isValid(parsed);\n const entry: KbqParsedNotificationDate = isValid\n ? {\n source,\n // Built from adapter accessors instead of a format string: format tokens are not\n // portable, e.g. `'yyyyMMdd'` keys every day of a week identically under Moment.\n groupId: `date:${this.adapter.getYear(parsed)}-${this.adapter.getMonth(parsed)}-${this.adapter.getDate(parsed)}`,\n value: parsed\n }\n : { source, groupId: `raw:${source}`, value: null };\n\n this.parsedDates.set(item, entry);\n\n return entry;\n }\n\n /** Compares two notifications by date so the newest comes first; unparsable dates sort last. */\n private compareByDateDesc = (a: KbqNotificationItem, b: KbqNotificationItem): number => {\n const parsedA = this.getParsedDate(a).value;\n const parsedB = this.getParsedDate(b).value;\n\n if (parsedA === null || parsedB === null) {\n return Number(parsedA === null) - Number(parsedB === null);\n }\n\n return this.adapter.compareDateTime(parsedB, parsedA);\n };\n\n /**\n * Fills in the missing ids of `items` and re-keys the ones already taken, so that every ingested\n * notification ends up with an id of its own.\n *\n * @param existing notifications `items` is joining, whose ids are therefore taken as well; empty\n * when the list is being replaced wholesale.\n */\n private setIds(items: KbqNotificationItem[], existing: KbqNotificationItem[] = []) {\n const takenIds = new Set(existing.map((item) => item.id));\n\n items.forEach((item) => {\n // A supplied id is taken on trust only while it is free: a backend that repeats one across\n // pages would otherwise collide on the list's track key and on the toast-to-item lookup in\n // the constructor. `Date.now()` alone collides for every item ingested in the same tick.\n if (item.id === undefined || takenIds.has(item.id)) {\n item.id = `${Date.now()}-${uniqueIdCounter++}`;\n }\n\n takenIds.add(item.id);\n });\n\n return items;\n }\n\n private setReadState(items: KbqNotificationItem[]) {\n items.forEach((item) => (item.read = item.read ?? false));\n\n return items;\n }\n}\n","import { InjectionToken, Provider, Signal } from '@angular/core';\nimport {\n KbqDeepPartial,\n KbqNotificationCenterLocaleConfiguration,\n kbqLocaleConfigurationOverrideProvider,\n ruRULocaleData\n} from '@koobiq/components/core';\n\n/** Default configuration of notification-center. */\nexport const KBQ_NOTIFICATION_CENTER_DEFAULT_LOCALE_CONFIGURATION: KbqNotificationCenterLocaleConfiguration =\n ruRULocaleData.notificationCenter;\n\n/** Injection Token for providing configuration of notification-center. */\nexport const KBQ_NOTIFICATION_CENTER_LOCALE_CONFIGURATION =\n new InjectionToken<KbqNotificationCenterLocaleConfiguration>('KbqNotificationCenterLocaleConfiguration', {\n factory: () => KBQ_NOTIFICATION_CENTER_DEFAULT_LOCALE_CONFIGURATION\n });\n\n/**\n * Utility provider for `KBQ_NOTIFICATION_CENTER_LOCALE_CONFIGURATION`. Only the strings you pass are overridden; the\n * rest keep following the active locale.\n */\nexport const kbqNotificationCenterLocaleConfigurationProvider = (\n configuration: KbqDeepPartial<KbqNotificationCenterLocaleConfiguration>\n): Provider => kbqLocaleConfigurationOverrideProvider('notificationCenter', configuration);\n\n/** @deprecated Use {@link KBQ_NOTIFICATION_CENTER_DEFAULT_LOCALE_CONFIGURATION}. Will be removed in 22.0.0. */\nexport const KBQ_NOTIFICATION_CENTER_DEFAULT_CONFIGURATION = KBQ_NOTIFICATION_CENTER_DEFAULT_LOCALE_CONFIGURATION;\n/** @deprecated Use {@link KBQ_NOTIFICATION_CENTER_LOCALE_CONFIGURATION}. Will be removed in 22.0.0. */\nexport const KBQ_NOTIFICATION_CENTER_CONFIGURATION = KBQ_NOTIFICATION_CENTER_LOCALE_CONFIGURATION;\n\n/** The panel members a rendered notification item depends on. */\nexport interface KbqNotificationCenterPanel {\n /** Localized strings of the panel. */\n readonly localeConfiguration: Signal<KbqNotificationCenterLocaleConfiguration>;\n /** Moves focus to a control that survives the removal, once the delete button has unmounted. */\n restoreFocusAfterRemove(): void;\n}\n\n/**\n * Narrow contract a `kbq-notification-item` consumes from the panel that renders it, instead of\n * injecting the panel component itself.\n */\nexport const KBQ_NOTIFICATION_CENTER_PANEL = new InjectionToken<KbqNotificationCenterPanel>(\n 'KbqNotificationCenterPanel'\n);\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n input,\n OnChanges,\n SimpleChanges,\n TemplateRef,\n ViewEncapsulation\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { KbqButtonModule } from '@koobiq/components/button';\nimport { DateAdapter, KbqReadStateDirective } from '@koobiq/components/core';\nimport { KbqIconModule } from '@koobiq/components/icon';\nimport { KbqTitleModule } from '@koobiq/components/title';\nimport { KbqToastStyle } from '@koobiq/components/toast';\nimport { filter } from 'rxjs/operators';\nimport { KbqNotificationCenterService, KbqNotificationItem } from './notification-center.service';\nimport { KBQ_NOTIFICATION_CENTER_PANEL } from './notification-center.tokens';\n\n/** @docs-private */\n@Component({\n selector: 'kbq-notification-item',\n imports: [\n NgTemplateOutlet,\n KbqIconModule,\n KbqTitleModule,\n KbqButtonModule\n ],\n templateUrl: './notification-item.html',\n styleUrls: ['./notification-item.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'kbq-notification-item',\n '[class]': 'styleClass',\n 'data-testid': 'kbq-notification-item'\n },\n hostDirectives: [KbqReadStateDirective]\n})\nexport class KbqNotificationItemComponent implements OnChanges {\n private readonly adapter: DateAdapter<unknown> = inject(DateAdapter);\n protected readonly service = inject(KbqNotificationCenterService);\n protected readonly readStateDirective = inject<KbqReadStateDirective>(KbqReadStateDirective, { host: true });\n protected readonly panel = inject(KBQ_NOTIFICATION_CENTER_PANEL);\n\n /** Time of day the notification happened; empty when its `date` could not be parsed. */\n protected time: string;\n\n /** Style modifier class of the host, recomputed with `data` instead of allocated on every check. */\n protected styleClass: string = '';\n\n /** Context handed to the consumer's templates. Exposes the item only, never this component. */\n protected context: { $implicit: KbqNotificationItem };\n\n // `KbqToastService` used to write these defaults into the item handed to `push()`; it now leaves the\n // caller's object untouched, so the row resolves them itself instead of rendering an unstyled,\n // icon-less notification.\n protected get style(): string | KbqToastStyle {\n return this.data.style || KbqToastStyle.Contrast;\n }\n\n protected get icon(): boolean | TemplateRef<unknown> {\n return this.data.icon ?? true;\n }\n\n protected get read(): boolean {\n return this.service.isRead(this.data);\n }\n\n get data(): KbqNotificationItem {\n return this._data;\n }\n\n set data(value: KbqNotificationItem) {\n this._data = value;\n this.context = { $implicit: value };\n // Through `style`, so an item pushed without one still gets the contrast modifier rather than\n // no class at all.\n this.styleClass = `kbq-notification-item_${this.style}`;\n\n // `DateAdapter.parse` returns null for anything it does not recognise, and every adapter throws\n // when that null reaches `format` — which would take the whole panel down with it.\n const parsed = this.adapter.parse(value.date, '');\n\n this.time = parsed !== null && this.adapter.isValid(parsed) ? this.adapter.format(parsed, 'HH:mm') : '';\n }\n\n private _data: KbqNotificationItem;\n\n /** @docs-private */\n readonly dataInput = input<KbqNotificationItem | undefined>(undefined, { alias: 'data' });\n\n ngOnChanges(changes: SimpleChanges): void {\n // A bound input is handed to its member; unbound, it leaves what code wrote.\n if (changes['dataInput']) {\n const data = this.dataInput();\n\n if (data !== undefined) this.data = data;\n }\n }\n\n constructor() {\n this.readStateDirective.read\n .pipe(\n filter((value: boolean) => value),\n takeUntilDestroyed()\n )\n .subscribe(() => {\n if (this.data.read) {\n return;\n }\n\n this.data.read = true;\n\n this.service.onRead.next(this.data);\n });\n }\n\n /** Removes this notification, keeping keyboard focus inside the panel once the button unmounts. */\n protected remove(): void {\n this.panel.restoreFocusAfterRemove();\n\n this.service.remove(this.data);\n }\n\n protected isTemplateRef(value: unknown): boolean {\n return value instanceof TemplateRef;\n }\n}\n","@if (icon) {\n <div class=\"kbq-notification-item__icon-container layout-row layout-align-start-start\">\n @if (icon === true) {\n @switch (style) {\n @case ('contrast') {\n <i\n kbq-icon=\"kbq-circle-info_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"'contrast'\"\n [class]=\"data.iconClass\"\n ></i>\n }\n @case ('success') {\n <i\n kbq-icon=\"kbq-circle-check_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"'success'\"\n [class]=\"data.iconClass\"\n ></i>\n }\n @case ('warning') {\n <i\n kbq-icon=\"kbq-triangle-exclamation_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"'warning'\"\n [class]=\"data.iconClass\"\n ></i>\n }\n @case ('error') {\n <i\n kbq-icon=\"kbq-triangle-exclamation_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"'error'\"\n [class]=\"data.iconClass\"\n ></i>\n }\n }\n } @else if (isTemplateRef(icon)) {\n <ng-container [ngTemplateOutlet]=\"$any(icon)\" [ngTemplateOutletContext]=\"context\" />\n }\n </div>\n}\n\n<div class=\"kbq-notification-item__container\">\n @if (data.title) {\n <div\n kbq-title\n class=\"kbq-notification-item__title\"\n [class.kbq-notification-item__title_with-content]=\"data.caption || data.content\"\n >\n @if (isTemplateRef(data.title)) {\n <ng-container [ngTemplateOutlet]=\"$any(data.title)\" [ngTemplateOutletContext]=\"context\" />\n } @else {\n <p data-testid=\"kbq-notification-item-title\">{{ data.title }}</p>\n }\n\n @if (!read) {\n <!-- Unread is otherwise conveyed by the dot below alone. It sits outside the time block\n because that block is visually hidden while the row is hovered or focused, which would\n take the text out of the accessibility tree with it. -->\n <span class=\"cdk-visually-hidden\">{{ panel.localeConfiguration().unread }}</span>\n }\n\n <div\n class=\"kbq-notification-item-time\"\n data-testid=\"kbq-notification-item-time\"\n [class.kbq-notification-item-time_read]=\"read\"\n >\n <div class=\"kbq-notification-item-time__value\" data-testid=\"kbq-notification-item-time-value\">\n {{ time }}\n </div>\n <i\n class=\"kbq-notification-item-time__state\"\n kbq-icon=\"kbq-circle-xs_16\"\n aria-hidden=\"true\"\n [color]=\"'theme'\"\n ></i>\n </div>\n </div>\n }\n\n @if (data.caption) {\n <div\n kbq-title\n [class.kbq-notification-item__text]=\"data.title\"\n [class.kbq-notification-item__title]=\"!data.title\"\n >\n @if (isTemplateRef(data.caption)) {\n <ng-container [ngTemplateOutlet]=\"$any(data.caption)\" [ngTemplateOutletContext]=\"context\" />\n } @else {\n {{ data.caption }}\n }\n </div>\n }\n\n @if (data.content) {\n <div class=\"kbq-notification-item__content\">\n @if (isTemplateRef(data.content)) {\n <ng-container [ngTemplateOutlet]=\"$any(data.content)\" [ngTemplateOutletContext]=\"context\" />\n } @else {\n {{ data.content }}\n }\n </div>\n }\n\n @if (data.actions) {\n <div class=\"kbq-notification-item__actions\">\n @if (isTemplateRef(data.actions)) {\n <ng-container [ngTemplateOutlet]=\"$any(data.actions)\" [ngTemplateOutletContext]=\"context\" />\n } @else {\n {{ data.actions }}\n }\n </div>\n }\n</div>\n\n<button\n kbq-button\n class=\"kbq-notification-item__remove-button\"\n data-testid=\"kbq-notification-item-remove-button\"\n [attr.aria-label]=\"panel.localeConfiguration().remove\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n (click)=\"remove()\"\n>\n <i kbq-icon=\"kbq-trash_16\"></i>\n</button>\n","import {\n CdkTrapFocus,\n ConfigurableFocusTrapFactory,\n FOCUS_TRAP_INERT_STRATEGY,\n FocusMonitor,\n FocusTrapFactory,\n InputModalityDetector,\n _IdGenerator\n} from '@angular/cdk/a11y';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { FlexibleConnectedPositionStrategy, Overlay, OverlayConfig, ScrollStrategy } from '@angular/cdk/overlay';\nimport { CdkScrollable, ScrollDispatcher } from '@angular/cdk/scrolling';\nimport { DOCUMENT } from '@angular/common';\nimport {\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n Directive,\n EventEmitter,\n InjectionToken,\n Injector,\n NgZone,\n OnChanges,\n RendererStyleFlags2,\n Signal,\n SimpleChanges,\n TemplateRef,\n Type,\n ViewEncapsulation,\n afterNextRender,\n booleanAttribute,\n forwardRef,\n inject,\n input,\n numberAttribute,\n viewChild\n} from '@angular/core';\nimport { outputFromObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { KbqBadgeModule } from '@koobiq/components/badge';\nimport { KbqButton, KbqButtonModule } from '@koobiq/components/button';\nimport {\n EmptyFocusTrapStrategy,\n KBQ_A11Y_LOCALE_CONFIGURATION,\n KbqLocaleOverridesDirective,\n KbqOverflowShadowBottom,\n KbqOverflowShadowContainer,\n KbqOverflowShadowTop,\n KbqPopUp,\n KbqPopUpPlacementValues,\n KbqPopUpSizeValues,\n KbqPopUpTrigger,\n KbqStickToWindowPlacementValues,\n POSITION_TO_CSS_MAP,\n PopUpPlacements,\n PopUpSizes,\n PopUpTriggers,\n applyPopupMargins,\n kbqSiblingPopupProvider\n} from '@koobiq/components/core';\nimport { KbqDividerModule } from '@koobiq/components/divider';\nimport { KbqDropdownModule } from '@koobiq/components/dropdown';\nimport { KbqIconModule } from '@koobiq/components/icon';\nimport { KbqLoaderOverlayModule } from '@koobiq/components/loader-overlay';\nimport { KbqProgressSpinnerModule } from '@koobiq/components/progress-spinner';\nimport { KbqScrollbarViewport } from '@koobiq/components/scrollbar';\nimport { KbqToolTipModule } from '@koobiq/components/tooltip';\nimport { Observable, Subject, merge } from 'rxjs';\nimport { auditTime, distinctUntilChanged, filter, map } from 'rxjs/operators';\nimport { KbqNotificationCenterService, KbqNotificationsGroup } from './notification-center.service';\nimport {\n KBQ_NOTIFICATION_CENTER_LOCALE_CONFIGURATION,\n KBQ_NOTIFICATION_CENTER_PANEL,\n KbqNotificationCenterPanel\n} from './notification-center.tokens';\nimport { KbqNotificationItemComponent } from './notification-item';\n\nconst defaultOffsetX = 8;\n\nconst defaultPlacement = PopUpPlacements.Right;\n\n/** Rate-limit window (ms) for the scroll-to-bottom check that drives infinite scroll. */\nconst SCROLLED_TO_BOTTOM_AUDIT_TIME = 100;\n\n/**\n * Tolerance (px) applied when checking whether the list has reached its bottom.\n *\n * `scrollHeight` and `clientHeight` are CSSOM `long`s (rounded to the nearest integer) while\n * `scrollTop` is an `unrestricted double`. At fractional browser zoom or a fractional\n * `devicePixelRatio` the layout lands on fractional CSS pixels and the two roundings go\n * independently, so at the true bottom `scrollHeight - scrollTop - clientHeight` lands anywhere in\n * (-1, 1) rather than on 0 — an exact `<= 0` check then succeeds only about half the time. Below\n * 100% zoom one device pixel is wider than one CSS pixel, which scales the residual by ~1/zoom and\n * pushes it past 1. 2px covers zoom down to 50% and is imperceptible as a trigger threshold.\n *\n * See [`Element.scrollHeight`](https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight) on MDN.\n */\nconst SCROLLED_TO_BOTTOM_TOLERANCE = 2;\n\n/** Custom property the panel height is published through, so the stylesheet stays the single owner. */\nconst POPOVER_HEIGHT_PROPERTY = '--kbq-notification-center-popover-height';\n\n/** Delete buttons of the day groups and of the individual notifications. */\nconst REMOVE_BUTTON_SELECTOR = '.kbq-notification-center-sub-header__button, .kbq-notification-item__remove-button';\n\n/**\n * Rate-limit window (ms) the reposition scroll strategy runs on. The panel re-applies its\n * stick-to-window styles on the same window, so the two stay in step.\n */\nconst SCROLL_REPOSITION_THROTTLE = 20;\n\n/** @docs-private */\nexport const KBQ_NOTIFICATION_CENTER_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>(\n 'kbq-notification-center-scroll-strategy',\n {\n providedIn: 'root',\n factory: () => kbqNotificationCenterScrollStrategyFactory(inject(Overlay))\n }\n);\n\n/** @docs-private */\nexport function kbqNotificationCenterScrollStrategyFactory(overlay: Overlay): () => ScrollStrategy {\n return () => overlay.scrollStrategies.reposition({ scrollThrottle: SCROLL_REPOSITION_THROTTLE });\n}\n\n/** @docs-private */\n@Component({\n selector: 'kbq-notification-center',\n imports: [\n KbqIconModule,\n KbqBadgeModule,\n KbqScrollbarViewport,\n KbqButtonModule,\n KbqDividerModule,\n KbqDropdownModule,\n KbqToolTipModule,\n CdkTrapFocus,\n KbqNotificationItemComponent,\n KbqLoaderOverlayModule,\n KbqProgressSpinnerModule,\n KbqOverflowShadowContainer,\n KbqOverflowShadowTop,\n KbqOverflowShadowBottom\n ],\n templateUrl: './notification-center.html',\n styleUrls: ['./notification-center.scss', './notification-center-tokens.scss'],\n providers: [\n // The panel traps focus, so it needs a configurable trap even when it is imported standalone —\n // these used to be reachable only through KbqNotificationCenterModule.\n { provide: FocusTrapFactory, useClass: ConfigurableFocusTrapFactory },\n { provide: FOCUS_TRAP_INERT_STRATEGY, useClass: EmptyFocusTrapStrategy },\n { provide: KBQ_NOTIFICATION_CENTER_PANEL, useExisting: forwardRef(() => KbqNotificationCenterComponent) }\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'kbq-notification-center',\n role: 'dialog',\n '[attr.id]': 'panelId',\n '[attr.aria-labelledby]': 'titleId',\n '[class.kbq-notification-center_popover]': 'popoverMode',\n '(keydown.escape)': 'escapeHandler($any($event))'\n },\n // Carrier only: the panel is created through the overlay, so there is no element for a consumer to bind\n // on. It re-merges the carriers above the trigger and lets the panel read its strings through `read()`.\n hostDirectives: [KbqLocaleOverridesDirective],\n preserveWhitespaces: false\n})\nexport class KbqNotificationCenterComponent extends KbqPopUp implements AfterViewInit, KbqNotificationCenterPanel {\n /** @docs-private */\n protected readonly service = inject(KbqNotificationCenterService);\n\n private readonly injector = inject(Injector);\n private readonly ngZone = inject(NgZone);\n private readonly idGenerator = inject(_IdGenerator);\n private readonly scrollDispatcher = inject(ScrollDispatcher);\n private readonly document = inject(DOCUMENT);\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly inputModalityDetector = inject(InputModalityDetector);\n\n private readonly carrier = inject(KbqLocaleOverridesDirective, { self: true });\n\n /**\n * Accessible names for the icon-only toolbar buttons.\n *\n * @docs-private\n */\n protected readonly a11yLocaleConfiguration = this.carrier.read('a11y', KBQ_A11Y_LOCALE_CONFIGURATION);\n\n /**\n * Localized strings of the notification center.\n *\n * Read through a signal so that a runtime `setLocale()` reaches `KbqNotificationItemComponent`, which\n * renders these strings from its own `OnPush` view: a `markForCheck()` here would mark this component\n * only, never the already-rendered items.\n */\n readonly localeConfiguration = this.carrier.read(\n 'notificationCenter',\n KBQ_NOTIFICATION_CENTER_LOCALE_CONFIGURATION\n );\n\n /**\n * Id of the panel heading, referenced by the host's `aria-labelledby`.\n *\n * @docs-private\n */\n protected readonly titleId = this.idGenerator.getId('kbq-notification-center-title-');\n\n /**\n * Id of the panel element, set by the trigger so it can point `aria-controls` at it.\n *\n * @docs-private\n */\n protected panelId: string;\n\n /** @docs-private */\n protected popoverMode: boolean;\n\n /**\n * Distance in pixels from the bottom of the list at which the next page is requested.\n *\n * @docs-private\n */\n protected scrolledToBottomOffset: number = 0;\n\n /** Re-measures the list outside of a scroll event: on first render and whenever the state changes. */\n /** Whether a re-measurement is already queued for the next render. */\n private scrolledToBottomRecheckPending = false;\n\n private readonly scrolledToBottomRecheck = new Subject<void>();\n\n /**\n * Text of the panel's single live region. The panel keeps one persistent region and only changes\n * its text, because a region inserted together with its content is not reliably announced.\n *\n * @docs-private\n */\n protected get statusMessage(): string {\n // Branch in the template's own order, or the region announces a state that is not on screen:\n // the full-screen error wins over everything, then the full-screen loader, then the bottom\n // spinner, then the bottom error row, and only an otherwise idle empty list reads as empty.\n if (this.service.errorMode()) {\n return this.localeConfiguration().failedToLoadNotifications;\n }\n\n if (this.service.loadingMode() || this.service.loadingMore()) {\n return this.localeConfiguration().loadingMore;\n }\n\n if (this.service.loadMoreErrorMode()) {\n return this.localeConfiguration().failedToLoadNotifications;\n }\n\n return this.service.empty() ? this.localeConfiguration().noNotifications : '';\n }\n\n /** @docs-private */\n prefix = 'kbq-notification-center';\n /** @docs-private */\n trigger: KbqNotificationCenterTrigger;\n /** @docs-private */\n isTrapFocus: boolean = false;\n\n readonly switcher = viewChild.required<KbqButton>('notificationSwitcher');\n\n /** Scrollable list container; used to measure scroll position for infinite scroll. */\n private readonly scrollContainer = viewChild.required(KbqScrollbarViewport);\n\n get popoverHeight(): string {\n return this._popoverHeight;\n }\n\n set popoverHeight(value: string) {\n this._popoverHeight = value;\n\n if (value) {\n this.renderer.setStyle(\n this.elementRef.nativeElement,\n POPOVER_HEIGHT_PROPERTY,\n value,\n RendererStyleFlags2.DashCase\n );\n } else {\n this.renderer.removeStyle(\n this.elementRef.nativeElement,\n POPOVER_HEIGHT_PROPERTY,\n RendererStyleFlags2.DashCase\n );\n }\n }\n\n private _popoverHeight: string;\n\n constructor() {\n super();\n }\n\n ngAfterViewInit() {\n this.visibleChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((state) => {\n if (this.offset !== null && state) {\n applyPopupMargins(\n this.renderer,\n this.elementRef.nativeElement,\n this.prefix,\n `${this.offset!.toString()}px`\n );\n }\n\n this.setStickPosition();\n });\n\n // The reposition scroll strategy rewrites the pane's top/left/bottom/right on every scroll the\n // application makes — including the panel's own list, which is a registered `CdkScrollable` —\n // wiping the manual styles `setStickPosition()` writes. This subscription is created after the\n // strategy has been enabled (`OverlayRef.attach()` runs before the panel's first change\n // detection), so on the same audit window it re-applies them behind the strategy.\n // The panel is also rendered on its own, without a trigger, so the guard covers more than the\n // absent `stickToWindow`.\n this.scrollDispatcher\n .scrolled(SCROLL_REPOSITION_THROTTLE)\n .pipe(\n filter(() => !!this.trigger?.stickToWindow),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(() => this.setStickPosition());\n\n this.service.changes\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.scheduleScrolledToBottomCheck());\n\n // Focused with the modality the user actually opened the panel with, so a keyboard-driven open\n // keeps its focus ring while a click does not. Not `KbqButton.focusViaKeyboard()`, which hardcodes\n // `'keyboard'` and paints the ring on the toggle for a mouse user, and not FocusMonitor's own last\n // origin, which reports `program` for a click landing outside its detection window (same rule as\n // `KbqBasePipe.currentFocusOrigin`).\n const switcher = this.switcher();\n\n // Mirrors `focusViaKeyboard()`'s own early return, which this no longer goes through.\n if (!switcher.disabled) {\n this.focusMonitor.focusVia(\n switcher.getHostElement(),\n this.inputModalityDetector.mostRecentModality ?? 'program'\n );\n }\n\n this.subscribeToScrolledToBottom();\n this.subscribeToRevealLoadMoreRow();\n\n // A first page too short to overflow the viewport produces no scroll event at all, so measure\n // once the panel has rendered or infinite scroll would never start.\n this.scheduleScrolledToBottomCheck();\n }\n\n /**\n * Removes a whole day group, keeping keyboard focus inside the panel.\n *\n * @docs-private\n */\n protected removeGroup(group: KbqNotificationsGroup): void {\n this.restoreFocusAfterRemove();\n\n this.service.removeGroup(group);\n }\n\n /**\n * Removes every notification, keeping keyboard focus inside the panel.\n *\n * @docs-private\n */\n protected removeAll(): void {\n this.restoreFocusAfterRemove();\n\n this.service.removeAll();\n }\n\n /**\n * Moves focus to a surviving delete button — or to the list container when the last one is gone —\n * once the removal has rendered. Without it, focus falls back to `<body>` and the Escape handler\n * and the rest of the panel become unreachable.\n */\n restoreFocusAfterRemove(): void {\n // Read before the removal renders, while the activated button is still in the DOM: its place in\n // document order is what decides where focus goes next. Asking for the first match afterwards\n // would always answer with the first day group's \"delete this day\" button, wherever the user\n // actually was — a destructive control they never aimed at, hidden behind that group's own\n // sticky header.\n const removedIndex = this.getRemoveButtons().indexOf(this.document.activeElement as HTMLElement);\n\n afterNextRender(\n () => {\n const survivors = this.getRemoveButtons();\n // The button that took the removed one's place, or the last one before it. A removal\n // that did not start from a delete button — or that took the last one with it — falls\n // back to the list container, which keeps the panel operable without parking focus on\n // an arbitrary destructive control.\n const survivor =\n removedIndex < 0 ? undefined : survivors[removedIndex] || survivors[survivors.length - 1];\n\n if (survivor) {\n survivor.focus();\n } else {\n this.focusScrollContainer();\n }\n },\n { injector: this.injector }\n );\n }\n\n /** Delete buttons of the day groups and of the individual notifications, in document order. */\n private getRemoveButtons(): HTMLElement[] {\n return Array.from(this.elementRef.nativeElement.querySelectorAll<HTMLElement>(REMOVE_BUTTON_SELECTOR));\n }\n\n /**\n * Retries loading the next page from the bottom error row.\n *\n * @docs-private\n */\n protected retryLoadMore(): void {\n // The retry button is about to unmount; keep keyboard focus inside the panel instead of\n // letting it fall back to <body>.\n this.focusScrollContainer();\n\n // Clear the bottom error state here so the spinner and the error row can never be shown at\n // the same time, regardless of what the consumer's `onNextPage` handler does.\n this.service.setLoadMoreErrorMode(false);\n\n this.service.onNextPage.next();\n }\n\n /**\n * Requests the next page (via `service.onNextPage`) once the list is scrolled to within\n * `scrolledToBottomOffset` pixels of the bottom. Two triggers feed it: the user scrolling, and a\n * re-measurement after the panel's state has rendered. The latter keeps paging when a freshly\n * loaded page is too short to overflow the viewport — otherwise no further scroll event would fire\n * and pagination would stall. Suppressed while a load is in flight, errored, or when there is\n * nothing more to load.\n */\n private subscribeToScrolledToBottom(): void {\n const scrolledToBottom$ = this.scrollContainer().scrollChanges.pipe(\n auditTime(SCROLLED_TO_BOTTOM_AUDIT_TIME),\n map(() => this.isScrolledToBottom()),\n distinctUntilChanged(),\n filter(Boolean)\n );\n\n // Deliberately without `distinctUntilChanged`: a re-measurement that finds the list still at\n // the bottom must keep paging even though the previous measurement said the same.\n const rechecked$ = this.scrolledToBottomRecheck.pipe(\n auditTime(SCROLLED_TO_BOTTOM_AUDIT_TIME),\n filter(() => this.isScrolledToBottom())\n );\n\n merge(scrolledToBottom$, rechecked$)\n .pipe(takeUntilDestroyed(this.destroyRef))\n // `scrollChanges` is `CdkScrollable.elementScrolled()` and emits outside Angular's zone, so\n // re-enter before touching consumer-facing state.\n .subscribe(() => this.ngZone.run(() => this.requestNextPage()));\n }\n\n /** Queues a re-measurement for after the next render, when the DOM reflects the new state. */\n private scheduleScrolledToBottomCheck(): void {\n // At most one pending re-measurement: `requestNextPage` flips the service's own loading flags,\n // which ping `changes` in turn, so an unguarded schedule feeds itself for as long as the list\n // reports it is at the bottom — each render callback queueing the next one.\n if (this.scrolledToBottomRecheckPending) {\n return;\n }\n\n this.scrolledToBottomRecheckPending = true;\n\n afterNextRender(\n () => {\n this.scrolledToBottomRecheckPending = false;\n\n this.scrolledToBottomRecheck.next();\n },\n { injector: this.injector }\n );\n }\n\n /**\n * Whether the list is scrolled to within `scrolledToBottomOffset` pixels of the bottom.\n * Sub-pixel measurement error is absorbed by `SCROLLED_TO_BOTTOM_TOLERANCE`.\n */\n private isScrolledToBottom(): boolean {\n const { scrollTop, clientHeight, scrollHeight } = this.scrollContainer().getNativeElement();\n\n // A container that has not been laid out yet has no bottom to reach. Without this guard the\n // all-zero measurement reads as \"at the bottom\" and requests page after page into nothing.\n if (clientHeight === 0) {\n return false;\n }\n\n return scrollHeight - scrollTop - clientHeight <= this.scrolledToBottomOffset + SCROLLED_TO_BOTTOM_TOLERANCE;\n }\n\n /** Emits `onNextPage` unless a load is already in flight, errored, or there is nothing more to load. */\n private requestNextPage(): void {\n if (this.service.hasMore() && !this.service.loadingMore() && !this.service.loadMoreErrorMode()) {\n this.service.onNextPage.next();\n }\n }\n\n /**\n * Reveals the bottom \"load more\" spinner / error row when it first appears. Both rows are appended\n * below the last item and can land outside the viewport (the next page is requested while the user\n * is up to `scrolledToBottomOffset` px above the true bottom). Only a genuine false->true transition\n * after the panel opened reveals the row, so the panel always opens scrolled to the top — reopening\n * it while a load-more error is still set never jumps to the bottom.\n */\n private subscribeToRevealLoadMoreRow(): void {\n const reveal = (isShown: () => boolean): Observable<void> => {\n let wasShown = isShown();\n\n return this.service.changes.pipe(\n filter(() => {\n const shown = isShown();\n const appeared = shown && !wasShown;\n\n wasShown = shown;\n\n return appeared;\n }),\n auditTime(SCROLLED_TO_BOTTOM_AUDIT_TIME)\n );\n };\n\n merge(\n reveal(() => this.service.loadingMore()),\n reveal(() => this.service.loadMoreErrorMode())\n )\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => this.scrollToBottom());\n }\n\n /** Scrolls the list container to its bottom so a freshly-appended bottom row becomes visible. */\n private scrollToBottom(): void {\n const { scrollHeight } = this.scrollContainer().getNativeElement();\n\n this.scrollContainer().scrollTo({ top: scrollHeight });\n }\n\n private focusScrollContainer(): void {\n const element = this.scrollContainer().getNativeElement();\n\n // tabindex -1 keeps the container out of the Tab order while allowing programmatic focus.\n element.setAttribute('tabindex', '-1');\n element.focus({ preventScroll: true });\n }\n\n /** @docs-private */\n updateClassMap(placement: string, customClass: string, size: KbqPopUpSizeValues) {\n super.updateClassMap(placement, customClass, { [`${this.prefix}_${size}`]: !!size });\n }\n\n /** @docs-private */\n updateTrapFocus(isTrapFocus: boolean): void {\n this.isTrapFocus = isTrapFocus;\n }\n\n /**\n * Closes the panel on `Escape` inside it, unless a control there spent the key closing a popup of its own.\n *\n * @docs-private\n */\n escapeHandler(event?: KeyboardEvent) {\n if (event?.defaultPrevented) return;\n\n // Spent, so that a container closing on Escape underneath, such as a sidepanel, stays open.\n event?.preventDefault();\n this.hide(0);\n }\n}\n\n@Directive({\n selector: '[kbqNotificationCenterTrigger]',\n providers: [kbqSiblingPopupProvider(KbqNotificationCenterTrigger)],\n host: {\n '[class.kbq-notification-center_open]': 'isOpen',\n '[class.kbq-active]': 'hasClickTrigger && isOpen',\n '[attr.aria-expanded]': 'isOpen',\n '[attr.aria-controls]': 'isOpen ? panelId : null'\n },\n exportAs: 'kbqNotificationCenterTrigger'\n})\nexport class KbqNotificationCenterTrigger\n extends KbqPopUpTrigger<KbqNotificationCenterComponent>\n implements OnChanges, AfterContentInit\n{\n /** @docs-private */\n protected scrollStrategy: () => ScrollStrategy = inject(KBQ_NOTIFICATION_CENTER_SCROLL_STRATEGY);\n /** @docs-private */\n protected readonly service = inject(KbqNotificationCenterService);\n\n /**\n * Id handed to the panel so `aria-controls` can point at it while it is open.\n *\n * @docs-private\n */\n protected readonly panelId = inject(_IdGenerator).getId('kbq-notification-center-panel-');\n\n /**\n * Not used.\n *\n * @docs-private\n */\n arrow: boolean = false;\n\n /** @docs-private */\n customClass: string;\n /** @docs-private */\n content: string | TemplateRef<unknown>;\n\n /** Number of unread notifications, formatted for the trigger badge. */\n get unreadItemsCounter(): Signal<string> {\n return this.service.unreadItemsCounter;\n }\n\n /** Placement of popUp */\n placement: KbqPopUpPlacementValues = defaultPlacement;\n\n /** Class that will be used in the background */\n readonly backdropClass = input<string>('cdk-overlay-transparent-backdrop');\n\n /** Class that will be used in the panel */\n readonly panelClass = input<string>('', { alias: 'kbqNotificationCenterPanelClass' });\n\n /** Offset of popUp */\n readonly offset = input<number, unknown>(defaultOffsetX, { transform: numberAttribute });\n\n /** Distance in pixels from the bottom of the list at which the next page is requested via `onNextPage`. */\n readonly scrolledToBottomOffset = input<number, unknown>(0, { transform: numberAttribute });\n\n /** Use popover or not */\n get popoverMode(): boolean {\n return this._popoverMode;\n }\n\n set popoverMode(value: boolean) {\n if (value === this._popoverMode) {\n return;\n }\n\n this._popoverMode = value;\n\n // The placement in force before the mode took over is remembered rather than assumed: a consumer\n // may have bound one of its own, and turning the mode off used to leave the popover placement\n // behind for good.\n if (value) {\n this.placementBeforePopoverMode = { placement: this.placement, priority: this.placementPriority };\n\n this.placement = PopUpPlacements.Bottom;\n this.updatePlacementPriority(['bottomCenter', 'bottomLeft', 'bottomRight']);\n } else if (this.placementBeforePopoverMode) {\n this.placement = this.placementBeforePopoverMode.placement;\n this.updatePlacementPriority(this.placementBeforePopoverMode.priority as KbqPopUpPlacementValues[]);\n\n this.placementBeforePopoverMode = null;\n }\n }\n\n /** Placement and priority in force before `popoverMode` replaced them. */\n private placementBeforePopoverMode: {\n placement: KbqPopUpPlacementValues;\n priority: string | string[] | null;\n } | null = null;\n\n private _popoverMode: boolean = false;\n\n /** Set height of popover. Default is `calc(100vh - <navbar height>)`. */\n get popoverHeight(): string {\n return this._popoverHeight;\n }\n\n set popoverHeight(value: string) {\n this._popoverHeight = value;\n\n // Guarding on the open panel, not on its current height: the previous `instance?.popoverHeight`\n // check made the first set a no-op and made clearing the height impossible.\n if (this.instance) {\n this.instance.popoverHeight = value;\n }\n }\n\n private _popoverHeight: string;\n\n /** Whether the trigger is disabled. */\n get disabled(): boolean {\n return this._disabled;\n }\n\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n\n if (this._disabled) {\n this.hide();\n }\n }\n\n /**\n * Additionally positions the element relative to the window side (Top, Right, Bottom and Left).\n * If container is specified, the positioning will be relative to it.\n * */\n stickToWindow: KbqStickToWindowPlacementValues | undefined;\n\n /** Container for additional positioning, used with stickToWindow */\n container: HTMLElement | undefined;\n\n /** @docs-private */\n get hasClickTrigger(): boolean {\n return this.trigger.includes(PopUpTriggers.Click);\n }\n\n /** Emits a change event whenever the placement state changes. */\n readonly placementChange = new EventEmitter<KbqPopUpPlacementValues>();\n\n /** @docs-private */\n readonly placementChangeOutput = outputFromObservable(this.placementChange, { alias: 'kbqPlacementChange' });\n\n /** Emits a change event whenever the visible state changes. */\n readonly visibleChange = new EventEmitter<boolean>();\n\n /** @docs-private */\n readonly visibleChangeOutput = outputFromObservable(this.visibleChange, { alias: 'kbqVisibleChange' });\n\n /** @docs-private */\n trigger: string = `${PopUpTriggers.Click}, ${PopUpTriggers.Keydown}`;\n\n /** @docs-private */\n protected originSelector = '.kbq-notification-center';\n\n /** @docs-private */\n protected get overlayConfig(): OverlayConfig {\n const defaultPanelClass = 'kbq-notification-center__panel';\n const panelClass = this.panelClass();\n\n return {\n panelClass: panelClass ? [defaultPanelClass, panelClass] : defaultPanelClass,\n hasBackdrop: false,\n backdropClass: this.backdropClass()\n };\n }\n\n /** @docs-private */\n readonly placementInput = input<KbqPopUpPlacementValues | undefined>(undefined, {\n alias: 'kbqNotificationCenterPlacement'\n });\n\n /** @docs-private */\n readonly popoverModeInput = input<boolean | undefined, boolean | string | null | undefined>(undefined, {\n alias: 'popoverMode',\n transform: booleanAttribute\n });\n\n /** @docs-private */\n readonly popoverHeightInput = input<string | undefined>(undefined, { alias: 'popoverHeight' });\n\n /** @docs-private */\n readonly stickToWindowInput = input<KbqStickToWindowPlacementValues | undefined>(undefined, {\n alias: 'stickToWindow'\n });\n\n /** @docs-private */\n readonly containerInput = input<HTMLElement | undefined>(undefined, { alias: 'container' });\n\n /** @docs-private */\n readonly disabledInput = input<boolean | undefined, boolean | string | null | undefined>(undefined, {\n alias: 'disabled',\n transform: booleanAttribute\n });\n\n ngOnChanges(changes: SimpleChanges): void {\n // A bound input is handed to its member, a bound `undefined` as the member's default; unbound, it leaves\n // what code wrote.\n if (changes['placementInput']) {\n this.placement = this.placementInput() ?? defaultPlacement;\n }\n\n if (changes['popoverModeInput']) {\n const popoverMode = this.popoverModeInput();\n\n if (popoverMode !== undefined) this.popoverMode = popoverMode;\n }\n\n if (changes['popoverHeightInput']) {\n this.popoverHeight = this.popoverHeightInput() ?? '';\n }\n\n if (changes['stickToWindowInput']) {\n this.stickToWindow = this.stickToWindowInput();\n }\n\n if (changes['containerInput']) {\n this.container = this.containerInput();\n }\n\n if (changes['disabledInput']) {\n const disabled = this.disabledInput();\n\n if (disabled !== undefined) this.disabled = disabled;\n }\n }\n\n constructor() {\n super();\n\n this.updatePlacementPriority(['right', 'rightBottom', 'rightTop']);\n }\n\n ngAfterContentInit(): void {\n // On close, return focus to the trigger. Suppressing the close on an inner scroll lives in\n // `closingActions()`, so no per-visibility subscription is needed here.\n this.visibleChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((visible: boolean) => {\n if (!visible) {\n this.focus();\n }\n });\n }\n\n /** @docs-private */\n updateData() {\n if (!this.instance) return;\n\n this.instance.panelId = this.panelId;\n this.instance.content = this.content;\n this.instance.arrow = this.arrow;\n this.instance.offset = this.offset();\n this.instance.popoverMode = this.popoverMode;\n this.instance.popoverHeight = this.popoverHeight;\n this.instance.scrolledToBottomOffset = this.scrolledToBottomOffset();\n\n this.instance.updateTrapFocus(this.trigger !== PopUpTriggers.Focus);\n this.instance.detectChanges();\n\n if (this.isOpen) {\n this.updatePosition(true);\n }\n }\n\n /**\n * Updates the current position.\n *\n * @docs-private\n */\n updatePosition(reapplyPosition: boolean = false) {\n this.overlayRef = this.createOverlay();\n\n const position = (this.overlayRef.getConfig().positionStrategy as FlexibleConnectedPositionStrategy)\n .withPositions(this.getAdjustedPositions())\n .withPush(true);\n\n if (reapplyPosition) {\n setTimeout(() => position.reapplyLastPosition());\n }\n }\n\n /** @docs-private */\n getOverlayHandleComponentType(): Type<KbqNotificationCenterComponent> {\n return KbqNotificationCenterComponent;\n }\n\n /** @docs-private */\n updateClassMap(newPlacement: string = this.placement) {\n if (!this.instance) return;\n\n this.instance.updateClassMap(POSITION_TO_CSS_MAP[newPlacement], this.customClass, PopUpSizes.Medium);\n }\n\n /** @docs-private */\n closingActions() {\n return merge(\n this.overlayRef!.outsidePointerEvents(),\n this.overlayRef!.backdropClick(),\n // Only a scroll outside the panel should close it. The list viewport is a `CdkScrollable`,\n // so its own scrolling reaches the root `ScrollDispatcher` too — filtering it out here is\n // what keeps the panel open, instead of tagging the shared scrollable with a \"prevent hide\"\n // flag that would then follow it around the whole application.\n this.scrollDispatcher.scrolled().pipe(filter((scrollable) => !this.isInnerScroll(scrollable)))\n );\n }\n\n /** Whether a `ScrollDispatcher` emission originates from inside this panel's own scrollable content. */\n private isInnerScroll(scrollable: CdkScrollable | void): boolean {\n return (\n scrollable instanceof CdkScrollable &&\n !!scrollable.getElementRef().nativeElement.closest('.kbq-notification-center')\n );\n }\n}\n","<!-- `display: contents` keeps the trap out of the panel's flex layout while still scoping the focus trap\nto everything the panel renders. -->\n<div class=\"kbq-notification-center__trap\" [cdkTrapFocus]=\"isTrapFocus\">\n <div class=\"kbq-notification-center-header\">\n <div class=\"kbq-notification-center-title\">\n <div class=\"kbq-notification-center-title__text\" [id]=\"titleId\">\n {{ localeConfiguration().notifications }}\n </div>\n <button\n #notificationSwitcher\n kbq-button\n class=\"kbq-notification-center-title__button\"\n data-testid=\"kbq-notification-center-silent-mode-toggle\"\n [kbqDropdownTriggerFor]=\"notificationSwitcherDropdown\"\n [attr.aria-label]=\"\n service.silentMode()\n ? localeConfiguration().doNotDisturb\n : localeConfiguration().showPopUpNotifications\n \"\n [kbqTooltip]=\"\n service.silentMode()\n ? localeConfiguration().doNotDisturb\n : localeConfiguration().showPopUpNotifications\n \"\n [kbqTooltipArrow]=\"false\"\n [kbqPlacement]=\"'right'\"\n [kbqTooltipOffset]=\"4\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n >\n <i kbq-icon=\"{{ service.silentMode() ? 'kbq-bell-slash_16' : 'kbq-bell_16' }}\"></i>\n </button>\n </div>\n <div class=\"kbq-notification-center-toolbar\">\n @if (!service.empty()) {\n <button\n kbq-button\n class=\"kbq-notification-center-toolbar__button\"\n data-testid=\"kbq-notification-center-remove-all-button\"\n [attr.aria-label]=\"a11yLocaleConfiguration().removeAll\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n [kbqTooltip]=\"localeConfiguration().removeAll\"\n [kbqPlacement]=\"'bottom'\"\n [kbqTooltipArrow]=\"false\"\n (click)=\"removeAll()\"\n >\n <i kbq-icon=\"kbq-trash_16\"></i>\n </button>\n\n <kbq-divider [vertical]=\"true\" />\n }\n\n <button\n kbq-button\n class=\"kbq-notification-center-toolbar__button\"\n data-testid=\"kbq-notification-center-close-button\"\n [attr.aria-label]=\"a11yLocaleConfiguration().close\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n (click)=\"hide(0)\"\n >\n <i kbq-icon=\"kbq-xmark_16\"></i>\n </button>\n </div>\n </div>\n\n <!-- One persistent live region for the whole panel: a region inserted together with its text is\n not reliably announced, so only the text below ever changes. -->\n <div class=\"cdk-visually-hidden\" data-testid=\"kbq-notification-center-status\" role=\"status\" aria-live=\"polite\">\n {{ statusMessage }}\n </div>\n\n <div\n #notificationCenterContainer=\"kbqOverflowShadowContainer\"\n kbqScrollbarViewport\n kbqOverflowShadowContainer\n class=\"kbq-notification-center-container\"\n data-testid=\"kbq-notification-center-container\"\n [class.kbq-animations-disabled]=\"animationsDisabled\"\n [kbqOverflowShadowBottom]=\"notificationCenterContainer\"\n [shadow]=\"'var(--kbq-shadow-overflow-normal-bottom)'\"\n >\n @if (!service.errorMode()) {\n @if (!service.loadingMode()) {\n @for (group of service.groupedItems(); track group.id) {\n <div\n class=\"kbq-notification-center-sub-header\"\n data-testid=\"kbq-notification-center-group\"\n [kbqOverflowShadowTop]=\"$first ? notificationCenterContainer : undefined\"\n >\n <div class=\"kbq-notification-center-sub-header__date\">{{ group.title }}</div>\n\n <button\n kbq-button\n class=\"kbq-notification-center-sub-header__button\"\n data-testid=\"kbq-notification-center-remove-group-button\"\n [attr.aria-label]=\"localeConfiguration().remove\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n [kbqTooltip]=\"localeConfiguration().remove\"\n [kbqPlacement]=\"'right'\"\n [kbqTooltipArrow]=\"false\"\n (click)=\"removeGroup(group)\"\n >\n <i kbq-icon=\"kbq-trash_16\"></i>\n </button>\n </div>\n\n @for (item of group.items; track item.id) {\n <kbq-notification-item [data]=\"item\" />\n }\n } @empty {\n @if (!service.loadingMore() && !service.loadMoreErrorMode()) {\n <div\n class=\"kbq-notification-center-empty-container\"\n data-testid=\"kbq-notification-center-empty\"\n >\n <i kbq-icon-item=\"kbq-bell_16\" [big]=\"true\" [color]=\"'contrast-fade'\"></i>\n {{ localeConfiguration().noNotifications }}\n </div>\n }\n }\n\n @if (service.loadingMore()) {\n <div class=\"kbq-notification-center-load-more\" data-testid=\"kbq-notification-center-load-more\">\n <kbq-progress-spinner [mode]=\"'indeterminate'\" [size]=\"'compact'\" />\n </div>\n } @else if (service.loadMoreErrorMode()) {\n <div\n class=\"kbq-notification-center-load-more-error\"\n data-testid=\"kbq-notification-center-load-more-error\"\n >\n {{ localeConfiguration().failedToLoadNotifications }}\n <button\n kbq-button\n data-testid=\"kbq-notification-center-load-more-retry-button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'theme'\"\n (click)=\"retryLoadMore()\"\n >\n {{ localeConfiguration().repeat }}\n </button>\n </div>\n }\n } @else {\n <kbq-loader-overlay surface=\"card\" data-testid=\"kbq-notification-center-loader\" />\n }\n } @else {\n <div class=\"kbq-notification-center-error-container\" data-testid=\"kbq-notification-center-error\">\n <i kbq-icon-item=\"kbq-bell_16\" [big]=\"true\" [color]=\"'error'\" [fade]=\"true\"></i>\n {{ localeConfiguration().failedToLoadNotifications }}\n <button\n kbq-button\n data-testid=\"kbq-notification-center-reload-button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'theme'\"\n (click)=\"service.onReload.next()\"\n >\n {{ localeConfiguration().repeat }}\n </button>\n </div>\n }\n </div>\n\n <!-- `class` is KbqDropdown's own input: it moves the class onto the panel rendered in the overlay,\n which is where the check-mark width token has to be declared to reach the marks. -->\n <kbq-dropdown #notificationSwitcherDropdown=\"kbqDropdown\" class=\"kbq-notification-center-switcher\">\n <button\n kbq-dropdown-item\n data-testid=\"kbq-notification-center-show-notifications-button\"\n (click)=\"service.setSilentMode(false)\"\n >\n <i\n class=\"kbq-notification-center-switcher__mark\"\n kbq-icon=\"kbq-circle-xs_16\"\n [class.kbq-notification-center-switcher__mark_hidden]=\"service.silentMode()\"\n ></i>\n {{ localeConfiguration().showPopUpNotifications }}\n </button>\n <button\n kbq-dropdown-item\n data-testid=\"kbq-notification-center-do-not-disturb-button\"\n (click)=\"service.setSilentMode(true)\"\n >\n <i\n class=\"kbq-notification-center-switcher__mark\"\n kbq-icon=\"kbq-circle-xs_16\"\n [class.kbq-notification-center-switcher__mark_hidden]=\"!service.silentMode()\"\n ></i>\n {{ localeConfiguration().doNotDisturb }}\n </button>\n </kbq-dropdown>\n</div>\n","import { NgModule } from '@angular/core';\nimport { KbqNotificationCenterComponent, KbqNotificationCenterTrigger } from './notification-center';\n\n/**\n * Compatibility wrapper around the standalone notification center. Importing\n * `KbqNotificationCenterTrigger` directly is equivalent.\n */\n@NgModule({\n imports: [\n KbqNotificationCenterComponent,\n KbqNotificationCenterTrigger\n ],\n exports: [\n KbqNotificationCenterComponent,\n KbqNotificationCenterTrigger\n ]\n})\nexport class KbqNotificationCenterModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i4","i3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA;AACO,MAAM,oBAAoB,GAAG;AAsCpC;AACA,IAAI,eAAe,GAA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