@koobiq/components 18.34.0 → 18.36.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 (583) hide show
  1. package/accordion/accordion.component.d.ts +1 -1
  2. package/app-switcher/_app-switcher-theme.scss +34 -0
  3. package/app-switcher/app-switcher-animations.d.ts +5 -0
  4. package/app-switcher/app-switcher-dropdown-app.d.ts +11 -0
  5. package/app-switcher/app-switcher-dropdown-app.scss +85 -0
  6. package/app-switcher/app-switcher-dropdown-site.d.ts +9 -0
  7. package/app-switcher/app-switcher-dropdown-site.scss +53 -0
  8. package/app-switcher/app-switcher.d.ts +191 -0
  9. package/app-switcher/app-switcher.module.d.ts +10 -0
  10. package/app-switcher/app-switcher.scss +64 -0
  11. package/app-switcher/index.d.ts +1 -0
  12. package/app-switcher/kbq-app-switcher-list-item.d.ts +16 -0
  13. package/app-switcher/kbq-app-switcher-list-item.scss +180 -0
  14. package/app-switcher/public-api.d.ts +6 -0
  15. package/badge/badge.component.d.ts +1 -1
  16. package/badge/badge.component.scss +2 -0
  17. package/breadcrumbs/breadcrumbs.scss +4 -0
  18. package/button/_button-theme.scss +1 -0
  19. package/button/button.component.d.ts +2 -2
  20. package/core/common-behaviors/clipboard.d.ts +1 -1
  21. package/core/common-behaviors/color.d.ts +5 -5
  22. package/core/common-behaviors/focus-monitor.d.ts +19 -0
  23. package/core/common-behaviors/hovered.d.ts +13 -0
  24. package/core/common-behaviors/index.d.ts +4 -0
  25. package/core/common-behaviors/orientation.d.ts +4 -0
  26. package/core/common-behaviors/read-state.d.ts +12 -0
  27. package/core/form-field/field-sizing-content.d.ts +21 -0
  28. package/core/form-field/index.d.ts +1 -0
  29. package/core/locales/en-US.d.ts +68 -0
  30. package/core/locales/es-LA.d.ts +68 -0
  31. package/core/locales/fa-IR.d.ts +68 -0
  32. package/core/locales/locale-service.d.ts +476 -0
  33. package/core/locales/pt-BR.d.ts +68 -0
  34. package/core/locales/ru-RU.d.ts +68 -0
  35. package/core/locales/tk-TM.d.ts +68 -0
  36. package/core/locales/types.d.ts +22 -0
  37. package/core/locales/zh-CN.d.ts +68 -0
  38. package/core/navbar/index.d.ts +1 -0
  39. package/core/navbar/rectangle-item.d.ts +14 -0
  40. package/core/option/action.d.ts +1 -1
  41. package/core/option/option.d.ts +4 -2
  42. package/core/pop-up/constants.d.ts +2 -1
  43. package/core/pop-up/pop-up-trigger.d.ts +5 -3
  44. package/core/pop-up/pop-up.d.ts +2 -1
  45. package/core/public-api.d.ts +1 -0
  46. package/core/select/common.d.ts +3 -0
  47. package/core/select/constants.d.ts +5 -0
  48. package/core/styles/common/_select.scss +5 -0
  49. package/core/utils/dom.d.ts +4 -0
  50. package/core/utils/index.d.ts +1 -0
  51. package/core/utils/utils.d.ts +4 -0
  52. package/datepicker/datepicker-input.directive.d.ts +18 -7
  53. package/divider/divider.scss +1 -0
  54. package/dropdown/dropdown-item.scss +1 -0
  55. package/dropdown/dropdown-trigger.directive.d.ts +7 -1
  56. package/dropdown/dropdown.component.d.ts +5 -1
  57. package/dropdown/dropdown.module.d.ts +1 -1
  58. package/esm2022/accordion/accordion-content.mjs +3 -3
  59. package/esm2022/accordion/accordion-header.mjs +3 -3
  60. package/esm2022/accordion/accordion-item.mjs +3 -3
  61. package/esm2022/accordion/accordion-trigger.component.mjs +3 -3
  62. package/esm2022/accordion/accordion.component.mjs +5 -5
  63. package/esm2022/accordion/accordion.module.mjs +4 -4
  64. package/esm2022/actions-panel/actions-panel-container.mjs +3 -3
  65. package/esm2022/actions-panel/actions-panel.mjs +3 -3
  66. package/esm2022/actions-panel/module.mjs +4 -4
  67. package/esm2022/alert/alert.component.mjs +12 -12
  68. package/esm2022/alert/alert.module.mjs +4 -4
  69. package/esm2022/app-switcher/app-switcher-animations.mjs +18 -0
  70. package/esm2022/app-switcher/app-switcher-dropdown-app.mjs +75 -0
  71. package/esm2022/app-switcher/app-switcher-dropdown-site.mjs +60 -0
  72. package/esm2022/app-switcher/app-switcher.mjs +446 -0
  73. package/esm2022/app-switcher/app-switcher.module.mjs +45 -0
  74. package/esm2022/app-switcher/index.mjs +2 -0
  75. package/esm2022/app-switcher/kbq-app-switcher-list-item.mjs +84 -0
  76. package/esm2022/app-switcher/koobiq-components-app-switcher.mjs +5 -0
  77. package/esm2022/app-switcher/public-api.mjs +7 -0
  78. package/esm2022/autocomplete/autocomplete-origin.directive.mjs +3 -3
  79. package/esm2022/autocomplete/autocomplete-trigger.directive.mjs +3 -3
  80. package/esm2022/autocomplete/autocomplete.component.mjs +3 -3
  81. package/esm2022/autocomplete/autocomplete.module.mjs +4 -4
  82. package/esm2022/badge/badge.component.mjs +11 -11
  83. package/esm2022/badge/badge.module.mjs +4 -4
  84. package/esm2022/breadcrumbs/breadcrumbs.mjs +17 -17
  85. package/esm2022/breadcrumbs/breadcrumbs.module.mjs +4 -4
  86. package/esm2022/button/button.component.mjs +9 -9
  87. package/esm2022/button/button.dropdown-trigger.directive.mjs +3 -3
  88. package/esm2022/button/button.module.mjs +4 -4
  89. package/esm2022/button-toggle/button-toggle.component.mjs +6 -6
  90. package/esm2022/button-toggle/button-toggle.module.mjs +4 -4
  91. package/esm2022/checkbox/checkbox-module.mjs +4 -4
  92. package/esm2022/checkbox/checkbox-required-validator.mjs +3 -3
  93. package/esm2022/checkbox/checkbox.mjs +3 -3
  94. package/esm2022/clamped-text/clamped-text.mjs +3 -3
  95. package/esm2022/clamped-text/module.mjs +4 -4
  96. package/esm2022/code-block/code-block-highlight.mjs +7 -7
  97. package/esm2022/code-block/code-block.mjs +4 -4
  98. package/esm2022/code-block/code-block.module.mjs +4 -4
  99. package/esm2022/content-panel/content-panel.mjs +24 -24
  100. package/esm2022/content-panel/module.mjs +4 -4
  101. package/esm2022/content-panel/resizable.mjs +6 -6
  102. package/esm2022/core/common-behaviors/clipboard.mjs +4 -4
  103. package/esm2022/core/common-behaviors/color.mjs +6 -7
  104. package/esm2022/core/common-behaviors/common-module.mjs +4 -4
  105. package/esm2022/core/common-behaviors/focus-monitor.mjs +37 -0
  106. package/esm2022/core/common-behaviors/hovered.mjs +31 -0
  107. package/esm2022/core/common-behaviors/index.mjs +5 -1
  108. package/esm2022/core/common-behaviors/orientation.mjs +2 -0
  109. package/esm2022/core/common-behaviors/read-state.mjs +33 -0
  110. package/esm2022/core/error/error-state-matcher.mjs +9 -9
  111. package/esm2022/core/form-field/field-sizing-content.mjs +114 -0
  112. package/esm2022/core/form-field/index.mjs +2 -1
  113. package/esm2022/core/formatters/date/formatter.mjs +3 -3
  114. package/esm2022/core/formatters/date/formatter.pipe.mjs +78 -78
  115. package/esm2022/core/formatters/filesize/formatter.mjs +3 -3
  116. package/esm2022/core/formatters/index.mjs +4 -4
  117. package/esm2022/core/formatters/number/formatter.mjs +12 -12
  118. package/esm2022/core/forms/forms-module.mjs +4 -4
  119. package/esm2022/core/forms/forms.directive.mjs +6 -6
  120. package/esm2022/core/highlight/highlight.pipe.mjs +3 -3
  121. package/esm2022/core/highlight/index.mjs +4 -4
  122. package/esm2022/core/line/line.mjs +7 -7
  123. package/esm2022/core/locales/en-US.mjs +111 -1
  124. package/esm2022/core/locales/es-LA.mjs +111 -1
  125. package/esm2022/core/locales/fa-IR.mjs +81 -1
  126. package/esm2022/core/locales/locale-service.mjs +3 -3
  127. package/esm2022/core/locales/locale-service.module.mjs +4 -4
  128. package/esm2022/core/locales/pt-BR.mjs +111 -1
  129. package/esm2022/core/locales/ru-RU.mjs +125 -1
  130. package/esm2022/core/locales/tk-TM.mjs +111 -1
  131. package/esm2022/core/locales/types.mjs +1 -1
  132. package/esm2022/core/locales/zh-CN.mjs +69 -1
  133. package/esm2022/core/navbar/index.mjs +2 -0
  134. package/esm2022/core/navbar/rectangle-item.mjs +40 -0
  135. package/esm2022/core/option/action-container.mjs +3 -3
  136. package/esm2022/core/option/action.mjs +4 -4
  137. package/esm2022/core/option/optgroup.mjs +3 -3
  138. package/esm2022/core/option/option-module.mjs +4 -4
  139. package/esm2022/core/option/option.mjs +10 -6
  140. package/esm2022/core/pop-up/constants.mjs +2 -1
  141. package/esm2022/core/pop-up/pop-up-trigger.mjs +10 -6
  142. package/esm2022/core/pop-up/pop-up.mjs +4 -4
  143. package/esm2022/core/public-api.mjs +2 -1
  144. package/esm2022/core/select/common.mjs +27 -17
  145. package/esm2022/core/select/constants.mjs +6 -1
  146. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +3 -3
  147. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.module.mjs +4 -4
  148. package/esm2022/core/services/measure-scrollbar.service.mjs +3 -3
  149. package/esm2022/core/services/theme.service.mjs +3 -3
  150. package/esm2022/core/utils/dom.mjs +8 -0
  151. package/esm2022/core/utils/index.mjs +2 -1
  152. package/esm2022/core/utils/utils.mjs +9 -1
  153. package/esm2022/core/version.mjs +2 -2
  154. package/esm2022/datepicker/calendar-body.component.mjs +3 -3
  155. package/esm2022/datepicker/calendar-header.component.mjs +3 -3
  156. package/esm2022/datepicker/calendar.component.mjs +3 -3
  157. package/esm2022/datepicker/datepicker-input.directive.mjs +29 -26
  158. package/esm2022/datepicker/datepicker-intl.mjs +3 -3
  159. package/esm2022/datepicker/datepicker-module.mjs +4 -4
  160. package/esm2022/datepicker/datepicker-toggle.component.mjs +9 -9
  161. package/esm2022/datepicker/datepicker.component.mjs +6 -6
  162. package/esm2022/datepicker/month-view.component.mjs +3 -3
  163. package/esm2022/divider/divider.component.mjs +4 -4
  164. package/esm2022/divider/divider.module.mjs +4 -4
  165. package/esm2022/dl/dl.component.mjs +9 -9
  166. package/esm2022/dl/dl.module.mjs +4 -4
  167. package/esm2022/dropdown/dropdown-content.directive.mjs +3 -3
  168. package/esm2022/dropdown/dropdown-item.component.mjs +5 -5
  169. package/esm2022/dropdown/dropdown-trigger.directive.mjs +33 -13
  170. package/esm2022/dropdown/dropdown.component.mjs +18 -8
  171. package/esm2022/dropdown/dropdown.module.mjs +14 -10
  172. package/esm2022/dynamic-translation/dynamic-translation.mjs +9 -9
  173. package/esm2022/dynamic-translation/module.mjs +4 -4
  174. package/esm2022/ellipsis-center/ellipsis-center.directive.mjs +7 -7
  175. package/esm2022/empty-state/empty-state.component.mjs +15 -15
  176. package/esm2022/empty-state/empty-state.module.mjs +4 -4
  177. package/esm2022/file-upload/file-drop.mjs +3 -3
  178. package/esm2022/file-upload/file-upload.mjs +6 -1
  179. package/esm2022/file-upload/file-upload.module.mjs +4 -4
  180. package/esm2022/file-upload/multiple-file-upload.component.mjs +29 -13
  181. package/esm2022/file-upload/single-file-upload.component.mjs +25 -10
  182. package/esm2022/filter-bar/filter-bar-button.mjs +3 -3
  183. package/esm2022/filter-bar/filter-bar.mjs +6 -6
  184. package/esm2022/filter-bar/filter-bar.module.mjs +4 -4
  185. package/esm2022/filter-bar/filter-refresher.mjs +3 -3
  186. package/esm2022/filter-bar/filter-reset.mjs +3 -3
  187. package/esm2022/filter-bar/filter-search.mjs +3 -3
  188. package/esm2022/filter-bar/filters.mjs +18 -6
  189. package/esm2022/filter-bar/pipe-add.mjs +5 -5
  190. package/esm2022/filter-bar/pipe.directive.mjs +3 -3
  191. package/esm2022/filter-bar/pipes/base-pipe.mjs +7 -7
  192. package/esm2022/filter-bar/pipes/pipe-button.mjs +3 -3
  193. package/esm2022/filter-bar/pipes/pipe-date.mjs +6 -6
  194. package/esm2022/filter-bar/pipes/pipe-datetime.mjs +6 -6
  195. package/esm2022/filter-bar/pipes/pipe-multi-select.mjs +19 -14
  196. package/esm2022/filter-bar/pipes/pipe-multi-tree-select.mjs +12 -7
  197. package/esm2022/filter-bar/pipes/pipe-readonly.mjs +6 -6
  198. package/esm2022/filter-bar/pipes/pipe-select.mjs +6 -6
  199. package/esm2022/filter-bar/pipes/pipe-state.mjs +3 -3
  200. package/esm2022/filter-bar/pipes/pipe-text.mjs +6 -6
  201. package/esm2022/filter-bar/pipes/pipe-title.mjs +3 -3
  202. package/esm2022/filter-bar/pipes/pipe-tree-select.mjs +6 -6
  203. package/esm2022/form-field/cleaner.mjs +3 -3
  204. package/esm2022/form-field/error.mjs +3 -3
  205. package/esm2022/form-field/fieldset.mjs +11 -11
  206. package/esm2022/form-field/form-field.mjs +11 -11
  207. package/esm2022/form-field/form-field.module.mjs +4 -4
  208. package/esm2022/form-field/hint.mjs +3 -3
  209. package/esm2022/form-field/label.mjs +3 -3
  210. package/esm2022/form-field/password-hint.mjs +3 -3
  211. package/esm2022/form-field/password-toggle.mjs +7 -7
  212. package/esm2022/form-field/prefix.mjs +3 -3
  213. package/esm2022/form-field/reactive-password-hint.mjs +3 -3
  214. package/esm2022/form-field/stepper.mjs +3 -3
  215. package/esm2022/form-field/suffix.mjs +3 -3
  216. package/esm2022/form-field/validate.directive.mjs +3 -3
  217. package/esm2022/icon/icon-button.component.mjs +3 -3
  218. package/esm2022/icon/icon-item.component.mjs +3 -3
  219. package/esm2022/icon/icon.component.mjs +4 -4
  220. package/esm2022/icon/icon.module.mjs +4 -4
  221. package/esm2022/inline-edit/index.mjs +3 -0
  222. package/esm2022/inline-edit/inline-edit.mjs +378 -0
  223. package/esm2022/inline-edit/koobiq-components-inline-edit.mjs +5 -0
  224. package/esm2022/inline-edit/module.mjs +25 -0
  225. package/esm2022/input/input-number-validators.mjs +6 -6
  226. package/esm2022/input/input-number.mjs +4 -4
  227. package/esm2022/input/input-password.mjs +4 -4
  228. package/esm2022/input/input.mjs +7 -7
  229. package/esm2022/input/input.module.mjs +4 -4
  230. package/esm2022/link/link.component.mjs +6 -6
  231. package/esm2022/link/link.module.mjs +4 -4
  232. package/esm2022/list/list-selection.component.mjs +10 -10
  233. package/esm2022/list/list.component.mjs +6 -6
  234. package/esm2022/list/list.module.mjs +4 -4
  235. package/esm2022/loader-overlay/loader-overlay.component.mjs +13 -13
  236. package/esm2022/loader-overlay/loader-overlay.module.mjs +4 -4
  237. package/esm2022/markdown/markdown.component.mjs +5 -5
  238. package/esm2022/markdown/markdown.module.mjs +4 -4
  239. package/esm2022/markdown/markdown.service.mjs +3 -3
  240. package/esm2022/modal/css-unit.pipe.mjs +3 -3
  241. package/esm2022/modal/modal-control.service.mjs +3 -3
  242. package/esm2022/modal/modal.component.mjs +4 -4
  243. package/esm2022/modal/modal.directive.mjs +12 -12
  244. package/esm2022/modal/modal.module.mjs +4 -4
  245. package/esm2022/modal/modal.service.mjs +3 -3
  246. package/esm2022/navbar/navbar-item.component.mjs +49 -38
  247. package/esm2022/navbar/navbar.component.mjs +10 -10
  248. package/esm2022/navbar/navbar.module.mjs +4 -4
  249. package/esm2022/navbar/vertical-navbar.component.mjs +4 -4
  250. package/esm2022/navbar-ic/index.mjs +2 -0
  251. package/esm2022/navbar-ic/koobiq-components-navbar-ic.mjs +5 -0
  252. package/esm2022/navbar-ic/navbar-ic-header.mjs +58 -0
  253. package/esm2022/navbar-ic/navbar-ic-item.mjs +391 -0
  254. package/esm2022/navbar-ic/navbar-ic.animation.mjs +9 -0
  255. package/esm2022/navbar-ic/navbar-ic.mjs +286 -0
  256. package/esm2022/navbar-ic/navbar-ic.module.mjs +74 -0
  257. package/esm2022/navbar-ic/public-api.mjs +5 -0
  258. package/esm2022/notification-center/index.mjs +2 -0
  259. package/esm2022/notification-center/koobiq-components-notification-center.mjs +5 -0
  260. package/esm2022/notification-center/notification-center-animations.mjs +18 -0
  261. package/esm2022/notification-center/notification-center.mjs +353 -0
  262. package/esm2022/notification-center/notification-center.module.mjs +38 -0
  263. package/esm2022/notification-center/notification-center.service.mjs +127 -0
  264. package/esm2022/notification-center/notification-item.mjs +70 -0
  265. package/esm2022/notification-center/public-api.mjs +5 -0
  266. package/esm2022/overflow-items/module.mjs +4 -4
  267. package/esm2022/overflow-items/overflow-items.mjs +95 -41
  268. package/esm2022/popover/popover-confirm.component.mjs +10 -10
  269. package/esm2022/popover/popover.component.mjs +24 -14
  270. package/esm2022/popover/popover.module.mjs +4 -4
  271. package/esm2022/progress-bar/progress-bar.component.mjs +9 -9
  272. package/esm2022/progress-bar/progress-bar.module.mjs +4 -4
  273. package/esm2022/progress-spinner/progress-spinner.component.mjs +9 -9
  274. package/esm2022/progress-spinner/progress-spinner.module.mjs +4 -4
  275. package/esm2022/radio/radio.component.mjs +6 -6
  276. package/esm2022/radio/radio.module.mjs +4 -4
  277. package/esm2022/risk-level/risk-level.component.mjs +3 -3
  278. package/esm2022/risk-level/risk-level.module.mjs +4 -4
  279. package/esm2022/scrollbar/scrollbar.component.mjs +3 -3
  280. package/esm2022/scrollbar/scrollbar.directive.mjs +3 -3
  281. package/esm2022/scrollbar/scrollbar.module.mjs +4 -4
  282. package/esm2022/search-expandable/index.mjs +2 -0
  283. package/esm2022/search-expandable/koobiq-components-search-expandable.mjs +5 -0
  284. package/esm2022/search-expandable/public-api.mjs +3 -0
  285. package/esm2022/search-expandable/search-expandable.mjs +177 -0
  286. package/esm2022/search-expandable/search-expandable.module.mjs +18 -0
  287. package/esm2022/select/select-option.directive.mjs +3 -3
  288. package/esm2022/select/select.component.mjs +37 -10
  289. package/esm2022/select/select.module.mjs +4 -4
  290. package/esm2022/sidebar/sidebar.component.mjs +9 -9
  291. package/esm2022/sidebar/sidebar.module.mjs +4 -4
  292. package/esm2022/sidepanel/sidepanel-container.component.mjs +3 -3
  293. package/esm2022/sidepanel/sidepanel-directives.mjs +15 -15
  294. package/esm2022/sidepanel/sidepanel.module.mjs +4 -4
  295. package/esm2022/sidepanel/sidepanel.service.mjs +3 -3
  296. package/esm2022/split-button/index.mjs +2 -0
  297. package/esm2022/split-button/koobiq-components-split-button.mjs +5 -0
  298. package/esm2022/split-button/public-api.mjs +3 -0
  299. package/esm2022/split-button/split-button.mjs +92 -0
  300. package/esm2022/split-button/split-button.module.mjs +18 -0
  301. package/esm2022/splitter/splitter.component.mjs +13 -13
  302. package/esm2022/splitter/splitter.module.mjs +4 -4
  303. package/esm2022/table/table.component.mjs +6 -6
  304. package/esm2022/table/table.module.mjs +4 -4
  305. package/esm2022/tabs/paginated-tab-header.mjs +4 -4
  306. package/esm2022/tabs/tab-body.component.mjs +6 -6
  307. package/esm2022/tabs/tab-content.directive.mjs +3 -3
  308. package/esm2022/tabs/tab-group.component.mjs +15 -15
  309. package/esm2022/tabs/tab-header.component.mjs +4 -4
  310. package/esm2022/tabs/tab-label-wrapper.directive.mjs +4 -4
  311. package/esm2022/tabs/tab-label.directive.mjs +3 -3
  312. package/esm2022/tabs/tab-nav-bar.mjs +10 -10
  313. package/esm2022/tabs/tab.component.mjs +3 -3
  314. package/esm2022/tabs/tabs.module.mjs +4 -4
  315. package/esm2022/tags/tag-input.mjs +17 -11
  316. package/esm2022/tags/tag-list.component.mjs +256 -195
  317. package/esm2022/tags/tag.component.mjs +398 -118
  318. package/esm2022/tags/tag.module.mjs +20 -10
  319. package/esm2022/textarea/textarea.component.mjs +5 -5
  320. package/esm2022/textarea/textarea.module.mjs +4 -4
  321. package/esm2022/time-range/constants.mjs +21 -0
  322. package/esm2022/time-range/index.mjs +8 -0
  323. package/esm2022/time-range/koobiq-components-time-range.mjs +5 -0
  324. package/esm2022/time-range/module.mjs +36 -0
  325. package/esm2022/time-range/time-range-editor.mjs +219 -0
  326. package/esm2022/time-range/time-range-title-as-form-field.mjs +59 -0
  327. package/esm2022/time-range/time-range-title.mjs +112 -0
  328. package/esm2022/time-range/time-range.mjs +229 -0
  329. package/esm2022/time-range/time-range.service.mjs +189 -0
  330. package/esm2022/time-range/types.mjs +2 -0
  331. package/esm2022/timepicker/timepicker.directive.mjs +4 -4
  332. package/esm2022/timepicker/timepicker.module.mjs +4 -4
  333. package/esm2022/timezone/cities-by-filter.pipe.mjs +3 -3
  334. package/esm2022/timezone/timezone-option.component.mjs +3 -3
  335. package/esm2022/timezone/timezone-option.directive.mjs +3 -3
  336. package/esm2022/timezone/timezone-select.component.mjs +9 -9
  337. package/esm2022/timezone/timezone.module.mjs +4 -4
  338. package/esm2022/timezone/utc-offset.pipe.mjs +3 -3
  339. package/esm2022/title/title.directive.mjs +3 -3
  340. package/esm2022/title/title.module.mjs +4 -4
  341. package/esm2022/toast/toast-container.component.mjs +3 -3
  342. package/esm2022/toast/toast.component.mjs +20 -14
  343. package/esm2022/toast/toast.module.mjs +4 -4
  344. package/esm2022/toast/toast.service.mjs +5 -4
  345. package/esm2022/toast/toast.type.mjs +1 -1
  346. package/esm2022/toggle/toggle.component.mjs +3 -3
  347. package/esm2022/toggle/toggle.module.mjs +4 -4
  348. package/esm2022/tooltip/tooltip.component.mjs +20 -20
  349. package/esm2022/tooltip/tooltip.module.mjs +4 -4
  350. package/esm2022/top-bar/module.mjs +4 -4
  351. package/esm2022/top-bar/top-bar.mjs +9 -9
  352. package/esm2022/tree/node.mjs +3 -3
  353. package/esm2022/tree/outlet.mjs +3 -3
  354. package/esm2022/tree/padding.directive.mjs +3 -3
  355. package/esm2022/tree/toggle.mjs +16 -12
  356. package/esm2022/tree/tree-base.mjs +7 -7
  357. package/esm2022/tree/tree-option.component.mjs +5 -9
  358. package/esm2022/tree/tree-selection.component.mjs +4 -4
  359. package/esm2022/tree/tree.mjs +3 -3
  360. package/esm2022/tree/tree.module.mjs +4 -4
  361. package/esm2022/tree-select/tree-select.component.mjs +54 -14
  362. package/esm2022/tree-select/tree-select.module.mjs +4 -4
  363. package/esm2022/username/module.mjs +4 -4
  364. package/esm2022/username/username.mjs +15 -15
  365. package/esm2022/username/username.pipe.mjs +8 -8
  366. package/fesm2022/koobiq-components-accordion.mjs +20 -20
  367. package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
  368. package/fesm2022/koobiq-components-actions-panel.mjs +10 -10
  369. package/fesm2022/koobiq-components-alert.mjs +16 -16
  370. package/fesm2022/koobiq-components-app-switcher.mjs +704 -0
  371. package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -0
  372. package/fesm2022/koobiq-components-autocomplete.mjs +13 -13
  373. package/fesm2022/koobiq-components-badge.mjs +14 -14
  374. package/fesm2022/koobiq-components-badge.mjs.map +1 -1
  375. package/fesm2022/koobiq-components-breadcrumbs.mjs +20 -20
  376. package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
  377. package/fesm2022/koobiq-components-button-toggle.mjs +10 -10
  378. package/fesm2022/koobiq-components-button.mjs +15 -15
  379. package/fesm2022/koobiq-components-button.mjs.map +1 -1
  380. package/fesm2022/koobiq-components-checkbox.mjs +10 -10
  381. package/fesm2022/koobiq-components-clamped-text.mjs +7 -7
  382. package/fesm2022/koobiq-components-code-block.mjs +13 -13
  383. package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
  384. package/fesm2022/koobiq-components-content-panel.mjs +34 -34
  385. package/fesm2022/koobiq-components-core.mjs +1218 -237
  386. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  387. package/fesm2022/koobiq-components-datepicker.mjs +62 -60
  388. package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
  389. package/fesm2022/koobiq-components-divider.mjs +8 -8
  390. package/fesm2022/koobiq-components-divider.mjs.map +1 -1
  391. package/fesm2022/koobiq-components-dl.mjs +13 -13
  392. package/fesm2022/koobiq-components-dropdown.mjs +69 -35
  393. package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
  394. package/fesm2022/koobiq-components-dynamic-translation.mjs +13 -13
  395. package/fesm2022/koobiq-components-ellipsis-center.mjs +7 -7
  396. package/fesm2022/koobiq-components-empty-state.mjs +19 -19
  397. package/fesm2022/koobiq-components-file-upload.mjs +60 -25
  398. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  399. package/fesm2022/koobiq-components-filter-bar.mjs +118 -96
  400. package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
  401. package/fesm2022/koobiq-components-form-field.mjs +60 -60
  402. package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
  403. package/fesm2022/koobiq-components-icon.mjs +13 -13
  404. package/fesm2022/koobiq-components-icon.mjs.map +1 -1
  405. package/fesm2022/koobiq-components-inline-edit.mjs +407 -0
  406. package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -0
  407. package/fesm2022/koobiq-components-input.mjs +22 -22
  408. package/fesm2022/koobiq-components-input.mjs.map +1 -1
  409. package/fesm2022/koobiq-components-link.mjs +10 -10
  410. package/fesm2022/koobiq-components-link.mjs.map +1 -1
  411. package/fesm2022/koobiq-components-list.mjs +19 -19
  412. package/fesm2022/koobiq-components-list.mjs.map +1 -1
  413. package/fesm2022/koobiq-components-loader-overlay.mjs +16 -16
  414. package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
  415. package/fesm2022/koobiq-components-markdown.mjs +12 -12
  416. package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
  417. package/fesm2022/koobiq-components-modal.mjs +28 -28
  418. package/fesm2022/koobiq-components-modal.mjs.map +1 -1
  419. package/fesm2022/koobiq-components-navbar-ic.mjs +797 -0
  420. package/fesm2022/koobiq-components-navbar-ic.mjs.map +1 -0
  421. package/fesm2022/koobiq-components-navbar.mjs +65 -54
  422. package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
  423. package/fesm2022/koobiq-components-notification-center.mjs +586 -0
  424. package/fesm2022/koobiq-components-notification-center.mjs.map +1 -0
  425. package/fesm2022/koobiq-components-overflow-items.mjs +98 -44
  426. package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
  427. package/fesm2022/koobiq-components-popover.mjs +36 -26
  428. package/fesm2022/koobiq-components-popover.mjs.map +1 -1
  429. package/fesm2022/koobiq-components-progress-bar.mjs +13 -13
  430. package/fesm2022/koobiq-components-progress-spinner.mjs +13 -13
  431. package/fesm2022/koobiq-components-radio.mjs +10 -10
  432. package/fesm2022/koobiq-components-risk-level.mjs +7 -7
  433. package/fesm2022/koobiq-components-scrollbar.mjs +10 -10
  434. package/fesm2022/koobiq-components-search-expandable.mjs +199 -0
  435. package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -0
  436. package/fesm2022/koobiq-components-select.mjs +43 -16
  437. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  438. package/fesm2022/koobiq-components-sidebar.mjs +13 -13
  439. package/fesm2022/koobiq-components-sidepanel.mjs +25 -25
  440. package/fesm2022/koobiq-components-split-button.mjs +114 -0
  441. package/fesm2022/koobiq-components-split-button.mjs.map +1 -0
  442. package/fesm2022/koobiq-components-splitter.mjs +16 -16
  443. package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
  444. package/fesm2022/koobiq-components-table.mjs +10 -10
  445. package/fesm2022/koobiq-components-tabs.mjs +52 -52
  446. package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
  447. package/fesm2022/koobiq-components-tags.mjs +683 -331
  448. package/fesm2022/koobiq-components-tags.mjs.map +1 -1
  449. package/fesm2022/koobiq-components-textarea.mjs +8 -8
  450. package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
  451. package/fesm2022/koobiq-components-time-range.mjs +840 -0
  452. package/fesm2022/koobiq-components-time-range.mjs.map +1 -0
  453. package/fesm2022/koobiq-components-timepicker.mjs +7 -7
  454. package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
  455. package/fesm2022/koobiq-components-timezone.mjs +24 -24
  456. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  457. package/fesm2022/koobiq-components-title.mjs +7 -7
  458. package/fesm2022/koobiq-components-toast.mjs +28 -21
  459. package/fesm2022/koobiq-components-toast.mjs.map +1 -1
  460. package/fesm2022/koobiq-components-toggle.mjs +7 -7
  461. package/fesm2022/koobiq-components-tooltip.mjs +23 -23
  462. package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
  463. package/fesm2022/koobiq-components-top-bar.mjs +13 -13
  464. package/fesm2022/koobiq-components-tree-select.mjs +57 -17
  465. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  466. package/fesm2022/koobiq-components-tree.mjs +44 -44
  467. package/fesm2022/koobiq-components-tree.mjs.map +1 -1
  468. package/fesm2022/koobiq-components-username.mjs +27 -27
  469. package/file-upload/_file-upload-theme.scss +1 -1
  470. package/file-upload/file-upload.d.ts +6 -3
  471. package/file-upload/multiple-file-upload.component.d.ts +4 -1
  472. package/file-upload/single-file-upload.component.d.ts +4 -1
  473. package/filter-bar/_filter-bar-theme.scss +2 -2
  474. package/filter-bar/filters.d.ts +1 -0
  475. package/filter-bar/pipes/base-pipe.d.ts +1 -1
  476. package/filter-bar/pipes/base-pipe.scss +3 -3
  477. package/filter-bar/pipes/pipe-date.scss +1 -0
  478. package/form-field/fieldset-tokens.scss +1 -1
  479. package/form-field/form-field-tokens.scss +1 -1
  480. package/form-field/form-field.d.ts +1 -1
  481. package/form-field/form-field.scss +8 -10
  482. package/form-field/password-toggle.d.ts +1 -1
  483. package/icon/icon.component.d.ts +2 -2
  484. package/inline-edit/index.d.ts +2 -0
  485. package/inline-edit/inline-edit-tokens.scss +8 -0
  486. package/inline-edit/inline-edit.d.ts +136 -0
  487. package/inline-edit/inline-edit.scss +208 -0
  488. package/inline-edit/module.d.ts +7 -0
  489. package/input/input-number.d.ts +1 -1
  490. package/input/input-password.d.ts +2 -2
  491. package/input/input.d.ts +2 -2
  492. package/link/link.component.d.ts +3 -3
  493. package/list/list-selection.component.d.ts +1 -1
  494. package/loader-overlay/loader-overlay.component.d.ts +1 -1
  495. package/markdown/_markdown-theme.scss +1 -1
  496. package/markdown/markdown-tokens.scss +1 -0
  497. package/markdown/markdown.scss +8 -0
  498. package/modal/modal.component.d.ts +1 -1
  499. package/navbar/navbar-item.component.d.ts +3 -2
  500. package/navbar/navbar.component.d.ts +4 -4
  501. package/navbar/vertical-navbar.component.d.ts +2 -2
  502. package/navbar-ic/_navbar-ic-theme.scss +81 -0
  503. package/navbar-ic/index.d.ts +1 -0
  504. package/navbar-ic/navbar-ic-divider.scss +7 -0
  505. package/navbar-ic/navbar-ic-header.d.ts +18 -0
  506. package/navbar-ic/navbar-ic-header.scss +53 -0
  507. package/navbar-ic/navbar-ic-item.d.ts +125 -0
  508. package/navbar-ic/navbar-ic-item.scss +96 -0
  509. package/navbar-ic/navbar-ic-tokens.scss +22 -0
  510. package/navbar-ic/navbar-ic.animation.d.ts +2 -0
  511. package/navbar-ic/navbar-ic.d.ts +105 -0
  512. package/navbar-ic/navbar-ic.module.d.ts +14 -0
  513. package/navbar-ic/navbar-ic.scss +32 -0
  514. package/navbar-ic/public-api.d.ts +4 -0
  515. package/notification-center/_notification-center-theme.scss +27 -0
  516. package/notification-center/index.d.ts +1 -0
  517. package/notification-center/notification-center-animations.d.ts +5 -0
  518. package/notification-center/notification-center.d.ts +153 -0
  519. package/notification-center/notification-center.module.d.ts +7 -0
  520. package/notification-center/notification-center.scss +126 -0
  521. package/notification-center/notification-center.service.d.ts +72 -0
  522. package/notification-center/notification-item.d.ts +27 -0
  523. package/notification-center/notification-item.scss +157 -0
  524. package/notification-center/public-api.d.ts +4 -0
  525. package/overflow-items/overflow-items.d.ts +23 -9
  526. package/package.json +52 -10
  527. package/popover/_popover-theme.scss +6 -2
  528. package/popover/popover-tokens.scss +2 -0
  529. package/popover/popover.component.d.ts +8 -1
  530. package/popover/popover.scss +15 -7
  531. package/prebuilt-themes/dark-theme.css +1 -1
  532. package/prebuilt-themes/light-theme.css +1 -1
  533. package/prebuilt-themes/theme.css +1 -1
  534. package/schematics/ng-add/index.js +6 -6
  535. package/search-expandable/index.d.ts +1 -0
  536. package/search-expandable/public-api.d.ts +2 -0
  537. package/search-expandable/search-expandable.d.ts +70 -0
  538. package/search-expandable/search-expandable.module.d.ts +7 -0
  539. package/search-expandable/search-expandable.scss +21 -0
  540. package/select/select.component.d.ts +38 -3
  541. package/split-button/_split-button-theme.scss +59 -0
  542. package/split-button/index.d.ts +1 -0
  543. package/split-button/public-api.d.ts +2 -0
  544. package/split-button/split-button.d.ts +31 -0
  545. package/split-button/split-button.module.d.ts +7 -0
  546. package/split-button/split-button.scss +83 -0
  547. package/splitter/splitter.component.d.ts +5 -5
  548. package/tabs/paginated-tab-header.d.ts +1 -1
  549. package/tabs/tab-header.component.d.ts +2 -2
  550. package/tabs/tab-label-wrapper.directive.d.ts +2 -2
  551. package/tabs/tab-nav-bar.d.ts +3 -3
  552. package/tags/_tag-theme.scss +31 -16
  553. package/tags/tag-input.d.ts +2 -0
  554. package/tags/tag-list.component.d.ts +141 -45
  555. package/tags/tag-list.scss +16 -0
  556. package/tags/tag-tokens.scss +17 -1
  557. package/tags/tag.component.d.ts +151 -22
  558. package/tags/tag.module.d.ts +1 -1
  559. package/tags/tag.scss +27 -0
  560. package/textarea/textarea-tokens.scss +1 -1
  561. package/textarea/textarea.component.d.ts +2 -2
  562. package/time-range/constants.d.ts +8 -0
  563. package/time-range/index.d.ts +7 -0
  564. package/time-range/module.d.ts +10 -0
  565. package/time-range/time-range-editor.d.ts +67 -0
  566. package/time-range/time-range-title-as-form-field.d.ts +40 -0
  567. package/time-range/time-range-title.d.ts +18 -0
  568. package/time-range/time-range.d.ts +75 -0
  569. package/time-range/time-range.scss +66 -0
  570. package/time-range/time-range.service.d.ts +29 -0
  571. package/time-range/types.d.ts +43 -0
  572. package/timepicker/timepicker.directive.d.ts +2 -2
  573. package/toast/toast.component.d.ts +6 -4
  574. package/toast/toast.component.scss +11 -1
  575. package/toast/toast.service.d.ts +1 -0
  576. package/toast/toast.type.d.ts +1 -0
  577. package/tooltip/_tooltip-theme.scss +9 -2
  578. package/tooltip/tooltip-tokens.scss +2 -0
  579. package/tree/toggle.d.ts +1 -1
  580. package/tree/tree-base.d.ts +2 -2
  581. package/tree/tree-option.component.d.ts +1 -1
  582. package/tree/tree-selection.component.d.ts +1 -1
  583. package/tree-select/tree-select.component.d.ts +44 -3
@@ -0,0 +1,586 @@
1
+ import { coerceBooleanProperty } from '@angular/cdk/coercion';
2
+ import { Overlay } from '@angular/cdk/overlay';
3
+ import { NgTemplateOutlet, NgClass, AsyncPipe } from '@angular/common';
4
+ import * as i0 from '@angular/core';
5
+ import { inject, EventEmitter, Injectable, TemplateRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, InjectionToken, ChangeDetectorRef, ViewChild, numberAttribute, booleanAttribute, Directive, Output, NgModule } from '@angular/core';
6
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
7
+ import { KbqBadgeModule } from '@koobiq/components/badge';
8
+ import * as i3$1 from '@koobiq/components/button';
9
+ import { KbqButtonModule } from '@koobiq/components/button';
10
+ import * as i1 from '@koobiq/components/core';
11
+ import { KbqAnimationDurations, DateAdapter, DateFormatter, KbqReadStateDirective, PopUpPlacements, ThemePalette, ruRULocaleData, KbqPopUp, KBQ_LOCALE_SERVICE, applyPopupMargins, KbqPopUpTrigger, PopUpTriggers, PopUpSizes, POSITION_TO_CSS_MAP, EmptyFocusTrapStrategy } from '@koobiq/components/core';
12
+ import * as i4 from '@koobiq/components/divider';
13
+ import { KbqDividerModule } from '@koobiq/components/divider';
14
+ import * as i5 from '@koobiq/components/dropdown';
15
+ import { KbqDropdownModule } from '@koobiq/components/dropdown';
16
+ import * as i1$1 from '@koobiq/components/icon';
17
+ import { KbqIconModule } from '@koobiq/components/icon';
18
+ import * as i7 from '@koobiq/components/loader-overlay';
19
+ import { KbqLoaderOverlayModule } from '@koobiq/components/loader-overlay';
20
+ import * as i2 from '@koobiq/components/scrollbar';
21
+ import { KbqScrollbar, KbqScrollbarModule } from '@koobiq/components/scrollbar';
22
+ import * as i6 from '@koobiq/components/tooltip';
23
+ import { KbqTooltipTrigger, KbqToolTipModule } from '@koobiq/components/tooltip';
24
+ import { combineLatestWith, BehaviorSubject, merge } from 'rxjs';
25
+ import { trigger, state, style, transition, animate } from '@angular/animations';
26
+ import { KbqToastService } from '@koobiq/components/toast';
27
+ import { map, filter } from 'rxjs/operators';
28
+ import * as i3 from '@koobiq/components/title';
29
+ import { KbqTitleModule } from '@koobiq/components/title';
30
+ import { FocusTrapFactory, ConfigurableFocusTrapFactory, FOCUS_TRAP_INERT_STRATEGY } from '@angular/cdk/a11y';
31
+
32
+ /** @docs-private */
33
+ const KbqNotificationCenterAnimations = {
34
+ /** Animation that transitions a tooltip in and out. */
35
+ state: trigger('state', [
36
+ state('initial', style({
37
+ opacity: 0,
38
+ transform: 'scale(1, 0.8)'
39
+ })),
40
+ transition('* => visible', animate('120ms cubic-bezier(0, 0, 0.2, 1)', style({
41
+ opacity: 1,
42
+ transform: 'scale(1, 1)'
43
+ }))),
44
+ transition('* => hidden', animate(`${KbqAnimationDurations.Rapid} linear`, style({ opacity: 0 })))
45
+ ])
46
+ };
47
+
48
+ const maxUnreadItemsLength = 99;
49
+ class KbqNotificationCenterService {
50
+ /** Notification items */
51
+ get items() {
52
+ return this.originalItems.value;
53
+ }
54
+ set items(values) {
55
+ this.originalItems.next(this.setReadState(this.setIds(values)));
56
+ }
57
+ /** Number of unread notifications */
58
+ get unreadItemsCounter() {
59
+ return this.originalItems.pipe(map((items) => items.filter((item) => item.read === false).length)).pipe(combineLatestWith(this.onRead), map(([value]) => {
60
+ if (value < maxUnreadItemsLength) {
61
+ return value ? value.toString() : '';
62
+ }
63
+ else {
64
+ return `${maxUnreadItemsLength}+`;
65
+ }
66
+ }));
67
+ }
68
+ /** true if there are no notifications. */
69
+ get isEmpty() {
70
+ return this.originalItems.value.length === 0;
71
+ }
72
+ constructor() {
73
+ /** @docs-private */
74
+ this.adapter = inject(DateAdapter);
75
+ /** @docs-private */
76
+ this.formatter = inject(DateFormatter);
77
+ /** @docs-private */
78
+ this.toastService = inject(KbqToastService);
79
+ /** @docs-private */
80
+ this.silentMode = new BehaviorSubject(false);
81
+ /** @docs-private */
82
+ this.loadingMode = new BehaviorSubject(false);
83
+ /** @docs-private */
84
+ this.errorMode = new BehaviorSubject(false);
85
+ /** @docs-private */
86
+ this.onRead = new BehaviorSubject(null);
87
+ /** Triggers an event when the user presses the reload button. */
88
+ this.onReload = new EventEmitter();
89
+ this.originalItems = new BehaviorSubject([]);
90
+ /** @docs-private */
91
+ this.groupedItems = this.originalItems.pipe(map((items) => {
92
+ const result = {};
93
+ items.map((item) => this.makeGroup(item, result));
94
+ return Object.values(result).reverse();
95
+ }));
96
+ /** Emits an event whenever the changes. */
97
+ this.changes = merge(this.silentMode, this.loadingMode, this.errorMode, this.originalItems, this.onRead);
98
+ this.makeGroup = (item, groups) => {
99
+ const parsedDate = this.adapter.parse(item.date, '');
100
+ const groupId = this.adapter.format(parsedDate, 'yyyyMMdd');
101
+ const groupTitle = this.formatter.absoluteLongDate(parsedDate);
102
+ if (groups[groupId]) {
103
+ groups[groupId].items.unshift(item);
104
+ }
105
+ else {
106
+ groups[groupId] = {
107
+ title: groupTitle,
108
+ items: [item]
109
+ };
110
+ }
111
+ };
112
+ this.toastService?.read.pipe(takeUntilDestroyed()).subscribe((toastData) => {
113
+ const item = this.items.find((item) => item.id === toastData?.id);
114
+ if (item && !item.read) {
115
+ item.read = true;
116
+ this.onRead.next(toastData);
117
+ }
118
+ });
119
+ }
120
+ /** Set silent mode */
121
+ setSilentMode(value) {
122
+ this.silentMode.next(value);
123
+ }
124
+ /** Set loading mode */
125
+ setLoadingMode(value) {
126
+ this.loadingMode.next(value);
127
+ }
128
+ /** Set error mode */
129
+ setErrorMode(value) {
130
+ this.errorMode.next(value);
131
+ }
132
+ /** Push new notification item in center */
133
+ push(item) {
134
+ this.setReadState(this.setIds([item]));
135
+ if (!this.silentMode.value) {
136
+ this.toastService.show(item);
137
+ }
138
+ return this.originalItems.next([...this.originalItems.value, item]);
139
+ }
140
+ /** Remove notification item */
141
+ remove(removedItem) {
142
+ this.originalItems.next(this.originalItems.value.filter((item) => removedItem !== item));
143
+ }
144
+ /** Remove group of notification items */
145
+ removeGroup(group) {
146
+ this.originalItems.next(this.originalItems.value.filter((item) => !group.items.includes(item)));
147
+ }
148
+ /** Remove all notification items */
149
+ removeAll() {
150
+ this.originalItems.next([]);
151
+ }
152
+ setIds(items) {
153
+ items.forEach((item) => (item.id = item.id ?? new Date().getTime().toString()));
154
+ return items;
155
+ }
156
+ setReadState(items) {
157
+ items.forEach((item) => (item.read = item.read ?? false));
158
+ return items;
159
+ }
160
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqNotificationCenterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
161
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqNotificationCenterService, providedIn: 'root' }); }
162
+ }
163
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqNotificationCenterService, decorators: [{
164
+ type: Injectable,
165
+ args: [{ providedIn: 'root' }]
166
+ }], ctorParameters: () => [] });
167
+
168
+ let id = 0;
169
+ /** @docs-private */
170
+ class KbqNotificationItemComponent {
171
+ get style() {
172
+ return {
173
+ [`kbq-notification-item_${this.data.style}`]: !!this.data.style
174
+ };
175
+ }
176
+ get data() {
177
+ return this._data;
178
+ }
179
+ set data(value) {
180
+ this._data = value;
181
+ this.time = this.adapter.format(this.adapter.parse(value.date, ''), 'HH:mm');
182
+ }
183
+ constructor() {
184
+ this.adapter = inject(DateAdapter);
185
+ this.service = inject(KbqNotificationCenterService);
186
+ this.readStateDirective = inject(KbqReadStateDirective, { host: true });
187
+ this.center = inject(KbqNotificationCenterComponent, { host: true });
188
+ this.popUpPlacements = PopUpPlacements;
189
+ this.themePalette = ThemePalette;
190
+ this.id = id++;
191
+ this.$implicit = this;
192
+ this.readStateDirective.read
193
+ .pipe(filter((value) => value), takeUntilDestroyed())
194
+ .subscribe(() => {
195
+ this.data.read = true;
196
+ this.service.onRead.next(this.data);
197
+ });
198
+ }
199
+ isTemplateRef(value) {
200
+ return value instanceof TemplateRef;
201
+ }
202
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqNotificationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
203
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: KbqNotificationItemComponent, isStandalone: true, selector: "kbq-notification-item", inputs: { data: "data" }, host: { properties: { "class": "style" }, classAttribute: "kbq-notification-item" }, hostDirectives: [{ directive: i1.KbqReadStateDirective }], ngImport: i0, template: "@if (data.icon) {\n <div class=\"kbq-notification-item__icon-container layout-row layout-align-start-start\">\n @if (data.icon === true) {\n @switch (data.style) {\n @case ('contrast') {\n <i\n kbq-icon=\"kbq-info-circle_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"$any(data.style)\"\n [ngClass]=\"data.iconClass\"\n ></i>\n }\n @case ('success') {\n <i\n kbq-icon=\"kbq-check-circle_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"$any(data.style)\"\n [ngClass]=\"data.iconClass\"\n ></i>\n }\n @case ('warning') {\n <i\n kbq-icon=\"kbq-exclamation-triangle_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"$any(data.style)\"\n [ngClass]=\"data.iconClass\"\n ></i>\n }\n @case ('error') {\n <i\n kbq-icon=\"kbq-exclamation-triangle_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"$any(data.style)\"\n [ngClass]=\"data.iconClass\"\n ></i>\n }\n }\n } @else if (isTemplateRef(data.icon)) {\n <ng-container [ngTemplateOutlet]=\"$any(data.icon)\" [ngTemplateOutletContext]=\"{ $implicit }\" />\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]=\"{ $implicit }\" />\n }\n @if (!isTemplateRef(data.title)) {\n <p>{{ data.title }}</p>\n }\n\n <div class=\"kbq-notification-item-time\" [class.kbq-notification-item-time_read]=\"data.read\">\n <div class=\"kbq-notification-item-time__value\">{{ time }}</div>\n <i class=\"kbq-notification-item-time__state\" kbq-icon=\"kbq-circle-xs_16\" [color]=\"'theme'\"></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]=\"{ $implicit }\" />\n }\n @if (!isTemplateRef(data.caption)) {\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]=\"{ $implicit }\" />\n }\n @if (!isTemplateRef(data.content)) {\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]=\"{ $implicit }\" />\n }\n @if (!isTemplateRef(data.actions)) {\n {{ data.actions }}\n }\n </div>\n }\n</div>\n\n<button\n kbq-button\n class=\"kbq-notification-item__remove-button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n [kbqTooltipArrow]=\"false\"\n [kbqTooltip]=\"center.localeData.remove\"\n [kbqPlacement]=\"popUpPlacements.Right\"\n (click)=\"service.remove(data)\"\n>\n <i kbq-icon=\"kbq-trash_16\"></i>\n</button>\n", styles: [".kbq-notification-item{display:flex;box-sizing:border-box;position:relative;border-radius:var(--kbq-size-s);height:auto;margin-left:var(--kbq-size-m);margin-right:var(--kbq-size-m)}.kbq-notification-item:hover .kbq-notification-item-time{visibility:hidden}.kbq-notification-item:hover .kbq-notification-item__remove-button{display:block}.kbq-notification-item__icon-container{flex-shrink:0;width:var(--kbq-size-l);max-width:var(--kbq-size-l);height:var(--kbq-size-l);max-height:var(--kbq-size-l);margin-right:var(--kbq-size-s);padding-left:var(--kbq-size-m);padding-top:14px}.kbq-notification-item__container{display:flex;flex-direction:column;flex:1;padding-top:var(--kbq-size-m);padding-right:var(--kbq-size-l);padding-bottom:var(--kbq-size-m);overflow:hidden}.kbq-notification-item__title{display:flex;flex-direction:row;justify-content:space-between;overflow:hidden;text-overflow:ellipsis}.kbq-notification-item__title>p{margin:0;overflow:hidden;text-overflow:ellipsis}.kbq-notification-item__title.kbq-notification-item__title_with-content{margin-bottom:var(--kbq-size-xxs)}.kbq-notification-item-time{display:flex;flex-direction:row;height:var(--kbq-size-xl);align-items:center;padding-left:22px}.kbq-notification-item-time .kbq-notification-item-time__value{margin-right:var(--kbq-size-3xs)}.kbq-notification-item-time.kbq-notification-item-time_read .kbq-notification-item-time__state{display:none}.kbq-notification-item__text{display:flex;flex:1;align-items:center}.kbq-notification-item__content{display:flex;flex-direction:column;white-space:pre-wrap}.kbq-notification-item__actions{display:flex;padding-top:var(--kbq-size-s);gap:var(--kbq-size-m)}.kbq-notification-item__remove-button{position:absolute;top:var(--kbq-size-xs);right:var(--kbq-size-s);display:none}.kbq-notification-item{background:var(--kbq-background-card)}.kbq-notification-item .kbq-notification-item__title{color:var(--kbq-foreground-contrast)}.kbq-notification-item .kbq-notification-item__text,.kbq-notification-item .kbq-notification-item-time.kbq-notification-item-time_read .kbq-notification-item-time__value{color:var(--kbq-foreground-contrast-secondary)}.kbq-notification-item:hover{background:var(--kbq-states-background-transparent-hover)}.kbq-notification-item{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-notification-item .kbq-notification-item-time{font-size:var(--kbq-typography-text-compact-font-size);font-style:var(--kbq-typography-text-compact-font-style);font-weight:var(--kbq-typography-text-compact-font-weight);line-height:var(--kbq-typography-text-compact-line-height);font-family:var(--kbq-typography-text-compact-font-family);text-transform:var(--kbq-typography-text-compact-text-transform);font-feature-settings:var(--kbq-typography-text-compact-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-letter-spacing)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i1$1.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: KbqTitleModule }, { kind: "directive", type: i3.KbqTitleDirective, selector: "[kbq-title]", exportAs: ["kbqTitle"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i3$1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i3$1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "directive", type: KbqTooltipTrigger, selector: "[kbqTooltip]", inputs: ["hideWithTimeout", "kbqVisible", "kbqPlacement", "kbqRelativeToPointer", "kbqPlacementPriority", "kbqTooltip", "kbqTooltipDisabled", "kbqEnterDelay", "kbqLeaveDelay", "kbqTrigger", "kbqTooltipClass", "kbqTooltipContext", "kbqTooltipColor", "kbqTooltipArrow", "kbqTooltipOffset"], outputs: ["kbqPlacementChange", "kbqVisibleChange"], exportAs: ["kbqTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
204
+ }
205
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqNotificationItemComponent, decorators: [{
206
+ type: Component,
207
+ args: [{ standalone: true, imports: [
208
+ NgTemplateOutlet,
209
+ KbqIconModule,
210
+ NgClass,
211
+ KbqTitleModule,
212
+ KbqButtonModule,
213
+ KbqTooltipTrigger
214
+ ], selector: 'kbq-notification-item', host: {
215
+ class: 'kbq-notification-item',
216
+ '[class]': 'style'
217
+ }, hostDirectives: [KbqReadStateDirective], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "@if (data.icon) {\n <div class=\"kbq-notification-item__icon-container layout-row layout-align-start-start\">\n @if (data.icon === true) {\n @switch (data.style) {\n @case ('contrast') {\n <i\n kbq-icon=\"kbq-info-circle_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"$any(data.style)\"\n [ngClass]=\"data.iconClass\"\n ></i>\n }\n @case ('success') {\n <i\n kbq-icon=\"kbq-check-circle_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"$any(data.style)\"\n [ngClass]=\"data.iconClass\"\n ></i>\n }\n @case ('warning') {\n <i\n kbq-icon=\"kbq-exclamation-triangle_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"$any(data.style)\"\n [ngClass]=\"data.iconClass\"\n ></i>\n }\n @case ('error') {\n <i\n kbq-icon=\"kbq-exclamation-triangle_16\"\n class=\"kbq-notification-item__icon\"\n [color]=\"$any(data.style)\"\n [ngClass]=\"data.iconClass\"\n ></i>\n }\n }\n } @else if (isTemplateRef(data.icon)) {\n <ng-container [ngTemplateOutlet]=\"$any(data.icon)\" [ngTemplateOutletContext]=\"{ $implicit }\" />\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]=\"{ $implicit }\" />\n }\n @if (!isTemplateRef(data.title)) {\n <p>{{ data.title }}</p>\n }\n\n <div class=\"kbq-notification-item-time\" [class.kbq-notification-item-time_read]=\"data.read\">\n <div class=\"kbq-notification-item-time__value\">{{ time }}</div>\n <i class=\"kbq-notification-item-time__state\" kbq-icon=\"kbq-circle-xs_16\" [color]=\"'theme'\"></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]=\"{ $implicit }\" />\n }\n @if (!isTemplateRef(data.caption)) {\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]=\"{ $implicit }\" />\n }\n @if (!isTemplateRef(data.content)) {\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]=\"{ $implicit }\" />\n }\n @if (!isTemplateRef(data.actions)) {\n {{ data.actions }}\n }\n </div>\n }\n</div>\n\n<button\n kbq-button\n class=\"kbq-notification-item__remove-button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n [kbqTooltipArrow]=\"false\"\n [kbqTooltip]=\"center.localeData.remove\"\n [kbqPlacement]=\"popUpPlacements.Right\"\n (click)=\"service.remove(data)\"\n>\n <i kbq-icon=\"kbq-trash_16\"></i>\n</button>\n", styles: [".kbq-notification-item{display:flex;box-sizing:border-box;position:relative;border-radius:var(--kbq-size-s);height:auto;margin-left:var(--kbq-size-m);margin-right:var(--kbq-size-m)}.kbq-notification-item:hover .kbq-notification-item-time{visibility:hidden}.kbq-notification-item:hover .kbq-notification-item__remove-button{display:block}.kbq-notification-item__icon-container{flex-shrink:0;width:var(--kbq-size-l);max-width:var(--kbq-size-l);height:var(--kbq-size-l);max-height:var(--kbq-size-l);margin-right:var(--kbq-size-s);padding-left:var(--kbq-size-m);padding-top:14px}.kbq-notification-item__container{display:flex;flex-direction:column;flex:1;padding-top:var(--kbq-size-m);padding-right:var(--kbq-size-l);padding-bottom:var(--kbq-size-m);overflow:hidden}.kbq-notification-item__title{display:flex;flex-direction:row;justify-content:space-between;overflow:hidden;text-overflow:ellipsis}.kbq-notification-item__title>p{margin:0;overflow:hidden;text-overflow:ellipsis}.kbq-notification-item__title.kbq-notification-item__title_with-content{margin-bottom:var(--kbq-size-xxs)}.kbq-notification-item-time{display:flex;flex-direction:row;height:var(--kbq-size-xl);align-items:center;padding-left:22px}.kbq-notification-item-time .kbq-notification-item-time__value{margin-right:var(--kbq-size-3xs)}.kbq-notification-item-time.kbq-notification-item-time_read .kbq-notification-item-time__state{display:none}.kbq-notification-item__text{display:flex;flex:1;align-items:center}.kbq-notification-item__content{display:flex;flex-direction:column;white-space:pre-wrap}.kbq-notification-item__actions{display:flex;padding-top:var(--kbq-size-s);gap:var(--kbq-size-m)}.kbq-notification-item__remove-button{position:absolute;top:var(--kbq-size-xs);right:var(--kbq-size-s);display:none}.kbq-notification-item{background:var(--kbq-background-card)}.kbq-notification-item .kbq-notification-item__title{color:var(--kbq-foreground-contrast)}.kbq-notification-item .kbq-notification-item__text,.kbq-notification-item .kbq-notification-item-time.kbq-notification-item-time_read .kbq-notification-item-time__value{color:var(--kbq-foreground-contrast-secondary)}.kbq-notification-item:hover{background:var(--kbq-states-background-transparent-hover)}.kbq-notification-item{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}.kbq-notification-item .kbq-notification-item-time{font-size:var(--kbq-typography-text-compact-font-size);font-style:var(--kbq-typography-text-compact-font-style);font-weight:var(--kbq-typography-text-compact-font-weight);line-height:var(--kbq-typography-text-compact-line-height);font-family:var(--kbq-typography-text-compact-font-family);text-transform:var(--kbq-typography-text-compact-text-transform);font-feature-settings:var(--kbq-typography-text-compact-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-letter-spacing)}\n"] }]
218
+ }], ctorParameters: () => [], propDecorators: { data: [{
219
+ type: Input
220
+ }] } });
221
+
222
+ const defaultOffsetX = 8;
223
+ /**default configuration of notification-center */
224
+ const KBQ_NOTIFICATION_CENTER_DEFAULT_CONFIGURATION = ruRULocaleData.notificationCenter;
225
+ /** Injection Token for providing configuration of notification-center */
226
+ const KBQ_NOTIFICATION_CENTER_CONFIGURATION = new InjectionToken('KbqNotificationCenterConfiguration');
227
+ /** @docs-private */
228
+ const KBQ_NOTIFICATION_CENTER_SCROLL_STRATEGY = new InjectionToken('kbq-notification-center-scroll-strategy');
229
+ /** @docs-private */
230
+ function kbqNotificationCenterScrollStrategyFactory(overlay) {
231
+ return () => overlay.scrollStrategies.reposition({ scrollThrottle: 20 });
232
+ }
233
+ /** @docs-private */
234
+ const KBQ_NOTIFICATION_CENTER_SCROLL_STRATEGY_FACTORY_PROVIDER = {
235
+ provide: KBQ_NOTIFICATION_CENTER_SCROLL_STRATEGY,
236
+ deps: [Overlay],
237
+ useFactory: kbqNotificationCenterScrollStrategyFactory
238
+ };
239
+ /** @docs-private */
240
+ class KbqNotificationCenterComponent extends KbqPopUp {
241
+ /** localized data
242
+ * @docs-private */
243
+ get localeData() {
244
+ return this.configuration;
245
+ }
246
+ get popoverHeight() {
247
+ return this._popoverHeight;
248
+ }
249
+ set popoverHeight(value) {
250
+ this._popoverHeight = value;
251
+ this.elementRef.nativeElement.style.height = value;
252
+ }
253
+ constructor() {
254
+ super();
255
+ /** @docs-private */
256
+ this.changeDetectorRef = inject(ChangeDetectorRef);
257
+ /** @docs-private */
258
+ this.localeService = inject(KBQ_LOCALE_SERVICE, { optional: true });
259
+ /** @docs-private */
260
+ this.dateAdapter = inject(DateAdapter);
261
+ /** @docs-private */
262
+ this.service = inject(KbqNotificationCenterService);
263
+ this.externalConfiguration = inject(KBQ_NOTIFICATION_CENTER_CONFIGURATION, { optional: true });
264
+ /** @docs-private */
265
+ this.isTopOverflow = false;
266
+ /** @docs-private */
267
+ this.isBottomOverflow = false;
268
+ /** @docs-private */
269
+ this.prefix = 'kbq-notification-center';
270
+ /** @docs-private */
271
+ this.isTrapFocus = false;
272
+ this.checkOverflow = () => {
273
+ const nativeElement = this.scrollContainer.contentElement.nativeElement;
274
+ const { scrollTop, offsetHeight, scrollHeight } = nativeElement;
275
+ this.isTopOverflow = scrollTop > 0;
276
+ this.isBottomOverflow = scrollTop + offsetHeight < scrollHeight;
277
+ this.changeDetectorRef.markForCheck();
278
+ };
279
+ this.updateLocaleParams = () => {
280
+ this.configuration = this.externalConfiguration || this.localeService?.getParams('notificationCenter');
281
+ this.changeDetectorRef.markForCheck();
282
+ };
283
+ this.localeService?.changes.pipe(takeUntilDestroyed()).subscribe(this.updateLocaleParams);
284
+ if (!this.localeService) {
285
+ this.initDefaultParams();
286
+ }
287
+ }
288
+ ngAfterViewInit() {
289
+ this.visibleChange.subscribe((state) => {
290
+ if (this.offset !== null && state) {
291
+ applyPopupMargins(this.renderer, this.elementRef.nativeElement, this.prefix, `${this.offset.toString()}px`);
292
+ }
293
+ });
294
+ this.service.changes.subscribe(() => this.changeDetectorRef.markForCheck());
295
+ this.switcher.focus();
296
+ setTimeout(this.checkOverflow);
297
+ }
298
+ /** @docs-private */
299
+ updateClassMap(placement, customClass, size) {
300
+ super.updateClassMap(placement, customClass, { [`${this.prefix}_${size}`]: !!size });
301
+ }
302
+ /** @docs-private */
303
+ updateTrapFocus(isTrapFocus) {
304
+ this.isTrapFocus = isTrapFocus;
305
+ }
306
+ /** @docs-private */
307
+ escapeHandler() {
308
+ this.hide(0);
309
+ }
310
+ initDefaultParams() {
311
+ this.configuration = KBQ_NOTIFICATION_CENTER_DEFAULT_CONFIGURATION;
312
+ }
313
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqNotificationCenterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
314
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: KbqNotificationCenterComponent, isStandalone: true, selector: "kbq-notification-center", host: { listeners: { "keydown.escape": "escapeHandler()" }, properties: { "class.kbq-notification-center_popover": "popoverMode" }, classAttribute: "kbq-notification-center" }, viewQueries: [{ propertyName: "scrollContainer", first: true, predicate: KbqScrollbar, descendants: true }, { propertyName: "switcher", first: true, predicate: ["notificationSwitcher"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"kbq-notification-center-header\">\n <div class=\"kbq-notification-center-title\">\n <div class=\"kbq-notification-center-title__text\">{{ localeData.notifications }}</div>\n <button\n #notificationSwitcher\n #dropdownTrigger=\"kbqDropdownTrigger\"\n kbq-button\n class=\"kbq-notification-center-title__button\"\n [kbqDropdownTriggerFor]=\"notificationSwitcherDropdown\"\n [kbqTooltip]=\"service.silentMode.value ? localeData.doNotDisturb : localeData.showPopUpNotifications\"\n [kbqTooltipArrow]=\"false\"\n [kbqTooltipOffset]=\"4\"\n [kbqTooltipDisabled]=\"dropdownTrigger.opened\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n >\n <i kbq-icon=\"{{ service.silentMode.value ? 'kbq-bell-slash_16' : 'kbq-bell_16' }}\"></i>\n </button>\n </div>\n <div class=\"kbq-notification-center-toolbar\">\n @if (!service.isEmpty) {\n <button\n kbq-button\n class=\"kbq-notification-center-toolbar__button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n (click)=\"service.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 [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<div\n kbq-scrollbar\n class=\"kbq-notification-center-container\"\n [class.kbq-notification-center_bottom-overflow]=\"isBottomOverflow\"\n (onScroll)=\"checkOverflow()\"\n>\n @if (!service.errorMode.value) {\n @if (!service.loadingMode.value) {\n @for (group of service.groupedItems | async; track group) {\n <div\n class=\"kbq-notification-center-sub-header\"\n [class.kbq-notification-center_top-overflow]=\"isTopOverflow\"\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 [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n [kbqTooltip]=\"localeData.remove\"\n [kbqTooltipArrow]=\"false\"\n (click)=\"service.removeGroup(group)\"\n >\n <i kbq-icon=\"kbq-trash_16\"></i>\n </button>\n </div>\n\n @for (item of group.items; track item) {\n <kbq-notification-item [data]=\"item\" />\n }\n } @empty {\n <div class=\"kbq-notification-center-empty-container\">\n <i kbq-icon-item=\"kbq-bell_16\" [big]=\"true\" [color]=\"'contrast-fade'\"></i>\n {{ localeData.noNotifications }}\n </div>\n }\n } @else {\n <kbq-loader-overlay [transparent]=\"true\" />\n }\n } @else {\n <div class=\"kbq-notification-center-error-container\">\n <i kbq-icon-item=\"kbq-bell_16\" [big]=\"true\" [color]=\"'error'\" [fade]=\"true\"></i>\n {{ localeData.failedToLoadNotifications }}\n <button kbq-button [kbqStyle]=\"'transparent'\" [color]=\"'theme'\" (click)=\"service.onReload.emit()\">\n {{ localeData.repeat }}\n </button>\n </div>\n }\n</div>\n\n<kbq-dropdown #notificationSwitcherDropdown=\"kbqDropdown\">\n <button kbq-dropdown-item (click)=\"service.setSilentMode(false)\">\n <i kbq-icon=\"{{ !service.silentMode.value ? 'kbq-circle-xs_16' : '' }}\" [style.min-width.px]=\"16\"></i>\n {{ localeData.showPopUpNotifications }}\n </button>\n <button kbq-dropdown-item (click)=\"service.setSilentMode(true)\">\n <i kbq-icon=\"{{ service.silentMode.value ? 'kbq-circle-xs_16' : '' }}\" [style.min-width.px]=\"16\"></i>\n {{ localeData.doNotDisturb }}\n </button>\n</kbq-dropdown>\n", styles: [".kbq-notification-center{position:relative;display:flex;flex-direction:column;width:400px;height:100vh;box-sizing:border-box;z-index:1}.kbq-notification-center:not(.kbq-notification-center_popover){border-right:1px solid;border-left:1px solid}.kbq-notification-center.kbq-notification-center_popover{margin-top:var(--kbq-size-xxs);margin-bottom:var(--kbq-size-xxs);border-radius:var(--kbq-size-xs);height:calc(100vh - 48px);box-shadow:var(--kbq-shadow-popup)}.kbq-notification-center-header{display:flex;flex-direction:row;justify-content:space-between;padding:var(--kbq-size-xl) var(--kbq-size-xl) var(--kbq-size-xxs) var(--kbq-size-xxl)}.kbq-notification-center-title{display:flex;flex-direction:row;align-items:center;gap:var(--kbq-size-xxs)}.kbq-notification-center-toolbar{display:flex;flex-direction:row;align-items:center}.kbq-notification-center-toolbar .kbq-divider.kbq-divider_vertical{height:var(--kbq-size-m)}.kbq-notification-center-sub-header{position:sticky;top:0;z-index:100;display:flex;flex-direction:row;padding:var(--kbq-size-s) var(--kbq-size-xxl)}.kbq-notification-center-sub-header .kbq-notification-center-sub-header__button{position:absolute;top:0;right:var(--kbq-size-xl);display:none}.kbq-notification-center-sub-header:hover .kbq-notification-center-sub-header__button{display:flex}.kbq-notification-center-sub-header:first-child.kbq-notification-center_top-overflow{box-shadow:var(--kbq-shadow-overflow-normal-bottom)}.kbq-notification-center-container{height:100%;border-radius:inherit;padding-bottom:var(--kbq-size-m)}.kbq-notification-center-container .kbq-loader-overlay_parent{border-radius:inherit}.kbq-notification-center-container.kbq-notification-center_bottom-overflow{box-shadow:var(--kbq-shadow-overflow-normal-bottom)}.kbq-notification-center-empty-container,.kbq-notification-center-error-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}.kbq-notification-center-empty-container .kbq-icon,.kbq-notification-center-error-container .kbq-icon{margin-bottom:var(--kbq-size-xl)}.kbq-notification-center-empty-container .kbq-button,.kbq-notification-center-error-container .kbq-button{margin-top:var(--kbq-size-s)}.kbq-notification-center,.kbq-notification-center-sub-header{background:var(--kbq-background-card)}.kbq-notification-center:not(.kbq-notification-center_popover),.kbq-notification-center-sub-header:not(.kbq-notification-center_popover){border-right-color:var(--kbq-line-contrast-less);border-left-color:var(--kbq-line-contrast-less)}.kbq-notification-center-error-container{color:var(--kbq-foreground-error)}.kbq-notification-center{font-size:var(--kbq-typography-text-normal-medium-font-size);font-style:var(--kbq-typography-text-normal-medium-font-style);font-weight:var(--kbq-typography-text-normal-medium-font-weight);line-height:var(--kbq-typography-text-normal-medium-line-height);font-family:var(--kbq-typography-text-normal-medium-font-family);text-transform:var(--kbq-typography-text-normal-medium-text-transform);font-feature-settings:var(--kbq-typography-text-normal-medium-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-medium-letter-spacing)}.kbq-notification-center-title__text{font-size:var(--kbq-typography-text-big-strong-font-size);font-style:var(--kbq-typography-text-big-strong-font-style);font-weight:var(--kbq-typography-text-big-strong-font-weight);line-height:var(--kbq-typography-text-big-strong-line-height);font-family:var(--kbq-typography-text-big-strong-font-family);text-transform:var(--kbq-typography-text-big-strong-text-transform);font-feature-settings:var(--kbq-typography-text-big-strong-font-feature-settings);letter-spacing:var(--kbq-typography-text-big-strong-letter-spacing)}\n"], dependencies: [{ kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i1$1.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }, { kind: "component", type: i1$1.KbqIconItem, selector: "[kbq-icon-item]", inputs: ["kbq-icon-item", "fade", "big"] }, { kind: "ngmodule", type: KbqBadgeModule }, { kind: "ngmodule", type: KbqScrollbarModule }, { kind: "component", type: i2.KbqScrollbar, selector: "kbq-scrollbar, [kbq-scrollbar]", inputs: ["initializationTarget", "options", "events", "defer"], outputs: ["onInitialize", "onUpdate", "onDestroy", "onScroll"], exportAs: ["kbqScrollbar"] }, { kind: "ngmodule", type: KbqButtonModule }, { kind: "component", type: i3$1.KbqButton, selector: "[kbq-button]", inputs: ["kbqStyle", "disabled", "tabIndex"] }, { kind: "directive", type: i3$1.KbqButtonCssStyler, selector: "[kbq-button]" }, { kind: "directive", type: i3$1.KbqButtonDropdownTrigger, selector: "[kbq-button][kbqDropdownTriggerFor]" }, { kind: "ngmodule", type: KbqDividerModule }, { kind: "component", type: i4.KbqDivider, selector: "kbq-divider", inputs: ["vertical", "inset", "paddings"] }, { kind: "ngmodule", type: KbqDropdownModule }, { kind: "component", type: i5.KbqDropdown, selector: "kbq-dropdown", inputs: ["navigationWithWrap", "xPosition", "yPosition", "overlapTriggerY", "overlapTriggerX", "hasBackdrop", "class", "backdropClass"], outputs: ["closed"], exportAs: ["kbqDropdown"] }, { kind: "component", type: i5.KbqDropdownItem, selector: "kbq-dropdown-item, [kbq-dropdown-item]", inputs: ["disabled"], exportAs: ["kbqDropdownItem"] }, { kind: "directive", type: i5.KbqDropdownTrigger, selector: "[kbqDropdownTriggerFor]", inputs: ["offsetX", "offsetY", "kbqDropdownTriggerData", "openByArrowDown", "kbqDropdownTriggerRestoreFocus", "kbqDropdownTriggerFor"], outputs: ["dropdownOpened", "dropdownClosed"], exportAs: ["kbqDropdownTrigger"] }, { kind: "ngmodule", type: KbqToolTipModule }, { kind: "directive", type: i6.KbqTooltipTrigger, selector: "[kbqTooltip]", inputs: ["hideWithTimeout", "kbqVisible", "kbqPlacement", "kbqRelativeToPointer", "kbqPlacementPriority", "kbqTooltip", "kbqTooltipDisabled", "kbqEnterDelay", "kbqLeaveDelay", "kbqTrigger", "kbqTooltipClass", "kbqTooltipContext", "kbqTooltipColor", "kbqTooltipArrow", "kbqTooltipOffset"], outputs: ["kbqPlacementChange", "kbqVisibleChange"], exportAs: ["kbqTooltip"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: KbqNotificationItemComponent, selector: "kbq-notification-item", inputs: ["data"] }, { kind: "ngmodule", type: KbqLoaderOverlayModule }, { kind: "component", type: i7.KbqLoaderOverlay, selector: "kbq-loader-overlay", inputs: ["text", "caption", "size", "transparent"] }], animations: [KbqNotificationCenterAnimations.state], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
315
+ }
316
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqNotificationCenterComponent, decorators: [{
317
+ type: Component,
318
+ args: [{ standalone: true, selector: 'kbq-notification-center', preserveWhitespaces: false, host: {
319
+ class: 'kbq-notification-center',
320
+ '[class.kbq-notification-center_popover]': 'popoverMode',
321
+ '(keydown.escape)': 'escapeHandler()'
322
+ }, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
323
+ KbqIconModule,
324
+ KbqBadgeModule,
325
+ KbqScrollbarModule,
326
+ KbqButtonModule,
327
+ KbqDividerModule,
328
+ KbqDropdownModule,
329
+ KbqToolTipModule,
330
+ AsyncPipe,
331
+ KbqNotificationItemComponent,
332
+ KbqLoaderOverlayModule
333
+ ], animations: [KbqNotificationCenterAnimations.state], template: "<div class=\"kbq-notification-center-header\">\n <div class=\"kbq-notification-center-title\">\n <div class=\"kbq-notification-center-title__text\">{{ localeData.notifications }}</div>\n <button\n #notificationSwitcher\n #dropdownTrigger=\"kbqDropdownTrigger\"\n kbq-button\n class=\"kbq-notification-center-title__button\"\n [kbqDropdownTriggerFor]=\"notificationSwitcherDropdown\"\n [kbqTooltip]=\"service.silentMode.value ? localeData.doNotDisturb : localeData.showPopUpNotifications\"\n [kbqTooltipArrow]=\"false\"\n [kbqTooltipOffset]=\"4\"\n [kbqTooltipDisabled]=\"dropdownTrigger.opened\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n >\n <i kbq-icon=\"{{ service.silentMode.value ? 'kbq-bell-slash_16' : 'kbq-bell_16' }}\"></i>\n </button>\n </div>\n <div class=\"kbq-notification-center-toolbar\">\n @if (!service.isEmpty) {\n <button\n kbq-button\n class=\"kbq-notification-center-toolbar__button\"\n [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n (click)=\"service.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 [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<div\n kbq-scrollbar\n class=\"kbq-notification-center-container\"\n [class.kbq-notification-center_bottom-overflow]=\"isBottomOverflow\"\n (onScroll)=\"checkOverflow()\"\n>\n @if (!service.errorMode.value) {\n @if (!service.loadingMode.value) {\n @for (group of service.groupedItems | async; track group) {\n <div\n class=\"kbq-notification-center-sub-header\"\n [class.kbq-notification-center_top-overflow]=\"isTopOverflow\"\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 [kbqStyle]=\"'transparent'\"\n [color]=\"'contrast'\"\n [kbqTooltip]=\"localeData.remove\"\n [kbqTooltipArrow]=\"false\"\n (click)=\"service.removeGroup(group)\"\n >\n <i kbq-icon=\"kbq-trash_16\"></i>\n </button>\n </div>\n\n @for (item of group.items; track item) {\n <kbq-notification-item [data]=\"item\" />\n }\n } @empty {\n <div class=\"kbq-notification-center-empty-container\">\n <i kbq-icon-item=\"kbq-bell_16\" [big]=\"true\" [color]=\"'contrast-fade'\"></i>\n {{ localeData.noNotifications }}\n </div>\n }\n } @else {\n <kbq-loader-overlay [transparent]=\"true\" />\n }\n } @else {\n <div class=\"kbq-notification-center-error-container\">\n <i kbq-icon-item=\"kbq-bell_16\" [big]=\"true\" [color]=\"'error'\" [fade]=\"true\"></i>\n {{ localeData.failedToLoadNotifications }}\n <button kbq-button [kbqStyle]=\"'transparent'\" [color]=\"'theme'\" (click)=\"service.onReload.emit()\">\n {{ localeData.repeat }}\n </button>\n </div>\n }\n</div>\n\n<kbq-dropdown #notificationSwitcherDropdown=\"kbqDropdown\">\n <button kbq-dropdown-item (click)=\"service.setSilentMode(false)\">\n <i kbq-icon=\"{{ !service.silentMode.value ? 'kbq-circle-xs_16' : '' }}\" [style.min-width.px]=\"16\"></i>\n {{ localeData.showPopUpNotifications }}\n </button>\n <button kbq-dropdown-item (click)=\"service.setSilentMode(true)\">\n <i kbq-icon=\"{{ service.silentMode.value ? 'kbq-circle-xs_16' : '' }}\" [style.min-width.px]=\"16\"></i>\n {{ localeData.doNotDisturb }}\n </button>\n</kbq-dropdown>\n", styles: [".kbq-notification-center{position:relative;display:flex;flex-direction:column;width:400px;height:100vh;box-sizing:border-box;z-index:1}.kbq-notification-center:not(.kbq-notification-center_popover){border-right:1px solid;border-left:1px solid}.kbq-notification-center.kbq-notification-center_popover{margin-top:var(--kbq-size-xxs);margin-bottom:var(--kbq-size-xxs);border-radius:var(--kbq-size-xs);height:calc(100vh - 48px);box-shadow:var(--kbq-shadow-popup)}.kbq-notification-center-header{display:flex;flex-direction:row;justify-content:space-between;padding:var(--kbq-size-xl) var(--kbq-size-xl) var(--kbq-size-xxs) var(--kbq-size-xxl)}.kbq-notification-center-title{display:flex;flex-direction:row;align-items:center;gap:var(--kbq-size-xxs)}.kbq-notification-center-toolbar{display:flex;flex-direction:row;align-items:center}.kbq-notification-center-toolbar .kbq-divider.kbq-divider_vertical{height:var(--kbq-size-m)}.kbq-notification-center-sub-header{position:sticky;top:0;z-index:100;display:flex;flex-direction:row;padding:var(--kbq-size-s) var(--kbq-size-xxl)}.kbq-notification-center-sub-header .kbq-notification-center-sub-header__button{position:absolute;top:0;right:var(--kbq-size-xl);display:none}.kbq-notification-center-sub-header:hover .kbq-notification-center-sub-header__button{display:flex}.kbq-notification-center-sub-header:first-child.kbq-notification-center_top-overflow{box-shadow:var(--kbq-shadow-overflow-normal-bottom)}.kbq-notification-center-container{height:100%;border-radius:inherit;padding-bottom:var(--kbq-size-m)}.kbq-notification-center-container .kbq-loader-overlay_parent{border-radius:inherit}.kbq-notification-center-container.kbq-notification-center_bottom-overflow{box-shadow:var(--kbq-shadow-overflow-normal-bottom)}.kbq-notification-center-empty-container,.kbq-notification-center-error-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%}.kbq-notification-center-empty-container .kbq-icon,.kbq-notification-center-error-container .kbq-icon{margin-bottom:var(--kbq-size-xl)}.kbq-notification-center-empty-container .kbq-button,.kbq-notification-center-error-container .kbq-button{margin-top:var(--kbq-size-s)}.kbq-notification-center,.kbq-notification-center-sub-header{background:var(--kbq-background-card)}.kbq-notification-center:not(.kbq-notification-center_popover),.kbq-notification-center-sub-header:not(.kbq-notification-center_popover){border-right-color:var(--kbq-line-contrast-less);border-left-color:var(--kbq-line-contrast-less)}.kbq-notification-center-error-container{color:var(--kbq-foreground-error)}.kbq-notification-center{font-size:var(--kbq-typography-text-normal-medium-font-size);font-style:var(--kbq-typography-text-normal-medium-font-style);font-weight:var(--kbq-typography-text-normal-medium-font-weight);line-height:var(--kbq-typography-text-normal-medium-line-height);font-family:var(--kbq-typography-text-normal-medium-font-family);text-transform:var(--kbq-typography-text-normal-medium-text-transform);font-feature-settings:var(--kbq-typography-text-normal-medium-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-medium-letter-spacing)}.kbq-notification-center-title__text{font-size:var(--kbq-typography-text-big-strong-font-size);font-style:var(--kbq-typography-text-big-strong-font-style);font-weight:var(--kbq-typography-text-big-strong-font-weight);line-height:var(--kbq-typography-text-big-strong-line-height);font-family:var(--kbq-typography-text-big-strong-font-family);text-transform:var(--kbq-typography-text-big-strong-text-transform);font-feature-settings:var(--kbq-typography-text-big-strong-font-feature-settings);letter-spacing:var(--kbq-typography-text-big-strong-letter-spacing)}\n"] }]
334
+ }], ctorParameters: () => [], propDecorators: { scrollContainer: [{
335
+ type: ViewChild,
336
+ args: [KbqScrollbar]
337
+ }], switcher: [{
338
+ type: ViewChild,
339
+ args: ['notificationSwitcher']
340
+ }] } });
341
+ class KbqNotificationCenterTrigger extends KbqPopUpTrigger {
342
+ /** Number of unread notifications */
343
+ get unreadItemsCounter() {
344
+ return this.service.unreadItemsCounter;
345
+ }
346
+ /** Use popover or not */
347
+ get popoverMode() {
348
+ return this._popoverMode;
349
+ }
350
+ set popoverMode(value) {
351
+ this._popoverMode = value;
352
+ this.placement = PopUpPlacements.Bottom;
353
+ this.updatePlacementPriority(['bottomCenter', 'bottomLeft', 'bottomRight']);
354
+ }
355
+ /** Set height of popover. Default is calc(100vh - 48px). 48px - height of navbar */
356
+ get popoverHeight() {
357
+ return this._popoverHeight;
358
+ }
359
+ set popoverHeight(value) {
360
+ this._popoverHeight = value;
361
+ if (this.instance?.popoverHeight) {
362
+ this.instance.popoverHeight = value;
363
+ }
364
+ }
365
+ /** Whether the trigger is disabled. */
366
+ get disabled() {
367
+ return this._disabled;
368
+ }
369
+ set disabled(value) {
370
+ this._disabled = coerceBooleanProperty(value);
371
+ if (this._disabled) {
372
+ this.hide();
373
+ }
374
+ }
375
+ /** @docs-private */
376
+ get hasClickTrigger() {
377
+ return this.trigger.includes(PopUpTriggers.Click);
378
+ }
379
+ /** @docs-private */
380
+ get overlayConfig() {
381
+ const defaultPanelClass = 'kbq-notification-center__panel';
382
+ return {
383
+ panelClass: this.panelClass ? [defaultPanelClass, this.panelClass] : defaultPanelClass,
384
+ hasBackdrop: this.hasBackdrop,
385
+ backdropClass: this.backdropClass
386
+ };
387
+ }
388
+ constructor() {
389
+ super();
390
+ /** @docs-private */
391
+ this.scrollStrategy = inject(KBQ_NOTIFICATION_CENTER_SCROLL_STRATEGY);
392
+ /** @docs-private */
393
+ this.service = inject(KbqNotificationCenterService);
394
+ // not used
395
+ /** @docs-private */
396
+ this.arrow = false;
397
+ /** @docs-private */
398
+ this.hasBackdrop = false;
399
+ /** @docs-private */
400
+ this.size = PopUpSizes.Medium;
401
+ /** Placement of popUp */
402
+ this.placement = PopUpPlacements.Right;
403
+ /** Class that will be used in the background */
404
+ this.backdropClass = 'cdk-overlay-transparent-backdrop';
405
+ /** Offset of popUp */
406
+ this.offset = defaultOffsetX;
407
+ this._popoverMode = false;
408
+ /** Emits a change event whenever the placement state changes. */
409
+ this.placementChange = new EventEmitter();
410
+ /** Emits a change event whenever the visible state changes. */
411
+ this.visibleChange = new EventEmitter();
412
+ /** @docs-private */
413
+ this.trigger = `${PopUpTriggers.Click}, ${PopUpTriggers.Keydown}`;
414
+ /** @docs-private */
415
+ this.originSelector = '.kbq-notification-center';
416
+ this.hideIfNotInViewPort = () => {
417
+ if (!this.scrollable)
418
+ return;
419
+ const rect = this.elementRef.nativeElement.getBoundingClientRect();
420
+ const containerRect = this.scrollable.getElementRef().nativeElement.getBoundingClientRect();
421
+ if (!(rect.bottom >= containerRect.top &&
422
+ rect.right >= containerRect.left &&
423
+ rect.top <= containerRect.bottom &&
424
+ rect.left <= containerRect.right)) {
425
+ this.hide();
426
+ }
427
+ };
428
+ this.updatePlacementPriority(['right', 'rightBottom', 'rightTop']);
429
+ }
430
+ ngOnInit() {
431
+ super.ngOnInit();
432
+ this.scrollable
433
+ ?.elementScrolled()
434
+ .pipe(takeUntilDestroyed(this.destroyRef))
435
+ .subscribe(this.hideIfNotInViewPort);
436
+ }
437
+ ngAfterContentInit() {
438
+ if (this.closeOnScroll === null) {
439
+ this.scrollDispatcher.scrolled().subscribe((scrollable) => {
440
+ if (!scrollable?.getElementRef().nativeElement.classList.contains('kbq-hide-nested-popup'))
441
+ return;
442
+ const parentRects = scrollable.getElementRef().nativeElement.getBoundingClientRect();
443
+ const childRects = this.elementRef.nativeElement.getBoundingClientRect();
444
+ if (childRects.bottom < parentRects.top || childRects.top > parentRects.bottom) {
445
+ this.hide();
446
+ }
447
+ });
448
+ }
449
+ this.visibleChange.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((visible) => {
450
+ if (visible) {
451
+ // eslint-disable-next-line rxjs/no-nested-subscribe
452
+ this.preventClosingByInnerScrollSubscription = this.closingActions().subscribe((event) => {
453
+ if (event['scrollDispatcher']) {
454
+ event['kbqPopoverPreventHide'] = true;
455
+ event['type'] = 'click';
456
+ }
457
+ });
458
+ }
459
+ else {
460
+ this.preventClosingByInnerScrollSubscription.unsubscribe();
461
+ this.focus();
462
+ }
463
+ });
464
+ }
465
+ /** @docs-private */
466
+ updateData() {
467
+ if (!this.instance)
468
+ return;
469
+ this.instance.header = this.header;
470
+ this.instance.content = this.content;
471
+ this.instance.arrow = this.arrow;
472
+ this.instance.offset = this.offset;
473
+ this.instance.footer = this.footer;
474
+ this.instance.popoverMode = this.popoverMode;
475
+ this.instance.popoverHeight = this.popoverHeight;
476
+ this.instance.updateTrapFocus(this.trigger !== PopUpTriggers.Focus);
477
+ if (this.isOpen) {
478
+ this.updatePosition(true);
479
+ }
480
+ }
481
+ /** Updates the current position.
482
+ *
483
+ * @docs-private */
484
+ updatePosition(reapplyPosition = false) {
485
+ this.overlayRef = this.createOverlay();
486
+ const position = this.overlayRef.getConfig().positionStrategy
487
+ .withPositions(this.getAdjustedPositions())
488
+ .withPush(true);
489
+ if (reapplyPosition) {
490
+ setTimeout(() => position.reapplyLastPosition());
491
+ }
492
+ }
493
+ /** @docs-private */
494
+ getOverlayHandleComponentType() {
495
+ return KbqNotificationCenterComponent;
496
+ }
497
+ /** @docs-private */
498
+ updateClassMap(newPlacement = this.placement) {
499
+ if (!this.instance)
500
+ return;
501
+ this.instance.updateClassMap(POSITION_TO_CSS_MAP[newPlacement], this.customClass, this.size);
502
+ this.instance.markForCheck();
503
+ }
504
+ /** @docs-private */
505
+ closingActions() {
506
+ return merge(this.overlayRef.outsidePointerEvents(), this.overlayRef.backdropClick(), this.scrollDispatcher.scrolled());
507
+ }
508
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqNotificationCenterTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
509
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.14", type: KbqNotificationCenterTrigger, isStandalone: true, selector: "[kbqNotificationCenterTrigger]", inputs: { placement: ["kbqNotificationCenterPlacement", "placement"], backdropClass: "backdropClass", panelClass: ["kbqNotificationCenterPanelClass", "panelClass"], offset: ["offset", "offset", numberAttribute], popoverMode: ["popoverMode", "popoverMode", booleanAttribute], popoverHeight: "popoverHeight", disabled: ["disabled", "disabled", booleanAttribute] }, outputs: { placementChange: "kbqPlacementChange", visibleChange: "kbqVisibleChange" }, host: { properties: { "class.kbq-notification-center_open": "isOpen", "class.kbq-active": "hasClickTrigger && isOpen" } }, exportAs: ["kbqNotificationCenterTrigger"], usesInheritance: true, ngImport: i0 }); }
510
+ }
511
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqNotificationCenterTrigger, decorators: [{
512
+ type: Directive,
513
+ args: [{
514
+ standalone: true,
515
+ selector: '[kbqNotificationCenterTrigger]',
516
+ exportAs: 'kbqNotificationCenterTrigger',
517
+ host: {
518
+ '[class.kbq-notification-center_open]': 'isOpen',
519
+ '[class.kbq-active]': 'hasClickTrigger && isOpen'
520
+ }
521
+ }]
522
+ }], ctorParameters: () => [], propDecorators: { placement: [{
523
+ type: Input,
524
+ args: ['kbqNotificationCenterPlacement']
525
+ }], backdropClass: [{
526
+ type: Input
527
+ }], panelClass: [{
528
+ type: Input,
529
+ args: ['kbqNotificationCenterPanelClass']
530
+ }], offset: [{
531
+ type: Input,
532
+ args: [{ transform: numberAttribute }]
533
+ }], popoverMode: [{
534
+ type: Input,
535
+ args: [{ transform: booleanAttribute }]
536
+ }], popoverHeight: [{
537
+ type: Input
538
+ }], disabled: [{
539
+ type: Input,
540
+ args: [{ transform: booleanAttribute }]
541
+ }], placementChange: [{
542
+ type: Output,
543
+ args: ['kbqPlacementChange']
544
+ }], visibleChange: [{
545
+ type: Output,
546
+ args: ['kbqVisibleChange']
547
+ }] } });
548
+
549
+ class KbqNotificationCenterModule {
550
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqNotificationCenterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
551
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: KbqNotificationCenterModule, imports: [KbqNotificationCenterComponent,
552
+ KbqNotificationCenterTrigger], exports: [KbqNotificationCenterComponent,
553
+ KbqNotificationCenterTrigger] }); }
554
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqNotificationCenterModule, providers: [
555
+ KBQ_NOTIFICATION_CENTER_SCROLL_STRATEGY_FACTORY_PROVIDER,
556
+ { provide: FocusTrapFactory, useClass: ConfigurableFocusTrapFactory },
557
+ { provide: FOCUS_TRAP_INERT_STRATEGY, useClass: EmptyFocusTrapStrategy },
558
+ { provide: KbqNotificationCenterService, deps: [DateAdapter, DateFormatter] }
559
+ ], imports: [KbqNotificationCenterComponent] }); }
560
+ }
561
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqNotificationCenterModule, decorators: [{
562
+ type: NgModule,
563
+ args: [{
564
+ imports: [
565
+ KbqNotificationCenterComponent,
566
+ KbqNotificationCenterTrigger
567
+ ],
568
+ exports: [
569
+ KbqNotificationCenterComponent,
570
+ KbqNotificationCenterTrigger
571
+ ],
572
+ providers: [
573
+ KBQ_NOTIFICATION_CENTER_SCROLL_STRATEGY_FACTORY_PROVIDER,
574
+ { provide: FocusTrapFactory, useClass: ConfigurableFocusTrapFactory },
575
+ { provide: FOCUS_TRAP_INERT_STRATEGY, useClass: EmptyFocusTrapStrategy },
576
+ { provide: KbqNotificationCenterService, deps: [DateAdapter, DateFormatter] }
577
+ ]
578
+ }]
579
+ }] });
580
+
581
+ /**
582
+ * Generated bundle index. Do not edit.
583
+ */
584
+
585
+ export { KBQ_NOTIFICATION_CENTER_CONFIGURATION, KBQ_NOTIFICATION_CENTER_DEFAULT_CONFIGURATION, KBQ_NOTIFICATION_CENTER_SCROLL_STRATEGY, KBQ_NOTIFICATION_CENTER_SCROLL_STRATEGY_FACTORY_PROVIDER, KbqNotificationCenterAnimations, KbqNotificationCenterComponent, KbqNotificationCenterModule, KbqNotificationCenterService, KbqNotificationCenterTrigger, kbqNotificationCenterScrollStrategyFactory, maxUnreadItemsLength };
586
+ //# sourceMappingURL=koobiq-components-notification-center.mjs.map