@dereekb/dbx-web 9.17.3 → 9.18.1

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 (276) hide show
  1. package/calendar/README.md +6 -0
  2. package/calendar/esm2020/dereekb-dbx-web-calendar.mjs +5 -0
  3. package/calendar/esm2020/index.mjs +2 -0
  4. package/calendar/esm2020/lib/calendar.base.component.mjs +44 -0
  5. package/calendar/esm2020/lib/calendar.component.mjs +57 -0
  6. package/calendar/esm2020/lib/calendar.mjs +30 -0
  7. package/calendar/esm2020/lib/calendar.module.mjs +87 -0
  8. package/calendar/esm2020/lib/calendar.store.mjs +107 -0
  9. package/calendar/esm2020/lib/index.mjs +6 -0
  10. package/calendar/fesm2015/dereekb-dbx-web-calendar.mjs +313 -0
  11. package/calendar/fesm2015/dereekb-dbx-web-calendar.mjs.map +1 -0
  12. package/calendar/fesm2020/dereekb-dbx-web-calendar.mjs +311 -0
  13. package/calendar/fesm2020/dereekb-dbx-web-calendar.mjs.map +1 -0
  14. package/calendar/index.d.ts +1 -0
  15. package/calendar/lib/calendar.base.component.d.ts +16 -0
  16. package/{lib/extension/calendar → calendar/lib}/calendar.component.d.ts +5 -22
  17. package/calendar/lib/calendar.d.ts +6 -0
  18. package/calendar/lib/calendar.module.d.ts +23 -0
  19. package/{lib/extension/calendar → calendar/lib}/calendar.store.d.ts +0 -0
  20. package/{lib/extension/calendar → calendar/lib}/index.d.ts +2 -0
  21. package/calendar/package.json +36 -0
  22. package/esm2020/calendar/dereekb-dbx-web-calendar.mjs +5 -0
  23. package/esm2020/calendar/index.mjs +2 -0
  24. package/esm2020/calendar/lib/calendar.base.component.mjs +44 -0
  25. package/esm2020/calendar/lib/calendar.component.mjs +57 -0
  26. package/esm2020/calendar/lib/calendar.mjs +30 -0
  27. package/esm2020/calendar/lib/calendar.module.mjs +87 -0
  28. package/esm2020/calendar/lib/calendar.store.mjs +107 -0
  29. package/esm2020/calendar/lib/index.mjs +6 -0
  30. package/esm2020/lib/action/action.confirm.directive.mjs +4 -4
  31. package/esm2020/lib/action/action.module.mjs +5 -5
  32. package/esm2020/lib/action/action.progress.component.mjs +4 -4
  33. package/esm2020/lib/action/key.trigger.directive.mjs +4 -4
  34. package/esm2020/lib/action/snackbar/action.snackbar.component.mjs +4 -4
  35. package/esm2020/lib/action/snackbar/action.snackbar.directive.mjs +4 -4
  36. package/esm2020/lib/action/snackbar/action.snackbar.module.mjs +5 -5
  37. package/esm2020/lib/action/snackbar/action.snackbar.service.mjs +4 -4
  38. package/esm2020/lib/action/transition/action.transition.module.mjs +5 -5
  39. package/esm2020/lib/action/transition/transition.safety.dialog.component.mjs +4 -4
  40. package/esm2020/lib/action/transition/transition.safety.directive.mjs +4 -4
  41. package/esm2020/lib/button/button.component.mjs +6 -6
  42. package/esm2020/lib/button/button.module.mjs +5 -5
  43. package/esm2020/lib/button/button.spacer.component.mjs +4 -4
  44. package/esm2020/lib/button/progress/bar.button.component.mjs +5 -5
  45. package/esm2020/lib/button/progress/base.progress.button.directive.mjs +4 -4
  46. package/esm2020/lib/button/progress/button.progress.module.mjs +5 -5
  47. package/esm2020/lib/button/progress/spinner.button.component.mjs +5 -5
  48. package/esm2020/lib/dbx-web.module.mjs +9 -9
  49. package/esm2020/lib/error/error.action.directive.mjs +4 -4
  50. package/esm2020/lib/error/error.component.mjs +4 -4
  51. package/esm2020/lib/error/error.loading.directive.mjs +4 -4
  52. package/esm2020/lib/error/error.module.mjs +5 -5
  53. package/esm2020/lib/extension/index.mjs +1 -2
  54. package/esm2020/lib/extension/widget/widget.component.mjs +4 -4
  55. package/esm2020/lib/extension/widget/widget.directive.mjs +4 -4
  56. package/esm2020/lib/extension/widget/widget.list.component.mjs +10 -10
  57. package/esm2020/lib/extension/widget/widget.module.mjs +5 -5
  58. package/esm2020/lib/extension/widget/widget.service.mjs +4 -4
  59. package/esm2020/lib/interaction/dialog/abstract.dialog.directive.mjs +4 -4
  60. package/esm2020/lib/interaction/dialog/dialog.action.directive.mjs +4 -4
  61. package/esm2020/lib/interaction/dialog/dialog.content.close.component.mjs +37 -0
  62. package/esm2020/lib/interaction/dialog/dialog.content.component.mjs +4 -4
  63. package/esm2020/lib/interaction/dialog/dialog.content.footer.component.mjs +39 -0
  64. package/esm2020/lib/interaction/dialog/dialog.module.mjs +12 -8
  65. package/esm2020/lib/interaction/dialog/index.mjs +3 -1
  66. package/esm2020/lib/interaction/filter/filter.module.mjs +5 -5
  67. package/esm2020/lib/interaction/filter/filter.popover.button.component.mjs +4 -4
  68. package/esm2020/lib/interaction/filter/filter.popover.button.directive.mjs +4 -4
  69. package/esm2020/lib/interaction/filter/filter.popover.component.mjs +4 -4
  70. package/esm2020/lib/interaction/filter/filter.preset.list.component.mjs +4 -4
  71. package/esm2020/lib/interaction/filter/filter.preset.menu.component.mjs +5 -5
  72. package/esm2020/lib/interaction/filter/filter.preset.mjs +4 -4
  73. package/esm2020/lib/interaction/filter/filter.wrapper.component.mjs +4 -4
  74. package/esm2020/lib/interaction/interaction.module.mjs +5 -5
  75. package/esm2020/lib/interaction/popover/abstract.popover.directive.mjs +4 -4
  76. package/esm2020/lib/interaction/popover/abstract.popover.ref.directive.mjs +7 -7
  77. package/esm2020/lib/interaction/popover/popover.action.directive.mjs +4 -4
  78. package/esm2020/lib/interaction/popover/popover.component.mjs +4 -4
  79. package/esm2020/lib/interaction/popover/popover.content.component.mjs +4 -4
  80. package/esm2020/lib/interaction/popover/popover.controls.directive.mjs +4 -4
  81. package/esm2020/lib/interaction/popover/popover.coordinator.component.mjs +4 -4
  82. package/esm2020/lib/interaction/popover/popover.coordinator.service.mjs +4 -4
  83. package/esm2020/lib/interaction/popover/popover.header.component.mjs +4 -4
  84. package/esm2020/lib/interaction/popover/popover.module.mjs +5 -5
  85. package/esm2020/lib/interaction/popover/popover.scroll.content.component.mjs +4 -4
  86. package/esm2020/lib/interaction/popover/popover.service.mjs +4 -4
  87. package/esm2020/lib/interaction/popup/abstract.popup.directive.mjs +4 -4
  88. package/esm2020/lib/interaction/popup/popup.component.mjs +4 -4
  89. package/esm2020/lib/interaction/popup/popup.content.component.mjs +4 -4
  90. package/esm2020/lib/interaction/popup/popup.controls.buttons.component.mjs +4 -4
  91. package/esm2020/lib/interaction/popup/popup.controls.component.mjs +4 -4
  92. package/esm2020/lib/interaction/popup/popup.coordinator.component.mjs +4 -4
  93. package/esm2020/lib/interaction/popup/popup.coordinator.service.mjs +4 -4
  94. package/esm2020/lib/interaction/popup/popup.module.mjs +5 -5
  95. package/esm2020/lib/interaction/popup/popup.service.mjs +4 -4
  96. package/esm2020/lib/interaction/prompt/prompt.box.component.mjs +4 -4
  97. package/esm2020/lib/interaction/prompt/prompt.button.confirm.directive.mjs +4 -4
  98. package/esm2020/lib/interaction/prompt/prompt.component.mjs +4 -4
  99. package/esm2020/lib/interaction/prompt/prompt.confirm.component.mjs +4 -4
  100. package/esm2020/lib/interaction/prompt/prompt.confirm.dialog.component.mjs +4 -4
  101. package/esm2020/lib/interaction/prompt/prompt.confirm.directive.mjs +7 -7
  102. package/esm2020/lib/interaction/prompt/prompt.module.mjs +5 -5
  103. package/esm2020/lib/interaction/prompt/prompt.page.component.mjs +4 -4
  104. package/esm2020/lib/keypress/keydown.listener.directive.mjs +4 -4
  105. package/esm2020/lib/keypress/keypress.module.mjs +5 -5
  106. package/esm2020/lib/layout/bar/bar.directive.mjs +4 -4
  107. package/esm2020/lib/layout/bar/bar.header.component.mjs +4 -4
  108. package/esm2020/lib/layout/bar/bar.layout.module.mjs +5 -5
  109. package/esm2020/lib/layout/bar/pagebar.component.mjs +4 -4
  110. package/esm2020/lib/layout/block/block.layout.module.mjs +5 -5
  111. package/esm2020/lib/layout/block/two.block.component.mjs +4 -4
  112. package/esm2020/lib/layout/card/card.box.component.mjs +4 -4
  113. package/esm2020/lib/layout/card/card.box.container.component.mjs +4 -4
  114. package/esm2020/lib/layout/card/card.box.layout.module.mjs +5 -5
  115. package/esm2020/lib/layout/column/column.layout.module.mjs +5 -5
  116. package/esm2020/lib/layout/column/one/one.column.component.mjs +4 -4
  117. package/esm2020/lib/layout/column/one/one.column.module.mjs +5 -5
  118. package/esm2020/lib/layout/column/two/two.column.back.directive.mjs +4 -4
  119. package/esm2020/lib/layout/column/two/two.column.component.mjs +4 -4
  120. package/esm2020/lib/layout/column/two/two.column.context.directive.mjs +4 -4
  121. package/esm2020/lib/layout/column/two/two.column.full.left.directive.mjs +4 -4
  122. package/esm2020/lib/layout/column/two/two.column.head.component.mjs +4 -4
  123. package/esm2020/lib/layout/column/two/two.column.module.mjs +5 -5
  124. package/esm2020/lib/layout/column/two/two.column.right.component.mjs +4 -4
  125. package/esm2020/lib/layout/column/two/two.column.sref.directive.mjs +4 -4
  126. package/esm2020/lib/layout/column/two/two.column.sref.showright.directive.mjs +4 -4
  127. package/esm2020/lib/layout/column/two/two.column.store.mjs +4 -4
  128. package/esm2020/lib/layout/compact/compact.directive.mjs +4 -4
  129. package/esm2020/lib/layout/compact/compact.layout.module.mjs +5 -5
  130. package/esm2020/lib/layout/compact/compact.store.mjs +4 -4
  131. package/esm2020/lib/layout/content/content.border.directive.mjs +4 -4
  132. package/esm2020/lib/layout/content/content.box.directive.mjs +4 -4
  133. package/esm2020/lib/layout/content/content.container.directive.mjs +4 -4
  134. package/esm2020/lib/layout/content/content.directive.mjs +4 -4
  135. package/esm2020/lib/layout/content/content.elevate.directive.mjs +4 -4
  136. package/esm2020/lib/layout/content/content.layout.module.mjs +5 -5
  137. package/esm2020/lib/layout/content/content.page.directive.mjs +4 -4
  138. package/esm2020/lib/layout/flag/flag.component.mjs +4 -4
  139. package/esm2020/lib/layout/flag/flag.layout.module.mjs +5 -5
  140. package/esm2020/lib/layout/flag/flag.prompt.component.mjs +4 -4
  141. package/esm2020/lib/layout/flex/flex.group.directive.mjs +4 -4
  142. package/esm2020/lib/layout/flex/flex.layout.module.mjs +5 -5
  143. package/esm2020/lib/layout/flex/flex.size.directive.mjs +4 -4
  144. package/esm2020/lib/layout/item/item.icon.component.mjs +4 -4
  145. package/esm2020/lib/layout/item/item.layout.module.mjs +5 -5
  146. package/esm2020/lib/layout/layout.module.mjs +5 -5
  147. package/esm2020/lib/layout/list/list.component.mjs +7 -7
  148. package/esm2020/lib/layout/list/list.content.empty.component.mjs +4 -4
  149. package/esm2020/lib/layout/list/list.directive.mjs +7 -7
  150. package/esm2020/lib/layout/list/list.grid.view.component.mjs +10 -10
  151. package/esm2020/lib/layout/list/list.grid.view.directive.mjs +4 -4
  152. package/esm2020/lib/layout/list/list.layout.module.mjs +5 -5
  153. package/esm2020/lib/layout/list/list.view.directive.mjs +4 -4
  154. package/esm2020/lib/layout/list/list.view.selection.directive.mjs +4 -4
  155. package/esm2020/lib/layout/list/list.view.value.component.mjs +7 -7
  156. package/esm2020/lib/layout/list/list.view.value.directive.mjs +4 -4
  157. package/esm2020/lib/layout/list/list.view.value.item.directive.mjs +4 -4
  158. package/esm2020/lib/layout/list/list.view.value.modifier.directive.mjs +7 -7
  159. package/esm2020/lib/layout/list/list.view.value.modifier.ripple.directive.mjs +4 -4
  160. package/esm2020/lib/layout/list/list.view.value.modifier.selection.directive.mjs +4 -4
  161. package/esm2020/lib/layout/list/list.view.value.selection.component.mjs +7 -7
  162. package/esm2020/lib/layout/section/section.component.mjs +4 -4
  163. package/esm2020/lib/layout/section/section.header.component.mjs +4 -4
  164. package/esm2020/lib/layout/section/section.intro.component.mjs +4 -4
  165. package/esm2020/lib/layout/section/section.layout.module.mjs +5 -5
  166. package/esm2020/lib/layout/section/section.page.component.mjs +4 -4
  167. package/esm2020/lib/layout/section/subsection.component.mjs +4 -4
  168. package/esm2020/lib/layout/step/step.component.mjs +4 -4
  169. package/esm2020/lib/layout/step/step.layout.module.mjs +5 -5
  170. package/esm2020/lib/layout/style/spacer.directive.mjs +4 -4
  171. package/esm2020/lib/layout/style/style.body.directive.mjs +4 -4
  172. package/esm2020/lib/layout/style/style.directive.mjs +4 -4
  173. package/esm2020/lib/layout/style/style.layout.module.mjs +5 -5
  174. package/esm2020/lib/layout/style/style.service.mjs +4 -4
  175. package/esm2020/lib/layout/style/style.set.directive.mjs +4 -4
  176. package/esm2020/lib/layout/text/form.description.component.mjs +4 -4
  177. package/esm2020/lib/layout/text/hint.component.mjs +4 -4
  178. package/esm2020/lib/layout/text/icon.spacer.component.mjs +4 -4
  179. package/esm2020/lib/layout/text/label.component.mjs +4 -4
  180. package/esm2020/lib/layout/text/linkify.component.mjs +4 -4
  181. package/esm2020/lib/layout/text/note.component.mjs +4 -4
  182. package/esm2020/lib/layout/text/notice.component.mjs +4 -4
  183. package/esm2020/lib/layout/text/ok.component.mjs +4 -4
  184. package/esm2020/lib/layout/text/success.component.mjs +4 -4
  185. package/esm2020/lib/layout/text/text.chips.component.mjs +4 -4
  186. package/esm2020/lib/layout/text/text.module.mjs +5 -5
  187. package/esm2020/lib/layout/text/warn.component.mjs +4 -4
  188. package/esm2020/lib/loading/basic-loading.component.mjs +4 -4
  189. package/esm2020/lib/loading/loading-progress.component.mjs +4 -4
  190. package/esm2020/lib/loading/loading.action.directive.mjs +4 -4
  191. package/esm2020/lib/loading/loading.component.mjs +4 -4
  192. package/esm2020/lib/loading/loading.module.mjs +5 -5
  193. package/esm2020/lib/router/layout/anchor/anchor.component.mjs +4 -4
  194. package/esm2020/lib/router/layout/anchor/anchor.content.component.mjs +4 -4
  195. package/esm2020/lib/router/layout/anchor/anchor.icon.component.mjs +4 -4
  196. package/esm2020/lib/router/layout/anchor/anchor.link.component.mjs +4 -4
  197. package/esm2020/lib/router/layout/anchor/anchor.module.mjs +5 -5
  198. package/esm2020/lib/router/layout/anchor/anchor.segue.directive.mjs +4 -4
  199. package/esm2020/lib/router/layout/anchorlist/anchorlist.component.mjs +4 -4
  200. package/esm2020/lib/router/layout/anchorlist/anchorlist.module.mjs +5 -5
  201. package/esm2020/lib/router/layout/layout.module.mjs +5 -5
  202. package/esm2020/lib/router/layout/list/list.module.mjs +5 -5
  203. package/esm2020/lib/router/layout/list/router.list.directive.mjs +4 -4
  204. package/esm2020/lib/router/layout/navbar/navbar.component.mjs +4 -4
  205. package/esm2020/lib/router/layout/navbar/navbar.module.mjs +5 -5
  206. package/esm2020/lib/router/layout/sidenav/sidenav.button.component.mjs +4 -4
  207. package/esm2020/lib/router/layout/sidenav/sidenav.component.mjs +4 -4
  208. package/esm2020/lib/router/layout/sidenav/sidenav.module.mjs +5 -5
  209. package/esm2020/lib/router/layout/sidenav/sidenav.page.component.mjs +4 -4
  210. package/esm2020/lib/router/layout/sidenav/sidenav.pagebar.component.mjs +4 -4
  211. package/esm2020/lib/router/provider/ngrouter/anchor.component.mjs +4 -4
  212. package/esm2020/lib/router/provider/ngrouter/angular.router.module.mjs +5 -5
  213. package/esm2020/lib/router/provider/uirouter/anchor.component.mjs +4 -4
  214. package/esm2020/lib/router/provider/uirouter/uirouter.router.module.mjs +5 -5
  215. package/esm2020/lib/screen/screen.module.mjs +5 -5
  216. package/esm2020/lib/screen/screen.service.mjs +4 -4
  217. package/esm2020/mapbox/lib/mapbox.cdref.service.mjs +4 -4
  218. package/esm2020/mapbox/lib/mapbox.change.service.mjs +4 -4
  219. package/esm2020/mapbox/lib/mapbox.layout.component.mjs +4 -4
  220. package/esm2020/mapbox/lib/mapbox.layout.drawer.component.mjs +4 -4
  221. package/esm2020/mapbox/lib/mapbox.marker.component.mjs +4 -4
  222. package/esm2020/mapbox/lib/mapbox.markers.component.mjs +4 -4
  223. package/esm2020/mapbox/lib/mapbox.menu.component.mjs +4 -4
  224. package/esm2020/mapbox/lib/mapbox.module.mjs +5 -5
  225. package/esm2020/mapbox/lib/mapbox.service.mjs +4 -4
  226. package/esm2020/mapbox/lib/mapbox.store.map.directive.mjs +4 -4
  227. package/esm2020/mapbox/lib/mapbox.store.mjs +4 -4
  228. package/esm2020/mapbox/lib/mapbox.store.provide.mjs +7 -7
  229. package/fesm2015/dereekb-dbx-web-calendar.mjs +313 -0
  230. package/fesm2015/dereekb-dbx-web-calendar.mjs.map +1 -0
  231. package/fesm2015/dereekb-dbx-web-mapbox.mjs +40 -40
  232. package/fesm2015/dereekb-dbx-web-mapbox.mjs.map +1 -1
  233. package/fesm2015/dereekb-dbx-web.mjs +709 -880
  234. package/fesm2015/dereekb-dbx-web.mjs.map +1 -1
  235. package/fesm2020/dereekb-dbx-web-calendar.mjs +311 -0
  236. package/fesm2020/dereekb-dbx-web-calendar.mjs.map +1 -0
  237. package/fesm2020/dereekb-dbx-web-mapbox.mjs +40 -40
  238. package/fesm2020/dereekb-dbx-web-mapbox.mjs.map +1 -1
  239. package/fesm2020/dereekb-dbx-web.mjs +709 -880
  240. package/fesm2020/dereekb-dbx-web.mjs.map +1 -1
  241. package/lib/button/_button.scss +9 -0
  242. package/lib/button/progress/spinner.button.component.scss +2 -0
  243. package/lib/extension/calendar/_calendar.scss +21 -1
  244. package/lib/extension/calendar/style/_variables.scss +24 -0
  245. package/lib/extension/calendar/style/month/calendar-month-view.scss +30 -0
  246. package/lib/extension/index.d.ts +0 -1
  247. package/lib/interaction/dialog/_dialog.scss +18 -0
  248. package/lib/interaction/dialog/dialog.content.close.component.d.ts +12 -0
  249. package/lib/interaction/dialog/dialog.content.footer.component.d.ts +13 -0
  250. package/lib/interaction/dialog/dialog.module.d.ts +7 -3
  251. package/lib/interaction/dialog/index.d.ts +2 -0
  252. package/lib/interaction/filter/filter.preset.menu.component.d.ts +2 -3
  253. package/lib/layout/style/_style.scss +5 -0
  254. package/mapbox/esm2020/lib/mapbox.cdref.service.mjs +4 -4
  255. package/mapbox/esm2020/lib/mapbox.change.service.mjs +4 -4
  256. package/mapbox/esm2020/lib/mapbox.layout.component.mjs +4 -4
  257. package/mapbox/esm2020/lib/mapbox.layout.drawer.component.mjs +4 -4
  258. package/mapbox/esm2020/lib/mapbox.marker.component.mjs +4 -4
  259. package/mapbox/esm2020/lib/mapbox.markers.component.mjs +4 -4
  260. package/mapbox/esm2020/lib/mapbox.menu.component.mjs +4 -4
  261. package/mapbox/esm2020/lib/mapbox.module.mjs +5 -5
  262. package/mapbox/esm2020/lib/mapbox.service.mjs +4 -4
  263. package/mapbox/esm2020/lib/mapbox.store.map.directive.mjs +4 -4
  264. package/mapbox/esm2020/lib/mapbox.store.mjs +4 -4
  265. package/mapbox/esm2020/lib/mapbox.store.provide.mjs +7 -7
  266. package/mapbox/fesm2015/dereekb-dbx-web-mapbox.mjs +40 -40
  267. package/mapbox/fesm2015/dereekb-dbx-web-mapbox.mjs.map +1 -1
  268. package/mapbox/fesm2020/dereekb-dbx-web-mapbox.mjs +40 -40
  269. package/mapbox/fesm2020/dereekb-dbx-web-mapbox.mjs.map +1 -1
  270. package/mapbox/package.json +3 -3
  271. package/package.json +14 -7
  272. package/esm2020/lib/extension/calendar/calendar.component.mjs +0 -86
  273. package/esm2020/lib/extension/calendar/calendar.module.mjs +0 -72
  274. package/esm2020/lib/extension/calendar/calendar.store.mjs +0 -107
  275. package/esm2020/lib/extension/calendar/index.mjs +0 -4
  276. package/lib/extension/calendar/calendar.module.d.ts +0 -22
@@ -0,0 +1,313 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, Component, EventEmitter, Output, NgModule } from '@angular/core';
3
+ import { startOfDay, endOfDay, startOfWeek, endOfWeek, startOfMonth, endOfMonth, differenceInDays, addDays, isSameDay, isBefore, isAfter, isSameMonth } from 'date-fns';
4
+ import { distinctUntilChanged, switchMap, first, tap, map, shareReplay, withLatestFrom } from 'rxjs';
5
+ import { formatToTimeAndDurationString, sortDateRangeStartAscendingCompareFunction } from '@dereekb/date';
6
+ import { ComponentStore } from '@ngrx/component-store';
7
+ import * as i2$1 from '@angular/common';
8
+ import { CommonModule } from '@angular/common';
9
+ import * as i3$1 from '@angular/material/button-toggle';
10
+ import { MatButtonToggleModule } from '@angular/material/button-toggle';
11
+ import * as i7 from 'angular-calendar';
12
+ import { CalendarModule, CalendarDayModule, CalendarWeekModule, DateAdapter } from 'angular-calendar';
13
+ import * as i5$1 from '@angular/flex-layout/extended';
14
+ import * as i2 from '@angular/material/icon';
15
+ import { MatIconModule } from '@angular/material/icon';
16
+ import * as i3 from '@angular/material/button';
17
+ import { MatButtonModule } from '@angular/material/button';
18
+ import * as i4 from '@dereekb/dbx-web';
19
+ import { DbxButtonModule, DbxPopoverInteractionModule } from '@dereekb/dbx-web';
20
+ import * as i5 from '@angular/flex-layout/flex';
21
+ import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
22
+ import { FlexLayoutModule } from '@angular/flex-layout';
23
+
24
+ function timeSubtitleForEvent(event) {
25
+ var _a;
26
+ let subtitle;
27
+ if (event.allDay) {
28
+ subtitle = `(All Day)`;
29
+ }
30
+ else {
31
+ subtitle = formatToTimeAndDurationString(event.start, (_a = event.end) !== null && _a !== void 0 ? _a : new Date());
32
+ }
33
+ return subtitle;
34
+ }
35
+ function prepareAndSortCalendarEvents(events) {
36
+ return events
37
+ .map((event) => {
38
+ const subtitle = timeSubtitleForEvent(event);
39
+ let title;
40
+ if (event.allDay) {
41
+ title = event.title + ' ' + subtitle;
42
+ }
43
+ else {
44
+ title = `${event.title} - ${subtitle}`;
45
+ }
46
+ return Object.assign(Object.assign({}, event), { title });
47
+ })
48
+ .sort(sortDateRangeStartAscendingCompareFunction);
49
+ }
50
+
51
+ var CalendarDisplayType;
52
+ (function (CalendarDisplayType) {
53
+ CalendarDisplayType["MONTH"] = "month";
54
+ CalendarDisplayType["WEEK"] = "week";
55
+ CalendarDisplayType["DAY"] = "day";
56
+ })(CalendarDisplayType || (CalendarDisplayType = {}));
57
+ function visibleDateRangeForCalendarState(calendarState) {
58
+ const { type, date } = calendarState;
59
+ let start;
60
+ let end;
61
+ let distance;
62
+ switch (type) {
63
+ case CalendarDisplayType.MONTH:
64
+ start = startOfDay(startOfWeek(startOfMonth(date), { weekStartsOn: 0 }));
65
+ end = endOfWeek(endOfMonth(date));
66
+ distance = differenceInDays(end, start) + 1;
67
+ break;
68
+ case CalendarDisplayType.WEEK:
69
+ start = startOfWeek(date);
70
+ end = endOfWeek(start);
71
+ distance = 7; // 7 days in a week.
72
+ break;
73
+ case CalendarDisplayType.DAY:
74
+ start = startOfDay(date);
75
+ end = endOfDay(date);
76
+ distance = 1;
77
+ break;
78
+ }
79
+ // console.log('Date range: ', start, end, distance);
80
+ return {
81
+ type,
82
+ start,
83
+ end,
84
+ distance
85
+ };
86
+ }
87
+ const distinctUntilDateOrTypeOrEventsChanged = distinctUntilChanged((a, b) => (a === null || a === void 0 ? void 0 : a.date) === (b === null || b === void 0 ? void 0 : b.date) && (a === null || a === void 0 ? void 0 : a.type) === (b === null || b === void 0 ? void 0 : b.type) && (a === null || a === void 0 ? void 0 : a.events) === (b === null || b === void 0 ? void 0 : b.events));
88
+ class DbxCalendarStore extends ComponentStore {
89
+ constructor() {
90
+ super({
91
+ type: CalendarDisplayType.MONTH,
92
+ date: new Date(),
93
+ dateTappedTwice: false,
94
+ events: []
95
+ });
96
+ // MARK: Effects
97
+ this.tapNext = this.effect((input) => {
98
+ return input.pipe(switchMap(() => this.visibleDateRange$.pipe(first(), tap(({ end }) => {
99
+ this.tapDay(addDays(end, 1));
100
+ }))));
101
+ });
102
+ this.tapPrevious = this.effect((input) => {
103
+ return input.pipe(switchMap(() => this.visibleDateRange$.pipe(first(), tap(({ start }) => {
104
+ this.tapDay(addDays(start, -1));
105
+ }))));
106
+ });
107
+ // MARK: Accessors
108
+ this.date$ = this.state$.pipe(map((x) => x.date));
109
+ this.dateTappedTwice$ = this.state$.pipe(map((x) => x.dateTappedTwice));
110
+ this.events$ = this.state$.pipe(map((x) => x.events));
111
+ // TODO: Filter to be events that will only be displayed based on the current calendar.
112
+ this.visibleEvents$ = this.state$.pipe(map((x) => x.events), shareReplay(1));
113
+ this.eventsForDateState$ = this.state$.pipe(distinctUntilDateOrTypeOrEventsChanged, map((state) => ({
114
+ date: state.date,
115
+ events: state.events.filter((x) => isSameDay(x.start, state.date) || (x.end && isBefore(x.start, state.date) && isAfter(x.end, state.date))),
116
+ dateTappedTwice: state.dateTappedTwice
117
+ })), shareReplay(1));
118
+ this.eventsForDate$ = this.eventsForDateState$.pipe(map((state) => state.events));
119
+ this.visibleDateRange$ = this.state$.pipe(
120
+ // If the date or type changes, check again.
121
+ distinctUntilChanged((a, b) => (a === null || a === void 0 ? void 0 : a.date) === (b === null || b === void 0 ? void 0 : b.date) && (a === null || a === void 0 ? void 0 : a.type) === (b === null || b === void 0 ? void 0 : b.type)), map(visibleDateRangeForCalendarState), distinctUntilChanged((a, b) => {
122
+ if (a.type === b.type) {
123
+ return isSameDay(a.start, b.start);
124
+ }
125
+ else {
126
+ return false; // Type changed, date range changed.
127
+ }
128
+ }), shareReplay(1));
129
+ this.displayType$ = this.state$.pipe(map((x) => x.type), distinctUntilChanged((a, b) => a === b), shareReplay(1));
130
+ // MARK: State Changes
131
+ /**
132
+ * Tap a day.
133
+ *
134
+ * - If the same day is presented, dateTappedTwice is flipped.
135
+ */
136
+ this.tapDay = this.updater((state, date) => (Object.assign(Object.assign({}, state), { date, dateTappedTwice: isSameDay(date, state.date) ? !state.dateTappedTwice : false })));
137
+ /**
138
+ * Set all events on the calendar.
139
+ */
140
+ this.setEvents = this.updater((state, events) => (Object.assign(Object.assign({}, state), { events })));
141
+ /**
142
+ * Set all events on the calendar.
143
+ */
144
+ this.setDisplayType = this.updater((state, type) => (Object.assign(Object.assign({}, state), { type })));
145
+ }
146
+ }
147
+ DbxCalendarStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
148
+ DbxCalendarStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarStore });
149
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarStore, decorators: [{
150
+ type: Injectable
151
+ }], ctorParameters: function () { return []; } });
152
+
153
+ class DbxCalendarBaseComponent {
154
+ constructor(calendarStore) {
155
+ this.calendarStore = calendarStore;
156
+ this.viewDate$ = this.calendarStore.date$;
157
+ this.activeDayIsOpen$ = this.calendarStore.eventsForDateState$.pipe(withLatestFrom(this.calendarStore.date$), map(([x, date]) => {
158
+ if (x.events.length && isSameMonth(x.date, date)) {
159
+ return !x.dateTappedTwice;
160
+ }
161
+ return false;
162
+ }));
163
+ this.displayType$ = this.calendarStore.displayType$;
164
+ }
165
+ todayClicked() {
166
+ this.calendarStore.tapDay(new Date());
167
+ }
168
+ nextButtonClicked() {
169
+ this.calendarStore.tapNext();
170
+ }
171
+ previousButtonClicked() {
172
+ this.calendarStore.tapPrevious();
173
+ }
174
+ typeToggleChanged(event) {
175
+ this.calendarStore.setDisplayType(event.value);
176
+ }
177
+ }
178
+ DbxCalendarBaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarBaseComponent, deps: [{ token: DbxCalendarStore }], target: i0.ɵɵFactoryTarget.Component });
179
+ DbxCalendarBaseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxCalendarBaseComponent, selector: "dbx-calendar-base", ngImport: i0, template: "<div class=\"dbx-calendar\">\n <h3 class=\"dbx-calendar-title\">{{ (viewDate$ | async)! | calendarDate: (displayType$ | async) + 'ViewTitle':'en' }}</h3>\n <div class=\"dbx-calendar-header\">\n <div class=\"dbx-calendar-controls\" fxLayout=\"row\">\n <span class=\"dbx-calendar-controls-left\" fxFlex=\"nogrow\">\n <button mat-stroked-button (click)=\"todayClicked()\">Today</button>\n <dbx-button-spacer></dbx-button-spacer>\n <button mat-icon-button [attr.aria-label]=\"'Previous ' + (displayType$ | async) + ' button'\" (click)=\"previousButtonClicked()\">\n <mat-icon>navigate_before</mat-icon>\n </button>\n <button mat-icon-button [attr.aria-label]=\"'Next' + (displayType$ | async)! + ' button'\" (click)=\"nextButtonClicked()\">\n <mat-icon>navigate_next</mat-icon>\n </button>\n </span>\n <span class=\"spacer\"></span>\n <span class=\"dbx-calendar-controls-right\" fxFlex=\"nogrow\">\n <ng-content select=\"[controls]\"></ng-content>\n </span>\n </div>\n </div>\n <ng-content></ng-content>\n</div>\n", dependencies: [{ kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i4.DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "directive", type: i5.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i5.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i7.ɵCalendarDatePipe, name: "calendarDate" }] });
180
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarBaseComponent, decorators: [{
181
+ type: Component,
182
+ args: [{ selector: 'dbx-calendar-base', template: "<div class=\"dbx-calendar\">\n <h3 class=\"dbx-calendar-title\">{{ (viewDate$ | async)! | calendarDate: (displayType$ | async) + 'ViewTitle':'en' }}</h3>\n <div class=\"dbx-calendar-header\">\n <div class=\"dbx-calendar-controls\" fxLayout=\"row\">\n <span class=\"dbx-calendar-controls-left\" fxFlex=\"nogrow\">\n <button mat-stroked-button (click)=\"todayClicked()\">Today</button>\n <dbx-button-spacer></dbx-button-spacer>\n <button mat-icon-button [attr.aria-label]=\"'Previous ' + (displayType$ | async) + ' button'\" (click)=\"previousButtonClicked()\">\n <mat-icon>navigate_before</mat-icon>\n </button>\n <button mat-icon-button [attr.aria-label]=\"'Next' + (displayType$ | async)! + ' button'\" (click)=\"nextButtonClicked()\">\n <mat-icon>navigate_next</mat-icon>\n </button>\n </span>\n <span class=\"spacer\"></span>\n <span class=\"dbx-calendar-controls-right\" fxFlex=\"nogrow\">\n <ng-content select=\"[controls]\"></ng-content>\n </span>\n </div>\n </div>\n <ng-content></ng-content>\n</div>\n" }]
183
+ }], ctorParameters: function () { return [{ type: DbxCalendarStore }]; } });
184
+
185
+ class DbxCalendarComponent {
186
+ constructor(calendarStore) {
187
+ this.calendarStore = calendarStore;
188
+ this.clickEvent = new EventEmitter();
189
+ this.viewDate$ = this.calendarStore.date$;
190
+ this.events$ = this.calendarStore.visibleEvents$.pipe(map(prepareAndSortCalendarEvents), shareReplay(1));
191
+ this.activeDayIsOpen$ = this.calendarStore.eventsForDateState$.pipe(withLatestFrom(this.calendarStore.date$), map(([x, date]) => {
192
+ if (x.events.length && isSameMonth(x.date, date)) {
193
+ return !x.dateTappedTwice;
194
+ }
195
+ return false;
196
+ }));
197
+ this.displayType$ = this.calendarStore.displayType$;
198
+ }
199
+ ngOnDestroy() {
200
+ this.clickEvent.complete();
201
+ }
202
+ todayClicked() {
203
+ this.dayClicked({ date: new Date() });
204
+ }
205
+ nextButtonClicked() {
206
+ this.calendarStore.tapNext();
207
+ }
208
+ previousButtonClicked() {
209
+ this.calendarStore.tapPrevious();
210
+ }
211
+ dayClicked({ date }) {
212
+ this.calendarStore.tapDay(date);
213
+ }
214
+ eventClicked(action, event) {
215
+ this.clickEvent.emit({ action, event });
216
+ }
217
+ typeToggleChanged(event) {
218
+ this.calendarStore.setDisplayType(event.value);
219
+ }
220
+ }
221
+ DbxCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarComponent, deps: [{ token: DbxCalendarStore }], target: i0.ɵɵFactoryTarget.Component });
222
+ DbxCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxCalendarComponent, selector: "dbx-calendar", outputs: { clickEvent: "clickEvent" }, ngImport: i0, template: "<dbx-calendar-base>\n <ng-container controls>\n <mat-button-toggle-group name=\"calendarDisplayStyle\" [value]=\"(displayType$ | async)!\" (change)=\"typeToggleChanged($event)\" aria-label=\"Display Style\">\n <mat-button-toggle value=\"month\">Month</mat-button-toggle>\n <mat-button-toggle value=\"week\">Week</mat-button-toggle>\n <mat-button-toggle value=\"day\">Day</mat-button-toggle>\n </mat-button-toggle-group>\n </ng-container>\n <div class=\"dbx-calendar-content\" [ngClass]=\"'dbx-calendar-content-' + (displayType$ | async)!\" [ngSwitch]=\"displayType$ | async\">\n <mwl-calendar-month-view *ngSwitchCase=\"'month'\" [viewDate]=\"(viewDate$ | async)!\" [events]=\"(events$ | async)!\" [activeDayIsOpen]=\"(activeDayIsOpen$ | async)!\" (dayClicked)=\"dayClicked($event.day)\" (eventClicked)=\"eventClicked('Clicked', $event.event)\"></mwl-calendar-month-view>\n </div>\n</dbx-calendar-base>\n", dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2$1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i3$1.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i3$1.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "component", type: i7.CalendarMonthViewComponent, selector: "mwl-calendar-month-view", inputs: ["viewDate", "events", "excludeDays", "activeDayIsOpen", "activeDay", "refresh", "locale", "tooltipPlacement", "tooltipTemplate", "tooltipAppendToBody", "tooltipDelay", "weekStartsOn", "headerTemplate", "cellTemplate", "openDayEventsTemplate", "eventTitleTemplate", "eventActionsTemplate", "weekendDays"], outputs: ["beforeViewRender", "dayClicked", "eventClicked", "columnHeaderClicked", "eventTimesChanged"] }, { kind: "directive", type: i5$1.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "component", type: DbxCalendarBaseComponent, selector: "dbx-calendar-base" }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }] });
223
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarComponent, decorators: [{
224
+ type: Component,
225
+ args: [{ selector: 'dbx-calendar', template: "<dbx-calendar-base>\n <ng-container controls>\n <mat-button-toggle-group name=\"calendarDisplayStyle\" [value]=\"(displayType$ | async)!\" (change)=\"typeToggleChanged($event)\" aria-label=\"Display Style\">\n <mat-button-toggle value=\"month\">Month</mat-button-toggle>\n <mat-button-toggle value=\"week\">Week</mat-button-toggle>\n <mat-button-toggle value=\"day\">Day</mat-button-toggle>\n </mat-button-toggle-group>\n </ng-container>\n <div class=\"dbx-calendar-content\" [ngClass]=\"'dbx-calendar-content-' + (displayType$ | async)!\" [ngSwitch]=\"displayType$ | async\">\n <mwl-calendar-month-view *ngSwitchCase=\"'month'\" [viewDate]=\"(viewDate$ | async)!\" [events]=\"(events$ | async)!\" [activeDayIsOpen]=\"(activeDayIsOpen$ | async)!\" (dayClicked)=\"dayClicked($event.day)\" (eventClicked)=\"eventClicked('Clicked', $event.event)\"></mwl-calendar-month-view>\n </div>\n</dbx-calendar-base>\n" }]
226
+ }], ctorParameters: function () { return [{ type: DbxCalendarStore }]; }, propDecorators: { clickEvent: [{
227
+ type: Output
228
+ }] } });
229
+
230
+ const declarations = [
231
+ //
232
+ DbxCalendarBaseComponent,
233
+ DbxCalendarComponent
234
+ ];
235
+ class DbxCalendarModule {
236
+ }
237
+ DbxCalendarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
238
+ DbxCalendarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarModule, declarations: [
239
+ //
240
+ DbxCalendarBaseComponent,
241
+ DbxCalendarComponent
242
+ ], imports: [
243
+ //
244
+ CommonModule,
245
+ MatIconModule,
246
+ MatButtonModule,
247
+ MatButtonToggleModule,
248
+ DbxButtonModule,
249
+ DbxPopoverInteractionModule,
250
+ CalendarModule,
251
+ CalendarDayModule,
252
+ FlexLayoutModule,
253
+ CalendarWeekModule
254
+ ], exports: [
255
+ //
256
+ DbxCalendarBaseComponent,
257
+ DbxCalendarComponent
258
+ ] });
259
+ DbxCalendarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarModule, imports: [
260
+ //
261
+ CommonModule,
262
+ MatIconModule,
263
+ MatButtonModule,
264
+ MatButtonToggleModule,
265
+ DbxButtonModule,
266
+ DbxPopoverInteractionModule,
267
+ CalendarModule,
268
+ CalendarDayModule,
269
+ FlexLayoutModule,
270
+ CalendarWeekModule
271
+ ] });
272
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarModule, decorators: [{
273
+ type: NgModule,
274
+ args: [{
275
+ imports: [
276
+ //
277
+ CommonModule,
278
+ MatIconModule,
279
+ MatButtonModule,
280
+ MatButtonToggleModule,
281
+ DbxButtonModule,
282
+ DbxPopoverInteractionModule,
283
+ CalendarModule,
284
+ CalendarDayModule,
285
+ FlexLayoutModule,
286
+ CalendarWeekModule
287
+ ],
288
+ declarations,
289
+ exports: declarations
290
+ }]
291
+ }] });
292
+ /**
293
+ * Provides default configuration for the DbxCalendarModule
294
+ */
295
+ class DbxCalendarRootModule {
296
+ }
297
+ DbxCalendarRootModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarRootModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
298
+ DbxCalendarRootModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarRootModule, imports: [i7.CalendarModule], exports: [DbxCalendarModule] });
299
+ DbxCalendarRootModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarRootModule, imports: [CalendarModule.forRoot({ provide: DateAdapter, useFactory: adapterFactory }), DbxCalendarModule] });
300
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarRootModule, decorators: [{
301
+ type: NgModule,
302
+ args: [{
303
+ imports: [CalendarModule.forRoot({ provide: DateAdapter, useFactory: adapterFactory })],
304
+ exports: [DbxCalendarModule]
305
+ }]
306
+ }] });
307
+
308
+ /**
309
+ * Generated bundle index. Do not edit.
310
+ */
311
+
312
+ export { CalendarDisplayType, DbxCalendarBaseComponent, DbxCalendarComponent, DbxCalendarModule, DbxCalendarRootModule, DbxCalendarStore, prepareAndSortCalendarEvents, visibleDateRangeForCalendarState };
313
+ //# sourceMappingURL=dereekb-dbx-web-calendar.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dereekb-dbx-web-calendar.mjs","sources":["../../../../../packages/dbx-web/calendar/src/lib/calendar.ts","../../../../../packages/dbx-web/calendar/src/lib/calendar.store.ts","../../../../../packages/dbx-web/calendar/src/lib/calendar.base.component.ts","../../../../../packages/dbx-web/calendar/src/lib/calendar.base.component.html","../../../../../packages/dbx-web/calendar/src/lib/calendar.component.ts","../../../../../packages/dbx-web/calendar/src/lib/calendar.component.html","../../../../../packages/dbx-web/calendar/src/lib/calendar.module.ts","../../../../../packages/dbx-web/calendar/src/dereekb-dbx-web-calendar.ts"],"sourcesContent":["import { formatToTimeAndDurationString, sortDateRangeStartAscendingCompareFunction } from '@dereekb/date';\nimport { CalendarEvent } from 'angular-calendar';\n\nexport interface DbxCalendarEvent<T> {\n event: CalendarEvent<T>;\n action?: string;\n}\n\nfunction timeSubtitleForEvent(event: CalendarEvent): string {\n let subtitle;\n\n if (event.allDay) {\n subtitle = `(All Day)`;\n } else {\n subtitle = formatToTimeAndDurationString(event.start, event.end ?? new Date());\n }\n\n return subtitle;\n}\n\nexport function prepareAndSortCalendarEvents(events: CalendarEvent[]): CalendarEvent[] {\n return events\n .map((event: CalendarEvent) => {\n const subtitle = timeSubtitleForEvent(event);\n let title;\n\n if (event.allDay) {\n title = event.title + ' ' + subtitle;\n } else {\n title = `${event.title} - ${subtitle}`;\n }\n\n return {\n ...event,\n title\n };\n })\n .sort(sortDateRangeStartAscendingCompareFunction);\n}\n","import { Injectable } from '@angular/core';\nimport { ComponentStore } from '@ngrx/component-store';\nimport { CalendarEvent } from 'angular-calendar';\nimport { differenceInDays, addDays, endOfDay, endOfMonth, endOfWeek, isSameDay, startOfDay, startOfMonth, startOfWeek, isBefore, isAfter } from 'date-fns';\nimport { Observable, distinctUntilChanged, first, map, shareReplay, switchMap, tap } from 'rxjs';\n\nexport enum CalendarDisplayType {\n MONTH = 'month',\n WEEK = 'week',\n DAY = 'day'\n}\n\nexport interface CalendarViewDateRange {\n type: CalendarDisplayType;\n start: Date;\n end: Date;\n distance: number;\n}\n\nexport interface CalendarState<T = any> {\n /**\n * Calendar display mode\n */\n type: CalendarDisplayType;\n /**\n * Date that is selected.\n */\n date: Date;\n /**\n * Whether or not the day was tapped/set twice.\n */\n dateTappedTwice: boolean;\n /**\n * Set of calendar events.\n */\n events: CalendarEvent<T>[];\n}\n\nexport function visibleDateRangeForCalendarState(calendarState: CalendarState): CalendarViewDateRange {\n const { type, date } = calendarState;\n let start: Date;\n let end: Date;\n let distance: number;\n\n switch (type) {\n case CalendarDisplayType.MONTH:\n start = startOfDay(startOfWeek(startOfMonth(date), { weekStartsOn: 0 }));\n end = endOfWeek(endOfMonth(date));\n distance = differenceInDays(end, start) + 1;\n break;\n case CalendarDisplayType.WEEK:\n start = startOfWeek(date);\n end = endOfWeek(start);\n distance = 7; // 7 days in a week.\n break;\n case CalendarDisplayType.DAY:\n start = startOfDay(date);\n end = endOfDay(date);\n distance = 1;\n break;\n }\n\n // console.log('Date range: ', start, end, distance);\n\n return {\n type,\n start,\n end,\n distance\n };\n}\n\nconst distinctUntilDateOrTypeOrEventsChanged = distinctUntilChanged<CalendarState>((a, b) => a?.date === b?.date && a?.type === b?.type && a?.events === b?.events);\n\n@Injectable()\nexport class DbxCalendarStore<T = any> extends ComponentStore<CalendarState<T>> {\n constructor() {\n super({\n type: CalendarDisplayType.MONTH,\n date: new Date(),\n dateTappedTwice: false,\n events: []\n });\n }\n\n // MARK: Effects\n readonly tapNext = this.effect((input: Observable<void>) => {\n return input.pipe(\n switchMap(() =>\n this.visibleDateRange$.pipe(\n first(),\n tap(({ end }) => {\n this.tapDay(addDays(end, 1));\n })\n )\n )\n );\n });\n\n readonly tapPrevious = this.effect((input: Observable<void>) => {\n return input.pipe(\n switchMap(() =>\n this.visibleDateRange$.pipe(\n first(),\n tap(({ start }) => {\n this.tapDay(addDays(start, -1));\n })\n )\n )\n );\n });\n\n // MARK: Accessors\n readonly date$ = this.state$.pipe(map((x) => x.date));\n readonly dateTappedTwice$ = this.state$.pipe(map((x) => x.dateTappedTwice));\n\n readonly events$ = this.state$.pipe(map((x) => x.events));\n\n // TODO: Filter to be events that will only be displayed based on the current calendar.\n readonly visibleEvents$ = this.state$.pipe(\n map((x) => x.events),\n shareReplay(1)\n );\n\n readonly eventsForDateState$ = this.state$.pipe(\n distinctUntilDateOrTypeOrEventsChanged,\n map((state) => ({\n date: state.date,\n events: state.events.filter((x) => isSameDay(x.start, state.date) || (x.end && isBefore(x.start, state.date) && isAfter(x.end, state.date))),\n dateTappedTwice: state.dateTappedTwice\n })),\n shareReplay(1)\n );\n\n readonly eventsForDate$ = this.eventsForDateState$.pipe(map((state) => state.events));\n\n readonly visibleDateRange$ = this.state$.pipe(\n // If the date or type changes, check again.\n distinctUntilChanged((a, b) => a?.date === b?.date && a?.type === b?.type),\n map(visibleDateRangeForCalendarState),\n distinctUntilChanged((a, b) => {\n if (a.type === b.type) {\n return isSameDay(a.start, b.start);\n } else {\n return false; // Type changed, date range changed.\n }\n }),\n shareReplay(1)\n );\n\n readonly displayType$ = this.state$.pipe(\n map((x) => x.type),\n distinctUntilChanged((a, b) => a === b),\n shareReplay(1)\n );\n\n // MARK: State Changes\n /**\n * Tap a day.\n *\n * - If the same day is presented, dateTappedTwice is flipped.\n */\n readonly tapDay = this.updater((state, date: Date) => ({ ...state, date, dateTappedTwice: isSameDay(date, state.date) ? !state.dateTappedTwice : false }));\n\n /**\n * Set all events on the calendar.\n */\n readonly setEvents = this.updater((state, events: CalendarEvent<T>[]) => ({ ...state, events }));\n\n /**\n * Set all events on the calendar.\n */\n readonly setDisplayType = this.updater((state, type: CalendarDisplayType) => ({ ...state, type }));\n}\n","import { Component } from '@angular/core';\nimport { isSameMonth } from 'date-fns';\nimport { DbxCalendarStore } from './calendar.store';\nimport { map, withLatestFrom } from 'rxjs';\nimport { MatButtonToggleChange } from '@angular/material/button-toggle';\n\n@Component({\n selector: 'dbx-calendar-base',\n templateUrl: './calendar.base.component.html'\n})\nexport class DbxCalendarBaseComponent<T> {\n readonly viewDate$ = this.calendarStore.date$;\n\n readonly activeDayIsOpen$ = this.calendarStore.eventsForDateState$.pipe(\n withLatestFrom(this.calendarStore.date$),\n map(([x, date]) => {\n if (x.events.length && isSameMonth(x.date, date)) {\n return !x.dateTappedTwice;\n }\n\n return false;\n })\n );\n\n readonly displayType$ = this.calendarStore.displayType$;\n\n constructor(public readonly calendarStore: DbxCalendarStore<T>) {}\n\n todayClicked(): void {\n this.calendarStore.tapDay(new Date());\n }\n\n nextButtonClicked(): void {\n this.calendarStore.tapNext();\n }\n\n previousButtonClicked(): void {\n this.calendarStore.tapPrevious();\n }\n\n typeToggleChanged(event: MatButtonToggleChange): void {\n this.calendarStore.setDisplayType(event.value);\n }\n}\n","<div class=\"dbx-calendar\">\n <h3 class=\"dbx-calendar-title\">{{ (viewDate$ | async)! | calendarDate: (displayType$ | async) + 'ViewTitle':'en' }}</h3>\n <div class=\"dbx-calendar-header\">\n <div class=\"dbx-calendar-controls\" fxLayout=\"row\">\n <span class=\"dbx-calendar-controls-left\" fxFlex=\"nogrow\">\n <button mat-stroked-button (click)=\"todayClicked()\">Today</button>\n <dbx-button-spacer></dbx-button-spacer>\n <button mat-icon-button [attr.aria-label]=\"'Previous ' + (displayType$ | async) + ' button'\" (click)=\"previousButtonClicked()\">\n <mat-icon>navigate_before</mat-icon>\n </button>\n <button mat-icon-button [attr.aria-label]=\"'Next' + (displayType$ | async)! + ' button'\" (click)=\"nextButtonClicked()\">\n <mat-icon>navigate_next</mat-icon>\n </button>\n </span>\n <span class=\"spacer\"></span>\n <span class=\"dbx-calendar-controls-right\" fxFlex=\"nogrow\">\n <ng-content select=\"[controls]\"></ng-content>\n </span>\n </div>\n </div>\n <ng-content></ng-content>\n</div>\n","import { Component, EventEmitter, Output, OnDestroy } from '@angular/core';\nimport { isSameMonth } from 'date-fns';\nimport { CalendarEvent } from 'angular-calendar';\nimport { DbxCalendarStore } from './calendar.store';\nimport { map, shareReplay, withLatestFrom } from 'rxjs';\nimport { MatButtonToggleChange } from '@angular/material/button-toggle';\nimport { DbxCalendarEvent, prepareAndSortCalendarEvents } from './calendar';\n\n@Component({\n selector: 'dbx-calendar',\n templateUrl: './calendar.component.html'\n})\nexport class DbxCalendarComponent<T> implements OnDestroy {\n @Output()\n clickEvent = new EventEmitter<DbxCalendarEvent<T>>();\n\n readonly viewDate$ = this.calendarStore.date$;\n\n readonly events$ = this.calendarStore.visibleEvents$.pipe(map(prepareAndSortCalendarEvents), shareReplay(1));\n\n readonly activeDayIsOpen$ = this.calendarStore.eventsForDateState$.pipe(\n withLatestFrom(this.calendarStore.date$),\n map(([x, date]) => {\n if (x.events.length && isSameMonth(x.date, date)) {\n return !x.dateTappedTwice;\n }\n\n return false;\n })\n );\n\n readonly displayType$ = this.calendarStore.displayType$;\n\n constructor(readonly calendarStore: DbxCalendarStore<T>) {}\n\n ngOnDestroy(): void {\n this.clickEvent.complete();\n }\n\n todayClicked(): void {\n this.dayClicked({ date: new Date() });\n }\n\n nextButtonClicked(): void {\n this.calendarStore.tapNext();\n }\n\n previousButtonClicked(): void {\n this.calendarStore.tapPrevious();\n }\n\n dayClicked({ date }: { date: Date }): void {\n this.calendarStore.tapDay(date);\n }\n\n eventClicked(action: string, event: CalendarEvent<T>): void {\n this.clickEvent.emit({ action, event });\n }\n\n typeToggleChanged(event: MatButtonToggleChange): void {\n this.calendarStore.setDisplayType(event.value);\n }\n}\n","<dbx-calendar-base>\n <ng-container controls>\n <mat-button-toggle-group name=\"calendarDisplayStyle\" [value]=\"(displayType$ | async)!\" (change)=\"typeToggleChanged($event)\" aria-label=\"Display Style\">\n <mat-button-toggle value=\"month\">Month</mat-button-toggle>\n <mat-button-toggle value=\"week\">Week</mat-button-toggle>\n <mat-button-toggle value=\"day\">Day</mat-button-toggle>\n </mat-button-toggle-group>\n </ng-container>\n <div class=\"dbx-calendar-content\" [ngClass]=\"'dbx-calendar-content-' + (displayType$ | async)!\" [ngSwitch]=\"displayType$ | async\">\n <mwl-calendar-month-view *ngSwitchCase=\"'month'\" [viewDate]=\"(viewDate$ | async)!\" [events]=\"(events$ | async)!\" [activeDayIsOpen]=\"(activeDayIsOpen$ | async)!\" (dayClicked)=\"dayClicked($event.day)\" (eventClicked)=\"eventClicked('Clicked', $event.event)\"></mwl-calendar-month-view>\n </div>\n</dbx-calendar-base>\n","import { NgModule } from '@angular/core';\nimport { DbxCalendarComponent } from './calendar.component';\nimport { CalendarDayModule, CalendarModule, CalendarWeekModule, DateAdapter } from 'angular-calendar';\nimport { CommonModule } from '@angular/common';\nimport { DbxButtonModule, DbxPopoverInteractionModule } from '@dereekb/dbx-web';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { adapterFactory as dateAdapterFactory } from 'angular-calendar/date-adapters/date-fns';\nimport { MatButtonModule } from '@angular/material/button';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { DbxCalendarBaseComponent } from './calendar.base.component';\n\nconst declarations = [\n //\n DbxCalendarBaseComponent,\n DbxCalendarComponent\n];\n\n@NgModule({\n imports: [\n //\n CommonModule,\n MatIconModule,\n MatButtonModule,\n MatButtonToggleModule,\n DbxButtonModule,\n DbxPopoverInteractionModule,\n CalendarModule,\n CalendarDayModule,\n FlexLayoutModule,\n CalendarWeekModule\n ],\n declarations,\n exports: declarations\n})\nexport class DbxCalendarModule {}\n\n/**\n * Provides default configuration for the DbxCalendarModule\n */\n@NgModule({\n imports: [CalendarModule.forRoot({ provide: DateAdapter, useFactory: dateAdapterFactory })],\n exports: [DbxCalendarModule]\n})\nexport class DbxCalendarRootModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.DbxCalendarStore","i6","i2","i3","i4","i5","i6.DbxCalendarBaseComponent","dateAdapterFactory"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAQA,SAAS,oBAAoB,CAAC,KAAoB,EAAA;;AAChD,IAAA,IAAI,QAAQ,CAAC;IAEb,IAAI,KAAK,CAAC,MAAM,EAAE;QAChB,QAAQ,GAAG,WAAW,CAAC;AACxB,KAAA;AAAM,SAAA;AACL,QAAA,QAAQ,GAAG,6BAA6B,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA,EAAA,GAAA,KAAK,CAAC,GAAG,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,IAAI,IAAI,EAAE,CAAC,CAAC;AAChF,KAAA;AAED,IAAA,OAAO,QAAQ,CAAC;AAClB,CAAC;AAEK,SAAU,4BAA4B,CAAC,MAAuB,EAAA;AAClE,IAAA,OAAO,MAAM;AACV,SAAA,GAAG,CAAC,CAAC,KAAoB,KAAI;AAC5B,QAAA,MAAM,QAAQ,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;AAC7C,QAAA,IAAI,KAAK,CAAC;QAEV,IAAI,KAAK,CAAC,MAAM,EAAE;YAChB,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