@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,311 @@
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 { ComponentStore } from '@ngrx/component-store';
5
+ import { distinctUntilChanged, switchMap, first, tap, map, shareReplay, withLatestFrom } from 'rxjs';
6
+ import { formatToTimeAndDurationString, sortDateRangeStartAscendingCompareFunction } from '@dereekb/date';
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
+ var CalendarDisplayType;
25
+ (function (CalendarDisplayType) {
26
+ CalendarDisplayType["MONTH"] = "month";
27
+ CalendarDisplayType["WEEK"] = "week";
28
+ CalendarDisplayType["DAY"] = "day";
29
+ })(CalendarDisplayType || (CalendarDisplayType = {}));
30
+ function visibleDateRangeForCalendarState(calendarState) {
31
+ const { type, date } = calendarState;
32
+ let start;
33
+ let end;
34
+ let distance;
35
+ switch (type) {
36
+ case CalendarDisplayType.MONTH:
37
+ start = startOfDay(startOfWeek(startOfMonth(date), { weekStartsOn: 0 }));
38
+ end = endOfWeek(endOfMonth(date));
39
+ distance = differenceInDays(end, start) + 1;
40
+ break;
41
+ case CalendarDisplayType.WEEK:
42
+ start = startOfWeek(date);
43
+ end = endOfWeek(start);
44
+ distance = 7; // 7 days in a week.
45
+ break;
46
+ case CalendarDisplayType.DAY:
47
+ start = startOfDay(date);
48
+ end = endOfDay(date);
49
+ distance = 1;
50
+ break;
51
+ }
52
+ // console.log('Date range: ', start, end, distance);
53
+ return {
54
+ type,
55
+ start,
56
+ end,
57
+ distance
58
+ };
59
+ }
60
+ const distinctUntilDateOrTypeOrEventsChanged = distinctUntilChanged((a, b) => a?.date === b?.date && a?.type === b?.type && a?.events === b?.events);
61
+ class DbxCalendarStore extends ComponentStore {
62
+ constructor() {
63
+ super({
64
+ type: CalendarDisplayType.MONTH,
65
+ date: new Date(),
66
+ dateTappedTwice: false,
67
+ events: []
68
+ });
69
+ // MARK: Effects
70
+ this.tapNext = this.effect((input) => {
71
+ return input.pipe(switchMap(() => this.visibleDateRange$.pipe(first(), tap(({ end }) => {
72
+ this.tapDay(addDays(end, 1));
73
+ }))));
74
+ });
75
+ this.tapPrevious = this.effect((input) => {
76
+ return input.pipe(switchMap(() => this.visibleDateRange$.pipe(first(), tap(({ start }) => {
77
+ this.tapDay(addDays(start, -1));
78
+ }))));
79
+ });
80
+ // MARK: Accessors
81
+ this.date$ = this.state$.pipe(map((x) => x.date));
82
+ this.dateTappedTwice$ = this.state$.pipe(map((x) => x.dateTappedTwice));
83
+ this.events$ = this.state$.pipe(map((x) => x.events));
84
+ // TODO: Filter to be events that will only be displayed based on the current calendar.
85
+ this.visibleEvents$ = this.state$.pipe(map((x) => x.events), shareReplay(1));
86
+ this.eventsForDateState$ = this.state$.pipe(distinctUntilDateOrTypeOrEventsChanged, map((state) => ({
87
+ date: state.date,
88
+ events: state.events.filter((x) => isSameDay(x.start, state.date) || (x.end && isBefore(x.start, state.date) && isAfter(x.end, state.date))),
89
+ dateTappedTwice: state.dateTappedTwice
90
+ })), shareReplay(1));
91
+ this.eventsForDate$ = this.eventsForDateState$.pipe(map((state) => state.events));
92
+ this.visibleDateRange$ = this.state$.pipe(
93
+ // If the date or type changes, check again.
94
+ distinctUntilChanged((a, b) => a?.date === b?.date && a?.type === b?.type), map(visibleDateRangeForCalendarState), distinctUntilChanged((a, b) => {
95
+ if (a.type === b.type) {
96
+ return isSameDay(a.start, b.start);
97
+ }
98
+ else {
99
+ return false; // Type changed, date range changed.
100
+ }
101
+ }), shareReplay(1));
102
+ this.displayType$ = this.state$.pipe(map((x) => x.type), distinctUntilChanged((a, b) => a === b), shareReplay(1));
103
+ // MARK: State Changes
104
+ /**
105
+ * Tap a day.
106
+ *
107
+ * - If the same day is presented, dateTappedTwice is flipped.
108
+ */
109
+ this.tapDay = this.updater((state, date) => ({ ...state, date, dateTappedTwice: isSameDay(date, state.date) ? !state.dateTappedTwice : false }));
110
+ /**
111
+ * Set all events on the calendar.
112
+ */
113
+ this.setEvents = this.updater((state, events) => ({ ...state, events }));
114
+ /**
115
+ * Set all events on the calendar.
116
+ */
117
+ this.setDisplayType = this.updater((state, type) => ({ ...state, type }));
118
+ }
119
+ }
120
+ DbxCalendarStore.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
121
+ DbxCalendarStore.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarStore });
122
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarStore, decorators: [{
123
+ type: Injectable
124
+ }], ctorParameters: function () { return []; } });
125
+
126
+ function timeSubtitleForEvent(event) {
127
+ let subtitle;
128
+ if (event.allDay) {
129
+ subtitle = `(All Day)`;
130
+ }
131
+ else {
132
+ subtitle = formatToTimeAndDurationString(event.start, event.end ?? new Date());
133
+ }
134
+ return subtitle;
135
+ }
136
+ function prepareAndSortCalendarEvents(events) {
137
+ return events
138
+ .map((event) => {
139
+ const subtitle = timeSubtitleForEvent(event);
140
+ let title;
141
+ if (event.allDay) {
142
+ title = event.title + ' ' + subtitle;
143
+ }
144
+ else {
145
+ title = `${event.title} - ${subtitle}`;
146
+ }
147
+ return {
148
+ ...event,
149
+ title
150
+ };
151
+ })
152
+ .sort(sortDateRangeStartAscendingCompareFunction);
153
+ }
154
+
155
+ class DbxCalendarBaseComponent {
156
+ constructor(calendarStore) {
157
+ this.calendarStore = calendarStore;
158
+ this.viewDate$ = this.calendarStore.date$;
159
+ this.activeDayIsOpen$ = this.calendarStore.eventsForDateState$.pipe(withLatestFrom(this.calendarStore.date$), map(([x, date]) => {
160
+ if (x.events.length && isSameMonth(x.date, date)) {
161
+ return !x.dateTappedTwice;
162
+ }
163
+ return false;
164
+ }));
165
+ this.displayType$ = this.calendarStore.displayType$;
166
+ }
167
+ todayClicked() {
168
+ this.calendarStore.tapDay(new Date());
169
+ }
170
+ nextButtonClicked() {
171
+ this.calendarStore.tapNext();
172
+ }
173
+ previousButtonClicked() {
174
+ this.calendarStore.tapPrevious();
175
+ }
176
+ typeToggleChanged(event) {
177
+ this.calendarStore.setDisplayType(event.value);
178
+ }
179
+ }
180
+ DbxCalendarBaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarBaseComponent, deps: [{ token: DbxCalendarStore }], target: i0.ɵɵFactoryTarget.Component });
181
+ 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" }] });
182
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarBaseComponent, decorators: [{
183
+ type: Component,
184
+ 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" }]
185
+ }], ctorParameters: function () { return [{ type: DbxCalendarStore }]; } });
186
+
187
+ class DbxCalendarComponent {
188
+ constructor(calendarStore) {
189
+ this.calendarStore = calendarStore;
190
+ this.clickEvent = new EventEmitter();
191
+ this.viewDate$ = this.calendarStore.date$;
192
+ this.events$ = this.calendarStore.visibleEvents$.pipe(map(prepareAndSortCalendarEvents), shareReplay(1));
193
+ this.activeDayIsOpen$ = this.calendarStore.eventsForDateState$.pipe(withLatestFrom(this.calendarStore.date$), map(([x, date]) => {
194
+ if (x.events.length && isSameMonth(x.date, date)) {
195
+ return !x.dateTappedTwice;
196
+ }
197
+ return false;
198
+ }));
199
+ this.displayType$ = this.calendarStore.displayType$;
200
+ }
201
+ ngOnDestroy() {
202
+ this.clickEvent.complete();
203
+ }
204
+ todayClicked() {
205
+ this.dayClicked({ date: new Date() });
206
+ }
207
+ nextButtonClicked() {
208
+ this.calendarStore.tapNext();
209
+ }
210
+ previousButtonClicked() {
211
+ this.calendarStore.tapPrevious();
212
+ }
213
+ dayClicked({ date }) {
214
+ this.calendarStore.tapDay(date);
215
+ }
216
+ eventClicked(action, event) {
217
+ this.clickEvent.emit({ action, event });
218
+ }
219
+ typeToggleChanged(event) {
220
+ this.calendarStore.setDisplayType(event.value);
221
+ }
222
+ }
223
+ DbxCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarComponent, deps: [{ token: DbxCalendarStore }], target: i0.ɵɵFactoryTarget.Component });
224
+ 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" }] });
225
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarComponent, decorators: [{
226
+ type: Component,
227
+ 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" }]
228
+ }], ctorParameters: function () { return [{ type: DbxCalendarStore }]; }, propDecorators: { clickEvent: [{
229
+ type: Output
230
+ }] } });
231
+
232
+ const declarations = [
233
+ //
234
+ DbxCalendarBaseComponent,
235
+ DbxCalendarComponent
236
+ ];
237
+ class DbxCalendarModule {
238
+ }
239
+ DbxCalendarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
240
+ DbxCalendarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarModule, declarations: [
241
+ //
242
+ DbxCalendarBaseComponent,
243
+ DbxCalendarComponent], imports: [
244
+ //
245
+ CommonModule,
246
+ MatIconModule,
247
+ MatButtonModule,
248
+ MatButtonToggleModule,
249
+ DbxButtonModule,
250
+ DbxPopoverInteractionModule,
251
+ CalendarModule,
252
+ CalendarDayModule,
253
+ FlexLayoutModule,
254
+ CalendarWeekModule], exports: [
255
+ //
256
+ DbxCalendarBaseComponent,
257
+ DbxCalendarComponent] });
258
+ DbxCalendarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarModule, imports: [
259
+ //
260
+ CommonModule,
261
+ MatIconModule,
262
+ MatButtonModule,
263
+ MatButtonToggleModule,
264
+ DbxButtonModule,
265
+ DbxPopoverInteractionModule,
266
+ CalendarModule,
267
+ CalendarDayModule,
268
+ FlexLayoutModule,
269
+ CalendarWeekModule] });
270
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarModule, decorators: [{
271
+ type: NgModule,
272
+ args: [{
273
+ imports: [
274
+ //
275
+ CommonModule,
276
+ MatIconModule,
277
+ MatButtonModule,
278
+ MatButtonToggleModule,
279
+ DbxButtonModule,
280
+ DbxPopoverInteractionModule,
281
+ CalendarModule,
282
+ CalendarDayModule,
283
+ FlexLayoutModule,
284
+ CalendarWeekModule
285
+ ],
286
+ declarations,
287
+ exports: declarations
288
+ }]
289
+ }] });
290
+ /**
291
+ * Provides default configuration for the DbxCalendarModule
292
+ */
293
+ class DbxCalendarRootModule {
294
+ }
295
+ DbxCalendarRootModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarRootModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
296
+ DbxCalendarRootModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarRootModule, imports: [i7.CalendarModule], exports: [DbxCalendarModule] });
297
+ DbxCalendarRootModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarRootModule, imports: [CalendarModule.forRoot({ provide: DateAdapter, useFactory: adapterFactory }), DbxCalendarModule] });
298
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarRootModule, decorators: [{
299
+ type: NgModule,
300
+ args: [{
301
+ imports: [CalendarModule.forRoot({ provide: DateAdapter, useFactory: adapterFactory })],
302
+ exports: [DbxCalendarModule]
303
+ }]
304
+ }] });
305
+
306
+ /**
307
+ * Generated bundle index. Do not edit.
308
+ */
309
+
310
+ export { CalendarDisplayType, DbxCalendarBaseComponent, DbxCalendarComponent, DbxCalendarModule, DbxCalendarRootModule, DbxCalendarStore, prepareAndSortCalendarEvents, visibleDateRangeForCalendarState };
311
+ //# 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.store.ts","../../../../../packages/dbx-web/calendar/src/lib/calendar.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 { 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 { 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 { 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":";;;;;;;;;;;;;;;;;;;;;;;IAMY,oBAIX;AAJD,CAAA,UAAY,mBAAmB,EAAA;AAC7B,IAAA,mBAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACf,IAAA,mBAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACb,IAAA,mBAAA,CAAA,KAAA,CAAA,GAAA,KAAW,CAAA;AACb,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,GAI9B,EAAA,CAAA,CAAA,CAAA;AA4BK,SAAU,gCAAgC,CAAC,aAA4B,EAAA;AAC3E,IAAA,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,aAAa,CAAC;AACrC,IAAA,IAAI,KAAW,CAAC;AAChB,IAAA,IAAI,GAAS,CAAC;AACd,IAAA,IAAI,QAAgB,CAAC;AAErB,IAAA,QAAQ,IAAI;QACV,KAAK,mBAAmB,CAAC,KAAK;AAC5B,YAAA,KAAK,GAAG,UAAU,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;YACzE,GAAG,GAAG,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;YAClC,QAAQ,GAAG,gBAAgB,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;YAC5C,MAAM;QACR,KAAK,mBAAmB,CAAC,IAAI;AAC3B,YAAA,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;AAC1B,YAAA,GAAG,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;AAC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AA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAHtB,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAEK,cAAkB,EAAE,CAAC,EAN/E,iBAAiB,CAAA,EAAA,CAAA,CAAA;4FASjB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAJjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,EAAEA,cAAkB,EAAE,CAAC,CAAC;oBAC3F,OAAO,EAAE,CAAC,iBAAiB,CAAC;AAC7B,iBAAA,CAAA;;;AC3CD;;AAEG;;;;"}
@@ -0,0 +1 @@
1
+ export * from './lib';
@@ -0,0 +1,16 @@
1
+ import { DbxCalendarStore } from './calendar.store';
2
+ import { MatButtonToggleChange } from '@angular/material/button-toggle';
3
+ import * as i0 from "@angular/core";
4
+ export declare class DbxCalendarBaseComponent<T> {
5
+ readonly calendarStore: DbxCalendarStore<T>;
6
+ readonly viewDate$: import("rxjs").Observable<Date>;
7
+ readonly activeDayIsOpen$: import("rxjs").Observable<boolean>;
8
+ readonly displayType$: import("rxjs").Observable<import("./calendar.store").CalendarDisplayType>;
9
+ constructor(calendarStore: DbxCalendarStore<T>);
10
+ todayClicked(): void;
11
+ nextButtonClicked(): void;
12
+ previousButtonClicked(): void;
13
+ typeToggleChanged(event: MatButtonToggleChange): void;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxCalendarBaseComponent<any>, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<DbxCalendarBaseComponent<any>, "dbx-calendar-base", never, {}, {}, never, ["[controls]", "*"], false>;
16
+ }
@@ -1,35 +1,18 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { EventEmitter, OnDestroy } from '@angular/core';
2
2
  import { CalendarEvent } from 'angular-calendar';
3
3
  import { DbxCalendarStore } from './calendar.store';
4
4
  import { MatButtonToggleChange } from '@angular/material/button-toggle';
5
+ import { DbxCalendarEvent } from './calendar';
5
6
  import * as i0 from "@angular/core";
6
- export interface DbxCalendarEvent<T> {
7
- event: CalendarEvent<T>;
8
- action?: string;
9
- }
10
- export declare class DbxCalendarComponent<T> {
7
+ export declare class DbxCalendarComponent<T> implements OnDestroy {
11
8
  readonly calendarStore: DbxCalendarStore<T>;
12
9
  clickEvent: EventEmitter<DbxCalendarEvent<T>>;
13
10
  readonly viewDate$: import("rxjs").Observable<Date>;
14
- readonly events$: import("rxjs").Observable<{
15
- title: string;
16
- id?: string | number | undefined;
17
- start: Date;
18
- end?: Date | undefined;
19
- color?: import("calendar-utils").EventColor | undefined;
20
- actions?: import("calendar-utils").EventAction[] | undefined;
21
- allDay?: boolean | undefined;
22
- cssClass?: string | undefined;
23
- resizable?: {
24
- beforeStart?: boolean | undefined;
25
- afterEnd?: boolean | undefined;
26
- } | undefined;
27
- draggable?: boolean | undefined;
28
- meta?: any;
29
- }[]>;
11
+ readonly events$: import("rxjs").Observable<CalendarEvent<any>[]>;
30
12
  readonly activeDayIsOpen$: import("rxjs").Observable<boolean>;
31
13
  readonly displayType$: import("rxjs").Observable<import("./calendar.store").CalendarDisplayType>;
32
14
  constructor(calendarStore: DbxCalendarStore<T>);
15
+ ngOnDestroy(): void;
33
16
  todayClicked(): void;
34
17
  nextButtonClicked(): void;
35
18
  previousButtonClicked(): void;
@@ -0,0 +1,6 @@
1
+ import { CalendarEvent } from 'angular-calendar';
2
+ export interface DbxCalendarEvent<T> {
3
+ event: CalendarEvent<T>;
4
+ action?: string;
5
+ }
6
+ export declare function prepareAndSortCalendarEvents(events: CalendarEvent[]): CalendarEvent[];
@@ -0,0 +1,23 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./calendar.base.component";
3
+ import * as i2 from "./calendar.component";
4
+ import * as i3 from "@angular/common";
5
+ import * as i4 from "@angular/material/icon";
6
+ import * as i5 from "@angular/material/button";
7
+ import * as i6 from "@angular/material/button-toggle";
8
+ import * as i7 from "@dereekb/dbx-web";
9
+ import * as i8 from "angular-calendar";
10
+ import * as i9 from "@angular/flex-layout";
11
+ export declare class DbxCalendarModule {
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxCalendarModule, never>;
13
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxCalendarModule, [typeof i1.DbxCalendarBaseComponent, typeof i2.DbxCalendarComponent], [typeof i3.CommonModule, typeof i4.MatIconModule, typeof i5.MatButtonModule, typeof i6.MatButtonToggleModule, typeof i7.DbxButtonModule, typeof i7.DbxPopoverInteractionModule, typeof i8.CalendarModule, typeof i8.CalendarDayModule, typeof i9.FlexLayoutModule, typeof i8.CalendarWeekModule], [typeof i1.DbxCalendarBaseComponent, typeof i2.DbxCalendarComponent]>;
14
+ static ɵinj: i0.ɵɵInjectorDeclaration<DbxCalendarModule>;
15
+ }
16
+ /**
17
+ * Provides default configuration for the DbxCalendarModule
18
+ */
19
+ export declare class DbxCalendarRootModule {
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxCalendarRootModule, never>;
21
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxCalendarRootModule, never, [typeof i8.CalendarModule], [typeof DbxCalendarModule]>;
22
+ static ɵinj: i0.ɵɵInjectorDeclaration<DbxCalendarRootModule>;
23
+ }
@@ -1,3 +1,5 @@
1
1
  export * from './calendar.module';
2
2
  export * from './calendar.component';
3
+ export * from './calendar.base.component';
3
4
  export * from './calendar.store';
5
+ export * from './calendar';
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@dereekb/dbx-web/calendar",
3
+ "version": "9.18.1",
4
+ "peerDependencies": {
5
+ "@angular/common": "^14.2.0",
6
+ "@angular/core": "^14.2.0",
7
+ "date-fns": "^2.29.0",
8
+ "rxjs": "^7.5.0",
9
+ "@angular/material": "^14.2.0",
10
+ "angular-calendar": "^0.30.1",
11
+ "@dereekb/dbx-web": "9.18.1"
12
+ },
13
+ "dependencies": {
14
+ "tslib": "^2.3.0"
15
+ },
16
+ "module": "fesm2015/dereekb-dbx-web-calendar.mjs",
17
+ "es2020": "fesm2020/dereekb-dbx-web-calendar.mjs",
18
+ "esm2020": "esm2020/dereekb-dbx-web-calendar.mjs",
19
+ "fesm2020": "fesm2020/dereekb-dbx-web-calendar.mjs",
20
+ "fesm2015": "fesm2015/dereekb-dbx-web-calendar.mjs",
21
+ "typings": "index.d.ts",
22
+ "exports": {
23
+ "./package.json": {
24
+ "default": "./package.json"
25
+ },
26
+ ".": {
27
+ "types": "./index.d.ts",
28
+ "esm2020": "./esm2020/dereekb-dbx-web-calendar.mjs",
29
+ "es2020": "./fesm2020/dereekb-dbx-web-calendar.mjs",
30
+ "es2015": "./fesm2015/dereekb-dbx-web-calendar.mjs",
31
+ "node": "./fesm2015/dereekb-dbx-web-calendar.mjs",
32
+ "default": "./fesm2020/dereekb-dbx-web-calendar.mjs"
33
+ }
34
+ },
35
+ "sideEffects": false
36
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVyZWVrYi1kYngtd2ViLWNhbGVuZGFyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvZGJ4LXdlYi9jYWxlbmRhci9zcmMvZGVyZWVrYi1kYngtd2ViLWNhbGVuZGFyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
@@ -0,0 +1,2 @@
1
+ export * from './lib';
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9kYngtd2ViL2NhbGVuZGFyL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLE9BQU8sQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vbGliJztcbiJdfQ==
@@ -0,0 +1,44 @@
1
+ import { Component } from '@angular/core';
2
+ import { isSameMonth } from 'date-fns';
3
+ import { DbxCalendarStore } from './calendar.store';
4
+ import { map, withLatestFrom } from 'rxjs';
5
+ import * as i0 from "@angular/core";
6
+ import * as i1 from "./calendar.store";
7
+ import * as i2 from "@angular/material/icon";
8
+ import * as i3 from "@angular/material/button";
9
+ import * as i4 from "@dereekb/dbx-web";
10
+ import * as i5 from "@angular/flex-layout/flex";
11
+ import * as i6 from "@angular/common";
12
+ import * as i7 from "angular-calendar";
13
+ export class DbxCalendarBaseComponent {
14
+ constructor(calendarStore) {
15
+ this.calendarStore = calendarStore;
16
+ this.viewDate$ = this.calendarStore.date$;
17
+ this.activeDayIsOpen$ = this.calendarStore.eventsForDateState$.pipe(withLatestFrom(this.calendarStore.date$), map(([x, date]) => {
18
+ if (x.events.length && isSameMonth(x.date, date)) {
19
+ return !x.dateTappedTwice;
20
+ }
21
+ return false;
22
+ }));
23
+ this.displayType$ = this.calendarStore.displayType$;
24
+ }
25
+ todayClicked() {
26
+ this.calendarStore.tapDay(new Date());
27
+ }
28
+ nextButtonClicked() {
29
+ this.calendarStore.tapNext();
30
+ }
31
+ previousButtonClicked() {
32
+ this.calendarStore.tapPrevious();
33
+ }
34
+ typeToggleChanged(event) {
35
+ this.calendarStore.setDisplayType(event.value);
36
+ }
37
+ }
38
+ DbxCalendarBaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarBaseComponent, deps: [{ token: i1.DbxCalendarStore }], target: i0.ɵɵFactoryTarget.Component });
39
+ 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: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i7.ɵCalendarDatePipe, name: "calendarDate" }] });
40
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxCalendarBaseComponent, decorators: [{
41
+ type: Component,
42
+ 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" }]
43
+ }], ctorParameters: function () { return [{ type: i1.DbxCalendarStore }]; } });
44
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FsZW5kYXIuYmFzZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9kYngtd2ViL2NhbGVuZGFyL3NyYy9saWIvY2FsZW5kYXIuYmFzZS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9kYngtd2ViL2NhbGVuZGFyL3NyYy9saWIvY2FsZW5kYXIuYmFzZS5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzFDLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxVQUFVLENBQUM7QUFDdkMsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFDcEQsT0FBTyxFQUFFLEdBQUcsRUFBRSxjQUFjLEVBQUUsTUFBTSxNQUFNLENBQUM7Ozs7Ozs7OztBQU8zQyxNQUFNLE9BQU8sd0JBQXdCO0lBZ0JuQyxZQUE0QixhQUFr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