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