ngx-bootstrap 10.3.0 → 11.0.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 (616) hide show
  1. package/README.md +3 -5
  2. package/accordion/accordion-group.component.d.ts +1 -1
  3. package/accordion/accordion.component.d.ts +1 -1
  4. package/accordion/esm2022/accordion-group.component.mjs +84 -0
  5. package/accordion/{esm2020 → esm2022}/accordion.component.mjs +4 -4
  6. package/accordion/{esm2020 → esm2022}/accordion.config.mjs +4 -4
  7. package/accordion/{esm2020 → esm2022}/accordion.module.mjs +5 -5
  8. package/accordion/{fesm2020 → fesm2022}/ngx-bootstrap-accordion.mjs +29 -29
  9. package/accordion/fesm2022/ngx-bootstrap-accordion.mjs.map +1 -0
  10. package/accordion/package.json +8 -14
  11. package/alert/alert.component.d.ts +1 -1
  12. package/alert/esm2022/alert.component.mjs +77 -0
  13. package/alert/{esm2020 → esm2022}/alert.config.mjs +4 -4
  14. package/alert/{esm2020 → esm2022}/alert.module.mjs +5 -5
  15. package/alert/{fesm2015 → fesm2022}/ngx-bootstrap-alert.mjs +10 -10
  16. package/alert/fesm2022/ngx-bootstrap-alert.mjs.map +1 -0
  17. package/alert/package.json +8 -14
  18. package/buttons/button-checkbox.directive.d.ts +2 -2
  19. package/buttons/button-radio.directive.d.ts +1 -1
  20. package/buttons/{esm2020 → esm2022}/button-checkbox.directive.mjs +4 -4
  21. package/buttons/{esm2020 → esm2022}/button-radio-group.directive.mjs +4 -4
  22. package/buttons/esm2022/button-radio.directive.mjs +188 -0
  23. package/buttons/{esm2020 → esm2022}/buttons.module.mjs +5 -5
  24. package/buttons/{fesm2020 → fesm2022}/ngx-bootstrap-buttons.mjs +26 -26
  25. package/buttons/fesm2022/ngx-bootstrap-buttons.mjs.map +1 -0
  26. package/buttons/package.json +7 -13
  27. package/carousel/carousel.component.d.ts +1 -1
  28. package/carousel/esm2022/carousel.component.mjs +713 -0
  29. package/carousel/{esm2020 → esm2022}/carousel.config.mjs +4 -4
  30. package/carousel/{esm2020 → esm2022}/carousel.module.mjs +5 -5
  31. package/carousel/{esm2020 → esm2022}/slide.component.mjs +6 -6
  32. package/carousel/{fesm2020 → fesm2022}/ngx-bootstrap-carousel.mjs +65 -56
  33. package/carousel/fesm2022/ngx-bootstrap-carousel.mjs.map +1 -0
  34. package/carousel/package.json +8 -14
  35. package/carousel/slide.component.d.ts +1 -1
  36. package/chronos/duration/create.d.ts +1 -1
  37. package/chronos/{fesm2020 → fesm2022}/ngx-bootstrap-chronos.mjs +4 -0
  38. package/chronos/fesm2022/ngx-bootstrap-chronos.mjs.map +1 -0
  39. package/chronos/locale/locale.class.d.ts +3 -3
  40. package/chronos/moment/calendar.d.ts +1 -1
  41. package/chronos/package.json +5 -11
  42. package/chronos/parse/regex.d.ts +1 -1
  43. package/chronos/testing/chain.d.ts +3 -3
  44. package/chronos/types.d.ts +4 -4
  45. package/chronos/units/aliases.d.ts +1 -1
  46. package/collapse/collapse.directive.d.ts +1 -1
  47. package/collapse/esm2022/collapse.directive.mjs +168 -0
  48. package/collapse/{esm2020 → esm2022}/collapse.module.mjs +5 -5
  49. package/collapse/{fesm2020 → fesm2022}/ngx-bootstrap-collapse.mjs +26 -26
  50. package/collapse/fesm2022/ngx-bootstrap-collapse.mjs.map +1 -0
  51. package/collapse/package.json +8 -14
  52. package/component-loader/{esm2020 → esm2022}/component-loader.factory.mjs +4 -4
  53. package/component-loader/{fesm2020 → fesm2022}/ngx-bootstrap-component-loader.mjs +5 -3
  54. package/component-loader/fesm2022/ngx-bootstrap-component-loader.mjs.map +1 -0
  55. package/component-loader/listen-options.model.d.ts +1 -1
  56. package/component-loader/package.json +7 -13
  57. package/datepicker/bs-datepicker-inline.component.d.ts +1 -1
  58. package/datepicker/bs-datepicker.component.d.ts +1 -1
  59. package/datepicker/bs-daterangepicker-inline.component.d.ts +1 -1
  60. package/datepicker/bs-daterangepicker.component.d.ts +1 -1
  61. package/datepicker/{esm2020 → esm2022}/bs-datepicker-inline.component.mjs +4 -4
  62. package/datepicker/{esm2020 → esm2022}/bs-datepicker-inline.config.mjs +4 -4
  63. package/datepicker/{esm2020 → esm2022}/bs-datepicker-input.directive.mjs +4 -4
  64. package/datepicker/esm2022/bs-datepicker.component.mjs +303 -0
  65. package/datepicker/{esm2020 → esm2022}/bs-datepicker.config.mjs +4 -4
  66. package/datepicker/{esm2020 → esm2022}/bs-datepicker.module.mjs +32 -32
  67. package/datepicker/esm2022/bs-daterangepicker-inline.component.mjs +163 -0
  68. package/datepicker/{esm2020 → esm2022}/bs-daterangepicker-inline.config.mjs +4 -4
  69. package/datepicker/{esm2020 → esm2022}/bs-daterangepicker-input.directive.mjs +4 -4
  70. package/datepicker/esm2022/bs-daterangepicker.component.mjs +296 -0
  71. package/datepicker/{esm2020 → esm2022}/bs-daterangepicker.config.mjs +4 -4
  72. package/datepicker/{esm2020 → esm2022}/bs-locale.service.mjs +4 -4
  73. package/datepicker/esm2022/reducer/bs-datepicker.actions.mjs +143 -0
  74. package/datepicker/{esm2020 → esm2022}/reducer/bs-datepicker.effects.mjs +4 -4
  75. package/datepicker/{esm2020 → esm2022}/reducer/bs-datepicker.store.mjs +4 -4
  76. package/datepicker/{esm2020 → esm2022}/themes/bs/bs-calendar-layout.component.mjs +6 -6
  77. package/datepicker/{esm2020 → esm2022}/themes/bs/bs-current-date-view.component.mjs +4 -4
  78. package/datepicker/{esm2020 → esm2022}/themes/bs/bs-custom-dates-view.component.mjs +6 -6
  79. package/datepicker/esm2022/themes/bs/bs-datepicker-container.component.mjs +192 -0
  80. package/datepicker/{esm2020 → esm2022}/themes/bs/bs-datepicker-day-decorator.directive.mjs +4 -4
  81. package/datepicker/{esm2020 → esm2022}/themes/bs/bs-datepicker-inline-container.component.mjs +9 -9
  82. package/datepicker/{esm2020 → esm2022}/themes/bs/bs-datepicker-navigation-view.component.mjs +6 -6
  83. package/datepicker/esm2022/themes/bs/bs-daterangepicker-container.component.mjs +261 -0
  84. package/datepicker/{esm2020 → esm2022}/themes/bs/bs-daterangepicker-inline-container.component.mjs +9 -9
  85. package/datepicker/{esm2020 → esm2022}/themes/bs/bs-days-calendar-view.component.mjs +6 -6
  86. package/datepicker/{esm2020 → esm2022}/themes/bs/bs-months-calendar-view.component.mjs +6 -6
  87. package/datepicker/{esm2020 → esm2022}/themes/bs/bs-timepicker-view.component.mjs +6 -6
  88. package/datepicker/{esm2020 → esm2022}/themes/bs/bs-years-calendar-view.component.mjs +6 -6
  89. package/datepicker/{fesm2020 → fesm2022}/ngx-bootstrap-datepicker.mjs +226 -226
  90. package/datepicker/fesm2022/ngx-bootstrap-datepicker.mjs.map +1 -0
  91. package/datepicker/models/index.d.ts +1 -1
  92. package/datepicker/package.json +13 -19
  93. package/datepicker/themes/bs/bs-current-date-view.component.d.ts +1 -1
  94. package/datepicker/themes/bs/bs-custom-dates-view.component.d.ts +1 -1
  95. package/datepicker/themes/bs/bs-datepicker-day-decorator.directive.d.ts +1 -1
  96. package/datepicker/themes/bs/bs-datepicker-navigation-view.component.d.ts +1 -1
  97. package/datepicker/themes/bs/bs-days-calendar-view.component.d.ts +1 -1
  98. package/datepicker/themes/bs/bs-months-calendar-view.component.d.ts +1 -1
  99. package/datepicker/themes/bs/bs-years-calendar-view.component.d.ts +1 -1
  100. package/datepicker/utils/matrix-utils.d.ts +1 -1
  101. package/dropdown/bs-dropdown.directive.d.ts +1 -1
  102. package/dropdown/esm2022/bs-dropdown-container.component.mjs +79 -0
  103. package/dropdown/{esm2020 → esm2022}/bs-dropdown-menu.directive.mjs +4 -4
  104. package/dropdown/{esm2020 → esm2022}/bs-dropdown-toggle.directive.mjs +4 -4
  105. package/dropdown/{esm2020 → esm2022}/bs-dropdown.config.mjs +4 -4
  106. package/dropdown/esm2022/bs-dropdown.directive.mjs +340 -0
  107. package/dropdown/{esm2020 → esm2022}/bs-dropdown.module.mjs +10 -10
  108. package/dropdown/{esm2020 → esm2022}/bs-dropdown.state.mjs +4 -4
  109. package/dropdown/{fesm2020 → fesm2022}/ngx-bootstrap-dropdown.mjs +62 -62
  110. package/dropdown/fesm2022/ngx-bootstrap-dropdown.mjs.map +1 -0
  111. package/dropdown/package.json +10 -16
  112. package/fesm2022/ngx-bootstrap.mjs.map +1 -0
  113. package/focus-trap/boolean-property.d.ts +1 -1
  114. package/focus-trap/{esm2020 → esm2022}/focus-trap-manager.mjs +4 -4
  115. package/focus-trap/esm2022/focus-trap.mjs +399 -0
  116. package/focus-trap/{esm2020 → esm2022}/focus-trap.module.mjs +5 -5
  117. package/focus-trap/{esm2020 → esm2022}/interactivity-checker.mjs +4 -4
  118. package/focus-trap/{esm2020 → esm2022}/platform.mjs +4 -4
  119. package/focus-trap/{fesm2020 → fesm2022}/ngx-bootstrap-focus-trap.mjs +43 -39
  120. package/focus-trap/fesm2022/ngx-bootstrap-focus-trap.mjs.map +1 -0
  121. package/focus-trap/focus-trap.d.ts +1 -1
  122. package/focus-trap/package.json +8 -14
  123. package/locale/fesm2022/ngx-bootstrap-locale.mjs.map +1 -0
  124. package/locale/package.json +6 -12
  125. package/mini-ngrx/fesm2022/ngx-bootstrap-mini-ngrx.mjs.map +1 -0
  126. package/mini-ngrx/package.json +6 -12
  127. package/mini-ngrx/public_api.d.ts +1 -1
  128. package/modal/{esm2020 → esm2022}/bs-modal-ref.service.mjs +4 -4
  129. package/modal/{esm2020 → esm2022}/bs-modal.service.mjs +4 -4
  130. package/modal/esm2022/modal-backdrop.component.mjs +50 -0
  131. package/modal/{esm2020 → esm2022}/modal-container.component.mjs +6 -6
  132. package/modal/{esm2020 → esm2022}/modal-options.class.mjs +4 -4
  133. package/modal/esm2022/modal.directive.mjs +364 -0
  134. package/modal/{esm2020 → esm2022}/modal.module.mjs +7 -7
  135. package/modal/{fesm2020 → fesm2022}/ngx-bootstrap-modal.mjs +44 -42
  136. package/modal/fesm2022/ngx-bootstrap-modal.mjs.map +1 -0
  137. package/modal/modal.directive.d.ts +1 -1
  138. package/modal/models/index.d.ts +1 -1
  139. package/modal/package.json +8 -14
  140. package/package.json +9 -15
  141. package/pagination/{esm2020 → esm2022}/pager.component.mjs +4 -4
  142. package/pagination/{esm2020 → esm2022}/pagination.component.mjs +4 -4
  143. package/pagination/{esm2020 → esm2022}/pagination.config.mjs +4 -4
  144. package/pagination/{esm2020 → esm2022}/pagination.module.mjs +5 -5
  145. package/pagination/{fesm2020 → fesm2022}/ngx-bootstrap-pagination.mjs +13 -13
  146. package/pagination/fesm2022/ngx-bootstrap-pagination.mjs.map +1 -0
  147. package/pagination/package.json +8 -14
  148. package/pagination/pager.component.d.ts +1 -1
  149. package/pagination/pagination.component.d.ts +1 -1
  150. package/popover/esm2022/popover-container.component.mjs +46 -0
  151. package/popover/{esm2020 → esm2022}/popover.config.mjs +4 -4
  152. package/popover/esm2022/popover.directive.mjs +241 -0
  153. package/popover/{esm2020 → esm2022}/popover.module.mjs +5 -5
  154. package/popover/{fesm2020 → fesm2022}/ngx-bootstrap-popover.mjs +31 -31
  155. package/popover/fesm2022/ngx-bootstrap-popover.mjs.map +1 -0
  156. package/popover/package.json +9 -15
  157. package/popover/popover-container.component.d.ts +1 -1
  158. package/popover/popover.directive.d.ts +1 -1
  159. package/positioning/{esm2020 → esm2022}/positioning.service.mjs +4 -4
  160. package/positioning/{fesm2020 → fesm2022}/ngx-bootstrap-positioning.mjs +3 -3
  161. package/positioning/fesm2022/ngx-bootstrap-positioning.mjs.map +1 -0
  162. package/positioning/models/index.d.ts +1 -1
  163. package/positioning/package.json +10 -16
  164. package/progressbar/bar.component.d.ts +1 -1
  165. package/progressbar/{esm2020 → esm2022}/bar.component.mjs +4 -4
  166. package/progressbar/esm2022/progressbar.component.mjs +53 -0
  167. package/progressbar/{esm2020 → esm2022}/progressbar.config.mjs +4 -4
  168. package/progressbar/{esm2020 → esm2022}/progressbar.module.mjs +5 -5
  169. package/progressbar/{fesm2020 → fesm2022}/ngx-bootstrap-progressbar.mjs +24 -24
  170. package/progressbar/fesm2022/ngx-bootstrap-progressbar.mjs.map +1 -0
  171. package/progressbar/package.json +7 -13
  172. package/progressbar/progressbar-type.interface.d.ts +1 -1
  173. package/progressbar/progressbar.component.d.ts +1 -1
  174. package/rating/{esm2020 → esm2022}/rating.component.mjs +4 -4
  175. package/rating/{esm2020 → esm2022}/rating.config.mjs +4 -4
  176. package/rating/{esm2020 → esm2022}/rating.module.mjs +5 -5
  177. package/rating/{fesm2015 → fesm2022}/ngx-bootstrap-rating.mjs +10 -10
  178. package/rating/fesm2022/ngx-bootstrap-rating.mjs.map +1 -0
  179. package/rating/package.json +8 -14
  180. package/rating/rating.component.d.ts +1 -1
  181. package/schematics/collection.json +1 -1
  182. package/schematics/package.json +7 -7
  183. package/schematics/utils/current_dependency_versions.json +1 -1
  184. package/schematics/utils/index.d.ts +0 -2
  185. package/schematics/utils/index.js +1 -13
  186. package/schematics/utils/index.js.map +1 -1
  187. package/sortable/{esm2020 → esm2022}/draggable-item.service.mjs +4 -4
  188. package/sortable/esm2022/sortable.component.mjs +266 -0
  189. package/sortable/{esm2020 → esm2022}/sortable.module.mjs +5 -5
  190. package/sortable/{fesm2020 → fesm2022}/ngx-bootstrap-sortable.mjs +28 -28
  191. package/sortable/fesm2022/ngx-bootstrap-sortable.mjs.map +1 -0
  192. package/sortable/package.json +10 -16
  193. package/sortable/sortable.component.d.ts +1 -1
  194. package/tabs/esm2022/ng-transclude.directive.mjs +28 -0
  195. package/tabs/{esm2020 → esm2022}/tab-heading.directive.mjs +4 -4
  196. package/tabs/esm2022/tab.directive.mjs +115 -0
  197. package/tabs/{esm2020 → esm2022}/tabs.module.mjs +11 -11
  198. package/tabs/esm2022/tabset.component.mjs +216 -0
  199. package/tabs/{esm2020 → esm2022}/tabset.config.mjs +4 -4
  200. package/tabs/{fesm2015 → fesm2022}/ngx-bootstrap-tabs.mjs +63 -63
  201. package/tabs/fesm2022/ngx-bootstrap-tabs.mjs.map +1 -0
  202. package/tabs/ng-transclude.directive.d.ts +1 -1
  203. package/tabs/package.json +7 -13
  204. package/tabs/tab.directive.d.ts +1 -1
  205. package/tabs/tabset.component.d.ts +1 -1
  206. package/timepicker/esm2022/reducer/timepicker.actions.mjs +53 -0
  207. package/timepicker/{esm2020 → esm2022}/reducer/timepicker.store.mjs +4 -4
  208. package/timepicker/{esm2020 → esm2022}/timepicker.component.mjs +4 -4
  209. package/timepicker/{esm2020 → esm2022}/timepicker.config.mjs +4 -4
  210. package/timepicker/{esm2020 → esm2022}/timepicker.module.mjs +5 -5
  211. package/timepicker/{fesm2020 → fesm2022}/ngx-bootstrap-timepicker.mjs +22 -22
  212. package/timepicker/fesm2022/ngx-bootstrap-timepicker.mjs.map +1 -0
  213. package/timepicker/package.json +10 -16
  214. package/timepicker/reducer/timepicker.reducer.d.ts +1 -3
  215. package/timepicker/timepicker.component.d.ts +1 -1
  216. package/timepicker/timepicker.models.d.ts +1 -1
  217. package/tooltip/{esm2020 → esm2022}/tooltip-container.component.mjs +9 -9
  218. package/tooltip/{esm2020 → esm2022}/tooltip.config.mjs +4 -4
  219. package/tooltip/esm2022/tooltip.directive.mjs +342 -0
  220. package/tooltip/{esm2020 → esm2022}/tooltip.module.mjs +5 -5
  221. package/tooltip/{fesm2020 → fesm2022}/ngx-bootstrap-tooltip.mjs +61 -61
  222. package/tooltip/fesm2022/ngx-bootstrap-tooltip.mjs.map +1 -0
  223. package/tooltip/package.json +10 -16
  224. package/tooltip/tooltip.directive.d.ts +1 -1
  225. package/typeahead/esm2022/typeahead-container.component.mjs +311 -0
  226. package/typeahead/{esm2020 → esm2022}/typeahead.config.mjs +4 -4
  227. package/typeahead/{esm2020 → esm2022}/typeahead.directive.mjs +4 -4
  228. package/typeahead/{esm2020 → esm2022}/typeahead.module.mjs +5 -5
  229. package/typeahead/{fesm2020 → fesm2022}/ngx-bootstrap-typeahead.mjs +20 -20
  230. package/typeahead/fesm2022/ngx-bootstrap-typeahead.mjs.map +1 -0
  231. package/typeahead/package.json +12 -18
  232. package/typeahead/typeahead.directive.d.ts +3 -3
  233. package/utils/fesm2022/ngx-bootstrap-utils.mjs.map +1 -0
  234. package/utils/package.json +6 -12
  235. package/utils/theme-provider.d.ts +1 -1
  236. package/utils/triggers.d.ts +1 -1
  237. package/accordion/esm2020/accordion-group.component.mjs +0 -84
  238. package/accordion/fesm2015/ngx-bootstrap-accordion.mjs +0 -182
  239. package/accordion/fesm2015/ngx-bootstrap-accordion.mjs.map +0 -1
  240. package/accordion/fesm2020/ngx-bootstrap-accordion.mjs.map +0 -1
  241. package/alert/esm2020/alert.component.mjs +0 -77
  242. package/alert/fesm2015/ngx-bootstrap-alert.mjs.map +0 -1
  243. package/alert/fesm2020/ngx-bootstrap-alert.mjs +0 -119
  244. package/alert/fesm2020/ngx-bootstrap-alert.mjs.map +0 -1
  245. package/buttons/esm2020/button-radio.directive.mjs +0 -188
  246. package/buttons/fesm2015/ngx-bootstrap-buttons.mjs +0 -448
  247. package/buttons/fesm2015/ngx-bootstrap-buttons.mjs.map +0 -1
  248. package/buttons/fesm2020/ngx-bootstrap-buttons.mjs.map +0 -1
  249. package/carousel/esm2020/carousel.component.mjs +0 -713
  250. package/carousel/fesm2015/ngx-bootstrap-carousel.mjs +0 -851
  251. package/carousel/fesm2015/ngx-bootstrap-carousel.mjs.map +0 -1
  252. package/carousel/fesm2020/ngx-bootstrap-carousel.mjs.map +0 -1
  253. package/chronos/fesm2015/ngx-bootstrap-chronos.mjs +0 -7384
  254. package/chronos/fesm2015/ngx-bootstrap-chronos.mjs.map +0 -1
  255. package/chronos/fesm2020/ngx-bootstrap-chronos.mjs.map +0 -1
  256. package/collapse/esm2020/collapse.directive.mjs +0 -168
  257. package/collapse/fesm2015/ngx-bootstrap-collapse.mjs +0 -200
  258. package/collapse/fesm2015/ngx-bootstrap-collapse.mjs.map +0 -1
  259. package/collapse/fesm2020/ngx-bootstrap-collapse.mjs.map +0 -1
  260. package/component-loader/fesm2015/ngx-bootstrap-component-loader.mjs +0 -345
  261. package/component-loader/fesm2015/ngx-bootstrap-component-loader.mjs.map +0 -1
  262. package/component-loader/fesm2020/ngx-bootstrap-component-loader.mjs.map +0 -1
  263. package/datepicker/esm2020/bs-datepicker.component.mjs +0 -303
  264. package/datepicker/esm2020/bs-daterangepicker-inline.component.mjs +0 -163
  265. package/datepicker/esm2020/bs-daterangepicker.component.mjs +0 -296
  266. package/datepicker/esm2020/reducer/bs-datepicker.actions.mjs +0 -143
  267. package/datepicker/esm2020/themes/bs/bs-datepicker-container.component.mjs +0 -192
  268. package/datepicker/esm2020/themes/bs/bs-daterangepicker-container.component.mjs +0 -261
  269. package/datepicker/fesm2015/ngx-bootstrap-datepicker.mjs +0 -3971
  270. package/datepicker/fesm2015/ngx-bootstrap-datepicker.mjs.map +0 -1
  271. package/datepicker/fesm2020/ngx-bootstrap-datepicker.mjs.map +0 -1
  272. package/dropdown/esm2020/bs-dropdown-container.component.mjs +0 -79
  273. package/dropdown/esm2020/bs-dropdown.directive.mjs +0 -340
  274. package/dropdown/fesm2015/ngx-bootstrap-dropdown.mjs +0 -603
  275. package/dropdown/fesm2015/ngx-bootstrap-dropdown.mjs.map +0 -1
  276. package/dropdown/fesm2020/ngx-bootstrap-dropdown.mjs.map +0 -1
  277. package/fesm2015/ngx-bootstrap.mjs.map +0 -1
  278. package/fesm2020/ngx-bootstrap.mjs +0 -6
  279. package/fesm2020/ngx-bootstrap.mjs.map +0 -1
  280. package/focus-trap/esm2020/focus-trap.mjs +0 -399
  281. package/focus-trap/fesm2015/ngx-bootstrap-focus-trap.mjs +0 -800
  282. package/focus-trap/fesm2015/ngx-bootstrap-focus-trap.mjs.map +0 -1
  283. package/focus-trap/fesm2020/ngx-bootstrap-focus-trap.mjs.map +0 -1
  284. package/locale/fesm2015/ngx-bootstrap-locale.mjs.map +0 -1
  285. package/locale/fesm2020/ngx-bootstrap-locale.mjs +0 -6
  286. package/locale/fesm2020/ngx-bootstrap-locale.mjs.map +0 -1
  287. package/mini-ngrx/fesm2015/ngx-bootstrap-mini-ngrx.mjs +0 -64
  288. package/mini-ngrx/fesm2015/ngx-bootstrap-mini-ngrx.mjs.map +0 -1
  289. package/mini-ngrx/fesm2020/ngx-bootstrap-mini-ngrx.mjs.map +0 -1
  290. package/modal/esm2020/modal-backdrop.component.mjs +0 -50
  291. package/modal/esm2020/modal.directive.mjs +0 -364
  292. package/modal/fesm2015/ngx-bootstrap-modal.mjs +0 -888
  293. package/modal/fesm2015/ngx-bootstrap-modal.mjs.map +0 -1
  294. package/modal/fesm2020/ngx-bootstrap-modal.mjs.map +0 -1
  295. package/pagination/fesm2015/ngx-bootstrap-pagination.mjs +0 -565
  296. package/pagination/fesm2015/ngx-bootstrap-pagination.mjs.map +0 -1
  297. package/pagination/fesm2020/ngx-bootstrap-pagination.mjs.map +0 -1
  298. package/popover/esm2020/popover-container.component.mjs +0 -46
  299. package/popover/esm2020/popover.directive.mjs +0 -241
  300. package/popover/fesm2015/ngx-bootstrap-popover.mjs +0 -339
  301. package/popover/fesm2015/ngx-bootstrap-popover.mjs.map +0 -1
  302. package/popover/fesm2020/ngx-bootstrap-popover.mjs.map +0 -1
  303. package/positioning/fesm2015/ngx-bootstrap-positioning.mjs +0 -1018
  304. package/positioning/fesm2015/ngx-bootstrap-positioning.mjs.map +0 -1
  305. package/positioning/fesm2020/ngx-bootstrap-positioning.mjs.map +0 -1
  306. package/progressbar/esm2020/progressbar.component.mjs +0 -53
  307. package/progressbar/fesm2015/ngx-bootstrap-progressbar.mjs +0 -163
  308. package/progressbar/fesm2015/ngx-bootstrap-progressbar.mjs.map +0 -1
  309. package/progressbar/fesm2020/ngx-bootstrap-progressbar.mjs.map +0 -1
  310. package/rating/fesm2015/ngx-bootstrap-rating.mjs.map +0 -1
  311. package/rating/fesm2020/ngx-bootstrap-rating.mjs +0 -163
  312. package/rating/fesm2020/ngx-bootstrap-rating.mjs.map +0 -1
  313. package/sortable/esm2020/sortable.component.mjs +0 -266
  314. package/sortable/fesm2015/ngx-bootstrap-sortable.mjs +0 -324
  315. package/sortable/fesm2015/ngx-bootstrap-sortable.mjs.map +0 -1
  316. package/sortable/fesm2020/ngx-bootstrap-sortable.mjs.map +0 -1
  317. package/tabs/esm2020/ng-transclude.directive.mjs +0 -28
  318. package/tabs/esm2020/tab.directive.mjs +0 -115
  319. package/tabs/esm2020/tabset.component.mjs +0 -216
  320. package/tabs/fesm2015/ngx-bootstrap-tabs.mjs.map +0 -1
  321. package/tabs/fesm2020/ngx-bootstrap-tabs.mjs +0 -427
  322. package/tabs/fesm2020/ngx-bootstrap-tabs.mjs.map +0 -1
  323. package/timepicker/esm2020/reducer/timepicker.actions.mjs +0 -53
  324. package/timepicker/fesm2015/ngx-bootstrap-timepicker.mjs +0 -830
  325. package/timepicker/fesm2015/ngx-bootstrap-timepicker.mjs.map +0 -1
  326. package/timepicker/fesm2020/ngx-bootstrap-timepicker.mjs.map +0 -1
  327. package/tooltip/esm2020/tooltip.directive.mjs +0 -342
  328. package/tooltip/fesm2015/ngx-bootstrap-tooltip.mjs +0 -431
  329. package/tooltip/fesm2015/ngx-bootstrap-tooltip.mjs.map +0 -1
  330. package/tooltip/fesm2020/ngx-bootstrap-tooltip.mjs.map +0 -1
  331. package/typeahead/esm2020/typeahead-container.component.mjs +0 -311
  332. package/typeahead/fesm2015/ngx-bootstrap-typeahead.mjs +0 -1890
  333. package/typeahead/fesm2015/ngx-bootstrap-typeahead.mjs.map +0 -1
  334. package/typeahead/fesm2020/ngx-bootstrap-typeahead.mjs.map +0 -1
  335. package/utils/fesm2015/ngx-bootstrap-utils.mjs +0 -523
  336. package/utils/fesm2015/ngx-bootstrap-utils.mjs.map +0 -1
  337. package/utils/fesm2020/ngx-bootstrap-utils.mjs.map +0 -1
  338. /package/accordion/{esm2020 → esm2022}/index.mjs +0 -0
  339. /package/accordion/{esm2020 → esm2022}/ngx-bootstrap-accordion.mjs +0 -0
  340. /package/accordion/{esm2020 → esm2022}/public_api.mjs +0 -0
  341. /package/alert/{esm2020 → esm2022}/index.mjs +0 -0
  342. /package/alert/{esm2020 → esm2022}/ngx-bootstrap-alert.mjs +0 -0
  343. /package/alert/{esm2020 → esm2022}/public_api.mjs +0 -0
  344. /package/buttons/{esm2020 → esm2022}/index.mjs +0 -0
  345. /package/buttons/{esm2020 → esm2022}/ngx-bootstrap-buttons.mjs +0 -0
  346. /package/buttons/{esm2020 → esm2022}/public_api.mjs +0 -0
  347. /package/carousel/{esm2020 → esm2022}/index.mjs +0 -0
  348. /package/carousel/{esm2020 → esm2022}/models/index.mjs +0 -0
  349. /package/carousel/{esm2020 → esm2022}/ngx-bootstrap-carousel.mjs +0 -0
  350. /package/carousel/{esm2020 → esm2022}/public_api.mjs +0 -0
  351. /package/carousel/{esm2020 → esm2022}/utils.mjs +0 -0
  352. /package/chronos/{esm2020 → esm2022}/create/check-overflow.mjs +0 -0
  353. /package/chronos/{esm2020 → esm2022}/create/clone.mjs +0 -0
  354. /package/chronos/{esm2020 → esm2022}/create/date-from-array.mjs +0 -0
  355. /package/chronos/{esm2020 → esm2022}/create/from-anything.mjs +0 -0
  356. /package/chronos/{esm2020 → esm2022}/create/from-array.mjs +0 -0
  357. /package/chronos/{esm2020 → esm2022}/create/from-object.mjs +0 -0
  358. /package/chronos/{esm2020 → esm2022}/create/from-string-and-array.mjs +0 -0
  359. /package/chronos/{esm2020 → esm2022}/create/from-string-and-format.mjs +0 -0
  360. /package/chronos/{esm2020 → esm2022}/create/from-string.mjs +0 -0
  361. /package/chronos/{esm2020 → esm2022}/create/local.mjs +0 -0
  362. /package/chronos/{esm2020 → esm2022}/create/parsing-flags.mjs +0 -0
  363. /package/chronos/{esm2020 → esm2022}/create/parsing.types.mjs +0 -0
  364. /package/chronos/{esm2020 → esm2022}/create/valid.mjs +0 -0
  365. /package/chronos/{esm2020 → esm2022}/duration/bubble.mjs +0 -0
  366. /package/chronos/{esm2020 → esm2022}/duration/constructor.mjs +0 -0
  367. /package/chronos/{esm2020 → esm2022}/duration/create.mjs +0 -0
  368. /package/chronos/{esm2020 → esm2022}/duration/humanize.mjs +0 -0
  369. /package/chronos/{esm2020 → esm2022}/duration/valid.mjs +0 -0
  370. /package/chronos/{esm2020 → esm2022}/format/format.mjs +0 -0
  371. /package/chronos/{esm2020 → esm2022}/format.mjs +0 -0
  372. /package/chronos/{esm2020 → esm2022}/i18n/ar.mjs +0 -0
  373. /package/chronos/{esm2020 → esm2022}/i18n/bg.mjs +0 -0
  374. /package/chronos/{esm2020 → esm2022}/i18n/ca.mjs +0 -0
  375. /package/chronos/{esm2020 → esm2022}/i18n/cs.mjs +0 -0
  376. /package/chronos/{esm2020 → esm2022}/i18n/da.mjs +0 -0
  377. /package/chronos/{esm2020 → esm2022}/i18n/de.mjs +0 -0
  378. /package/chronos/{esm2020 → esm2022}/i18n/en-gb.mjs +0 -0
  379. /package/chronos/{esm2020 → esm2022}/i18n/es-do.mjs +0 -0
  380. /package/chronos/{esm2020 → esm2022}/i18n/es-pr.mjs +0 -0
  381. /package/chronos/{esm2020 → esm2022}/i18n/es-us.mjs +0 -0
  382. /package/chronos/{esm2020 → esm2022}/i18n/es.mjs +0 -0
  383. /package/chronos/{esm2020 → esm2022}/i18n/et.mjs +0 -0
  384. /package/chronos/{esm2020 → esm2022}/i18n/fi.mjs +0 -0
  385. /package/chronos/{esm2020 → esm2022}/i18n/fr.mjs +0 -0
  386. /package/chronos/{esm2020 → esm2022}/i18n/gl.mjs +0 -0
  387. /package/chronos/{esm2020 → esm2022}/i18n/he.mjs +0 -0
  388. /package/chronos/{esm2020 → esm2022}/i18n/hi.mjs +0 -0
  389. /package/chronos/{esm2020 → esm2022}/i18n/hr.mjs +0 -0
  390. /package/chronos/{esm2020 → esm2022}/i18n/hu.mjs +0 -0
  391. /package/chronos/{esm2020 → esm2022}/i18n/id.mjs +0 -0
  392. /package/chronos/{esm2020 → esm2022}/i18n/it.mjs +0 -0
  393. /package/chronos/{esm2020 → esm2022}/i18n/ja.mjs +0 -0
  394. /package/chronos/{esm2020 → esm2022}/i18n/ka.mjs +0 -0
  395. /package/chronos/{esm2020 → esm2022}/i18n/kk.mjs +0 -0
  396. /package/chronos/{esm2020 → esm2022}/i18n/ko.mjs +0 -0
  397. /package/chronos/{esm2020 → esm2022}/i18n/lt.mjs +0 -0
  398. /package/chronos/{esm2020 → esm2022}/i18n/lv.mjs +0 -0
  399. /package/chronos/{esm2020 → esm2022}/i18n/mn.mjs +0 -0
  400. /package/chronos/{esm2020 → esm2022}/i18n/nb.mjs +0 -0
  401. /package/chronos/{esm2020 → esm2022}/i18n/nl-be.mjs +0 -0
  402. /package/chronos/{esm2020 → esm2022}/i18n/nl.mjs +0 -0
  403. /package/chronos/{esm2020 → esm2022}/i18n/pl.mjs +0 -0
  404. /package/chronos/{esm2020 → esm2022}/i18n/pt-br.mjs +0 -0
  405. /package/chronos/{esm2020 → esm2022}/i18n/ro.mjs +0 -0
  406. /package/chronos/{esm2020 → esm2022}/i18n/ru.mjs +0 -0
  407. /package/chronos/{esm2020 → esm2022}/i18n/sk.mjs +0 -0
  408. /package/chronos/{esm2020 → esm2022}/i18n/sl.mjs +0 -0
  409. /package/chronos/{esm2020 → esm2022}/i18n/sq.mjs +0 -0
  410. /package/chronos/{esm2020 → esm2022}/i18n/sv.mjs +0 -0
  411. /package/chronos/{esm2020 → esm2022}/i18n/th-be.mjs +0 -0
  412. /package/chronos/{esm2020 → esm2022}/i18n/th.mjs +0 -0
  413. /package/chronos/{esm2020 → esm2022}/i18n/tr.mjs +0 -0
  414. /package/chronos/{esm2020 → esm2022}/i18n/uk.mjs +0 -0
  415. /package/chronos/{esm2020 → esm2022}/i18n/vi.mjs +0 -0
  416. /package/chronos/{esm2020 → esm2022}/i18n/zh-cn.mjs +0 -0
  417. /package/chronos/{esm2020 → esm2022}/index.mjs +0 -0
  418. /package/chronos/{esm2020 → esm2022}/locale/calendar.mjs +0 -0
  419. /package/chronos/{esm2020 → esm2022}/locale/locale.class.mjs +0 -0
  420. /package/chronos/{esm2020 → esm2022}/locale/locale.defaults.mjs +0 -0
  421. /package/chronos/{esm2020 → esm2022}/locale/locales.mjs +0 -0
  422. /package/chronos/{esm2020 → esm2022}/moment/add-subtract.mjs +0 -0
  423. /package/chronos/{esm2020 → esm2022}/moment/calendar.mjs +0 -0
  424. /package/chronos/{esm2020 → esm2022}/moment/diff.mjs +0 -0
  425. /package/chronos/{esm2020 → esm2022}/moment/min-max.mjs +0 -0
  426. /package/chronos/{esm2020 → esm2022}/ngx-bootstrap-chronos.mjs +0 -0
  427. /package/chronos/{esm2020 → esm2022}/parse/regex.mjs +0 -0
  428. /package/chronos/{esm2020 → esm2022}/parse/token.mjs +0 -0
  429. /package/chronos/{esm2020 → esm2022}/public_api.mjs +0 -0
  430. /package/chronos/{esm2020 → esm2022}/testing/chain.mjs +0 -0
  431. /package/chronos/{esm2020 → esm2022}/types.mjs +0 -0
  432. /package/chronos/{esm2020 → esm2022}/units/aliases.mjs +0 -0
  433. /package/chronos/{esm2020 → esm2022}/units/constants.mjs +0 -0
  434. /package/chronos/{esm2020 → esm2022}/units/day-of-month.mjs +0 -0
  435. /package/chronos/{esm2020 → esm2022}/units/day-of-week.mjs +0 -0
  436. /package/chronos/{esm2020 → esm2022}/units/day-of-year.mjs +0 -0
  437. /package/chronos/{esm2020 → esm2022}/units/hour.mjs +0 -0
  438. /package/chronos/{esm2020 → esm2022}/units/index.mjs +0 -0
  439. /package/chronos/{esm2020 → esm2022}/units/millisecond.mjs +0 -0
  440. /package/chronos/{esm2020 → esm2022}/units/minute.mjs +0 -0
  441. /package/chronos/{esm2020 → esm2022}/units/month.mjs +0 -0
  442. /package/chronos/{esm2020 → esm2022}/units/offset.mjs +0 -0
  443. /package/chronos/{esm2020 → esm2022}/units/priorities.mjs +0 -0
  444. /package/chronos/{esm2020 → esm2022}/units/quarter.mjs +0 -0
  445. /package/chronos/{esm2020 → esm2022}/units/second.mjs +0 -0
  446. /package/chronos/{esm2020 → esm2022}/units/timestamp.mjs +0 -0
  447. /package/chronos/{esm2020 → esm2022}/units/timezone.mjs +0 -0
  448. /package/chronos/{esm2020 → esm2022}/units/week-calendar-utils.mjs +0 -0
  449. /package/chronos/{esm2020 → esm2022}/units/week-year.mjs +0 -0
  450. /package/chronos/{esm2020 → esm2022}/units/week.mjs +0 -0
  451. /package/chronos/{esm2020 → esm2022}/units/year.mjs +0 -0
  452. /package/chronos/{esm2020 → esm2022}/utils/abs-ceil.mjs +0 -0
  453. /package/chronos/{esm2020 → esm2022}/utils/abs-round.mjs +0 -0
  454. /package/chronos/{esm2020 → esm2022}/utils/compare-arrays.mjs +0 -0
  455. /package/chronos/{esm2020 → esm2022}/utils/date-compare.mjs +0 -0
  456. /package/chronos/{esm2020 → esm2022}/utils/date-getters.mjs +0 -0
  457. /package/chronos/{esm2020 → esm2022}/utils/date-setters.mjs +0 -0
  458. /package/chronos/{esm2020 → esm2022}/utils/defaults.mjs +0 -0
  459. /package/chronos/{esm2020 → esm2022}/utils/start-end-of.mjs +0 -0
  460. /package/chronos/{esm2020 → esm2022}/utils/type-checks.mjs +0 -0
  461. /package/chronos/{esm2020 → esm2022}/utils/zero-fill.mjs +0 -0
  462. /package/chronos/{esm2020 → esm2022}/utils.mjs +0 -0
  463. /package/collapse/{esm2020 → esm2022}/collapse-animations.mjs +0 -0
  464. /package/collapse/{esm2020 → esm2022}/index.mjs +0 -0
  465. /package/collapse/{esm2020 → esm2022}/ngx-bootstrap-collapse.mjs +0 -0
  466. /package/collapse/{esm2020 → esm2022}/public_api.mjs +0 -0
  467. /package/component-loader/{esm2020 → esm2022}/bs-component-ref.class.mjs +0 -0
  468. /package/component-loader/{esm2020 → esm2022}/component-loader.class.mjs +0 -0
  469. /package/component-loader/{esm2020 → esm2022}/content-ref.class.mjs +0 -0
  470. /package/component-loader/{esm2020 → esm2022}/index.mjs +0 -0
  471. /package/component-loader/{esm2020 → esm2022}/listen-options.model.mjs +0 -0
  472. /package/component-loader/{esm2020 → esm2022}/ngx-bootstrap-component-loader.mjs +0 -0
  473. /package/component-loader/{esm2020 → esm2022}/public_api.mjs +0 -0
  474. /package/datepicker/{esm2020 → esm2022}/base/bs-datepicker-container.mjs +0 -0
  475. /package/datepicker/{esm2020 → esm2022}/datepicker-animations.mjs +0 -0
  476. /package/datepicker/{esm2020 → esm2022}/engine/calc-days-calendar.mjs +0 -0
  477. /package/datepicker/{esm2020 → esm2022}/engine/flag-days-calendar.mjs +0 -0
  478. /package/datepicker/{esm2020 → esm2022}/engine/flag-months-calendar.mjs +0 -0
  479. /package/datepicker/{esm2020 → esm2022}/engine/flag-years-calendar.mjs +0 -0
  480. /package/datepicker/{esm2020 → esm2022}/engine/format-days-calendar.mjs +0 -0
  481. /package/datepicker/{esm2020 → esm2022}/engine/format-months-calendar.mjs +0 -0
  482. /package/datepicker/{esm2020 → esm2022}/engine/format-years-calendar.mjs +0 -0
  483. /package/datepicker/{esm2020 → esm2022}/engine/view-mode.mjs +0 -0
  484. /package/datepicker/{esm2020 → esm2022}/index.mjs +0 -0
  485. /package/datepicker/{esm2020 → esm2022}/models/index.mjs +0 -0
  486. /package/datepicker/{esm2020 → esm2022}/ngx-bootstrap-datepicker.mjs +0 -0
  487. /package/datepicker/{esm2020 → esm2022}/public_api.mjs +0 -0
  488. /package/datepicker/{esm2020 → esm2022}/reducer/_defaults.mjs +0 -0
  489. /package/datepicker/{esm2020 → esm2022}/reducer/bs-datepicker.reducer.mjs +0 -0
  490. /package/datepicker/{esm2020 → esm2022}/reducer/bs-datepicker.state.mjs +0 -0
  491. /package/datepicker/{esm2020 → esm2022}/utils/bs-calendar-utils.mjs +0 -0
  492. /package/datepicker/{esm2020 → esm2022}/utils/copy-time-utils.mjs +0 -0
  493. /package/datepicker/{esm2020 → esm2022}/utils/matrix-utils.mjs +0 -0
  494. /package/dropdown/{esm2020 → esm2022}/dropdown-animations.mjs +0 -0
  495. /package/dropdown/{esm2020 → esm2022}/index.mjs +0 -0
  496. /package/dropdown/{esm2020 → esm2022}/ngx-bootstrap-dropdown.mjs +0 -0
  497. /package/dropdown/{esm2020 → esm2022}/public_api.mjs +0 -0
  498. /package/{esm2020 → esm2022}/index.mjs +0 -0
  499. /package/{esm2020 → esm2022}/ngx-bootstrap.mjs +0 -0
  500. /package/{fesm2015 → fesm2022}/ngx-bootstrap.mjs +0 -0
  501. /package/focus-trap/{esm2020 → esm2022}/boolean-property.mjs +0 -0
  502. /package/focus-trap/{esm2020 → esm2022}/index.mjs +0 -0
  503. /package/focus-trap/{esm2020 → esm2022}/ngx-bootstrap-focus-trap.mjs +0 -0
  504. /package/focus-trap/{esm2020 → esm2022}/public_api.mjs +0 -0
  505. /package/locale/{esm2020 → esm2022}/index.mjs +0 -0
  506. /package/locale/{esm2020 → esm2022}/ngx-bootstrap-locale.mjs +0 -0
  507. /package/locale/{esm2020 → esm2022}/public_api.mjs +0 -0
  508. /package/locale/{fesm2015 → fesm2022}/ngx-bootstrap-locale.mjs +0 -0
  509. /package/mini-ngrx/{esm2020 → esm2022}/index.mjs +0 -0
  510. /package/mini-ngrx/{esm2020 → esm2022}/ngx-bootstrap-mini-ngrx.mjs +0 -0
  511. /package/mini-ngrx/{esm2020 → esm2022}/public_api.mjs +0 -0
  512. /package/mini-ngrx/{esm2020 → esm2022}/state.class.mjs +0 -0
  513. /package/mini-ngrx/{esm2020 → esm2022}/store.class.mjs +0 -0
  514. /package/mini-ngrx/{fesm2020 → fesm2022}/ngx-bootstrap-mini-ngrx.mjs +0 -0
  515. /package/modal/{esm2020 → esm2022}/index.mjs +0 -0
  516. /package/modal/{esm2020 → esm2022}/modal-backdrop.options.mjs +0 -0
  517. /package/modal/{esm2020 → esm2022}/models/index.mjs +0 -0
  518. /package/modal/{esm2020 → esm2022}/ngx-bootstrap-modal.mjs +0 -0
  519. /package/modal/{esm2020 → esm2022}/public_api.mjs +0 -0
  520. /package/pagination/{esm2020 → esm2022}/index.mjs +0 -0
  521. /package/pagination/{esm2020 → esm2022}/models/index.mjs +0 -0
  522. /package/pagination/{esm2020 → esm2022}/ngx-bootstrap-pagination.mjs +0 -0
  523. /package/pagination/{esm2020 → esm2022}/public_api.mjs +0 -0
  524. /package/popover/{esm2020 → esm2022}/index.mjs +0 -0
  525. /package/popover/{esm2020 → esm2022}/ngx-bootstrap-popover.mjs +0 -0
  526. /package/popover/{esm2020 → esm2022}/public_api.mjs +0 -0
  527. /package/positioning/{esm2020 → esm2022}/index.mjs +0 -0
  528. /package/positioning/{esm2020 → esm2022}/models/index.mjs +0 -0
  529. /package/positioning/{esm2020 → esm2022}/modifiers/arrow.mjs +0 -0
  530. /package/positioning/{esm2020 → esm2022}/modifiers/flip.mjs +0 -0
  531. /package/positioning/{esm2020 → esm2022}/modifiers/index.mjs +0 -0
  532. /package/positioning/{esm2020 → esm2022}/modifiers/initData.mjs +0 -0
  533. /package/positioning/{esm2020 → esm2022}/modifiers/preventOverflow.mjs +0 -0
  534. /package/positioning/{esm2020 → esm2022}/modifiers/shift.mjs +0 -0
  535. /package/positioning/{esm2020 → esm2022}/ng-positioning.mjs +0 -0
  536. /package/positioning/{esm2020 → esm2022}/ngx-bootstrap-positioning.mjs +0 -0
  537. /package/positioning/{esm2020 → esm2022}/public_api.mjs +0 -0
  538. /package/positioning/{esm2020 → esm2022}/utils/checkMargin.mjs +0 -0
  539. /package/positioning/{esm2020 → esm2022}/utils/computeAutoPlacement.mjs +0 -0
  540. /package/positioning/{esm2020 → esm2022}/utils/findCommonOffsetParent.mjs +0 -0
  541. /package/positioning/{esm2020 → esm2022}/utils/getBordersSize.mjs +0 -0
  542. /package/positioning/{esm2020 → esm2022}/utils/getBoundaries.mjs +0 -0
  543. /package/positioning/{esm2020 → esm2022}/utils/getBoundingClientRect.mjs +0 -0
  544. /package/positioning/{esm2020 → esm2022}/utils/getClientRect.mjs +0 -0
  545. /package/positioning/{esm2020 → esm2022}/utils/getFixedPositionOffsetParent.mjs +0 -0
  546. /package/positioning/{esm2020 → esm2022}/utils/getOffsetParent.mjs +0 -0
  547. /package/positioning/{esm2020 → esm2022}/utils/getOffsetRectRelativeToArbitraryNode.mjs +0 -0
  548. /package/positioning/{esm2020 → esm2022}/utils/getOffsets.mjs +0 -0
  549. /package/positioning/{esm2020 → esm2022}/utils/getOppositePlacement.mjs +0 -0
  550. /package/positioning/{esm2020 → esm2022}/utils/getOppositeVariation.mjs +0 -0
  551. /package/positioning/{esm2020 → esm2022}/utils/getOuterSizes.mjs +0 -0
  552. /package/positioning/{esm2020 → esm2022}/utils/getParentNode.mjs +0 -0
  553. /package/positioning/{esm2020 → esm2022}/utils/getReferenceOffsets.mjs +0 -0
  554. /package/positioning/{esm2020 → esm2022}/utils/getRoot.mjs +0 -0
  555. /package/positioning/{esm2020 → esm2022}/utils/getScroll.mjs +0 -0
  556. /package/positioning/{esm2020 → esm2022}/utils/getScrollParent.mjs +0 -0
  557. /package/positioning/{esm2020 → esm2022}/utils/getStyleComputedProperty.mjs +0 -0
  558. /package/positioning/{esm2020 → esm2022}/utils/getTargetOffsets.mjs +0 -0
  559. /package/positioning/{esm2020 → esm2022}/utils/getViewportOffsetRectRelativeToArtbitraryNode.mjs +0 -0
  560. /package/positioning/{esm2020 → esm2022}/utils/getWindowSizes.mjs +0 -0
  561. /package/positioning/{esm2020 → esm2022}/utils/includeScroll.mjs +0 -0
  562. /package/positioning/{esm2020 → esm2022}/utils/index.mjs +0 -0
  563. /package/positioning/{esm2020 → esm2022}/utils/isFixed.mjs +0 -0
  564. /package/positioning/{esm2020 → esm2022}/utils/isModifierEnabled.mjs +0 -0
  565. /package/positioning/{esm2020 → esm2022}/utils/isNumeric.mjs +0 -0
  566. /package/positioning/{esm2020 → esm2022}/utils/isOffsetContainer.mjs +0 -0
  567. /package/positioning/{esm2020 → esm2022}/utils/setStyles.mjs +0 -0
  568. /package/positioning/{esm2020 → esm2022}/utils/updateContainerClass.mjs +0 -0
  569. /package/progressbar/{esm2020 → esm2022}/index.mjs +0 -0
  570. /package/progressbar/{esm2020 → esm2022}/ngx-bootstrap-progressbar.mjs +0 -0
  571. /package/progressbar/{esm2020 → esm2022}/progressbar-type.interface.mjs +0 -0
  572. /package/progressbar/{esm2020 → esm2022}/public_api.mjs +0 -0
  573. /package/rating/{esm2020 → esm2022}/index.mjs +0 -0
  574. /package/rating/{esm2020 → esm2022}/models/index.mjs +0 -0
  575. /package/rating/{esm2020 → esm2022}/ngx-bootstrap-rating.mjs +0 -0
  576. /package/rating/{esm2020 → esm2022}/public_api.mjs +0 -0
  577. /package/sortable/{esm2020 → esm2022}/draggable-item.mjs +0 -0
  578. /package/sortable/{esm2020 → esm2022}/index.mjs +0 -0
  579. /package/sortable/{esm2020 → esm2022}/ngx-bootstrap-sortable.mjs +0 -0
  580. /package/sortable/{esm2020 → esm2022}/public_api.mjs +0 -0
  581. /package/tabs/{esm2020 → esm2022}/index.mjs +0 -0
  582. /package/tabs/{esm2020 → esm2022}/ngx-bootstrap-tabs.mjs +0 -0
  583. /package/tabs/{esm2020 → esm2022}/public_api.mjs +0 -0
  584. /package/timepicker/{esm2020 → esm2022}/index.mjs +0 -0
  585. /package/timepicker/{esm2020 → esm2022}/models/index.mjs +0 -0
  586. /package/timepicker/{esm2020 → esm2022}/ngx-bootstrap-timepicker.mjs +0 -0
  587. /package/timepicker/{esm2020 → esm2022}/public_api.mjs +0 -0
  588. /package/timepicker/{esm2020 → esm2022}/reducer/timepicker.reducer.mjs +0 -0
  589. /package/timepicker/{esm2020 → esm2022}/timepicker-controls.util.mjs +0 -0
  590. /package/timepicker/{esm2020 → esm2022}/timepicker.models.mjs +0 -0
  591. /package/timepicker/{esm2020 → esm2022}/timepicker.utils.mjs +0 -0
  592. /package/tooltip/{esm2020 → esm2022}/index.mjs +0 -0
  593. /package/tooltip/{esm2020 → esm2022}/ngx-bootstrap-tooltip.mjs +0 -0
  594. /package/tooltip/{esm2020 → esm2022}/public_api.mjs +0 -0
  595. /package/typeahead/{esm2020 → esm2022}/index.mjs +0 -0
  596. /package/typeahead/{esm2020 → esm2022}/latin-map.mjs +0 -0
  597. /package/typeahead/{esm2020 → esm2022}/models/index.mjs +0 -0
  598. /package/typeahead/{esm2020 → esm2022}/ngx-bootstrap-typeahead.mjs +0 -0
  599. /package/typeahead/{esm2020 → esm2022}/public_api.mjs +0 -0
  600. /package/typeahead/{esm2020 → esm2022}/typeahead-animations.mjs +0 -0
  601. /package/typeahead/{esm2020 → esm2022}/typeahead-match.class.mjs +0 -0
  602. /package/typeahead/{esm2020 → esm2022}/typeahead-options.class.mjs +0 -0
  603. /package/typeahead/{esm2020 → esm2022}/typeahead-order.class.mjs +0 -0
  604. /package/typeahead/{esm2020 → esm2022}/typeahead-utils.mjs +0 -0
  605. /package/utils/{esm2020 → esm2022}/decorators.mjs +0 -0
  606. /package/utils/{esm2020 → esm2022}/facade/browser.mjs +0 -0
  607. /package/utils/{esm2020 → esm2022}/index.mjs +0 -0
  608. /package/utils/{esm2020 → esm2022}/linked-list.class.mjs +0 -0
  609. /package/utils/{esm2020 → esm2022}/ngx-bootstrap-utils.mjs +0 -0
  610. /package/utils/{esm2020 → esm2022}/public_api.mjs +0 -0
  611. /package/utils/{esm2020 → esm2022}/theme-provider.mjs +0 -0
  612. /package/utils/{esm2020 → esm2022}/trigger.class.mjs +0 -0
  613. /package/utils/{esm2020 → esm2022}/triggers.mjs +0 -0
  614. /package/utils/{esm2020 → esm2022}/utils.class.mjs +0 -0
  615. /package/utils/{esm2020 → esm2022}/warn-once.mjs +0 -0
  616. /package/utils/{fesm2020 → fesm2022}/ngx-bootstrap-utils.mjs +0 -0
@@ -1,3971 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Injectable, EventEmitter, Component, ChangeDetectionStrategy, Input, Output, ViewChild, HostBinding, Directive, forwardRef, Host, NgModule } from '@angular/core';
3
- import { filter, map, take, takeUntil, distinctUntilChanged } from 'rxjs/operators';
4
- import { isFirstDayOfWeek, getDay, shiftDate, isBefore, endOf, isAfter, startOf, isArray, isSame, getFirstDayOfMonth, formatDate, getLocale, isSameMonth, isSameDay, isDisabledDay, isSameYear, isDateValid, setFullDate, getMonth, getFullYear, isDate, parseDate, utcAsLocal } from 'ngx-bootstrap/chronos';
5
- import { trigger, state, style, transition, animate } from '@angular/animations';
6
- import { Subscription, BehaviorSubject, combineLatest, Subject } from 'rxjs';
7
- import { MiniStore, MiniState } from 'ngx-bootstrap/mini-ngrx';
8
- import * as i5 from 'ngx-bootstrap/positioning';
9
- import { PositioningService } from 'ngx-bootstrap/positioning';
10
- import * as i6 from '@angular/common';
11
- import { CommonModule } from '@angular/common';
12
- import * as i7 from 'ngx-bootstrap/timepicker';
13
- import { TimepickerActions, TimepickerModule } from 'ngx-bootstrap/timepicker';
14
- import * as i3 from 'ngx-bootstrap/tooltip';
15
- import { TooltipModule } from 'ngx-bootstrap/tooltip';
16
- import * as i2 from 'ngx-bootstrap/component-loader';
17
- import { ComponentLoaderFactory } from 'ngx-bootstrap/component-loader';
18
- import { NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
19
-
20
- /**
21
- * For date range picker there are `BsDaterangepickerConfig` which inherits all properties,
22
- * except `displayMonths`, for range picker it default to `2`
23
- */
24
- class BsDatepickerConfig {
25
- constructor() {
26
- /** sets use adaptive position */
27
- this.adaptivePosition = false;
28
- /** sets use UTC date time format */
29
- this.useUtc = false;
30
- /** turn on/off animation */
31
- this.isAnimated = false;
32
- /**
33
- * The view that the datepicker should start in
34
- */
35
- this.startView = 'day';
36
- /**
37
- * If true, returns focus to the datepicker / daterangepicker input after date selection
38
- */
39
- this.returnFocusToInput = false;
40
- /** CSS class which will be applied to datepicker container,
41
- * usually used to set color theme
42
- */
43
- this.containerClass = 'theme-green';
44
- // DatepickerRenderOptions
45
- this.displayMonths = 1;
46
- /**
47
- * Allows to hide week numbers in datepicker
48
- */
49
- this.showWeekNumbers = true;
50
- this.dateInputFormat = 'L';
51
- // range picker
52
- this.rangeSeparator = ' - ';
53
- /**
54
- * Date format for date range input field
55
- */
56
- this.rangeInputFormat = 'L';
57
- // DatepickerFormatOptions
58
- this.monthTitle = 'MMMM';
59
- this.yearTitle = 'YYYY';
60
- this.dayLabel = 'D';
61
- this.monthLabel = 'MMMM';
62
- this.yearLabel = 'YYYY';
63
- this.weekNumbers = 'w';
64
- /**
65
- * Shows 'today' button
66
- */
67
- this.showTodayButton = false;
68
- /**
69
- * Shows clear button
70
- */
71
- this.showClearButton = false;
72
- /**
73
- * Positioning of 'today' button
74
- */
75
- this.todayPosition = 'center';
76
- /**
77
- * Positioning of 'clear' button
78
- */
79
- this.clearPosition = 'right';
80
- /**
81
- * Label for 'today' button
82
- */
83
- this.todayButtonLabel = 'Today';
84
- /**
85
- * Label for 'clear' button
86
- */
87
- this.clearButtonLabel = 'Clear';
88
- /**
89
- * Label for 'custom range' button
90
- */
91
- this.customRangeButtonLabel = 'Custom Range';
92
- /**
93
- * Shows timepicker under datepicker
94
- */
95
- this.withTimepicker = false;
96
- /**
97
- * Set allowed positions of container.
98
- */
99
- this.allowedPositions = ['top', 'bottom'];
100
- /**
101
- * Set rule for datepicker closing. If value is true datepicker closes only if date is changed, if user changes only time datepicker doesn't close. It is available only if property withTimepicker is set true
102
- * */
103
- this.keepDatepickerOpened = false;
104
- /**
105
- * Allows keep invalid dates in range. Can be used with minDate, maxDate
106
- * */
107
- this.keepDatesOutOfRules = false;
108
- }
109
- }
110
- BsDatepickerConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
111
- BsDatepickerConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerConfig, providedIn: 'root' });
112
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerConfig, decorators: [{
113
- type: Injectable,
114
- args: [{
115
- providedIn: 'root'
116
- }]
117
- }] });
118
-
119
- const DATEPICKER_ANIMATION_TIMING = '220ms cubic-bezier(0, 0, 0.2, 1)';
120
- const datepickerAnimation = trigger('datepickerAnimation', [
121
- state('animated-down', style({ height: '*', overflow: 'hidden' })),
122
- transition('* => animated-down', [
123
- style({ height: 0, overflow: 'hidden' }),
124
- animate(DATEPICKER_ANIMATION_TIMING)
125
- ]),
126
- state('animated-up', style({ height: '*', overflow: 'hidden' })),
127
- transition('* => animated-up', [
128
- style({ height: '*', overflow: 'hidden' }),
129
- animate(DATEPICKER_ANIMATION_TIMING)
130
- ]),
131
- transition('* => unanimated', animate('0s'))
132
- ]);
133
-
134
- class BsDatepickerAbstractComponent {
135
- constructor() {
136
- this.containerClass = '';
137
- this.customRanges = [];
138
- this.chosenRange = [];
139
- this._daysCalendarSub = new Subscription();
140
- this.selectedTimeSub = new Subscription();
141
- }
142
- set minDate(value) {
143
- var _a;
144
- (_a = this._effects) === null || _a === void 0 ? void 0 : _a.setMinDate(value);
145
- }
146
- set maxDate(value) {
147
- var _a;
148
- (_a = this._effects) === null || _a === void 0 ? void 0 : _a.setMaxDate(value);
149
- }
150
- set daysDisabled(value) {
151
- var _a;
152
- (_a = this._effects) === null || _a === void 0 ? void 0 : _a.setDaysDisabled(value);
153
- }
154
- set datesDisabled(value) {
155
- var _a;
156
- (_a = this._effects) === null || _a === void 0 ? void 0 : _a.setDatesDisabled(value);
157
- }
158
- set datesEnabled(value) {
159
- var _a;
160
- (_a = this._effects) === null || _a === void 0 ? void 0 : _a.setDatesEnabled(value);
161
- }
162
- set isDisabled(value) {
163
- var _a;
164
- (_a = this._effects) === null || _a === void 0 ? void 0 : _a.setDisabled(value);
165
- }
166
- set dateCustomClasses(value) {
167
- var _a;
168
- (_a = this._effects) === null || _a === void 0 ? void 0 : _a.setDateCustomClasses(value);
169
- }
170
- set dateTooltipTexts(value) {
171
- var _a;
172
- (_a = this._effects) === null || _a === void 0 ? void 0 : _a.setDateTooltipTexts(value);
173
- }
174
- set daysCalendar$(value) {
175
- this._daysCalendar$ = value;
176
- this._daysCalendarSub.unsubscribe();
177
- this._daysCalendarSub.add(this._daysCalendar$.subscribe(value => {
178
- this.multipleCalendars = !!value && value.length > 1;
179
- }));
180
- }
181
- get daysCalendar$() {
182
- return this._daysCalendar$;
183
- }
184
- // todo: valorkin fix
185
- // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-function
186
- setViewMode(event) { }
187
- // eslint-disable-next-line
188
- navigateTo(event) { }
189
- // eslint-disable-next-line
190
- dayHoverHandler(event) { }
191
- // eslint-disable-next-line
192
- weekHoverHandler(event) { }
193
- // eslint-disable-next-line
194
- monthHoverHandler(event) { }
195
- // eslint-disable-next-line
196
- yearHoverHandler(event) { }
197
- // eslint-disable-next-line
198
- timeSelectHandler(date, index) { }
199
- // eslint-disable-next-line
200
- daySelectHandler(day) { }
201
- // eslint-disable-next-line
202
- monthSelectHandler(event) { }
203
- // eslint-disable-next-line
204
- yearSelectHandler(event) { }
205
- // eslint-disable-next-line
206
- setRangeOnCalendar(dates) { }
207
- // eslint-disable-next-line
208
- setToday() { }
209
- // eslint-disable-next-line
210
- clearDate() { }
211
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
212
- _stopPropagation(event) {
213
- event.stopPropagation();
214
- }
215
- }
216
-
217
- class BsDatepickerActions {
218
- calculate() {
219
- return { type: BsDatepickerActions.CALCULATE };
220
- }
221
- format() {
222
- return { type: BsDatepickerActions.FORMAT };
223
- }
224
- flag() {
225
- return { type: BsDatepickerActions.FLAG };
226
- }
227
- select(date) {
228
- return {
229
- type: BsDatepickerActions.SELECT,
230
- payload: date
231
- };
232
- }
233
- selectTime(date, index) {
234
- return {
235
- type: BsDatepickerActions.SELECT_TIME,
236
- payload: { date, index },
237
- };
238
- }
239
- changeViewMode(event) {
240
- return {
241
- type: BsDatepickerActions.CHANGE_VIEWMODE,
242
- payload: event
243
- };
244
- }
245
- navigateTo(event) {
246
- return {
247
- type: BsDatepickerActions.NAVIGATE_TO,
248
- payload: event
249
- };
250
- }
251
- navigateStep(step) {
252
- return {
253
- type: BsDatepickerActions.NAVIGATE_OFFSET,
254
- payload: step
255
- };
256
- }
257
- setOptions(options) {
258
- return {
259
- type: BsDatepickerActions.SET_OPTIONS,
260
- payload: options
261
- };
262
- }
263
- // date range picker
264
- selectRange(value) {
265
- return {
266
- type: BsDatepickerActions.SELECT_RANGE,
267
- payload: value
268
- };
269
- }
270
- hoverDay(event) {
271
- return {
272
- type: BsDatepickerActions.HOVER,
273
- payload: event.isHovered ? event.cell.date : null
274
- };
275
- }
276
- minDate(date) {
277
- return {
278
- type: BsDatepickerActions.SET_MIN_DATE,
279
- payload: date
280
- };
281
- }
282
- maxDate(date) {
283
- return {
284
- type: BsDatepickerActions.SET_MAX_DATE,
285
- payload: date
286
- };
287
- }
288
- daysDisabled(days) {
289
- return {
290
- type: BsDatepickerActions.SET_DAYSDISABLED,
291
- payload: days
292
- };
293
- }
294
- datesDisabled(dates) {
295
- return {
296
- type: BsDatepickerActions.SET_DATESDISABLED,
297
- payload: dates
298
- };
299
- }
300
- datesEnabled(dates) {
301
- return {
302
- type: BsDatepickerActions.SET_DATESENABLED,
303
- payload: dates
304
- };
305
- }
306
- isDisabled(value) {
307
- return {
308
- type: BsDatepickerActions.SET_IS_DISABLED,
309
- payload: value
310
- };
311
- }
312
- setDateCustomClasses(value) {
313
- return {
314
- type: BsDatepickerActions.SET_DATE_CUSTOM_CLASSES,
315
- payload: value
316
- };
317
- }
318
- setDateTooltipTexts(value) {
319
- return {
320
- type: BsDatepickerActions.SET_DATE_TOOLTIP_TEXTS,
321
- payload: value
322
- };
323
- }
324
- setLocale(locale) {
325
- return {
326
- type: BsDatepickerActions.SET_LOCALE,
327
- payload: locale
328
- };
329
- }
330
- }
331
- BsDatepickerActions.CALCULATE = '[datepicker] calculate dates matrix';
332
- BsDatepickerActions.FORMAT = '[datepicker] format datepicker values';
333
- BsDatepickerActions.FLAG = '[datepicker] set flags';
334
- BsDatepickerActions.SELECT = '[datepicker] select date';
335
- BsDatepickerActions.NAVIGATE_OFFSET = '[datepicker] shift view date';
336
- BsDatepickerActions.NAVIGATE_TO = '[datepicker] change view date';
337
- BsDatepickerActions.SET_OPTIONS = '[datepicker] update render options';
338
- BsDatepickerActions.HOVER = '[datepicker] hover date';
339
- BsDatepickerActions.CHANGE_VIEWMODE = '[datepicker] switch view mode';
340
- BsDatepickerActions.SET_MIN_DATE = '[datepicker] set min date';
341
- BsDatepickerActions.SET_MAX_DATE = '[datepicker] set max date';
342
- BsDatepickerActions.SET_DAYSDISABLED = '[datepicker] set days disabled';
343
- BsDatepickerActions.SET_DATESDISABLED = '[datepicker] set dates disabled';
344
- BsDatepickerActions.SET_DATESENABLED = '[datepicker] set dates enabled';
345
- BsDatepickerActions.SET_IS_DISABLED = '[datepicker] set is disabled';
346
- BsDatepickerActions.SET_DATE_CUSTOM_CLASSES = '[datepicker] set date custom classes';
347
- BsDatepickerActions.SET_DATE_TOOLTIP_TEXTS = '[datepicker] set date tooltip texts';
348
- BsDatepickerActions.SET_LOCALE = '[datepicker] set datepicker locale';
349
- BsDatepickerActions.SELECT_TIME = '[datepicker] select time';
350
- BsDatepickerActions.SELECT_RANGE = '[daterangepicker] select dates range';
351
- BsDatepickerActions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerActions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
352
- BsDatepickerActions.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerActions, providedIn: 'platform' });
353
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerActions, decorators: [{
354
- type: Injectable,
355
- args: [{ providedIn: 'platform' }]
356
- }] });
357
-
358
- class BsLocaleService {
359
- constructor() {
360
- this._defaultLocale = 'en';
361
- this._locale = new BehaviorSubject(this._defaultLocale);
362
- this._localeChange = this._locale.asObservable();
363
- }
364
- get locale() {
365
- return this._locale;
366
- }
367
- get localeChange() {
368
- return this._localeChange;
369
- }
370
- get currentLocale() {
371
- return this._locale.getValue();
372
- }
373
- use(locale) {
374
- if (locale === this.currentLocale) {
375
- return;
376
- }
377
- this._locale.next(locale);
378
- }
379
- }
380
- BsLocaleService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsLocaleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
381
- BsLocaleService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsLocaleService, providedIn: 'platform' });
382
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsLocaleService, decorators: [{
383
- type: Injectable,
384
- args: [{ providedIn: 'platform' }]
385
- }] });
386
-
387
- class BsDatepickerEffects {
388
- constructor(_actions, _localeService) {
389
- this._actions = _actions;
390
- this._localeService = _localeService;
391
- this._subs = [];
392
- }
393
- init(_bsDatepickerStore) {
394
- this._store = _bsDatepickerStore;
395
- return this;
396
- }
397
- /** setters */
398
- setValue(value) {
399
- var _a;
400
- (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.select(value));
401
- }
402
- setRangeValue(value) {
403
- var _a;
404
- (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.selectRange(value));
405
- }
406
- setMinDate(value) {
407
- var _a;
408
- (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.minDate(value));
409
- return this;
410
- }
411
- setMaxDate(value) {
412
- var _a;
413
- (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.maxDate(value));
414
- return this;
415
- }
416
- setDaysDisabled(value) {
417
- var _a;
418
- (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.daysDisabled(value));
419
- return this;
420
- }
421
- setDatesDisabled(value) {
422
- var _a;
423
- (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.datesDisabled(value));
424
- return this;
425
- }
426
- setDatesEnabled(value) {
427
- var _a;
428
- (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.datesEnabled(value));
429
- return this;
430
- }
431
- setDisabled(value) {
432
- var _a;
433
- (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.isDisabled(value));
434
- return this;
435
- }
436
- setDateCustomClasses(value) {
437
- var _a;
438
- (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.setDateCustomClasses(value));
439
- return this;
440
- }
441
- setDateTooltipTexts(value) {
442
- var _a;
443
- (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.setDateTooltipTexts(value));
444
- return this;
445
- }
446
- /* Set rendering options */
447
- setOptions(_config) {
448
- var _a;
449
- const _options = Object.assign({ locale: this._localeService.currentLocale }, _config);
450
- (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.setOptions(_options));
451
- return this;
452
- }
453
- /** view to mode bindings */
454
- setBindings(container) {
455
- if (!this._store) {
456
- return this;
457
- }
458
- container.selectedTime = this._store.select(state => state.selectedTime)
459
- .pipe(filter(times => !!times));
460
- container.daysCalendar$ = this._store.select(state => state.flaggedMonths)
461
- .pipe(filter(months => !!months));
462
- // month calendar
463
- container.monthsCalendar = this._store.select(state => state.flaggedMonthsCalendar)
464
- .pipe(filter(months => !!months));
465
- // year calendar
466
- container.yearsCalendar = this._store.select(state => state.yearsCalendarFlagged)
467
- .pipe(filter(years => !!years));
468
- container.viewMode = this._store.select(state => { var _a; return (_a = state.view) === null || _a === void 0 ? void 0 : _a.mode; });
469
- container.options$ = combineLatest([
470
- this._store.select(state => state.showWeekNumbers),
471
- this._store.select(state => state.displayMonths)
472
- ])
473
- .pipe(map((latest) => ({
474
- showWeekNumbers: latest[0],
475
- displayMonths: latest[1]
476
- })));
477
- return this;
478
- }
479
- /** event handlers */
480
- setEventHandlers(container) {
481
- container.setViewMode = (event) => {
482
- var _a;
483
- (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.changeViewMode(event));
484
- };
485
- container.navigateTo = (event) => {
486
- var _a;
487
- (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.navigateStep(event.step));
488
- };
489
- container.dayHoverHandler = (event) => {
490
- var _a;
491
- const _cell = event.cell;
492
- if (_cell.isOtherMonth || _cell.isDisabled) {
493
- return;
494
- }
495
- (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.hoverDay(event));
496
- _cell.isHovered = event.isHovered;
497
- };
498
- container.monthHoverHandler = (event) => {
499
- event.cell.isHovered = event.isHovered;
500
- };
501
- container.yearHoverHandler = (event) => {
502
- event.cell.isHovered = event.isHovered;
503
- };
504
- return this;
505
- }
506
- registerDatepickerSideEffects() {
507
- if (!this._store) {
508
- return this;
509
- }
510
- this._subs.push(this._store.select(state => state.view).subscribe(() => {
511
- var _a;
512
- (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.calculate());
513
- }));
514
- // format calendar values on month model change
515
- this._subs.push(this._store
516
- .select(state => state.monthsModel)
517
- .pipe(filter(monthModel => !!monthModel))
518
- .subscribe(() => { var _a; return (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.format()); }));
519
- // flag day values
520
- this._subs.push(this._store
521
- .select(state => state.formattedMonths)
522
- .pipe(filter(month => !!month))
523
- .subscribe(() => { var _a; return (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.flag()); }));
524
- // flag day values
525
- this._subs.push(this._store
526
- .select(state => state.selectedDate)
527
- .pipe(filter(selectedDate => !!selectedDate))
528
- .subscribe(() => { var _a; return (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.flag()); }));
529
- // flag for date range picker
530
- this._subs.push(this._store
531
- .select(state => state.selectedRange)
532
- .pipe(filter(selectedRange => !!selectedRange))
533
- .subscribe(() => { var _a; return (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.flag()); }));
534
- // monthsCalendar
535
- this._subs.push(this._store
536
- .select(state => state.monthsCalendar)
537
- .subscribe(() => { var _a; return (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.flag()); }));
538
- // years calendar
539
- this._subs.push(this._store
540
- .select(state => state.yearsCalendarModel)
541
- .pipe(filter(state => !!state))
542
- .subscribe(() => { var _a; return (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.flag()); }));
543
- // on hover
544
- this._subs.push(this._store
545
- .select(state => state.hoveredDate)
546
- .pipe(filter(hoveredDate => !!hoveredDate))
547
- .subscribe(() => { var _a; return (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.flag()); }));
548
- // date custom classes
549
- this._subs.push(this._store
550
- .select(state => state.dateCustomClasses)
551
- .pipe(filter(dateCustomClasses => !!dateCustomClasses))
552
- .subscribe(() => { var _a; return (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.flag()); }));
553
- // date tooltip texts
554
- this._subs.push(this._store
555
- .select(state => state.dateTooltipTexts)
556
- .pipe(filter(dateTooltipTexts => !!dateTooltipTexts))
557
- .subscribe(() => { var _a; return (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.flag()); }));
558
- // on locale change
559
- this._subs.push(this._localeService.localeChange
560
- .subscribe(locale => { var _a; return (_a = this._store) === null || _a === void 0 ? void 0 : _a.dispatch(this._actions.setLocale(locale)); }));
561
- return this;
562
- }
563
- destroy() {
564
- for (const sub of this._subs) {
565
- sub.unsubscribe();
566
- }
567
- }
568
- }
569
- BsDatepickerEffects.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerEffects, deps: [{ token: BsDatepickerActions }, { token: BsLocaleService }], target: i0.ɵɵFactoryTarget.Injectable });
570
- BsDatepickerEffects.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerEffects, providedIn: 'platform' });
571
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerEffects, decorators: [{
572
- type: Injectable,
573
- args: [{ providedIn: 'platform' }]
574
- }], ctorParameters: function () { return [{ type: BsDatepickerActions }, { type: BsLocaleService }]; } });
575
-
576
- const defaultMonthOptions = {
577
- width: 7,
578
- height: 6
579
- };
580
- const dayInMilliseconds = 24 * 60 * 60 * 1000;
581
-
582
- class BsDatepickerState {
583
- constructor() {
584
- // DatepickerRenderOptions
585
- this.showWeekNumbers = true;
586
- this.displayMonths = 1;
587
- }
588
- }
589
- const _initialView = { date: new Date(), mode: 'day' };
590
- const initialDatepickerState = Object.assign(new BsDatepickerConfig(), {
591
- locale: 'en',
592
- view: _initialView,
593
- selectedRange: [],
594
- selectedTime: [],
595
- monthViewOptions: defaultMonthOptions
596
- });
597
-
598
- function getStartingDayOfCalendar(date, options) {
599
- if (isFirstDayOfWeek(date, options.firstDayOfWeek)) {
600
- return date;
601
- }
602
- const weekDay = getDay(date);
603
- const offset = calculateDateOffset(weekDay, options.firstDayOfWeek);
604
- return shiftDate(date, { day: -offset });
605
- }
606
- function calculateDateOffset(weekday, startingDayOffset) {
607
- const _startingDayOffset = Number(startingDayOffset);
608
- if (isNaN(_startingDayOffset)) {
609
- return 0;
610
- }
611
- if (_startingDayOffset === 0) {
612
- return weekday;
613
- }
614
- const offset = weekday - _startingDayOffset % 7;
615
- return offset < 0 ? offset + 7 : offset;
616
- }
617
- function isMonthDisabled(date, min, max) {
618
- const minBound = min && isBefore(endOf(date, 'month'), min, 'day');
619
- const maxBound = max && isAfter(startOf(date, 'month'), max, 'day');
620
- return minBound || maxBound || false;
621
- }
622
- function isYearDisabled(date, min, max) {
623
- const minBound = min && isBefore(endOf(date, 'year'), min, 'day');
624
- const maxBound = max && isAfter(startOf(date, 'year'), max, 'day');
625
- return minBound || maxBound || false;
626
- }
627
- function isDisabledDate(date, datesDisabled, unit) {
628
- if (!datesDisabled || !isArray(datesDisabled) || !datesDisabled.length) {
629
- return false;
630
- }
631
- if (unit && unit === 'year' && !datesDisabled[0].getDate()) {
632
- return datesDisabled.some((dateDisabled) => isSame(date, dateDisabled, 'year'));
633
- }
634
- return datesDisabled.some((dateDisabled) => isSame(date, dateDisabled, 'date'));
635
- }
636
- function isEnabledDate(date, datesEnabled, unit) {
637
- if (!datesEnabled || !isArray(datesEnabled) || !datesEnabled.length) {
638
- return false;
639
- }
640
- return !datesEnabled.some((enabledDate) => isSame(date, enabledDate, unit || 'date'));
641
- }
642
- function getYearsCalendarInitialDate(state, calendarIndex = 0) {
643
- const model = state && state.yearsCalendarModel && state.yearsCalendarModel[calendarIndex];
644
- return (model === null || model === void 0 ? void 0 : model.years[0]) && model.years[0][0] && model.years[0][0].date;
645
- }
646
- function checkRangesWithMaxDate(ranges, maxDate) {
647
- if (!ranges)
648
- return ranges;
649
- if (!maxDate)
650
- return ranges;
651
- if (!ranges.length && !ranges[0].value)
652
- return ranges;
653
- ranges.forEach((item) => {
654
- if (!item || !item.value)
655
- return ranges;
656
- if (item.value instanceof Date)
657
- return ranges;
658
- if (!(item.value instanceof Array && item.value.length))
659
- return ranges;
660
- item.value = compareDateWithMaxDateHelper(item.value, maxDate);
661
- return ranges;
662
- });
663
- return ranges;
664
- }
665
- function checkBsValue(date, maxDate) {
666
- if (!date)
667
- return date;
668
- if (!maxDate)
669
- return date;
670
- if (date instanceof Array && !date.length)
671
- return date;
672
- if (date instanceof Date)
673
- return date;
674
- return compareDateWithMaxDateHelper(date, maxDate);
675
- }
676
- function compareDateWithMaxDateHelper(date, maxDate) {
677
- if (date instanceof Array) {
678
- const editedValues = date.map(item => {
679
- if (!item)
680
- return item;
681
- if (isAfter(item, maxDate, 'date'))
682
- item = maxDate;
683
- return item;
684
- });
685
- return editedValues;
686
- }
687
- return date;
688
- }
689
- function setCurrentTimeOnDateSelect(value) {
690
- if (!value)
691
- return value;
692
- return setCurrentTimeHelper(value);
693
- }
694
- function setDateRangesCurrentTimeOnDateSelect(value) {
695
- if (!(value === null || value === void 0 ? void 0 : value.length))
696
- return value;
697
- value.map((date) => {
698
- if (!date) {
699
- return date;
700
- }
701
- return setCurrentTimeHelper(date);
702
- });
703
- return value;
704
- }
705
- function setCurrentTimeHelper(date) {
706
- const now = new Date();
707
- date.setMilliseconds(now.getMilliseconds());
708
- date.setSeconds(now.getSeconds());
709
- date.setMinutes(now.getMinutes());
710
- date.setHours(now.getHours());
711
- return date;
712
- }
713
-
714
- function createMatrix(options, fn) {
715
- let prevValue = options.initialDate;
716
- const matrix = new Array(options.height);
717
- for (let i = 0; i < options.height; i++) {
718
- matrix[i] = new Array(options.width);
719
- for (let j = 0; j < options.width; j++) {
720
- matrix[i][j] = fn(prevValue);
721
- prevValue = shiftDate(prevValue, options.shift);
722
- }
723
- }
724
- return matrix;
725
- }
726
-
727
- // user and model input should handle parsing and validating input values
728
- function calcDaysCalendar(startingDate, options) {
729
- const firstDay = getFirstDayOfMonth(startingDate);
730
- const initialDate = getStartingDayOfCalendar(firstDay, options);
731
- // todo test
732
- const matrixOptions = {
733
- width: options.width || 0,
734
- height: options.height || 0,
735
- initialDate,
736
- shift: { day: 1 }
737
- };
738
- const daysMatrix = createMatrix(matrixOptions, date => date);
739
- return {
740
- daysMatrix,
741
- month: firstDay
742
- };
743
- }
744
-
745
- function formatDaysCalendar(daysCalendar, formatOptions, monthIndex) {
746
- return {
747
- month: daysCalendar.month,
748
- monthTitle: formatDate(daysCalendar.month, formatOptions.monthTitle, formatOptions.locale),
749
- yearTitle: formatDate(daysCalendar.month, formatOptions.yearTitle, formatOptions.locale),
750
- weekNumbers: getWeekNumbers(daysCalendar.daysMatrix, formatOptions.weekNumbers, formatOptions.locale),
751
- weekdays: getShiftedWeekdays(formatOptions.locale),
752
- weeks: daysCalendar.daysMatrix.map((week, weekIndex) => ({
753
- days: week.map((date, dayIndex) => ({
754
- date,
755
- label: formatDate(date, formatOptions.dayLabel, formatOptions.locale),
756
- monthIndex,
757
- weekIndex,
758
- dayIndex
759
- }))
760
- })),
761
- hideLeftArrow: false,
762
- hideRightArrow: false,
763
- disableLeftArrow: false,
764
- disableRightArrow: false
765
- };
766
- }
767
- function getWeekNumbers(daysMatrix, format, locale) {
768
- return daysMatrix.map((days) => (days[0] ? formatDate(days[0], format, locale) : ''));
769
- }
770
- function getShiftedWeekdays(locale) {
771
- const _locale = getLocale(locale);
772
- const weekdays = _locale.weekdaysShort();
773
- const firstDayOfWeek = _locale.firstDayOfWeek();
774
- return [...weekdays.slice(firstDayOfWeek), ...weekdays.slice(0, firstDayOfWeek)];
775
- }
776
-
777
- function flagDaysCalendar(formattedMonth, options) {
778
- formattedMonth.weeks.forEach((week) => {
779
- week.days.forEach((day, dayIndex) => {
780
- // datepicker
781
- const isOtherMonth = !isSameMonth(day.date, formattedMonth.month);
782
- const isHovered = !isOtherMonth && isSameDay(day.date, options.hoveredDate);
783
- // date range picker
784
- const isSelectionStart = !isOtherMonth &&
785
- options.selectedRange &&
786
- isSameDay(day.date, options.selectedRange[0]);
787
- const isSelectionEnd = !isOtherMonth &&
788
- options.selectedRange &&
789
- isSameDay(day.date, options.selectedRange[1]);
790
- const isSelected = (!isOtherMonth && isSameDay(day.date, options.selectedDate)) ||
791
- isSelectionStart ||
792
- isSelectionEnd;
793
- const isInRange = !isOtherMonth &&
794
- options.selectedRange &&
795
- isDateInRange(day.date, options.selectedRange, options.hoveredDate);
796
- const isDisabled = options.isDisabled ||
797
- isBefore(day.date, options.minDate, 'day') ||
798
- isAfter(day.date, options.maxDate, 'day') ||
799
- isDisabledDay(day.date, options.daysDisabled) ||
800
- isDisabledDate(day.date, options.datesDisabled) ||
801
- isEnabledDate(day.date, options.datesEnabled);
802
- const currentDate = new Date();
803
- const isToday = !isOtherMonth && isSameDay(day.date, currentDate);
804
- const customClasses = options.dateCustomClasses && options.dateCustomClasses
805
- .map(dcc => isSameDay(day.date, dcc.date) ? dcc.classes : [])
806
- .reduce((previousValue, currentValue) => previousValue.concat(currentValue), [])
807
- .join(' ')
808
- || '';
809
- const tooltipText = options.dateTooltipTexts && options.dateTooltipTexts
810
- .map(tt => isSameDay(day.date, tt.date) ? tt.tooltipText : '')
811
- .reduce((previousValue, currentValue) => {
812
- previousValue.push(currentValue);
813
- return previousValue;
814
- }, [])
815
- .join(' ')
816
- || '';
817
- // decide update or not
818
- const newDay = Object.assign({}, day, {
819
- isOtherMonth,
820
- isHovered,
821
- isSelected,
822
- isSelectionStart,
823
- isSelectionEnd,
824
- isInRange,
825
- isDisabled,
826
- isToday,
827
- customClasses,
828
- tooltipText
829
- });
830
- if (day.isOtherMonth !== newDay.isOtherMonth ||
831
- day.isHovered !== newDay.isHovered ||
832
- day.isSelected !== newDay.isSelected ||
833
- day.isSelectionStart !== newDay.isSelectionStart ||
834
- day.isSelectionEnd !== newDay.isSelectionEnd ||
835
- day.isDisabled !== newDay.isDisabled ||
836
- day.isInRange !== newDay.isInRange ||
837
- day.customClasses !== newDay.customClasses ||
838
- day.tooltipText !== newDay.tooltipText) {
839
- week.days[dayIndex] = newDay;
840
- }
841
- });
842
- });
843
- // todo: add check for linked calendars
844
- formattedMonth.hideLeftArrow =
845
- options.isDisabled ||
846
- (!!options.monthIndex && options.monthIndex > 0 && options.monthIndex !== options.displayMonths);
847
- formattedMonth.hideRightArrow =
848
- options.isDisabled ||
849
- ((!!options.monthIndex || options.monthIndex === 0) && !!options.displayMonths && options.monthIndex < options.displayMonths &&
850
- options.monthIndex + 1 !== options.displayMonths);
851
- formattedMonth.disableLeftArrow = isMonthDisabled(shiftDate(formattedMonth.month, { month: -1 }), options.minDate, options.maxDate);
852
- formattedMonth.disableRightArrow = isMonthDisabled(shiftDate(formattedMonth.month, { month: 1 }), options.minDate, options.maxDate);
853
- return formattedMonth;
854
- }
855
- function isDateInRange(date, selectedRange, hoveredDate) {
856
- if (!date || !selectedRange || !selectedRange[0]) {
857
- return false;
858
- }
859
- if (selectedRange[1]) {
860
- return date > selectedRange[0] && date <= selectedRange[1];
861
- }
862
- if (hoveredDate) {
863
- return date > selectedRange[0] && date <= hoveredDate;
864
- }
865
- return false;
866
- }
867
-
868
- function canSwitchMode(mode, minMode) {
869
- return minMode ? mode >= minMode : true;
870
- }
871
-
872
- const height$1 = 4;
873
- const width$1 = 3;
874
- const shift$1 = { month: 1 };
875
- function formatMonthsCalendar(viewDate, formatOptions) {
876
- const initialDate = startOf(viewDate, 'year');
877
- const matrixOptions = { width: width$1, height: height$1, initialDate, shift: shift$1 };
878
- const monthMatrix = createMatrix(matrixOptions, date => ({
879
- date,
880
- label: formatDate(date, formatOptions.monthLabel, formatOptions.locale)
881
- }));
882
- return {
883
- months: monthMatrix,
884
- monthTitle: '',
885
- yearTitle: formatDate(viewDate, formatOptions.yearTitle, formatOptions.locale),
886
- hideRightArrow: false,
887
- hideLeftArrow: false,
888
- disableRightArrow: false,
889
- disableLeftArrow: false
890
- };
891
- }
892
-
893
- function flagMonthsCalendar(monthCalendar, options) {
894
- monthCalendar.months.forEach((months, rowIndex) => {
895
- months.forEach((month, monthIndex) => {
896
- let isSelected;
897
- const isHovered = isSameMonth(month.date, options.hoveredMonth);
898
- const isDisabled = options.isDisabled ||
899
- isDisabledDate(month.date, options.datesDisabled) ||
900
- isEnabledDate(month.date, options.datesEnabled, 'month') ||
901
- isMonthDisabled(month.date, options.minDate, options.maxDate);
902
- if (!options.selectedDate && options.selectedRange) {
903
- isSelected = isSameMonth(month.date, options.selectedRange[0]);
904
- if (!isSelected) {
905
- isSelected = isSameMonth(month.date, options.selectedRange[1]);
906
- }
907
- }
908
- else {
909
- isSelected = isSameMonth(month.date, options.selectedDate);
910
- }
911
- const newMonth = Object.assign(/*{},*/ month, {
912
- isHovered,
913
- isDisabled,
914
- isSelected
915
- });
916
- if (month.isHovered !== newMonth.isHovered ||
917
- month.isDisabled !== newMonth.isDisabled ||
918
- month.isSelected !== newMonth.isSelected) {
919
- monthCalendar.months[rowIndex][monthIndex] = newMonth;
920
- }
921
- });
922
- });
923
- // todo: add check for linked calendars
924
- monthCalendar.hideLeftArrow =
925
- !!options.monthIndex && options.monthIndex > 0 && options.monthIndex !== options.displayMonths;
926
- monthCalendar.hideRightArrow =
927
- (!!options.monthIndex || options.monthIndex === 0)
928
- && (!!options.displayMonths || options.displayMonths === 0)
929
- && options.monthIndex < options.displayMonths
930
- && options.monthIndex + 1 !== options.displayMonths;
931
- monthCalendar.disableLeftArrow = isYearDisabled(shiftDate(monthCalendar.months[0][0].date, { year: -1 }), options.minDate, options.maxDate);
932
- monthCalendar.disableRightArrow = isYearDisabled(shiftDate(monthCalendar.months[0][0].date, { year: 1 }), options.minDate, options.maxDate);
933
- return monthCalendar;
934
- }
935
-
936
- const height = 4;
937
- const width = 4;
938
- const yearsPerCalendar = height * width;
939
- const initialYearShift = (Math.floor(yearsPerCalendar / 2) - 1) * -1;
940
- const shift = { year: 1 };
941
- function formatYearsCalendar(viewDate, formatOptions, previousInitialDate) {
942
- const initialDate = calculateInitialDate(viewDate, previousInitialDate);
943
- const matrixOptions = { width, height, initialDate, shift };
944
- const yearsMatrix = createMatrix(matrixOptions, date => ({
945
- date,
946
- label: formatDate(date, formatOptions.yearLabel, formatOptions.locale)
947
- }));
948
- const yearTitle = formatYearRangeTitle(yearsMatrix, formatOptions);
949
- return {
950
- years: yearsMatrix,
951
- monthTitle: '',
952
- yearTitle,
953
- hideLeftArrow: false,
954
- hideRightArrow: false,
955
- disableLeftArrow: false,
956
- disableRightArrow: false
957
- };
958
- }
959
- function calculateInitialDate(viewDate, previousInitialDate) {
960
- if (previousInitialDate
961
- && viewDate.getFullYear() >= previousInitialDate.getFullYear()
962
- && viewDate.getFullYear() < previousInitialDate.getFullYear() + yearsPerCalendar) {
963
- return previousInitialDate;
964
- }
965
- return shiftDate(viewDate, { year: initialYearShift });
966
- }
967
- function formatYearRangeTitle(yearsMatrix, formatOptions) {
968
- const from = formatDate(yearsMatrix[0][0].date, formatOptions.yearTitle, formatOptions.locale);
969
- const to = formatDate(yearsMatrix[height - 1][width - 1].date, formatOptions.yearTitle, formatOptions.locale);
970
- return `${from} - ${to}`;
971
- }
972
-
973
- function flagYearsCalendar(yearsCalendar, options) {
974
- yearsCalendar.years.forEach((years, rowIndex) => {
975
- years.forEach((year, yearIndex) => {
976
- let isSelected;
977
- const isHovered = isSameYear(year.date, options.hoveredYear);
978
- const isDisabled = options.isDisabled ||
979
- isDisabledDate(year.date, options.datesDisabled, 'year') ||
980
- isEnabledDate(year.date, options.datesEnabled, 'year') ||
981
- isYearDisabled(year.date, options.minDate, options.maxDate);
982
- if (!options.selectedDate && options.selectedRange) {
983
- isSelected = isSameYear(year.date, options.selectedRange[0]);
984
- if (!isSelected) {
985
- isSelected = isSameYear(year.date, options.selectedRange[1]);
986
- }
987
- }
988
- else {
989
- isSelected = isSameYear(year.date, options.selectedDate);
990
- }
991
- const newMonth = Object.assign(/*{},*/ year, { isHovered, isDisabled, isSelected });
992
- if (year.isHovered !== newMonth.isHovered ||
993
- year.isDisabled !== newMonth.isDisabled ||
994
- year.isSelected !== newMonth.isSelected) {
995
- yearsCalendar.years[rowIndex][yearIndex] = newMonth;
996
- }
997
- });
998
- });
999
- // todo: add check for linked calendars
1000
- yearsCalendar.hideLeftArrow =
1001
- !!options.yearIndex && options.yearIndex > 0 && options.yearIndex !== options.displayMonths;
1002
- yearsCalendar.hideRightArrow =
1003
- !!options.yearIndex && !!options.displayMonths &&
1004
- options.yearIndex < options.displayMonths &&
1005
- options.yearIndex + 1 !== options.displayMonths;
1006
- yearsCalendar.disableLeftArrow = isYearDisabled(shiftDate(yearsCalendar.years[0][0].date, { year: -1 }), options.minDate, options.maxDate);
1007
- const i = yearsCalendar.years.length - 1;
1008
- const j = yearsCalendar.years[i].length - 1;
1009
- yearsCalendar.disableRightArrow = isYearDisabled(shiftDate(yearsCalendar.years[i][j].date, { year: 1 }), options.minDate, options.maxDate);
1010
- return yearsCalendar;
1011
- }
1012
-
1013
- function copyTime(sourceDate, time) {
1014
- if (!sourceDate || !isNaN(sourceDate.getTime())) {
1015
- return;
1016
- }
1017
- sourceDate.setHours(time.getHours());
1018
- sourceDate.setMinutes(time.getMinutes());
1019
- sourceDate.setSeconds(time.getSeconds());
1020
- sourceDate.setMilliseconds(time.getMilliseconds());
1021
- }
1022
-
1023
- function bsDatepickerReducer(state = initialDatepickerState, action) {
1024
- var _a;
1025
- switch (action.type) {
1026
- case BsDatepickerActions.CALCULATE: {
1027
- return calculateReducer(state);
1028
- }
1029
- case BsDatepickerActions.FORMAT: {
1030
- return formatReducer(state);
1031
- }
1032
- case BsDatepickerActions.FLAG: {
1033
- return flagReducer(state);
1034
- }
1035
- case BsDatepickerActions.NAVIGATE_OFFSET: {
1036
- return navigateOffsetReducer(state, action);
1037
- }
1038
- case BsDatepickerActions.NAVIGATE_TO: {
1039
- const payload = action.payload;
1040
- if (!state.view || !payload.unit) {
1041
- return state;
1042
- }
1043
- const date = setFullDate(state.view.date, payload.unit);
1044
- let newState;
1045
- let mode;
1046
- if (canSwitchMode(payload.viewMode, state.minMode)) {
1047
- mode = payload.viewMode;
1048
- newState = { view: { date, mode } };
1049
- }
1050
- else {
1051
- mode = state.view.mode;
1052
- newState = { selectedDate: date, view: { date, mode } };
1053
- }
1054
- return Object.assign({}, state, newState);
1055
- }
1056
- case BsDatepickerActions.CHANGE_VIEWMODE: {
1057
- if (!canSwitchMode(action.payload, state.minMode) || !state.view) {
1058
- return state;
1059
- }
1060
- const date = state.view.date;
1061
- const mode = action.payload;
1062
- const newState = { view: { date, mode } };
1063
- return Object.assign({}, state, newState);
1064
- }
1065
- case BsDatepickerActions.HOVER: {
1066
- return Object.assign({}, state, { hoveredDate: action.payload });
1067
- }
1068
- case BsDatepickerActions.SELECT: {
1069
- if (!state.view) {
1070
- return state;
1071
- }
1072
- const newState = {
1073
- selectedDate: action.payload,
1074
- view: state.view
1075
- };
1076
- if (Array.isArray(state.selectedTime)) {
1077
- const _time = state.selectedTime[0];
1078
- if (newState.selectedDate && _time) {
1079
- copyTime(newState.selectedDate, _time);
1080
- }
1081
- }
1082
- const mode = state.view.mode;
1083
- const _date = action.payload || state.view.date;
1084
- const date = getViewDate(_date, state.minDate, state.maxDate);
1085
- newState.view = { mode, date };
1086
- return Object.assign({}, state, newState);
1087
- }
1088
- case BsDatepickerActions.SELECT_TIME: {
1089
- const { date, index } = action.payload;
1090
- const selectedTime = state.selectedTime ? [...state.selectedTime] : [];
1091
- selectedTime[index] = date;
1092
- return Object.assign({}, state, { selectedTime });
1093
- }
1094
- case BsDatepickerActions.SET_OPTIONS: {
1095
- if (!state.view) {
1096
- return state;
1097
- }
1098
- const newState = action.payload;
1099
- // preserve view mode
1100
- const mode = newState.minMode ? newState.minMode : state.view.mode;
1101
- const _viewDate = isDateValid(newState.value) && newState.value
1102
- || isArray(newState.value) && isDateValid(newState.value[0]) && newState.value[0]
1103
- || state.view.date;
1104
- const date = getViewDate(_viewDate, newState.minDate, newState.maxDate);
1105
- newState.view = { mode, date };
1106
- // update selected value
1107
- if (newState.value) {
1108
- // if new value is array we work with date range
1109
- if (isArray(newState.value)) {
1110
- newState.selectedRange = newState.value;
1111
- newState.selectedTime = newState.value.map((i) => i);
1112
- }
1113
- // if new value is a date -> datepicker
1114
- if (newState.value instanceof Date) {
1115
- newState.selectedDate = newState.value;
1116
- newState.selectedTime = [newState.value];
1117
- }
1118
- // provided value is not supported :)
1119
- // need to report it somehow
1120
- }
1121
- return Object.assign({}, state, newState);
1122
- }
1123
- // date range picker
1124
- case BsDatepickerActions.SELECT_RANGE: {
1125
- if (!state.view) {
1126
- return state;
1127
- }
1128
- const newState = {
1129
- selectedRange: action.payload,
1130
- view: state.view
1131
- };
1132
- (_a = newState.selectedRange) === null || _a === void 0 ? void 0 : _a.forEach((dte, index) => {
1133
- if (Array.isArray(state.selectedTime)) {
1134
- const _time = state.selectedTime[index];
1135
- if (_time) {
1136
- copyTime(dte, _time);
1137
- }
1138
- }
1139
- });
1140
- const mode = state.view.mode;
1141
- const _date = action.payload && action.payload[0] || state.view.date;
1142
- const date = getViewDate(_date, state.minDate, state.maxDate);
1143
- newState.view = { mode, date };
1144
- return Object.assign({}, state, newState);
1145
- }
1146
- case BsDatepickerActions.SET_MIN_DATE: {
1147
- return Object.assign({}, state, {
1148
- minDate: action.payload
1149
- });
1150
- }
1151
- case BsDatepickerActions.SET_MAX_DATE: {
1152
- return Object.assign({}, state, {
1153
- maxDate: action.payload
1154
- });
1155
- }
1156
- case BsDatepickerActions.SET_IS_DISABLED: {
1157
- return Object.assign({}, state, {
1158
- isDisabled: action.payload
1159
- });
1160
- }
1161
- case BsDatepickerActions.SET_DATE_CUSTOM_CLASSES: {
1162
- return Object.assign({}, state, {
1163
- dateCustomClasses: action.payload
1164
- });
1165
- }
1166
- case BsDatepickerActions.SET_DATE_TOOLTIP_TEXTS: {
1167
- return Object.assign({}, state, {
1168
- dateTooltipTexts: action.payload
1169
- });
1170
- }
1171
- default:
1172
- return state;
1173
- }
1174
- }
1175
- function calculateReducer(state) {
1176
- if (!state.view) {
1177
- return state;
1178
- }
1179
- // how many calendars
1180
- let displayMonths;
1181
- if (state.displayOneMonthRange &&
1182
- isDisplayOneMonth(state.view.date, state.minDate, state.maxDate)) {
1183
- displayMonths = 1;
1184
- }
1185
- else {
1186
- displayMonths = state.displayMonths || 1;
1187
- }
1188
- // use selected date on initial rendering if set
1189
- let viewDate = state.view.date;
1190
- if (state.view.mode === 'day' && state.monthViewOptions) {
1191
- if (state.showPreviousMonth && state.selectedRange && state.selectedRange.length === 0) {
1192
- viewDate = shiftDate(viewDate, { month: -1 });
1193
- }
1194
- state.monthViewOptions.firstDayOfWeek = getLocale(state.locale).firstDayOfWeek();
1195
- let monthsModel = new Array(displayMonths);
1196
- for (let monthIndex = 0; monthIndex < displayMonths; monthIndex++) {
1197
- // todo: for unlinked calendars it will be harder
1198
- monthsModel[monthIndex] = calcDaysCalendar(viewDate, state.monthViewOptions);
1199
- viewDate = shiftDate(viewDate, { month: 1 });
1200
- }
1201
- // Check if parameter enabled and check if it's not months navigation event
1202
- if (state.preventChangeToNextMonth && state.flaggedMonths && state.hoveredDate) {
1203
- const viewMonth = calcDaysCalendar(state.view.date, state.monthViewOptions);
1204
- // Check if viewed right month same as in flaggedMonths state, then override months model with flaggedMonths
1205
- if (state.flaggedMonths.length && state.flaggedMonths[1].month.getMonth() === viewMonth.month.getMonth()) {
1206
- monthsModel = state.flaggedMonths
1207
- .map(item => {
1208
- if (state.monthViewOptions) {
1209
- return calcDaysCalendar(item.month, state.monthViewOptions);
1210
- }
1211
- return null;
1212
- })
1213
- .filter(item => item !== null);
1214
- }
1215
- }
1216
- return Object.assign({}, state, { monthsModel });
1217
- }
1218
- if (state.view.mode === 'month') {
1219
- const monthsCalendar = new Array(displayMonths);
1220
- for (let calendarIndex = 0; calendarIndex < displayMonths; calendarIndex++) {
1221
- // todo: for unlinked calendars it will be harder
1222
- monthsCalendar[calendarIndex] = formatMonthsCalendar(viewDate, getFormatOptions(state));
1223
- viewDate = shiftDate(viewDate, { year: 1 });
1224
- }
1225
- return Object.assign({}, state, { monthsCalendar });
1226
- }
1227
- if (state.view.mode === 'year') {
1228
- const yearsCalendarModel = new Array(displayMonths);
1229
- for (let calendarIndex = 0; calendarIndex < displayMonths; calendarIndex++) {
1230
- // todo: for unlinked calendars it will be harder
1231
- yearsCalendarModel[calendarIndex] = formatYearsCalendar(viewDate, getFormatOptions(state), state.minMode === 'year' ? getYearsCalendarInitialDate(state, calendarIndex) : undefined);
1232
- viewDate = shiftDate(viewDate, { year: yearsPerCalendar });
1233
- }
1234
- return Object.assign({}, state, { yearsCalendarModel });
1235
- }
1236
- return state;
1237
- }
1238
- function formatReducer(state) {
1239
- if (!state.view) {
1240
- return state;
1241
- }
1242
- if (state.view.mode === 'day' && state.monthsModel) {
1243
- const formattedMonths = state.monthsModel.map((month, monthIndex) => formatDaysCalendar(month, getFormatOptions(state), monthIndex));
1244
- return Object.assign({}, state, { formattedMonths });
1245
- }
1246
- // how many calendars
1247
- const displayMonths = state.displayMonths || 1;
1248
- // check initial rendering
1249
- // use selected date on initial rendering if set
1250
- let viewDate = state.view.date;
1251
- if (state.view.mode === 'month') {
1252
- const monthsCalendar = new Array(displayMonths);
1253
- for (let calendarIndex = 0; calendarIndex < displayMonths; calendarIndex++) {
1254
- // todo: for unlinked calendars it will be harder
1255
- monthsCalendar[calendarIndex] = formatMonthsCalendar(viewDate, getFormatOptions(state));
1256
- viewDate = shiftDate(viewDate, { year: 1 });
1257
- }
1258
- return Object.assign({}, state, { monthsCalendar });
1259
- }
1260
- if (state.view.mode === 'year') {
1261
- const yearsCalendarModel = new Array(displayMonths);
1262
- for (let calendarIndex = 0; calendarIndex < displayMonths; calendarIndex++) {
1263
- // todo: for unlinked calendars it will be harder
1264
- yearsCalendarModel[calendarIndex] = formatYearsCalendar(viewDate, getFormatOptions(state));
1265
- viewDate = shiftDate(viewDate, { year: 16 });
1266
- }
1267
- return Object.assign({}, state, { yearsCalendarModel });
1268
- }
1269
- return state;
1270
- }
1271
- function flagReducer(state) {
1272
- if (!state.view) {
1273
- return state;
1274
- }
1275
- const displayMonths = isDisplayOneMonth(state.view.date, state.minDate, state.maxDate) ? 1 : state.displayMonths;
1276
- if (state.formattedMonths && state.view.mode === 'day') {
1277
- const flaggedMonths = state.formattedMonths.map((formattedMonth, monthIndex) => flagDaysCalendar(formattedMonth, {
1278
- isDisabled: state.isDisabled,
1279
- minDate: state.minDate,
1280
- maxDate: state.maxDate,
1281
- daysDisabled: state.daysDisabled,
1282
- datesDisabled: state.datesDisabled,
1283
- datesEnabled: state.datesEnabled,
1284
- hoveredDate: state.hoveredDate,
1285
- selectedDate: state.selectedDate,
1286
- selectedRange: state.selectedRange,
1287
- displayMonths,
1288
- dateCustomClasses: state.dateCustomClasses,
1289
- dateTooltipTexts: state.dateTooltipTexts,
1290
- monthIndex
1291
- }));
1292
- return Object.assign({}, state, { flaggedMonths });
1293
- }
1294
- if (state.view.mode === 'month' && state.monthsCalendar) {
1295
- const flaggedMonthsCalendar = state.monthsCalendar.map((formattedMonth, monthIndex) => flagMonthsCalendar(formattedMonth, {
1296
- isDisabled: state.isDisabled,
1297
- minDate: state.minDate,
1298
- maxDate: state.maxDate,
1299
- hoveredMonth: state.hoveredMonth,
1300
- selectedDate: state.selectedDate,
1301
- datesDisabled: state.datesDisabled,
1302
- datesEnabled: state.datesEnabled,
1303
- selectedRange: state.selectedRange,
1304
- displayMonths,
1305
- monthIndex
1306
- }));
1307
- return Object.assign({}, state, { flaggedMonthsCalendar });
1308
- }
1309
- if (state.view.mode === 'year' && state.yearsCalendarModel) {
1310
- const yearsCalendarFlagged = state.yearsCalendarModel.map((formattedMonth, yearIndex) => flagYearsCalendar(formattedMonth, {
1311
- isDisabled: state.isDisabled,
1312
- minDate: state.minDate,
1313
- maxDate: state.maxDate,
1314
- hoveredYear: state.hoveredYear,
1315
- selectedDate: state.selectedDate,
1316
- datesDisabled: state.datesDisabled,
1317
- datesEnabled: state.datesEnabled,
1318
- selectedRange: state.selectedRange,
1319
- displayMonths,
1320
- yearIndex
1321
- }));
1322
- return Object.assign({}, state, { yearsCalendarFlagged });
1323
- }
1324
- return state;
1325
- }
1326
- function navigateOffsetReducer(state, action) {
1327
- if (!state.view) {
1328
- return state;
1329
- }
1330
- const date = shiftViewDate(state, action);
1331
- if (!date) {
1332
- return state;
1333
- }
1334
- const newState = {
1335
- view: {
1336
- mode: state.view.mode,
1337
- date
1338
- }
1339
- };
1340
- return Object.assign({}, state, newState);
1341
- }
1342
- function shiftViewDate(state, action) {
1343
- if (!state.view) {
1344
- return undefined;
1345
- }
1346
- if (state.view.mode === 'year' && state.minMode === 'year') {
1347
- const initialDate = getYearsCalendarInitialDate(state, 0);
1348
- if (initialDate) {
1349
- const middleDate = shiftDate(initialDate, { year: -initialYearShift });
1350
- return shiftDate(middleDate, action.payload);
1351
- }
1352
- }
1353
- return shiftDate(startOf(state.view.date, 'month'), action.payload);
1354
- }
1355
- function getFormatOptions(state) {
1356
- return {
1357
- locale: state.locale,
1358
- monthTitle: state.monthTitle,
1359
- yearTitle: state.yearTitle,
1360
- dayLabel: state.dayLabel,
1361
- monthLabel: state.monthLabel,
1362
- yearLabel: state.yearLabel,
1363
- weekNumbers: state.weekNumbers
1364
- };
1365
- }
1366
- /**
1367
- * if view date is provided (bsValue|ngModel) it should be shown
1368
- * if view date is not provider:
1369
- * if minDate>currentDate (default view value), show minDate
1370
- * if maxDate<currentDate(default view value) show maxDate
1371
- */
1372
- function getViewDate(viewDate, minDate, maxDate) {
1373
- const _date = Array.isArray(viewDate) ? viewDate[0] : viewDate;
1374
- if (minDate && isAfter(minDate, _date, 'day')) {
1375
- return minDate;
1376
- }
1377
- if (maxDate && isBefore(maxDate, _date, 'day')) {
1378
- return maxDate;
1379
- }
1380
- return _date;
1381
- }
1382
- function isDisplayOneMonth(viewDate, minDate, maxDate) {
1383
- if (maxDate && isSame(maxDate, viewDate, 'day')) {
1384
- return true;
1385
- }
1386
- return minDate && maxDate && minDate.getMonth() === maxDate.getMonth();
1387
- }
1388
-
1389
- class BsDatepickerStore extends MiniStore {
1390
- constructor() {
1391
- const _dispatcher = new BehaviorSubject({
1392
- type: '[datepicker] dispatcher init'
1393
- });
1394
- const state = new MiniState(initialDatepickerState, _dispatcher, bsDatepickerReducer);
1395
- super(_dispatcher, bsDatepickerReducer, state);
1396
- }
1397
- }
1398
- BsDatepickerStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1399
- BsDatepickerStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerStore, providedIn: 'platform' });
1400
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerStore, decorators: [{
1401
- type: Injectable,
1402
- args: [{ providedIn: 'platform' }]
1403
- }], ctorParameters: function () { return []; } });
1404
-
1405
- class BsCustomDatesViewComponent {
1406
- constructor() {
1407
- this.onSelect = new EventEmitter();
1408
- }
1409
- selectFromRanges(range) {
1410
- this.onSelect.emit(range);
1411
- }
1412
- }
1413
- BsCustomDatesViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsCustomDatesViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1414
- BsCustomDatesViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.3", type: BsCustomDatesViewComponent, selector: "bs-custom-date-view", inputs: { ranges: "ranges", selectedRange: "selectedRange", customRangeLabel: "customRangeLabel" }, outputs: { onSelect: "onSelect" }, ngImport: i0, template: `
1415
- <div class="bs-datepicker-predefined-btns">
1416
- <button *ngFor="let range of ranges"
1417
- type="button"
1418
- class="btn"
1419
- (click)="selectFromRanges(range)"
1420
- [class.selected]="range.value === selectedRange">
1421
- {{ range.label }}
1422
- </button>
1423
- </div>
1424
- `, isInline: true, dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1425
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsCustomDatesViewComponent, decorators: [{
1426
- type: Component,
1427
- args: [{
1428
- selector: 'bs-custom-date-view',
1429
- template: `
1430
- <div class="bs-datepicker-predefined-btns">
1431
- <button *ngFor="let range of ranges"
1432
- type="button"
1433
- class="btn"
1434
- (click)="selectFromRanges(range)"
1435
- [class.selected]="range.value === selectedRange">
1436
- {{ range.label }}
1437
- </button>
1438
- </div>
1439
- `,
1440
- changeDetection: ChangeDetectionStrategy.OnPush
1441
- }]
1442
- }], propDecorators: { ranges: [{
1443
- type: Input
1444
- }], selectedRange: [{
1445
- type: Input
1446
- }], customRangeLabel: [{
1447
- type: Input
1448
- }], onSelect: [{
1449
- type: Output
1450
- }] } });
1451
-
1452
- /** *************** */
1453
- // events
1454
- /** *************** */
1455
- var BsNavigationDirection;
1456
- (function (BsNavigationDirection) {
1457
- BsNavigationDirection[BsNavigationDirection["UP"] = 0] = "UP";
1458
- BsNavigationDirection[BsNavigationDirection["DOWN"] = 1] = "DOWN";
1459
- })(BsNavigationDirection || (BsNavigationDirection = {}));
1460
-
1461
- class BsCurrentDateViewComponent {
1462
- }
1463
- BsCurrentDateViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsCurrentDateViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1464
- BsCurrentDateViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.3", type: BsCurrentDateViewComponent, selector: "bs-current-date", inputs: { title: "title" }, ngImport: i0, template: `<div class="current-timedate"><span>{{ title }}</span></div>`, isInline: true });
1465
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsCurrentDateViewComponent, decorators: [{
1466
- type: Component,
1467
- args: [{
1468
- selector: 'bs-current-date',
1469
- template: `<div class="current-timedate"><span>{{ title }}</span></div>`
1470
- }]
1471
- }], propDecorators: { title: [{
1472
- type: Input
1473
- }] } });
1474
-
1475
- class BsTimepickerViewComponent {
1476
- constructor() {
1477
- this.ampm = 'ok';
1478
- this.hours = 0;
1479
- this.minutes = 0;
1480
- }
1481
- }
1482
- BsTimepickerViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsTimepickerViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1483
- BsTimepickerViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.3", type: BsTimepickerViewComponent, selector: "bs-timepicker", ngImport: i0, template: `
1484
- <div class="bs-timepicker-container">
1485
- <div class="bs-timepicker-controls">
1486
- <button class="bs-decrease" type="button">-</button>
1487
- <input type="text" [value]="hours" placeholder="00">
1488
- <button class="bs-increase" type="button">+</button>
1489
- </div>
1490
- <div class="bs-timepicker-controls">
1491
- <button class="bs-decrease" type="button">-</button>
1492
- <input type="text" [value]="minutes" placeholder="00">
1493
- <button class="bs-increase" type="button">+</button>
1494
- </div>
1495
- <button class="switch-time-format" type="button">{{ ampm }}
1496
- <img
1497
- src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAYAAABi8KSDAAABSElEQVQYV3XQPUvDUBQG4HNuagtVqc6KgouCv6GIuIntYBLB9hcIQpLStCAIV7DYmpTcRWcXqZio3Vwc/UCc/QEqfgyKGbr0I7nS1EiHeqYzPO/h5SD0jaxUZjmSLCB+OFb+UFINFwASAEAdpu9gaGXVyAHHFQBkHpKHc6a9dzECvADyY9sqlAMsK9W0jzxDXqeytr3mhQckxSji27TJJ5/rPmIpwJJq3HrtduriYOurv1a4i1p5HnhkG9OFymi0ReoO05cGwb+ayv4dysVygjeFmsP05f8wpZQ8fsdvfmuY9zjWSNqUtgYFVnOVReILYoBFzdQI5/GGFzNHhGbeZnopDGU29sZbscgldmC99w35VOATTycIMMcBXIfpSVGzZhA6C8hh00conln6VQ9TGgV32OEAKQC4DrBq7CJwd0ggR7Vq/rPrfgB+C3sGypY5DAAAAABJRU5ErkJggg=="
1498
- alt="">
1499
- </button>
1500
- </div>
1501
- `, isInline: true });
1502
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsTimepickerViewComponent, decorators: [{
1503
- type: Component,
1504
- args: [{
1505
- selector: 'bs-timepicker',
1506
- template: `
1507
- <div class="bs-timepicker-container">
1508
- <div class="bs-timepicker-controls">
1509
- <button class="bs-decrease" type="button">-</button>
1510
- <input type="text" [value]="hours" placeholder="00">
1511
- <button class="bs-increase" type="button">+</button>
1512
- </div>
1513
- <div class="bs-timepicker-controls">
1514
- <button class="bs-decrease" type="button">-</button>
1515
- <input type="text" [value]="minutes" placeholder="00">
1516
- <button class="bs-increase" type="button">+</button>
1517
- </div>
1518
- <button class="switch-time-format" type="button">{{ ampm }}
1519
- <img
1520
- src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAYAAABi8KSDAAABSElEQVQYV3XQPUvDUBQG4HNuagtVqc6KgouCv6GIuIntYBLB9hcIQpLStCAIV7DYmpTcRWcXqZio3Vwc/UCc/QEqfgyKGbr0I7nS1EiHeqYzPO/h5SD0jaxUZjmSLCB+OFb+UFINFwASAEAdpu9gaGXVyAHHFQBkHpKHc6a9dzECvADyY9sqlAMsK9W0jzxDXqeytr3mhQckxSji27TJJ5/rPmIpwJJq3HrtduriYOurv1a4i1p5HnhkG9OFymi0ReoO05cGwb+ayv4dysVygjeFmsP05f8wpZQ8fsdvfmuY9zjWSNqUtgYFVnOVReILYoBFzdQI5/GGFzNHhGbeZnopDGU29sZbscgldmC99w35VOATTycIMMcBXIfpSVGzZhA6C8hh00conln6VQ9TGgV32OEAKQC4DrBq7CJwd0ggR7Vq/rPrfgB+C3sGypY5DAAAAABJRU5ErkJggg=="
1521
- alt="">
1522
- </button>
1523
- </div>
1524
- `
1525
- }]
1526
- }] });
1527
-
1528
- class BsCalendarLayoutComponent {
1529
- }
1530
- BsCalendarLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsCalendarLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1531
- BsCalendarLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.3", type: BsCalendarLayoutComponent, selector: "bs-calendar-layout", ngImport: i0, template: `
1532
- <!-- current date, will be added in nearest releases -->
1533
- <bs-current-date title="hey there" *ngIf="false"></bs-current-date>
1534
-
1535
- <!--navigation-->
1536
- <div class="bs-datepicker-head">
1537
- <ng-content select="bs-datepicker-navigation-view"></ng-content>
1538
- </div>
1539
-
1540
- <div class="bs-datepicker-body">
1541
- <ng-content></ng-content>
1542
- </div>
1543
-
1544
- <!--timepicker-->
1545
- <bs-timepicker *ngIf="false"></bs-timepicker>
1546
- `, isInline: true, dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: BsCurrentDateViewComponent, selector: "bs-current-date", inputs: ["title"] }, { kind: "component", type: BsTimepickerViewComponent, selector: "bs-timepicker" }] });
1547
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsCalendarLayoutComponent, decorators: [{
1548
- type: Component,
1549
- args: [{
1550
- selector: 'bs-calendar-layout',
1551
- template: `
1552
- <!-- current date, will be added in nearest releases -->
1553
- <bs-current-date title="hey there" *ngIf="false"></bs-current-date>
1554
-
1555
- <!--navigation-->
1556
- <div class="bs-datepicker-head">
1557
- <ng-content select="bs-datepicker-navigation-view"></ng-content>
1558
- </div>
1559
-
1560
- <div class="bs-datepicker-body">
1561
- <ng-content></ng-content>
1562
- </div>
1563
-
1564
- <!--timepicker-->
1565
- <bs-timepicker *ngIf="false"></bs-timepicker>
1566
- `
1567
- }]
1568
- }] });
1569
-
1570
- class BsDatepickerDayDecoratorComponent {
1571
- constructor(_config, _elRef, _renderer) {
1572
- this._config = _config;
1573
- this._elRef = _elRef;
1574
- this._renderer = _renderer;
1575
- this.day = { date: new Date(), label: '' };
1576
- }
1577
- ngOnInit() {
1578
- var _a, _b, _c;
1579
- if (((_a = this.day) === null || _a === void 0 ? void 0 : _a.isToday) && this._config && this._config.customTodayClass) {
1580
- this._renderer.addClass(this._elRef.nativeElement, this._config.customTodayClass);
1581
- }
1582
- if (typeof ((_b = this.day) === null || _b === void 0 ? void 0 : _b.customClasses) === 'string') {
1583
- (_c = this.day) === null || _c === void 0 ? void 0 : _c.customClasses.split(' ').filter((className) => className).forEach((className) => {
1584
- this._renderer.addClass(this._elRef.nativeElement, className);
1585
- });
1586
- }
1587
- }
1588
- }
1589
- BsDatepickerDayDecoratorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerDayDecoratorComponent, deps: [{ token: BsDatepickerConfig }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
1590
- BsDatepickerDayDecoratorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.3", type: BsDatepickerDayDecoratorComponent, selector: "[bsDatepickerDayDecorator]", inputs: { day: "day" }, host: { properties: { "class.disabled": "day.isDisabled", "class.is-highlighted": "day.isHovered", "class.is-other-month": "day.isOtherMonth", "class.is-active-other-month": "day.isOtherMonthHovered", "class.in-range": "day.isInRange", "class.select-start": "day.isSelectionStart", "class.select-end": "day.isSelectionEnd", "class.selected": "day.isSelected" } }, ngImport: i0, template: `{{ day && day.label || '' }}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1591
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerDayDecoratorComponent, decorators: [{
1592
- type: Component,
1593
- args: [{
1594
- selector: '[bsDatepickerDayDecorator]',
1595
- changeDetection: ChangeDetectionStrategy.OnPush,
1596
- host: {
1597
- '[class.disabled]': 'day.isDisabled',
1598
- '[class.is-highlighted]': 'day.isHovered',
1599
- '[class.is-other-month]': 'day.isOtherMonth',
1600
- '[class.is-active-other-month]': 'day.isOtherMonthHovered',
1601
- '[class.in-range]': 'day.isInRange',
1602
- '[class.select-start]': 'day.isSelectionStart',
1603
- '[class.select-end]': 'day.isSelectionEnd',
1604
- '[class.selected]': 'day.isSelected'
1605
- },
1606
- template: `{{ day && day.label || '' }}`
1607
- }]
1608
- }], ctorParameters: function () { return [{ type: BsDatepickerConfig }, { type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { day: [{
1609
- type: Input
1610
- }] } });
1611
-
1612
- class BsDatepickerNavigationViewComponent {
1613
- constructor() {
1614
- this.isDisabled = false;
1615
- this.onNavigate = new EventEmitter();
1616
- this.onViewMode = new EventEmitter();
1617
- }
1618
- navTo(down) {
1619
- this.onNavigate.emit(down ? BsNavigationDirection.DOWN : BsNavigationDirection.UP);
1620
- }
1621
- view(viewMode) {
1622
- if (this.isDisabled) {
1623
- return;
1624
- }
1625
- this.onViewMode.emit(viewMode);
1626
- }
1627
- }
1628
- BsDatepickerNavigationViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerNavigationViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1629
- BsDatepickerNavigationViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.3", type: BsDatepickerNavigationViewComponent, selector: "bs-datepicker-navigation-view", inputs: { calendar: "calendar", isDisabled: "isDisabled" }, outputs: { onNavigate: "onNavigate", onViewMode: "onViewMode" }, ngImport: i0, template: `
1630
- <button class="previous"
1631
- [disabled]="calendar.disableLeftArrow"
1632
- [style.visibility]="calendar.hideLeftArrow ? 'hidden' : 'visible'"
1633
- type="button"
1634
- (click)="navTo(true)">
1635
- <span>&lsaquo;</span>
1636
- </button>
1637
-
1638
- <ng-container *ngIf="calendar && calendar.monthTitle">
1639
- &#8203; <!-- zero-width space needed for correct alignment
1640
- with preserveWhitespaces: false in Angular -->
1641
-
1642
- <button class="current"
1643
- type="button"
1644
- (click)="view('month')"
1645
- [disabled]="isDisabled"
1646
- ><span>{{ calendar.monthTitle }}</span>
1647
- </button>
1648
- </ng-container>
1649
-
1650
- &#8203; <!-- zero-width space needed for correct alignment
1651
- with preserveWhitespaces: false in Angular -->
1652
-
1653
- <button
1654
- class="current"
1655
- (click)="view('year')"
1656
- type="button"
1657
- [disabled]="isDisabled"
1658
- >
1659
- <span>{{ calendar.yearTitle }}</span>
1660
- </button>
1661
-
1662
- &#8203; <!-- zero-width space needed for correct alignment
1663
- with preserveWhitespaces: false in Angular -->
1664
-
1665
- <button class="next"
1666
- [disabled]="calendar.disableRightArrow"
1667
- [style.visibility]="calendar.hideRightArrow ? 'hidden' : 'visible'"
1668
- type="button"
1669
- (click)="navTo(false)"><span>&rsaquo;</span>
1670
- </button>
1671
- `, isInline: true, dependencies: [{ kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1672
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerNavigationViewComponent, decorators: [{
1673
- type: Component,
1674
- args: [{
1675
- selector: 'bs-datepicker-navigation-view',
1676
- changeDetection: ChangeDetectionStrategy.OnPush,
1677
- template: `
1678
- <button class="previous"
1679
- [disabled]="calendar.disableLeftArrow"
1680
- [style.visibility]="calendar.hideLeftArrow ? 'hidden' : 'visible'"
1681
- type="button"
1682
- (click)="navTo(true)">
1683
- <span>&lsaquo;</span>
1684
- </button>
1685
-
1686
- <ng-container *ngIf="calendar && calendar.monthTitle">
1687
- &#8203; <!-- zero-width space needed for correct alignment
1688
- with preserveWhitespaces: false in Angular -->
1689
-
1690
- <button class="current"
1691
- type="button"
1692
- (click)="view('month')"
1693
- [disabled]="isDisabled"
1694
- ><span>{{ calendar.monthTitle }}</span>
1695
- </button>
1696
- </ng-container>
1697
-
1698
- &#8203; <!-- zero-width space needed for correct alignment
1699
- with preserveWhitespaces: false in Angular -->
1700
-
1701
- <button
1702
- class="current"
1703
- (click)="view('year')"
1704
- type="button"
1705
- [disabled]="isDisabled"
1706
- >
1707
- <span>{{ calendar.yearTitle }}</span>
1708
- </button>
1709
-
1710
- &#8203; <!-- zero-width space needed for correct alignment
1711
- with preserveWhitespaces: false in Angular -->
1712
-
1713
- <button class="next"
1714
- [disabled]="calendar.disableRightArrow"
1715
- [style.visibility]="calendar.hideRightArrow ? 'hidden' : 'visible'"
1716
- type="button"
1717
- (click)="navTo(false)"><span>&rsaquo;</span>
1718
- </button>
1719
- `
1720
- }]
1721
- }], propDecorators: { calendar: [{
1722
- type: Input
1723
- }], isDisabled: [{
1724
- type: Input
1725
- }], onNavigate: [{
1726
- type: Output
1727
- }], onViewMode: [{
1728
- type: Output
1729
- }] } });
1730
-
1731
- class BsDaysCalendarViewComponent {
1732
- constructor(_config) {
1733
- this._config = _config;
1734
- this.onNavigate = new EventEmitter();
1735
- this.onViewMode = new EventEmitter();
1736
- this.onSelect = new EventEmitter();
1737
- this.onHover = new EventEmitter();
1738
- this.onHoverWeek = new EventEmitter();
1739
- this.isiOS = (/iPad|iPhone|iPod/.test(navigator.platform) ||
1740
- (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1));
1741
- if (this._config.dateTooltipTexts && this._config.dateTooltipTexts.length > 0) {
1742
- this.isShowTooltip = true;
1743
- }
1744
- }
1745
- navigateTo(event) {
1746
- const step = BsNavigationDirection.DOWN === event ? -1 : 1;
1747
- this.onNavigate.emit({ step: { month: step } });
1748
- }
1749
- changeViewMode(event) {
1750
- this.onViewMode.emit(event);
1751
- }
1752
- selectDay(event) {
1753
- this.onSelect.emit(event);
1754
- }
1755
- selectWeek(week) {
1756
- if (!this._config.selectWeek && !this._config.selectWeekDateRange) {
1757
- return;
1758
- }
1759
- if (week.days.length === 0) {
1760
- return;
1761
- }
1762
- if (this._config.selectWeek && week.days[0]
1763
- && !week.days[0].isDisabled
1764
- && this._config.selectFromOtherMonth) {
1765
- this.onSelect.emit(week.days[0]);
1766
- return;
1767
- }
1768
- const selectedDay = week.days.find((day) => {
1769
- return this._config.selectFromOtherMonth
1770
- ? !day.isDisabled
1771
- : !day.isOtherMonth && !day.isDisabled;
1772
- });
1773
- this.onSelect.emit(selectedDay);
1774
- if (this._config.selectWeekDateRange) {
1775
- const days = week.days.slice(0);
1776
- const lastDayOfRange = days.reverse().find((day) => {
1777
- return this._config.selectFromOtherMonth
1778
- ? !day.isDisabled
1779
- : !day.isOtherMonth && !day.isDisabled;
1780
- });
1781
- this.onSelect.emit(lastDayOfRange);
1782
- }
1783
- }
1784
- weekHoverHandler(cell, isHovered) {
1785
- if (!this._config.selectWeek && !this._config.selectWeekDateRange) {
1786
- return;
1787
- }
1788
- const hasActiveDays = cell.days.find((day) => {
1789
- return this._config.selectFromOtherMonth
1790
- ? !day.isDisabled
1791
- : !day.isOtherMonth && !day.isDisabled;
1792
- });
1793
- if (hasActiveDays) {
1794
- cell.isHovered = isHovered;
1795
- this.isWeekHovered = isHovered;
1796
- this.onHoverWeek.emit(cell);
1797
- }
1798
- }
1799
- hoverDay(cell, isHovered) {
1800
- if (this._config.selectFromOtherMonth && cell.isOtherMonth) {
1801
- cell.isOtherMonthHovered = isHovered;
1802
- }
1803
- if (this._config.dateTooltipTexts) {
1804
- cell.tooltipText = '';
1805
- this._config.dateTooltipTexts.forEach((dateData) => {
1806
- if (isSameDay(dateData.date, cell.date)) {
1807
- cell.tooltipText = dateData.tooltipText;
1808
- return;
1809
- }
1810
- });
1811
- }
1812
- this.onHover.emit({ cell, isHovered });
1813
- }
1814
- }
1815
- BsDaysCalendarViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDaysCalendarViewComponent, deps: [{ token: BsDatepickerConfig }], target: i0.ɵɵFactoryTarget.Component });
1816
- BsDaysCalendarViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.3", type: BsDaysCalendarViewComponent, selector: "bs-days-calendar-view", inputs: { calendar: "calendar", options: "options", isDisabled: "isDisabled" }, outputs: { onNavigate: "onNavigate", onViewMode: "onViewMode", onSelect: "onSelect", onHover: "onHover", onHoverWeek: "onHoverWeek" }, ngImport: i0, template: `
1817
- <bs-calendar-layout>
1818
- <bs-datepicker-navigation-view
1819
- [calendar]="calendar"
1820
- [isDisabled]="!!isDisabled"
1821
- (onNavigate)="navigateTo($event)"
1822
- (onViewMode)="changeViewMode($event)"
1823
- ></bs-datepicker-navigation-view>
1824
- <!--days matrix-->
1825
- <table role="grid" class="days weeks">
1826
- <thead>
1827
- <tr>
1828
- <!--if show weeks-->
1829
- <th *ngIf="options && options.showWeekNumbers"></th>
1830
- <th *ngFor="let weekday of calendar.weekdays; let i = index"
1831
- aria-label="weekday">{{ calendar.weekdays[i] }}
1832
- </th>
1833
- </tr>
1834
- </thead>
1835
- <tbody>
1836
- <tr *ngFor="let week of calendar.weeks; let i = index">
1837
- <td class="week" [class.active-week]="isWeekHovered" *ngIf="options && options.showWeekNumbers">
1838
- <span *ngIf="isiOS" (click)="selectWeek(week)">{{ calendar.weekNumbers[i] }}</span>
1839
- <span *ngIf="!isiOS"
1840
- (click)="selectWeek(week)"
1841
- (mouseenter)="weekHoverHandler(week, true)"
1842
- (mouseleave)="weekHoverHandler(week, false)">{{ calendar.weekNumbers[i] }}</span>
1843
- </td>
1844
- <td *ngFor="let day of week.days" role="gridcell">
1845
-
1846
- <!-- When we want to show tooltips for dates -->
1847
- <span *ngIf="!isiOS && isShowTooltip" bsDatepickerDayDecorator
1848
- [day]="day"
1849
- (click)="selectDay(day)"
1850
- tooltip="{{day.tooltipText}}"
1851
- (mouseenter)="hoverDay(day, true)"
1852
- (mouseleave)="hoverDay(day, false)">{{ day.label }} 3</span>
1853
- <!-- When tooltips for dates are disabled -->
1854
- <span *ngIf="!isiOS && !isShowTooltip" bsDatepickerDayDecorator
1855
- [day]="day"
1856
- (click)="selectDay(day)"
1857
- (mouseenter)="hoverDay(day, true)"
1858
- (mouseleave)="hoverDay(day, false)">{{ day.label }} 2</span>
1859
-
1860
- <!-- For mobile iOS view, tooltips are not needed -->
1861
- <span *ngIf="isiOS" bsDatepickerDayDecorator
1862
- [day]="day"
1863
- (click)="selectDay(day)">{{ day.label }} 1</span>
1864
- </td>
1865
- </tr>
1866
- </tbody>
1867
- </table>
1868
-
1869
- </bs-calendar-layout>
1870
- `, isInline: true, dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.TooltipDirective, selector: "[tooltip], [tooltipHtml]", inputs: ["adaptivePosition", "tooltip", "placement", "triggers", "container", "containerClass", "boundariesElement", "isOpen", "isDisabled", "delay", "tooltipHtml", "tooltipPlacement", "tooltipIsOpen", "tooltipEnable", "tooltipAppendToBody", "tooltipAnimation", "tooltipClass", "tooltipContext", "tooltipPopupDelay", "tooltipFadeDuration", "tooltipTrigger"], outputs: ["tooltipChange", "onShown", "onHidden", "tooltipStateChanged"], exportAs: ["bs-tooltip"] }, { kind: "component", type: BsCalendarLayoutComponent, selector: "bs-calendar-layout" }, { kind: "component", type: BsDatepickerDayDecoratorComponent, selector: "[bsDatepickerDayDecorator]", inputs: ["day"] }, { kind: "component", type: BsDatepickerNavigationViewComponent, selector: "bs-datepicker-navigation-view", inputs: ["calendar", "isDisabled"], outputs: ["onNavigate", "onViewMode"] }] });
1871
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDaysCalendarViewComponent, decorators: [{
1872
- type: Component,
1873
- args: [{
1874
- selector: 'bs-days-calendar-view',
1875
- // changeDetection: ChangeDetectionStrategy.OnPush,
1876
- template: `
1877
- <bs-calendar-layout>
1878
- <bs-datepicker-navigation-view
1879
- [calendar]="calendar"
1880
- [isDisabled]="!!isDisabled"
1881
- (onNavigate)="navigateTo($event)"
1882
- (onViewMode)="changeViewMode($event)"
1883
- ></bs-datepicker-navigation-view>
1884
- <!--days matrix-->
1885
- <table role="grid" class="days weeks">
1886
- <thead>
1887
- <tr>
1888
- <!--if show weeks-->
1889
- <th *ngIf="options && options.showWeekNumbers"></th>
1890
- <th *ngFor="let weekday of calendar.weekdays; let i = index"
1891
- aria-label="weekday">{{ calendar.weekdays[i] }}
1892
- </th>
1893
- </tr>
1894
- </thead>
1895
- <tbody>
1896
- <tr *ngFor="let week of calendar.weeks; let i = index">
1897
- <td class="week" [class.active-week]="isWeekHovered" *ngIf="options && options.showWeekNumbers">
1898
- <span *ngIf="isiOS" (click)="selectWeek(week)">{{ calendar.weekNumbers[i] }}</span>
1899
- <span *ngIf="!isiOS"
1900
- (click)="selectWeek(week)"
1901
- (mouseenter)="weekHoverHandler(week, true)"
1902
- (mouseleave)="weekHoverHandler(week, false)">{{ calendar.weekNumbers[i] }}</span>
1903
- </td>
1904
- <td *ngFor="let day of week.days" role="gridcell">
1905
-
1906
- <!-- When we want to show tooltips for dates -->
1907
- <span *ngIf="!isiOS && isShowTooltip" bsDatepickerDayDecorator
1908
- [day]="day"
1909
- (click)="selectDay(day)"
1910
- tooltip="{{day.tooltipText}}"
1911
- (mouseenter)="hoverDay(day, true)"
1912
- (mouseleave)="hoverDay(day, false)">{{ day.label }} 3</span>
1913
- <!-- When tooltips for dates are disabled -->
1914
- <span *ngIf="!isiOS && !isShowTooltip" bsDatepickerDayDecorator
1915
- [day]="day"
1916
- (click)="selectDay(day)"
1917
- (mouseenter)="hoverDay(day, true)"
1918
- (mouseleave)="hoverDay(day, false)">{{ day.label }} 2</span>
1919
-
1920
- <!-- For mobile iOS view, tooltips are not needed -->
1921
- <span *ngIf="isiOS" bsDatepickerDayDecorator
1922
- [day]="day"
1923
- (click)="selectDay(day)">{{ day.label }} 1</span>
1924
- </td>
1925
- </tr>
1926
- </tbody>
1927
- </table>
1928
-
1929
- </bs-calendar-layout>
1930
- `
1931
- }]
1932
- }], ctorParameters: function () { return [{ type: BsDatepickerConfig }]; }, propDecorators: { calendar: [{
1933
- type: Input
1934
- }], options: [{
1935
- type: Input
1936
- }], isDisabled: [{
1937
- type: Input
1938
- }], onNavigate: [{
1939
- type: Output
1940
- }], onViewMode: [{
1941
- type: Output
1942
- }], onSelect: [{
1943
- type: Output
1944
- }], onHover: [{
1945
- type: Output
1946
- }], onHoverWeek: [{
1947
- type: Output
1948
- }] } });
1949
-
1950
- class BsMonthCalendarViewComponent {
1951
- constructor() {
1952
- this.onNavigate = new EventEmitter();
1953
- this.onViewMode = new EventEmitter();
1954
- this.onSelect = new EventEmitter();
1955
- this.onHover = new EventEmitter();
1956
- }
1957
- navigateTo(event) {
1958
- const step = BsNavigationDirection.DOWN === event ? -1 : 1;
1959
- this.onNavigate.emit({ step: { year: step } });
1960
- }
1961
- viewMonth(month) {
1962
- this.onSelect.emit(month);
1963
- }
1964
- hoverMonth(cell, isHovered) {
1965
- this.onHover.emit({ cell, isHovered });
1966
- }
1967
- changeViewMode(event) {
1968
- this.onViewMode.emit(event);
1969
- }
1970
- }
1971
- BsMonthCalendarViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsMonthCalendarViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1972
- BsMonthCalendarViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.3", type: BsMonthCalendarViewComponent, selector: "bs-month-calendar-view", inputs: { calendar: "calendar" }, outputs: { onNavigate: "onNavigate", onViewMode: "onViewMode", onSelect: "onSelect", onHover: "onHover" }, ngImport: i0, template: `
1973
- <bs-calendar-layout>
1974
- <bs-datepicker-navigation-view
1975
- [calendar]="calendar"
1976
- (onNavigate)="navigateTo($event)"
1977
- (onViewMode)="changeViewMode($event)"
1978
- ></bs-datepicker-navigation-view>
1979
-
1980
- <table role="grid" class="months">
1981
- <tbody>
1982
- <tr *ngFor="let row of calendar?.months">
1983
- <td *ngFor="let month of row" role="gridcell"
1984
- (click)="viewMonth(month)"
1985
- (mouseenter)="hoverMonth(month, true)"
1986
- (mouseleave)="hoverMonth(month, false)"
1987
- [class.disabled]="month.isDisabled"
1988
- [class.is-highlighted]="month.isHovered">
1989
- <span [class.selected]="month.isSelected">{{ month.label }}</span>
1990
- </td>
1991
- </tr>
1992
- </tbody>
1993
- </table>
1994
- </bs-calendar-layout>
1995
- `, isInline: true, dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: BsCalendarLayoutComponent, selector: "bs-calendar-layout" }, { kind: "component", type: BsDatepickerNavigationViewComponent, selector: "bs-datepicker-navigation-view", inputs: ["calendar", "isDisabled"], outputs: ["onNavigate", "onViewMode"] }] });
1996
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsMonthCalendarViewComponent, decorators: [{
1997
- type: Component,
1998
- args: [{
1999
- selector: 'bs-month-calendar-view',
2000
- template: `
2001
- <bs-calendar-layout>
2002
- <bs-datepicker-navigation-view
2003
- [calendar]="calendar"
2004
- (onNavigate)="navigateTo($event)"
2005
- (onViewMode)="changeViewMode($event)"
2006
- ></bs-datepicker-navigation-view>
2007
-
2008
- <table role="grid" class="months">
2009
- <tbody>
2010
- <tr *ngFor="let row of calendar?.months">
2011
- <td *ngFor="let month of row" role="gridcell"
2012
- (click)="viewMonth(month)"
2013
- (mouseenter)="hoverMonth(month, true)"
2014
- (mouseleave)="hoverMonth(month, false)"
2015
- [class.disabled]="month.isDisabled"
2016
- [class.is-highlighted]="month.isHovered">
2017
- <span [class.selected]="month.isSelected">{{ month.label }}</span>
2018
- </td>
2019
- </tr>
2020
- </tbody>
2021
- </table>
2022
- </bs-calendar-layout>
2023
- `
2024
- }]
2025
- }], propDecorators: { calendar: [{
2026
- type: Input
2027
- }], onNavigate: [{
2028
- type: Output
2029
- }], onViewMode: [{
2030
- type: Output
2031
- }], onSelect: [{
2032
- type: Output
2033
- }], onHover: [{
2034
- type: Output
2035
- }] } });
2036
-
2037
- class BsYearsCalendarViewComponent {
2038
- constructor() {
2039
- this.onNavigate = new EventEmitter();
2040
- this.onViewMode = new EventEmitter();
2041
- this.onSelect = new EventEmitter();
2042
- this.onHover = new EventEmitter();
2043
- }
2044
- navigateTo(event) {
2045
- const step = BsNavigationDirection.DOWN === event ? -1 : 1;
2046
- this.onNavigate.emit({ step: { year: step * yearsPerCalendar } });
2047
- }
2048
- viewYear(year) {
2049
- this.onSelect.emit(year);
2050
- }
2051
- hoverYear(cell, isHovered) {
2052
- this.onHover.emit({ cell, isHovered });
2053
- }
2054
- changeViewMode(event) {
2055
- this.onViewMode.emit(event);
2056
- }
2057
- }
2058
- BsYearsCalendarViewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsYearsCalendarViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2059
- BsYearsCalendarViewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.3", type: BsYearsCalendarViewComponent, selector: "bs-years-calendar-view", inputs: { calendar: "calendar" }, outputs: { onNavigate: "onNavigate", onViewMode: "onViewMode", onSelect: "onSelect", onHover: "onHover" }, ngImport: i0, template: `
2060
- <bs-calendar-layout>
2061
- <bs-datepicker-navigation-view
2062
- [calendar]="calendar"
2063
- (onNavigate)="navigateTo($event)"
2064
- (onViewMode)="changeViewMode($event)"
2065
- ></bs-datepicker-navigation-view>
2066
-
2067
- <table role="grid" class="years">
2068
- <tbody>
2069
- <tr *ngFor="let row of calendar?.years">
2070
- <td *ngFor="let year of row" role="gridcell"
2071
- (click)="viewYear(year)"
2072
- (mouseenter)="hoverYear(year, true)"
2073
- (mouseleave)="hoverYear(year, false)"
2074
- [class.disabled]="year.isDisabled"
2075
- [class.is-highlighted]="year.isHovered">
2076
- <span [class.selected]="year.isSelected">{{ year.label }}</span>
2077
- </td>
2078
- </tr>
2079
- </tbody>
2080
- </table>
2081
- </bs-calendar-layout>
2082
- `, isInline: true, dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: BsCalendarLayoutComponent, selector: "bs-calendar-layout" }, { kind: "component", type: BsDatepickerNavigationViewComponent, selector: "bs-datepicker-navigation-view", inputs: ["calendar", "isDisabled"], outputs: ["onNavigate", "onViewMode"] }] });
2083
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsYearsCalendarViewComponent, decorators: [{
2084
- type: Component,
2085
- args: [{
2086
- selector: 'bs-years-calendar-view',
2087
- template: `
2088
- <bs-calendar-layout>
2089
- <bs-datepicker-navigation-view
2090
- [calendar]="calendar"
2091
- (onNavigate)="navigateTo($event)"
2092
- (onViewMode)="changeViewMode($event)"
2093
- ></bs-datepicker-navigation-view>
2094
-
2095
- <table role="grid" class="years">
2096
- <tbody>
2097
- <tr *ngFor="let row of calendar?.years">
2098
- <td *ngFor="let year of row" role="gridcell"
2099
- (click)="viewYear(year)"
2100
- (mouseenter)="hoverYear(year, true)"
2101
- (mouseleave)="hoverYear(year, false)"
2102
- [class.disabled]="year.isDisabled"
2103
- [class.is-highlighted]="year.isHovered">
2104
- <span [class.selected]="year.isSelected">{{ year.label }}</span>
2105
- </td>
2106
- </tr>
2107
- </tbody>
2108
- </table>
2109
- </bs-calendar-layout>
2110
- `
2111
- }]
2112
- }], propDecorators: { calendar: [{
2113
- type: Input
2114
- }], onNavigate: [{
2115
- type: Output
2116
- }], onViewMode: [{
2117
- type: Output
2118
- }], onSelect: [{
2119
- type: Output
2120
- }], onHover: [{
2121
- type: Output
2122
- }] } });
2123
-
2124
- class BsDatepickerContainerComponent extends BsDatepickerAbstractComponent {
2125
- constructor(_renderer, _config, _store, _element, _actions, _effects, _positionService) {
2126
- super();
2127
- this._config = _config;
2128
- this._store = _store;
2129
- this._element = _element;
2130
- this._actions = _actions;
2131
- this._positionService = _positionService;
2132
- this.valueChange = new EventEmitter();
2133
- this.animationState = 'void';
2134
- this.isRangePicker = false;
2135
- this._subs = [];
2136
- this._effects = _effects;
2137
- _renderer.setStyle(_element.nativeElement, 'display', 'block');
2138
- _renderer.setStyle(_element.nativeElement, 'position', 'absolute');
2139
- }
2140
- set value(value) {
2141
- var _a;
2142
- (_a = this._effects) === null || _a === void 0 ? void 0 : _a.setValue(value);
2143
- }
2144
- get isDatePickerDisabled() {
2145
- return !!this._config.isDisabled;
2146
- }
2147
- get isDatepickerDisabled() {
2148
- return this.isDatePickerDisabled ? '' : null;
2149
- }
2150
- get isDatepickerReadonly() {
2151
- return this.isDatePickerDisabled ? '' : null;
2152
- }
2153
- ngOnInit() {
2154
- var _a, _b;
2155
- this._positionService.setOptions({
2156
- modifiers: {
2157
- flip: {
2158
- enabled: this._config.adaptivePosition
2159
- },
2160
- preventOverflow: {
2161
- enabled: this._config.adaptivePosition
2162
- }
2163
- },
2164
- allowedPositions: this._config.allowedPositions
2165
- });
2166
- (_a = this._positionService.event$) === null || _a === void 0 ? void 0 : _a.pipe(take(1)).subscribe(() => {
2167
- this._positionService.disable();
2168
- if (this._config.isAnimated) {
2169
- this.animationState = this.isTopPosition ? 'animated-up' : 'animated-down';
2170
- return;
2171
- }
2172
- this.animationState = 'unanimated';
2173
- });
2174
- this.isOtherMonthsActive = this._config.selectFromOtherMonth;
2175
- this.containerClass = this._config.containerClass;
2176
- this.showTodayBtn = this._config.showTodayButton;
2177
- this.todayBtnLbl = this._config.todayButtonLabel;
2178
- this.todayPos = this._config.todayPosition;
2179
- this.showClearBtn = this._config.showClearButton;
2180
- this.clearBtnLbl = this._config.clearButtonLabel;
2181
- this.clearPos = this._config.clearPosition;
2182
- this.customRangeBtnLbl = this._config.customRangeButtonLabel;
2183
- this.withTimepicker = this._config.withTimepicker;
2184
- (_b = this._effects) === null || _b === void 0 ? void 0 : _b.init(this._store).setOptions(this._config).setBindings(this).setEventHandlers(this).registerDatepickerSideEffects();
2185
- let currentDate;
2186
- // todo: move it somewhere else
2187
- // on selected date change
2188
- this._subs.push(this._store.select((state) => state.selectedDate).subscribe((date) => {
2189
- currentDate = date;
2190
- this.valueChange.emit(date);
2191
- }));
2192
- this._subs.push(this._store.select((state) => state.selectedTime).subscribe((time) => {
2193
- if (!time[0] || !(time[0] instanceof Date) || time[0] === currentDate) {
2194
- return;
2195
- }
2196
- this.valueChange.emit(time[0]);
2197
- }));
2198
- this._store.dispatch(this._actions.changeViewMode(this._config.startView));
2199
- }
2200
- ngAfterViewInit() {
2201
- var _a, _b;
2202
- this.selectedTimeSub.add((_a = this.selectedTime) === null || _a === void 0 ? void 0 : _a.subscribe((val) => {
2203
- var _a;
2204
- if (Array.isArray(val) && val.length >= 1) {
2205
- (_a = this.startTimepicker) === null || _a === void 0 ? void 0 : _a.writeValue(val[0]);
2206
- }
2207
- }));
2208
- (_b = this.startTimepicker) === null || _b === void 0 ? void 0 : _b.registerOnChange((val) => {
2209
- this.timeSelectHandler(val, 0);
2210
- });
2211
- }
2212
- get isTopPosition() {
2213
- return this._element.nativeElement.classList.contains('top');
2214
- }
2215
- positionServiceEnable() {
2216
- this._positionService.enable();
2217
- }
2218
- timeSelectHandler(date, index) {
2219
- this._store.dispatch(this._actions.selectTime(date, index));
2220
- }
2221
- daySelectHandler(day) {
2222
- if (!day) {
2223
- return;
2224
- }
2225
- const isDisabled = this.isOtherMonthsActive ? day.isDisabled : (day.isOtherMonth || day.isDisabled);
2226
- if (isDisabled) {
2227
- return;
2228
- }
2229
- this._store.dispatch(this._actions.select(day.date));
2230
- }
2231
- monthSelectHandler(day) {
2232
- if (!day || day.isDisabled) {
2233
- return;
2234
- }
2235
- this._store.dispatch(this._actions.navigateTo({
2236
- unit: {
2237
- month: getMonth(day.date),
2238
- year: getFullYear(day.date)
2239
- },
2240
- viewMode: 'day'
2241
- }));
2242
- }
2243
- yearSelectHandler(day) {
2244
- if (!day || day.isDisabled) {
2245
- return;
2246
- }
2247
- this._store.dispatch(this._actions.navigateTo({
2248
- unit: {
2249
- year: getFullYear(day.date)
2250
- },
2251
- viewMode: 'month'
2252
- }));
2253
- }
2254
- setToday() {
2255
- this._store.dispatch(this._actions.select(new Date()));
2256
- }
2257
- clearDate() {
2258
- this._store.dispatch(this._actions.select(undefined));
2259
- }
2260
- ngOnDestroy() {
2261
- var _a;
2262
- for (const sub of this._subs) {
2263
- sub.unsubscribe();
2264
- }
2265
- this.selectedTimeSub.unsubscribe();
2266
- (_a = this._effects) === null || _a === void 0 ? void 0 : _a.destroy();
2267
- }
2268
- }
2269
- BsDatepickerContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerContainerComponent, deps: [{ token: i0.Renderer2 }, { token: BsDatepickerConfig }, { token: BsDatepickerStore }, { token: i0.ElementRef }, { token: BsDatepickerActions }, { token: BsDatepickerEffects }, { token: i5.PositioningService }], target: i0.ɵɵFactoryTarget.Component });
2270
- BsDatepickerContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.3", type: BsDatepickerContainerComponent, selector: "bs-datepicker-container", host: { attributes: { "role": "dialog", "aria-label": "calendar" }, listeners: { "click": "_stopPropagation($event)" }, properties: { "attr.disabled": "this.isDatepickerDisabled", "attr.readonly": "this.isDatepickerReadonly" }, classAttribute: "bottom" }, providers: [BsDatepickerStore, BsDatepickerEffects], viewQueries: [{ propertyName: "startTimepicker", first: true, predicate: ["startTP"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<!-- days calendar view mode -->\n<div class=\"bs-datepicker\" [ngClass]=\"containerClass\" *ngIf=\"viewMode | async\">\n <div class=\"bs-datepicker-container\"\n [@datepickerAnimation]=\"animationState\"\n (@datepickerAnimation.done)=\"positionServiceEnable()\">\n <!--calendars-->\n <div class=\"bs-calendar-container\" [ngSwitch]=\"viewMode | async\" role=\"application\">\n <!--days calendar-->\n <ng-container *ngSwitchCase=\"'day'\">\n <div class=\"bs-media-container\">\n <bs-days-calendar-view\n *ngFor=\"let calendar of daysCalendar$ | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n [isDisabled]=\"isDatePickerDisabled\"\n [options]=\"options$ | async\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"dayHoverHandler($event)\"\n (onHoverWeek)=\"weekHoverHandler($event)\"\n (onSelect)=\"daySelectHandler($event)\">\n </bs-days-calendar-view>\n </div>\n <div *ngIf=\"withTimepicker\" class=\"bs-timepicker-in-datepicker-container\">\n <timepicker #startTP [disabled]=\"isDatePickerDisabled\"></timepicker>\n <timepicker #endTP *ngIf=\"isRangePicker\" [disabled]=\"isDatePickerDisabled\"></timepicker>\n </div>\n </ng-container>\n\n <!--months calendar-->\n <div *ngSwitchCase=\"'month'\" class=\"bs-media-container\">\n <bs-month-calendar-view\n *ngFor=\"let calendar of monthsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"monthHoverHandler($event)\"\n (onSelect)=\"monthSelectHandler($event)\">\n </bs-month-calendar-view>\n </div>\n\n <!--years calendar-->\n <div *ngSwitchCase=\"'year'\" class=\"bs-media-container\">\n <bs-years-calendar-view\n *ngFor=\"let calendar of yearsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"yearHoverHandler($event)\"\n (onSelect)=\"yearSelectHandler($event)\">\n </bs-years-calendar-view>\n </div>\n </div>\n\n <!--applycancel buttons-->\n <div class=\"bs-datepicker-buttons\" *ngIf=\"false\">\n <button class=\"btn btn-success\" type=\"button\">Apply</button>\n <button class=\"btn btn-default\" type=\"button\">Cancel</button>\n </div>\n\n <div class=\"bs-datepicker-buttons\" *ngIf=\"showTodayBtn || showClearBtn\">\n <div class=\"btn-today-wrapper\"\n [class.today-left]=\"todayPos === 'left'\"\n [class.today-right]=\"todayPos === 'right'\"\n [class.today-center]=\"todayPos === 'center'\"\n *ngIf=\"showTodayBtn\">\n <button class=\"btn btn-success\" (click)=\"setToday()\">{{todayBtnLbl}}</button>\n </div>\n\n <div class=\"btn-clear-wrapper\"\n [class.clear-left]=\"clearPos === 'left'\"\n [class.clear-right]=\"clearPos === 'right'\"\n [class.clear-center]=\"clearPos === 'center'\"\n *ngIf=\"showClearBtn\">\n <button class=\"btn btn-success\" (click)=\"clearDate()\">{{clearBtnLbl}}</button>\n </div>\n </div>\n\n </div>\n\n <!--custom dates or date ranges picker-->\n <div class=\"bs-datepicker-custom-range\" *ngIf=\"customRanges && customRanges.length > 0\">\n <bs-custom-date-view\n [selectedRange]=\"chosenRange\"\n [ranges]=\"customRanges\"\n [customRangeLabel]=\"customRangeBtnLbl\"\n (onSelect)=\"setRangeOnCalendar($event)\">\n </bs-custom-date-view>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i7.TimepickerComponent, selector: "timepicker", inputs: ["hourStep", "minuteStep", "secondsStep", "readonlyInput", "disabled", "mousewheel", "arrowkeys", "showSpinners", "showMeridian", "showMinutes", "showSeconds", "meridians", "min", "max", "hoursPlaceholder", "minutesPlaceholder", "secondsPlaceholder"], outputs: ["isValid", "meridianChange"] }, { kind: "component", type: BsCustomDatesViewComponent, selector: "bs-custom-date-view", inputs: ["ranges", "selectedRange", "customRangeLabel"], outputs: ["onSelect"] }, { kind: "component", type: BsDaysCalendarViewComponent, selector: "bs-days-calendar-view", inputs: ["calendar", "options", "isDisabled"], outputs: ["onNavigate", "onViewMode", "onSelect", "onHover", "onHoverWeek"] }, { kind: "component", type: BsMonthCalendarViewComponent, selector: "bs-month-calendar-view", inputs: ["calendar"], outputs: ["onNavigate", "onViewMode", "onSelect", "onHover"] }, { kind: "component", type: BsYearsCalendarViewComponent, selector: "bs-years-calendar-view", inputs: ["calendar"], outputs: ["onNavigate", "onViewMode", "onSelect", "onHover"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }], animations: [datepickerAnimation] });
2271
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerContainerComponent, decorators: [{
2272
- type: Component,
2273
- args: [{ selector: 'bs-datepicker-container', providers: [BsDatepickerStore, BsDatepickerEffects], host: {
2274
- class: 'bottom',
2275
- '(click)': '_stopPropagation($event)',
2276
- role: 'dialog',
2277
- 'aria-label': 'calendar',
2278
- }, animations: [datepickerAnimation], template: "<!-- days calendar view mode -->\n<div class=\"bs-datepicker\" [ngClass]=\"containerClass\" *ngIf=\"viewMode | async\">\n <div class=\"bs-datepicker-container\"\n [@datepickerAnimation]=\"animationState\"\n (@datepickerAnimation.done)=\"positionServiceEnable()\">\n <!--calendars-->\n <div class=\"bs-calendar-container\" [ngSwitch]=\"viewMode | async\" role=\"application\">\n <!--days calendar-->\n <ng-container *ngSwitchCase=\"'day'\">\n <div class=\"bs-media-container\">\n <bs-days-calendar-view\n *ngFor=\"let calendar of daysCalendar$ | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n [isDisabled]=\"isDatePickerDisabled\"\n [options]=\"options$ | async\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"dayHoverHandler($event)\"\n (onHoverWeek)=\"weekHoverHandler($event)\"\n (onSelect)=\"daySelectHandler($event)\">\n </bs-days-calendar-view>\n </div>\n <div *ngIf=\"withTimepicker\" class=\"bs-timepicker-in-datepicker-container\">\n <timepicker #startTP [disabled]=\"isDatePickerDisabled\"></timepicker>\n <timepicker #endTP *ngIf=\"isRangePicker\" [disabled]=\"isDatePickerDisabled\"></timepicker>\n </div>\n </ng-container>\n\n <!--months calendar-->\n <div *ngSwitchCase=\"'month'\" class=\"bs-media-container\">\n <bs-month-calendar-view\n *ngFor=\"let calendar of monthsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"monthHoverHandler($event)\"\n (onSelect)=\"monthSelectHandler($event)\">\n </bs-month-calendar-view>\n </div>\n\n <!--years calendar-->\n <div *ngSwitchCase=\"'year'\" class=\"bs-media-container\">\n <bs-years-calendar-view\n *ngFor=\"let calendar of yearsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"yearHoverHandler($event)\"\n (onSelect)=\"yearSelectHandler($event)\">\n </bs-years-calendar-view>\n </div>\n </div>\n\n <!--applycancel buttons-->\n <div class=\"bs-datepicker-buttons\" *ngIf=\"false\">\n <button class=\"btn btn-success\" type=\"button\">Apply</button>\n <button class=\"btn btn-default\" type=\"button\">Cancel</button>\n </div>\n\n <div class=\"bs-datepicker-buttons\" *ngIf=\"showTodayBtn || showClearBtn\">\n <div class=\"btn-today-wrapper\"\n [class.today-left]=\"todayPos === 'left'\"\n [class.today-right]=\"todayPos === 'right'\"\n [class.today-center]=\"todayPos === 'center'\"\n *ngIf=\"showTodayBtn\">\n <button class=\"btn btn-success\" (click)=\"setToday()\">{{todayBtnLbl}}</button>\n </div>\n\n <div class=\"btn-clear-wrapper\"\n [class.clear-left]=\"clearPos === 'left'\"\n [class.clear-right]=\"clearPos === 'right'\"\n [class.clear-center]=\"clearPos === 'center'\"\n *ngIf=\"showClearBtn\">\n <button class=\"btn btn-success\" (click)=\"clearDate()\">{{clearBtnLbl}}</button>\n </div>\n </div>\n\n </div>\n\n <!--custom dates or date ranges picker-->\n <div class=\"bs-datepicker-custom-range\" *ngIf=\"customRanges && customRanges.length > 0\">\n <bs-custom-date-view\n [selectedRange]=\"chosenRange\"\n [ranges]=\"customRanges\"\n [customRangeLabel]=\"customRangeBtnLbl\"\n (onSelect)=\"setRangeOnCalendar($event)\">\n </bs-custom-date-view>\n </div>\n</div>\n" }]
2279
- }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: BsDatepickerConfig }, { type: BsDatepickerStore }, { type: i0.ElementRef }, { type: BsDatepickerActions }, { type: BsDatepickerEffects }, { type: i5.PositioningService }]; }, propDecorators: { startTimepicker: [{
2280
- type: ViewChild,
2281
- args: ['startTP']
2282
- }], isDatepickerDisabled: [{
2283
- type: HostBinding,
2284
- args: ['attr.disabled']
2285
- }], isDatepickerReadonly: [{
2286
- type: HostBinding,
2287
- args: ['attr.readonly']
2288
- }] } });
2289
-
2290
- let previousDate$1;
2291
- class BsDatepickerDirective {
2292
- constructor(_config, _elementRef, _renderer, _viewContainerRef, cis) {
2293
- this._config = _config;
2294
- this._elementRef = _elementRef;
2295
- this._renderer = _renderer;
2296
- /**
2297
- * Placement of a datepicker. Accepts: "top", "bottom", "left", "right"
2298
- */
2299
- this.placement = 'bottom';
2300
- /**
2301
- * Specifies events that should trigger. Supports a space separated list of
2302
- * event names.
2303
- */
2304
- this.triggers = 'click';
2305
- /**
2306
- * Close datepicker on outside click
2307
- */
2308
- this.outsideClick = true;
2309
- /**
2310
- * A selector specifying the element the datepicker should be appended to.
2311
- */
2312
- this.container = 'body';
2313
- this.outsideEsc = true;
2314
- this.isDestroy$ = new Subject();
2315
- /**
2316
- * Indicates whether datepicker's content is enabled or not
2317
- */
2318
- this.isDisabled = false;
2319
- /**
2320
- * Emits when datepicker value has been changed
2321
- */
2322
- this.bsValueChange = new EventEmitter();
2323
- this._subs = [];
2324
- this._dateInputFormat$ = new Subject();
2325
- // todo: assign only subset of fields
2326
- Object.assign(this, this._config);
2327
- this._datepicker = cis.createLoader(_elementRef, _viewContainerRef, _renderer);
2328
- this.onShown = this._datepicker.onShown;
2329
- this.onHidden = this._datepicker.onHidden;
2330
- this.isOpen$ = new BehaviorSubject(this.isOpen);
2331
- }
2332
- get readonlyValue() {
2333
- return this.isDisabled ? '' : null;
2334
- }
2335
- /**
2336
- * Returns whether or not the datepicker is currently being shown
2337
- */
2338
- get isOpen() {
2339
- return this._datepicker.isShown;
2340
- }
2341
- set isOpen(value) {
2342
- this.isOpen$.next(value);
2343
- }
2344
- /**
2345
- * Initial value of datepicker
2346
- */
2347
- set bsValue(value) {
2348
- var _a;
2349
- if (this._bsValue && value && this._bsValue.getTime() === value.getTime()) {
2350
- return;
2351
- }
2352
- if (!this._bsValue && value && !this._config.withTimepicker) {
2353
- const now = new Date();
2354
- copyTime(value, now);
2355
- }
2356
- if (value && ((_a = this.bsConfig) === null || _a === void 0 ? void 0 : _a.initCurrentTime)) {
2357
- value = setCurrentTimeOnDateSelect(value);
2358
- }
2359
- this.initPreviousValue();
2360
- this._bsValue = value;
2361
- this.bsValueChange.emit(value);
2362
- }
2363
- get dateInputFormat$() {
2364
- return this._dateInputFormat$;
2365
- }
2366
- ngOnInit() {
2367
- this._datepicker.listen({
2368
- outsideClick: this.outsideClick,
2369
- outsideEsc: this.outsideEsc,
2370
- triggers: this.triggers,
2371
- show: () => this.show()
2372
- });
2373
- this.setConfig();
2374
- this.initPreviousValue();
2375
- }
2376
- initPreviousValue() {
2377
- previousDate$1 = this._bsValue;
2378
- }
2379
- ngOnChanges(changes) {
2380
- var _a, _b, _c;
2381
- if (changes["bsConfig"]) {
2382
- if (((_a = changes["bsConfig"].currentValue) === null || _a === void 0 ? void 0 : _a.initCurrentTime) && ((_b = changes["bsConfig"].currentValue) === null || _b === void 0 ? void 0 : _b.initCurrentTime) !== ((_c = changes["bsConfig"].previousValue) === null || _c === void 0 ? void 0 : _c.initCurrentTime) && this._bsValue) {
2383
- this.initPreviousValue();
2384
- this._bsValue = setCurrentTimeOnDateSelect(this._bsValue);
2385
- this.bsValueChange.emit(this._bsValue);
2386
- }
2387
- this.setConfig();
2388
- this._dateInputFormat$.next(this.bsConfig && this.bsConfig.dateInputFormat);
2389
- }
2390
- if (!this._datepickerRef || !this._datepickerRef.instance) {
2391
- return;
2392
- }
2393
- if (changes["minDate"]) {
2394
- this._datepickerRef.instance.minDate = this.minDate;
2395
- }
2396
- if (changes["maxDate"]) {
2397
- this._datepickerRef.instance.maxDate = this.maxDate;
2398
- }
2399
- if (changes["daysDisabled"]) {
2400
- this._datepickerRef.instance.daysDisabled = this.daysDisabled;
2401
- }
2402
- if (changes["datesDisabled"]) {
2403
- this._datepickerRef.instance.datesDisabled = this.datesDisabled;
2404
- }
2405
- if (changes["datesEnabled"]) {
2406
- this._datepickerRef.instance.datesEnabled = this.datesEnabled;
2407
- }
2408
- if (changes["isDisabled"]) {
2409
- this._datepickerRef.instance.isDisabled = this.isDisabled;
2410
- }
2411
- if (changes["dateCustomClasses"]) {
2412
- this._datepickerRef.instance.dateCustomClasses = this.dateCustomClasses;
2413
- }
2414
- if (changes["dateTooltipTexts"]) {
2415
- this._datepickerRef.instance.dateTooltipTexts = this.dateTooltipTexts;
2416
- }
2417
- }
2418
- initSubscribes() {
2419
- // if date changes from external source (model -> view)
2420
- this._subs.push(this.bsValueChange.subscribe((value) => {
2421
- if (this._datepickerRef) {
2422
- this._datepickerRef.instance.value = value;
2423
- }
2424
- }));
2425
- // if date changes from picker (view -> model)
2426
- if (this._datepickerRef) {
2427
- this._subs.push(this._datepickerRef.instance.valueChange.subscribe((value) => {
2428
- this.initPreviousValue();
2429
- this.bsValue = value;
2430
- if (this.keepDatepickerModalOpened()) {
2431
- return;
2432
- }
2433
- this.hide();
2434
- }));
2435
- }
2436
- }
2437
- keepDatepickerModalOpened() {
2438
- var _a;
2439
- if (!previousDate$1 || !((_a = this.bsConfig) === null || _a === void 0 ? void 0 : _a.keepDatepickerOpened) || !this._config.withTimepicker) {
2440
- return false;
2441
- }
2442
- return this.isDateSame();
2443
- }
2444
- isDateSame() {
2445
- var _a, _b, _c;
2446
- return (previousDate$1 instanceof Date
2447
- && (((_a = this._bsValue) === null || _a === void 0 ? void 0 : _a.getDate()) === (previousDate$1 === null || previousDate$1 === void 0 ? void 0 : previousDate$1.getDate()))
2448
- && (((_b = this._bsValue) === null || _b === void 0 ? void 0 : _b.getMonth()) === (previousDate$1 === null || previousDate$1 === void 0 ? void 0 : previousDate$1.getMonth()))
2449
- && (((_c = this._bsValue) === null || _c === void 0 ? void 0 : _c.getFullYear()) === (previousDate$1 === null || previousDate$1 === void 0 ? void 0 : previousDate$1.getFullYear())));
2450
- }
2451
- ngAfterViewInit() {
2452
- this.isOpen$.pipe(filter(isOpen => isOpen !== this.isOpen), takeUntil(this.isDestroy$))
2453
- .subscribe(() => this.toggle());
2454
- }
2455
- /**
2456
- * Opens an element’s datepicker. This is considered a “manual” triggering of
2457
- * the datepicker.
2458
- */
2459
- show() {
2460
- if (this._datepicker.isShown) {
2461
- return;
2462
- }
2463
- this.setConfig();
2464
- this._datepickerRef = this._datepicker
2465
- .provide({ provide: BsDatepickerConfig, useValue: this._config })
2466
- .attach(BsDatepickerContainerComponent)
2467
- .to(this.container)
2468
- .position({ attachment: this.placement })
2469
- .show({ placement: this.placement });
2470
- this.initSubscribes();
2471
- }
2472
- /**
2473
- * Closes an element’s datepicker. This is considered a “manual” triggering of
2474
- * the datepicker.
2475
- */
2476
- hide() {
2477
- if (this.isOpen) {
2478
- this._datepicker.hide();
2479
- }
2480
- for (const sub of this._subs) {
2481
- sub.unsubscribe();
2482
- }
2483
- if (this._config.returnFocusToInput) {
2484
- this._renderer.selectRootElement(this._elementRef.nativeElement).focus();
2485
- }
2486
- }
2487
- /**
2488
- * Toggles an element’s datepicker. This is considered a “manual” triggering
2489
- * of the datepicker.
2490
- */
2491
- toggle() {
2492
- if (this.isOpen) {
2493
- return this.hide();
2494
- }
2495
- this.show();
2496
- }
2497
- /**
2498
- * Set config for datepicker
2499
- */
2500
- setConfig() {
2501
- var _a, _b, _c;
2502
- this._config = Object.assign({}, this._config, this.bsConfig, {
2503
- value: this._config.keepDatesOutOfRules ? this._bsValue : checkBsValue(this._bsValue, this.maxDate || this.bsConfig && this.bsConfig.maxDate),
2504
- isDisabled: this.isDisabled,
2505
- minDate: this.minDate || this.bsConfig && this.bsConfig.minDate,
2506
- maxDate: this.maxDate || this.bsConfig && this.bsConfig.maxDate,
2507
- daysDisabled: this.daysDisabled || this.bsConfig && this.bsConfig.daysDisabled,
2508
- dateCustomClasses: this.dateCustomClasses || this.bsConfig && this.bsConfig.dateCustomClasses,
2509
- dateTooltipTexts: this.dateTooltipTexts || this.bsConfig && this.bsConfig.dateTooltipTexts,
2510
- datesDisabled: this.datesDisabled || this.bsConfig && this.bsConfig.datesDisabled,
2511
- datesEnabled: this.datesEnabled || this.bsConfig && this.bsConfig.datesEnabled,
2512
- minMode: this.minMode || this.bsConfig && this.bsConfig.minMode,
2513
- initCurrentTime: (_a = this.bsConfig) === null || _a === void 0 ? void 0 : _a.initCurrentTime,
2514
- keepDatepickerOpened: (_b = this.bsConfig) === null || _b === void 0 ? void 0 : _b.keepDatepickerOpened,
2515
- keepDatesOutOfRules: (_c = this.bsConfig) === null || _c === void 0 ? void 0 : _c.keepDatesOutOfRules
2516
- });
2517
- }
2518
- unsubscribeSubscriptions() {
2519
- var _a;
2520
- if ((_a = this._subs) === null || _a === void 0 ? void 0 : _a.length) {
2521
- this._subs.map(sub => sub.unsubscribe());
2522
- this._subs.length = 0;
2523
- }
2524
- }
2525
- ngOnDestroy() {
2526
- this._datepicker.dispose();
2527
- this.isOpen$.next(false);
2528
- if (this.isDestroy$) {
2529
- this.isDestroy$.next(null);
2530
- this.isDestroy$.complete();
2531
- }
2532
- this.unsubscribeSubscriptions();
2533
- }
2534
- }
2535
- BsDatepickerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerDirective, deps: [{ token: BsDatepickerConfig }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ViewContainerRef }, { token: i2.ComponentLoaderFactory }], target: i0.ɵɵFactoryTarget.Directive });
2536
- BsDatepickerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.3", type: BsDatepickerDirective, selector: "[bsDatepicker]", inputs: { placement: "placement", triggers: "triggers", outsideClick: "outsideClick", container: "container", outsideEsc: "outsideEsc", isDisabled: "isDisabled", minDate: "minDate", maxDate: "maxDate", minMode: "minMode", daysDisabled: "daysDisabled", datesDisabled: "datesDisabled", datesEnabled: "datesEnabled", dateCustomClasses: "dateCustomClasses", dateTooltipTexts: "dateTooltipTexts", isOpen: "isOpen", bsValue: "bsValue", bsConfig: "bsConfig" }, outputs: { onShown: "onShown", onHidden: "onHidden", bsValueChange: "bsValueChange" }, host: { properties: { "attr.readonly": "this.readonlyValue" } }, exportAs: ["bsDatepicker"], usesOnChanges: true, ngImport: i0 });
2537
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerDirective, decorators: [{
2538
- type: Directive,
2539
- args: [{
2540
- selector: '[bsDatepicker]',
2541
- exportAs: 'bsDatepicker'
2542
- }]
2543
- }], ctorParameters: function () { return [{ type: BsDatepickerConfig }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: i2.ComponentLoaderFactory }]; }, propDecorators: { placement: [{
2544
- type: Input
2545
- }], triggers: [{
2546
- type: Input
2547
- }], outsideClick: [{
2548
- type: Input
2549
- }], container: [{
2550
- type: Input
2551
- }], outsideEsc: [{
2552
- type: Input
2553
- }], onShown: [{
2554
- type: Output
2555
- }], onHidden: [{
2556
- type: Output
2557
- }], isDisabled: [{
2558
- type: Input
2559
- }], minDate: [{
2560
- type: Input
2561
- }], maxDate: [{
2562
- type: Input
2563
- }], minMode: [{
2564
- type: Input
2565
- }], daysDisabled: [{
2566
- type: Input
2567
- }], datesDisabled: [{
2568
- type: Input
2569
- }], datesEnabled: [{
2570
- type: Input
2571
- }], dateCustomClasses: [{
2572
- type: Input
2573
- }], dateTooltipTexts: [{
2574
- type: Input
2575
- }], bsValueChange: [{
2576
- type: Output
2577
- }], readonlyValue: [{
2578
- type: HostBinding,
2579
- args: ['attr.readonly']
2580
- }], isOpen: [{
2581
- type: Input
2582
- }], bsValue: [{
2583
- type: Input
2584
- }], bsConfig: [{
2585
- type: Input
2586
- }] } });
2587
-
2588
- class BsDatepickerInlineConfig extends BsDatepickerConfig {
2589
- }
2590
- BsDatepickerInlineConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerInlineConfig, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
2591
- BsDatepickerInlineConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerInlineConfig, providedIn: 'root' });
2592
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerInlineConfig, decorators: [{
2593
- type: Injectable,
2594
- args: [{
2595
- providedIn: 'root'
2596
- }]
2597
- }] });
2598
-
2599
- class BsDatepickerInlineContainerComponent extends BsDatepickerContainerComponent {
2600
- constructor(_renderer, _config, _store, _element, _actions, _effects, _positioningService) {
2601
- super(_renderer, _config, _store, _element, _actions, _effects, _positioningService);
2602
- _renderer.setStyle(_element.nativeElement, 'display', 'inline-block');
2603
- _renderer.setStyle(_element.nativeElement, 'position', 'static');
2604
- }
2605
- get disabledValue() {
2606
- return this.isDatePickerDisabled ? '' : null;
2607
- }
2608
- get readonlyValue() {
2609
- return this.isDatePickerDisabled ? '' : null;
2610
- }
2611
- }
2612
- BsDatepickerInlineContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerInlineContainerComponent, deps: [{ token: i0.Renderer2 }, { token: BsDatepickerConfig }, { token: BsDatepickerStore }, { token: i0.ElementRef }, { token: BsDatepickerActions }, { token: BsDatepickerEffects }, { token: i5.PositioningService }], target: i0.ɵɵFactoryTarget.Component });
2613
- BsDatepickerInlineContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.3", type: BsDatepickerInlineContainerComponent, selector: "bs-datepicker-inline-container", host: { listeners: { "click": "_stopPropagation($event)" }, properties: { "attr.disabled": "this.disabledValue", "attr.readonly": "this.readonlyValue" } }, providers: [BsDatepickerStore, BsDatepickerEffects], usesInheritance: true, ngImport: i0, template: "<!-- days calendar view mode -->\n<div class=\"bs-datepicker\" [ngClass]=\"containerClass\" *ngIf=\"viewMode | async\">\n <div class=\"bs-datepicker-container\"\n [@datepickerAnimation]=\"animationState\"\n (@datepickerAnimation.done)=\"positionServiceEnable()\">\n <!--calendars-->\n <div class=\"bs-calendar-container\" [ngSwitch]=\"viewMode | async\" role=\"application\">\n <!--days calendar-->\n <ng-container *ngSwitchCase=\"'day'\">\n <div class=\"bs-media-container\">\n <bs-days-calendar-view\n *ngFor=\"let calendar of daysCalendar$ | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n [isDisabled]=\"isDatePickerDisabled\"\n [options]=\"options$ | async\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"dayHoverHandler($event)\"\n (onHoverWeek)=\"weekHoverHandler($event)\"\n (onSelect)=\"daySelectHandler($event)\">\n </bs-days-calendar-view>\n </div>\n <div *ngIf=\"withTimepicker\" class=\"bs-timepicker-in-datepicker-container\">\n <timepicker #startTP [disabled]=\"isDatePickerDisabled\"></timepicker>\n <timepicker #endTP *ngIf=\"isRangePicker\" [disabled]=\"isDatePickerDisabled\"></timepicker>\n </div>\n </ng-container>\n\n <!--months calendar-->\n <div *ngSwitchCase=\"'month'\" class=\"bs-media-container\">\n <bs-month-calendar-view\n *ngFor=\"let calendar of monthsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"monthHoverHandler($event)\"\n (onSelect)=\"monthSelectHandler($event)\">\n </bs-month-calendar-view>\n </div>\n\n <!--years calendar-->\n <div *ngSwitchCase=\"'year'\" class=\"bs-media-container\">\n <bs-years-calendar-view\n *ngFor=\"let calendar of yearsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"yearHoverHandler($event)\"\n (onSelect)=\"yearSelectHandler($event)\">\n </bs-years-calendar-view>\n </div>\n </div>\n\n <!--applycancel buttons-->\n <div class=\"bs-datepicker-buttons\" *ngIf=\"false\">\n <button class=\"btn btn-success\" type=\"button\">Apply</button>\n <button class=\"btn btn-default\" type=\"button\">Cancel</button>\n </div>\n\n <div class=\"bs-datepicker-buttons\" *ngIf=\"showTodayBtn || showClearBtn\">\n <div class=\"btn-today-wrapper\"\n [class.today-left]=\"todayPos === 'left'\"\n [class.today-right]=\"todayPos === 'right'\"\n [class.today-center]=\"todayPos === 'center'\"\n *ngIf=\"showTodayBtn\">\n <button class=\"btn btn-success\" (click)=\"setToday()\">{{todayBtnLbl}}</button>\n </div>\n\n <div class=\"btn-clear-wrapper\"\n [class.clear-left]=\"clearPos === 'left'\"\n [class.clear-right]=\"clearPos === 'right'\"\n [class.clear-center]=\"clearPos === 'center'\"\n *ngIf=\"showClearBtn\">\n <button class=\"btn btn-success\" (click)=\"clearDate()\">{{clearBtnLbl}}</button>\n </div>\n </div>\n\n </div>\n\n <!--custom dates or date ranges picker-->\n <div class=\"bs-datepicker-custom-range\" *ngIf=\"customRanges && customRanges.length > 0\">\n <bs-custom-date-view\n [selectedRange]=\"chosenRange\"\n [ranges]=\"customRanges\"\n [customRangeLabel]=\"customRangeBtnLbl\"\n (onSelect)=\"setRangeOnCalendar($event)\">\n </bs-custom-date-view>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i7.TimepickerComponent, selector: "timepicker", inputs: ["hourStep", "minuteStep", "secondsStep", "readonlyInput", "disabled", "mousewheel", "arrowkeys", "showSpinners", "showMeridian", "showMinutes", "showSeconds", "meridians", "min", "max", "hoursPlaceholder", "minutesPlaceholder", "secondsPlaceholder"], outputs: ["isValid", "meridianChange"] }, { kind: "component", type: BsCustomDatesViewComponent, selector: "bs-custom-date-view", inputs: ["ranges", "selectedRange", "customRangeLabel"], outputs: ["onSelect"] }, { kind: "component", type: BsDaysCalendarViewComponent, selector: "bs-days-calendar-view", inputs: ["calendar", "options", "isDisabled"], outputs: ["onNavigate", "onViewMode", "onSelect", "onHover", "onHoverWeek"] }, { kind: "component", type: BsMonthCalendarViewComponent, selector: "bs-month-calendar-view", inputs: ["calendar"], outputs: ["onNavigate", "onViewMode", "onSelect", "onHover"] }, { kind: "component", type: BsYearsCalendarViewComponent, selector: "bs-years-calendar-view", inputs: ["calendar"], outputs: ["onNavigate", "onViewMode", "onSelect", "onHover"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }], animations: [datepickerAnimation] });
2614
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerInlineContainerComponent, decorators: [{
2615
- type: Component,
2616
- args: [{ selector: 'bs-datepicker-inline-container', providers: [BsDatepickerStore, BsDatepickerEffects], host: {
2617
- '(click)': '_stopPropagation($event)'
2618
- }, animations: [datepickerAnimation], template: "<!-- days calendar view mode -->\n<div class=\"bs-datepicker\" [ngClass]=\"containerClass\" *ngIf=\"viewMode | async\">\n <div class=\"bs-datepicker-container\"\n [@datepickerAnimation]=\"animationState\"\n (@datepickerAnimation.done)=\"positionServiceEnable()\">\n <!--calendars-->\n <div class=\"bs-calendar-container\" [ngSwitch]=\"viewMode | async\" role=\"application\">\n <!--days calendar-->\n <ng-container *ngSwitchCase=\"'day'\">\n <div class=\"bs-media-container\">\n <bs-days-calendar-view\n *ngFor=\"let calendar of daysCalendar$ | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n [isDisabled]=\"isDatePickerDisabled\"\n [options]=\"options$ | async\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"dayHoverHandler($event)\"\n (onHoverWeek)=\"weekHoverHandler($event)\"\n (onSelect)=\"daySelectHandler($event)\">\n </bs-days-calendar-view>\n </div>\n <div *ngIf=\"withTimepicker\" class=\"bs-timepicker-in-datepicker-container\">\n <timepicker #startTP [disabled]=\"isDatePickerDisabled\"></timepicker>\n <timepicker #endTP *ngIf=\"isRangePicker\" [disabled]=\"isDatePickerDisabled\"></timepicker>\n </div>\n </ng-container>\n\n <!--months calendar-->\n <div *ngSwitchCase=\"'month'\" class=\"bs-media-container\">\n <bs-month-calendar-view\n *ngFor=\"let calendar of monthsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"monthHoverHandler($event)\"\n (onSelect)=\"monthSelectHandler($event)\">\n </bs-month-calendar-view>\n </div>\n\n <!--years calendar-->\n <div *ngSwitchCase=\"'year'\" class=\"bs-media-container\">\n <bs-years-calendar-view\n *ngFor=\"let calendar of yearsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"yearHoverHandler($event)\"\n (onSelect)=\"yearSelectHandler($event)\">\n </bs-years-calendar-view>\n </div>\n </div>\n\n <!--applycancel buttons-->\n <div class=\"bs-datepicker-buttons\" *ngIf=\"false\">\n <button class=\"btn btn-success\" type=\"button\">Apply</button>\n <button class=\"btn btn-default\" type=\"button\">Cancel</button>\n </div>\n\n <div class=\"bs-datepicker-buttons\" *ngIf=\"showTodayBtn || showClearBtn\">\n <div class=\"btn-today-wrapper\"\n [class.today-left]=\"todayPos === 'left'\"\n [class.today-right]=\"todayPos === 'right'\"\n [class.today-center]=\"todayPos === 'center'\"\n *ngIf=\"showTodayBtn\">\n <button class=\"btn btn-success\" (click)=\"setToday()\">{{todayBtnLbl}}</button>\n </div>\n\n <div class=\"btn-clear-wrapper\"\n [class.clear-left]=\"clearPos === 'left'\"\n [class.clear-right]=\"clearPos === 'right'\"\n [class.clear-center]=\"clearPos === 'center'\"\n *ngIf=\"showClearBtn\">\n <button class=\"btn btn-success\" (click)=\"clearDate()\">{{clearBtnLbl}}</button>\n </div>\n </div>\n\n </div>\n\n <!--custom dates or date ranges picker-->\n <div class=\"bs-datepicker-custom-range\" *ngIf=\"customRanges && customRanges.length > 0\">\n <bs-custom-date-view\n [selectedRange]=\"chosenRange\"\n [ranges]=\"customRanges\"\n [customRangeLabel]=\"customRangeBtnLbl\"\n (onSelect)=\"setRangeOnCalendar($event)\">\n </bs-custom-date-view>\n </div>\n</div>\n" }]
2619
- }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: BsDatepickerConfig }, { type: BsDatepickerStore }, { type: i0.ElementRef }, { type: BsDatepickerActions }, { type: BsDatepickerEffects }, { type: i5.PositioningService }]; }, propDecorators: { disabledValue: [{
2620
- type: HostBinding,
2621
- args: ['attr.disabled']
2622
- }], readonlyValue: [{
2623
- type: HostBinding,
2624
- args: ['attr.readonly']
2625
- }] } });
2626
-
2627
- class BsDatepickerInlineDirective {
2628
- constructor(_config, _elementRef, _renderer, _viewContainerRef, cis) {
2629
- this._config = _config;
2630
- this._elementRef = _elementRef;
2631
- /**
2632
- * Indicates whether datepicker is enabled or not
2633
- */
2634
- this.isDisabled = false;
2635
- /**
2636
- * Emits when datepicker value has been changed
2637
- */
2638
- this.bsValueChange = new EventEmitter();
2639
- this._subs = [];
2640
- // todo: assign only subset of fields
2641
- Object.assign(this, this._config);
2642
- this._datepicker = cis.createLoader(_elementRef, _viewContainerRef, _renderer);
2643
- }
2644
- /**
2645
- * Initial value of datepicker
2646
- */
2647
- set bsValue(value) {
2648
- var _a;
2649
- if (this._bsValue === value) {
2650
- return;
2651
- }
2652
- if (!this._bsValue && value && !this._config.withTimepicker) {
2653
- const now = new Date();
2654
- copyTime(value, now);
2655
- }
2656
- if (value && ((_a = this.bsConfig) === null || _a === void 0 ? void 0 : _a.initCurrentTime)) {
2657
- value = setCurrentTimeOnDateSelect(value);
2658
- }
2659
- this._bsValue = value;
2660
- this.bsValueChange.emit(value);
2661
- }
2662
- ngOnInit() {
2663
- this.setConfig();
2664
- this.initSubscribes();
2665
- }
2666
- initSubscribes() {
2667
- this.unsubscribeSubscriptions();
2668
- this._subs.push(this.bsValueChange.subscribe((value) => {
2669
- if (this._datepickerRef) {
2670
- this._datepickerRef.instance.value = value;
2671
- }
2672
- }));
2673
- if (this._datepickerRef) {
2674
- this._subs.push(this._datepickerRef.instance.valueChange.subscribe((value) => {
2675
- this.bsValue = value;
2676
- }));
2677
- }
2678
- }
2679
- unsubscribeSubscriptions() {
2680
- var _a;
2681
- if ((_a = this._subs) === null || _a === void 0 ? void 0 : _a.length) {
2682
- this._subs.map(sub => sub.unsubscribe());
2683
- this._subs.length = 0;
2684
- }
2685
- }
2686
- ngOnChanges(changes) {
2687
- var _a, _b, _c;
2688
- if (changes["bsConfig"]) {
2689
- if (((_a = changes["bsConfig"].currentValue) === null || _a === void 0 ? void 0 : _a.initCurrentTime) && ((_b = changes["bsConfig"].currentValue) === null || _b === void 0 ? void 0 : _b.initCurrentTime) !== ((_c = changes["bsConfig"].previousValue) === null || _c === void 0 ? void 0 : _c.initCurrentTime) && this._bsValue) {
2690
- this._bsValue = setCurrentTimeOnDateSelect(this._bsValue);
2691
- this.bsValueChange.emit(this._bsValue);
2692
- }
2693
- }
2694
- if (!this._datepickerRef || !this._datepickerRef.instance) {
2695
- return;
2696
- }
2697
- if (changes["minDate"]) {
2698
- this._datepickerRef.instance.minDate = this.minDate;
2699
- }
2700
- if (changes["maxDate"]) {
2701
- this._datepickerRef.instance.maxDate = this.maxDate;
2702
- }
2703
- if (changes["datesDisabled"]) {
2704
- this._datepickerRef.instance.datesDisabled = this.datesDisabled;
2705
- }
2706
- if (changes["datesEnabled"]) {
2707
- this._datepickerRef.instance.datesEnabled = this.datesEnabled;
2708
- this._datepickerRef.instance.value = this._bsValue;
2709
- }
2710
- if (changes["isDisabled"]) {
2711
- this._datepickerRef.instance.isDisabled = this.isDisabled;
2712
- }
2713
- if (changes["dateCustomClasses"]) {
2714
- this._datepickerRef.instance.dateCustomClasses = this.dateCustomClasses;
2715
- }
2716
- if (changes["dateTooltipTexts"]) {
2717
- this._datepickerRef.instance.dateTooltipTexts = this.dateTooltipTexts;
2718
- }
2719
- this.setConfig();
2720
- }
2721
- /**
2722
- * Set config for datepicker
2723
- */
2724
- setConfig() {
2725
- var _a;
2726
- if (this._datepicker) {
2727
- this._datepicker.hide();
2728
- }
2729
- this._config = Object.assign({}, this._config, this.bsConfig, {
2730
- value: checkBsValue(this._bsValue, this.maxDate || this.bsConfig && this.bsConfig.maxDate),
2731
- isDisabled: this.isDisabled,
2732
- minDate: this.minDate || this.bsConfig && this.bsConfig.minDate,
2733
- maxDate: this.maxDate || this.bsConfig && this.bsConfig.maxDate,
2734
- dateCustomClasses: this.dateCustomClasses || this.bsConfig && this.bsConfig.dateCustomClasses,
2735
- dateTooltipTexts: this.dateTooltipTexts || this.bsConfig && this.bsConfig.dateTooltipTexts,
2736
- datesDisabled: this.datesDisabled || this.bsConfig && this.bsConfig.datesDisabled,
2737
- datesEnabled: this.datesEnabled || this.bsConfig && this.bsConfig.datesEnabled,
2738
- initCurrentTime: (_a = this.bsConfig) === null || _a === void 0 ? void 0 : _a.initCurrentTime
2739
- });
2740
- this._datepickerRef = this._datepicker
2741
- .provide({ provide: BsDatepickerConfig, useValue: this._config })
2742
- .attach(BsDatepickerInlineContainerComponent)
2743
- .to(this._elementRef)
2744
- .show();
2745
- this.initSubscribes();
2746
- }
2747
- ngOnDestroy() {
2748
- this._datepicker.dispose();
2749
- this.unsubscribeSubscriptions();
2750
- }
2751
- }
2752
- BsDatepickerInlineDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerInlineDirective, deps: [{ token: BsDatepickerInlineConfig }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ViewContainerRef }, { token: i2.ComponentLoaderFactory }], target: i0.ɵɵFactoryTarget.Directive });
2753
- BsDatepickerInlineDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.3", type: BsDatepickerInlineDirective, selector: "bs-datepicker-inline", inputs: { bsConfig: "bsConfig", isDisabled: "isDisabled", minDate: "minDate", maxDate: "maxDate", dateCustomClasses: "dateCustomClasses", dateTooltipTexts: "dateTooltipTexts", datesEnabled: "datesEnabled", datesDisabled: "datesDisabled", bsValue: "bsValue" }, outputs: { bsValueChange: "bsValueChange" }, exportAs: ["bsDatepickerInline"], usesOnChanges: true, ngImport: i0 });
2754
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerInlineDirective, decorators: [{
2755
- type: Directive,
2756
- args: [{
2757
- selector: 'bs-datepicker-inline',
2758
- exportAs: 'bsDatepickerInline'
2759
- }]
2760
- }], ctorParameters: function () { return [{ type: BsDatepickerInlineConfig }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: i2.ComponentLoaderFactory }]; }, propDecorators: { bsConfig: [{
2761
- type: Input
2762
- }], isDisabled: [{
2763
- type: Input
2764
- }], minDate: [{
2765
- type: Input
2766
- }], maxDate: [{
2767
- type: Input
2768
- }], dateCustomClasses: [{
2769
- type: Input
2770
- }], dateTooltipTexts: [{
2771
- type: Input
2772
- }], datesEnabled: [{
2773
- type: Input
2774
- }], datesDisabled: [{
2775
- type: Input
2776
- }], bsValueChange: [{
2777
- type: Output
2778
- }], bsValue: [{
2779
- type: Input
2780
- }] } });
2781
-
2782
- class BsDaterangepickerInlineConfig extends BsDatepickerConfig {
2783
- constructor() {
2784
- super(...arguments);
2785
- // DatepickerRenderOptions
2786
- this.displayMonths = 2;
2787
- /** turn on/off animation */
2788
- this.isAnimated = false;
2789
- }
2790
- }
2791
- BsDaterangepickerInlineConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDaterangepickerInlineConfig, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
2792
- BsDaterangepickerInlineConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDaterangepickerInlineConfig, providedIn: 'root' });
2793
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDaterangepickerInlineConfig, decorators: [{
2794
- type: Injectable,
2795
- args: [{
2796
- providedIn: 'root'
2797
- }]
2798
- }] });
2799
-
2800
- class BsDaterangepickerContainerComponent extends BsDatepickerAbstractComponent {
2801
- constructor(_renderer, _config, _store, _element, _actions, _effects, _positionService) {
2802
- super();
2803
- this._config = _config;
2804
- this._store = _store;
2805
- this._element = _element;
2806
- this._actions = _actions;
2807
- this._positionService = _positionService;
2808
- this.valueChange = new EventEmitter();
2809
- this.animationState = 'void';
2810
- this._rangeStack = [];
2811
- this.chosenRange = [];
2812
- this._subs = [];
2813
- this.isRangePicker = true;
2814
- this._effects = _effects;
2815
- this.customRanges = this._config.ranges || [];
2816
- this.customRangeBtnLbl = this._config.customRangeButtonLabel;
2817
- _renderer.setStyle(_element.nativeElement, 'display', 'block');
2818
- _renderer.setStyle(_element.nativeElement, 'position', 'absolute');
2819
- }
2820
- set value(value) {
2821
- var _a;
2822
- (_a = this._effects) === null || _a === void 0 ? void 0 : _a.setRangeValue(value);
2823
- }
2824
- get isDatePickerDisabled() {
2825
- return !!this._config.isDisabled;
2826
- }
2827
- get isDatepickerDisabled() {
2828
- return this.isDatePickerDisabled ? '' : null;
2829
- }
2830
- get isDatepickerReadonly() {
2831
- return this.isDatePickerDisabled ? '' : null;
2832
- }
2833
- ngOnInit() {
2834
- var _a, _b;
2835
- this._positionService.setOptions({
2836
- modifiers: {
2837
- flip: {
2838
- enabled: this._config.adaptivePosition
2839
- },
2840
- preventOverflow: {
2841
- enabled: this._config.adaptivePosition
2842
- }
2843
- },
2844
- allowedPositions: this._config.allowedPositions
2845
- });
2846
- (_a = this._positionService.event$) === null || _a === void 0 ? void 0 : _a.pipe(take(1)).subscribe(() => {
2847
- this._positionService.disable();
2848
- if (this._config.isAnimated) {
2849
- this.animationState = this.isTopPosition ? 'animated-up' : 'animated-down';
2850
- return;
2851
- }
2852
- this.animationState = 'unanimated';
2853
- });
2854
- this.containerClass = this._config.containerClass;
2855
- this.isOtherMonthsActive = this._config.selectFromOtherMonth;
2856
- this.withTimepicker = this._config.withTimepicker;
2857
- (_b = this._effects) === null || _b === void 0 ? void 0 : _b.init(this._store).setOptions(this._config).setBindings(this).setEventHandlers(this).registerDatepickerSideEffects();
2858
- let currentDate;
2859
- // todo: move it somewhere else
2860
- // on selected date change
2861
- this._subs.push(this._store
2862
- .select(state => state.selectedRange)
2863
- .subscribe(dateRange => {
2864
- currentDate = dateRange;
2865
- this.valueChange.emit(dateRange);
2866
- this.chosenRange = dateRange || [];
2867
- }));
2868
- this._subs.push(this._store
2869
- .select(state => state.selectedTime)
2870
- .subscribe((time) => {
2871
- if ((!time[0] || !time[1]) ||
2872
- (!(time[0] instanceof Date) || !(time[1] instanceof Date)) ||
2873
- (currentDate && (time[0] === currentDate[0] && time[1] === currentDate[1]))) {
2874
- return;
2875
- }
2876
- this.valueChange.emit(time);
2877
- this.chosenRange = time || [];
2878
- }));
2879
- }
2880
- ngAfterViewInit() {
2881
- var _a, _b, _c;
2882
- this.selectedTimeSub.add((_a = this.selectedTime) === null || _a === void 0 ? void 0 : _a.subscribe((val) => {
2883
- var _a, _b;
2884
- if (Array.isArray(val) && val.length >= 2) {
2885
- (_a = this.startTimepicker) === null || _a === void 0 ? void 0 : _a.writeValue(val[0]);
2886
- (_b = this.endTimepicker) === null || _b === void 0 ? void 0 : _b.writeValue(val[1]);
2887
- }
2888
- }));
2889
- (_b = this.startTimepicker) === null || _b === void 0 ? void 0 : _b.registerOnChange((val) => {
2890
- this.timeSelectHandler(val, 0);
2891
- });
2892
- (_c = this.endTimepicker) === null || _c === void 0 ? void 0 : _c.registerOnChange((val) => {
2893
- this.timeSelectHandler(val, 1);
2894
- });
2895
- }
2896
- get isTopPosition() {
2897
- return this._element.nativeElement.classList.contains('top');
2898
- }
2899
- positionServiceEnable() {
2900
- this._positionService.enable();
2901
- }
2902
- timeSelectHandler(date, index) {
2903
- this._store.dispatch(this._actions.selectTime(date, index));
2904
- }
2905
- daySelectHandler(day) {
2906
- if (!day) {
2907
- return;
2908
- }
2909
- const isDisabled = this.isOtherMonthsActive ? day.isDisabled : (day.isOtherMonth || day.isDisabled);
2910
- if (isDisabled) {
2911
- return;
2912
- }
2913
- this.rangesProcessing(day);
2914
- }
2915
- monthSelectHandler(day) {
2916
- if (!day || day.isDisabled) {
2917
- return;
2918
- }
2919
- day.isSelected = true;
2920
- if (this._config.minMode !== 'month') {
2921
- if (day.isDisabled) {
2922
- return;
2923
- }
2924
- this._store.dispatch(this._actions.navigateTo({
2925
- unit: {
2926
- month: getMonth(day.date),
2927
- year: getFullYear(day.date)
2928
- },
2929
- viewMode: 'day'
2930
- }));
2931
- return;
2932
- }
2933
- this.rangesProcessing(day);
2934
- }
2935
- yearSelectHandler(day) {
2936
- if (!day || day.isDisabled) {
2937
- return;
2938
- }
2939
- day.isSelected = true;
2940
- if (this._config.minMode !== 'year') {
2941
- if (day.isDisabled) {
2942
- return;
2943
- }
2944
- this._store.dispatch(this._actions.navigateTo({
2945
- unit: {
2946
- year: getFullYear(day.date)
2947
- },
2948
- viewMode: 'month'
2949
- }));
2950
- return;
2951
- }
2952
- this.rangesProcessing(day);
2953
- }
2954
- rangesProcessing(day) {
2955
- // if only one date is already selected
2956
- // and user clicks on previous date
2957
- // start selection from new date
2958
- // but if new date is after initial one
2959
- // than finish selection
2960
- if (this._rangeStack.length === 1) {
2961
- this._rangeStack =
2962
- day.date >= this._rangeStack[0]
2963
- ? [this._rangeStack[0], day.date]
2964
- : [day.date];
2965
- }
2966
- if (this._config.maxDateRange) {
2967
- this.setMaxDateRangeOnCalendar(day.date);
2968
- }
2969
- if (this._rangeStack.length === 0) {
2970
- this._rangeStack = [day.date];
2971
- if (this._config.maxDateRange) {
2972
- this.setMaxDateRangeOnCalendar(day.date);
2973
- }
2974
- }
2975
- this._store.dispatch(this._actions.selectRange(this._rangeStack));
2976
- if (this._rangeStack.length === 2) {
2977
- this._rangeStack = [];
2978
- }
2979
- }
2980
- ngOnDestroy() {
2981
- var _a;
2982
- for (const sub of this._subs) {
2983
- sub.unsubscribe();
2984
- }
2985
- this.selectedTimeSub.unsubscribe();
2986
- (_a = this._effects) === null || _a === void 0 ? void 0 : _a.destroy();
2987
- }
2988
- setRangeOnCalendar(dates) {
2989
- if (dates) {
2990
- this._rangeStack = dates.value instanceof Date ? [dates.value] : dates.value;
2991
- }
2992
- this._store.dispatch(this._actions.selectRange(this._rangeStack));
2993
- }
2994
- setMaxDateRangeOnCalendar(currentSelection) {
2995
- var _a;
2996
- let maxDateRange = new Date(currentSelection);
2997
- if (this._config.maxDate) {
2998
- const maxDateValueInMilliseconds = this._config.maxDate.getTime();
2999
- const maxDateRangeInMilliseconds = currentSelection.getTime() + ((this._config.maxDateRange || 0) * dayInMilliseconds);
3000
- maxDateRange = maxDateRangeInMilliseconds > maxDateValueInMilliseconds ?
3001
- new Date(this._config.maxDate) :
3002
- new Date(maxDateRangeInMilliseconds);
3003
- }
3004
- else {
3005
- maxDateRange.setDate(currentSelection.getDate() + (this._config.maxDateRange || 0));
3006
- }
3007
- (_a = this._effects) === null || _a === void 0 ? void 0 : _a.setMaxDate(maxDateRange);
3008
- }
3009
- }
3010
- BsDaterangepickerContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDaterangepickerContainerComponent, deps: [{ token: i0.Renderer2 }, { token: BsDatepickerConfig }, { token: BsDatepickerStore }, { token: i0.ElementRef }, { token: BsDatepickerActions }, { token: BsDatepickerEffects }, { token: i5.PositioningService }], target: i0.ɵɵFactoryTarget.Component });
3011
- BsDaterangepickerContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.3", type: BsDaterangepickerContainerComponent, selector: "bs-daterangepicker-container", host: { attributes: { "role": "dialog", "aria-label": "calendar" }, listeners: { "click": "_stopPropagation($event)" }, properties: { "attr.disabled": "this.isDatepickerDisabled", "attr.readonly": "this.isDatepickerReadonly" }, classAttribute: "bottom" }, providers: [BsDatepickerStore, BsDatepickerEffects], viewQueries: [{ propertyName: "startTimepicker", first: true, predicate: ["startTP"], descendants: true }, { propertyName: "endTimepicker", first: true, predicate: ["endTP"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<!-- days calendar view mode -->\n<div class=\"bs-datepicker\" [ngClass]=\"containerClass\" *ngIf=\"viewMode | async\">\n <div class=\"bs-datepicker-container\"\n [@datepickerAnimation]=\"animationState\"\n (@datepickerAnimation.done)=\"positionServiceEnable()\">\n <!--calendars-->\n <div class=\"bs-calendar-container\" [ngSwitch]=\"viewMode | async\" role=\"application\">\n <!--days calendar-->\n <ng-container *ngSwitchCase=\"'day'\">\n <div class=\"bs-media-container\">\n <bs-days-calendar-view\n *ngFor=\"let calendar of daysCalendar$ | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n [isDisabled]=\"isDatePickerDisabled\"\n [options]=\"options$ | async\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"dayHoverHandler($event)\"\n (onHoverWeek)=\"weekHoverHandler($event)\"\n (onSelect)=\"daySelectHandler($event)\">\n </bs-days-calendar-view>\n </div>\n <div *ngIf=\"withTimepicker\" class=\"bs-timepicker-in-datepicker-container\">\n <timepicker #startTP [disabled]=\"isDatePickerDisabled\"></timepicker>\n <timepicker #endTP *ngIf=\"isRangePicker\" [disabled]=\"isDatePickerDisabled\"></timepicker>\n </div>\n </ng-container>\n\n <!--months calendar-->\n <div *ngSwitchCase=\"'month'\" class=\"bs-media-container\">\n <bs-month-calendar-view\n *ngFor=\"let calendar of monthsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"monthHoverHandler($event)\"\n (onSelect)=\"monthSelectHandler($event)\">\n </bs-month-calendar-view>\n </div>\n\n <!--years calendar-->\n <div *ngSwitchCase=\"'year'\" class=\"bs-media-container\">\n <bs-years-calendar-view\n *ngFor=\"let calendar of yearsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"yearHoverHandler($event)\"\n (onSelect)=\"yearSelectHandler($event)\">\n </bs-years-calendar-view>\n </div>\n </div>\n\n <!--applycancel buttons-->\n <div class=\"bs-datepicker-buttons\" *ngIf=\"false\">\n <button class=\"btn btn-success\" type=\"button\">Apply</button>\n <button class=\"btn btn-default\" type=\"button\">Cancel</button>\n </div>\n\n <div class=\"bs-datepicker-buttons\" *ngIf=\"showTodayBtn || showClearBtn\">\n <div class=\"btn-today-wrapper\"\n [class.today-left]=\"todayPos === 'left'\"\n [class.today-right]=\"todayPos === 'right'\"\n [class.today-center]=\"todayPos === 'center'\"\n *ngIf=\"showTodayBtn\">\n <button class=\"btn btn-success\" (click)=\"setToday()\">{{todayBtnLbl}}</button>\n </div>\n\n <div class=\"btn-clear-wrapper\"\n [class.clear-left]=\"clearPos === 'left'\"\n [class.clear-right]=\"clearPos === 'right'\"\n [class.clear-center]=\"clearPos === 'center'\"\n *ngIf=\"showClearBtn\">\n <button class=\"btn btn-success\" (click)=\"clearDate()\">{{clearBtnLbl}}</button>\n </div>\n </div>\n\n </div>\n\n <!--custom dates or date ranges picker-->\n <div class=\"bs-datepicker-custom-range\" *ngIf=\"customRanges && customRanges.length > 0\">\n <bs-custom-date-view\n [selectedRange]=\"chosenRange\"\n [ranges]=\"customRanges\"\n [customRangeLabel]=\"customRangeBtnLbl\"\n (onSelect)=\"setRangeOnCalendar($event)\">\n </bs-custom-date-view>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i7.TimepickerComponent, selector: "timepicker", inputs: ["hourStep", "minuteStep", "secondsStep", "readonlyInput", "disabled", "mousewheel", "arrowkeys", "showSpinners", "showMeridian", "showMinutes", "showSeconds", "meridians", "min", "max", "hoursPlaceholder", "minutesPlaceholder", "secondsPlaceholder"], outputs: ["isValid", "meridianChange"] }, { kind: "component", type: BsCustomDatesViewComponent, selector: "bs-custom-date-view", inputs: ["ranges", "selectedRange", "customRangeLabel"], outputs: ["onSelect"] }, { kind: "component", type: BsDaysCalendarViewComponent, selector: "bs-days-calendar-view", inputs: ["calendar", "options", "isDisabled"], outputs: ["onNavigate", "onViewMode", "onSelect", "onHover", "onHoverWeek"] }, { kind: "component", type: BsMonthCalendarViewComponent, selector: "bs-month-calendar-view", inputs: ["calendar"], outputs: ["onNavigate", "onViewMode", "onSelect", "onHover"] }, { kind: "component", type: BsYearsCalendarViewComponent, selector: "bs-years-calendar-view", inputs: ["calendar"], outputs: ["onNavigate", "onViewMode", "onSelect", "onHover"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }], animations: [datepickerAnimation] });
3012
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDaterangepickerContainerComponent, decorators: [{
3013
- type: Component,
3014
- args: [{ selector: 'bs-daterangepicker-container', providers: [BsDatepickerStore, BsDatepickerEffects], host: {
3015
- class: 'bottom',
3016
- '(click)': '_stopPropagation($event)',
3017
- role: 'dialog',
3018
- 'aria-label': 'calendar'
3019
- }, animations: [datepickerAnimation], template: "<!-- days calendar view mode -->\n<div class=\"bs-datepicker\" [ngClass]=\"containerClass\" *ngIf=\"viewMode | async\">\n <div class=\"bs-datepicker-container\"\n [@datepickerAnimation]=\"animationState\"\n (@datepickerAnimation.done)=\"positionServiceEnable()\">\n <!--calendars-->\n <div class=\"bs-calendar-container\" [ngSwitch]=\"viewMode | async\" role=\"application\">\n <!--days calendar-->\n <ng-container *ngSwitchCase=\"'day'\">\n <div class=\"bs-media-container\">\n <bs-days-calendar-view\n *ngFor=\"let calendar of daysCalendar$ | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n [isDisabled]=\"isDatePickerDisabled\"\n [options]=\"options$ | async\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"dayHoverHandler($event)\"\n (onHoverWeek)=\"weekHoverHandler($event)\"\n (onSelect)=\"daySelectHandler($event)\">\n </bs-days-calendar-view>\n </div>\n <div *ngIf=\"withTimepicker\" class=\"bs-timepicker-in-datepicker-container\">\n <timepicker #startTP [disabled]=\"isDatePickerDisabled\"></timepicker>\n <timepicker #endTP *ngIf=\"isRangePicker\" [disabled]=\"isDatePickerDisabled\"></timepicker>\n </div>\n </ng-container>\n\n <!--months calendar-->\n <div *ngSwitchCase=\"'month'\" class=\"bs-media-container\">\n <bs-month-calendar-view\n *ngFor=\"let calendar of monthsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"monthHoverHandler($event)\"\n (onSelect)=\"monthSelectHandler($event)\">\n </bs-month-calendar-view>\n </div>\n\n <!--years calendar-->\n <div *ngSwitchCase=\"'year'\" class=\"bs-media-container\">\n <bs-years-calendar-view\n *ngFor=\"let calendar of yearsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"yearHoverHandler($event)\"\n (onSelect)=\"yearSelectHandler($event)\">\n </bs-years-calendar-view>\n </div>\n </div>\n\n <!--applycancel buttons-->\n <div class=\"bs-datepicker-buttons\" *ngIf=\"false\">\n <button class=\"btn btn-success\" type=\"button\">Apply</button>\n <button class=\"btn btn-default\" type=\"button\">Cancel</button>\n </div>\n\n <div class=\"bs-datepicker-buttons\" *ngIf=\"showTodayBtn || showClearBtn\">\n <div class=\"btn-today-wrapper\"\n [class.today-left]=\"todayPos === 'left'\"\n [class.today-right]=\"todayPos === 'right'\"\n [class.today-center]=\"todayPos === 'center'\"\n *ngIf=\"showTodayBtn\">\n <button class=\"btn btn-success\" (click)=\"setToday()\">{{todayBtnLbl}}</button>\n </div>\n\n <div class=\"btn-clear-wrapper\"\n [class.clear-left]=\"clearPos === 'left'\"\n [class.clear-right]=\"clearPos === 'right'\"\n [class.clear-center]=\"clearPos === 'center'\"\n *ngIf=\"showClearBtn\">\n <button class=\"btn btn-success\" (click)=\"clearDate()\">{{clearBtnLbl}}</button>\n </div>\n </div>\n\n </div>\n\n <!--custom dates or date ranges picker-->\n <div class=\"bs-datepicker-custom-range\" *ngIf=\"customRanges && customRanges.length > 0\">\n <bs-custom-date-view\n [selectedRange]=\"chosenRange\"\n [ranges]=\"customRanges\"\n [customRangeLabel]=\"customRangeBtnLbl\"\n (onSelect)=\"setRangeOnCalendar($event)\">\n </bs-custom-date-view>\n </div>\n</div>\n" }]
3020
- }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: BsDatepickerConfig }, { type: BsDatepickerStore }, { type: i0.ElementRef }, { type: BsDatepickerActions }, { type: BsDatepickerEffects }, { type: i5.PositioningService }]; }, propDecorators: { startTimepicker: [{
3021
- type: ViewChild,
3022
- args: ['startTP']
3023
- }], endTimepicker: [{
3024
- type: ViewChild,
3025
- args: ['endTP']
3026
- }], isDatepickerDisabled: [{
3027
- type: HostBinding,
3028
- args: ['attr.disabled']
3029
- }], isDatepickerReadonly: [{
3030
- type: HostBinding,
3031
- args: ['attr.readonly']
3032
- }] } });
3033
-
3034
- class BsDaterangepickerInlineContainerComponent extends BsDaterangepickerContainerComponent {
3035
- constructor(_renderer, _config, _store, _element, _actions, _effects, _positioningService) {
3036
- super(_renderer, _config, _store, _element, _actions, _effects, _positioningService);
3037
- _renderer.setStyle(_element.nativeElement, 'display', 'inline-block');
3038
- _renderer.setStyle(_element.nativeElement, 'position', 'static');
3039
- }
3040
- get disabledValue() {
3041
- return this.isDatePickerDisabled ? '' : null;
3042
- }
3043
- get readonlyValue() {
3044
- return this.isDatePickerDisabled ? '' : null;
3045
- }
3046
- }
3047
- BsDaterangepickerInlineContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDaterangepickerInlineContainerComponent, deps: [{ token: i0.Renderer2 }, { token: BsDatepickerConfig }, { token: BsDatepickerStore }, { token: i0.ElementRef }, { token: BsDatepickerActions }, { token: BsDatepickerEffects }, { token: i5.PositioningService }], target: i0.ɵɵFactoryTarget.Component });
3048
- BsDaterangepickerInlineContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.3", type: BsDaterangepickerInlineContainerComponent, selector: "bs-daterangepicker-inline-container", host: { listeners: { "click": "_stopPropagation($event)" }, properties: { "attr.disabled": "this.disabledValue", "attr.readonly": "this.readonlyValue" } }, providers: [BsDatepickerStore, BsDatepickerEffects], usesInheritance: true, ngImport: i0, template: "<!-- days calendar view mode -->\n<div class=\"bs-datepicker\" [ngClass]=\"containerClass\" *ngIf=\"viewMode | async\">\n <div class=\"bs-datepicker-container\"\n [@datepickerAnimation]=\"animationState\"\n (@datepickerAnimation.done)=\"positionServiceEnable()\">\n <!--calendars-->\n <div class=\"bs-calendar-container\" [ngSwitch]=\"viewMode | async\" role=\"application\">\n <!--days calendar-->\n <ng-container *ngSwitchCase=\"'day'\">\n <div class=\"bs-media-container\">\n <bs-days-calendar-view\n *ngFor=\"let calendar of daysCalendar$ | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n [isDisabled]=\"isDatePickerDisabled\"\n [options]=\"options$ | async\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"dayHoverHandler($event)\"\n (onHoverWeek)=\"weekHoverHandler($event)\"\n (onSelect)=\"daySelectHandler($event)\">\n </bs-days-calendar-view>\n </div>\n <div *ngIf=\"withTimepicker\" class=\"bs-timepicker-in-datepicker-container\">\n <timepicker #startTP [disabled]=\"isDatePickerDisabled\"></timepicker>\n <timepicker #endTP *ngIf=\"isRangePicker\" [disabled]=\"isDatePickerDisabled\"></timepicker>\n </div>\n </ng-container>\n\n <!--months calendar-->\n <div *ngSwitchCase=\"'month'\" class=\"bs-media-container\">\n <bs-month-calendar-view\n *ngFor=\"let calendar of monthsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"monthHoverHandler($event)\"\n (onSelect)=\"monthSelectHandler($event)\">\n </bs-month-calendar-view>\n </div>\n\n <!--years calendar-->\n <div *ngSwitchCase=\"'year'\" class=\"bs-media-container\">\n <bs-years-calendar-view\n *ngFor=\"let calendar of yearsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"yearHoverHandler($event)\"\n (onSelect)=\"yearSelectHandler($event)\">\n </bs-years-calendar-view>\n </div>\n </div>\n\n <!--applycancel buttons-->\n <div class=\"bs-datepicker-buttons\" *ngIf=\"false\">\n <button class=\"btn btn-success\" type=\"button\">Apply</button>\n <button class=\"btn btn-default\" type=\"button\">Cancel</button>\n </div>\n\n <div class=\"bs-datepicker-buttons\" *ngIf=\"showTodayBtn || showClearBtn\">\n <div class=\"btn-today-wrapper\"\n [class.today-left]=\"todayPos === 'left'\"\n [class.today-right]=\"todayPos === 'right'\"\n [class.today-center]=\"todayPos === 'center'\"\n *ngIf=\"showTodayBtn\">\n <button class=\"btn btn-success\" (click)=\"setToday()\">{{todayBtnLbl}}</button>\n </div>\n\n <div class=\"btn-clear-wrapper\"\n [class.clear-left]=\"clearPos === 'left'\"\n [class.clear-right]=\"clearPos === 'right'\"\n [class.clear-center]=\"clearPos === 'center'\"\n *ngIf=\"showClearBtn\">\n <button class=\"btn btn-success\" (click)=\"clearDate()\">{{clearBtnLbl}}</button>\n </div>\n </div>\n\n </div>\n\n <!--custom dates or date ranges picker-->\n <div class=\"bs-datepicker-custom-range\" *ngIf=\"customRanges && customRanges.length > 0\">\n <bs-custom-date-view\n [selectedRange]=\"chosenRange\"\n [ranges]=\"customRanges\"\n [customRangeLabel]=\"customRangeBtnLbl\"\n (onSelect)=\"setRangeOnCalendar($event)\">\n </bs-custom-date-view>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i6.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i7.TimepickerComponent, selector: "timepicker", inputs: ["hourStep", "minuteStep", "secondsStep", "readonlyInput", "disabled", "mousewheel", "arrowkeys", "showSpinners", "showMeridian", "showMinutes", "showSeconds", "meridians", "min", "max", "hoursPlaceholder", "minutesPlaceholder", "secondsPlaceholder"], outputs: ["isValid", "meridianChange"] }, { kind: "component", type: BsCustomDatesViewComponent, selector: "bs-custom-date-view", inputs: ["ranges", "selectedRange", "customRangeLabel"], outputs: ["onSelect"] }, { kind: "component", type: BsDaysCalendarViewComponent, selector: "bs-days-calendar-view", inputs: ["calendar", "options", "isDisabled"], outputs: ["onNavigate", "onViewMode", "onSelect", "onHover", "onHoverWeek"] }, { kind: "component", type: BsMonthCalendarViewComponent, selector: "bs-month-calendar-view", inputs: ["calendar"], outputs: ["onNavigate", "onViewMode", "onSelect", "onHover"] }, { kind: "component", type: BsYearsCalendarViewComponent, selector: "bs-years-calendar-view", inputs: ["calendar"], outputs: ["onNavigate", "onViewMode", "onSelect", "onHover"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }], animations: [datepickerAnimation] });
3049
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDaterangepickerInlineContainerComponent, decorators: [{
3050
- type: Component,
3051
- args: [{ selector: 'bs-daterangepicker-inline-container', providers: [BsDatepickerStore, BsDatepickerEffects], host: {
3052
- '(click)': '_stopPropagation($event)'
3053
- }, animations: [datepickerAnimation], template: "<!-- days calendar view mode -->\n<div class=\"bs-datepicker\" [ngClass]=\"containerClass\" *ngIf=\"viewMode | async\">\n <div class=\"bs-datepicker-container\"\n [@datepickerAnimation]=\"animationState\"\n (@datepickerAnimation.done)=\"positionServiceEnable()\">\n <!--calendars-->\n <div class=\"bs-calendar-container\" [ngSwitch]=\"viewMode | async\" role=\"application\">\n <!--days calendar-->\n <ng-container *ngSwitchCase=\"'day'\">\n <div class=\"bs-media-container\">\n <bs-days-calendar-view\n *ngFor=\"let calendar of daysCalendar$ | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n [isDisabled]=\"isDatePickerDisabled\"\n [options]=\"options$ | async\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"dayHoverHandler($event)\"\n (onHoverWeek)=\"weekHoverHandler($event)\"\n (onSelect)=\"daySelectHandler($event)\">\n </bs-days-calendar-view>\n </div>\n <div *ngIf=\"withTimepicker\" class=\"bs-timepicker-in-datepicker-container\">\n <timepicker #startTP [disabled]=\"isDatePickerDisabled\"></timepicker>\n <timepicker #endTP *ngIf=\"isRangePicker\" [disabled]=\"isDatePickerDisabled\"></timepicker>\n </div>\n </ng-container>\n\n <!--months calendar-->\n <div *ngSwitchCase=\"'month'\" class=\"bs-media-container\">\n <bs-month-calendar-view\n *ngFor=\"let calendar of monthsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"monthHoverHandler($event)\"\n (onSelect)=\"monthSelectHandler($event)\">\n </bs-month-calendar-view>\n </div>\n\n <!--years calendar-->\n <div *ngSwitchCase=\"'year'\" class=\"bs-media-container\">\n <bs-years-calendar-view\n *ngFor=\"let calendar of yearsCalendar | async\"\n [class.bs-datepicker-multiple]=\"multipleCalendars\"\n [calendar]=\"calendar\"\n (onNavigate)=\"navigateTo($event)\"\n (onViewMode)=\"setViewMode($event)\"\n (onHover)=\"yearHoverHandler($event)\"\n (onSelect)=\"yearSelectHandler($event)\">\n </bs-years-calendar-view>\n </div>\n </div>\n\n <!--applycancel buttons-->\n <div class=\"bs-datepicker-buttons\" *ngIf=\"false\">\n <button class=\"btn btn-success\" type=\"button\">Apply</button>\n <button class=\"btn btn-default\" type=\"button\">Cancel</button>\n </div>\n\n <div class=\"bs-datepicker-buttons\" *ngIf=\"showTodayBtn || showClearBtn\">\n <div class=\"btn-today-wrapper\"\n [class.today-left]=\"todayPos === 'left'\"\n [class.today-right]=\"todayPos === 'right'\"\n [class.today-center]=\"todayPos === 'center'\"\n *ngIf=\"showTodayBtn\">\n <button class=\"btn btn-success\" (click)=\"setToday()\">{{todayBtnLbl}}</button>\n </div>\n\n <div class=\"btn-clear-wrapper\"\n [class.clear-left]=\"clearPos === 'left'\"\n [class.clear-right]=\"clearPos === 'right'\"\n [class.clear-center]=\"clearPos === 'center'\"\n *ngIf=\"showClearBtn\">\n <button class=\"btn btn-success\" (click)=\"clearDate()\">{{clearBtnLbl}}</button>\n </div>\n </div>\n\n </div>\n\n <!--custom dates or date ranges picker-->\n <div class=\"bs-datepicker-custom-range\" *ngIf=\"customRanges && customRanges.length > 0\">\n <bs-custom-date-view\n [selectedRange]=\"chosenRange\"\n [ranges]=\"customRanges\"\n [customRangeLabel]=\"customRangeBtnLbl\"\n (onSelect)=\"setRangeOnCalendar($event)\">\n </bs-custom-date-view>\n </div>\n</div>\n" }]
3054
- }], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: BsDatepickerConfig }, { type: BsDatepickerStore }, { type: i0.ElementRef }, { type: BsDatepickerActions }, { type: BsDatepickerEffects }, { type: i5.PositioningService }]; }, propDecorators: { disabledValue: [{
3055
- type: HostBinding,
3056
- args: ['attr.disabled']
3057
- }], readonlyValue: [{
3058
- type: HostBinding,
3059
- args: ['attr.readonly']
3060
- }] } });
3061
-
3062
- class BsDaterangepickerInlineDirective {
3063
- constructor(_config, _elementRef, _renderer, _viewContainerRef, cis) {
3064
- this._config = _config;
3065
- this._elementRef = _elementRef;
3066
- /**
3067
- * Indicates whether datepicker is enabled or not
3068
- */
3069
- this.isDisabled = false;
3070
- /**
3071
- * Emits when daterangepicker value has been changed
3072
- */
3073
- this.bsValueChange = new EventEmitter();
3074
- this._subs = [];
3075
- // todo: assign only subset of fields
3076
- Object.assign(this, this._config);
3077
- this._datepicker = cis.createLoader(_elementRef, _viewContainerRef, _renderer);
3078
- }
3079
- /**
3080
- * Initial value of datepicker
3081
- */
3082
- set bsValue(value) {
3083
- var _a;
3084
- if (this._bsValue === value) {
3085
- return;
3086
- }
3087
- if (value && ((_a = this.bsConfig) === null || _a === void 0 ? void 0 : _a.initCurrentTime)) {
3088
- value = setDateRangesCurrentTimeOnDateSelect(value);
3089
- }
3090
- this._bsValue = value;
3091
- this.bsValueChange.emit(value);
3092
- }
3093
- ngOnInit() {
3094
- this.setConfig();
3095
- this.initSubscribes();
3096
- }
3097
- ngOnChanges(changes) {
3098
- if (changes["bsConfig"]) {
3099
- if (changes["bsConfig"].currentValue.initCurrentTime && changes["bsConfig"].currentValue.initCurrentTime !== changes["bsConfig"].previousValue.initCurrentTime && this._bsValue) {
3100
- this._bsValue = setDateRangesCurrentTimeOnDateSelect(this._bsValue);
3101
- this.bsValueChange.emit(this._bsValue);
3102
- }
3103
- }
3104
- if (!this._datepickerRef || !this._datepickerRef.instance) {
3105
- return;
3106
- }
3107
- if (changes["minDate"]) {
3108
- this._datepickerRef.instance.minDate = this.minDate;
3109
- }
3110
- if (changes["maxDate"]) {
3111
- this._datepickerRef.instance.maxDate = this.maxDate;
3112
- }
3113
- if (changes["datesEnabled"]) {
3114
- this._datepickerRef.instance.datesEnabled = this.datesEnabled;
3115
- this._datepickerRef.instance.value = this._bsValue;
3116
- }
3117
- if (changes["datesDisabled"]) {
3118
- this._datepickerRef.instance.datesDisabled = this.datesDisabled;
3119
- }
3120
- if (changes["daysDisabled"]) {
3121
- this._datepickerRef.instance.daysDisabled = this.daysDisabled;
3122
- }
3123
- if (changes["isDisabled"]) {
3124
- this._datepickerRef.instance.isDisabled = this.isDisabled;
3125
- }
3126
- if (changes["dateCustomClasses"]) {
3127
- this._datepickerRef.instance.dateCustomClasses = this.dateCustomClasses;
3128
- }
3129
- this.setConfig();
3130
- }
3131
- /**
3132
- * Set config for datepicker
3133
- */
3134
- setConfig() {
3135
- var _a;
3136
- if (this._datepicker) {
3137
- this._datepicker.hide();
3138
- }
3139
- this._config = Object.assign({}, this._config, this.bsConfig, {
3140
- value: checkBsValue(this._bsValue, this.maxDate || this.bsConfig && this.bsConfig.maxDate),
3141
- isDisabled: this.isDisabled,
3142
- minDate: this.minDate || this.bsConfig && this.bsConfig.minDate,
3143
- maxDate: this.maxDate || this.bsConfig && this.bsConfig.maxDate,
3144
- daysDisabled: this.daysDisabled || this.bsConfig && this.bsConfig.daysDisabled,
3145
- dateCustomClasses: this.dateCustomClasses || this.bsConfig && this.bsConfig.dateCustomClasses,
3146
- datesDisabled: this.datesDisabled || this.bsConfig && this.bsConfig.datesDisabled,
3147
- datesEnabled: this.datesEnabled || this.bsConfig && this.bsConfig.datesEnabled,
3148
- ranges: checkRangesWithMaxDate(this.bsConfig && this.bsConfig.ranges, this.maxDate || this.bsConfig && this.bsConfig.maxDate),
3149
- maxDateRange: this.bsConfig && this.bsConfig.maxDateRange,
3150
- initCurrentTime: (_a = this.bsConfig) === null || _a === void 0 ? void 0 : _a.initCurrentTime
3151
- });
3152
- this._datepickerRef = this._datepicker
3153
- .provide({ provide: BsDatepickerConfig, useValue: this._config })
3154
- .attach(BsDaterangepickerInlineContainerComponent)
3155
- .to(this._elementRef)
3156
- .show();
3157
- this.initSubscribes();
3158
- }
3159
- initSubscribes() {
3160
- this.unsubscribeSubscriptions();
3161
- // if date changes from external source (model -> view)
3162
- this._subs.push(this.bsValueChange.subscribe((value) => {
3163
- if (this._datepickerRef) {
3164
- this._datepickerRef.instance.value = value;
3165
- }
3166
- }));
3167
- // if date changes from picker (view -> model)
3168
- if (this._datepickerRef) {
3169
- this._subs.push(this._datepickerRef.instance.valueChange
3170
- .pipe(filter((range) => range && range[0] && !!range[1]))
3171
- .subscribe((value) => {
3172
- this.bsValue = value;
3173
- }));
3174
- }
3175
- }
3176
- unsubscribeSubscriptions() {
3177
- var _a;
3178
- if ((_a = this._subs) === null || _a === void 0 ? void 0 : _a.length) {
3179
- this._subs.map(sub => sub.unsubscribe());
3180
- this._subs.length = 0;
3181
- }
3182
- }
3183
- ngOnDestroy() {
3184
- this._datepicker.dispose();
3185
- this.unsubscribeSubscriptions();
3186
- }
3187
- }
3188
- BsDaterangepickerInlineDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDaterangepickerInlineDirective, deps: [{ token: BsDaterangepickerInlineConfig }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ViewContainerRef }, { token: i2.ComponentLoaderFactory }], target: i0.ɵɵFactoryTarget.Directive });
3189
- BsDaterangepickerInlineDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.3", type: BsDaterangepickerInlineDirective, selector: "bs-daterangepicker-inline", inputs: { bsValue: "bsValue", bsConfig: "bsConfig", isDisabled: "isDisabled", minDate: "minDate", maxDate: "maxDate", dateCustomClasses: "dateCustomClasses", daysDisabled: "daysDisabled", datesDisabled: "datesDisabled", datesEnabled: "datesEnabled" }, outputs: { bsValueChange: "bsValueChange" }, exportAs: ["bsDaterangepickerInline"], usesOnChanges: true, ngImport: i0 });
3190
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDaterangepickerInlineDirective, decorators: [{
3191
- type: Directive,
3192
- args: [{
3193
- selector: 'bs-daterangepicker-inline',
3194
- exportAs: 'bsDaterangepickerInline'
3195
- }]
3196
- }], ctorParameters: function () { return [{ type: BsDaterangepickerInlineConfig }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: i2.ComponentLoaderFactory }]; }, propDecorators: { bsValue: [{
3197
- type: Input
3198
- }], bsConfig: [{
3199
- type: Input
3200
- }], isDisabled: [{
3201
- type: Input
3202
- }], minDate: [{
3203
- type: Input
3204
- }], maxDate: [{
3205
- type: Input
3206
- }], dateCustomClasses: [{
3207
- type: Input
3208
- }], daysDisabled: [{
3209
- type: Input
3210
- }], datesDisabled: [{
3211
- type: Input
3212
- }], datesEnabled: [{
3213
- type: Input
3214
- }], bsValueChange: [{
3215
- type: Output
3216
- }] } });
3217
-
3218
- const BS_DATEPICKER_VALUE_ACCESSOR = {
3219
- provide: NG_VALUE_ACCESSOR,
3220
- useExisting: forwardRef(() => BsDatepickerInputDirective),
3221
- multi: true
3222
- };
3223
- const BS_DATEPICKER_VALIDATOR = {
3224
- provide: NG_VALIDATORS,
3225
- useExisting: forwardRef(() => BsDatepickerInputDirective),
3226
- multi: true
3227
- };
3228
- class BsDatepickerInputDirective {
3229
- constructor(_picker, _localeService, _renderer, _elRef, changeDetection) {
3230
- this._picker = _picker;
3231
- this._localeService = _localeService;
3232
- this._renderer = _renderer;
3233
- this._elRef = _elRef;
3234
- this.changeDetection = changeDetection;
3235
- this._onChange = Function.prototype;
3236
- this._onTouched = Function.prototype;
3237
- this._validatorChange = Function.prototype;
3238
- this._subs = new Subscription();
3239
- }
3240
- ngOnInit() {
3241
- const setBsValue = (value) => {
3242
- this._setInputValue(value);
3243
- if (this._value !== value) {
3244
- this._value = value;
3245
- this._onChange(value);
3246
- this._onTouched();
3247
- }
3248
- this.changeDetection.markForCheck();
3249
- };
3250
- // if value set via [bsValue] it will not get into value change
3251
- if (this._picker._bsValue) {
3252
- setBsValue(this._picker._bsValue);
3253
- }
3254
- // update input value on datepicker value update
3255
- this._subs.add(this._picker.bsValueChange.subscribe(setBsValue));
3256
- // update input value on locale change
3257
- this._subs.add(this._localeService.localeChange.subscribe(() => {
3258
- this._setInputValue(this._value);
3259
- }));
3260
- this._subs.add(this._picker.dateInputFormat$.pipe(distinctUntilChanged()).subscribe(() => {
3261
- this._setInputValue(this._value);
3262
- }));
3263
- }
3264
- ngOnDestroy() {
3265
- this._subs.unsubscribe();
3266
- }
3267
- onKeydownEvent(event) {
3268
- if (event.keyCode === 13 || event.code === 'Enter') {
3269
- this.hide();
3270
- }
3271
- }
3272
- _setInputValue(value) {
3273
- const initialDate = !value ? ''
3274
- : formatDate(value, this._picker._config.dateInputFormat, this._localeService.currentLocale);
3275
- this._renderer.setProperty(this._elRef.nativeElement, 'value', initialDate);
3276
- }
3277
- onChange(event) {
3278
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3279
- this.writeValue(event.target.value);
3280
- this._onChange(this._value);
3281
- if (this._picker._config.returnFocusToInput) {
3282
- this._renderer.selectRootElement(this._elRef.nativeElement).focus();
3283
- }
3284
- this._onTouched();
3285
- }
3286
- validate(c) {
3287
- const _value = c.value;
3288
- if (_value === null || _value === undefined || _value === '') {
3289
- return null;
3290
- }
3291
- if (isDate(_value)) {
3292
- const _isDateValid = isDateValid(_value);
3293
- if (!_isDateValid) {
3294
- return { bsDate: { invalid: _value } };
3295
- }
3296
- if (this._picker && this._picker.minDate && isBefore(_value, this._picker.minDate, 'date')) {
3297
- this.writeValue(this._picker.minDate);
3298
- return { bsDate: { minDate: this._picker.minDate } };
3299
- }
3300
- if (this._picker && this._picker.maxDate && isAfter(_value, this._picker.maxDate, 'date')) {
3301
- this.writeValue(this._picker.maxDate);
3302
- return { bsDate: { maxDate: this._picker.maxDate } };
3303
- }
3304
- }
3305
- return null;
3306
- }
3307
- registerOnValidatorChange(fn) {
3308
- this._validatorChange = fn;
3309
- }
3310
- writeValue(value) {
3311
- if (!value) {
3312
- this._value = void 0;
3313
- }
3314
- else {
3315
- const _localeKey = this._localeService.currentLocale;
3316
- const _locale = getLocale(_localeKey);
3317
- if (!_locale) {
3318
- throw new Error(`Locale "${_localeKey}" is not defined, please add it with "defineLocale(...)"`);
3319
- }
3320
- this._value = parseDate(value, this._picker._config.dateInputFormat, this._localeService.currentLocale);
3321
- if (this._picker._config.useUtc) {
3322
- this._value = utcAsLocal(this._value);
3323
- }
3324
- }
3325
- this._picker.bsValue = this._value;
3326
- }
3327
- setDisabledState(isDisabled) {
3328
- this._picker.isDisabled = isDisabled;
3329
- if (isDisabled) {
3330
- this._renderer.setAttribute(this._elRef.nativeElement, 'disabled', 'disabled');
3331
- return;
3332
- }
3333
- this._renderer.removeAttribute(this._elRef.nativeElement, 'disabled');
3334
- }
3335
- registerOnChange(fn) {
3336
- this._onChange = fn;
3337
- }
3338
- registerOnTouched(fn) {
3339
- this._onTouched = fn;
3340
- }
3341
- onBlur() {
3342
- this._onTouched();
3343
- }
3344
- hide() {
3345
- this._picker.hide();
3346
- this._renderer.selectRootElement(this._elRef.nativeElement).blur();
3347
- if (this._picker._config.returnFocusToInput) {
3348
- this._renderer.selectRootElement(this._elRef.nativeElement).focus();
3349
- }
3350
- }
3351
- }
3352
- BsDatepickerInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerInputDirective, deps: [{ token: BsDatepickerDirective, host: true }, { token: BsLocaleService }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
3353
- BsDatepickerInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.3", type: BsDatepickerInputDirective, selector: "input[bsDatepicker]", host: { listeners: { "change": "onChange($event)", "keyup.esc": "hide()", "keydown": "onKeydownEvent($event)", "blur": "onBlur()" } }, providers: [BS_DATEPICKER_VALUE_ACCESSOR, BS_DATEPICKER_VALIDATOR], ngImport: i0 });
3354
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerInputDirective, decorators: [{
3355
- type: Directive,
3356
- args: [{
3357
- selector: `input[bsDatepicker]`,
3358
- // eslint-disable-next-line @angular-eslint/no-host-metadata-property
3359
- host: {
3360
- '(change)': 'onChange($event)',
3361
- '(keyup.esc)': 'hide()',
3362
- '(keydown)': 'onKeydownEvent($event)',
3363
- '(blur)': 'onBlur()'
3364
- },
3365
- providers: [BS_DATEPICKER_VALUE_ACCESSOR, BS_DATEPICKER_VALIDATOR]
3366
- }]
3367
- }], ctorParameters: function () {
3368
- return [{ type: BsDatepickerDirective, decorators: [{
3369
- type: Host
3370
- }] }, { type: BsLocaleService }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }];
3371
- } });
3372
-
3373
- class BsDaterangepickerConfig extends BsDatepickerConfig {
3374
- constructor() {
3375
- super(...arguments);
3376
- // DatepickerRenderOptions
3377
- this.displayMonths = 2;
3378
- }
3379
- }
3380
- BsDaterangepickerConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDaterangepickerConfig, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
3381
- BsDaterangepickerConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDaterangepickerConfig, providedIn: 'root' });
3382
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDaterangepickerConfig, decorators: [{
3383
- type: Injectable,
3384
- args: [{
3385
- providedIn: 'root'
3386
- }]
3387
- }] });
3388
-
3389
- let previousDate;
3390
- class BsDaterangepickerDirective {
3391
- constructor(_config, _elementRef, _renderer, _viewContainerRef, cis) {
3392
- this._config = _config;
3393
- this._elementRef = _elementRef;
3394
- this._renderer = _renderer;
3395
- /**
3396
- * Placement of a daterangepicker. Accepts: "top", "bottom", "left", "right"
3397
- */
3398
- this.placement = 'bottom';
3399
- /**
3400
- * Specifies events that should trigger. Supports a space separated list of
3401
- * event names.
3402
- */
3403
- this.triggers = 'click';
3404
- /**
3405
- * Close daterangepicker on outside click
3406
- */
3407
- this.outsideClick = true;
3408
- /**
3409
- * A selector specifying the element the daterangepicker should be appended to.
3410
- */
3411
- this.container = 'body';
3412
- this.outsideEsc = true;
3413
- this.isDestroy$ = new Subject();
3414
- /**
3415
- * Indicates whether daterangepicker's content is enabled or not
3416
- */
3417
- this.isDisabled = false;
3418
- /**
3419
- * Emits when daterangepicker value has been changed
3420
- */
3421
- this.bsValueChange = new EventEmitter();
3422
- this._subs = [];
3423
- this._rangeInputFormat$ = new Subject();
3424
- this._datepicker = cis.createLoader(_elementRef, _viewContainerRef, _renderer);
3425
- Object.assign(this, _config);
3426
- this.onShown = this._datepicker.onShown;
3427
- this.onHidden = this._datepicker.onHidden;
3428
- this.isOpen$ = new BehaviorSubject(this.isOpen);
3429
- }
3430
- /**
3431
- * Returns whether or not the daterangepicker is currently being shown
3432
- */
3433
- get isOpen() {
3434
- return this._datepicker.isShown;
3435
- }
3436
- set isOpen(value) {
3437
- this.isOpen$.next(value);
3438
- }
3439
- /**
3440
- * Initial value of daterangepicker
3441
- */
3442
- set bsValue(value) {
3443
- var _a;
3444
- if (this._bsValue === value) {
3445
- return;
3446
- }
3447
- if (value && ((_a = this.bsConfig) === null || _a === void 0 ? void 0 : _a.initCurrentTime)) {
3448
- value = setDateRangesCurrentTimeOnDateSelect(value);
3449
- }
3450
- this.initPreviousValue();
3451
- this._bsValue = value;
3452
- this.bsValueChange.emit(value);
3453
- }
3454
- get isDatepickerReadonly() {
3455
- return this.isDisabled ? '' : null;
3456
- }
3457
- get rangeInputFormat$() {
3458
- return this._rangeInputFormat$;
3459
- }
3460
- ngOnInit() {
3461
- this.isDestroy$ = new Subject();
3462
- this._datepicker.listen({
3463
- outsideClick: this.outsideClick,
3464
- outsideEsc: this.outsideEsc,
3465
- triggers: this.triggers,
3466
- show: () => this.show()
3467
- });
3468
- this.initPreviousValue();
3469
- this.setConfig();
3470
- }
3471
- ngOnChanges(changes) {
3472
- var _a, _b, _c;
3473
- if (changes["bsConfig"]) {
3474
- if (((_a = changes["bsConfig"].currentValue) === null || _a === void 0 ? void 0 : _a.initCurrentTime) && ((_b = changes["bsConfig"].currentValue) === null || _b === void 0 ? void 0 : _b.initCurrentTime) !== ((_c = changes["bsConfig"].previousValue) === null || _c === void 0 ? void 0 : _c.initCurrentTime) && this._bsValue) {
3475
- this.initPreviousValue();
3476
- this._bsValue = setDateRangesCurrentTimeOnDateSelect(this._bsValue);
3477
- this.bsValueChange.emit(this._bsValue);
3478
- }
3479
- this.setConfig();
3480
- this._rangeInputFormat$.next(changes["bsConfig"].currentValue && changes["bsConfig"].currentValue.rangeInputFormat);
3481
- }
3482
- if (!this._datepickerRef || !this._datepickerRef.instance) {
3483
- return;
3484
- }
3485
- if (changes["minDate"]) {
3486
- this._datepickerRef.instance.minDate = this.minDate;
3487
- }
3488
- if (changes["maxDate"]) {
3489
- this._datepickerRef.instance.maxDate = this.maxDate;
3490
- }
3491
- if (changes["datesDisabled"]) {
3492
- this._datepickerRef.instance.datesDisabled = this.datesDisabled;
3493
- }
3494
- if (changes["datesEnabled"]) {
3495
- this._datepickerRef.instance.datesEnabled = this.datesEnabled;
3496
- }
3497
- if (changes["daysDisabled"]) {
3498
- this._datepickerRef.instance.daysDisabled = this.daysDisabled;
3499
- }
3500
- if (changes["isDisabled"]) {
3501
- this._datepickerRef.instance.isDisabled = this.isDisabled;
3502
- }
3503
- if (changes["dateCustomClasses"]) {
3504
- this._datepickerRef.instance.dateCustomClasses = this.dateCustomClasses;
3505
- }
3506
- }
3507
- ngAfterViewInit() {
3508
- this.isOpen$.pipe(filter(isOpen => isOpen !== this.isOpen), takeUntil(this.isDestroy$))
3509
- .subscribe(() => this.toggle());
3510
- }
3511
- /**
3512
- * Opens an element’s datepicker. This is considered a “manual” triggering of
3513
- * the datepicker.
3514
- */
3515
- show() {
3516
- if (this._datepicker.isShown) {
3517
- return;
3518
- }
3519
- this.setConfig();
3520
- this._datepickerRef = this._datepicker
3521
- .provide({ provide: BsDatepickerConfig, useValue: this._config })
3522
- .attach(BsDaterangepickerContainerComponent)
3523
- .to(this.container)
3524
- .position({ attachment: this.placement })
3525
- .show({ placement: this.placement });
3526
- this.initSubscribes();
3527
- }
3528
- initSubscribes() {
3529
- // if date changes from external source (model -> view)
3530
- this._subs.push(this.bsValueChange.subscribe((value) => {
3531
- if (this._datepickerRef) {
3532
- this._datepickerRef.instance.value = value;
3533
- }
3534
- }));
3535
- // if date changes from picker (view -> model)
3536
- if (this._datepickerRef) {
3537
- this._subs.push(this._datepickerRef.instance.valueChange
3538
- .pipe(filter((range) => range && range[0] && !!range[1]))
3539
- .subscribe((value) => {
3540
- this.initPreviousValue();
3541
- this.bsValue = value;
3542
- if (this.keepDatepickerModalOpened()) {
3543
- return;
3544
- }
3545
- this.hide();
3546
- }));
3547
- }
3548
- }
3549
- initPreviousValue() {
3550
- previousDate = this._bsValue;
3551
- }
3552
- keepDatepickerModalOpened() {
3553
- var _a;
3554
- if (!previousDate || !((_a = this.bsConfig) === null || _a === void 0 ? void 0 : _a.keepDatepickerOpened) || !this._config.withTimepicker) {
3555
- return false;
3556
- }
3557
- return this.isDateSame();
3558
- }
3559
- isDateSame() {
3560
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
3561
- return ((((_b = (_a = this._bsValue) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.getDate()) === ((_c = previousDate === null || previousDate === void 0 ? void 0 : previousDate[0]) === null || _c === void 0 ? void 0 : _c.getDate()))
3562
- && (((_e = (_d = this._bsValue) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.getMonth()) === ((_f = previousDate === null || previousDate === void 0 ? void 0 : previousDate[0]) === null || _f === void 0 ? void 0 : _f.getMonth()))
3563
- && (((_h = (_g = this._bsValue) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.getFullYear()) === ((_j = previousDate === null || previousDate === void 0 ? void 0 : previousDate[0]) === null || _j === void 0 ? void 0 : _j.getFullYear()))
3564
- && (((_l = (_k = this._bsValue) === null || _k === void 0 ? void 0 : _k[1]) === null || _l === void 0 ? void 0 : _l.getDate()) === ((_m = previousDate === null || previousDate === void 0 ? void 0 : previousDate[1]) === null || _m === void 0 ? void 0 : _m.getDate()))
3565
- && (((_p = (_o = this._bsValue) === null || _o === void 0 ? void 0 : _o[1]) === null || _p === void 0 ? void 0 : _p.getMonth()) === ((_q = previousDate === null || previousDate === void 0 ? void 0 : previousDate[1]) === null || _q === void 0 ? void 0 : _q.getMonth()))
3566
- && (((_s = (_r = this._bsValue) === null || _r === void 0 ? void 0 : _r[1]) === null || _s === void 0 ? void 0 : _s.getFullYear()) === ((_t = previousDate === null || previousDate === void 0 ? void 0 : previousDate[1]) === null || _t === void 0 ? void 0 : _t.getFullYear())));
3567
- }
3568
- /**
3569
- * Set config for daterangepicker
3570
- */
3571
- setConfig() {
3572
- var _a, _b, _c, _d;
3573
- this._config = Object.assign({}, this._config, this.bsConfig, {
3574
- value: ((_a = this.bsConfig) === null || _a === void 0 ? void 0 : _a.keepDatesOutOfRules) ? this._bsValue : checkBsValue(this._bsValue, this.maxDate || this.bsConfig && this.bsConfig.maxDate),
3575
- isDisabled: this.isDisabled,
3576
- minDate: this.minDate || this.bsConfig && this.bsConfig.minDate,
3577
- maxDate: this.maxDate || this.bsConfig && this.bsConfig.maxDate,
3578
- daysDisabled: this.daysDisabled || this.bsConfig && this.bsConfig.daysDisabled,
3579
- dateCustomClasses: this.dateCustomClasses || this.bsConfig && this.bsConfig.dateCustomClasses,
3580
- datesDisabled: this.datesDisabled || this.bsConfig && this.bsConfig.datesDisabled,
3581
- datesEnabled: this.datesEnabled || this.bsConfig && this.bsConfig.datesEnabled,
3582
- ranges: checkRangesWithMaxDate(this.bsConfig && this.bsConfig.ranges, this.maxDate || this.bsConfig && this.bsConfig.maxDate),
3583
- maxDateRange: this.bsConfig && this.bsConfig.maxDateRange,
3584
- initCurrentTime: (_b = this.bsConfig) === null || _b === void 0 ? void 0 : _b.initCurrentTime,
3585
- keepDatepickerOpened: (_c = this.bsConfig) === null || _c === void 0 ? void 0 : _c.keepDatepickerOpened,
3586
- keepDatesOutOfRules: (_d = this.bsConfig) === null || _d === void 0 ? void 0 : _d.keepDatesOutOfRules
3587
- });
3588
- }
3589
- /**
3590
- * Closes an element’s datepicker. This is considered a “manual” triggering of
3591
- * the datepicker.
3592
- */
3593
- hide() {
3594
- if (this.isOpen) {
3595
- this._datepicker.hide();
3596
- }
3597
- for (const sub of this._subs) {
3598
- sub.unsubscribe();
3599
- }
3600
- if (this._config.returnFocusToInput) {
3601
- this._renderer.selectRootElement(this._elementRef.nativeElement).focus();
3602
- }
3603
- }
3604
- /**
3605
- * Toggles an element’s datepicker. This is considered a “manual” triggering
3606
- * of the datepicker.
3607
- */
3608
- toggle() {
3609
- if (this.isOpen) {
3610
- return this.hide();
3611
- }
3612
- this.show();
3613
- }
3614
- unsubscribeSubscriptions() {
3615
- var _a;
3616
- if ((_a = this._subs) === null || _a === void 0 ? void 0 : _a.length) {
3617
- this._subs.map(sub => sub.unsubscribe());
3618
- this._subs.length = 0;
3619
- }
3620
- }
3621
- ngOnDestroy() {
3622
- this._datepicker.dispose();
3623
- this.isOpen$.next(false);
3624
- if (this.isDestroy$) {
3625
- this.isDestroy$.next(null);
3626
- this.isDestroy$.complete();
3627
- }
3628
- this.unsubscribeSubscriptions();
3629
- }
3630
- }
3631
- BsDaterangepickerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDaterangepickerDirective, deps: [{ token: BsDaterangepickerConfig }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ViewContainerRef }, { token: i2.ComponentLoaderFactory }], target: i0.ɵɵFactoryTarget.Directive });
3632
- BsDaterangepickerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.3", type: BsDaterangepickerDirective, selector: "[bsDaterangepicker]", inputs: { placement: "placement", triggers: "triggers", outsideClick: "outsideClick", container: "container", outsideEsc: "outsideEsc", isOpen: "isOpen", bsValue: "bsValue", bsConfig: "bsConfig", isDisabled: "isDisabled", minDate: "minDate", maxDate: "maxDate", dateCustomClasses: "dateCustomClasses", daysDisabled: "daysDisabled", datesDisabled: "datesDisabled", datesEnabled: "datesEnabled" }, outputs: { onShown: "onShown", onHidden: "onHidden", bsValueChange: "bsValueChange" }, host: { properties: { "attr.readonly": "this.isDatepickerReadonly" } }, exportAs: ["bsDaterangepicker"], usesOnChanges: true, ngImport: i0 });
3633
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDaterangepickerDirective, decorators: [{
3634
- type: Directive,
3635
- args: [{
3636
- selector: '[bsDaterangepicker]',
3637
- exportAs: 'bsDaterangepicker'
3638
- }]
3639
- }], ctorParameters: function () { return [{ type: BsDaterangepickerConfig }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ViewContainerRef }, { type: i2.ComponentLoaderFactory }]; }, propDecorators: { placement: [{
3640
- type: Input
3641
- }], triggers: [{
3642
- type: Input
3643
- }], outsideClick: [{
3644
- type: Input
3645
- }], container: [{
3646
- type: Input
3647
- }], outsideEsc: [{
3648
- type: Input
3649
- }], isOpen: [{
3650
- type: Input
3651
- }], onShown: [{
3652
- type: Output
3653
- }], onHidden: [{
3654
- type: Output
3655
- }], bsValue: [{
3656
- type: Input
3657
- }], bsConfig: [{
3658
- type: Input
3659
- }], isDisabled: [{
3660
- type: Input
3661
- }], minDate: [{
3662
- type: Input
3663
- }], maxDate: [{
3664
- type: Input
3665
- }], dateCustomClasses: [{
3666
- type: Input
3667
- }], daysDisabled: [{
3668
- type: Input
3669
- }], datesDisabled: [{
3670
- type: Input
3671
- }], datesEnabled: [{
3672
- type: Input
3673
- }], bsValueChange: [{
3674
- type: Output
3675
- }], isDatepickerReadonly: [{
3676
- type: HostBinding,
3677
- args: ['attr.readonly']
3678
- }] } });
3679
-
3680
- const BS_DATERANGEPICKER_VALUE_ACCESSOR = {
3681
- provide: NG_VALUE_ACCESSOR,
3682
- useExisting: forwardRef(() => BsDaterangepickerInputDirective),
3683
- multi: true
3684
- };
3685
- const BS_DATERANGEPICKER_VALIDATOR = {
3686
- provide: NG_VALIDATORS,
3687
- useExisting: forwardRef(() => BsDaterangepickerInputDirective),
3688
- multi: true
3689
- };
3690
- class BsDaterangepickerInputDirective {
3691
- constructor(_picker, _localeService, _renderer, _elRef, changeDetection) {
3692
- this._picker = _picker;
3693
- this._localeService = _localeService;
3694
- this._renderer = _renderer;
3695
- this._elRef = _elRef;
3696
- this.changeDetection = changeDetection;
3697
- this._onChange = Function.prototype;
3698
- this._onTouched = Function.prototype;
3699
- this._validatorChange = Function.prototype;
3700
- this._subs = new Subscription();
3701
- }
3702
- ngOnInit() {
3703
- const setBsValue = (value) => {
3704
- this._setInputValue(value);
3705
- if (this._value !== value) {
3706
- this._value = value;
3707
- this._onChange(value);
3708
- this._onTouched();
3709
- }
3710
- this.changeDetection.markForCheck();
3711
- };
3712
- // if value set via [bsValue] it will not get into value change
3713
- if (this._picker._bsValue) {
3714
- setBsValue(this._picker._bsValue);
3715
- }
3716
- // update input value on datepicker value update
3717
- this._subs.add(this._picker.bsValueChange.subscribe((value) => {
3718
- this._setInputValue(value);
3719
- if (this._value !== value) {
3720
- this._value = value;
3721
- this._onChange(value);
3722
- this._onTouched();
3723
- }
3724
- this.changeDetection.markForCheck();
3725
- }));
3726
- // update input value on locale change
3727
- this._subs.add(this._localeService.localeChange.subscribe(() => {
3728
- this._setInputValue(this._value);
3729
- }));
3730
- this._subs.add(
3731
- // update input value on format change
3732
- this._picker.rangeInputFormat$.pipe(distinctUntilChanged()).subscribe(() => {
3733
- this._setInputValue(this._value);
3734
- }));
3735
- }
3736
- ngOnDestroy() {
3737
- this._subs.unsubscribe();
3738
- }
3739
- onKeydownEvent(event) {
3740
- if (event.keyCode === 13 || event.code === 'Enter') {
3741
- this.hide();
3742
- }
3743
- }
3744
- _setInputValue(date) {
3745
- let range = '';
3746
- if (date) {
3747
- const start = !date[0] ? ''
3748
- : formatDate(date[0], this._picker._config.rangeInputFormat, this._localeService.currentLocale);
3749
- const end = !date[1] ? ''
3750
- : formatDate(date[1], this._picker._config.rangeInputFormat, this._localeService.currentLocale);
3751
- range = (start && end) ? start + this._picker._config.rangeSeparator + end : '';
3752
- }
3753
- this._renderer.setProperty(this._elRef.nativeElement, 'value', range);
3754
- }
3755
- onChange(event) {
3756
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3757
- this.writeValue(event.target.value);
3758
- this._onChange(this._value);
3759
- if (this._picker._config.returnFocusToInput) {
3760
- this._renderer.selectRootElement(this._elRef.nativeElement).focus();
3761
- }
3762
- this._onTouched();
3763
- }
3764
- validate(c) {
3765
- let _value = c.value;
3766
- const errors = [];
3767
- if (_value === null || _value === undefined || !isArray(_value)) {
3768
- return null;
3769
- }
3770
- _value = _value.slice().sort((a, b) => a.getTime() - b.getTime());
3771
- const _isFirstDateValid = isDateValid(_value[0]);
3772
- const _isSecondDateValid = isDateValid(_value[1]);
3773
- if (!_isFirstDateValid) {
3774
- return { bsDate: { invalid: _value[0] } };
3775
- }
3776
- if (!_isSecondDateValid) {
3777
- return { bsDate: { invalid: _value[1] } };
3778
- }
3779
- if (this._picker && this._picker.minDate && isBefore(_value[0], this._picker.minDate, 'date')) {
3780
- _value[0] = this._picker.minDate;
3781
- errors.push({ bsDate: { minDate: this._picker.minDate } });
3782
- }
3783
- if (this._picker && this._picker.maxDate && isAfter(_value[1], this._picker.maxDate, 'date')) {
3784
- _value[1] = this._picker.maxDate;
3785
- errors.push({ bsDate: { maxDate: this._picker.maxDate } });
3786
- }
3787
- if (errors.length > 0) {
3788
- this.writeValue(_value);
3789
- return errors;
3790
- }
3791
- return null;
3792
- }
3793
- registerOnValidatorChange(fn) {
3794
- this._validatorChange = fn;
3795
- }
3796
- writeValue(value) {
3797
- if (!value) {
3798
- this._value = void 0;
3799
- }
3800
- else {
3801
- const _localeKey = this._localeService.currentLocale;
3802
- const _locale = getLocale(_localeKey);
3803
- if (!_locale) {
3804
- throw new Error(`Locale "${_localeKey}" is not defined, please add it with "defineLocale(...)"`);
3805
- }
3806
- let _input = [];
3807
- if (typeof value === 'string') {
3808
- const trimmedSeparator = this._picker._config.rangeSeparator.trim();
3809
- if (value.replace(/[^-]/g, '').length > 1) {
3810
- _input = value.split(this._picker._config.rangeSeparator);
3811
- }
3812
- else {
3813
- _input = value
3814
- .split(trimmedSeparator.length > 0 ? trimmedSeparator : this._picker._config.rangeSeparator)
3815
- .map(_val => _val.trim());
3816
- }
3817
- }
3818
- if (Array.isArray(value)) {
3819
- _input = value;
3820
- }
3821
- this._value = _input
3822
- .map((_val) => {
3823
- if (this._picker._config.useUtc) {
3824
- return utcAsLocal(parseDate(_val, this._picker._config.rangeInputFormat, this._localeService.currentLocale));
3825
- }
3826
- return parseDate(_val, this._picker._config.rangeInputFormat, this._localeService.currentLocale);
3827
- })
3828
- .map((date) => (isNaN(date.valueOf()) ? void 0 : date));
3829
- }
3830
- this._picker.bsValue = this._value;
3831
- }
3832
- setDisabledState(isDisabled) {
3833
- this._picker.isDisabled = isDisabled;
3834
- if (isDisabled) {
3835
- this._renderer.setAttribute(this._elRef.nativeElement, 'disabled', 'disabled');
3836
- return;
3837
- }
3838
- this._renderer.removeAttribute(this._elRef.nativeElement, 'disabled');
3839
- }
3840
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3841
- registerOnChange(fn) {
3842
- this._onChange = fn;
3843
- }
3844
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3845
- registerOnTouched(fn) {
3846
- this._onTouched = fn;
3847
- }
3848
- onBlur() {
3849
- this._onTouched();
3850
- }
3851
- hide() {
3852
- this._picker.hide();
3853
- this._renderer.selectRootElement(this._elRef.nativeElement).blur();
3854
- if (this._picker._config.returnFocusToInput) {
3855
- this._renderer.selectRootElement(this._elRef.nativeElement).focus();
3856
- }
3857
- }
3858
- }
3859
- BsDaterangepickerInputDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDaterangepickerInputDirective, deps: [{ token: BsDaterangepickerDirective, host: true }, { token: BsLocaleService }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
3860
- BsDaterangepickerInputDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.3", type: BsDaterangepickerInputDirective, selector: "input[bsDaterangepicker]", host: { listeners: { "change": "onChange($event)", "keyup.esc": "hide()", "keydown": "onKeydownEvent($event)", "blur": "onBlur()" } }, providers: [BS_DATERANGEPICKER_VALUE_ACCESSOR, BS_DATERANGEPICKER_VALIDATOR], ngImport: i0 });
3861
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDaterangepickerInputDirective, decorators: [{
3862
- type: Directive,
3863
- args: [{
3864
- selector: `input[bsDaterangepicker]`,
3865
- // eslint-disable-next-line @angular-eslint/no-host-metadata-property
3866
- host: {
3867
- '(change)': 'onChange($event)',
3868
- '(keyup.esc)': 'hide()',
3869
- '(keydown)': 'onKeydownEvent($event)',
3870
- '(blur)': 'onBlur()'
3871
- },
3872
- providers: [BS_DATERANGEPICKER_VALUE_ACCESSOR, BS_DATERANGEPICKER_VALIDATOR]
3873
- }]
3874
- }], ctorParameters: function () {
3875
- return [{ type: BsDaterangepickerDirective, decorators: [{
3876
- type: Host
3877
- }] }, { type: BsLocaleService }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }];
3878
- } });
3879
-
3880
- class BsDatepickerModule {
3881
- static forRoot() {
3882
- return {
3883
- ngModule: BsDatepickerModule,
3884
- providers: [
3885
- ComponentLoaderFactory,
3886
- PositioningService,
3887
- BsDatepickerStore,
3888
- BsDatepickerActions,
3889
- BsDatepickerEffects,
3890
- BsLocaleService,
3891
- TimepickerActions
3892
- ]
3893
- };
3894
- }
3895
- }
3896
- BsDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
3897
- BsDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerModule, declarations: [BsCalendarLayoutComponent,
3898
- BsCurrentDateViewComponent,
3899
- BsCustomDatesViewComponent,
3900
- BsDatepickerDayDecoratorComponent,
3901
- BsDatepickerNavigationViewComponent,
3902
- BsDaysCalendarViewComponent,
3903
- BsMonthCalendarViewComponent,
3904
- BsTimepickerViewComponent,
3905
- BsYearsCalendarViewComponent,
3906
- BsDatepickerContainerComponent,
3907
- BsDatepickerDirective,
3908
- BsDatepickerInlineContainerComponent,
3909
- BsDatepickerInlineDirective,
3910
- BsDatepickerInputDirective,
3911
- BsDaterangepickerContainerComponent,
3912
- BsDaterangepickerDirective,
3913
- BsDaterangepickerInlineContainerComponent,
3914
- BsDaterangepickerInlineDirective,
3915
- BsDaterangepickerInputDirective], imports: [CommonModule, TooltipModule, TimepickerModule], exports: [BsDatepickerContainerComponent,
3916
- BsDatepickerDirective,
3917
- BsDatepickerInlineContainerComponent,
3918
- BsDatepickerInlineDirective,
3919
- BsDatepickerInputDirective,
3920
- BsDaterangepickerContainerComponent,
3921
- BsDaterangepickerDirective,
3922
- BsDaterangepickerInlineContainerComponent,
3923
- BsDaterangepickerInlineDirective,
3924
- BsDaterangepickerInputDirective] });
3925
- BsDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerModule, imports: [CommonModule, TooltipModule, TimepickerModule] });
3926
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.3", ngImport: i0, type: BsDatepickerModule, decorators: [{
3927
- type: NgModule,
3928
- args: [{
3929
- imports: [CommonModule, TooltipModule, TimepickerModule],
3930
- declarations: [
3931
- BsCalendarLayoutComponent,
3932
- BsCurrentDateViewComponent,
3933
- BsCustomDatesViewComponent,
3934
- BsDatepickerDayDecoratorComponent,
3935
- BsDatepickerNavigationViewComponent,
3936
- BsDaysCalendarViewComponent,
3937
- BsMonthCalendarViewComponent,
3938
- BsTimepickerViewComponent,
3939
- BsYearsCalendarViewComponent,
3940
- BsDatepickerContainerComponent,
3941
- BsDatepickerDirective,
3942
- BsDatepickerInlineContainerComponent,
3943
- BsDatepickerInlineDirective,
3944
- BsDatepickerInputDirective,
3945
- BsDaterangepickerContainerComponent,
3946
- BsDaterangepickerDirective,
3947
- BsDaterangepickerInlineContainerComponent,
3948
- BsDaterangepickerInlineDirective,
3949
- BsDaterangepickerInputDirective
3950
- ],
3951
- exports: [
3952
- BsDatepickerContainerComponent,
3953
- BsDatepickerDirective,
3954
- BsDatepickerInlineContainerComponent,
3955
- BsDatepickerInlineDirective,
3956
- BsDatepickerInputDirective,
3957
- BsDaterangepickerContainerComponent,
3958
- BsDaterangepickerDirective,
3959
- BsDaterangepickerInlineContainerComponent,
3960
- BsDaterangepickerInlineDirective,
3961
- BsDaterangepickerInputDirective
3962
- ]
3963
- }]
3964
- }] });
3965
-
3966
- /**
3967
- * Generated bundle index. Do not edit.
3968
- */
3969
-
3970
- export { BsDatepickerConfig, BsDatepickerContainerComponent, BsDatepickerDirective, BsDatepickerInlineConfig, BsDatepickerInlineContainerComponent, BsDatepickerInlineDirective, BsDatepickerInputDirective, BsDatepickerModule, BsDaterangepickerConfig, BsDaterangepickerContainerComponent, BsDaterangepickerDirective, BsDaterangepickerInlineConfig, BsDaterangepickerInlineContainerComponent, BsDaterangepickerInlineDirective, BsDaterangepickerInputDirective, BsLocaleService };
3971
- //# sourceMappingURL=ngx-bootstrap-datepicker.mjs.map