@koobiq/components 18.35.0 → 18.37.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 (626) 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/autocomplete/autocomplete.scss +2 -17
  16. package/badge/badge.component.d.ts +1 -1
  17. package/badge/badge.component.scss +2 -0
  18. package/breadcrumbs/breadcrumbs.d.ts +2 -1
  19. package/breadcrumbs/breadcrumbs.scss +8 -4
  20. package/button/button.component.d.ts +3 -2
  21. package/button-toggle/button-toggle.scss +0 -2
  22. package/content-panel/content-panel.d.ts +1 -1
  23. package/content-panel/index.d.ts +0 -1
  24. package/core/common-behaviors/clipboard.d.ts +1 -1
  25. package/core/common-behaviors/color.d.ts +5 -5
  26. package/core/common-behaviors/focus-monitor.d.ts +19 -0
  27. package/core/common-behaviors/hover.d.ts +15 -0
  28. package/core/common-behaviors/index.d.ts +4 -0
  29. package/core/common-behaviors/orientation.d.ts +4 -0
  30. package/core/common-behaviors/read-state.d.ts +12 -0
  31. package/core/locales/en-US.d.ts +62 -0
  32. package/core/locales/es-LA.d.ts +62 -0
  33. package/core/locales/formatters.d.ts +0 -72
  34. package/core/locales/index.d.ts +0 -2
  35. package/core/locales/locale-service.d.ts +292 -250
  36. package/core/locales/pt-BR.d.ts +62 -0
  37. package/core/locales/ru-RU.d.ts +62 -0
  38. package/core/locales/tk-TM.d.ts +62 -0
  39. package/core/locales/types.d.ts +22 -0
  40. package/core/navbar/rectangle-item.d.ts +1 -1
  41. package/core/option/action.d.ts +1 -1
  42. package/core/option/option.d.ts +3 -2
  43. package/core/pop-up/constants.d.ts +2 -1
  44. package/core/pop-up/pop-up-trigger.d.ts +3 -3
  45. package/core/pop-up/pop-up.d.ts +2 -1
  46. package/core/select/common.d.ts +6 -1
  47. package/core/select/constants.d.ts +5 -0
  48. package/core/styles/common/_select.scss +25 -0
  49. package/core/styles/typography/_typography.scss +23 -82
  50. package/core/utils/dom.d.ts +1 -6
  51. package/datepicker/datepicker-module.d.ts +2 -1
  52. package/divider/divider.scss +1 -0
  53. package/dropdown/dropdown-item.scss +8 -7
  54. package/dropdown/dropdown.component.d.ts +5 -1
  55. package/dropdown/dropdown.module.d.ts +1 -1
  56. package/dropdown/dropdown.scss +5 -14
  57. package/esm2022/accordion/accordion-content.mjs +3 -3
  58. package/esm2022/accordion/accordion-header.mjs +3 -3
  59. package/esm2022/accordion/accordion-item.mjs +3 -3
  60. package/esm2022/accordion/accordion-trigger.component.mjs +3 -3
  61. package/esm2022/accordion/accordion.component.mjs +5 -5
  62. package/esm2022/accordion/accordion.module.mjs +4 -4
  63. package/esm2022/actions-panel/actions-panel-container.mjs +3 -3
  64. package/esm2022/actions-panel/actions-panel.mjs +3 -3
  65. package/esm2022/actions-panel/module.mjs +4 -4
  66. package/esm2022/alert/alert.component.mjs +12 -12
  67. package/esm2022/alert/alert.module.mjs +4 -4
  68. package/esm2022/app-switcher/app-switcher-animations.mjs +18 -0
  69. package/esm2022/app-switcher/app-switcher-dropdown-app.mjs +75 -0
  70. package/esm2022/app-switcher/app-switcher-dropdown-site.mjs +60 -0
  71. package/esm2022/app-switcher/app-switcher.mjs +446 -0
  72. package/esm2022/app-switcher/app-switcher.module.mjs +45 -0
  73. package/esm2022/app-switcher/index.mjs +2 -0
  74. package/esm2022/app-switcher/kbq-app-switcher-list-item.mjs +84 -0
  75. package/esm2022/app-switcher/koobiq-components-app-switcher.mjs +5 -0
  76. package/esm2022/app-switcher/public-api.mjs +7 -0
  77. package/esm2022/autocomplete/autocomplete-origin.directive.mjs +3 -3
  78. package/esm2022/autocomplete/autocomplete-trigger.directive.mjs +7 -7
  79. package/esm2022/autocomplete/autocomplete.component.mjs +3 -3
  80. package/esm2022/autocomplete/autocomplete.module.mjs +4 -4
  81. package/esm2022/badge/badge.component.mjs +11 -11
  82. package/esm2022/badge/badge.module.mjs +4 -4
  83. package/esm2022/breadcrumbs/breadcrumbs.mjs +58 -49
  84. package/esm2022/breadcrumbs/breadcrumbs.module.mjs +4 -4
  85. package/esm2022/button/button.component.mjs +12 -10
  86. package/esm2022/button/button.dropdown-trigger.directive.mjs +3 -3
  87. package/esm2022/button/button.module.mjs +4 -4
  88. package/esm2022/button-toggle/button-toggle.component.mjs +8 -8
  89. package/esm2022/button-toggle/button-toggle.module.mjs +4 -4
  90. package/esm2022/checkbox/checkbox-module.mjs +4 -4
  91. package/esm2022/checkbox/checkbox-required-validator.mjs +3 -3
  92. package/esm2022/checkbox/checkbox.mjs +3 -3
  93. package/esm2022/clamped-text/clamped-text.mjs +3 -3
  94. package/esm2022/clamped-text/module.mjs +4 -4
  95. package/esm2022/code-block/code-block-highlight.mjs +12 -7
  96. package/esm2022/code-block/code-block.mjs +4 -4
  97. package/esm2022/code-block/code-block.module.mjs +4 -4
  98. package/esm2022/content-panel/content-panel.mjs +26 -26
  99. package/esm2022/content-panel/index.mjs +1 -2
  100. package/esm2022/content-panel/module.mjs +4 -4
  101. package/esm2022/core/common-behaviors/clipboard.mjs +4 -4
  102. package/esm2022/core/common-behaviors/color.mjs +7 -7
  103. package/esm2022/core/common-behaviors/common-module.mjs +6 -5
  104. package/esm2022/core/common-behaviors/disabled.mjs +2 -1
  105. package/esm2022/core/common-behaviors/error-state.mjs +2 -1
  106. package/esm2022/core/common-behaviors/focus-monitor.mjs +37 -0
  107. package/esm2022/core/common-behaviors/hover.mjs +34 -0
  108. package/esm2022/core/common-behaviors/index.mjs +5 -1
  109. package/esm2022/core/common-behaviors/orientation.mjs +2 -0
  110. package/esm2022/core/common-behaviors/read-state.mjs +33 -0
  111. package/esm2022/core/common-behaviors/tabindex.mjs +2 -1
  112. package/esm2022/core/error/error-state-matcher.mjs +9 -9
  113. package/esm2022/core/form-field/field-sizing-content.mjs +8 -5
  114. package/esm2022/core/formatters/date/formatter.mjs +3 -3
  115. package/esm2022/core/formatters/date/formatter.pipe.mjs +78 -78
  116. package/esm2022/core/formatters/filesize/formatter.mjs +3 -3
  117. package/esm2022/core/formatters/index.mjs +4 -4
  118. package/esm2022/core/formatters/number/formatter.mjs +14 -14
  119. package/esm2022/core/forms/forms-module.mjs +4 -4
  120. package/esm2022/core/forms/forms.directive.mjs +6 -6
  121. package/esm2022/core/highlight/highlight.pipe.mjs +3 -3
  122. package/esm2022/core/highlight/index.mjs +4 -4
  123. package/esm2022/core/line/line.mjs +7 -7
  124. package/esm2022/core/locales/en-US.mjs +105 -1
  125. package/esm2022/core/locales/es-LA.mjs +114 -10
  126. package/esm2022/core/locales/formatters.mjs +1 -73
  127. package/esm2022/core/locales/index.mjs +1 -3
  128. package/esm2022/core/locales/locale-service.mjs +5 -11
  129. package/esm2022/core/locales/locale-service.module.mjs +4 -4
  130. package/esm2022/core/locales/pt-BR.mjs +123 -19
  131. package/esm2022/core/locales/ru-RU.mjs +119 -1
  132. package/esm2022/core/locales/tk-TM.mjs +128 -24
  133. package/esm2022/core/locales/types.mjs +1 -1
  134. package/esm2022/core/navbar/rectangle-item.mjs +7 -6
  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 +13 -9
  140. package/esm2022/core/pop-up/constants.mjs +2 -1
  141. package/esm2022/core/pop-up/pop-up-trigger.mjs +7 -6
  142. package/esm2022/core/pop-up/pop-up.mjs +4 -4
  143. package/esm2022/core/select/common.mjs +35 -19
  144. package/esm2022/core/select/constants.mjs +6 -1
  145. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +3 -3
  146. package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.module.mjs +4 -4
  147. package/esm2022/core/services/measure-scrollbar.service.mjs +3 -3
  148. package/esm2022/core/services/theme.service.mjs +3 -3
  149. package/esm2022/core/utils/dom.mjs +2 -8
  150. package/esm2022/core/version.mjs +2 -2
  151. package/esm2022/datepicker/calendar-body.component.mjs +3 -3
  152. package/esm2022/datepicker/calendar-header.component.mjs +7 -6
  153. package/esm2022/datepicker/calendar.component.mjs +3 -3
  154. package/esm2022/datepicker/datepicker-input.directive.mjs +6 -6
  155. package/esm2022/datepicker/datepicker-intl.mjs +3 -3
  156. package/esm2022/datepicker/datepicker-module.mjs +11 -8
  157. package/esm2022/datepicker/datepicker-toggle.component.mjs +9 -9
  158. package/esm2022/datepicker/datepicker.component.mjs +6 -6
  159. package/esm2022/datepicker/month-view.component.mjs +3 -3
  160. package/esm2022/divider/divider.component.mjs +4 -4
  161. package/esm2022/divider/divider.module.mjs +4 -4
  162. package/esm2022/dl/dl.component.mjs +9 -9
  163. package/esm2022/dl/dl.module.mjs +4 -4
  164. package/esm2022/dropdown/dropdown-content.directive.mjs +3 -3
  165. package/esm2022/dropdown/dropdown-item.component.mjs +5 -5
  166. package/esm2022/dropdown/dropdown-trigger.directive.mjs +5 -5
  167. package/esm2022/dropdown/dropdown.component.mjs +18 -8
  168. package/esm2022/dropdown/dropdown.module.mjs +14 -10
  169. package/esm2022/dynamic-translation/dynamic-translation.mjs +9 -9
  170. package/esm2022/dynamic-translation/module.mjs +4 -4
  171. package/esm2022/ellipsis-center/ellipsis-center.directive.mjs +12 -9
  172. package/esm2022/empty-state/empty-state.component.mjs +15 -15
  173. package/esm2022/empty-state/empty-state.module.mjs +4 -4
  174. package/esm2022/file-upload/file-drop.mjs +7 -5
  175. package/esm2022/file-upload/file-upload.mjs +1 -1
  176. package/esm2022/file-upload/file-upload.module.mjs +4 -4
  177. package/esm2022/file-upload/multiple-file-upload.component.mjs +20 -13
  178. package/esm2022/file-upload/single-file-upload.component.mjs +19 -6
  179. package/esm2022/filter-bar/filter-bar-button.mjs +3 -3
  180. package/esm2022/filter-bar/filter-bar.mjs +8 -4
  181. package/esm2022/filter-bar/filter-bar.module.mjs +4 -4
  182. package/esm2022/filter-bar/filter-refresher.mjs +3 -3
  183. package/esm2022/filter-bar/filter-reset.mjs +3 -3
  184. package/esm2022/filter-bar/filter-search.mjs +6 -6
  185. package/esm2022/filter-bar/filters.mjs +12 -7
  186. package/esm2022/filter-bar/pipe-add.mjs +6 -5
  187. package/esm2022/filter-bar/pipe.directive.mjs +3 -3
  188. package/esm2022/filter-bar/pipes/base-pipe.mjs +17 -9
  189. package/esm2022/filter-bar/pipes/pipe-button.mjs +3 -3
  190. package/esm2022/filter-bar/pipes/pipe-date.mjs +6 -6
  191. package/esm2022/filter-bar/pipes/pipe-datetime.mjs +6 -6
  192. package/esm2022/filter-bar/pipes/pipe-multi-select.mjs +15 -9
  193. package/esm2022/filter-bar/pipes/pipe-multi-tree-select.mjs +12 -7
  194. package/esm2022/filter-bar/pipes/pipe-readonly.mjs +6 -6
  195. package/esm2022/filter-bar/pipes/pipe-select.mjs +6 -6
  196. package/esm2022/filter-bar/pipes/pipe-state.mjs +3 -3
  197. package/esm2022/filter-bar/pipes/pipe-text.mjs +6 -6
  198. package/esm2022/filter-bar/pipes/pipe-title.mjs +26 -21
  199. package/esm2022/filter-bar/pipes/pipe-tree-select.mjs +6 -6
  200. package/esm2022/form-field/cleaner.mjs +3 -3
  201. package/esm2022/form-field/error.mjs +3 -3
  202. package/esm2022/form-field/fieldset.mjs +11 -11
  203. package/esm2022/form-field/form-field.mjs +11 -11
  204. package/esm2022/form-field/form-field.module.mjs +4 -4
  205. package/esm2022/form-field/hint.mjs +3 -3
  206. package/esm2022/form-field/label.mjs +3 -3
  207. package/esm2022/form-field/password-hint.mjs +3 -3
  208. package/esm2022/form-field/password-toggle.mjs +7 -7
  209. package/esm2022/form-field/prefix.mjs +3 -3
  210. package/esm2022/form-field/reactive-password-hint.mjs +3 -3
  211. package/esm2022/form-field/stepper.mjs +44 -13
  212. package/esm2022/form-field/suffix.mjs +3 -3
  213. package/esm2022/form-field/validate.directive.mjs +3 -3
  214. package/esm2022/icon/icon-button.component.mjs +3 -3
  215. package/esm2022/icon/icon-item.component.mjs +3 -3
  216. package/esm2022/icon/icon.component.mjs +4 -4
  217. package/esm2022/icon/icon.module.mjs +4 -4
  218. package/esm2022/inline-edit/index.mjs +3 -0
  219. package/esm2022/inline-edit/inline-edit.mjs +382 -0
  220. package/esm2022/inline-edit/koobiq-components-inline-edit.mjs +5 -0
  221. package/esm2022/inline-edit/module.mjs +25 -0
  222. package/esm2022/input/input-number-validators.mjs +6 -6
  223. package/esm2022/input/input-number.mjs +10 -9
  224. package/esm2022/input/input-password.mjs +4 -4
  225. package/esm2022/input/input.mjs +7 -7
  226. package/esm2022/input/input.module.mjs +11 -8
  227. package/esm2022/link/link.component.mjs +6 -6
  228. package/esm2022/link/link.module.mjs +4 -4
  229. package/esm2022/list/list-selection.component.mjs +40 -24
  230. package/esm2022/list/list.component.mjs +6 -6
  231. package/esm2022/list/list.module.mjs +4 -4
  232. package/esm2022/loader-overlay/loader-overlay.component.mjs +13 -13
  233. package/esm2022/loader-overlay/loader-overlay.module.mjs +4 -4
  234. package/esm2022/markdown/markdown.component.mjs +10 -10
  235. package/esm2022/markdown/markdown.module.mjs +4 -4
  236. package/esm2022/markdown/markdown.service.mjs +3 -3
  237. package/esm2022/modal/css-unit.pipe.mjs +3 -3
  238. package/esm2022/modal/modal-control.service.mjs +3 -3
  239. package/esm2022/modal/modal-util.mjs +7 -3
  240. package/esm2022/modal/modal.component.mjs +5 -5
  241. package/esm2022/modal/modal.directive.mjs +12 -12
  242. package/esm2022/modal/modal.module.mjs +4 -4
  243. package/esm2022/modal/modal.service.mjs +5 -4
  244. package/esm2022/navbar/navbar-item.component.mjs +53 -44
  245. package/esm2022/navbar/navbar.component.mjs +17 -13
  246. package/esm2022/navbar/navbar.module.mjs +4 -4
  247. package/esm2022/navbar/vertical-navbar.component.mjs +6 -6
  248. package/esm2022/navbar-ic/navbar-ic-header.mjs +25 -9
  249. package/esm2022/navbar-ic/navbar-ic-item.mjs +35 -44
  250. package/esm2022/navbar-ic/navbar-ic.animation.mjs +10 -2
  251. package/esm2022/navbar-ic/navbar-ic.mjs +50 -21
  252. package/esm2022/navbar-ic/navbar-ic.module.mjs +4 -4
  253. package/esm2022/notification-center/index.mjs +2 -0
  254. package/esm2022/notification-center/koobiq-components-notification-center.mjs +5 -0
  255. package/esm2022/notification-center/notification-center-animations.mjs +18 -0
  256. package/esm2022/notification-center/notification-center.mjs +353 -0
  257. package/esm2022/notification-center/notification-center.module.mjs +38 -0
  258. package/esm2022/notification-center/notification-center.service.mjs +127 -0
  259. package/esm2022/notification-center/notification-item.mjs +70 -0
  260. package/esm2022/notification-center/public-api.mjs +5 -0
  261. package/esm2022/overflow-items/module.mjs +4 -4
  262. package/esm2022/overflow-items/overflow-items.mjs +95 -41
  263. package/esm2022/popover/popover-confirm.component.mjs +10 -10
  264. package/esm2022/popover/popover.component.mjs +31 -13
  265. package/esm2022/popover/popover.module.mjs +4 -4
  266. package/esm2022/progress-bar/progress-bar.component.mjs +9 -9
  267. package/esm2022/progress-bar/progress-bar.module.mjs +4 -4
  268. package/esm2022/progress-spinner/progress-spinner.component.mjs +9 -9
  269. package/esm2022/progress-spinner/progress-spinner.module.mjs +4 -4
  270. package/esm2022/radio/radio.component.mjs +6 -6
  271. package/esm2022/radio/radio.module.mjs +4 -4
  272. package/esm2022/resizer/index.mjs +3 -0
  273. package/esm2022/resizer/koobiq-components-resizer.mjs +5 -0
  274. package/esm2022/resizer/module.mjs +17 -0
  275. package/esm2022/resizer/resizer.mjs +135 -0
  276. package/esm2022/risk-level/risk-level.component.mjs +3 -3
  277. package/esm2022/risk-level/risk-level.module.mjs +4 -4
  278. package/esm2022/scrollbar/scrollbar.component.mjs +3 -3
  279. package/esm2022/scrollbar/scrollbar.directive.mjs +7 -6
  280. package/esm2022/scrollbar/scrollbar.module.mjs +4 -4
  281. package/esm2022/search-expandable/index.mjs +2 -0
  282. package/esm2022/search-expandable/koobiq-components-search-expandable.mjs +5 -0
  283. package/esm2022/search-expandable/public-api.mjs +3 -0
  284. package/esm2022/search-expandable/search-expandable.mjs +177 -0
  285. package/esm2022/search-expandable/search-expandable.module.mjs +18 -0
  286. package/esm2022/select/select-option.directive.mjs +3 -3
  287. package/esm2022/select/select.component.mjs +38 -23
  288. package/esm2022/select/select.module.mjs +12 -8
  289. package/esm2022/sidebar/sidebar.component.mjs +9 -9
  290. package/esm2022/sidebar/sidebar.module.mjs +4 -4
  291. package/esm2022/sidepanel/sidepanel-container.component.mjs +5 -5
  292. package/esm2022/sidepanel/sidepanel-directives.mjs +15 -15
  293. package/esm2022/sidepanel/sidepanel.module.mjs +4 -4
  294. package/esm2022/sidepanel/sidepanel.service.mjs +3 -3
  295. package/esm2022/split-button/index.mjs +2 -0
  296. package/esm2022/split-button/koobiq-components-split-button.mjs +5 -0
  297. package/esm2022/split-button/public-api.mjs +3 -0
  298. package/esm2022/split-button/split-button.mjs +133 -0
  299. package/esm2022/split-button/split-button.module.mjs +18 -0
  300. package/esm2022/splitter/splitter.component.mjs +13 -13
  301. package/esm2022/splitter/splitter.module.mjs +4 -4
  302. package/esm2022/table/table.component.mjs +6 -6
  303. package/esm2022/table/table.module.mjs +4 -4
  304. package/esm2022/tabs/paginated-tab-header.mjs +4 -4
  305. package/esm2022/tabs/tab-body.component.mjs +6 -6
  306. package/esm2022/tabs/tab-content.directive.mjs +3 -3
  307. package/esm2022/tabs/tab-group.component.mjs +15 -15
  308. package/esm2022/tabs/tab-header.component.mjs +4 -4
  309. package/esm2022/tabs/tab-label-wrapper.directive.mjs +4 -4
  310. package/esm2022/tabs/tab-label.directive.mjs +3 -3
  311. package/esm2022/tabs/tab-nav-bar.mjs +10 -10
  312. package/esm2022/tabs/tab.component.mjs +3 -3
  313. package/esm2022/tabs/tabs.module.mjs +4 -4
  314. package/esm2022/tags/tag-input.mjs +38 -36
  315. package/esm2022/tags/tag-list.component.mjs +281 -250
  316. package/esm2022/tags/tag.component.mjs +206 -140
  317. package/esm2022/tags/tag.module.mjs +4 -4
  318. package/esm2022/textarea/textarea.component.mjs +5 -5
  319. package/esm2022/textarea/textarea.module.mjs +7 -6
  320. package/esm2022/time-range/constants.mjs +42 -0
  321. package/esm2022/time-range/index.mjs +8 -0
  322. package/esm2022/time-range/koobiq-components-time-range.mjs +5 -0
  323. package/esm2022/time-range/module.mjs +36 -0
  324. package/esm2022/time-range/time-range-editor.mjs +224 -0
  325. package/esm2022/time-range/time-range-title-as-form-field.mjs +60 -0
  326. package/esm2022/time-range/time-range-title.mjs +112 -0
  327. package/esm2022/time-range/time-range.mjs +234 -0
  328. package/esm2022/time-range/time-range.service.mjs +126 -0
  329. package/esm2022/time-range/types.mjs +2 -0
  330. package/esm2022/timepicker/timepicker.directive.mjs +4 -4
  331. package/esm2022/timepicker/timepicker.module.mjs +9 -8
  332. package/esm2022/timezone/cities-by-filter.pipe.mjs +3 -3
  333. package/esm2022/timezone/timezone-option.component.mjs +5 -5
  334. package/esm2022/timezone/timezone-option.directive.mjs +3 -3
  335. package/esm2022/timezone/timezone-select.component.mjs +9 -9
  336. package/esm2022/timezone/timezone.module.mjs +10 -8
  337. package/esm2022/timezone/utc-offset.pipe.mjs +3 -3
  338. package/esm2022/title/title.directive.mjs +9 -5
  339. package/esm2022/title/title.module.mjs +4 -4
  340. package/esm2022/toast/toast-container.component.mjs +3 -3
  341. package/esm2022/toast/toast.component.mjs +20 -14
  342. package/esm2022/toast/toast.module.mjs +4 -4
  343. package/esm2022/toast/toast.service.mjs +5 -4
  344. package/esm2022/toast/toast.type.mjs +1 -1
  345. package/esm2022/toggle/toggle.component.mjs +6 -6
  346. package/esm2022/toggle/toggle.module.mjs +4 -4
  347. package/esm2022/tooltip/tooltip.component.mjs +19 -19
  348. package/esm2022/tooltip/tooltip.module.mjs +4 -4
  349. package/esm2022/top-bar/module.mjs +4 -4
  350. package/esm2022/top-bar/top-bar.mjs +11 -11
  351. package/esm2022/tree/node.mjs +3 -3
  352. package/esm2022/tree/outlet.mjs +3 -3
  353. package/esm2022/tree/padding.directive.mjs +3 -3
  354. package/esm2022/tree/toggle.mjs +16 -12
  355. package/esm2022/tree/tree-base.mjs +7 -7
  356. package/esm2022/tree/tree-option.component.mjs +11 -14
  357. package/esm2022/tree/tree-selection.component.mjs +26 -16
  358. package/esm2022/tree/tree.mjs +3 -3
  359. package/esm2022/tree/tree.module.mjs +4 -4
  360. package/esm2022/tree-select/tree-select.component.mjs +142 -84
  361. package/esm2022/tree-select/tree-select.module.mjs +11 -8
  362. package/esm2022/username/module.mjs +4 -4
  363. package/esm2022/username/username.mjs +15 -15
  364. package/esm2022/username/username.pipe.mjs +8 -8
  365. package/fesm2022/koobiq-components-accordion.mjs +20 -20
  366. package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
  367. package/fesm2022/koobiq-components-actions-panel.mjs +10 -10
  368. package/fesm2022/koobiq-components-alert.mjs +16 -16
  369. package/fesm2022/koobiq-components-app-switcher.mjs +704 -0
  370. package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -0
  371. package/fesm2022/koobiq-components-autocomplete.mjs +16 -16
  372. package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
  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 +61 -52
  376. package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
  377. package/fesm2022/koobiq-components-button-toggle.mjs +12 -12
  378. package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
  379. package/fesm2022/koobiq-components-button.mjs +18 -16
  380. package/fesm2022/koobiq-components-button.mjs.map +1 -1
  381. package/fesm2022/koobiq-components-checkbox.mjs +10 -10
  382. package/fesm2022/koobiq-components-clamped-text.mjs +7 -7
  383. package/fesm2022/koobiq-components-code-block.mjs +18 -13
  384. package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
  385. package/fesm2022/koobiq-components-content-panel.mjs +31 -165
  386. package/fesm2022/koobiq-components-content-panel.mjs.map +1 -1
  387. package/fesm2022/koobiq-components-core.mjs +962 -581
  388. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  389. package/fesm2022/koobiq-components-datepicker.mjs +47 -44
  390. package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
  391. package/fesm2022/koobiq-components-divider.mjs +8 -8
  392. package/fesm2022/koobiq-components-divider.mjs.map +1 -1
  393. package/fesm2022/koobiq-components-dl.mjs +13 -13
  394. package/fesm2022/koobiq-components-dropdown.mjs +41 -27
  395. package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
  396. package/fesm2022/koobiq-components-dynamic-translation.mjs +13 -13
  397. package/fesm2022/koobiq-components-ellipsis-center.mjs +11 -8
  398. package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
  399. package/fesm2022/koobiq-components-empty-state.mjs +19 -19
  400. package/fesm2022/koobiq-components-file-upload.mjs +45 -25
  401. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  402. package/fesm2022/koobiq-components-filter-bar.mjs +147 -114
  403. package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
  404. package/fesm2022/koobiq-components-form-field.mjs +100 -73
  405. package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
  406. package/fesm2022/koobiq-components-icon.mjs +13 -13
  407. package/fesm2022/koobiq-components-icon.mjs.map +1 -1
  408. package/fesm2022/koobiq-components-inline-edit.mjs +411 -0
  409. package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -0
  410. package/fesm2022/koobiq-components-input.mjs +34 -31
  411. package/fesm2022/koobiq-components-input.mjs.map +1 -1
  412. package/fesm2022/koobiq-components-link.mjs +10 -10
  413. package/fesm2022/koobiq-components-link.mjs.map +1 -1
  414. package/fesm2022/koobiq-components-list.mjs +49 -33
  415. package/fesm2022/koobiq-components-list.mjs.map +1 -1
  416. package/fesm2022/koobiq-components-loader-overlay.mjs +16 -16
  417. package/fesm2022/koobiq-components-loader-overlay.mjs.map +1 -1
  418. package/fesm2022/koobiq-components-markdown.mjs +16 -16
  419. package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
  420. package/fesm2022/koobiq-components-modal.mjs +36 -31
  421. package/fesm2022/koobiq-components-modal.mjs.map +1 -1
  422. package/fesm2022/koobiq-components-navbar-ic.mjs +122 -81
  423. package/fesm2022/koobiq-components-navbar-ic.mjs.map +1 -1
  424. package/fesm2022/koobiq-components-navbar.mjs +77 -64
  425. package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
  426. package/fesm2022/koobiq-components-notification-center.mjs +586 -0
  427. package/fesm2022/koobiq-components-notification-center.mjs.map +1 -0
  428. package/fesm2022/koobiq-components-overflow-items.mjs +98 -44
  429. package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
  430. package/fesm2022/koobiq-components-popover.mjs +43 -25
  431. package/fesm2022/koobiq-components-popover.mjs.map +1 -1
  432. package/fesm2022/koobiq-components-progress-bar.mjs +13 -13
  433. package/fesm2022/koobiq-components-progress-spinner.mjs +13 -13
  434. package/fesm2022/koobiq-components-radio.mjs +10 -10
  435. package/fesm2022/koobiq-components-resizer.mjs +156 -0
  436. package/fesm2022/koobiq-components-resizer.mjs.map +1 -0
  437. package/fesm2022/koobiq-components-risk-level.mjs +7 -7
  438. package/fesm2022/koobiq-components-scrollbar.mjs +13 -12
  439. package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
  440. package/fesm2022/koobiq-components-search-expandable.mjs +199 -0
  441. package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -0
  442. package/fesm2022/koobiq-components-select.mjs +51 -33
  443. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  444. package/fesm2022/koobiq-components-sidebar.mjs +13 -13
  445. package/fesm2022/koobiq-components-sidepanel.mjs +26 -26
  446. package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
  447. package/fesm2022/koobiq-components-split-button.mjs +155 -0
  448. package/fesm2022/koobiq-components-split-button.mjs.map +1 -0
  449. package/fesm2022/koobiq-components-splitter.mjs +16 -16
  450. package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
  451. package/fesm2022/koobiq-components-table.mjs +10 -10
  452. package/fesm2022/koobiq-components-tabs.mjs +52 -52
  453. package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
  454. package/fesm2022/koobiq-components-tags.mjs +522 -428
  455. package/fesm2022/koobiq-components-tags.mjs.map +1 -1
  456. package/fesm2022/koobiq-components-textarea.mjs +10 -10
  457. package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
  458. package/fesm2022/koobiq-components-time-range.mjs +809 -0
  459. package/fesm2022/koobiq-components-time-range.mjs.map +1 -0
  460. package/fesm2022/koobiq-components-timepicker.mjs +11 -11
  461. package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
  462. package/fesm2022/koobiq-components-timezone.mjs +31 -29
  463. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  464. package/fesm2022/koobiq-components-title.mjs +12 -8
  465. package/fesm2022/koobiq-components-title.mjs.map +1 -1
  466. package/fesm2022/koobiq-components-toast.mjs +28 -21
  467. package/fesm2022/koobiq-components-toast.mjs.map +1 -1
  468. package/fesm2022/koobiq-components-toggle.mjs +9 -9
  469. package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
  470. package/fesm2022/koobiq-components-tooltip.mjs +22 -22
  471. package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
  472. package/fesm2022/koobiq-components-top-bar.mjs +15 -15
  473. package/fesm2022/koobiq-components-top-bar.mjs.map +1 -1
  474. package/fesm2022/koobiq-components-tree-select.mjs +151 -91
  475. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  476. package/fesm2022/koobiq-components-tree.mjs +72 -61
  477. package/fesm2022/koobiq-components-tree.mjs.map +1 -1
  478. package/fesm2022/koobiq-components-username.mjs +27 -27
  479. package/file-upload/_file-upload-theme.scss +33 -35
  480. package/file-upload/file-upload-tokens.scss +1 -2
  481. package/file-upload/file-upload.d.ts +1 -1
  482. package/file-upload/file-upload.scss +4 -7
  483. package/file-upload/multiple-file-upload.component.d.ts +2 -1
  484. package/file-upload/multiple-file-upload.component.scss +12 -14
  485. package/file-upload/single-file-upload.component.d.ts +2 -0
  486. package/file-upload/single-file-upload.component.scss +5 -7
  487. package/filter-bar/filter-bar.d.ts +3 -1
  488. package/filter-bar/filter-search.scss +1 -3
  489. package/filter-bar/filters.d.ts +1 -0
  490. package/filter-bar/pipes/base-pipe.d.ts +6 -2
  491. package/filter-bar/pipes/base-pipe.scss +3 -3
  492. package/filter-bar/pipes/pipe-date.scss +4 -1
  493. package/filter-bar/pipes/pipe-title.d.ts +2 -0
  494. package/form-field/fieldset-tokens.scss +1 -0
  495. package/form-field/form-field-tokens.scss +1 -1
  496. package/form-field/form-field.d.ts +1 -1
  497. package/form-field/form-field.scss +7 -7
  498. package/form-field/password-toggle.d.ts +1 -1
  499. package/form-field/stepper.d.ts +28 -6
  500. package/icon/icon.component.d.ts +2 -2
  501. package/inline-edit/index.d.ts +2 -0
  502. package/inline-edit/inline-edit-tokens.scss +8 -0
  503. package/inline-edit/inline-edit.d.ts +140 -0
  504. package/inline-edit/inline-edit.scss +208 -0
  505. package/inline-edit/module.d.ts +7 -0
  506. package/input/input-number.d.ts +1 -1
  507. package/input/input-password.d.ts +2 -2
  508. package/input/input.d.ts +2 -2
  509. package/input/input.module.d.ts +2 -1
  510. package/link/link.component.d.ts +3 -3
  511. package/list/list-selection.component.d.ts +13 -2
  512. package/loader-overlay/loader-overlay.component.d.ts +1 -1
  513. package/markdown/_markdown-theme.scss +1 -2
  514. package/markdown/markdown-tokens.scss +1 -0
  515. package/markdown/markdown.scss +10 -4
  516. package/modal/modal-tokens.scss +2 -1
  517. package/modal/modal-util.d.ts +5 -2
  518. package/modal/modal.component.d.ts +1 -1
  519. package/modal/modal.scss +3 -4
  520. package/navbar/_navbar-item_vertical.scss +10 -0
  521. package/navbar/navbar-brand.scss +5 -2
  522. package/navbar/navbar-item.component.d.ts +3 -2
  523. package/navbar/navbar.component.d.ts +4 -4
  524. package/navbar/vertical-navbar.component.d.ts +2 -2
  525. package/navbar/vertical-navbar.scss +1 -0
  526. package/navbar-ic/navbar-ic-header.d.ts +4 -3
  527. package/navbar-ic/navbar-ic-header.scss +0 -4
  528. package/navbar-ic/navbar-ic-item.d.ts +3 -2
  529. package/navbar-ic/navbar-ic-item.scss +0 -4
  530. package/navbar-ic/navbar-ic.animation.d.ts +1 -0
  531. package/navbar-ic/navbar-ic.d.ts +11 -2
  532. package/notification-center/_notification-center-theme.scss +27 -0
  533. package/notification-center/index.d.ts +1 -0
  534. package/notification-center/notification-center-animations.d.ts +5 -0
  535. package/notification-center/notification-center.d.ts +153 -0
  536. package/notification-center/notification-center.module.d.ts +7 -0
  537. package/notification-center/notification-center.scss +126 -0
  538. package/notification-center/notification-center.service.d.ts +72 -0
  539. package/notification-center/notification-item.d.ts +27 -0
  540. package/notification-center/notification-item.scss +157 -0
  541. package/notification-center/public-api.d.ts +4 -0
  542. package/overflow-items/overflow-items.d.ts +23 -9
  543. package/package.json +46 -4
  544. package/popover/popover-tokens.scss +1 -0
  545. package/popover/popover.component.d.ts +9 -1
  546. package/popover/popover.scss +18 -11
  547. package/prebuilt-themes/dark-theme.css +1 -1
  548. package/prebuilt-themes/light-theme.css +1 -1
  549. package/prebuilt-themes/theme.css +1 -1
  550. package/resizer/index.d.ts +2 -0
  551. package/resizer/module.d.ts +7 -0
  552. package/{content-panel/resizable.d.ts → resizer/resizer.d.ts} +18 -13
  553. package/schematics/collection.json +5 -0
  554. package/schematics/migrations/icons-replacement/README.md +93 -0
  555. package/schematics/migrations/icons-replacement/data.js +92 -0
  556. package/schematics/migrations/icons-replacement/index.js +84 -0
  557. package/schematics/migrations/icons-replacement/schema.json +32 -0
  558. package/schematics/ng-add/index.js +6 -6
  559. package/scrollbar/scrollbar.component.scss +2 -3
  560. package/search-expandable/index.d.ts +1 -0
  561. package/search-expandable/public-api.d.ts +2 -0
  562. package/search-expandable/search-expandable.d.ts +70 -0
  563. package/search-expandable/search-expandable.module.d.ts +7 -0
  564. package/search-expandable/search-expandable.scss +21 -0
  565. package/select/select.component.d.ts +38 -3
  566. package/select/select.module.d.ts +2 -1
  567. package/select/select.scss +1 -17
  568. package/sidepanel/sidepanel-tokens.scss +2 -0
  569. package/sidepanel/sidepanel.scss +2 -0
  570. package/split-button/_split-button-theme.scss +114 -0
  571. package/split-button/index.d.ts +1 -0
  572. package/split-button/public-api.d.ts +2 -0
  573. package/split-button/split-button.d.ts +37 -0
  574. package/split-button/split-button.module.d.ts +7 -0
  575. package/split-button/split-button.scss +72 -0
  576. package/splitter/splitter.component.d.ts +5 -5
  577. package/tabs/paginated-tab-header.d.ts +1 -1
  578. package/tabs/tab-header.component.d.ts +2 -2
  579. package/tabs/tab-label-wrapper.directive.d.ts +2 -2
  580. package/tabs/tab-nav-bar.d.ts +3 -3
  581. package/tags/_tag-theme.scss +21 -15
  582. package/tags/tag-input.d.ts +18 -7
  583. package/tags/tag-list.component.d.ts +175 -64
  584. package/tags/tag-list.scss +24 -14
  585. package/tags/tag-tokens.scss +17 -1
  586. package/tags/tag.component.d.ts +91 -27
  587. package/tags/tag.scss +9 -0
  588. package/textarea/textarea-tokens.scss +6 -1
  589. package/textarea/textarea.component.d.ts +2 -2
  590. package/textarea/textarea.module.d.ts +2 -1
  591. package/textarea/textarea.scss +4 -0
  592. package/time-range/constants.d.ts +19 -0
  593. package/time-range/index.d.ts +7 -0
  594. package/time-range/module.d.ts +10 -0
  595. package/time-range/time-range-editor.d.ts +65 -0
  596. package/time-range/time-range-title-as-form-field.d.ts +41 -0
  597. package/time-range/time-range-title.d.ts +18 -0
  598. package/time-range/time-range.d.ts +78 -0
  599. package/time-range/time-range.scss +66 -0
  600. package/time-range/time-range.service.d.ts +25 -0
  601. package/time-range/types.d.ts +69 -0
  602. package/timepicker/timepicker.directive.d.ts +2 -2
  603. package/timepicker/timepicker.module.d.ts +2 -1
  604. package/timezone/timezone-option.component.scss +6 -0
  605. package/timezone/timezone.module.d.ts +1 -1
  606. package/toast/toast.component.d.ts +6 -4
  607. package/toast/toast.component.scss +11 -1
  608. package/toast/toast.service.d.ts +1 -0
  609. package/toast/toast.type.d.ts +1 -0
  610. package/toggle/_toggle-theme.scss +8 -5
  611. package/toggle/toggle-tokens.scss +0 -1
  612. package/toggle/toggle.scss +11 -15
  613. package/top-bar/top-bar-tokens.scss +1 -1
  614. package/top-bar/top-bar.scss +3 -0
  615. package/tree/toggle.d.ts +1 -1
  616. package/tree/tree-base.d.ts +2 -2
  617. package/tree/tree-option.component.d.ts +2 -1
  618. package/tree/tree-selection.component.d.ts +12 -3
  619. package/tree-select/tree-select.component.d.ts +49 -8
  620. package/tree-select/tree-select.module.d.ts +2 -1
  621. package/tree-select/tree-select.scss +4 -0
  622. package/core/locales/fa-IR.d.ts +0 -100
  623. package/core/locales/zh-CN.d.ts +0 -100
  624. package/esm2022/content-panel/resizable.mjs +0 -138
  625. package/esm2022/core/locales/fa-IR.mjs +0 -99
  626. package/esm2022/core/locales/zh-CN.mjs +0 -99
@@ -0,0 +1,809 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, inject, Injectable, input, computed, viewChildren, Component, ChangeDetectionStrategy, ViewEncapsulation, Injector, booleanAttribute, output, signal, Directive, NgModule } from '@angular/core';
3
+ import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
4
+ import * as i1 from '@angular/forms';
5
+ import { FormGroup, FormControl, NG_VALUE_ACCESSOR, NG_VALIDATORS, ReactiveFormsModule, NgControl } from '@angular/forms';
6
+ import * as i3$1 from '@koobiq/components/button';
7
+ import { KbqButtonModule } from '@koobiq/components/button';
8
+ import { DateAdapter, DateFormatter, ruRULocaleData, KBQ_LOCALE_SERVICE, PopUpSizes, PopUpPlacements } from '@koobiq/components/core';
9
+ import * as i2$2 from '@koobiq/components/popover';
10
+ import { KbqPopoverTrigger, KbqPopoverModule } from '@koobiq/components/popover';
11
+ import { NgTemplateOutlet } from '@angular/common';
12
+ import * as i2 from '@koobiq/components/datepicker';
13
+ import { KbqDatepickerModule } from '@koobiq/components/datepicker';
14
+ import * as i3 from '@koobiq/components/form-field';
15
+ import { KbqFieldset, KbqFieldsetItem, KbqFormFieldModule, KbqFormFieldControl } from '@koobiq/components/form-field';
16
+ import * as i2$1 from '@koobiq/components/icon';
17
+ import { KbqIcon, KbqIconModule } from '@koobiq/components/icon';
18
+ import * as i5 from '@koobiq/components/radio';
19
+ import { KbqRadioModule } from '@koobiq/components/radio';
20
+ import * as i4 from '@koobiq/components/timepicker';
21
+ import { KbqTimepicker, TimeFormats, KbqTimepickerModule } from '@koobiq/components/timepicker';
22
+ import { merge, Subject } from 'rxjs';
23
+ import { map, distinctUntilChanged } from 'rxjs/operators';
24
+ import * as i1$1 from '@koobiq/components/link';
25
+ import { KbqLinkModule } from '@koobiq/components/link';
26
+
27
+ /** Preset of selectable time ranges, provided by DI. */
28
+ const KBQ_DEFAULT_TIME_RANGE_TYPES = new InjectionToken('KBQ_DEFAULT_TIME_RANGE_TYPES');
29
+ /** Preset of custom time ranges, provided by DI. */
30
+ const KBQ_CUSTOM_TIME_RANGE_TYPES = new InjectionToken('KBQ_CUSTOM_TIME_RANGE_TYPES');
31
+ /** Time range types in range editor if nothing provided */
32
+ const defaultTimeRangeTypes = [
33
+ 'lastHour',
34
+ 'last24Hours',
35
+ 'last3Days',
36
+ 'last7Days',
37
+ 'last14Days',
38
+ 'currentQuarter',
39
+ 'currentYear',
40
+ 'allTime',
41
+ 'range'
42
+ ];
43
+ /** @docs-private */
44
+ function createMissingDateImplError(componentName, provider) {
45
+ return Error(`${componentName}: No provider found for ${provider}. You must import one of the existing ` +
46
+ `modules at your application root or provide a custom implementation or use exists ones.`);
47
+ }
48
+ /**
49
+ * Validates that the 'from' date-time is not greater than the 'to' date-time in a range form.
50
+ * Returns an error if the start date-time occurs after the end date-time.
51
+ *
52
+ * @param timeRangeService - Service used to manipulate date-time values.
53
+ */
54
+ const rangeValidator = (timeRangeService) => {
55
+ return (control) => {
56
+ const form = control.value;
57
+ if (!form.fromTime || !form.fromDate || !form.toTime || !form.toDate) {
58
+ return null;
59
+ }
60
+ const fromDateTime = timeRangeService.combineDateAndTime(form.fromDate, form.fromTime);
61
+ const toDateTime = timeRangeService.combineDateAndTime(form.toDate, form.toTime);
62
+ return timeRangeService.dateAdapter.compareDate(fromDateTime, toDateTime) > 0
63
+ ? { fromIsGreaterThanTo: fromDateTime }
64
+ : null;
65
+ };
66
+ };
67
+
68
+ class KbqTimeRangeService {
69
+ constructor() {
70
+ this.dateAdapter = inject(DateAdapter);
71
+ this.dateFormatter = inject(DateFormatter);
72
+ this.providedDefaultTimeRangeTypes = inject(KBQ_DEFAULT_TIME_RANGE_TYPES, { optional: true }) || defaultTimeRangeTypes;
73
+ this.customTimeRangeTypes = inject(KBQ_CUSTOM_TIME_RANGE_TYPES, { optional: true });
74
+ this.DEFAULT_RANGE_TYPE = 'lastHour';
75
+ this.timeRangeConfig = {
76
+ lastMinute: { units: { minutes: -1 }, translationType: 'minutes' },
77
+ last5Minutes: { units: { minutes: -5 }, translationType: 'minutes' },
78
+ last15Minutes: { units: { minutes: -15 }, translationType: 'minutes' },
79
+ last30Minutes: { units: { minutes: -30 }, translationType: 'minutes' },
80
+ lastHour: { units: { hours: -1 }, translationType: 'hours' },
81
+ last24Hours: { units: { hours: -24 }, translationType: 'hours' },
82
+ last3Days: { units: { days: -3 }, translationType: 'days' },
83
+ last7Days: { units: { days: -7 }, translationType: 'days' },
84
+ last14Days: { units: { days: -14 }, translationType: 'days' },
85
+ last30Days: { units: { days: -30 }, translationType: 'days' },
86
+ last3Months: { units: { months: -3 }, translationType: 'months' },
87
+ last12Months: { units: { months: -12 }, translationType: 'months' },
88
+ allTime: { units: {}, translationType: 'other' },
89
+ currentQuarter: { units: {}, translationType: 'other' },
90
+ currentYear: { units: {}, translationType: 'other' },
91
+ range: { units: {}, translationType: 'other' }
92
+ };
93
+ this.lastUnitsRange = (unitsInfo) => KbqTimeRangeService.range(this.dateAdapter.toIso8601(this.dateAdapter.addCalendarUnits(this.dateAdapter.today(), unitsInfo)));
94
+ if (!this.dateAdapter) {
95
+ throw createMissingDateImplError('KbqTimeRange', 'DateAdapter');
96
+ }
97
+ this.customTimeRangeTypes
98
+ ?.filter(({ type }) => {
99
+ return !this.timeRangeConfig[type];
100
+ })
101
+ .forEach((type) => this.add(type));
102
+ }
103
+ static { this.range = (dateTimeISOString) => ({
104
+ startDateTime: dateTimeISOString
105
+ }); }
106
+ add({ type, ...customTimeRangeConfig }) {
107
+ this.timeRangeConfig[type] = customTimeRangeConfig;
108
+ }
109
+ getTimeRangeTypeUnits(type) {
110
+ return this.timeRangeConfig[type].units;
111
+ }
112
+ getTimeRangeUnitByType(type) {
113
+ return this.timeRangeConfig[type].translationType;
114
+ }
115
+ getDefaultRangeValue() {
116
+ const from = this.dateAdapter.addCalendarUnits(this.dateAdapter.today(), { days: -1 });
117
+ const to = this.dateAdapter.today();
118
+ return {
119
+ fromTime: this.omitMilliseconds(from),
120
+ fromDate: this.omitMilliseconds(from),
121
+ toTime: this.omitMilliseconds(to),
122
+ toDate: this.omitMilliseconds(to)
123
+ };
124
+ }
125
+ getTimeRangeDefaultValue(rangeValue, availableTimeRangeTypes = []) {
126
+ const defaultType = availableTimeRangeTypes[0] ?? this.providedDefaultTimeRangeTypes[0] ?? this.DEFAULT_RANGE_TYPE;
127
+ return {
128
+ ...this.calculateTimeRange(defaultType, rangeValue || this.getDefaultRangeValue()),
129
+ type: defaultType
130
+ };
131
+ }
132
+ calculateTimeRange(type, rangeValue) {
133
+ if (!type) {
134
+ return {};
135
+ }
136
+ if (type === 'range') {
137
+ const checkedRangeValue = rangeValue || this.getDefaultRangeValue();
138
+ return {
139
+ startDateTime: checkedRangeValue.fromDate && checkedRangeValue.fromTime
140
+ ? this.dateAdapter.toIso8601(this.combineDateAndTime(checkedRangeValue.fromDate, checkedRangeValue.fromTime))
141
+ : '',
142
+ endDateTime: checkedRangeValue.toDate && checkedRangeValue.toTime
143
+ ? this.dateAdapter.toIso8601(this.combineDateAndTime(checkedRangeValue.toDate, checkedRangeValue.toTime))
144
+ : ''
145
+ };
146
+ }
147
+ switch (this.getTimeRangeUnitByType(type)) {
148
+ case 'other': {
149
+ switch (type) {
150
+ case 'currentQuarter':
151
+ return KbqTimeRangeService.range(this.dateAdapter.toIso8601(this.dateAdapter.startOf(this.dateAdapter.today(), 'quarter')));
152
+ case 'currentYear':
153
+ return KbqTimeRangeService.range(this.dateAdapter.toIso8601(this.dateAdapter.startOf(this.dateAdapter.today(), 'year')));
154
+ case 'allTime':
155
+ default: {
156
+ return this.timeRangeConfig[type].range ?? {};
157
+ }
158
+ }
159
+ }
160
+ default: {
161
+ return this.lastUnitsRange(this.getTimeRangeTypeUnits(type));
162
+ }
163
+ }
164
+ }
165
+ combineDateAndTime(date, time) {
166
+ return this.dateAdapter.createDateTime(this.dateAdapter.getYear(date), this.dateAdapter.getMonth(date), this.dateAdapter.getDate(date), this.dateAdapter.getHours(time), this.dateAdapter.getMinutes(time), this.dateAdapter.getSeconds(time), this.dateAdapter.getMilliseconds(time));
167
+ }
168
+ checkAndCorrectTimeRangeValue(value, availableTimeRangeTypes, rangeValue) {
169
+ let result = value && (!availableTimeRangeTypes.length || availableTimeRangeTypes.includes(value.type))
170
+ ? value
171
+ : this.getTimeRangeDefaultValue(rangeValue, availableTimeRangeTypes);
172
+ if (!result.startDateTime || (result.type === 'range' && (!result.startDateTime || !result.endDateTime))) {
173
+ result = {
174
+ ...this.calculateTimeRange(result.type, rangeValue),
175
+ type: result.type
176
+ };
177
+ }
178
+ return result;
179
+ }
180
+ omitMilliseconds(date) {
181
+ return this.dateAdapter.createDateTime(this.dateAdapter.getYear(date), this.dateAdapter.getMonth(date), this.dateAdapter.getDate(date), this.dateAdapter.getHours(date), this.dateAdapter.getMinutes(date), this.dateAdapter.getSeconds(date), 0);
182
+ }
183
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
184
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeService }); }
185
+ }
186
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeService, decorators: [{
187
+ type: Injectable
188
+ }], ctorParameters: () => [] });
189
+
190
+ class RangeErrorStateMatcher {
191
+ isErrorState(control, form) {
192
+ return !!form?.invalid || !!control?.invalid;
193
+ }
194
+ }
195
+ /** @docs-private */
196
+ class KbqTimeRangeEditor {
197
+ constructor() {
198
+ this.timeRangeService = inject(KbqTimeRangeService);
199
+ /** The maximum selectable date. */
200
+ this.maxDate = input(null);
201
+ /** The minimum selectable date. */
202
+ this.minDate = input(null);
203
+ /** Preset of selectable ranges */
204
+ this.availableTimeRangeTypes = input(this.timeRangeService.providedDefaultTimeRangeTypes);
205
+ /** Provided value of selected range */
206
+ this.rangeValue = input(this.timeRangeService.getDefaultRangeValue());
207
+ this.showRangeAsDefault = input.required();
208
+ this.localeConfiguration = input.required();
209
+ /** Customizable option output */
210
+ this.optionTemplate = input();
211
+ /** @docs-private */
212
+ this.isRangeVisible = computed(() => this.showRangeAsDefault() || this.availableTimeRangeTypes().includes('range'));
213
+ /** @docs-private */
214
+ this.timeRangeTypesWithoutRange = computed(() => {
215
+ const localeConfig = this.localeConfiguration();
216
+ return this.availableTimeRangeTypes()
217
+ .filter((type) => type !== 'range')
218
+ .map((type) => ({
219
+ type,
220
+ translationType: this.timeRangeService.getTimeRangeUnitByType(type),
221
+ units: this.timeRangeService.getTimeRangeTypeUnits(type),
222
+ formattedValue: this.getFormattedOption(type, localeConfig)
223
+ }));
224
+ });
225
+ /** @docs-private */
226
+ this.timepickerList = viewChildren(KbqTimepicker);
227
+ /** @docs-private */
228
+ this.timepickerFormat = TimeFormats.HHmmss;
229
+ /** @docs-private */
230
+ this.rangeStateMatcher = new RangeErrorStateMatcher();
231
+ this.lastValidationErrorOnEmit = null;
232
+ /** @docs-private */
233
+ this.onChange = (_value) => { };
234
+ /** @docs-private */
235
+ this.onTouch = () => { };
236
+ const defaultRangeValue = this.rangeValue();
237
+ this.form = new FormGroup({
238
+ type: new FormControl(this.timeRangeService.DEFAULT_RANGE_TYPE, {
239
+ nonNullable: true
240
+ }),
241
+ fromTime: new FormControl(defaultRangeValue.fromTime, { nonNullable: true }),
242
+ fromDate: new FormControl(defaultRangeValue.fromDate, { nonNullable: true }),
243
+ toTime: new FormControl(defaultRangeValue.toTime, { nonNullable: true }),
244
+ toDate: new FormControl(defaultRangeValue.toDate, { nonNullable: true })
245
+ }, { validators: rangeValidator(this.timeRangeService) });
246
+ const rangeControls = [
247
+ this.form.controls.fromTime,
248
+ this.form.controls.fromDate,
249
+ this.form.controls.toTime,
250
+ this.form.controls.toDate
251
+ ];
252
+ merge(...rangeControls.map((control) => control.statusChanges))
253
+ .pipe(takeUntilDestroyed())
254
+ .subscribe(() => (this.lastValidationErrorOnEmit = this.concatControlValidationErrors()));
255
+ this.form.valueChanges
256
+ .pipe(map((formValue) => formValue.type), distinctUntilChanged(), takeUntilDestroyed())
257
+ .subscribe((type) => {
258
+ const isDisabled = type !== 'range';
259
+ rangeControls.forEach((control) => {
260
+ if (isDisabled) {
261
+ control.disable({ emitEvent: false });
262
+ }
263
+ else {
264
+ control.enable({ emitEvent: false });
265
+ }
266
+ });
267
+ });
268
+ this.form.valueChanges.pipe(takeUntilDestroyed()).subscribe((formValue) => {
269
+ const range = this.mapTimeRange(formValue);
270
+ if (range)
271
+ this.onChange(range);
272
+ });
273
+ this.form.statusChanges.pipe(takeUntilDestroyed()).subscribe((status) => {
274
+ const timepickerList = this.timepickerList();
275
+ if (timepickerList.at(0)) {
276
+ timepickerList.at(0).errorState = status === 'INVALID';
277
+ }
278
+ });
279
+ }
280
+ ngOnInit() {
281
+ const defaultRangeValue = this.rangeValue();
282
+ const availableTimeRangeTypes = this.availableTimeRangeTypes();
283
+ this.form.setValue({
284
+ type: (availableTimeRangeTypes.length && availableTimeRangeTypes[0]) || 'range',
285
+ fromTime: defaultRangeValue.fromTime,
286
+ fromDate: defaultRangeValue.fromDate,
287
+ toTime: defaultRangeValue.toTime,
288
+ toDate: defaultRangeValue.toDate
289
+ });
290
+ }
291
+ /** @docs-private */
292
+ validate() {
293
+ return this.form.errors || this.lastValidationErrorOnEmit;
294
+ }
295
+ /** Implemented as part of ControlValueAccessor */
296
+ writeValue(value) {
297
+ if (!value)
298
+ return;
299
+ const corrected = this.timeRangeService.checkAndCorrectTimeRangeValue(value, this.availableTimeRangeTypes(), this.form.value);
300
+ this.form.controls.type.setValue(corrected.type);
301
+ if (corrected.type === 'range' && corrected.startDateTime && corrected.endDateTime) {
302
+ const from = this.timeRangeService.dateAdapter.deserialize(corrected.startDateTime);
303
+ const to = this.timeRangeService.dateAdapter.deserialize(corrected.endDateTime);
304
+ this.form.patchValue({
305
+ fromTime: from,
306
+ fromDate: from,
307
+ toTime: to,
308
+ toDate: to
309
+ });
310
+ }
311
+ }
312
+ /** Implemented as part of ControlValueAccessor */
313
+ registerOnChange(fn) {
314
+ this.onChange = fn;
315
+ }
316
+ /** Implemented as part of ControlValueAccessor */
317
+ registerOnTouched(fn) {
318
+ this.onTouch = fn;
319
+ }
320
+ mapTimeRange({ type }) {
321
+ if (!type)
322
+ return;
323
+ return {
324
+ type,
325
+ ...this.timeRangeService.calculateTimeRange(type, {
326
+ // use control.value, since via form.value control values can be undefined
327
+ fromTime: this.form.controls.fromTime.value,
328
+ fromDate: this.form.controls.fromDate.value,
329
+ toDate: this.form.controls.toTime.value,
330
+ toTime: this.form.controls.toTime.value
331
+ })
332
+ };
333
+ }
334
+ getFormattedOption(type, localeConfig) {
335
+ const translationType = this.timeRangeService.getTimeRangeUnitByType(type);
336
+ if (translationType === 'other')
337
+ return '';
338
+ const range = this.timeRangeService.calculateTimeRange(type);
339
+ return this.timeRangeService.dateFormatter.duration(this.timeRangeService.dateAdapter.deserialize(range.startDateTime), this.timeRangeService.dateAdapter.today(), [translationType], false, localeConfig.durationTemplate.option);
340
+ }
341
+ concatControlValidationErrors() {
342
+ let result = this.form.errors;
343
+ Object.values(this.form.controls).forEach((control) => {
344
+ if (control.errors) {
345
+ result = {
346
+ ...result,
347
+ ...control.errors
348
+ };
349
+ }
350
+ });
351
+ return result;
352
+ }
353
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeEditor, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
354
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: KbqTimeRangeEditor, isStandalone: true, selector: "kbq-time-range-editor", inputs: { maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, availableTimeRangeTypes: { classPropertyName: "availableTimeRangeTypes", publicName: "availableTimeRangeTypes", isSignal: true, isRequired: false, transformFunction: null }, rangeValue: { classPropertyName: "rangeValue", publicName: "rangeValue", isSignal: true, isRequired: false, transformFunction: null }, showRangeAsDefault: { classPropertyName: "showRangeAsDefault", publicName: "showRangeAsDefault", isSignal: true, isRequired: true, transformFunction: null }, localeConfiguration: { classPropertyName: "localeConfiguration", publicName: "localeConfiguration", isSignal: true, isRequired: true, transformFunction: null }, optionTemplate: { classPropertyName: "optionTemplate", publicName: "optionTemplate", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "kbq-time-range__editor" }, providers: [
355
+ {
356
+ multi: true,
357
+ provide: NG_VALUE_ACCESSOR,
358
+ useExisting: KbqTimeRangeEditor
359
+ },
360
+ {
361
+ multi: true,
362
+ provide: NG_VALIDATORS,
363
+ useExisting: KbqTimeRangeEditor
364
+ }
365
+ ], viewQueries: [{ propertyName: "timepickerList", predicate: KbqTimepicker, descendants: true, isSignal: true }], ngImport: i0, template: "<form [formGroup]=\"form\">\n <kbq-radio-group class=\"kbq-time-range-editor__container\" [formControl]=\"form.controls.type\">\n @let types = timeRangeTypesWithoutRange();\n\n @if (types.length) {\n <div class=\"kbq-time-range-editor__predefined\">\n @for (type of types; track type) {\n <kbq-radio-button class=\"kbq-time-range-editor__predefined-option\" [value]=\"type.type\">\n <ng-container\n *ngTemplateOutlet=\"optionTemplate() || defaultOptionTemplate; context: { $implicit: type }\"\n />\n </kbq-radio-button>\n }\n </div>\n }\n\n @if (isRangeVisible()) {\n @let localeConfig = localeConfiguration();\n\n <div class=\"kbq-time-range-editor__range\" role=\"group\">\n @if (types.length) {\n <kbq-radio-button [value]=\"'range'\">{{ localeConfig.editor.rangeLabel }}</kbq-radio-button>\n }\n\n <div class=\"kbq-time-range-editor__date-time\">\n <span class=\"kbq-time-range-editor__date-time-prefix\" [attr.aria-label]=\"localeConfig.editor.from\">\n {{ localeConfig.editor.from }}\n </span>\n <kbq-fieldset>\n <kbq-form-field kbqFieldsetItem>\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix [autoColor]=\"true\"></i>\n <input kbqTimepicker [format]=\"timepickerFormat\" [formControl]=\"form.controls.fromTime\" />\n </kbq-form-field>\n\n <kbq-form-field>\n <input\n [min]=\"minDate()\"\n [max]=\"maxDate()\"\n [kbqDatepicker]=\"datepickerFrom\"\n [formControl]=\"form.controls.fromDate\"\n [errorStateMatcher]=\"rangeStateMatcher\"\n />\n <kbq-datepicker-toggle-icon kbqSuffix [for]=\"datepickerFrom\" />\n <kbq-datepicker #datepickerFrom [minDate]=\"minDate()\" [maxDate]=\"maxDate()\" />\n </kbq-form-field>\n </kbq-fieldset>\n </div>\n\n <div class=\"kbq-time-range-editor__date-time\">\n <span class=\"kbq-time-range-editor__date-time-prefix\" [attr.aria-label]=\"localeConfig.editor.to\">\n {{ localeConfig.editor.to }}\n </span>\n <kbq-fieldset>\n <kbq-form-field kbqFieldsetItem>\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix [autoColor]=\"true\"></i>\n <input kbqTimepicker [format]=\"timepickerFormat\" [formControl]=\"form.controls.toTime\" />\n </kbq-form-field>\n\n <kbq-form-field>\n <input\n [min]=\"minDate()\"\n [max]=\"maxDate()\"\n [kbqDatepicker]=\"datepickerTo\"\n [formControl]=\"form.controls.toDate\"\n [errorStateMatcher]=\"rangeStateMatcher\"\n />\n <kbq-datepicker-toggle-icon kbqSuffix [for]=\"datepickerTo\" />\n <kbq-datepicker #datepickerTo [minDate]=\"minDate()\" [maxDate]=\"maxDate()\" />\n </kbq-form-field>\n </kbq-fieldset>\n </div>\n </div>\n }\n </kbq-radio-group>\n</form>\n\n<ng-template #defaultOptionTemplate let-context>\n @let localeConfig = localeConfiguration();\n @switch (context.translationType) {\n @case ('other') {\n @switch (context.type) {\n @case ('allTime') {\n {{ localeConfig.editor.allTime }}\n }\n @case ('currentQuarter') {\n {{ localeConfig.editor.currentQuarter }}\n }\n @case ('currentYear') {\n {{ localeConfig.editor.currentYear }}\n }\n }\n }\n @default {\n {{ context.formattedValue }}\n }\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: KbqFieldset, selector: "kbq-fieldset" }, { kind: "directive", type: KbqFieldsetItem, selector: "[kbqFieldsetItem]" }, { kind: "ngmodule", type: KbqDatepickerModule }, { kind: "component", type: i2.KbqDatepicker, selector: "kbq-datepicker", inputs: ["hasBackdrop", "startAt", "disabled", "opened", "minDate", "maxDate", "panelClass", "dateClass", "backdropClass"], outputs: ["yearSelected", "monthSelected", "opened", "closed"], exportAs: ["kbqDatepicker"] }, { kind: "directive", type: i2.KbqDatepickerInput, selector: "input[kbqDatepicker], input[kbqCalendar]", inputs: ["errorStateMatcher", "placeholder", "required", "kbqDatepicker", "kbqCalendar", "kbqDatepickerFilter", "value", "min", "max", "disabled", "id", "kbqValidationTooltip"], outputs: ["incorrectInput", "dateChange", "dateInput"], exportAs: ["kbqDatepickerInput"] }, { kind: "component", type: i2.KbqDatepickerToggleIconComponent, selector: "kbq-datepicker-toggle-icon", inputs: ["disabled", "for"] }, { kind: "component", type: i3.KbqFormField, selector: "kbq-form-field", inputs: ["noBorders"], exportAs: ["kbqFormField"] }, { kind: "directive", type: i3.KbqPrefix, selector: "[kbqPrefix]", exportAs: ["kbqPrefix"] }, { kind: "directive", type: i3.KbqSuffix, selector: "[kbqSuffix]" }, { kind: "directive", type: i3.KbqValidateDirective, selector: " input[kbqInput], input[kbqNumberInput], input[kbqInputPassword], input[kbqTimepicker], input[kbqDatepicker], textarea[kbqTextarea], kbq-select, kbq-tree-select, kbq-tag-list ", exportAs: ["KbqValidate"] }, { kind: "ngmodule", type: KbqFormFieldModule }, { kind: "ngmodule", type: KbqTimepickerModule }, { kind: "directive", type: i4.KbqTimepicker, selector: "input[kbqTimepicker]", inputs: ["placeholder", "disabled", "id", "required", "format", "min", "max", "value", "kbqValidationTooltip"], outputs: ["incorrectInput"], exportAs: ["kbqTimepicker"] }, { kind: "ngmodule", type: KbqRadioModule }, { kind: "directive", type: i5.KbqRadioGroup, selector: "kbq-radio-group", inputs: ["big", "name", "labelPosition", "value", "selected", "disabled", "required"], outputs: ["change"], exportAs: ["kbqRadioGroup"] }, { kind: "component", type: i5.KbqRadioButton, selector: "kbq-radio-button", inputs: ["checked", "value", "disabled", "tabIndex", "required", "labelPosition", "name", "isFocused", "id"], outputs: ["change"], exportAs: ["kbqRadioButton"] }, { kind: "component", type: KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
366
+ }
367
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeEditor, decorators: [{
368
+ type: Component,
369
+ args: [{ selector: 'kbq-time-range-editor', standalone: true, imports: [
370
+ NgTemplateOutlet,
371
+ ReactiveFormsModule,
372
+ KbqFieldset,
373
+ KbqFieldsetItem,
374
+ KbqDatepickerModule,
375
+ KbqFormFieldModule,
376
+ KbqTimepickerModule,
377
+ KbqRadioModule,
378
+ KbqIcon
379
+ ], host: {
380
+ class: 'kbq-time-range__editor'
381
+ }, providers: [
382
+ {
383
+ multi: true,
384
+ provide: NG_VALUE_ACCESSOR,
385
+ useExisting: KbqTimeRangeEditor
386
+ },
387
+ {
388
+ multi: true,
389
+ provide: NG_VALIDATORS,
390
+ useExisting: KbqTimeRangeEditor
391
+ }
392
+ ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<form [formGroup]=\"form\">\n <kbq-radio-group class=\"kbq-time-range-editor__container\" [formControl]=\"form.controls.type\">\n @let types = timeRangeTypesWithoutRange();\n\n @if (types.length) {\n <div class=\"kbq-time-range-editor__predefined\">\n @for (type of types; track type) {\n <kbq-radio-button class=\"kbq-time-range-editor__predefined-option\" [value]=\"type.type\">\n <ng-container\n *ngTemplateOutlet=\"optionTemplate() || defaultOptionTemplate; context: { $implicit: type }\"\n />\n </kbq-radio-button>\n }\n </div>\n }\n\n @if (isRangeVisible()) {\n @let localeConfig = localeConfiguration();\n\n <div class=\"kbq-time-range-editor__range\" role=\"group\">\n @if (types.length) {\n <kbq-radio-button [value]=\"'range'\">{{ localeConfig.editor.rangeLabel }}</kbq-radio-button>\n }\n\n <div class=\"kbq-time-range-editor__date-time\">\n <span class=\"kbq-time-range-editor__date-time-prefix\" [attr.aria-label]=\"localeConfig.editor.from\">\n {{ localeConfig.editor.from }}\n </span>\n <kbq-fieldset>\n <kbq-form-field kbqFieldsetItem>\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix [autoColor]=\"true\"></i>\n <input kbqTimepicker [format]=\"timepickerFormat\" [formControl]=\"form.controls.fromTime\" />\n </kbq-form-field>\n\n <kbq-form-field>\n <input\n [min]=\"minDate()\"\n [max]=\"maxDate()\"\n [kbqDatepicker]=\"datepickerFrom\"\n [formControl]=\"form.controls.fromDate\"\n [errorStateMatcher]=\"rangeStateMatcher\"\n />\n <kbq-datepicker-toggle-icon kbqSuffix [for]=\"datepickerFrom\" />\n <kbq-datepicker #datepickerFrom [minDate]=\"minDate()\" [maxDate]=\"maxDate()\" />\n </kbq-form-field>\n </kbq-fieldset>\n </div>\n\n <div class=\"kbq-time-range-editor__date-time\">\n <span class=\"kbq-time-range-editor__date-time-prefix\" [attr.aria-label]=\"localeConfig.editor.to\">\n {{ localeConfig.editor.to }}\n </span>\n <kbq-fieldset>\n <kbq-form-field kbqFieldsetItem>\n <i kbq-icon=\"kbq-clock_16\" kbqPrefix [autoColor]=\"true\"></i>\n <input kbqTimepicker [format]=\"timepickerFormat\" [formControl]=\"form.controls.toTime\" />\n </kbq-form-field>\n\n <kbq-form-field>\n <input\n [min]=\"minDate()\"\n [max]=\"maxDate()\"\n [kbqDatepicker]=\"datepickerTo\"\n [formControl]=\"form.controls.toDate\"\n [errorStateMatcher]=\"rangeStateMatcher\"\n />\n <kbq-datepicker-toggle-icon kbqSuffix [for]=\"datepickerTo\" />\n <kbq-datepicker #datepickerTo [minDate]=\"minDate()\" [maxDate]=\"maxDate()\" />\n </kbq-form-field>\n </kbq-fieldset>\n </div>\n </div>\n }\n </kbq-radio-group>\n</form>\n\n<ng-template #defaultOptionTemplate let-context>\n @let localeConfig = localeConfiguration();\n @switch (context.translationType) {\n @case ('other') {\n @switch (context.type) {\n @case ('allTime') {\n {{ localeConfig.editor.allTime }}\n }\n @case ('currentQuarter') {\n {{ localeConfig.editor.currentQuarter }}\n }\n @case ('currentYear') {\n {{ localeConfig.editor.currentYear }}\n }\n }\n }\n @default {\n {{ context.formattedValue }}\n }\n }\n</ng-template>\n" }]
393
+ }], ctorParameters: () => [] });
394
+
395
+ /** @docs-private */
396
+ class KbqTimeRangeTitle {
397
+ constructor() {
398
+ this.timeRangeService = inject(KbqTimeRangeService);
399
+ this.popover = inject(KbqPopoverTrigger, { host: true });
400
+ this.injector = inject(Injector);
401
+ this.timeRange = input.required();
402
+ this.localeConfiguration = input.required();
403
+ this.titleTemplate = input();
404
+ this.context = computed(() => {
405
+ const timeRange = this.timeRange();
406
+ if (!timeRange)
407
+ return undefined;
408
+ return {
409
+ ...timeRange,
410
+ ...this.timeRangeService.getTimeRangeTypeUnits(timeRange.type)
411
+ };
412
+ });
413
+ this.titleContext = computed(() => {
414
+ const context = this.context();
415
+ const formattedDate = this.formattedDate();
416
+ let customizableTitleContext = { formattedDate, popover: this.popover };
417
+ if (context) {
418
+ customizableTitleContext = { ...context, ...customizableTitleContext };
419
+ }
420
+ return {
421
+ $implicit: customizableTitleContext,
422
+ ...customizableTitleContext
423
+ };
424
+ });
425
+ this.formattedDate = computed(() => {
426
+ const context = this.context();
427
+ const localeConfiguration = this.localeConfiguration();
428
+ if (!context) {
429
+ return localeConfiguration.title.placeholder;
430
+ }
431
+ const timeRangeUnit = this.timeRangeService.getTimeRangeUnitByType(context.type);
432
+ if (timeRangeUnit === 'other') {
433
+ switch (context.type) {
434
+ case 'range': {
435
+ return (localeConfiguration.title.for +
436
+ ' ' +
437
+ this.timeRangeService.dateFormatter.rangeLongDate(this.timeRangeService.dateAdapter.deserialize(context.startDateTime ?? ''), this.timeRangeService.dateAdapter.deserialize(context.endDateTime ?? '')));
438
+ }
439
+ case 'allTime': {
440
+ return localeConfiguration.editor.allTime;
441
+ }
442
+ case 'currentQuarter': {
443
+ return localeConfiguration.editor.currentQuarter;
444
+ }
445
+ case 'currentYear': {
446
+ return localeConfiguration.editor.currentYear;
447
+ }
448
+ default: {
449
+ return '';
450
+ }
451
+ }
452
+ }
453
+ if (!context.startDateTime)
454
+ return '';
455
+ return (localeConfiguration.title.for +
456
+ ' ' +
457
+ this.timeRangeService.dateFormatter.duration(this.timeRangeService.dateAdapter.deserialize(context.startDateTime), this.timeRangeService.dateAdapter.today(), [timeRangeUnit], false, localeConfiguration.durationTemplate.title));
458
+ });
459
+ }
460
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeTitle, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
461
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: KbqTimeRangeTitle, isStandalone: true, selector: "kbq-time-range-title", inputs: { timeRange: { classPropertyName: "timeRange", publicName: "timeRange", isSignal: true, isRequired: true, transformFunction: null }, localeConfiguration: { classPropertyName: "localeConfiguration", publicName: "localeConfiguration", isSignal: true, isRequired: true, transformFunction: null }, titleTemplate: { classPropertyName: "titleTemplate", publicName: "titleTemplate", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
462
+ @if (titleTemplate()) {
463
+ <ng-container *ngTemplateOutlet="titleTemplate()!; context: titleContext() ?? null; injector: injector" />
464
+ } @else {
465
+ <a kbq-link pseudo>
466
+ <span class="kbq-link__text">{{ formattedDate() }}</span>
467
+
468
+ <i kbq-icon="kbq-calendar-o_16"></i>
469
+ </a>
470
+ }
471
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: KbqLinkModule }, { kind: "directive", type: i1$1.KbqLink, selector: "[kbq-link]", inputs: ["disabled", "tabIndex", "pseudo", "noUnderline", "big", "compact", "useVisited", "print"], exportAs: ["kbqLink"] }, { kind: "ngmodule", type: KbqIconModule }, { kind: "component", type: i2$1.KbqIcon, selector: "[kbq-icon]", inputs: ["small", "autoColor", "kbq-icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
472
+ }
473
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeTitle, decorators: [{
474
+ type: Component,
475
+ args: [{
476
+ standalone: true,
477
+ selector: 'kbq-time-range-title',
478
+ imports: [
479
+ NgTemplateOutlet,
480
+ KbqLinkModule,
481
+ KbqIconModule
482
+ ],
483
+ template: `
484
+ @if (titleTemplate()) {
485
+ <ng-container *ngTemplateOutlet="titleTemplate()!; context: titleContext() ?? null; injector: injector" />
486
+ } @else {
487
+ <a kbq-link pseudo>
488
+ <span class="kbq-link__text">{{ formattedDate() }}</span>
489
+
490
+ <i kbq-icon="kbq-calendar-o_16"></i>
491
+ </a>
492
+ }
493
+ `,
494
+ changeDetection: ChangeDetectionStrategy.OnPush
495
+ }]
496
+ }] });
497
+
498
+ /** Localization configuration provider. */
499
+ const KBQ_TIME_RANGE_LOCALE_CONFIGURATION = new InjectionToken('KBQ_TIME_RANGE_LOCALE_CONFIGURATION', { factory: () => ruRULocaleData.timeRange });
500
+ /** Utility provider for `KBQ_TIME_RANGE_LOCALE_CONFIGURATION`. */
501
+ const kbqTimeRangeLocaleConfigurationProvider = (configuration) => ({
502
+ provide: KBQ_TIME_RANGE_LOCALE_CONFIGURATION,
503
+ useValue: configuration
504
+ });
505
+ class KbqTimeRange {
506
+ constructor() {
507
+ this.timeRangeService = inject(KbqTimeRangeService);
508
+ this.localeService = inject(KBQ_LOCALE_SERVICE, { optional: true });
509
+ /** @docs-private */
510
+ this.ngControl = inject(NgControl, { optional: true, self: true });
511
+ /** The minimum selectable date. */
512
+ this.minDate = input();
513
+ /** The maximum selectable date. */
514
+ this.maxDate = input();
515
+ /** provided value of selected range */
516
+ this.defaultRangeValue = input();
517
+ /** Preset of selectable ranges */
518
+ this.availableTimeRangeTypes = input(this.timeRangeService.providedDefaultTimeRangeTypes);
519
+ /** Customizable trigger output */
520
+ this.titleTemplate = input();
521
+ /** Customizable option output */
522
+ this.optionTemplate = input();
523
+ /** Whether to show popover with arrow */
524
+ this.arrow = input(true, { transform: booleanAttribute });
525
+ /**
526
+ * Whether to show range in popover if not provided
527
+ * @see availableTimeRangeTypes
528
+ */
529
+ this.showRangeAsDefault = input(true);
530
+ /** Whether component should fallback to default value if null provided */
531
+ this.nonNullable = input(true, { transform: booleanAttribute });
532
+ /** Emit value update if provided value via formControl wasn't valid */
533
+ this.valueCorrected = output();
534
+ /**
535
+ * Used to calculate time range.
536
+ * @docs-private */
537
+ this.normalizedDefaultRangeValue = computed(() => ({
538
+ ...this.timeRangeService.getDefaultRangeValue(),
539
+ ...this.defaultRangeValue()
540
+ }));
541
+ /** @docs-private */
542
+ this.popoverSize = PopUpSizes.Medium;
543
+ /** @docs-private */
544
+ this.popupPlacement = PopUpPlacements.BottomLeft;
545
+ /** @docs-private */
546
+ this.localeConfiguration = signal(inject(KBQ_TIME_RANGE_LOCALE_CONFIGURATION));
547
+ /** @docs-private */
548
+ this.onChange = (_value) => { };
549
+ /** @docs-private */
550
+ this.onTouch = () => { };
551
+ this.handleAvailableTypesChange = (types) => {
552
+ if (types.includes(this.rangeEditorControl.value.type) || this.rangeEditorControl.value.type === 'range') {
553
+ return;
554
+ }
555
+ const timeRangeDefaultValue = this.timeRangeService.getTimeRangeDefaultValue(this.normalizedDefaultRangeValue(), types.length ? types : ['range']);
556
+ this.titleValue.set(timeRangeDefaultValue);
557
+ this.rangeEditorControl.setValue(timeRangeDefaultValue);
558
+ this.onChange(timeRangeDefaultValue);
559
+ };
560
+ if (this.ngControl) {
561
+ this.ngControl.valueAccessor = this;
562
+ }
563
+ const defaultValue = this.timeRangeService.getTimeRangeDefaultValue(this.normalizedDefaultRangeValue(), this.availableTimeRangeTypes());
564
+ this.titleValue = signal(this.nonNullable() ? defaultValue : null);
565
+ this.rangeEditorControl = new FormControl(defaultValue, { nonNullable: true });
566
+ this.localeService?.changes.pipe(takeUntilDestroyed()).subscribe(() => {
567
+ this.localeConfiguration.set(this.localeService?.getParams('timeRange') ?? ruRULocaleData.timeRange);
568
+ });
569
+ toObservable(this.availableTimeRangeTypes)
570
+ .pipe(takeUntilDestroyed())
571
+ .subscribe(this.handleAvailableTypesChange);
572
+ }
573
+ ngOnInit() {
574
+ // call again on init, so input signals values will be correct
575
+ this.writeValue(this.ngControl?.value ?? null);
576
+ }
577
+ /** Implemented as part of ControlValueAccessor */
578
+ writeValue(value) {
579
+ const nonNullable = this.nonNullable();
580
+ const availableTimeRangeTypes = this.availableTimeRangeTypes();
581
+ const corrected = this.timeRangeService.checkAndCorrectTimeRangeValue(value, availableTimeRangeTypes, this.normalizedDefaultRangeValue());
582
+ if ((value && value.type && !('startDateTime' in value && availableTimeRangeTypes.includes(value.type))) ||
583
+ (nonNullable && value === null)) {
584
+ this.valueCorrected.emit(corrected);
585
+ }
586
+ this.titleValue.set(nonNullable || value !== null ? corrected : null);
587
+ this.rangeEditorControl.setValue(corrected);
588
+ }
589
+ /** @docs-private */
590
+ onApply(popover) {
591
+ this.titleValue.set(this.rangeEditorControl.value);
592
+ this.onChange(this.rangeEditorControl.value);
593
+ popover.hide();
594
+ }
595
+ /** @docs-private */
596
+ onCancel(popover) {
597
+ popover.hide();
598
+ }
599
+ onVisibleChange(isVisible) {
600
+ const titleValue = this.titleValue();
601
+ if (!isVisible && titleValue) {
602
+ this.rangeEditorControl.setValue(titleValue);
603
+ }
604
+ }
605
+ /** Implemented as part of ControlValueAccessor */
606
+ registerOnChange(fn) {
607
+ this.onChange = fn;
608
+ }
609
+ /** Implemented as part of ControlValueAccessor */
610
+ registerOnTouched(fn) {
611
+ this.onTouch = fn;
612
+ }
613
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRange, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
614
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.14", type: KbqTimeRange, isStandalone: true, selector: "kbq-time-range", inputs: { minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, defaultRangeValue: { classPropertyName: "defaultRangeValue", publicName: "defaultRangeValue", isSignal: true, isRequired: false, transformFunction: null }, availableTimeRangeTypes: { classPropertyName: "availableTimeRangeTypes", publicName: "availableTimeRangeTypes", isSignal: true, isRequired: false, transformFunction: null }, titleTemplate: { classPropertyName: "titleTemplate", publicName: "titleTemplate", isSignal: true, isRequired: false, transformFunction: null }, optionTemplate: { classPropertyName: "optionTemplate", publicName: "optionTemplate", isSignal: true, isRequired: false, transformFunction: null }, arrow: { classPropertyName: "arrow", publicName: "arrow", isSignal: true, isRequired: false, transformFunction: null }, showRangeAsDefault: { classPropertyName: "showRangeAsDefault", publicName: "showRangeAsDefault", isSignal: true, isRequired: false, transformFunction: null }, nonNullable: { classPropertyName: "nonNullable", publicName: "nonNullable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueCorrected: "valueCorrected" }, host: { classAttribute: "kbq-time-range" }, providers: [KbqTimeRangeService], ngImport: i0, template: `
615
+ @let localeConfig = localeConfiguration();
616
+ <kbq-time-range-title
617
+ #popover="kbqPopover"
618
+ class="kbq-time-range__trigger"
619
+ kbqPopover
620
+ kbqPopoverClass="kbq-time-range__popover"
621
+ [kbqPopoverSize]="popoverSize"
622
+ [kbqPopoverContent]="timeRangePopoverContent"
623
+ [kbqPopoverFooter]="timeRangePopoverFooter"
624
+ [kbqPopoverPlacement]="popupPlacement"
625
+ [kbqPopoverArrow]="arrow()"
626
+ [titleTemplate]="titleTemplate()"
627
+ [timeRange]="titleValue()"
628
+ [localeConfiguration]="localeConfig"
629
+ (kbqPopoverVisibleChange)="onVisibleChange($event)"
630
+ />
631
+
632
+ <ng-template #timeRangePopoverContent>
633
+ <kbq-time-range-editor
634
+ [maxDate]="maxDate()"
635
+ [minDate]="minDate()"
636
+ [formControl]="rangeEditorControl"
637
+ [localeConfiguration]="localeConfig"
638
+ [showRangeAsDefault]="showRangeAsDefault()"
639
+ [rangeValue]="normalizedDefaultRangeValue()"
640
+ [availableTimeRangeTypes]="availableTimeRangeTypes()"
641
+ [optionTemplate]="optionTemplate()"
642
+ />
643
+ </ng-template>
644
+
645
+ <ng-template #timeRangePopoverFooter>
646
+ <div class="kbq-time-range__buttons" role="group">
647
+ <button
648
+ kbq-button
649
+ [color]="'contrast'"
650
+ [disabled]="rangeEditorControl.invalid"
651
+ (click)="onApply(popover)"
652
+ >
653
+ {{ localeConfig.editor.apply }}
654
+ </button>
655
+
656
+ <button kbq-button (click)="onCancel(popover)">{{ localeConfig.editor.cancel }}</button>
657
+ </div>
658
+ </ng-template>
659
+ `, isInline: true, styles: [".kbq-time-range .kbq-time-range__trigger{display:block}.kbq-time-range__popover .kbq-time-range__buttons{display:flex;flex-direction:row;gap:var(--kbq-size-l)}.kbq-time-range__editor{display:block}.kbq-time-range__editor .kbq-time-range-editor__container{width:100%}.kbq-time-range__editor .kbq-time-range-editor__predefined{column-count:2}.kbq-time-range__editor .kbq-time-range-editor__predefined .kbq-time-range-editor__predefined-option{display:block;margin-bottom:var(--kbq-size-s)}.kbq-time-range__editor .kbq-time-range-editor__range{display:flex;flex-direction:column;gap:var(--kbq-size-s)}.kbq-time-range__editor .kbq-time-range-editor__range .kbq-time-range-editor__predefined{column-count:2}.kbq-time-range__editor .kbq-time-range-editor__range .kbq-time-range-editor__predefined .kbq-time-range-editor__predefined-option{display:block}.kbq-time-range__editor .kbq-time-range-editor__range .kbq-time-range-editor__date-time{display:flex;flex-direction:row;justify-content:space-between;gap:var(--kbq-size-s)}.kbq-time-range__editor .kbq-time-range-editor__range .kbq-time-range-editor__date-time .kbq-time-range-editor__date-time-prefix{align-self:center;width:57px}.kbq-time-range-title-as-form-field{white-space:nowrap;text-overflow:ellipsis;min-height:calc(var(--kbq-form-field-size-height) - 2 * var(--kbq-size-border-width))}.kbq-time-range-title-as-form-field .kbq-time-range-title__placeholder{color:var(--kbq-foreground-contrast-tertiary)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: KbqPopoverModule }, { kind: "directive", type: i2$2.KbqPopoverTrigger, selector: "[kbqPopover]", inputs: ["kbqPopoverPreventClose", "defaultPaddings", "kbqPopoverVisible", "kbqPopoverPlacement", "kbqPopoverPlacementPriority", "hasBackdrop", "kbqPopoverHeader", "kbqPopoverContent", "kbqPopoverFooter", "kbqPopoverDisabled", "kbqTrigger", "kbqPopoverSize", "kbqPopoverClass", "kbqPopoverContext", "hasCloseButton", "closeOnScroll", "backdropClass", "kbqPopoverArrow", "kbqPopoverOffset", "kbqLeaveDelay"], outputs: ["kbqPopoverPlacementChange", "kbqPopoverVisibleChange"], exportAs: ["kbqPopover"] }, { 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: "component", type: KbqTimeRangeEditor, selector: "kbq-time-range-editor", inputs: ["maxDate", "minDate", "availableTimeRangeTypes", "rangeValue", "showRangeAsDefault", "localeConfiguration", "optionTemplate"] }, { kind: "component", type: KbqTimeRangeTitle, selector: "kbq-time-range-title", inputs: ["timeRange", "localeConfiguration", "titleTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
660
+ }
661
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRange, decorators: [{
662
+ type: Component,
663
+ args: [{ standalone: true, selector: 'kbq-time-range', template: `
664
+ @let localeConfig = localeConfiguration();
665
+ <kbq-time-range-title
666
+ #popover="kbqPopover"
667
+ class="kbq-time-range__trigger"
668
+ kbqPopover
669
+ kbqPopoverClass="kbq-time-range__popover"
670
+ [kbqPopoverSize]="popoverSize"
671
+ [kbqPopoverContent]="timeRangePopoverContent"
672
+ [kbqPopoverFooter]="timeRangePopoverFooter"
673
+ [kbqPopoverPlacement]="popupPlacement"
674
+ [kbqPopoverArrow]="arrow()"
675
+ [titleTemplate]="titleTemplate()"
676
+ [timeRange]="titleValue()"
677
+ [localeConfiguration]="localeConfig"
678
+ (kbqPopoverVisibleChange)="onVisibleChange($event)"
679
+ />
680
+
681
+ <ng-template #timeRangePopoverContent>
682
+ <kbq-time-range-editor
683
+ [maxDate]="maxDate()"
684
+ [minDate]="minDate()"
685
+ [formControl]="rangeEditorControl"
686
+ [localeConfiguration]="localeConfig"
687
+ [showRangeAsDefault]="showRangeAsDefault()"
688
+ [rangeValue]="normalizedDefaultRangeValue()"
689
+ [availableTimeRangeTypes]="availableTimeRangeTypes()"
690
+ [optionTemplate]="optionTemplate()"
691
+ />
692
+ </ng-template>
693
+
694
+ <ng-template #timeRangePopoverFooter>
695
+ <div class="kbq-time-range__buttons" role="group">
696
+ <button
697
+ kbq-button
698
+ [color]="'contrast'"
699
+ [disabled]="rangeEditorControl.invalid"
700
+ (click)="onApply(popover)"
701
+ >
702
+ {{ localeConfig.editor.apply }}
703
+ </button>
704
+
705
+ <button kbq-button (click)="onCancel(popover)">{{ localeConfig.editor.cancel }}</button>
706
+ </div>
707
+ </ng-template>
708
+ `, imports: [
709
+ ReactiveFormsModule,
710
+ KbqPopoverModule,
711
+ KbqButtonModule,
712
+ KbqTimeRangeEditor,
713
+ KbqTimeRangeTitle
714
+ ], host: {
715
+ class: 'kbq-time-range'
716
+ }, providers: [KbqTimeRangeService], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, styles: [".kbq-time-range .kbq-time-range__trigger{display:block}.kbq-time-range__popover .kbq-time-range__buttons{display:flex;flex-direction:row;gap:var(--kbq-size-l)}.kbq-time-range__editor{display:block}.kbq-time-range__editor .kbq-time-range-editor__container{width:100%}.kbq-time-range__editor .kbq-time-range-editor__predefined{column-count:2}.kbq-time-range__editor .kbq-time-range-editor__predefined .kbq-time-range-editor__predefined-option{display:block;margin-bottom:var(--kbq-size-s)}.kbq-time-range__editor .kbq-time-range-editor__range{display:flex;flex-direction:column;gap:var(--kbq-size-s)}.kbq-time-range__editor .kbq-time-range-editor__range .kbq-time-range-editor__predefined{column-count:2}.kbq-time-range__editor .kbq-time-range-editor__range .kbq-time-range-editor__predefined .kbq-time-range-editor__predefined-option{display:block}.kbq-time-range__editor .kbq-time-range-editor__range .kbq-time-range-editor__date-time{display:flex;flex-direction:row;justify-content:space-between;gap:var(--kbq-size-s)}.kbq-time-range__editor .kbq-time-range-editor__range .kbq-time-range-editor__date-time .kbq-time-range-editor__date-time-prefix{align-self:center;width:57px}.kbq-time-range-title-as-form-field{white-space:nowrap;text-overflow:ellipsis;min-height:calc(var(--kbq-form-field-size-height) - 2 * var(--kbq-size-border-width))}.kbq-time-range-title-as-form-field .kbq-time-range-title__placeholder{color:var(--kbq-foreground-contrast-tertiary)}\n"] }]
717
+ }], ctorParameters: () => [] });
718
+
719
+ /** Directive for easy using styles of time-range placeholder publicly. */
720
+ class KbqTimeRangeTitlePlaceholder {
721
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeTitlePlaceholder, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
722
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: KbqTimeRangeTitlePlaceholder, isStandalone: true, selector: "[kbqTimeRangeTitlePlaceholder]", host: { classAttribute: "kbq-time-range-title__placeholder" }, ngImport: i0 }); }
723
+ }
724
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeTitlePlaceholder, decorators: [{
725
+ type: Directive,
726
+ args: [{
727
+ standalone: true,
728
+ selector: '[kbqTimeRangeTitlePlaceholder]',
729
+ host: {
730
+ class: 'kbq-time-range-title__placeholder'
731
+ }
732
+ }]
733
+ }] });
734
+ /** Component simulates `KbqFormFieldControl` allowing to provide custom content inside `KbqFormField` */
735
+ class KbqTimeRangeTitleAsControl {
736
+ constructor() {
737
+ this.timeRange = inject(KbqTimeRange);
738
+ /** @docs-private */
739
+ this.controlType = 'select';
740
+ /** @docs-private */
741
+ this.stateChanges = new Subject();
742
+ /** @docs-private */
743
+ this.ngControl = this.timeRange.ngControl;
744
+ }
745
+ /** @docs-private */
746
+ onContainerClick(_event) { }
747
+ /** @docs-private */
748
+ focus(_options) { }
749
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeTitleAsControl, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
750
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: KbqTimeRangeTitleAsControl, isStandalone: true, selector: "kbq-time-range-title-as-control", host: { properties: { "attr.tabindex": "0" }, classAttribute: "kbq-time-range-title-as-form-field" }, providers: [
751
+ {
752
+ provide: KbqFormFieldControl,
753
+ useExisting: KbqTimeRangeTitleAsControl
754
+ }
755
+ ], ngImport: i0, template: `
756
+ <ng-content />
757
+ `, isInline: true, styles: [":host{display:flex;align-items:center}:host:focus-visible{outline:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
758
+ }
759
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeTitleAsControl, decorators: [{
760
+ type: Component,
761
+ args: [{ standalone: true, selector: 'kbq-time-range-title-as-control', template: `
762
+ <ng-content />
763
+ `, providers: [
764
+ {
765
+ provide: KbqFormFieldControl,
766
+ useExisting: KbqTimeRangeTitleAsControl
767
+ }
768
+ ], host: {
769
+ '[attr.tabindex]': '0',
770
+ class: 'kbq-time-range-title-as-form-field'
771
+ }, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:flex;align-items:center}:host:focus-visible{outline:none}\n"] }]
772
+ }] });
773
+
774
+ const COMPONENTS = [
775
+ KbqTimeRange,
776
+ KbqTimeRangeTitle,
777
+ KbqTimeRangeEditor,
778
+ KbqTimeRangeTitlePlaceholder,
779
+ KbqTimeRangeTitleAsControl
780
+ ];
781
+ class KbqTimeRangeModule {
782
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
783
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeModule, imports: [KbqTimeRange,
784
+ KbqTimeRangeTitle,
785
+ KbqTimeRangeEditor,
786
+ KbqTimeRangeTitlePlaceholder,
787
+ KbqTimeRangeTitleAsControl], exports: [KbqTimeRange,
788
+ KbqTimeRangeTitle,
789
+ KbqTimeRangeEditor,
790
+ KbqTimeRangeTitlePlaceholder,
791
+ KbqTimeRangeTitleAsControl] }); }
792
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeModule, imports: [KbqTimeRange,
793
+ KbqTimeRangeTitle,
794
+ KbqTimeRangeEditor] }); }
795
+ }
796
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeModule, decorators: [{
797
+ type: NgModule,
798
+ args: [{
799
+ imports: COMPONENTS,
800
+ exports: COMPONENTS
801
+ }]
802
+ }] });
803
+
804
+ /**
805
+ * Generated bundle index. Do not edit.
806
+ */
807
+
808
+ export { KBQ_CUSTOM_TIME_RANGE_TYPES, KBQ_DEFAULT_TIME_RANGE_TYPES, KBQ_TIME_RANGE_LOCALE_CONFIGURATION, KbqTimeRange, KbqTimeRangeEditor, KbqTimeRangeModule, KbqTimeRangeTitle, KbqTimeRangeTitleAsControl, KbqTimeRangeTitlePlaceholder, createMissingDateImplError, defaultTimeRangeTypes, kbqTimeRangeLocaleConfigurationProvider, rangeValidator };
809
+ //# sourceMappingURL=koobiq-components-time-range.mjs.map