@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,840 @@
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
+ function createMissingDateImplError(componentName, provider) {
30
+ return Error(`${componentName}: No provider found for ${provider}. You must import one of the existing ` +
31
+ `modules at your application root or provide a custom implementation or use exists ones.`);
32
+ }
33
+ const rangeValidator = (timeRangeService) => {
34
+ return (control) => {
35
+ const form = control.value;
36
+ if (!form.fromTime || !form.fromDate || !form.toTime || !form.toDate) {
37
+ return null;
38
+ }
39
+ const fromDateTime = timeRangeService.combineDateAndTime(form.fromDate, form.fromTime);
40
+ const toDateTime = timeRangeService.combineDateAndTime(form.toDate, form.toTime);
41
+ return timeRangeService.dateAdapter.compareDate(fromDateTime, toDateTime) > 0
42
+ ? { fromIsGreaterThanTo: fromDateTime }
43
+ : null;
44
+ };
45
+ };
46
+
47
+ class KbqTimeRangeService {
48
+ static { this.DEFAULT_RANGE_TYPE = 'lastHour'; }
49
+ static { this.timeRangeMap = {
50
+ // minutes
51
+ lastMinute: { minutes: 1 },
52
+ last5Minutes: { minutes: 5 },
53
+ last15Minutes: { minutes: 15 },
54
+ last30Minutes: { minutes: 30 },
55
+ // hours
56
+ lastHour: { hours: 1 },
57
+ last24Hours: { hours: 24 },
58
+ // days
59
+ last3Days: { days: 3 },
60
+ last7Days: { days: 7 },
61
+ last14Days: { days: 14 },
62
+ last30Days: { days: 30 },
63
+ // months
64
+ last3Months: { months: 3 },
65
+ last12Months: { months: 12 },
66
+ allTime: {},
67
+ currentQuarter: {},
68
+ currentYear: {},
69
+ range: {}
70
+ }; }
71
+ static { this.timeRangeTranslationMap = {
72
+ // minutes
73
+ lastMinute: 'minutes',
74
+ last5Minutes: 'minutes',
75
+ last15Minutes: 'minutes',
76
+ last30Minutes: 'minutes',
77
+ // hours
78
+ lastHour: 'hours',
79
+ last24Hours: 'hours',
80
+ // days
81
+ last3Days: 'days',
82
+ last7Days: 'days',
83
+ last14Days: 'days',
84
+ last30Days: 'days',
85
+ // months
86
+ last3Months: 'months',
87
+ last12Months: 'months',
88
+ // other
89
+ allTime: 'other',
90
+ currentYear: 'other',
91
+ currentQuarter: 'other',
92
+ range: 'other'
93
+ }; }
94
+ constructor() {
95
+ this.dateAdapter = inject(DateAdapter);
96
+ this.dateFormatter = inject(DateFormatter);
97
+ this.defaultTimeRangeTypes = [
98
+ 'lastHour',
99
+ 'last24Hours',
100
+ 'last3Days',
101
+ 'last7Days',
102
+ 'last14Days',
103
+ 'currentQuarter',
104
+ 'currentYear',
105
+ 'allTime',
106
+ 'range'
107
+ ];
108
+ this.providedDefaultTimeRangeTypes = inject(KBQ_DEFAULT_TIME_RANGE_TYPES, { optional: true }) || this.defaultTimeRangeTypes;
109
+ this.lastSecondsRange = (seconds) => {
110
+ const date = this.dateAdapter.today();
111
+ return KbqTimeRangeService.range(this.dateAdapter.toIso8601(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) - seconds, 0)));
112
+ };
113
+ this.lastMinutesRange = (minutes) => {
114
+ const date = this.dateAdapter.today();
115
+ return KbqTimeRangeService.range(this.dateAdapter.toIso8601(this.dateAdapter.createDateTime(this.dateAdapter.getYear(date), this.dateAdapter.getMonth(date), this.dateAdapter.getDate(date), this.dateAdapter.getHours(date), this.dateAdapter.getMinutes(date) - minutes, 0, 0)));
116
+ };
117
+ this.lastHoursRange = (hours) => {
118
+ const date = this.dateAdapter.today();
119
+ return KbqTimeRangeService.range(this.dateAdapter.toIso8601(this.dateAdapter.createDateTime(this.dateAdapter.getYear(date), this.dateAdapter.getMonth(date), this.dateAdapter.getDate(date), this.dateAdapter.getHours(date) - hours, this.dateAdapter.getMinutes(date), 0, 0)));
120
+ };
121
+ this.lastDaysRange = (days) => KbqTimeRangeService.range(this.dateAdapter.toIso8601(this.dateAdapter.addCalendarDays(this.dateAdapter.today(), -days)));
122
+ this.lastMonthsRange = (months) => KbqTimeRangeService.range(this.dateAdapter.toIso8601(this.dateAdapter?.addCalendarMonths(this.dateAdapter.today(), -months)));
123
+ if (!this.dateAdapter) {
124
+ throw createMissingDateImplError('KbqTimeRange', 'DateAdapter');
125
+ }
126
+ }
127
+ static { this.range = (dateTimeISOString) => ({
128
+ startDateTime: dateTimeISOString
129
+ }); }
130
+ getTimeRangeTypeUnits(type) {
131
+ return KbqTimeRangeService.timeRangeMap[type];
132
+ }
133
+ getTimeRangeUnitByType(type) {
134
+ return KbqTimeRangeService.timeRangeTranslationMap[type];
135
+ }
136
+ getDefaultRangeValue() {
137
+ const from = this.dateAdapter.addCalendarDays(this.dateAdapter.today(), -1);
138
+ const to = this.dateAdapter.today();
139
+ return {
140
+ fromTime: this.omitMilliseconds(from),
141
+ fromDate: this.omitMilliseconds(from),
142
+ toTime: this.omitMilliseconds(to),
143
+ toDate: this.omitMilliseconds(to)
144
+ };
145
+ }
146
+ getTimeRangeDefaultValue(rangeValue, availableTimeRangeTypes = []) {
147
+ const defaultType = availableTimeRangeTypes[0] ??
148
+ this.providedDefaultTimeRangeTypes[0] ??
149
+ KbqTimeRangeService.DEFAULT_RANGE_TYPE;
150
+ return {
151
+ ...this.calculateTimeRange(defaultType, rangeValue || this.getDefaultRangeValue()),
152
+ type: defaultType
153
+ };
154
+ }
155
+ calculateTimeRange(type, rangeValue) {
156
+ if (!type) {
157
+ return {
158
+ startDateTime: undefined,
159
+ endDateTime: undefined
160
+ };
161
+ }
162
+ if (type === 'range') {
163
+ const checkedRangeValue = rangeValue || this.getDefaultRangeValue();
164
+ return {
165
+ startDateTime: checkedRangeValue.fromDate && checkedRangeValue.fromTime
166
+ ? this.dateAdapter.toIso8601(this.combineDateAndTime(checkedRangeValue.fromDate, checkedRangeValue.fromTime))
167
+ : '',
168
+ endDateTime: checkedRangeValue.toDate && checkedRangeValue.toTime
169
+ ? this.dateAdapter.toIso8601(this.combineDateAndTime(checkedRangeValue.toDate, checkedRangeValue.toTime))
170
+ : ''
171
+ };
172
+ }
173
+ switch (this.getTimeRangeUnitByType(type)) {
174
+ case 'seconds': {
175
+ return this.lastSecondsRange(this.getTimeRangeTypeUnits(type).seconds);
176
+ }
177
+ case 'minutes': {
178
+ return this.lastMinutesRange(this.getTimeRangeTypeUnits(type).minutes);
179
+ }
180
+ case 'hours': {
181
+ return this.lastHoursRange(this.getTimeRangeTypeUnits(type).hours);
182
+ }
183
+ case 'days': {
184
+ return this.lastDaysRange(this.getTimeRangeTypeUnits(type).days);
185
+ }
186
+ // @TODO: implement weeks range after date adapter update (#DS-4226)
187
+ case 'months': {
188
+ return this.lastMonthsRange(this.getTimeRangeTypeUnits(type).months);
189
+ }
190
+ case 'other':
191
+ default: {
192
+ switch (type) {
193
+ case 'currentQuarter':
194
+ return KbqTimeRangeService.range(this.dateAdapter.toIso8601(this.dateAdapter.startOf(this.dateAdapter.today(), 'quarter')));
195
+ case 'currentYear':
196
+ return KbqTimeRangeService.range(this.dateAdapter.toIso8601(this.dateAdapter.startOf(this.dateAdapter.today(), 'year')));
197
+ case 'allTime':
198
+ default:
199
+ return {
200
+ startDateTime: undefined,
201
+ endDateTime: undefined
202
+ };
203
+ }
204
+ }
205
+ }
206
+ }
207
+ combineDateAndTime(date, time) {
208
+ 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));
209
+ }
210
+ checkAndCorrectTimeRangeValue(value, availableTimeRangeTypes, rangeValue) {
211
+ let result = value && (!availableTimeRangeTypes.length || availableTimeRangeTypes.includes(value.type))
212
+ ? value
213
+ : this.getTimeRangeDefaultValue(rangeValue, availableTimeRangeTypes);
214
+ if (!result.startDateTime || (result.type === 'range' && (!result.startDateTime || !result.endDateTime))) {
215
+ result = {
216
+ ...this.calculateTimeRange(result.type, rangeValue),
217
+ type: result.type
218
+ };
219
+ }
220
+ return result;
221
+ }
222
+ omitMilliseconds(date) {
223
+ 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);
224
+ }
225
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
226
+ /** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeService }); }
227
+ }
228
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeService, decorators: [{
229
+ type: Injectable
230
+ }], ctorParameters: () => [] });
231
+
232
+ class RangeErrorStateMatcher {
233
+ isErrorState(control, form) {
234
+ return !!form?.invalid || !!control?.invalid;
235
+ }
236
+ }
237
+ /** @docs-private */
238
+ class KbqTimeRangeEditor {
239
+ constructor() {
240
+ this.timeRangeService = inject(KbqTimeRangeService);
241
+ /** The maximum selectable date. */
242
+ this.maxDate = input(null);
243
+ /** The minimum selectable date. */
244
+ this.minDate = input(null);
245
+ /** Preset of selectable ranges */
246
+ this.availableTimeRangeTypes = input(this.timeRangeService.providedDefaultTimeRangeTypes);
247
+ /** Provided value of selected range */
248
+ this.rangeValue = input(this.timeRangeService.getDefaultRangeValue());
249
+ this.showRangeAsDefault = input.required();
250
+ this.localeConfiguration = input.required();
251
+ /** @docs-private */
252
+ this.isRangeVisible = computed(() => this.showRangeAsDefault() || this.availableTimeRangeTypes().includes('range'));
253
+ /** @docs-private */
254
+ this.timeRangeTypesWithoutRange = computed(() => {
255
+ const localeConfig = this.localeConfiguration();
256
+ return this.availableTimeRangeTypes()
257
+ .filter((type) => type !== 'range')
258
+ .map((type) => ({
259
+ type,
260
+ translationType: this.timeRangeService.getTimeRangeUnitByType(type),
261
+ formattedValue: this.getFormattedOption(type, localeConfig)
262
+ }));
263
+ });
264
+ /** @docs-private */
265
+ this.timepickerList = viewChildren(KbqTimepicker);
266
+ /** @docs-private */
267
+ this.timepickerFormat = TimeFormats.HHmmss;
268
+ /** @docs-private */
269
+ this.rangeStateMatcher = new RangeErrorStateMatcher();
270
+ this.lastValidationErrorOnEmit = null;
271
+ /** @docs-private */
272
+ this.onChange = (_value) => { };
273
+ /** @docs-private */
274
+ this.onTouch = () => { };
275
+ const defaultRangeValue = this.rangeValue();
276
+ this.form = new FormGroup({
277
+ type: new FormControl(KbqTimeRangeService.DEFAULT_RANGE_TYPE, { nonNullable: true }),
278
+ fromTime: new FormControl(defaultRangeValue.fromTime, { nonNullable: true }),
279
+ fromDate: new FormControl(defaultRangeValue.fromDate, { nonNullable: true }),
280
+ toTime: new FormControl(defaultRangeValue.toTime, { nonNullable: true }),
281
+ toDate: new FormControl(defaultRangeValue.toDate, { nonNullable: true })
282
+ }, { validators: rangeValidator(this.timeRangeService) });
283
+ const rangeControls = [
284
+ this.form.controls.fromTime,
285
+ this.form.controls.fromDate,
286
+ this.form.controls.toTime,
287
+ this.form.controls.toDate
288
+ ];
289
+ merge(...rangeControls.map((control) => control.statusChanges))
290
+ .pipe(takeUntilDestroyed())
291
+ .subscribe(() => (this.lastValidationErrorOnEmit = this.concatControlValidationErrors()));
292
+ this.form.valueChanges
293
+ .pipe(map((formValue) => formValue.type), distinctUntilChanged(), takeUntilDestroyed())
294
+ .subscribe((type) => {
295
+ const isDisabled = type !== 'range';
296
+ rangeControls.forEach((control) => {
297
+ if (isDisabled) {
298
+ control.disable({ emitEvent: false });
299
+ }
300
+ else {
301
+ control.enable({ emitEvent: false });
302
+ }
303
+ });
304
+ });
305
+ this.form.valueChanges.pipe(takeUntilDestroyed()).subscribe((formValue) => {
306
+ const range = this.mapTimeRange(formValue);
307
+ if (range)
308
+ this.onChange(range);
309
+ });
310
+ this.form.statusChanges.pipe(takeUntilDestroyed()).subscribe((status) => {
311
+ const timepickerList = this.timepickerList();
312
+ if (timepickerList.at(0)) {
313
+ timepickerList.at(0).errorState = status === 'INVALID';
314
+ }
315
+ });
316
+ }
317
+ ngOnInit() {
318
+ const defaultRangeValue = this.rangeValue();
319
+ const availableTimeRangeTypes = this.availableTimeRangeTypes();
320
+ this.form.setValue({
321
+ type: (availableTimeRangeTypes.length && availableTimeRangeTypes[0]) || 'range',
322
+ fromTime: defaultRangeValue.fromTime,
323
+ fromDate: defaultRangeValue.fromDate,
324
+ toTime: defaultRangeValue.toTime,
325
+ toDate: defaultRangeValue.toDate
326
+ });
327
+ }
328
+ /** @docs-private */
329
+ validate() {
330
+ return this.form.errors || this.lastValidationErrorOnEmit;
331
+ }
332
+ /** Implemented as part of ControlValueAccessor */
333
+ writeValue(value) {
334
+ if (!value)
335
+ return;
336
+ const corrected = this.timeRangeService.checkAndCorrectTimeRangeValue(value, this.availableTimeRangeTypes(), this.form.value);
337
+ this.form.controls.type.setValue(corrected.type);
338
+ if (corrected.type === 'range' && corrected.startDateTime && corrected.endDateTime) {
339
+ const from = this.timeRangeService.dateAdapter.deserialize(corrected.startDateTime);
340
+ const to = this.timeRangeService.dateAdapter.deserialize(corrected.endDateTime);
341
+ this.form.patchValue({
342
+ fromTime: from,
343
+ fromDate: from,
344
+ toTime: to,
345
+ toDate: to
346
+ });
347
+ }
348
+ }
349
+ /** Implemented as part of ControlValueAccessor */
350
+ registerOnChange(fn) {
351
+ this.onChange = fn;
352
+ }
353
+ /** Implemented as part of ControlValueAccessor */
354
+ registerOnTouched(fn) {
355
+ this.onTouch = fn;
356
+ }
357
+ mapTimeRange({ type }) {
358
+ if (!type)
359
+ return undefined;
360
+ return {
361
+ type,
362
+ ...this.timeRangeService.calculateTimeRange(type, {
363
+ // use control.value, since via form.value control values can be undefined
364
+ fromTime: this.form.controls.fromTime.value,
365
+ fromDate: this.form.controls.fromDate.value,
366
+ toDate: this.form.controls.toTime.value,
367
+ toTime: this.form.controls.toTime.value
368
+ })
369
+ };
370
+ }
371
+ getFormattedOption(type, localeConfig) {
372
+ const translationType = this.timeRangeService.getTimeRangeUnitByType(type);
373
+ if (translationType === 'other')
374
+ return '';
375
+ const range = this.timeRangeService.calculateTimeRange(type);
376
+ return this.timeRangeService.dateFormatter.duration(this.timeRangeService.dateAdapter.deserialize(range.startDateTime), this.timeRangeService.dateAdapter.today(), [translationType], false, localeConfig.durationTemplate.option);
377
+ }
378
+ concatControlValidationErrors() {
379
+ let result = this.form.errors;
380
+ Object.values(this.form.controls).forEach((control) => {
381
+ if (control.errors) {
382
+ result = {
383
+ ...result,
384
+ ...control.errors
385
+ };
386
+ }
387
+ });
388
+ return result;
389
+ }
390
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeEditor, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
391
+ /** @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 } }, host: { classAttribute: "kbq-time-range__editor" }, providers: [
392
+ {
393
+ multi: true,
394
+ provide: NG_VALUE_ACCESSOR,
395
+ useExisting: KbqTimeRangeEditor
396
+ },
397
+ {
398
+ multi: true,
399
+ provide: NG_VALIDATORS,
400
+ useExisting: KbqTimeRangeEditor
401
+ }
402
+ ], 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 *ngTemplateOutlet=\"optionTemplate; context: { $implicit: type }\" />\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 #optionTemplate 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: "ngmodule", type: KbqFormFieldModule }, { 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: 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 }); }
403
+ }
404
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeEditor, decorators: [{
405
+ type: Component,
406
+ args: [{ selector: 'kbq-time-range-editor', standalone: true, imports: [
407
+ NgTemplateOutlet,
408
+ ReactiveFormsModule,
409
+ KbqFieldset,
410
+ KbqFieldsetItem,
411
+ KbqDatepickerModule,
412
+ KbqFormFieldModule,
413
+ KbqTimepickerModule,
414
+ KbqRadioModule,
415
+ KbqIcon
416
+ ], host: {
417
+ class: 'kbq-time-range__editor'
418
+ }, providers: [
419
+ {
420
+ multi: true,
421
+ provide: NG_VALUE_ACCESSOR,
422
+ useExisting: KbqTimeRangeEditor
423
+ },
424
+ {
425
+ multi: true,
426
+ provide: NG_VALIDATORS,
427
+ useExisting: KbqTimeRangeEditor
428
+ }
429
+ ], 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 *ngTemplateOutlet=\"optionTemplate; context: { $implicit: type }\" />\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 #optionTemplate 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" }]
430
+ }], ctorParameters: () => [] });
431
+
432
+ /** @docs-private */
433
+ class KbqTimeRangeTitle {
434
+ constructor() {
435
+ this.timeRangeService = inject(KbqTimeRangeService);
436
+ this.popover = inject(KbqPopoverTrigger, { host: true });
437
+ this.injector = inject(Injector);
438
+ this.timeRange = input.required();
439
+ this.localeConfiguration = input.required();
440
+ this.titleTemplate = input();
441
+ this.context = computed(() => {
442
+ const timeRange = this.timeRange();
443
+ if (!timeRange)
444
+ return undefined;
445
+ return {
446
+ ...timeRange,
447
+ ...this.timeRangeService.getTimeRangeTypeUnits(timeRange.type)
448
+ };
449
+ });
450
+ this.titleContext = computed(() => {
451
+ const context = this.context();
452
+ const formattedDate = this.formattedDate();
453
+ let customizableTitleContext = { formattedDate, popover: this.popover };
454
+ if (context) {
455
+ customizableTitleContext = { ...context, ...customizableTitleContext };
456
+ }
457
+ return {
458
+ $implicit: customizableTitleContext,
459
+ ...customizableTitleContext
460
+ };
461
+ });
462
+ this.formattedDate = computed(() => {
463
+ const context = this.context();
464
+ const localeConfiguration = this.localeConfiguration();
465
+ if (!context) {
466
+ return localeConfiguration.title.placeholder;
467
+ }
468
+ const timeRangeUnit = this.timeRangeService.getTimeRangeUnitByType(context.type);
469
+ if (timeRangeUnit === 'other') {
470
+ switch (context.type) {
471
+ case 'range': {
472
+ return (localeConfiguration.title.for +
473
+ ' ' +
474
+ this.timeRangeService.dateFormatter.rangeLongDate(this.timeRangeService.dateAdapter.deserialize(context.startDateTime ?? ''), this.timeRangeService.dateAdapter.deserialize(context.endDateTime ?? '')));
475
+ }
476
+ case 'allTime': {
477
+ return localeConfiguration.editor.allTime;
478
+ }
479
+ case 'currentQuarter': {
480
+ return localeConfiguration.editor.currentQuarter;
481
+ }
482
+ case 'currentYear': {
483
+ return localeConfiguration.editor.currentYear;
484
+ }
485
+ default: {
486
+ return '';
487
+ }
488
+ }
489
+ }
490
+ if (!context.startDateTime)
491
+ return '';
492
+ return (localeConfiguration.title.for +
493
+ ' ' +
494
+ this.timeRangeService.dateFormatter.duration(this.timeRangeService.dateAdapter.deserialize(context.startDateTime), this.timeRangeService.dateAdapter.today(), [timeRangeUnit], false, localeConfiguration.durationTemplate.title));
495
+ });
496
+ }
497
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeTitle, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
498
+ /** @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: `
499
+ @if (titleTemplate()) {
500
+ <ng-container *ngTemplateOutlet="titleTemplate()!; context: titleContext() ?? null; injector: injector" />
501
+ } @else {
502
+ <a kbq-link pseudo>
503
+ <span class="kbq-link__text">{{ formattedDate() }}</span>
504
+
505
+ <i kbq-icon="kbq-calendar-o_16"></i>
506
+ </a>
507
+ }
508
+ `, 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 }); }
509
+ }
510
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeTitle, decorators: [{
511
+ type: Component,
512
+ args: [{
513
+ standalone: true,
514
+ selector: 'kbq-time-range-title',
515
+ imports: [
516
+ NgTemplateOutlet,
517
+ KbqLinkModule,
518
+ KbqIconModule
519
+ ],
520
+ template: `
521
+ @if (titleTemplate()) {
522
+ <ng-container *ngTemplateOutlet="titleTemplate()!; context: titleContext() ?? null; injector: injector" />
523
+ } @else {
524
+ <a kbq-link pseudo>
525
+ <span class="kbq-link__text">{{ formattedDate() }}</span>
526
+
527
+ <i kbq-icon="kbq-calendar-o_16"></i>
528
+ </a>
529
+ }
530
+ `,
531
+ changeDetection: ChangeDetectionStrategy.OnPush
532
+ }]
533
+ }] });
534
+
535
+ /** Localization configuration provider. */
536
+ const KBQ_TIME_RANGE_LOCALE_CONFIGURATION = new InjectionToken('KBQ_TIME_RANGE_LOCALE_CONFIGURATION', { factory: () => ruRULocaleData.timeRange });
537
+ /** Utility provider for `KBQ_TIME_RANGE_LOCALE_CONFIGURATION`. */
538
+ const kbqTimeRangeLocaleConfigurationProvider = (configuration) => ({
539
+ provide: KBQ_TIME_RANGE_LOCALE_CONFIGURATION,
540
+ useValue: configuration
541
+ });
542
+ class KbqTimeRange {
543
+ constructor() {
544
+ this.timeRangeService = inject(KbqTimeRangeService);
545
+ this.localeService = inject(KBQ_LOCALE_SERVICE, { optional: true });
546
+ this.ngControl = inject(NgControl, { optional: true, self: true });
547
+ /** The minimum selectable date. */
548
+ this.minDate = input();
549
+ /** The maximum selectable date. */
550
+ this.maxDate = input();
551
+ /** provided value of selected range */
552
+ this.defaultRangeValue = input();
553
+ /** Preset of selectable ranges */
554
+ this.availableTimeRangeTypes = input(this.timeRangeService.providedDefaultTimeRangeTypes);
555
+ /** Customizable trigger output */
556
+ this.titleTemplate = input();
557
+ /** Whether to show popover with arrow */
558
+ this.arrow = input(true, { transform: booleanAttribute });
559
+ /**
560
+ * Whether to show range in popover if not provided
561
+ * @see availableTimeRangeTypes
562
+ */
563
+ this.showRangeAsDefault = input(true);
564
+ /** Whether component should fallback to default value if null provided */
565
+ this.nonNullable = input(true, { transform: booleanAttribute });
566
+ /** Emit value update if provided value via formControl wasn't valid */
567
+ this.valueCorrected = output();
568
+ /**
569
+ * Used to calculate time range.
570
+ * @docs-private */
571
+ this.normalizedDefaultRangeValue = computed(() => ({
572
+ ...this.timeRangeService.getDefaultRangeValue(),
573
+ ...this.defaultRangeValue()
574
+ }));
575
+ /** @docs-private */
576
+ this.popoverSize = PopUpSizes.Medium;
577
+ /** @docs-private */
578
+ this.popupPlacement = PopUpPlacements.BottomLeft;
579
+ /** @docs-private */
580
+ this.localeConfiguration = signal(inject(KBQ_TIME_RANGE_LOCALE_CONFIGURATION));
581
+ /** @docs-private */
582
+ this.onChange = (_value) => { };
583
+ /** @docs-private */
584
+ this.onTouch = () => { };
585
+ this.handleAvailableTypesChange = (types) => {
586
+ if (types.includes(this.rangeEditorControl.value.type) || this.rangeEditorControl.value.type === 'range') {
587
+ return;
588
+ }
589
+ const timeRangeDefaultValue = this.timeRangeService.getTimeRangeDefaultValue(this.normalizedDefaultRangeValue(), types.length ? types : ['range']);
590
+ this.titleValue.set(timeRangeDefaultValue);
591
+ this.rangeEditorControl.setValue(timeRangeDefaultValue);
592
+ this.onChange(timeRangeDefaultValue);
593
+ };
594
+ if (this.ngControl) {
595
+ this.ngControl.valueAccessor = this;
596
+ }
597
+ const defaultValue = this.timeRangeService.getTimeRangeDefaultValue(this.normalizedDefaultRangeValue(), this.availableTimeRangeTypes());
598
+ this.titleValue = signal(this.nonNullable() ? defaultValue : null);
599
+ this.rangeEditorControl = new FormControl(defaultValue, { nonNullable: true });
600
+ this.localeService?.changes.pipe(takeUntilDestroyed()).subscribe(() => {
601
+ this.localeConfiguration.set(this.localeService?.getParams('timeRange') ?? ruRULocaleData.timeRange);
602
+ });
603
+ toObservable(this.availableTimeRangeTypes)
604
+ .pipe(takeUntilDestroyed())
605
+ .subscribe(this.handleAvailableTypesChange);
606
+ }
607
+ ngOnInit() {
608
+ // call again on init, so input signals values will be correct
609
+ this.writeValue(this.ngControl?.value ?? null);
610
+ }
611
+ /** Implemented as part of ControlValueAccessor */
612
+ writeValue(value) {
613
+ const nonNullable = this.nonNullable();
614
+ const availableTimeRangeTypes = this.availableTimeRangeTypes();
615
+ const corrected = this.timeRangeService.checkAndCorrectTimeRangeValue(value, availableTimeRangeTypes, this.normalizedDefaultRangeValue());
616
+ if ((value && value.type && !('startDateTime' in value && availableTimeRangeTypes.includes(value.type))) ||
617
+ (nonNullable && value === null)) {
618
+ this.valueCorrected.emit(corrected);
619
+ }
620
+ this.titleValue.set(nonNullable || value !== null ? corrected : null);
621
+ this.rangeEditorControl.setValue(corrected);
622
+ }
623
+ /** @docs-private */
624
+ onApply(popover) {
625
+ this.titleValue.set(this.rangeEditorControl.value);
626
+ this.onChange(this.rangeEditorControl.value);
627
+ popover.hide();
628
+ }
629
+ /** @docs-private */
630
+ onCancel(popover) {
631
+ popover.hide();
632
+ }
633
+ onVisibleChange(isVisible) {
634
+ const titleValue = this.titleValue();
635
+ if (!isVisible && titleValue) {
636
+ this.rangeEditorControl.setValue(titleValue);
637
+ }
638
+ }
639
+ /** Implemented as part of ControlValueAccessor */
640
+ registerOnChange(fn) {
641
+ this.onChange = fn;
642
+ }
643
+ /** Implemented as part of ControlValueAccessor */
644
+ registerOnTouched(fn) {
645
+ this.onTouch = fn;
646
+ }
647
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRange, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
648
+ /** @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 }, 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: `
649
+ @let localeConfig = localeConfiguration();
650
+ <kbq-time-range-title
651
+ #popover="kbqPopover"
652
+ class="kbq-time-range__trigger"
653
+ kbqPopover
654
+ kbqPopoverClass="kbq-time-range__popover"
655
+ [kbqPopoverSize]="popoverSize"
656
+ [kbqPopoverContent]="timeRangePopoverContent"
657
+ [kbqPopoverFooter]="timeRangePopoverFooter"
658
+ [kbqPopoverPlacement]="popupPlacement"
659
+ [kbqPopoverArrow]="arrow()"
660
+ [titleTemplate]="titleTemplate()"
661
+ [timeRange]="titleValue()"
662
+ [localeConfiguration]="localeConfig"
663
+ (kbqPopoverVisibleChange)="onVisibleChange($event)"
664
+ />
665
+
666
+ <ng-template #timeRangePopoverContent>
667
+ <kbq-time-range-editor
668
+ [maxDate]="maxDate()"
669
+ [minDate]="minDate()"
670
+ [formControl]="rangeEditorControl"
671
+ [localeConfiguration]="localeConfig"
672
+ [showRangeAsDefault]="showRangeAsDefault()"
673
+ [rangeValue]="normalizedDefaultRangeValue()"
674
+ [availableTimeRangeTypes]="availableTimeRangeTypes()"
675
+ />
676
+ </ng-template>
677
+
678
+ <ng-template #timeRangePopoverFooter>
679
+ <div class="kbq-time-range__buttons" role="group">
680
+ <button
681
+ kbq-button
682
+ [color]="'contrast'"
683
+ [disabled]="rangeEditorControl.invalid"
684
+ (click)="onApply(popover)"
685
+ >
686
+ {{ localeConfig.editor.apply }}
687
+ </button>
688
+
689
+ <button kbq-button (click)="onCancel(popover)">{{ localeConfig.editor.cancel }}</button>
690
+ </div>
691
+ </ng-template>
692
+ `, 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", "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"] }, { kind: "component", type: KbqTimeRangeTitle, selector: "kbq-time-range-title", inputs: ["timeRange", "localeConfiguration", "titleTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
693
+ }
694
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRange, decorators: [{
695
+ type: Component,
696
+ args: [{ standalone: true, selector: 'kbq-time-range', template: `
697
+ @let localeConfig = localeConfiguration();
698
+ <kbq-time-range-title
699
+ #popover="kbqPopover"
700
+ class="kbq-time-range__trigger"
701
+ kbqPopover
702
+ kbqPopoverClass="kbq-time-range__popover"
703
+ [kbqPopoverSize]="popoverSize"
704
+ [kbqPopoverContent]="timeRangePopoverContent"
705
+ [kbqPopoverFooter]="timeRangePopoverFooter"
706
+ [kbqPopoverPlacement]="popupPlacement"
707
+ [kbqPopoverArrow]="arrow()"
708
+ [titleTemplate]="titleTemplate()"
709
+ [timeRange]="titleValue()"
710
+ [localeConfiguration]="localeConfig"
711
+ (kbqPopoverVisibleChange)="onVisibleChange($event)"
712
+ />
713
+
714
+ <ng-template #timeRangePopoverContent>
715
+ <kbq-time-range-editor
716
+ [maxDate]="maxDate()"
717
+ [minDate]="minDate()"
718
+ [formControl]="rangeEditorControl"
719
+ [localeConfiguration]="localeConfig"
720
+ [showRangeAsDefault]="showRangeAsDefault()"
721
+ [rangeValue]="normalizedDefaultRangeValue()"
722
+ [availableTimeRangeTypes]="availableTimeRangeTypes()"
723
+ />
724
+ </ng-template>
725
+
726
+ <ng-template #timeRangePopoverFooter>
727
+ <div class="kbq-time-range__buttons" role="group">
728
+ <button
729
+ kbq-button
730
+ [color]="'contrast'"
731
+ [disabled]="rangeEditorControl.invalid"
732
+ (click)="onApply(popover)"
733
+ >
734
+ {{ localeConfig.editor.apply }}
735
+ </button>
736
+
737
+ <button kbq-button (click)="onCancel(popover)">{{ localeConfig.editor.cancel }}</button>
738
+ </div>
739
+ </ng-template>
740
+ `, imports: [
741
+ ReactiveFormsModule,
742
+ KbqPopoverModule,
743
+ KbqButtonModule,
744
+ KbqTimeRangeEditor,
745
+ KbqTimeRangeTitle
746
+ ], host: {
747
+ class: 'kbq-time-range'
748
+ }, 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"] }]
749
+ }], ctorParameters: () => [] });
750
+
751
+ /** Directive for easy using styles of time-range placeholder publicly. */
752
+ class KbqTimeRangeTitlePlaceholder {
753
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeTitlePlaceholder, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
754
+ /** @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 }); }
755
+ }
756
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeTitlePlaceholder, decorators: [{
757
+ type: Directive,
758
+ args: [{
759
+ standalone: true,
760
+ selector: '[kbqTimeRangeTitlePlaceholder]',
761
+ host: {
762
+ class: 'kbq-time-range-title__placeholder'
763
+ }
764
+ }]
765
+ }] });
766
+ /** Component simulates `KbqFormFieldControl` allowing to provide custom content inside `KbqFormField` */
767
+ class KbqTimeRangeTitleAsControl {
768
+ constructor() {
769
+ this.timeRange = inject(KbqTimeRange);
770
+ this.controlType = 'select';
771
+ /** @docs-private */
772
+ this.stateChanges = new Subject();
773
+ /** @docs-private */
774
+ this.ngControl = this.timeRange.ngControl;
775
+ }
776
+ /** @docs-private */
777
+ onContainerClick(_event) { }
778
+ /** @docs-private */
779
+ focus(_options) { }
780
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeTitleAsControl, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
781
+ /** @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: [
782
+ {
783
+ provide: KbqFormFieldControl,
784
+ useExisting: KbqTimeRangeTitleAsControl
785
+ }
786
+ ], ngImport: i0, template: `
787
+ <ng-content />
788
+ `, isInline: true, styles: [":host{display:flex;align-items:center}:host:focus-visible{outline:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
789
+ }
790
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeTitleAsControl, decorators: [{
791
+ type: Component,
792
+ args: [{ standalone: true, selector: 'kbq-time-range-title-as-control', template: `
793
+ <ng-content />
794
+ `, providers: [
795
+ {
796
+ provide: KbqFormFieldControl,
797
+ useExisting: KbqTimeRangeTitleAsControl
798
+ }
799
+ ], host: {
800
+ '[attr.tabindex]': '0',
801
+ class: 'kbq-time-range-title-as-form-field'
802
+ }, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:flex;align-items:center}:host:focus-visible{outline:none}\n"] }]
803
+ }] });
804
+
805
+ const COMPONENTS = [
806
+ KbqTimeRange,
807
+ KbqTimeRangeTitle,
808
+ KbqTimeRangeEditor,
809
+ KbqTimeRangeTitlePlaceholder,
810
+ KbqTimeRangeTitleAsControl
811
+ ];
812
+ class KbqTimeRangeModule {
813
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
814
+ /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeModule, imports: [KbqTimeRange,
815
+ KbqTimeRangeTitle,
816
+ KbqTimeRangeEditor,
817
+ KbqTimeRangeTitlePlaceholder,
818
+ KbqTimeRangeTitleAsControl], exports: [KbqTimeRange,
819
+ KbqTimeRangeTitle,
820
+ KbqTimeRangeEditor,
821
+ KbqTimeRangeTitlePlaceholder,
822
+ KbqTimeRangeTitleAsControl] }); }
823
+ /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeModule, imports: [KbqTimeRange,
824
+ KbqTimeRangeTitle,
825
+ KbqTimeRangeEditor] }); }
826
+ }
827
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: KbqTimeRangeModule, decorators: [{
828
+ type: NgModule,
829
+ args: [{
830
+ imports: COMPONENTS,
831
+ exports: COMPONENTS
832
+ }]
833
+ }] });
834
+
835
+ /**
836
+ * Generated bundle index. Do not edit.
837
+ */
838
+
839
+ export { KBQ_DEFAULT_TIME_RANGE_TYPES, KBQ_TIME_RANGE_LOCALE_CONFIGURATION, KbqTimeRange, KbqTimeRangeEditor, KbqTimeRangeModule, KbqTimeRangeTitle, KbqTimeRangeTitleAsControl, KbqTimeRangeTitlePlaceholder, createMissingDateImplError, kbqTimeRangeLocaleConfigurationProvider, rangeValidator };
840
+ //# sourceMappingURL=koobiq-components-time-range.mjs.map