@dereekb/dbx-web 10.2.0 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (454) hide show
  1. package/calendar/esm2022/lib/calendar.base.component.mjs +27 -30
  2. package/calendar/esm2022/lib/calendar.component.mjs +21 -24
  3. package/calendar/esm2022/lib/calendar.module.mjs +9 -9
  4. package/calendar/esm2022/lib/calendar.store.mjs +89 -89
  5. package/calendar/fesm2022/dereekb-dbx-web-calendar.mjs +137 -141
  6. package/calendar/fesm2022/dereekb-dbx-web-calendar.mjs.map +1 -1
  7. package/calendar/lib/calendar.base.component.d.ts +0 -1
  8. package/calendar/lib/calendar.component.d.ts +1 -2
  9. package/calendar/package.json +1 -1
  10. package/esm2022/calendar/lib/calendar.base.component.mjs +27 -30
  11. package/esm2022/calendar/lib/calendar.component.mjs +21 -24
  12. package/esm2022/calendar/lib/calendar.module.mjs +9 -9
  13. package/esm2022/calendar/lib/calendar.store.mjs +89 -89
  14. package/esm2022/lib/action/action.confirm.directive.mjs +8 -15
  15. package/esm2022/lib/action/action.module.mjs +4 -4
  16. package/esm2022/lib/action/key.trigger.directive.mjs +7 -11
  17. package/esm2022/lib/action/snackbar/action.snackbar.component.mjs +40 -48
  18. package/esm2022/lib/action/snackbar/action.snackbar.directive.mjs +10 -14
  19. package/esm2022/lib/action/snackbar/action.snackbar.module.mjs +4 -4
  20. package/esm2022/lib/action/snackbar/action.snackbar.service.mjs +14 -21
  21. package/esm2022/lib/action/transition/action.transition.module.mjs +4 -4
  22. package/esm2022/lib/action/transition/transition.safety.dialog.component.mjs +11 -14
  23. package/esm2022/lib/action/transition/transition.safety.directive.mjs +15 -20
  24. package/esm2022/lib/button/button.component.mjs +10 -9
  25. package/esm2022/lib/button/button.module.mjs +4 -4
  26. package/esm2022/lib/button/button.spacer.component.mjs +3 -3
  27. package/esm2022/lib/button/icon/icon.button.component.mjs +4 -4
  28. package/esm2022/lib/button/icon/icon.button.module.mjs +6 -6
  29. package/esm2022/lib/button/progress/bar.button.component.mjs +4 -7
  30. package/esm2022/lib/button/progress/base.progress.button.directive.mjs +45 -53
  31. package/esm2022/lib/button/progress/button.progress.module.mjs +4 -4
  32. package/esm2022/lib/button/progress/spinner.button.component.mjs +15 -17
  33. package/esm2022/lib/dbx-web.module.mjs +4 -4
  34. package/esm2022/lib/error/default.error.widget.component.mjs +4 -4
  35. package/esm2022/lib/error/error.action.directive.mjs +7 -14
  36. package/esm2022/lib/error/error.component.mjs +57 -62
  37. package/esm2022/lib/error/error.details.component.mjs +5 -4
  38. package/esm2022/lib/error/error.loading.directive.mjs +6 -12
  39. package/esm2022/lib/error/error.module.mjs +5 -5
  40. package/esm2022/lib/error/error.popover.component.mjs +4 -4
  41. package/esm2022/lib/error/error.snackbar.action.directive.mjs +8 -12
  42. package/esm2022/lib/error/error.snackbar.component.mjs +16 -22
  43. package/esm2022/lib/error/error.snackbar.service.mjs +12 -15
  44. package/esm2022/lib/error/error.view.component.mjs +12 -7
  45. package/esm2022/lib/error/error.widget.component.mjs +33 -36
  46. package/esm2022/lib/error/error.widget.directive.mjs +6 -11
  47. package/esm2022/lib/error/error.widget.service.mjs +4 -4
  48. package/esm2022/lib/extension/download/text/download.text.component.mjs +79 -82
  49. package/esm2022/lib/extension/download/text/download.text.module.mjs +6 -6
  50. package/esm2022/lib/extension/model/model.module.mjs +11 -11
  51. package/esm2022/lib/extension/model/model.state.service.mjs +6 -9
  52. package/esm2022/lib/extension/model/model.tracker.service.mjs +11 -13
  53. package/esm2022/lib/extension/model/model.tracker.view.storage.mjs +13 -13
  54. package/esm2022/lib/extension/model/model.types.service.mjs +34 -36
  55. package/esm2022/lib/extension/model/state/effects/tracker.effects.mjs +13 -17
  56. package/esm2022/lib/extension/structure/structure.body.directive.mjs +4 -4
  57. package/esm2022/lib/extension/structure/structure.module.mjs +6 -6
  58. package/esm2022/lib/extension/structure/structure.structure.directive.mjs +8 -10
  59. package/esm2022/lib/extension/widget/widget.component.mjs +22 -25
  60. package/esm2022/lib/extension/widget/widget.directive.mjs +6 -11
  61. package/esm2022/lib/extension/widget/widget.list.component.mjs +17 -20
  62. package/esm2022/lib/extension/widget/widget.module.mjs +6 -6
  63. package/esm2022/lib/extension/widget/widget.service.mjs +4 -6
  64. package/esm2022/lib/interaction/dialog/abstract.dialog.directive.mjs +8 -21
  65. package/esm2022/lib/interaction/dialog/dialog.action.directive.mjs +11 -10
  66. package/esm2022/lib/interaction/dialog/dialog.content.close.component.mjs +6 -8
  67. package/esm2022/lib/interaction/dialog/dialog.content.component.mjs +4 -6
  68. package/esm2022/lib/interaction/dialog/dialog.content.footer.component.mjs +7 -9
  69. package/esm2022/lib/interaction/dialog/dialog.module.mjs +4 -4
  70. package/esm2022/lib/interaction/filter/filter.module.mjs +6 -6
  71. package/esm2022/lib/interaction/filter/filter.partial.list.component.mjs +4 -4
  72. package/esm2022/lib/interaction/filter/filter.partial.menu.component.mjs +6 -9
  73. package/esm2022/lib/interaction/filter/filter.partial.mjs +24 -27
  74. package/esm2022/lib/interaction/filter/filter.popover.button.component.mjs +7 -8
  75. package/esm2022/lib/interaction/filter/filter.popover.button.directive.mjs +7 -10
  76. package/esm2022/lib/interaction/filter/filter.popover.component.mjs +52 -57
  77. package/esm2022/lib/interaction/filter/filter.preset.directive.mjs +90 -0
  78. package/esm2022/lib/interaction/filter/filter.preset.list.component.mjs +6 -6
  79. package/esm2022/lib/interaction/filter/filter.preset.menu.component.mjs +8 -11
  80. package/esm2022/lib/interaction/filter/filter.wrapper.component.mjs +15 -15
  81. package/esm2022/lib/interaction/interaction.module.mjs +4 -4
  82. package/esm2022/lib/interaction/popover/abstract.popover.directive.mjs +6 -9
  83. package/esm2022/lib/interaction/popover/abstract.popover.ref.directive.mjs +8 -10
  84. package/esm2022/lib/interaction/popover/popover.action.directive.mjs +11 -10
  85. package/esm2022/lib/interaction/popover/popover.close.component.mjs +9 -12
  86. package/esm2022/lib/interaction/popover/popover.component.mjs +27 -27
  87. package/esm2022/lib/interaction/popover/popover.content.component.mjs +8 -10
  88. package/esm2022/lib/interaction/popover/popover.content.module.mjs +4 -4
  89. package/esm2022/lib/interaction/popover/popover.controls.directive.mjs +9 -11
  90. package/esm2022/lib/interaction/popover/popover.coordinator.component.mjs +14 -17
  91. package/esm2022/lib/interaction/popover/popover.coordinator.service.mjs +5 -7
  92. package/esm2022/lib/interaction/popover/popover.header.component.mjs +15 -15
  93. package/esm2022/lib/interaction/popover/popover.module.mjs +4 -4
  94. package/esm2022/lib/interaction/popover/popover.scroll.content.component.mjs +7 -10
  95. package/esm2022/lib/interaction/popover/popover.service.mjs +8 -11
  96. package/esm2022/lib/interaction/popup/abstract.popup.directive.mjs +6 -9
  97. package/esm2022/lib/interaction/popup/popup.component.mjs +25 -24
  98. package/esm2022/lib/interaction/popup/popup.content.component.mjs +9 -12
  99. package/esm2022/lib/interaction/popup/popup.controls.buttons.component.mjs +17 -20
  100. package/esm2022/lib/interaction/popup/popup.controls.component.mjs +5 -4
  101. package/esm2022/lib/interaction/popup/popup.coordinator.component.mjs +13 -17
  102. package/esm2022/lib/interaction/popup/popup.coordinator.service.mjs +5 -7
  103. package/esm2022/lib/interaction/popup/popup.module.mjs +4 -4
  104. package/esm2022/lib/interaction/popup/popup.position.strategy.mjs +3 -2
  105. package/esm2022/lib/interaction/popup/popup.service.mjs +8 -11
  106. package/esm2022/lib/interaction/prompt/prompt.box.component.mjs +5 -7
  107. package/esm2022/lib/interaction/prompt/prompt.button.confirm.directive.mjs +12 -20
  108. package/esm2022/lib/interaction/prompt/prompt.component.mjs +6 -4
  109. package/esm2022/lib/interaction/prompt/prompt.confirm.component.mjs +6 -8
  110. package/esm2022/lib/interaction/prompt/prompt.confirm.dialog.component.mjs +4 -4
  111. package/esm2022/lib/interaction/prompt/prompt.confirm.directive.mjs +12 -15
  112. package/esm2022/lib/interaction/prompt/prompt.module.mjs +4 -4
  113. package/esm2022/lib/interaction/prompt/prompt.page.component.mjs +4 -4
  114. package/esm2022/lib/keypress/keydown.listener.directive.mjs +6 -7
  115. package/esm2022/lib/keypress/keypress.module.mjs +4 -4
  116. package/esm2022/lib/layout/bar/bar.directive.mjs +4 -3
  117. package/esm2022/lib/layout/bar/bar.header.component.mjs +7 -4
  118. package/esm2022/lib/layout/bar/bar.layout.module.mjs +4 -4
  119. package/esm2022/lib/layout/bar/pagebar.component.mjs +4 -3
  120. package/esm2022/lib/layout/block/block.layout.module.mjs +4 -4
  121. package/esm2022/lib/layout/block/two.block.component.mjs +9 -10
  122. package/esm2022/lib/layout/card/card.box.component.mjs +6 -4
  123. package/esm2022/lib/layout/card/card.box.container.component.mjs +4 -4
  124. package/esm2022/lib/layout/card/card.box.layout.module.mjs +4 -4
  125. package/esm2022/lib/layout/column/column.layout.module.mjs +4 -4
  126. package/esm2022/lib/layout/column/one/one.column.component.mjs +10 -14
  127. package/esm2022/lib/layout/column/one/one.column.module.mjs +4 -4
  128. package/esm2022/lib/layout/column/two/two.column.back.directive.mjs +7 -11
  129. package/esm2022/lib/layout/column/two/two.column.component.mjs +17 -21
  130. package/esm2022/lib/layout/column/two/two.column.context.directive.mjs +7 -10
  131. package/esm2022/lib/layout/column/two/two.column.full.left.directive.mjs +7 -10
  132. package/esm2022/lib/layout/column/two/two.column.head.component.mjs +6 -4
  133. package/esm2022/lib/layout/column/two/two.column.module.mjs +4 -4
  134. package/esm2022/lib/layout/column/two/two.column.right.component.mjs +15 -19
  135. package/esm2022/lib/layout/column/two/two.column.sref.directive.mjs +6 -9
  136. package/esm2022/lib/layout/column/two/two.column.sref.showright.directive.mjs +10 -15
  137. package/esm2022/lib/layout/column/two/two.column.store.mjs +81 -81
  138. package/esm2022/lib/layout/compact/compact.directive.mjs +7 -10
  139. package/esm2022/lib/layout/compact/compact.layout.module.mjs +4 -4
  140. package/esm2022/lib/layout/compact/compact.store.mjs +6 -6
  141. package/esm2022/lib/layout/content/content.border.directive.mjs +4 -6
  142. package/esm2022/lib/layout/content/content.box.directive.mjs +5 -7
  143. package/esm2022/lib/layout/content/content.container.directive.mjs +6 -8
  144. package/esm2022/lib/layout/content/content.directive.mjs +3 -3
  145. package/esm2022/lib/layout/content/content.elevate.directive.mjs +4 -6
  146. package/esm2022/lib/layout/content/content.layout.module.mjs +5 -5
  147. package/esm2022/lib/layout/content/content.page.directive.mjs +3 -3
  148. package/esm2022/lib/layout/content/content.pit.directive.mjs +4 -3
  149. package/esm2022/lib/layout/flag/flag.component.mjs +5 -7
  150. package/esm2022/lib/layout/flag/flag.layout.module.mjs +4 -4
  151. package/esm2022/lib/layout/flag/flag.prompt.component.mjs +6 -7
  152. package/esm2022/lib/layout/flex/flex.group.directive.mjs +14 -15
  153. package/esm2022/lib/layout/flex/flex.layout.module.mjs +4 -4
  154. package/esm2022/lib/layout/flex/flex.size.directive.mjs +4 -6
  155. package/esm2022/lib/layout/item/item.icon.component.mjs +6 -4
  156. package/esm2022/lib/layout/item/item.layout.module.mjs +4 -4
  157. package/esm2022/lib/layout/layout.module.mjs +4 -4
  158. package/esm2022/lib/layout/list/list.component.mjs +102 -103
  159. package/esm2022/lib/layout/list/list.content.empty.component.mjs +4 -4
  160. package/esm2022/lib/layout/list/list.directive.mjs +14 -15
  161. package/esm2022/lib/layout/list/list.grid.view.component.mjs +27 -39
  162. package/esm2022/lib/layout/list/list.grid.view.directive.mjs +3 -3
  163. package/esm2022/lib/layout/list/list.layout.module.mjs +5 -5
  164. package/esm2022/lib/layout/list/list.view.directive.mjs +11 -12
  165. package/esm2022/lib/layout/list/list.view.meta.icon.component.mjs +9 -19
  166. package/esm2022/lib/layout/list/list.view.selection.directive.mjs +4 -7
  167. package/esm2022/lib/layout/list/list.view.value.component.mjs +36 -43
  168. package/esm2022/lib/layout/list/list.view.value.directive.mjs +11 -17
  169. package/esm2022/lib/layout/list/list.view.value.group.title.directive.mjs +57 -59
  170. package/esm2022/lib/layout/list/list.view.value.item.directive.mjs +6 -11
  171. package/esm2022/lib/layout/list/list.view.value.modifier.directive.mjs +15 -19
  172. package/esm2022/lib/layout/list/list.view.value.modifier.ripple.directive.mjs +14 -17
  173. package/esm2022/lib/layout/list/list.view.value.modifier.selection.directive.mjs +13 -16
  174. package/esm2022/lib/layout/list/list.view.value.selection.component.mjs +20 -29
  175. package/esm2022/lib/layout/list/list.wrapper.mjs +3 -1
  176. package/esm2022/lib/layout/section/section.component.mjs +5 -8
  177. package/esm2022/lib/layout/section/section.header.component.mjs +12 -7
  178. package/esm2022/lib/layout/section/section.intro.component.mjs +7 -8
  179. package/esm2022/lib/layout/section/section.layout.module.mjs +4 -4
  180. package/esm2022/lib/layout/section/section.page.component.mjs +6 -9
  181. package/esm2022/lib/layout/section/subsection.component.mjs +4 -4
  182. package/esm2022/lib/layout/step/step.component.mjs +7 -3
  183. package/esm2022/lib/layout/step/step.layout.module.mjs +4 -4
  184. package/esm2022/lib/layout/style/spacer.directive.mjs +3 -3
  185. package/esm2022/lib/layout/style/style.body.directive.mjs +14 -15
  186. package/esm2022/lib/layout/style/style.color.directive.mjs +4 -6
  187. package/esm2022/lib/layout/style/style.directive.mjs +15 -13
  188. package/esm2022/lib/layout/style/style.layout.module.mjs +4 -4
  189. package/esm2022/lib/layout/style/style.service.mjs +18 -26
  190. package/esm2022/lib/layout/style/style.set.directive.mjs +15 -16
  191. package/esm2022/lib/layout/text/address.component.mjs +5 -4
  192. package/esm2022/lib/layout/text/compat/form.description.component.mjs +19 -0
  193. package/esm2022/lib/layout/text/compat/hint.component.mjs +19 -0
  194. package/esm2022/lib/layout/text/compat/index.mjs +10 -0
  195. package/esm2022/lib/layout/text/compat/label.component.mjs +19 -0
  196. package/esm2022/lib/layout/text/compat/note.component.mjs +19 -0
  197. package/esm2022/lib/layout/text/compat/notice.component.mjs +19 -0
  198. package/esm2022/lib/layout/text/compat/ok.component.mjs +19 -0
  199. package/esm2022/lib/layout/text/compat/success.component.mjs +19 -0
  200. package/esm2022/lib/layout/text/compat/text.compat.module.mjs +32 -0
  201. package/esm2022/lib/layout/text/compat/warn.component.mjs +19 -0
  202. package/esm2022/lib/layout/text/detail.block.component.mjs +6 -4
  203. package/esm2022/lib/layout/text/detail.block.header.component.mjs +6 -4
  204. package/esm2022/lib/layout/text/icon.spacer.component.mjs +3 -3
  205. package/esm2022/lib/layout/text/index.mjs +2 -9
  206. package/esm2022/lib/layout/text/label.block.component.mjs +7 -7
  207. package/esm2022/lib/layout/text/linkify.component.mjs +20 -23
  208. package/esm2022/lib/layout/text/text.chip.directive.mjs +5 -3
  209. package/esm2022/lib/layout/text/text.chips.component.mjs +6 -4
  210. package/esm2022/lib/layout/text/text.module.mjs +5 -13
  211. package/esm2022/lib/loading/basic-loading.component.mjs +33 -33
  212. package/esm2022/lib/loading/loading-progress.component.mjs +11 -10
  213. package/esm2022/lib/loading/loading.action.directive.mjs +8 -14
  214. package/esm2022/lib/loading/loading.component.mjs +33 -27
  215. package/esm2022/lib/loading/loading.module.mjs +4 -4
  216. package/esm2022/lib/router/layout/anchor/anchor.component.mjs +14 -17
  217. package/esm2022/lib/router/layout/anchor/anchor.content.component.mjs +14 -19
  218. package/esm2022/lib/router/layout/anchor/anchor.icon.component.mjs +5 -4
  219. package/esm2022/lib/router/layout/anchor/anchor.link.component.mjs +5 -4
  220. package/esm2022/lib/router/layout/anchor/anchor.module.mjs +4 -4
  221. package/esm2022/lib/router/layout/anchor/anchor.segue.directive.mjs +13 -16
  222. package/esm2022/lib/router/layout/anchorlist/anchorlist.component.mjs +8 -10
  223. package/esm2022/lib/router/layout/anchorlist/anchorlist.module.mjs +4 -4
  224. package/esm2022/lib/router/layout/layout.module.mjs +4 -4
  225. package/esm2022/lib/router/layout/list/list.module.mjs +4 -4
  226. package/esm2022/lib/router/layout/list/router.list.directive.mjs +16 -19
  227. package/esm2022/lib/router/layout/navbar/navbar.component.mjs +65 -70
  228. package/esm2022/lib/router/layout/navbar/navbar.module.mjs +6 -6
  229. package/esm2022/lib/router/layout/sidenav/sidenav.button.component.mjs +13 -16
  230. package/esm2022/lib/router/layout/sidenav/sidenav.component.mjs +54 -57
  231. package/esm2022/lib/router/layout/sidenav/sidenav.ifdisplaymode.directive.mjs +10 -14
  232. package/esm2022/lib/router/layout/sidenav/sidenav.module.mjs +4 -4
  233. package/esm2022/lib/router/layout/sidenav/sidenav.page.component.mjs +13 -14
  234. package/esm2022/lib/router/layout/sidenav/sidenav.pagebar.component.mjs +5 -4
  235. package/esm2022/lib/router/provider/ngrouter/anchor.component.mjs +3 -3
  236. package/esm2022/lib/router/provider/ngrouter/angular.router.module.mjs +4 -4
  237. package/esm2022/lib/router/provider/uirouter/anchor.component.mjs +5 -8
  238. package/esm2022/lib/router/provider/uirouter/uirouter.router.module.mjs +4 -4
  239. package/esm2022/lib/screen/screen.module.mjs +4 -4
  240. package/esm2022/lib/screen/screen.service.mjs +19 -12
  241. package/esm2022/mapbox/lib/mapbox.change.service.mjs +15 -18
  242. package/esm2022/mapbox/lib/mapbox.injection.component.mjs +10 -14
  243. package/esm2022/mapbox/lib/mapbox.injection.store.mjs +8 -8
  244. package/esm2022/mapbox/lib/mapbox.injection.store.provide.mjs +8 -13
  245. package/esm2022/mapbox/lib/mapbox.layout.component.mjs +47 -46
  246. package/esm2022/mapbox/lib/mapbox.layout.drawer.component.mjs +9 -12
  247. package/esm2022/mapbox/lib/mapbox.layout.resize.sync.directive.mjs +17 -23
  248. package/esm2022/mapbox/lib/mapbox.marker.component.mjs +13 -17
  249. package/esm2022/mapbox/lib/mapbox.markers.component.mjs +14 -16
  250. package/esm2022/mapbox/lib/mapbox.menu.component.mjs +14 -21
  251. package/esm2022/mapbox/lib/mapbox.module.mjs +6 -6
  252. package/esm2022/mapbox/lib/mapbox.service.mjs +10 -10
  253. package/esm2022/mapbox/lib/mapbox.store.map.directive.mjs +9 -22
  254. package/esm2022/mapbox/lib/mapbox.store.mjs +395 -399
  255. package/esm2022/mapbox/lib/mapbox.store.provide.mjs +8 -13
  256. package/esm2022/table/lib/date/date.table.column.header.component.mjs +8 -8
  257. package/esm2022/table/lib/date/daterange.table.cell.input.component.mjs +37 -43
  258. package/esm2022/table/lib/date/table.date.module.mjs +6 -6
  259. package/esm2022/table/lib/table.cell.action.component.mjs +10 -13
  260. package/esm2022/table/lib/table.cell.input.component.mjs +10 -13
  261. package/esm2022/table/lib/table.cell.summaryend.component.mjs +10 -13
  262. package/esm2022/table/lib/table.cell.summarystart.component.mjs +10 -13
  263. package/esm2022/table/lib/table.column.directive.mjs +8 -11
  264. package/esm2022/table/lib/table.column.footer.component.mjs +13 -16
  265. package/esm2022/table/lib/table.column.header.component.mjs +13 -16
  266. package/esm2022/table/lib/table.component.mjs +35 -38
  267. package/esm2022/table/lib/table.directive.mjs +6 -9
  268. package/esm2022/table/lib/table.item.action.component.mjs +13 -16
  269. package/esm2022/table/lib/table.item.cell.component.mjs +7 -10
  270. package/esm2022/table/lib/table.item.directive.mjs +8 -11
  271. package/esm2022/table/lib/table.item.header.component.mjs +5 -8
  272. package/esm2022/table/lib/table.module.mjs +6 -6
  273. package/esm2022/table/lib/table.store.mjs +36 -36
  274. package/fesm2022/dereekb-dbx-web-calendar.mjs +137 -141
  275. package/fesm2022/dereekb-dbx-web-calendar.mjs.map +1 -1
  276. package/fesm2022/dereekb-dbx-web-mapbox.mjs +552 -594
  277. package/fesm2022/dereekb-dbx-web-mapbox.mjs.map +1 -1
  278. package/fesm2022/dereekb-dbx-web-table.mjs +197 -232
  279. package/fesm2022/dereekb-dbx-web-table.mjs.map +1 -1
  280. package/fesm2022/dereekb-dbx-web.mjs +2243 -2460
  281. package/fesm2022/dereekb-dbx-web.mjs.map +1 -1
  282. package/lib/action/action.confirm.directive.d.ts +1 -3
  283. package/lib/action/key.trigger.directive.d.ts +1 -2
  284. package/lib/action/snackbar/action.snackbar.component.d.ts +4 -5
  285. package/lib/action/snackbar/action.snackbar.directive.d.ts +2 -3
  286. package/lib/action/snackbar/action.snackbar.service.d.ts +1 -2
  287. package/lib/action/transition/transition.safety.directive.d.ts +1 -2
  288. package/lib/button/progress/base.progress.button.directive.d.ts +7 -8
  289. package/lib/error/error.action.directive.d.ts +2 -3
  290. package/lib/error/error.component.d.ts +2 -3
  291. package/lib/error/error.loading.directive.d.ts +1 -2
  292. package/lib/error/error.snackbar.action.directive.d.ts +1 -2
  293. package/lib/error/error.snackbar.component.d.ts +2 -3
  294. package/lib/error/error.snackbar.service.d.ts +0 -1
  295. package/lib/error/error.widget.component.d.ts +0 -1
  296. package/lib/error/error.widget.directive.d.ts +0 -1
  297. package/lib/extension/download/text/download.text.component.d.ts +3 -6
  298. package/lib/extension/model/model.module.d.ts +3 -3
  299. package/lib/extension/model/model.state.service.d.ts +1 -3
  300. package/lib/extension/model/model.tracker.service.d.ts +1 -3
  301. package/lib/extension/model/model.tracker.view.storage.d.ts +5 -3
  302. package/lib/extension/model/model.types.service.d.ts +2 -3
  303. package/lib/extension/model/state/effects/tracker.effects.d.ts +0 -3
  304. package/lib/extension/structure/structure.structure.directive.d.ts +1 -2
  305. package/lib/extension/widget/widget.component.d.ts +0 -1
  306. package/lib/extension/widget/widget.directive.d.ts +0 -1
  307. package/lib/interaction/dialog/abstract.dialog.directive.d.ts +3 -5
  308. package/lib/interaction/dialog/dialog.action.directive.d.ts +3 -3
  309. package/lib/interaction/filter/filter.partial.d.ts +1 -2
  310. package/lib/interaction/filter/filter.popover.button.directive.d.ts +0 -2
  311. package/lib/interaction/filter/filter.popover.component.d.ts +0 -2
  312. package/lib/interaction/filter/{filter.preset.d.ts → filter.preset.directive.d.ts} +5 -6
  313. package/lib/interaction/filter/filter.preset.list.component.d.ts +2 -2
  314. package/lib/interaction/filter/filter.preset.menu.component.d.ts +2 -2
  315. package/lib/interaction/filter/filter.wrapper.component.d.ts +3 -3
  316. package/lib/interaction/popover/abstract.popover.directive.d.ts +0 -1
  317. package/lib/interaction/popover/popover.action.directive.d.ts +3 -3
  318. package/lib/interaction/popover/popover.close.component.d.ts +1 -2
  319. package/lib/interaction/popover/popover.component.d.ts +6 -7
  320. package/lib/interaction/popover/popover.controls.directive.d.ts +3 -2
  321. package/lib/interaction/popover/popover.coordinator.component.d.ts +3 -5
  322. package/lib/interaction/popover/popover.header.component.d.ts +5 -3
  323. package/lib/interaction/popover/popover.scroll.content.component.d.ts +0 -1
  324. package/lib/interaction/popover/popover.service.d.ts +0 -2
  325. package/lib/interaction/popup/abstract.popup.directive.d.ts +0 -1
  326. package/lib/interaction/popup/popup.component.d.ts +3 -5
  327. package/lib/interaction/popup/popup.content.component.d.ts +1 -3
  328. package/lib/interaction/popup/popup.controls.buttons.component.d.ts +1 -3
  329. package/lib/interaction/popup/popup.coordinator.component.d.ts +2 -5
  330. package/lib/interaction/popup/popup.service.d.ts +0 -2
  331. package/lib/interaction/prompt/prompt.button.confirm.directive.d.ts +3 -4
  332. package/lib/interaction/prompt/prompt.confirm.component.d.ts +2 -2
  333. package/lib/interaction/prompt/prompt.confirm.directive.d.ts +1 -3
  334. package/lib/layout/column/one/one.column.component.d.ts +1 -1
  335. package/lib/layout/column/two/two.column.back.directive.d.ts +0 -1
  336. package/lib/layout/column/two/two.column.component.d.ts +4 -4
  337. package/lib/layout/column/two/two.column.context.directive.d.ts +0 -1
  338. package/lib/layout/column/two/two.column.full.left.directive.d.ts +0 -2
  339. package/lib/layout/column/two/two.column.right.component.d.ts +1 -2
  340. package/lib/layout/column/two/two.column.sref.directive.d.ts +0 -2
  341. package/lib/layout/column/two/two.column.sref.showright.directive.d.ts +1 -3
  342. package/lib/layout/compact/compact.directive.d.ts +1 -2
  343. package/lib/layout/flex/flex.group.directive.d.ts +2 -3
  344. package/lib/layout/list/list.component.d.ts +3 -4
  345. package/lib/layout/list/list.directive.d.ts +4 -5
  346. package/lib/layout/list/list.grid.view.component.d.ts +3 -5
  347. package/lib/layout/list/list.view.directive.d.ts +1 -1
  348. package/lib/layout/list/list.view.meta.icon.component.d.ts +3 -2
  349. package/lib/layout/list/list.view.selection.directive.d.ts +1 -1
  350. package/lib/layout/list/list.view.value.component.d.ts +4 -5
  351. package/lib/layout/list/list.view.value.directive.d.ts +3 -4
  352. package/lib/layout/list/list.view.value.group.title.directive.d.ts +7 -3
  353. package/lib/layout/list/list.view.value.item.directive.d.ts +0 -1
  354. package/lib/layout/list/list.view.value.modifier.directive.d.ts +0 -1
  355. package/lib/layout/list/list.view.value.selection.component.d.ts +3 -4
  356. package/lib/layout/section/section.intro.component.d.ts +1 -1
  357. package/lib/layout/style/style.body.directive.d.ts +4 -4
  358. package/lib/layout/style/style.directive.d.ts +4 -5
  359. package/lib/layout/style/style.service.d.ts +1 -2
  360. package/lib/layout/style/style.set.directive.d.ts +3 -3
  361. package/lib/layout/text/compat/index.d.ts +9 -0
  362. package/lib/layout/text/compat/text.compat.module.d.ts +21 -0
  363. package/lib/layout/text/index.d.ts +1 -8
  364. package/lib/layout/text/linkify.component.d.ts +0 -2
  365. package/lib/layout/text/text.module.d.ts +9 -17
  366. package/lib/loading/loading.action.directive.d.ts +3 -4
  367. package/lib/loading/loading.component.d.ts +0 -1
  368. package/lib/router/layout/anchor/anchor.component.d.ts +0 -2
  369. package/lib/router/layout/anchor/anchor.content.component.d.ts +3 -4
  370. package/lib/router/layout/anchor/anchor.segue.directive.d.ts +0 -1
  371. package/lib/router/layout/navbar/navbar.component.d.ts +2 -4
  372. package/lib/router/layout/sidenav/sidenav.button.component.d.ts +0 -1
  373. package/lib/router/layout/sidenav/sidenav.component.d.ts +2 -4
  374. package/lib/router/layout/sidenav/sidenav.ifdisplaymode.directive.d.ts +2 -3
  375. package/lib/router/layout/sidenav/sidenav.page.component.d.ts +0 -1
  376. package/lib/screen/screen.service.d.ts +1 -2
  377. package/mapbox/esm2022/lib/mapbox.change.service.mjs +15 -18
  378. package/mapbox/esm2022/lib/mapbox.injection.component.mjs +10 -14
  379. package/mapbox/esm2022/lib/mapbox.injection.store.mjs +8 -8
  380. package/mapbox/esm2022/lib/mapbox.injection.store.provide.mjs +8 -13
  381. package/mapbox/esm2022/lib/mapbox.layout.component.mjs +47 -46
  382. package/mapbox/esm2022/lib/mapbox.layout.drawer.component.mjs +9 -12
  383. package/mapbox/esm2022/lib/mapbox.layout.resize.sync.directive.mjs +17 -23
  384. package/mapbox/esm2022/lib/mapbox.marker.component.mjs +13 -17
  385. package/mapbox/esm2022/lib/mapbox.markers.component.mjs +14 -16
  386. package/mapbox/esm2022/lib/mapbox.menu.component.mjs +14 -21
  387. package/mapbox/esm2022/lib/mapbox.module.mjs +6 -6
  388. package/mapbox/esm2022/lib/mapbox.service.mjs +10 -10
  389. package/mapbox/esm2022/lib/mapbox.store.map.directive.mjs +9 -22
  390. package/mapbox/esm2022/lib/mapbox.store.mjs +395 -399
  391. package/mapbox/esm2022/lib/mapbox.store.provide.mjs +8 -13
  392. package/mapbox/fesm2022/dereekb-dbx-web-mapbox.mjs +552 -594
  393. package/mapbox/fesm2022/dereekb-dbx-web-mapbox.mjs.map +1 -1
  394. package/mapbox/lib/mapbox.change.service.d.ts +0 -1
  395. package/mapbox/lib/mapbox.injection.component.d.ts +0 -3
  396. package/mapbox/lib/mapbox.injection.store.provide.d.ts +1 -2
  397. package/mapbox/lib/mapbox.layout.component.d.ts +10 -11
  398. package/mapbox/lib/mapbox.layout.drawer.component.d.ts +0 -1
  399. package/mapbox/lib/mapbox.layout.resize.sync.directive.d.ts +3 -4
  400. package/mapbox/lib/mapbox.marker.component.d.ts +2 -4
  401. package/mapbox/lib/mapbox.menu.component.d.ts +4 -5
  402. package/mapbox/lib/mapbox.service.d.ts +1 -2
  403. package/mapbox/lib/mapbox.store.d.ts +1 -2
  404. package/mapbox/lib/mapbox.store.map.directive.d.ts +2 -3
  405. package/mapbox/lib/mapbox.store.provide.d.ts +1 -2
  406. package/mapbox/package.json +1 -1
  407. package/package.json +1 -1
  408. package/table/esm2022/lib/date/date.table.column.header.component.mjs +8 -8
  409. package/table/esm2022/lib/date/daterange.table.cell.input.component.mjs +37 -43
  410. package/table/esm2022/lib/date/table.date.module.mjs +6 -6
  411. package/table/esm2022/lib/table.cell.action.component.mjs +10 -13
  412. package/table/esm2022/lib/table.cell.input.component.mjs +10 -13
  413. package/table/esm2022/lib/table.cell.summaryend.component.mjs +10 -13
  414. package/table/esm2022/lib/table.cell.summarystart.component.mjs +10 -13
  415. package/table/esm2022/lib/table.column.directive.mjs +8 -11
  416. package/table/esm2022/lib/table.column.footer.component.mjs +13 -16
  417. package/table/esm2022/lib/table.column.header.component.mjs +13 -16
  418. package/table/esm2022/lib/table.component.mjs +35 -38
  419. package/table/esm2022/lib/table.directive.mjs +6 -9
  420. package/table/esm2022/lib/table.item.action.component.mjs +13 -16
  421. package/table/esm2022/lib/table.item.cell.component.mjs +7 -10
  422. package/table/esm2022/lib/table.item.directive.mjs +8 -11
  423. package/table/esm2022/lib/table.item.header.component.mjs +5 -8
  424. package/table/esm2022/lib/table.module.mjs +6 -6
  425. package/table/esm2022/lib/table.store.mjs +36 -36
  426. package/table/fesm2022/dereekb-dbx-web-table.mjs +197 -232
  427. package/table/fesm2022/dereekb-dbx-web-table.mjs.map +1 -1
  428. package/table/lib/date/daterange.table.cell.input.component.d.ts +3 -6
  429. package/table/lib/table.cell.action.component.d.ts +1 -2
  430. package/table/lib/table.cell.input.component.d.ts +1 -2
  431. package/table/lib/table.cell.summaryend.component.d.ts +1 -2
  432. package/table/lib/table.cell.summarystart.component.d.ts +1 -2
  433. package/table/lib/table.column.directive.d.ts +1 -2
  434. package/table/lib/table.component.d.ts +0 -1
  435. package/table/lib/table.directive.d.ts +0 -1
  436. package/table/lib/table.item.directive.d.ts +0 -1
  437. package/table/package.json +1 -1
  438. package/esm2022/lib/interaction/filter/filter.preset.mjs +0 -94
  439. package/esm2022/lib/layout/text/form.description.component.mjs +0 -19
  440. package/esm2022/lib/layout/text/hint.component.mjs +0 -19
  441. package/esm2022/lib/layout/text/label.component.mjs +0 -19
  442. package/esm2022/lib/layout/text/note.component.mjs +0 -19
  443. package/esm2022/lib/layout/text/notice.component.mjs +0 -19
  444. package/esm2022/lib/layout/text/ok.component.mjs +0 -19
  445. package/esm2022/lib/layout/text/success.component.mjs +0 -19
  446. package/esm2022/lib/layout/text/warn.component.mjs +0 -19
  447. /package/lib/layout/text/{form.description.component.d.ts → compat/form.description.component.d.ts} +0 -0
  448. /package/lib/layout/text/{hint.component.d.ts → compat/hint.component.d.ts} +0 -0
  449. /package/lib/layout/text/{label.component.d.ts → compat/label.component.d.ts} +0 -0
  450. /package/lib/layout/text/{note.component.d.ts → compat/note.component.d.ts} +0 -0
  451. /package/lib/layout/text/{notice.component.d.ts → compat/notice.component.d.ts} +0 -0
  452. /package/lib/layout/text/{ok.component.d.ts → compat/ok.component.d.ts} +0 -0
  453. /package/lib/layout/text/{success.component.d.ts → compat/success.component.d.ts} +0 -0
  454. /package/lib/layout/text/{warn.component.d.ts → compat/warn.component.d.ts} +0 -0
@@ -1,39 +1,41 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Optional, Inject, Component, ChangeDetectionStrategy, SkipSelf, Directive, Injector, Host, EventEmitter, ElementRef, Output, ViewChild, Input, NgModule } from '@angular/core';
2
+ import { inject, Injectable, Component, ChangeDetectionStrategy, Directive, Injector, Optional, SkipSelf, EventEmitter, ElementRef, Output, ViewChild, Input, NgZone, ChangeDetectorRef, NgModule } from '@angular/core';
3
3
  import { asObservable, cleanup, filterMaybe, onTrueToFalse, SubscriptionObject, distinctUntilMapHasDifferentKeys } from '@dereekb/rxjs';
4
- import { distinctUntilChanged, switchMap, map, combineLatestWith, shareReplay, NEVER, defaultIfEmpty, tap, EMPTY, of, combineLatest, filter, first, startWith, throttleTime, interval, Subject, merge, BehaviorSubject } from 'rxjs';
5
- import { LAT_LONG_10M_PRECISION, latLngPointFunction, roundNumberToStepFunction, latLngBoundFunction, latLngBoundFromInput, filterUndefinedValues, isSameLatLngPoint, isSameVector, isSameLatLngBound, isDefaultLatLngPoint, swMostLatLngPoint, neMostLatLngPoint, diffLatLngBoundPoints, latLngBoundWrapsMap, isWithinLatLngBoundFunction, overlapsLatLngBoundFunction, latLngBoundCenterPoint, addLatLngPoints, vectorMinimumSizeResizeFunction, latLngPoint, DestroyFunctionObject, getValueFromGetter } from '@dereekb/util';
4
+ import { distinctUntilChanged, switchMap, map, combineLatestWith, shareReplay, NEVER, defaultIfEmpty, tap, EMPTY, interval, of, first, combineLatest, filter, startWith, throttleTime, Subject, merge, BehaviorSubject } from 'rxjs';
5
+ import { LAT_LONG_10M_PRECISION, latLngPointFunction, roundNumberToStepFunction, latLngBoundFunction, latLngBoundFromInput, filterUndefinedValues, diffLatLngBoundPoints, latLngBoundCenterPoint, addLatLngPoints, isSameLatLngPoint, isSameVector, vectorMinimumSizeResizeFunction, isSameLatLngBound, isDefaultLatLngPoint, swMostLatLngPoint, neMostLatLngPoint, latLngBoundWrapsMap, isWithinLatLngBoundFunction, overlapsLatLngBoundFunction, latLngPoint, DestroyFunctionObject, getValueFromGetter } from '@dereekb/util';
6
6
  import { ComponentStore } from '@ngrx/component-store';
7
7
  import * as MapboxGl from 'mapbox-gl';
8
8
  import { bounds } from '@placemarkio/geo-viewport';
9
- import * as i2 from '@dereekb/dbx-core';
9
+ import * as i1 from '@dereekb/dbx-core';
10
10
  import { AbstractSubscriptionDirective, safeMarkForCheck, DbxInjectionComponentModule } from '@dereekb/dbx-core';
11
- import * as i2$1 from '@angular/common';
11
+ import * as i1$1 from '@angular/common';
12
12
  import { CommonModule } from '@angular/common';
13
- import * as i1 from 'ngx-mapbox-gl';
14
- import { NgxMapboxGLModule } from 'ngx-mapbox-gl';
15
- import * as i3 from '@angular/material/sidenav';
13
+ import * as i4$1 from 'ngx-mapbox-gl';
14
+ import { MapService, MapComponent, NgxMapboxGLModule } from 'ngx-mapbox-gl';
15
+ import * as i2 from '@angular/material/sidenav';
16
16
  import { MatDrawerContainer, MatSidenavModule } from '@angular/material/sidenav';
17
- import * as i4 from '@dereekb/dbx-web';
17
+ import * as i3 from '@dereekb/dbx-web';
18
18
  import { disableRightClickInCdkBackdrop, DbxStyleLayoutModule, DbxRouterAnchorModule } from '@dereekb/dbx-web';
19
- import * as i5 from '@angular/material/button';
19
+ import * as i4 from '@angular/material/button';
20
20
  import { MatButtonModule } from '@angular/material/button';
21
- import * as i6 from '@angular/material/icon';
21
+ import * as i5 from '@angular/material/icon';
22
22
  import { MatIconModule } from '@angular/material/icon';
23
- import * as i7 from 'angular-resize-event';
23
+ import * as i6 from 'angular-resize-event';
24
24
  import { AngularResizeEventModule } from 'angular-resize-event';
25
- import * as i2$2 from '@angular/material/menu';
25
+ import { MatMenuTrigger } from '@angular/material/menu';
26
26
 
27
27
  class DbxMapboxConfig {
28
+ defaultStyle;
29
+ defaultZoom;
30
+ defaultCenter;
31
+ defaultStoreRefreshPeriod;
28
32
  }
29
33
  const DEFAULT_MAPBOX_STYLE = 'mapbox://styles/mapbox/streets-v12';
30
34
  const DEFAULT_MAPBOX_CENTER = [30.2690138665, -97.7408297965];
31
35
  const DEFAULT_MAPBOX_ZOOM = 8;
32
36
  const DEFAULT_MAPBOX_MAP_STORE_TIMER_REFRESH_PERIOD = 200;
33
37
  class DbxMapboxService {
34
- constructor(config) {
35
- this._config = config ?? {};
36
- }
38
+ _config = inject(DbxMapboxConfig, { optional: true }) ?? {};
37
39
  get defaultStyle() {
38
40
  return this._config.defaultStyle ?? DEFAULT_MAPBOX_STYLE;
39
41
  }
@@ -46,17 +48,15 @@ class DbxMapboxService {
46
48
  get mapboxMapStoreTimerRefreshPeriod() {
47
49
  return this._config.defaultStoreRefreshPeriod ?? DEFAULT_MAPBOX_MAP_STORE_TIMER_REFRESH_PERIOD;
48
50
  }
49
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxService, deps: [{ token: DbxMapboxConfig, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
50
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxService, providedIn: 'root' }); }
51
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
52
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxService, providedIn: 'root' });
51
53
  }
52
54
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxService, decorators: [{
53
55
  type: Injectable,
54
56
  args: [{
55
57
  providedIn: 'root'
56
58
  }]
57
- }], ctorParameters: function () { return [{ type: DbxMapboxConfig, decorators: [{
58
- type: Optional
59
- }] }]; } });
59
+ }] });
60
60
 
61
61
  function mapboxViewportBoundFunction(config) {
62
62
  const { mapCanvasSize, tileSize = 512 } = config;
@@ -126,7 +126,11 @@ function filterByMapboxViewportBound(config) {
126
126
  * Store used for retrieving information.
127
127
  */
128
128
  class DbxMapboxMapStore extends ComponentStore {
129
- constructor(dbxMapboxService) {
129
+ dbxMapboxService = inject(DbxMapboxService);
130
+ safeLatLngPoint = latLngPointFunction({ wrap: true });
131
+ latLngPoint = latLngPointFunction({ wrap: false, validate: false });
132
+ latLngBound = latLngBoundFunction({ pointFunction: this.latLngPoint });
133
+ constructor() {
130
134
  super({
131
135
  lifecycleState: 'init',
132
136
  moveState: 'init',
@@ -139,419 +143,243 @@ class DbxMapboxMapStore extends ComponentStore {
139
143
  refreshType: 'always'
140
144
  }
141
145
  });
142
- this.dbxMapboxService = dbxMapboxService;
143
- this.safeLatLngPoint = latLngPointFunction({ wrap: true });
144
- this.latLngPoint = latLngPointFunction({ wrap: false, validate: false });
145
- this.latLngBound = latLngBoundFunction({ pointFunction: this.latLngPoint });
146
- // MARK: Effects
147
- this.setMapService = this.effect((input) => {
148
- return input.pipe(switchMap((service) => {
149
- this._setMapService(service);
150
- if (!service) {
151
- return NEVER;
146
+ }
147
+ // MARK: Effects
148
+ setMapService = this.effect((input) => {
149
+ return input.pipe(switchMap((service) => {
150
+ this._setMapService(service);
151
+ if (!service) {
152
+ return NEVER;
153
+ }
154
+ else {
155
+ return service.mapLoaded$.pipe(defaultIfEmpty(undefined), map(() => {
156
+ this._setLifecycleState('idle');
157
+ this._setMoveState('idle');
158
+ this._setZoomState('idle');
159
+ this._setRotateState('idle');
160
+ const map = service.mapInstance;
161
+ const listenerPairs = [];
162
+ function addListener(type, listener) {
163
+ map.on(type, listener);
164
+ listenerPairs.push({ type, listener });
165
+ }
166
+ addListener('idle', () => this._setLifecycleState('idle'));
167
+ addListener('render', () => this._setLifecycleState('render'));
168
+ addListener('error', (x) => {
169
+ this._setError(x.error);
170
+ });
171
+ addListener('movestart', () => this._setMoveState('moving'));
172
+ addListener('moveend', () => this._setMoveState('idle'));
173
+ addListener('zoomstart', () => this._setZoomState('zooming'));
174
+ addListener('zoomend', () => this._setZoomState('idle'));
175
+ addListener('rotatestart', () => this._setRotateState('rotating'));
176
+ addListener('rotateend', () => this._setRotateState('idle'));
177
+ addListener('click', (x) => this._setClickEvent(x));
178
+ addListener('dblclick', (x) => this._setDoubleClickEvent(x));
179
+ addListener('contextmenu', (x) => this._setRightClickEvent(x));
180
+ const refreshForResize = () => {
181
+ const { clientWidth: x, clientHeight: y } = map.getCanvas();
182
+ this._setMapCanvasSize({ x, y });
183
+ };
184
+ addListener('resize', refreshForResize);
185
+ refreshForResize();
186
+ const subs = [];
187
+ return {
188
+ service,
189
+ listenerPairs,
190
+ subs
191
+ };
192
+ }));
193
+ }
194
+ }), cleanup(({ service, listenerPairs, subs }) => {
195
+ const map = service.mapInstance;
196
+ if (map) {
197
+ listenerPairs.forEach((x) => {
198
+ map.off(x.type, x.listener);
199
+ });
200
+ }
201
+ subs.forEach((sub) => sub.unsubscribe());
202
+ }));
203
+ });
204
+ setStyle = this.effect((input) => {
205
+ return input.pipe(switchMap((style) => {
206
+ return this.mapInstance$.pipe(tap((map) => {
207
+ if (typeof style === 'string') {
208
+ map.setStyle(style);
152
209
  }
153
210
  else {
154
- return service.mapLoaded$.pipe(defaultIfEmpty(undefined), map(() => {
155
- this._setLifecycleState('idle');
156
- this._setMoveState('idle');
157
- this._setZoomState('idle');
158
- this._setRotateState('idle');
159
- const map = service.mapInstance;
160
- const listenerPairs = [];
161
- function addListener(type, listener) {
162
- map.on(type, listener);
163
- listenerPairs.push({ type, listener });
164
- }
165
- addListener('idle', () => this._setLifecycleState('idle'));
166
- addListener('render', () => this._setLifecycleState('render'));
167
- addListener('error', (x) => {
168
- this._setError(x.error);
169
- });
170
- addListener('movestart', () => this._setMoveState('moving'));
171
- addListener('moveend', () => this._setMoveState('idle'));
172
- addListener('zoomstart', () => this._setZoomState('zooming'));
173
- addListener('zoomend', () => this._setZoomState('idle'));
174
- addListener('rotatestart', () => this._setRotateState('rotating'));
175
- addListener('rotateend', () => this._setRotateState('idle'));
176
- addListener('click', (x) => this._setClickEvent(x));
177
- addListener('dblclick', (x) => this._setDoubleClickEvent(x));
178
- addListener('contextmenu', (x) => this._setRightClickEvent(x));
179
- const refreshForResize = () => {
180
- const { clientWidth: x, clientHeight: y } = map.getCanvas();
181
- this._setMapCanvasSize({ x, y });
182
- };
183
- addListener('resize', refreshForResize);
184
- refreshForResize();
185
- const subs = [];
186
- return {
187
- service,
188
- listenerPairs,
189
- subs
190
- };
191
- }));
211
+ map.setStyle(style.style, style.options);
192
212
  }
193
- }), cleanup(({ service, listenerPairs, subs }) => {
194
- const map = service.mapInstance;
195
- if (map) {
196
- listenerPairs.forEach((x) => {
197
- map.off(x.type, x.listener);
198
- });
199
- }
200
- subs.forEach((sub) => sub.unsubscribe());
201
- }));
202
- });
203
- this.setStyle = this.effect((input) => {
204
- return input.pipe(switchMap((style) => {
205
- return this.mapInstance$.pipe(tap((map) => {
206
- if (typeof style === 'string') {
207
- map.setStyle(style);
208
- }
209
- else {
210
- map.setStyle(style.style, style.options);
211
- }
212
- }));
213
- }));
214
- });
215
- this.setCenter = this.effect((input) => {
216
- return input.pipe(switchMap((center) => {
217
- const centerPoint = this.safeLatLngPoint(center);
218
- return this.mapInstance$.pipe(tap((map) => map.setCenter(centerPoint)));
219
- }));
220
- });
221
- this.setZoom = this.effect((input) => {
222
- return input.pipe(switchMap((zoom) => {
223
- return this.mapInstance$.pipe(tap((map) => map.setZoom(zoom)));
224
- }));
225
- });
226
- this.setZoomRange = this.effect((input) => {
227
- return input.pipe(switchMap((zoomRange) => {
228
- return this.mapInstance$.pipe(tap((map) => {
229
- map.setMinZoom(zoomRange.min || null);
230
- map.setMaxZoom(zoomRange.max || null);
231
- }));
232
- }));
233
- });
234
- this.setMinZoom = this.effect((input) => {
235
- return input.pipe(switchMap((zoom) => {
236
- return this.mapInstance$.pipe(tap((map) => map.setMinZoom(zoom)));
237
- }));
238
- });
239
- this.setMaxZoom = this.effect((input) => {
240
- return input.pipe(switchMap((zoom) => {
241
- return this.mapInstance$.pipe(tap((map) => map.setMaxZoom(zoom)));
242
- }));
243
- });
244
- this.setKeyboardDisabled = this.effect((input) => {
245
- return input.pipe(switchMap((disabled) => {
246
- return this.mapInstance$.pipe(tap((map) => {
247
- if (disabled === false) {
248
- map.keyboard.enable();
249
- }
250
- else {
251
- map.keyboard.disable();
252
- }
253
- }));
254
- }));
255
- });
256
- this.setDragRotateDisabled = this.effect((input) => {
257
- return input.pipe(switchMap((disabled) => {
258
- return this.mapInstance$.pipe(tap((map) => {
259
- if (disabled === false) {
260
- map.dragRotate.enable();
261
- }
262
- else {
263
- map.dragRotate.disable();
264
- }
265
- }));
266
- }));
267
- });
268
- this.setDragPanDisabled = this.effect((input) => {
269
- return input.pipe(switchMap((disabled) => {
270
- return this.mapInstance$.pipe(tap((map) => {
271
- if (disabled === false) {
272
- map.dragPan.enable();
273
- }
274
- else {
275
- map.dragPan.disable();
276
- }
277
- }));
278
- }));
279
- });
280
- this.setZoomDisabled = this.effect((input) => {
281
- return input.pipe(switchMap((disabled) => {
282
- return this.mapInstance$.pipe(tap((map) => {
283
- if (disabled === false) {
284
- map.scrollZoom.enable();
285
- map.doubleClickZoom.enable();
286
- }
287
- else {
288
- map.scrollZoom.disable();
289
- map.doubleClickZoom.disable();
290
- }
291
- }));
292
- }));
293
- });
294
- this.setPitch = this.effect((input) => {
295
- return input.pipe(switchMap((pitch) => {
296
- return this.mapInstance$.pipe(tap((map) => map.setPitch(pitch)));
297
- }));
298
- });
299
- this.setMinPitch = this.effect((input) => {
300
- return input.pipe(switchMap((pitch) => {
301
- return this.mapInstance$.pipe(tap((map) => map.setMinPitch(pitch)));
302
- }));
303
- });
304
- this.setMaxPitch = this.effect((input) => {
305
- return input.pipe(switchMap((pitch) => {
306
- return this.mapInstance$.pipe(tap((map) => map.setMaxPitch(pitch)));
307
- }));
308
- });
309
- this.setBearing = this.effect((input) => {
310
- return input.pipe(switchMap((bearing) => {
311
- return this.mapInstance$.pipe(tap((map) => map.setBearing(bearing)));
312
- }));
313
- });
314
- this.rotateTo = this.effect((input) => {
315
- return input.pipe(switchMap((rotateInput) => {
316
- const rotate = typeof rotateInput === 'number' ? { bearing: rotateInput } : rotateInput;
317
- return this.mapInstance$.pipe(tap((map) => map.rotateTo(rotate.bearing, rotate.options, rotate?.eventData)));
318
213
  }));
319
- });
320
- this.resetNorth = this.effect((input) => {
321
- return input.pipe(switchMap((reset) => {
322
- return this.mapInstance$.pipe(tap((map) => map.resetNorth(reset?.options, reset?.eventData)));
323
- }));
324
- });
325
- this.resetNorthPitch = this.effect((input) => {
326
- return input.pipe(switchMap((reset) => {
327
- return this.mapInstance$.pipe(tap((map) => map.resetNorthPitch(reset?.options, reset?.eventData)));
328
- }));
329
- });
330
- this.snapToNorth = this.effect((input) => {
331
- return input.pipe(switchMap((snap) => {
332
- return this.mapInstance$.pipe(tap((map) => map.snapToNorth(snap?.options, snap?.eventData)));
214
+ }));
215
+ });
216
+ setCenter = this.effect((input) => {
217
+ return input.pipe(switchMap((center) => {
218
+ const centerPoint = this.safeLatLngPoint(center);
219
+ return this.mapInstance$.pipe(tap((map) => map.setCenter(centerPoint)));
220
+ }));
221
+ });
222
+ setZoom = this.effect((input) => {
223
+ return input.pipe(switchMap((zoom) => {
224
+ return this.mapInstance$.pipe(tap((map) => map.setZoom(zoom)));
225
+ }));
226
+ });
227
+ setZoomRange = this.effect((input) => {
228
+ return input.pipe(switchMap((zoomRange) => {
229
+ return this.mapInstance$.pipe(tap((map) => {
230
+ map.setMinZoom(zoomRange.min || null);
231
+ map.setMaxZoom(zoomRange.max || null);
333
232
  }));
334
- });
335
- this.fitPositions = this.effect((input) => {
336
- return input.pipe(switchMap((x) => {
337
- const boundFromInput = latLngBoundFromInput(x.positions);
338
- if (boundFromInput) {
339
- const bound = this.latLngBound(boundFromInput);
340
- return this.mapInstance$.pipe(tap((map) => map.fitBounds(new MapboxGl.LngLatBounds(bound.sw, bound.ne), x.options, x.eventData)));
233
+ }));
234
+ });
235
+ setMinZoom = this.effect((input) => {
236
+ return input.pipe(switchMap((zoom) => {
237
+ return this.mapInstance$.pipe(tap((map) => map.setMinZoom(zoom)));
238
+ }));
239
+ });
240
+ setMaxZoom = this.effect((input) => {
241
+ return input.pipe(switchMap((zoom) => {
242
+ return this.mapInstance$.pipe(tap((map) => map.setMaxZoom(zoom)));
243
+ }));
244
+ });
245
+ setKeyboardDisabled = this.effect((input) => {
246
+ return input.pipe(switchMap((disabled) => {
247
+ return this.mapInstance$.pipe(tap((map) => {
248
+ if (disabled === false) {
249
+ map.keyboard.enable();
341
250
  }
342
251
  else {
343
- return EMPTY;
252
+ map.keyboard.disable();
344
253
  }
345
254
  }));
346
- });
347
- this.fitBounds = this.effect((input) => {
348
- return input.pipe(switchMap((x) => {
349
- const bound = this.latLngBound(x.bounds);
350
- return this.mapInstance$.pipe(tap((map) => map.fitBounds(new MapboxGl.LngLatBounds(bound.sw, bound.ne), x.options, x.eventData)));
351
- }));
352
- });
353
- this.jumpTo = this.effect((input) => {
354
- return input.pipe(switchMap((x) => {
355
- const inputCenter = x.center ?? x.to?.center;
356
- const center = inputCenter ? this.safeLatLngPoint(inputCenter) : undefined;
357
- return this.mapInstance$.pipe(tap((map) => map.jumpTo(filterUndefinedValues({ ...x.to, center }), x.eventData)));
358
- }));
359
- });
360
- this.easeTo = this.effect((input) => {
361
- return input.pipe(switchMap((x) => {
362
- const inputCenter = x.center ?? x.to?.center;
363
- const center = inputCenter ? this.safeLatLngPoint(inputCenter) : undefined;
364
- return this.mapInstance$.pipe(tap((map) => map.easeTo(filterUndefinedValues({ ...x.to, center }), x.eventData)));
365
- }));
366
- });
367
- this.flyTo = this.effect((input) => {
368
- return input.pipe(switchMap((x) => {
369
- const inputCenter = x.center ?? x.to?.center;
370
- const center = inputCenter ? this.safeLatLngPoint(inputCenter) : undefined;
371
- return this.mapInstance$.pipe(tap((map) => map.flyTo(filterUndefinedValues({ ...x.to, center }), x.eventData)));
372
- }));
373
- });
374
- this.resetPitchAndBearing = this.effect((input) => {
375
- return input.pipe(switchMap(() => {
376
- return this.mapInstance$.pipe(tap((map) => {
377
- map.setPitch(0);
378
- map.setBearing(0);
379
- }));
380
- }));
381
- });
382
- this.currentMapService$ = this.state$.pipe(map((x) => x.mapService), distinctUntilChanged(), shareReplay(1));
383
- this.mapService$ = this.currentMapService$.pipe(filterMaybe());
384
- this.currentMapInstance$ = this.currentMapService$.pipe(switchMap((currentMapService) => {
385
- if (currentMapService) {
386
- return currentMapService.mapLoaded$.pipe(defaultIfEmpty(undefined), map(() => currentMapService.mapInstance));
387
- }
388
- else {
389
- return of(undefined);
390
- }
391
- }), distinctUntilChanged(), shareReplay(1));
392
- this.mapInstance$ = this.currentMapInstance$.pipe(filterMaybe());
393
- this.boundRefreshSettings$ = this.state$.pipe(map((x) => x.boundRefreshSettings), shareReplay(1));
394
- this.moveState$ = this.state$.pipe(map((x) => x.moveState), distinctUntilChanged(), shareReplay(1));
395
- this.lifecycleState$ = this.state$.pipe(map((x) => x.lifecycleState), distinctUntilChanged(), shareReplay(1));
396
- this.zoomState$ = this.state$.pipe(map((x) => x.zoomState), distinctUntilChanged(), shareReplay(1));
397
- this.rotateState$ = this.state$.pipe(map((x) => x.rotateState), distinctUntilChanged(), shareReplay(1));
398
- this.isInitialized$ = this.currentMapInstance$.pipe(switchMap((x) => {
399
- if (!x) {
400
- return of(false);
401
- }
402
- else {
403
- return combineLatest([this.moveState$.pipe(map((x) => x === 'idle')), this.lifecycleState$.pipe(map((x) => x === 'idle'))]).pipe(filter(([m, l]) => m && l), first(), map(() => true));
404
- }
405
- }), shareReplay(1));
406
- this.whenInitialized$ = this.isInitialized$.pipe(filter((x) => true), shareReplay(1));
407
- this.isRendering$ = this.whenInitialized$.pipe(switchMap(() => this.lifecycleState$.pipe(map((x) => x === 'render'), distinctUntilChanged(), shareReplay(1))));
408
- this.isMoving$ = this.whenInitialized$.pipe(switchMap(() => this.moveState$.pipe(map((x) => x === 'moving'), distinctUntilChanged(), shareReplay(1))));
409
- this.isZooming$ = this.whenInitialized$.pipe(switchMap(() => this.zoomState$.pipe(map((x) => x === 'zooming'), distinctUntilChanged(), shareReplay(1))));
410
- this.isRotating$ = this.whenInitialized$.pipe(switchMap(() => this.rotateState$.pipe(map((x) => x === 'rotating'), distinctUntilChanged(), shareReplay(1))));
411
- this._movingTimer = this.movingTimer();
412
- this._renderingTimer = this.lifecycleRenderTimer();
413
- this.centerNow$ = this.whenInitialized$.pipe(switchMap(() => this.mapInstance$.pipe(switchMap((x) => this._movingTimer.pipe(map(() => this.latLngPoint(x.getCenter())))), shareReplay(1))), shareReplay(1));
414
- this.center$ = this.whenInitialized$.pipe(switchMap(() => {
415
- return this.isMoving$.pipe(onTrueToFalse(), startWith(undefined), switchMap(() => this.centerNow$.pipe(first())), distinctUntilChanged(isSameLatLngPoint), shareReplay(1));
416
- }), shareReplay(1));
417
- this.minimumVirtualViewportSize$ = this.state$.pipe(map((x) => x.minimumVirtualViewportSize), distinctUntilChanged(isSameVector), shareReplay(1));
418
- this.currentMapCanvasSize$ = this.state$.pipe(map((x) => x.mapCanvasSize), distinctUntilChanged(isSameVector), shareReplay(1));
419
- /**
420
- * The map canvas size with consideration to the virtual viewport size.
421
- */
422
- this.mapCanvasSize$ = this.currentMapCanvasSize$.pipe(filterMaybe());
423
- /**
424
- * The map canvas size with consideration to the virtual viewport size.
425
- */
426
- this.virtualMapCanvasSize$ = this.minimumVirtualViewportSize$.pipe(switchMap((minimumVirtualViewportSize) => {
427
- if (minimumVirtualViewportSize) {
428
- return this.minimumMapCanvasSize(minimumVirtualViewportSize);
429
- }
430
- else {
431
- return this.mapCanvasSize$;
432
- }
433
- }), distinctUntilChanged(isSameVector), shareReplay(1));
434
- this.rawViewportBoundFunction$ = this.mapCanvasSize$.pipe(map((mapCanvasSize) => mapboxViewportBoundFunction({ mapCanvasSize })), shareReplay(1));
435
- this.viewportBoundFunction$ = this.minimumVirtualViewportSize$.pipe(switchMap((minimumVirtualViewportSize) => {
436
- if (minimumVirtualViewportSize) {
437
- return this.viewportBoundFunctionWithMinimumSize(minimumVirtualViewportSize);
438
- }
439
- else {
440
- return this.rawViewportBoundFunction$;
441
- }
442
- }), shareReplay(1));
443
- this.virtualBound$ = this.viewportBoundFunction$.pipe(switchMap((fn) => {
444
- return this.boundRefreshSettings$.pipe(switchMap((settings) => {
445
- const { throttle: throttleMs, refreshType } = settings;
446
- let obs;
447
- switch (refreshType) {
448
- case 'always':
449
- obs = combineLatest([this.centerNow$, this.zoomNow$]);
450
- break;
451
- case 'when_not_rendering':
452
- case 'only_after_render_finishes':
453
- obs = this.bound$.pipe(switchMap(() => combineLatest([this.centerNow$, this.zoomNow$]))); // refresh whenever the bound refreshes
454
- break;
255
+ }));
256
+ });
257
+ setDragRotateDisabled = this.effect((input) => {
258
+ return input.pipe(switchMap((disabled) => {
259
+ return this.mapInstance$.pipe(tap((map) => {
260
+ if (disabled === false) {
261
+ map.dragRotate.enable();
262
+ }
263
+ else {
264
+ map.dragRotate.disable();
455
265
  }
456
- return obs.pipe(throttleTime(throttleMs, undefined, { leading: true, trailing: true }), map(([center, zoom]) => fn({
457
- center,
458
- zoom
459
- })));
460
266
  }));
461
- }), distinctUntilChanged(isSameLatLngBound), shareReplay(1));
462
- this.margin$ = this.state$.pipe(map((x) => x.margin), distinctUntilChanged((a, b) => a != null && b != null && a.fullWidth === b.fullWidth && a.leftMargin === b.leftMargin && a.rightMargin === b.rightMargin), shareReplay(1));
463
- this.reverseMargin$ = this.margin$.pipe(map((x) => {
464
- if (x) {
465
- return { leftMargin: -x.leftMargin, rightMargin: -x.rightMargin, fullWidth: x.fullWidth };
466
- }
467
- else {
468
- return x;
469
- }
470
267
  }));
471
- this.centerGivenMargin$ = this.whenInitialized$.pipe(switchMap(() => {
472
- return this.reverseMargin$.pipe(switchMap((x) => {
473
- if (x) {
474
- return this.center$.pipe(switchMap((_) => this.calculateNextCenterOffsetWithScreenMarginChange(x)));
268
+ });
269
+ setDragPanDisabled = this.effect((input) => {
270
+ return input.pipe(switchMap((disabled) => {
271
+ return this.mapInstance$.pipe(tap((map) => {
272
+ if (disabled === false) {
273
+ map.dragPan.enable();
475
274
  }
476
275
  else {
477
- return this.isMoving$.pipe(filter((x) => !x), switchMap(() => this.center$));
276
+ map.dragPan.disable();
478
277
  }
479
278
  }));
480
- }), shareReplay(1));
481
- this.rawBoundNow$ = this.whenInitialized$.pipe(switchMap(() => this.mapInstance$.pipe(switchMap((x) => this._renderingTimer.pipe(map(() => {
482
- const bound = x.getBounds();
483
- const boundSw = bound.getSouthWest();
484
- const boundNe = bound.getNorthEast();
485
- const sw = isDefaultLatLngPoint(boundSw) ? swMostLatLngPoint() : { lat: boundSw.lat, lng: boundSw.lng };
486
- const ne = isDefaultLatLngPoint(boundNe) ? neMostLatLngPoint() : { lat: boundNe.lat, lng: boundNe.lng };
487
- return this.latLngBound(sw, ne);
488
- }))))), distinctUntilChanged(isSameLatLngBound), shareReplay(1));
489
- this.rawBound$ = this.whenInitialized$.pipe(switchMap(() => {
490
- return this.boundRefreshSettings$.pipe(switchMap((settings) => {
491
- const { throttle: throttleMs, refreshType } = settings;
492
- let obs;
493
- switch (refreshType) {
494
- case 'always':
495
- obs = this.rawBoundNow$;
496
- break;
497
- case 'when_not_rendering':
498
- obs = this.isRendering$.pipe(switchMap((x) => (x ? EMPTY : this.rawBoundNow$)));
499
- break;
500
- case 'only_after_render_finishes':
501
- obs = this.isRendering$.pipe(onTrueToFalse(), switchMap((x) => this.rawBoundNow$.pipe(first())));
502
- break;
279
+ }));
280
+ });
281
+ setZoomDisabled = this.effect((input) => {
282
+ return input.pipe(switchMap((disabled) => {
283
+ return this.mapInstance$.pipe(tap((map) => {
284
+ if (disabled === false) {
285
+ map.scrollZoom.enable();
286
+ map.doubleClickZoom.enable();
287
+ }
288
+ else {
289
+ map.scrollZoom.disable();
290
+ map.doubleClickZoom.disable();
503
291
  }
504
- return obs.pipe(throttleTime(throttleMs, undefined, { leading: true, trailing: true }));
505
292
  }));
506
- }), distinctUntilChanged(isSameLatLngBound), shareReplay(1));
507
- this.useVirtualBound$ = this.state$.pipe(map((x) => x.useVirtualBound), distinctUntilChanged(), shareReplay(1));
508
- this.bound$ = this.useVirtualBound$.pipe(switchMap((useVirtualBound) => {
509
- if (useVirtualBound) {
510
- return this.virtualBound$;
293
+ }));
294
+ });
295
+ setPitch = this.effect((input) => {
296
+ return input.pipe(switchMap((pitch) => {
297
+ return this.mapInstance$.pipe(tap((map) => map.setPitch(pitch)));
298
+ }));
299
+ });
300
+ setMinPitch = this.effect((input) => {
301
+ return input.pipe(switchMap((pitch) => {
302
+ return this.mapInstance$.pipe(tap((map) => map.setMinPitch(pitch)));
303
+ }));
304
+ });
305
+ setMaxPitch = this.effect((input) => {
306
+ return input.pipe(switchMap((pitch) => {
307
+ return this.mapInstance$.pipe(tap((map) => map.setMaxPitch(pitch)));
308
+ }));
309
+ });
310
+ setBearing = this.effect((input) => {
311
+ return input.pipe(switchMap((bearing) => {
312
+ return this.mapInstance$.pipe(tap((map) => map.setBearing(bearing)));
313
+ }));
314
+ });
315
+ rotateTo = this.effect((input) => {
316
+ return input.pipe(switchMap((rotateInput) => {
317
+ const rotate = typeof rotateInput === 'number' ? { bearing: rotateInput } : rotateInput;
318
+ return this.mapInstance$.pipe(tap((map) => map.rotateTo(rotate.bearing, rotate.options, rotate?.eventData)));
319
+ }));
320
+ });
321
+ resetNorth = this.effect((input) => {
322
+ return input.pipe(switchMap((reset) => {
323
+ return this.mapInstance$.pipe(tap((map) => map.resetNorth(reset?.options, reset?.eventData)));
324
+ }));
325
+ });
326
+ resetNorthPitch = this.effect((input) => {
327
+ return input.pipe(switchMap((reset) => {
328
+ return this.mapInstance$.pipe(tap((map) => map.resetNorthPitch(reset?.options, reset?.eventData)));
329
+ }));
330
+ });
331
+ snapToNorth = this.effect((input) => {
332
+ return input.pipe(switchMap((snap) => {
333
+ return this.mapInstance$.pipe(tap((map) => map.snapToNorth(snap?.options, snap?.eventData)));
334
+ }));
335
+ });
336
+ fitPositions = this.effect((input) => {
337
+ return input.pipe(switchMap((x) => {
338
+ const boundFromInput = latLngBoundFromInput(x.positions);
339
+ if (boundFromInput) {
340
+ const bound = this.latLngBound(boundFromInput);
341
+ return this.mapInstance$.pipe(tap((map) => map.fitBounds(new MapboxGl.LngLatBounds(bound.sw, bound.ne), x.options, x.eventData)));
511
342
  }
512
343
  else {
513
- return this.rawBound$;
344
+ return EMPTY;
514
345
  }
515
- }), shareReplay(1));
516
- this.boundSizing$ = this.bound$.pipe(map((x) => diffLatLngBoundPoints(x)), shareReplay(1));
517
- this.boundWrapsAroundWorld$ = this.bound$.pipe(map((x) => latLngBoundWrapsMap(x)), distinctUntilChanged(), shareReplay(1));
518
- this.isWithinBoundFunction$ = this.bound$.pipe(map((x) => isWithinLatLngBoundFunction(x)), shareReplay(1));
519
- this.overlapsBoundFunction$ = this.virtualBound$.pipe(map((x) => overlapsLatLngBoundFunction(x)), shareReplay(1));
520
- this.zoomNow$ = this.whenInitialized$.pipe(switchMap(() => this.mapInstance$.pipe(switchMap((x) => this._renderingTimer.pipe(map(() => x.getZoom()))), shareReplay(1))));
521
- this.zoom$ = this.whenInitialized$.pipe(switchMap(() => {
522
- return this.isZooming$.pipe(onTrueToFalse(), startWith(undefined), switchMap(() => this.zoomNow$.pipe(first())), distinctUntilChanged(), shareReplay(1));
523
346
  }));
524
- this.pitchNow$ = this.whenInitialized$.pipe(switchMap(() => this.mapInstance$.pipe(switchMap((x) => this._movingTimer.pipe(map(() => x.getPitch()))), shareReplay(1))));
525
- this.pitch$ = this.whenInitialized$.pipe(switchMap(() => {
526
- return this.isRotating$.pipe(onTrueToFalse(), startWith(undefined), switchMap(() => this.pitchNow$.pipe(first())), distinctUntilChanged(), shareReplay(1));
347
+ });
348
+ fitBounds = this.effect((input) => {
349
+ return input.pipe(switchMap((x) => {
350
+ const bound = this.latLngBound(x.bounds);
351
+ return this.mapInstance$.pipe(tap((map) => map.fitBounds(new MapboxGl.LngLatBounds(bound.sw, bound.ne), x.options, x.eventData)));
527
352
  }));
528
- this.bearingNow$ = this.whenInitialized$.pipe(switchMap(() => this.mapInstance$.pipe(switchMap((x) => this._movingTimer.pipe(map(() => x.getBearing()))), shareReplay(1))));
529
- this.bearing$ = this.whenInitialized$.pipe(switchMap(() => {
530
- return this.isRotating$.pipe(onTrueToFalse(), startWith(undefined), switchMap(() => this.bearingNow$.pipe(first())), distinctUntilChanged(), shareReplay(1));
353
+ });
354
+ jumpTo = this.effect((input) => {
355
+ return input.pipe(switchMap((x) => {
356
+ const inputCenter = x.center ?? x.to?.center;
357
+ const center = inputCenter ? this.safeLatLngPoint(inputCenter) : undefined;
358
+ return this.mapInstance$.pipe(tap((map) => map.jumpTo(filterUndefinedValues({ ...x.to, center }), x.eventData)));
531
359
  }));
532
- this.content$ = this.state$.pipe(map((x) => x.content), distinctUntilChanged(), shareReplay(1));
533
- this.hasContent$ = this.content$.pipe(map(Boolean));
534
- this.clickEvent$ = this.state$.pipe(map((x) => x.clickEvent), distinctUntilChanged(), shareReplay(1));
535
- this.doubleClickEvent$ = this.state$.pipe(map((x) => x.doubleClickEvent), distinctUntilChanged(), shareReplay(1));
536
- this.rightClickEvent$ = this.state$.pipe(map((x) => x.rightClickEvent), distinctUntilChanged(), shareReplay(1));
537
- // MARK: State Changes
538
- this.setMargin = this.updater((state, margin) => ({ ...state, margin: margin && (margin.rightMargin !== 0 || margin.leftMargin !== 0) ? margin : undefined }));
539
- this.setMinimumVirtualViewportSize = this.updater((state, minimumVirtualViewportSize) => ({ ...state, minimumVirtualViewportSize }));
540
- this.setUseVirtualBound = this.updater((state, useVirtualBound) => ({ ...state, useVirtualBound }));
541
- this.setBoundRefreshSettings = this.updater((state, boundRefreshSettings) => ({ ...state, boundRefreshSettings: { ...state.boundRefreshSettings, ...boundRefreshSettings } }));
542
- this._setMapService = this.updater((state, mapService) => ({ mapService, moveState: 'init', lifecycleState: 'init', zoomState: 'init', rotateState: 'init', retainContent: state.retainContent, content: state.retainContent ? state.content : undefined, useVirtualBound: state.useVirtualBound, boundRefreshSettings: state.boundRefreshSettings }));
543
- this._setLifecycleState = this.updater((state, lifecycleState) => ({ ...state, lifecycleState }));
544
- this._setMoveState = this.updater((state, moveState) => ({ ...state, moveState }));
545
- this._setZoomState = this.updater((state, zoomState) => ({ ...state, zoomState }));
546
- this._setRotateState = this.updater((state, rotateState) => ({ ...state, rotateState }));
547
- this._setMapCanvasSize = this.updater((state, mapCanvasSize) => ({ ...state, mapCanvasSize }));
548
- this._setClickEvent = this.updater((state, clickEvent) => ({ ...state, clickEvent }));
549
- this._setDoubleClickEvent = this.updater((state, doubleClickEvent) => ({ ...state, doubleClickEvent }));
550
- this._setRightClickEvent = this.updater((state, rightClickEvent) => ({ ...state, rightClickEvent }));
551
- this._setError = this.updater((state, error) => ({ ...state, error }));
552
- this.clearContent = this.updater((state) => ({ ...state, content: undefined }));
553
- this.setContent = this.updater((state, content) => ({ ...state, content }));
554
- }
360
+ });
361
+ easeTo = this.effect((input) => {
362
+ return input.pipe(switchMap((x) => {
363
+ const inputCenter = x.center ?? x.to?.center;
364
+ const center = inputCenter ? this.safeLatLngPoint(inputCenter) : undefined;
365
+ return this.mapInstance$.pipe(tap((map) => map.easeTo(filterUndefinedValues({ ...x.to, center }), x.eventData)));
366
+ }));
367
+ });
368
+ flyTo = this.effect((input) => {
369
+ return input.pipe(switchMap((x) => {
370
+ const inputCenter = x.center ?? x.to?.center;
371
+ const center = inputCenter ? this.safeLatLngPoint(inputCenter) : undefined;
372
+ return this.mapInstance$.pipe(tap((map) => map.flyTo(filterUndefinedValues({ ...x.to, center }), x.eventData)));
373
+ }));
374
+ });
375
+ resetPitchAndBearing = this.effect((input) => {
376
+ return input.pipe(switchMap(() => {
377
+ return this.mapInstance$.pipe(tap((map) => {
378
+ map.setPitch(0);
379
+ map.setBearing(0);
380
+ }));
381
+ }));
382
+ });
555
383
  // MARK: Accessors
556
384
  get timerRefreshPeriod() {
557
385
  return this.dbxMapboxService.mapboxMapStoreTimerRefreshPeriod;
@@ -616,10 +444,63 @@ class DbxMapboxMapStore extends ComponentStore {
616
444
  boundDecisionObs: this.overlapsBoundFunction$
617
445
  });
618
446
  }
447
+ currentMapService$ = this.state$.pipe(map((x) => x.mapService), distinctUntilChanged(), shareReplay(1));
448
+ mapService$ = this.currentMapService$.pipe(filterMaybe());
449
+ currentMapInstance$ = this.currentMapService$.pipe(switchMap((currentMapService) => {
450
+ if (currentMapService) {
451
+ return currentMapService.mapLoaded$.pipe(defaultIfEmpty(undefined), map(() => currentMapService.mapInstance));
452
+ }
453
+ else {
454
+ return of(undefined);
455
+ }
456
+ }), distinctUntilChanged(), shareReplay(1));
457
+ mapInstance$ = this.currentMapInstance$.pipe(filterMaybe());
458
+ boundRefreshSettings$ = this.state$.pipe(map((x) => x.boundRefreshSettings), shareReplay(1));
459
+ moveState$ = this.state$.pipe(map((x) => x.moveState), distinctUntilChanged(), shareReplay(1));
460
+ lifecycleState$ = this.state$.pipe(map((x) => x.lifecycleState), distinctUntilChanged(), shareReplay(1));
461
+ zoomState$ = this.state$.pipe(map((x) => x.zoomState), distinctUntilChanged(), shareReplay(1));
462
+ rotateState$ = this.state$.pipe(map((x) => x.rotateState), distinctUntilChanged(), shareReplay(1));
463
+ isInitialized$ = this.currentMapInstance$.pipe(switchMap((x) => {
464
+ if (!x) {
465
+ return of(false);
466
+ }
467
+ else {
468
+ return combineLatest([this.moveState$.pipe(map((x) => x === 'idle')), this.lifecycleState$.pipe(map((x) => x === 'idle'))]).pipe(filter(([m, l]) => m && l), first(), map(() => true));
469
+ }
470
+ }), shareReplay(1));
471
+ whenInitialized$ = this.isInitialized$.pipe(filter((x) => true), shareReplay(1));
472
+ isRendering$ = this.whenInitialized$.pipe(switchMap(() => this.lifecycleState$.pipe(map((x) => x === 'render'), distinctUntilChanged(), shareReplay(1))));
473
+ isMoving$ = this.whenInitialized$.pipe(switchMap(() => this.moveState$.pipe(map((x) => x === 'moving'), distinctUntilChanged(), shareReplay(1))));
474
+ isZooming$ = this.whenInitialized$.pipe(switchMap(() => this.zoomState$.pipe(map((x) => x === 'zooming'), distinctUntilChanged(), shareReplay(1))));
475
+ isRotating$ = this.whenInitialized$.pipe(switchMap(() => this.rotateState$.pipe(map((x) => x === 'rotating'), distinctUntilChanged(), shareReplay(1))));
476
+ _movingTimer = this.movingTimer();
477
+ _renderingTimer = this.lifecycleRenderTimer();
478
+ centerNow$ = this.whenInitialized$.pipe(switchMap(() => this.mapInstance$.pipe(switchMap((x) => this._movingTimer.pipe(map(() => this.latLngPoint(x.getCenter())))), shareReplay(1))), shareReplay(1));
479
+ center$ = this.whenInitialized$.pipe(switchMap(() => {
480
+ return this.isMoving$.pipe(onTrueToFalse(), startWith(undefined), switchMap(() => this.centerNow$.pipe(first())), distinctUntilChanged(isSameLatLngPoint), shareReplay(1));
481
+ }), shareReplay(1));
482
+ minimumVirtualViewportSize$ = this.state$.pipe(map((x) => x.minimumVirtualViewportSize), distinctUntilChanged(isSameVector), shareReplay(1));
483
+ currentMapCanvasSize$ = this.state$.pipe(map((x) => x.mapCanvasSize), distinctUntilChanged(isSameVector), shareReplay(1));
484
+ /**
485
+ * The map canvas size with consideration to the virtual viewport size.
486
+ */
487
+ mapCanvasSize$ = this.currentMapCanvasSize$.pipe(filterMaybe());
619
488
  minimumMapCanvasSize(minVector) {
620
489
  const resizeFn = vectorMinimumSizeResizeFunction(minVector);
621
490
  return this.mapCanvasSize$.pipe(map((x) => resizeFn(x)), distinctUntilChanged(isSameVector), shareReplay(1));
622
491
  }
492
+ /**
493
+ * The map canvas size with consideration to the virtual viewport size.
494
+ */
495
+ virtualMapCanvasSize$ = this.minimumVirtualViewportSize$.pipe(switchMap((minimumVirtualViewportSize) => {
496
+ if (minimumVirtualViewportSize) {
497
+ return this.minimumMapCanvasSize(minimumVirtualViewportSize);
498
+ }
499
+ else {
500
+ return this.mapCanvasSize$;
501
+ }
502
+ }), distinctUntilChanged(isSameVector), shareReplay(1));
503
+ rawViewportBoundFunction$ = this.mapCanvasSize$.pipe(map((mapCanvasSize) => mapboxViewportBoundFunction({ mapCanvasSize })), shareReplay(1));
623
504
  /**
624
505
  * Creates a MapboxViewportBoundFunction observable that returns the minimum viewport size.
625
506
  *
@@ -630,32 +511,146 @@ class DbxMapboxMapStore extends ComponentStore {
630
511
  const resizeFn = vectorMinimumSizeResizeFunction(minVector);
631
512
  return this.mapCanvasSize$.pipe(map((x) => resizeFn(x)), distinctUntilChanged(isSameVector), map((mapCanvasSize) => mapboxViewportBoundFunction({ mapCanvasSize })), shareReplay(1));
632
513
  }
633
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxMapStore, deps: [{ token: DbxMapboxService }], target: i0.ɵɵFactoryTarget.Injectable }); }
634
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxMapStore }); }
514
+ viewportBoundFunction$ = this.minimumVirtualViewportSize$.pipe(switchMap((minimumVirtualViewportSize) => {
515
+ if (minimumVirtualViewportSize) {
516
+ return this.viewportBoundFunctionWithMinimumSize(minimumVirtualViewportSize);
517
+ }
518
+ else {
519
+ return this.rawViewportBoundFunction$;
520
+ }
521
+ }), shareReplay(1));
522
+ virtualBound$ = this.viewportBoundFunction$.pipe(switchMap((fn) => {
523
+ return this.boundRefreshSettings$.pipe(switchMap((settings) => {
524
+ const { throttle: throttleMs, refreshType } = settings;
525
+ let obs;
526
+ switch (refreshType) {
527
+ case 'always':
528
+ obs = combineLatest([this.centerNow$, this.zoomNow$]);
529
+ break;
530
+ case 'when_not_rendering':
531
+ case 'only_after_render_finishes':
532
+ obs = this.bound$.pipe(switchMap(() => combineLatest([this.centerNow$, this.zoomNow$]))); // refresh whenever the bound refreshes
533
+ break;
534
+ }
535
+ return obs.pipe(throttleTime(throttleMs, undefined, { leading: true, trailing: true }), map(([center, zoom]) => fn({
536
+ center,
537
+ zoom
538
+ })));
539
+ }));
540
+ }), distinctUntilChanged(isSameLatLngBound), shareReplay(1));
541
+ margin$ = this.state$.pipe(map((x) => x.margin), distinctUntilChanged((a, b) => a != null && b != null && a.fullWidth === b.fullWidth && a.leftMargin === b.leftMargin && a.rightMargin === b.rightMargin), shareReplay(1));
542
+ reverseMargin$ = this.margin$.pipe(map((x) => {
543
+ if (x) {
544
+ return { leftMargin: -x.leftMargin, rightMargin: -x.rightMargin, fullWidth: x.fullWidth };
545
+ }
546
+ else {
547
+ return x;
548
+ }
549
+ }));
550
+ centerGivenMargin$ = this.whenInitialized$.pipe(switchMap(() => {
551
+ return this.reverseMargin$.pipe(switchMap((x) => {
552
+ if (x) {
553
+ return this.center$.pipe(switchMap((_) => this.calculateNextCenterOffsetWithScreenMarginChange(x)));
554
+ }
555
+ else {
556
+ return this.isMoving$.pipe(filter((x) => !x), switchMap(() => this.center$));
557
+ }
558
+ }));
559
+ }), shareReplay(1));
560
+ rawBoundNow$ = this.whenInitialized$.pipe(switchMap(() => this.mapInstance$.pipe(switchMap((x) => this._renderingTimer.pipe(map(() => {
561
+ const bound = x.getBounds();
562
+ const boundSw = bound.getSouthWest();
563
+ const boundNe = bound.getNorthEast();
564
+ const sw = isDefaultLatLngPoint(boundSw) ? swMostLatLngPoint() : { lat: boundSw.lat, lng: boundSw.lng };
565
+ const ne = isDefaultLatLngPoint(boundNe) ? neMostLatLngPoint() : { lat: boundNe.lat, lng: boundNe.lng };
566
+ return this.latLngBound(sw, ne);
567
+ }))))), distinctUntilChanged(isSameLatLngBound), shareReplay(1));
568
+ rawBound$ = this.whenInitialized$.pipe(switchMap(() => {
569
+ return this.boundRefreshSettings$.pipe(switchMap((settings) => {
570
+ const { throttle: throttleMs, refreshType } = settings;
571
+ let obs;
572
+ switch (refreshType) {
573
+ case 'always':
574
+ obs = this.rawBoundNow$;
575
+ break;
576
+ case 'when_not_rendering':
577
+ obs = this.isRendering$.pipe(switchMap((x) => (x ? EMPTY : this.rawBoundNow$)));
578
+ break;
579
+ case 'only_after_render_finishes':
580
+ obs = this.isRendering$.pipe(onTrueToFalse(), switchMap((x) => this.rawBoundNow$.pipe(first())));
581
+ break;
582
+ }
583
+ return obs.pipe(throttleTime(throttleMs, undefined, { leading: true, trailing: true }));
584
+ }));
585
+ }), distinctUntilChanged(isSameLatLngBound), shareReplay(1));
586
+ useVirtualBound$ = this.state$.pipe(map((x) => x.useVirtualBound), distinctUntilChanged(), shareReplay(1));
587
+ bound$ = this.useVirtualBound$.pipe(switchMap((useVirtualBound) => {
588
+ if (useVirtualBound) {
589
+ return this.virtualBound$;
590
+ }
591
+ else {
592
+ return this.rawBound$;
593
+ }
594
+ }), shareReplay(1));
595
+ boundSizing$ = this.bound$.pipe(map((x) => diffLatLngBoundPoints(x)), shareReplay(1));
596
+ boundWrapsAroundWorld$ = this.bound$.pipe(map((x) => latLngBoundWrapsMap(x)), distinctUntilChanged(), shareReplay(1));
597
+ isWithinBoundFunction$ = this.bound$.pipe(map((x) => isWithinLatLngBoundFunction(x)), shareReplay(1));
598
+ overlapsBoundFunction$ = this.virtualBound$.pipe(map((x) => overlapsLatLngBoundFunction(x)), shareReplay(1));
599
+ zoomNow$ = this.whenInitialized$.pipe(switchMap(() => this.mapInstance$.pipe(switchMap((x) => this._renderingTimer.pipe(map(() => x.getZoom()))), shareReplay(1))));
600
+ zoom$ = this.whenInitialized$.pipe(switchMap(() => {
601
+ return this.isZooming$.pipe(onTrueToFalse(), startWith(undefined), switchMap(() => this.zoomNow$.pipe(first())), distinctUntilChanged(), shareReplay(1));
602
+ }));
603
+ pitchNow$ = this.whenInitialized$.pipe(switchMap(() => this.mapInstance$.pipe(switchMap((x) => this._movingTimer.pipe(map(() => x.getPitch()))), shareReplay(1))));
604
+ pitch$ = this.whenInitialized$.pipe(switchMap(() => {
605
+ return this.isRotating$.pipe(onTrueToFalse(), startWith(undefined), switchMap(() => this.pitchNow$.pipe(first())), distinctUntilChanged(), shareReplay(1));
606
+ }));
607
+ bearingNow$ = this.whenInitialized$.pipe(switchMap(() => this.mapInstance$.pipe(switchMap((x) => this._movingTimer.pipe(map(() => x.getBearing()))), shareReplay(1))));
608
+ bearing$ = this.whenInitialized$.pipe(switchMap(() => {
609
+ return this.isRotating$.pipe(onTrueToFalse(), startWith(undefined), switchMap(() => this.bearingNow$.pipe(first())), distinctUntilChanged(), shareReplay(1));
610
+ }));
611
+ content$ = this.state$.pipe(map((x) => x.content), distinctUntilChanged(), shareReplay(1));
612
+ hasContent$ = this.content$.pipe(map(Boolean));
613
+ clickEvent$ = this.state$.pipe(map((x) => x.clickEvent), distinctUntilChanged(), shareReplay(1));
614
+ doubleClickEvent$ = this.state$.pipe(map((x) => x.doubleClickEvent), distinctUntilChanged(), shareReplay(1));
615
+ rightClickEvent$ = this.state$.pipe(map((x) => x.rightClickEvent), distinctUntilChanged(), shareReplay(1));
616
+ // MARK: State Changes
617
+ setMargin = this.updater((state, margin) => ({ ...state, margin: margin && (margin.rightMargin !== 0 || margin.leftMargin !== 0) ? margin : undefined }));
618
+ setMinimumVirtualViewportSize = this.updater((state, minimumVirtualViewportSize) => ({ ...state, minimumVirtualViewportSize }));
619
+ setUseVirtualBound = this.updater((state, useVirtualBound) => ({ ...state, useVirtualBound }));
620
+ setBoundRefreshSettings = this.updater((state, boundRefreshSettings) => ({ ...state, boundRefreshSettings: { ...state.boundRefreshSettings, ...boundRefreshSettings } }));
621
+ _setMapService = this.updater((state, mapService) => ({ mapService, moveState: 'init', lifecycleState: 'init', zoomState: 'init', rotateState: 'init', retainContent: state.retainContent, content: state.retainContent ? state.content : undefined, useVirtualBound: state.useVirtualBound, boundRefreshSettings: state.boundRefreshSettings }));
622
+ _setLifecycleState = this.updater((state, lifecycleState) => ({ ...state, lifecycleState }));
623
+ _setMoveState = this.updater((state, moveState) => ({ ...state, moveState }));
624
+ _setZoomState = this.updater((state, zoomState) => ({ ...state, zoomState }));
625
+ _setRotateState = this.updater((state, rotateState) => ({ ...state, rotateState }));
626
+ _setMapCanvasSize = this.updater((state, mapCanvasSize) => ({ ...state, mapCanvasSize }));
627
+ _setClickEvent = this.updater((state, clickEvent) => ({ ...state, clickEvent }));
628
+ _setDoubleClickEvent = this.updater((state, doubleClickEvent) => ({ ...state, doubleClickEvent }));
629
+ _setRightClickEvent = this.updater((state, rightClickEvent) => ({ ...state, rightClickEvent }));
630
+ _setError = this.updater((state, error) => ({ ...state, error }));
631
+ clearContent = this.updater((state) => ({ ...state, content: undefined }));
632
+ setContent = this.updater((state, content) => ({ ...state, content }));
633
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxMapStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
634
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxMapStore });
635
635
  }
636
636
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxMapStore, decorators: [{
637
637
  type: Injectable
638
- }], ctorParameters: function () { return [{ type: DbxMapboxService, decorators: [{
639
- type: Inject,
640
- args: [DbxMapboxService]
641
- }] }]; } });
638
+ }], ctorParameters: function () { return []; } });
642
639
 
643
640
  /**
644
641
  * Provided in the parent component that allows children to emit events related to their lifecycles.
645
642
  */
646
643
  class DbxMapboxChangeService {
647
- constructor(dbxMapboxMapStore) {
648
- this.dbxMapboxMapStore = dbxMapboxMapStore;
649
- this._markerDestroyed = new Subject();
650
- this._applyChanges = new Subject();
651
- this.markerDestroyed$ = this._markerDestroyed;
652
- this.applyChanges$ = merge(this._applyChanges, this.markerDestroyed$).pipe(throttleTime(100, undefined, { leading: false, trailing: true }));
653
- this._applyChangesSub = new SubscriptionObject(this.dbxMapboxMapStore.mapService$
654
- .pipe(switchMap((mapService) => this.applyChanges$.pipe(tap(() => {
655
- mapService.applyChanges();
656
- }))))
657
- .subscribe());
658
- }
644
+ dbxMapboxMapStore = inject(DbxMapboxMapStore);
645
+ _markerDestroyed = new Subject();
646
+ _applyChanges = new Subject();
647
+ markerDestroyed$ = this._markerDestroyed;
648
+ applyChanges$ = merge(this._applyChanges, this.markerDestroyed$).pipe(throttleTime(100, undefined, { leading: false, trailing: true }));
649
+ _applyChangesSub = new SubscriptionObject(this.dbxMapboxMapStore.mapService$
650
+ .pipe(switchMap((mapService) => this.applyChanges$.pipe(tap(() => {
651
+ mapService.applyChanges();
652
+ }))))
653
+ .subscribe());
659
654
  applyChanges() {
660
655
  this._applyChanges.next();
661
656
  }
@@ -667,15 +662,15 @@ class DbxMapboxChangeService {
667
662
  this._applyChanges.complete();
668
663
  this._applyChangesSub.destroy();
669
664
  }
670
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxChangeService, deps: [{ token: DbxMapboxMapStore }], target: i0.ɵɵFactoryTarget.Injectable }); }
671
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxChangeService, providedIn: null }); }
665
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxChangeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
666
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxChangeService, providedIn: null });
672
667
  }
673
668
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxChangeService, decorators: [{
674
669
  type: Injectable,
675
670
  args: [{
676
671
  providedIn: null
677
672
  }]
678
- }], ctorParameters: function () { return [{ type: DbxMapboxMapStore }]; } });
673
+ }] });
679
674
 
680
675
  /**
681
676
  * Store used for storing injectable content into the map.
@@ -685,14 +680,14 @@ class DbxMapboxInjectionStore extends ComponentStore {
685
680
  super({
686
681
  map: new Map()
687
682
  });
688
- this.map$ = this.state$.pipe(map((x) => x.map), distinctUntilMapHasDifferentKeys(), shareReplay(1));
689
- this.allInjectionConfigs$ = this.map$.pipe(map((x) => Array.from(x.values())), shareReplay(1));
690
- // MARK: State Changes
691
- this.addInjectionConfig = this.updater(updateDbxMapboxMapInjectionStoreStateWithInjectionConfig);
692
- this.removeInjectionConfigWithKey = this.updater(updateDbxMapboxMapInjectionStoreStateWithRemovedKey);
693
683
  }
694
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxInjectionStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
695
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxInjectionStore }); }
684
+ map$ = this.state$.pipe(map((x) => x.map), distinctUntilMapHasDifferentKeys(), shareReplay(1));
685
+ allInjectionConfigs$ = this.map$.pipe(map((x) => Array.from(x.values())), shareReplay(1));
686
+ // MARK: State Changes
687
+ addInjectionConfig = this.updater(updateDbxMapboxMapInjectionStoreStateWithInjectionConfig);
688
+ removeInjectionConfigWithKey = this.updater(updateDbxMapboxMapInjectionStoreStateWithRemovedKey);
689
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxInjectionStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
690
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxInjectionStore });
696
691
  }
697
692
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxInjectionStore, decorators: [{
698
693
  type: Injectable
@@ -715,15 +710,12 @@ function updateDbxMapboxMapInjectionStoreStateWithRemovedKey(state, key) {
715
710
  * Injects the components configured in the DbxMapboxInjectionStore into the view.
716
711
  */
717
712
  class DbxMapboxInjectionComponent {
718
- constructor(dbxMapboxMapKeyInjectionStore, injector) {
719
- this.dbxMapboxMapKeyInjectionStore = dbxMapboxMapKeyInjectionStore;
720
- this.injector = injector;
721
- this.entries$ = this.dbxMapboxMapKeyInjectionStore.allInjectionConfigs$.pipe(shareReplay(1));
722
- }
723
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxInjectionComponent, deps: [{ token: DbxMapboxInjectionStore }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
724
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxMapboxInjectionComponent, selector: "dbx-mapbox-injection", ngImport: i0, template: `
713
+ dbxMapboxMapKeyInjectionStore = inject(DbxMapboxInjectionStore);
714
+ entries$ = this.dbxMapboxMapKeyInjectionStore.allInjectionConfigs$.pipe(shareReplay(1));
715
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxInjectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
716
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxMapboxInjectionComponent, selector: "dbx-mapbox-injection", ngImport: i0, template: `
725
717
  <dbx-injection-array [entries]="entries$ | async"></dbx-injection-array>
726
- `, isInline: true, dependencies: [{ kind: "component", type: i2.DbxInjectionArrayComponent, selector: "dbx-injection-array", inputs: ["entries"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
718
+ `, isInline: true, dependencies: [{ kind: "component", type: i1.DbxInjectionArrayComponent, selector: "dbx-injection-array", inputs: ["entries"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
727
719
  }
728
720
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxInjectionComponent, decorators: [{
729
721
  type: Component,
@@ -734,26 +726,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
734
726
  `,
735
727
  changeDetection: ChangeDetectionStrategy.OnPush
736
728
  }]
737
- }], ctorParameters: function () { return [{ type: DbxMapboxInjectionStore }, { type: i0.Injector }]; } });
729
+ }] });
738
730
 
739
731
  /**
740
732
  * Token used by provideMapboxInjectionStoreIfDoesNotExist() to prevent injecting a parent DbxMapboxInjectionStore into the child view.
741
733
  */
742
734
  class DbxMapboxInjectionStoreProviderBlock {
743
- constructor(dbxMapboxInjectionStore) {
744
- this.dbxMapboxInjectionStore = dbxMapboxInjectionStore;
745
- }
746
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxInjectionStoreProviderBlock, deps: [{ token: DbxMapboxInjectionStore, skipSelf: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
747
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxInjectionStoreProviderBlock }); }
735
+ dbxMapboxInjectionStore = inject(DbxMapboxInjectionStore, { skipSelf: true });
736
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxInjectionStoreProviderBlock, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
737
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxInjectionStoreProviderBlock });
748
738
  }
749
739
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxInjectionStoreProviderBlock, decorators: [{
750
740
  type: Injectable
751
- }], ctorParameters: function () { return [{ type: DbxMapboxInjectionStore, decorators: [{
752
- type: SkipSelf
753
- }] }]; } });
741
+ }] });
754
742
  class DbxMapboxInjectionStoreInjectionBlockDirective {
755
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxInjectionStoreInjectionBlockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
756
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxMapboxInjectionStoreInjectionBlockDirective, selector: "[dbxMapboxInjectionStoreParentBlocker]", providers: [DbxMapboxInjectionStoreProviderBlock], ngImport: i0 }); }
743
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxInjectionStoreInjectionBlockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
744
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxMapboxInjectionStoreInjectionBlockDirective, selector: "[dbxMapboxInjectionStoreParentBlocker]", providers: [DbxMapboxInjectionStoreProviderBlock], ngImport: i0 });
757
745
  }
758
746
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxInjectionStoreInjectionBlockDirective, decorators: [{
759
747
  type: Directive,
@@ -788,14 +776,10 @@ function provideMapboxInjectionStoreIfParentIsUnavailable() {
788
776
  * Directive that configures a MapComponent with content from DbxMapboxService. Connects a host MapService to a parent DbxMapboxMapStore if available.
789
777
  */
790
778
  class DbxMapboxMapDirective {
791
- constructor(
792
- //
793
- mapService, mapboxMap, dbxMapboxService, dbxMapboxMapStore) {
794
- this.mapService = mapService;
795
- this.mapboxMap = mapboxMap;
796
- this.dbxMapboxService = dbxMapboxService;
797
- this.dbxMapboxMapStore = dbxMapboxMapStore;
798
- }
779
+ mapService = inject(MapService, { host: true });
780
+ mapboxMap = inject(MapComponent, { host: true });
781
+ dbxMapboxService = inject(DbxMapboxService);
782
+ dbxMapboxMapStore = inject(DbxMapboxMapStore, { optional: true });
799
783
  ngOnInit() {
800
784
  // style must be provided first before the map will load.
801
785
  this.mapboxMap.style = this.dbxMapboxService.defaultStyle;
@@ -805,39 +789,31 @@ class DbxMapboxMapDirective {
805
789
  this.dbxMapboxMapStore.setMapService(this.mapService);
806
790
  }
807
791
  }
808
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxMapDirective, deps: [{ token: i1.MapService, host: true }, { token: i1.MapComponent, host: true }, { token: DbxMapboxService }, { token: DbxMapboxMapStore, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
809
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxMapboxMapDirective, selector: "[dbxMapboxMap]", ngImport: i0 }); }
792
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxMapDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
793
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxMapboxMapDirective, selector: "[dbxMapboxMap]", ngImport: i0 });
810
794
  }
811
795
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxMapDirective, decorators: [{
812
796
  type: Directive,
813
797
  args: [{
814
798
  selector: '[dbxMapboxMap]'
815
799
  }]
816
- }], ctorParameters: function () { return [{ type: i1.MapService, decorators: [{
817
- type: Host
818
- }] }, { type: i1.MapComponent, decorators: [{
819
- type: Host
820
- }] }, { type: DbxMapboxService }, { type: DbxMapboxMapStore, decorators: [{
821
- type: Optional
822
- }] }]; } });
800
+ }] });
823
801
 
824
802
  /**
825
803
  * Content drawer that connects with DbxMapboxMapStore to show the content.
826
804
  */
827
805
  class DbxMapboxLayoutDrawerComponent {
828
- constructor(dbxMapboxMapStore) {
829
- this.dbxMapboxMapStore = dbxMapboxMapStore;
830
- this.config$ = this.dbxMapboxMapStore.content$;
831
- }
832
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxLayoutDrawerComponent, deps: [{ token: DbxMapboxMapStore }], target: i0.ɵɵFactoryTarget.Component }); }
833
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxMapboxLayoutDrawerComponent, selector: "dbx-mapbox-layout-drawer", host: { classAttribute: "dbx-mapbox-layout-drawer" }, ngImport: i0, template: "<div>\n <dbx-injection [config]=\"config$ | async\"></dbx-injection>\n</div>\n", dependencies: [{ kind: "component", type: i2.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }] }); }
806
+ dbxMapboxMapStore = inject(DbxMapboxMapStore);
807
+ config$ = this.dbxMapboxMapStore.content$;
808
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxLayoutDrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
809
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxMapboxLayoutDrawerComponent, selector: "dbx-mapbox-layout-drawer", host: { classAttribute: "dbx-mapbox-layout-drawer" }, ngImport: i0, template: "<div>\n <dbx-injection [config]=\"config$ | async\"></dbx-injection>\n</div>\n", dependencies: [{ kind: "component", type: i1.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] });
834
810
  }
835
811
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxLayoutDrawerComponent, decorators: [{
836
812
  type: Component,
837
813
  args: [{ selector: 'dbx-mapbox-layout-drawer', host: {
838
814
  class: 'dbx-mapbox-layout-drawer'
839
815
  }, template: "<div>\n <dbx-injection [config]=\"config$ | async\"></dbx-injection>\n</div>\n" }]
840
- }], ctorParameters: function () { return [{ type: DbxMapboxMapStore }]; } });
816
+ }] });
841
817
 
842
818
  /**
843
819
  * Responsive component meant to split a left and right column.
@@ -846,40 +822,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
846
822
  *
847
823
  * Requires a TwoColumnsContextStore to be provided.
848
824
  */
849
- class DbxMapboxLayoutComponent extends SubscriptionObject {
850
- constructor(dbxMapboxMapStore) {
851
- super();
852
- this.dbxMapboxMapStore = dbxMapboxMapStore;
853
- this.openedChange = new EventEmitter();
854
- this._resized = new Subject();
855
- this._updateMargins = new Subject();
856
- this._forceHasContent = new BehaviorSubject(false);
857
- this._mode = new BehaviorSubject('side');
858
- this._side = new BehaviorSubject('right');
859
- this._isOpen = new BehaviorSubject(true);
860
- this._color = new BehaviorSubject('background');
861
- this._toggleSub = new SubscriptionObject();
862
- this.resized$ = this._resized.asObservable();
863
- this.side$ = this._side.pipe(distinctUntilChanged(), shareReplay(1));
864
- this.mode$ = this._mode.pipe(distinctUntilChanged(), shareReplay(1));
865
- this.hasContent$ = combineLatest([this._forceHasContent, this.dbxMapboxMapStore.hasContent$]).pipe(map(([hasContent, forceHasContent]) => hasContent || forceHasContent), distinctUntilChanged(), shareReplay(1));
866
- this.isOpen$ = this._isOpen.asObservable();
867
- this.isOpenAndHasContent$ = combineLatest([this.hasContent$, this._isOpen]).pipe(map(([hasContent, open]) => hasContent && open), distinctUntilChanged(), shareReplay(1));
868
- this.position$ = this.side$.pipe(map((x) => (x === 'right' ? 'end' : 'start')), distinctUntilChanged(), shareReplay(1));
869
- this.drawerClasses$ = combineLatest([this.side$, this.dbxMapboxMapStore.hasContent$, this.isOpenAndHasContent$]).pipe(
870
- //
871
- map(([side, hasContent, open]) => (hasContent ? 'has-drawer-content' : 'no-drawer-content') + ` ${side}-drawer ` + (open ? 'open-drawer' : '')), distinctUntilChanged(), shareReplay(1));
872
- this.drawerButtonColor$ = this._color.pipe(distinctUntilChanged(), shareReplay(1));
873
- this.buttonIcon$ = combineLatest([this.side$, this.isOpenAndHasContent$]).pipe(map(([side, opened]) => {
874
- let icons = ['chevron_right', 'chevron_left'];
875
- if (side === 'left') {
876
- icons = icons.reverse();
877
- }
878
- return opened ? icons[0] : icons[1];
879
- }));
880
- }
825
+ class DbxMapboxLayoutComponent extends AbstractSubscriptionDirective {
826
+ dbxMapboxMapStore = inject(DbxMapboxMapStore);
827
+ openedChange = new EventEmitter();
828
+ containerElement;
829
+ drawerContainer;
830
+ content;
831
+ _resized = new Subject();
832
+ _updateMargins = new Subject();
833
+ _forceHasContent = new BehaviorSubject(false);
834
+ _mode = new BehaviorSubject('side');
835
+ _side = new BehaviorSubject('right');
836
+ _isOpen = new BehaviorSubject(true);
837
+ _color = new BehaviorSubject('background');
838
+ _toggleSub = new SubscriptionObject();
839
+ resized$ = this._resized.asObservable();
840
+ side$ = this._side.pipe(distinctUntilChanged(), shareReplay(1));
841
+ mode$ = this._mode.pipe(distinctUntilChanged(), shareReplay(1));
842
+ hasContent$ = combineLatest([this._forceHasContent, this.dbxMapboxMapStore.hasContent$]).pipe(map(([hasContent, forceHasContent]) => hasContent || forceHasContent), distinctUntilChanged(), shareReplay(1));
843
+ isOpen$ = this._isOpen.asObservable();
844
+ isOpenAndHasContent$ = combineLatest([this.hasContent$, this._isOpen]).pipe(map(([hasContent, open]) => hasContent && open), distinctUntilChanged(), shareReplay(1));
845
+ position$ = this.side$.pipe(map((x) => (x === 'right' ? 'end' : 'start')), distinctUntilChanged(), shareReplay(1));
846
+ drawerClasses$ = combineLatest([this.side$, this.dbxMapboxMapStore.hasContent$, this.isOpenAndHasContent$]).pipe(
847
+ //
848
+ map(([side, hasContent, open]) => (hasContent ? 'has-drawer-content' : 'no-drawer-content') + ` ${side}-drawer ` + (open ? 'open-drawer' : '')), distinctUntilChanged(), shareReplay(1));
849
+ drawerButtonColor$ = this._color.pipe(distinctUntilChanged(), shareReplay(1));
850
+ buttonIcon$ = combineLatest([this.side$, this.isOpenAndHasContent$]).pipe(map(([side, opened]) => {
851
+ let icons = ['chevron_right', 'chevron_left'];
852
+ if (side === 'left') {
853
+ icons = icons.reverse();
854
+ }
855
+ return opened ? icons[0] : icons[1];
856
+ }));
881
857
  ngOnInit() {
882
- this.subscription = this.side$.pipe(switchMap(() => this._resized.pipe(throttleTime(100, undefined, { leading: true, trailing: true }), map(() => 'r'), startWith('s')))).subscribe((reason) => {
858
+ this.sub = this.side$.pipe(switchMap(() => this._resized.pipe(throttleTime(100, undefined, { leading: true, trailing: true }), map(() => 'r'), startWith('s')))).subscribe((reason) => {
883
859
  this.dbxMapboxMapStore.mapInstance$.subscribe((x) => {
884
860
  x.resize();
885
861
  // side changed
@@ -933,6 +909,7 @@ class DbxMapboxLayoutComponent extends SubscriptionObject {
933
909
  .subscribe();
934
910
  }
935
911
  ngOnDestroy() {
912
+ super.ngOnDestroy();
936
913
  this.openedChange.complete();
937
914
  this._resized.complete();
938
915
  this._updateMargins.complete();
@@ -980,13 +957,13 @@ class DbxMapboxLayoutComponent extends SubscriptionObject {
980
957
  this.openedChange.next(opened);
981
958
  }
982
959
  }
983
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxLayoutComponent, deps: [{ token: DbxMapboxMapStore }], target: i0.ɵɵFactoryTarget.Component }); }
984
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxMapboxLayoutComponent, selector: "dbx-mapbox-layout", inputs: { side: "side", mode: "mode", opened: "opened", hasContent: "hasContent", drawerButtonColor: "drawerButtonColor" }, outputs: { openedChange: "openedChange" }, viewQueries: [{ propertyName: "containerElement", first: true, predicate: MatDrawerContainer, descendants: true, read: ElementRef }, { propertyName: "drawerContainer", first: true, predicate: MatDrawerContainer, descendants: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true, read: ElementRef, static: true }], usesInheritance: true, ngImport: i0, template: "<mat-drawer-container #containerElement class=\"dbx-mapbox-layout-container\" [ngClass]=\"(drawerClasses$ | async) || ''\" [hasBackdrop]=\"false\">\n <mat-drawer class=\"dbx-mapbox-layout-drawer\" #drawer (openedChange)=\"onOpened($event)\" [opened]=\"isOpenAndHasContent$ | async\" [mode]=\"(mode$ | async) || 'side'\" [position]=\"(position$ | async) || 'end'\">\n <div class=\"dbx-mapbox-layout-drawer-content\" [ngClass]=\"(drawerClasses$ | async) || ''\">\n <ng-content select=\"[drawer]\"></ng-content>\n <dbx-mapbox-layout-drawer></dbx-mapbox-layout-drawer>\n </div>\n </mat-drawer>\n <mat-drawer-content #content class=\"dbx-mapbox-layout-content\" (resized)=\"onResized($event)\">\n <button mat-icon-button (click)=\"toggleDrawer()\" class=\"dbx-mapbox-layout-drawer-button\" [dbxColor]=\"drawerButtonColor$ | async\">\n <mat-icon>{{ buttonIcon$ | async }}</mat-icon>\n </button>\n <ng-content></ng-content>\n </mat-drawer-content>\n</mat-drawer-container>\n", styles: [".dbx-mapbox-layout-container{height:100%;max-width:100%}.dbx-mapbox-layout-container .mat-drawer-container{height:100%}.dbx-mapbox-layout-container .dbx-mapbox-layout-drawer{max-width:calc(100% - var(--dbx-mapbox-min-width-var, 33px))}.dbx-mapbox-layout-container .dbx-mapbox-layout-drawer-content{height:100%;width:100%;overflow:hidden}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{position:absolute;z-index:2;top:40%;border:none;display:flex;overflow:hidden}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button.mat-mdc-icon-button{padding-left:0}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button.mat-mdc-icon-button ::ng-deep>.mat-mdc-button-persistent-ripple{border-radius:unset}.left-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{left:0;border-radius:0 20px 20px 0}.right-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{right:0;border-radius:20px 0 0 20px}.has-drawer-content .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:35px}.has-drawer-content.open-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:35px}.no-drawer-content .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:0px}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button mat-icon{padding-left:8px}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: i3.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: i3.MatDrawerContent, selector: "mat-drawer-content" }, { kind: "directive", type: i4.DbxColorDirective, selector: "[dbxColor]", inputs: ["dbxColor"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7.ResizedDirective, selector: "[resized]", outputs: ["resized"] }, { kind: "component", type: DbxMapboxLayoutDrawerComponent, selector: "dbx-mapbox-layout-drawer" }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }] }); }
960
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxLayoutComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
961
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxMapboxLayoutComponent, selector: "dbx-mapbox-layout", inputs: { side: "side", mode: "mode", opened: "opened", hasContent: "hasContent", drawerButtonColor: "drawerButtonColor" }, outputs: { openedChange: "openedChange" }, viewQueries: [{ propertyName: "containerElement", first: true, predicate: MatDrawerContainer, descendants: true, read: ElementRef }, { propertyName: "drawerContainer", first: true, predicate: MatDrawerContainer, descendants: true }, { propertyName: "content", first: true, predicate: ["content"], descendants: true, read: ElementRef, static: true }], usesInheritance: true, ngImport: i0, template: "<mat-drawer-container #containerElement class=\"dbx-mapbox-layout-container\" [ngClass]=\"(drawerClasses$ | async) || ''\" [hasBackdrop]=\"false\">\n <mat-drawer class=\"dbx-mapbox-layout-drawer\" #drawer (openedChange)=\"onOpened($event)\" [opened]=\"isOpenAndHasContent$ | async\" [mode]=\"(mode$ | async) || 'side'\" [position]=\"(position$ | async) || 'end'\">\n <div class=\"dbx-mapbox-layout-drawer-content\" [ngClass]=\"(drawerClasses$ | async) || ''\">\n <ng-content select=\"[drawer]\"></ng-content>\n <dbx-mapbox-layout-drawer></dbx-mapbox-layout-drawer>\n </div>\n </mat-drawer>\n <mat-drawer-content #content class=\"dbx-mapbox-layout-content\" (resized)=\"onResized($event)\">\n <button mat-icon-button (click)=\"toggleDrawer()\" class=\"dbx-mapbox-layout-drawer-button\" [dbxColor]=\"drawerButtonColor$ | async\">\n <mat-icon>{{ buttonIcon$ | async }}</mat-icon>\n </button>\n <ng-content></ng-content>\n </mat-drawer-content>\n</mat-drawer-container>\n", styles: [".dbx-mapbox-layout-container{height:100%;max-width:100%}.dbx-mapbox-layout-container .mat-drawer-container{height:100%}.dbx-mapbox-layout-container .dbx-mapbox-layout-drawer{max-width:calc(100% - var(--dbx-mapbox-min-width-var, 33px))}.dbx-mapbox-layout-container .dbx-mapbox-layout-drawer-content{height:100%;width:100%;overflow:hidden}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{position:absolute;z-index:2;top:40%;border:none;display:flex;overflow:hidden}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button.mat-mdc-icon-button{padding-left:0}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button.mat-mdc-icon-button ::ng-deep>.mat-mdc-button-persistent-ripple{border-radius:unset}.left-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{left:0;border-radius:0 20px 20px 0}.right-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{right:0;border-radius:20px 0 0 20px}.has-drawer-content .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:35px}.has-drawer-content.open-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:35px}.no-drawer-content .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:0px}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button mat-icon{padding-left:8px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { kind: "component", type: i2.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { kind: "component", type: i2.MatDrawerContent, selector: "mat-drawer-content" }, { kind: "directive", type: i3.DbxColorDirective, selector: "[dbxColor]", inputs: ["dbxColor"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i6.ResizedDirective, selector: "[resized]", outputs: ["resized"] }, { kind: "component", type: DbxMapboxLayoutDrawerComponent, selector: "dbx-mapbox-layout-drawer" }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] });
985
962
  }
986
963
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxLayoutComponent, decorators: [{
987
964
  type: Component,
988
965
  args: [{ selector: 'dbx-mapbox-layout', template: "<mat-drawer-container #containerElement class=\"dbx-mapbox-layout-container\" [ngClass]=\"(drawerClasses$ | async) || ''\" [hasBackdrop]=\"false\">\n <mat-drawer class=\"dbx-mapbox-layout-drawer\" #drawer (openedChange)=\"onOpened($event)\" [opened]=\"isOpenAndHasContent$ | async\" [mode]=\"(mode$ | async) || 'side'\" [position]=\"(position$ | async) || 'end'\">\n <div class=\"dbx-mapbox-layout-drawer-content\" [ngClass]=\"(drawerClasses$ | async) || ''\">\n <ng-content select=\"[drawer]\"></ng-content>\n <dbx-mapbox-layout-drawer></dbx-mapbox-layout-drawer>\n </div>\n </mat-drawer>\n <mat-drawer-content #content class=\"dbx-mapbox-layout-content\" (resized)=\"onResized($event)\">\n <button mat-icon-button (click)=\"toggleDrawer()\" class=\"dbx-mapbox-layout-drawer-button\" [dbxColor]=\"drawerButtonColor$ | async\">\n <mat-icon>{{ buttonIcon$ | async }}</mat-icon>\n </button>\n <ng-content></ng-content>\n </mat-drawer-content>\n</mat-drawer-container>\n", styles: [".dbx-mapbox-layout-container{height:100%;max-width:100%}.dbx-mapbox-layout-container .mat-drawer-container{height:100%}.dbx-mapbox-layout-container .dbx-mapbox-layout-drawer{max-width:calc(100% - var(--dbx-mapbox-min-width-var, 33px))}.dbx-mapbox-layout-container .dbx-mapbox-layout-drawer-content{height:100%;width:100%;overflow:hidden}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{position:absolute;z-index:2;top:40%;border:none;display:flex;overflow:hidden}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button.mat-mdc-icon-button{padding-left:0}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button.mat-mdc-icon-button ::ng-deep>.mat-mdc-button-persistent-ripple{border-radius:unset}.left-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{left:0;border-radius:0 20px 20px 0}.right-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{right:0;border-radius:20px 0 0 20px}.has-drawer-content .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:35px}.has-drawer-content.open-drawer .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:35px}.no-drawer-content .dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button{width:0px}.dbx-mapbox-layout-content>.dbx-mapbox-layout-drawer-button mat-icon{padding-left:8px}\n"] }]
989
- }], ctorParameters: function () { return [{ type: DbxMapboxMapStore }]; }, propDecorators: { openedChange: [{
966
+ }], propDecorators: { openedChange: [{
990
967
  type: Output
991
968
  }], containerElement: [{
992
969
  type: ViewChild,
@@ -1015,20 +992,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1015
992
  * The map dissapears if the mouse scrolls anywhere else on the map.
1016
993
  */
1017
994
  class DbxMapboxMenuComponent extends AbstractSubscriptionDirective {
995
+ dbxMapboxMapStore = inject(DbxMapboxMapStore);
996
+ matMenuTrigger = inject(MatMenuTrigger, { host: true });
997
+ ngZone = inject(NgZone);
998
+ cdRef = inject(ChangeDetectorRef);
999
+ _pos = { x: `0`, y: `0` };
1000
+ _active = new BehaviorSubject(true);
1001
+ _menuCloseSub = new SubscriptionObject();
1002
+ _preventRightClick = new DestroyFunctionObject();
1018
1003
  get pos() {
1019
1004
  return this._pos;
1020
1005
  }
1021
- constructor(dbxMapboxMapStore, matMenuTrigger, ngZone, cdRef) {
1022
- super();
1023
- this.dbxMapboxMapStore = dbxMapboxMapStore;
1024
- this.matMenuTrigger = matMenuTrigger;
1025
- this.ngZone = ngZone;
1026
- this.cdRef = cdRef;
1027
- this._pos = { x: `0`, y: `0` };
1028
- this._active = new BehaviorSubject(true);
1029
- this._menuCloseSub = new SubscriptionObject();
1030
- this._preventRightClick = new DestroyFunctionObject();
1031
- }
1032
1006
  set active(active) {
1033
1007
  this._active.next(active ?? true);
1034
1008
  }
@@ -1069,14 +1043,14 @@ class DbxMapboxMenuComponent extends AbstractSubscriptionDirective {
1069
1043
  ngOnDestroy() {
1070
1044
  super.ngOnDestroy();
1071
1045
  this._active.complete();
1072
- this._preventRightClick.destroy();
1073
1046
  this._menuCloseSub.destroy();
1047
+ this._preventRightClick.destroy();
1074
1048
  if (this.matMenuTrigger) {
1075
1049
  this.matMenuTrigger.closeMenu();
1076
1050
  }
1077
1051
  }
1078
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxMenuComponent, deps: [{ token: DbxMapboxMapStore }, { token: i2$2.MatMenuTrigger, host: true }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1079
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxMapboxMenuComponent, selector: "dbx-mapbox-menu", inputs: { active: "active" }, host: { properties: { "style.top": "pos.y", "style.left": "pos.x" }, styleAttribute: "visibility: hidden; position: fixed" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1052
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxMenuComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1053
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxMapboxMenuComponent, selector: "dbx-mapbox-menu", inputs: { active: "active" }, host: { properties: { "style.top": "pos.y", "style.left": "pos.x" }, styleAttribute: "visibility: hidden; position: fixed" }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
1080
1054
  }
1081
1055
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxMenuComponent, decorators: [{
1082
1056
  type: Component,
@@ -1090,9 +1064,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1090
1064
  },
1091
1065
  changeDetection: ChangeDetectionStrategy.OnPush
1092
1066
  }]
1093
- }], ctorParameters: function () { return [{ type: DbxMapboxMapStore }, { type: i2$2.MatMenuTrigger, decorators: [{
1094
- type: Host
1095
- }] }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { active: [{
1067
+ }], propDecorators: { active: [{
1096
1068
  type: Input
1097
1069
  }] } });
1098
1070
 
@@ -1100,20 +1072,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1100
1072
  * Token used by provideMapboxStoreIfDoesNotExist() to prevent injecting a parent DbxMapboxMapStore into the child view.
1101
1073
  */
1102
1074
  class DbxMapboxMapStoreProviderBlock {
1103
- constructor(dbxMapboxMapStore) {
1104
- this.dbxMapboxMapStore = dbxMapboxMapStore;
1105
- }
1106
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxMapStoreProviderBlock, deps: [{ token: DbxMapboxMapStore, skipSelf: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
1107
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxMapStoreProviderBlock }); }
1075
+ dbxMapboxMapStore = inject(DbxMapboxMapStore, { skipSelf: true });
1076
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxMapStoreProviderBlock, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1077
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxMapStoreProviderBlock });
1108
1078
  }
1109
1079
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxMapStoreProviderBlock, decorators: [{
1110
1080
  type: Injectable
1111
- }], ctorParameters: function () { return [{ type: DbxMapboxMapStore, decorators: [{
1112
- type: SkipSelf
1113
- }] }]; } });
1081
+ }] });
1114
1082
  class DbxMapboxMapStoreInjectionBlockDirective {
1115
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxMapStoreInjectionBlockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1116
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxMapboxMapStoreInjectionBlockDirective, selector: "[dbxMapboxStoreParentBlocker]", providers: [DbxMapboxMapStoreProviderBlock], ngImport: i0 }); }
1083
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxMapStoreInjectionBlockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1084
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxMapboxMapStoreInjectionBlockDirective, selector: "[dbxMapboxStoreParentBlocker]", providers: [DbxMapboxMapStoreProviderBlock], ngImport: i0 });
1117
1085
  }
1118
1086
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxMapStoreInjectionBlockDirective, decorators: [{
1119
1087
  type: Directive,
@@ -1145,10 +1113,9 @@ function provideMapboxStoreIfParentIsUnavailable() {
1145
1113
  }
1146
1114
 
1147
1115
  class DbxMapboxMarkerComponent {
1148
- static { this._latLngPoint = latLngPointFunction({ wrap: true }); }
1149
- constructor(_dbxMapboxChangeService) {
1150
- this._dbxMapboxChangeService = _dbxMapboxChangeService;
1151
- }
1116
+ _dbxMapboxChangeService = inject(DbxMapboxChangeService, { optional: true });
1117
+ static _latLngPoint = latLngPointFunction({ wrap: true });
1118
+ _marker;
1152
1119
  get marker() {
1153
1120
  return this._marker;
1154
1121
  }
@@ -1240,8 +1207,8 @@ class DbxMapboxMarkerComponent {
1240
1207
  ngOnDestroy() {
1241
1208
  this._dbxMapboxChangeService?.emitMarkerDestroyed();
1242
1209
  }
1243
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxMarkerComponent, deps: [{ token: DbxMapboxChangeService, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
1244
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxMapboxMarkerComponent, selector: "dbx-mapbox-marker", inputs: { marker: "marker" }, ngImport: i0, template: `
1210
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxMarkerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1211
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxMapboxMarkerComponent, selector: "dbx-mapbox-marker", inputs: { marker: "marker" }, ngImport: i0, template: `
1245
1212
  <mgl-marker *ngIf="marker" [lngLat]="latLng">
1246
1213
  <dbx-anchor [anchor]="anchor">
1247
1214
  <div class="dbx-mapbox-marker" [ngClass]="presentationClasses">
@@ -1252,7 +1219,7 @@ class DbxMapboxMarkerComponent {
1252
1219
  </div>
1253
1220
  </dbx-anchor>
1254
1221
  </mgl-marker>
1255
- `, isInline: true, styles: [".dbx-mapbox-marker{display:flex;align-items:center;flex-direction:column}.dbx-mapbox-marker .dbx-mapbox-marker-icon-content{display:flex;align-items:center;justify-content:center}.dbx-mapbox-marker .dbx-mapbox-marker-icon-content mat-icon{width:100%;height:100%;font-size:inherit}.dbx-mapbox-marker .dbx-mapbox-marker-label{font-size:.9em}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip{flex-direction:row;font-size:1em}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip .dbx-mapbox-marker-icon-content{width:18px;height:18px;font-size:18px}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip.dbx-chip-small .dbx-mapbox-marker-label{padding-left:3px}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip.dbx-chip-small .dbx-mapbox-marker-icon-content{padding:0!important;width:16px;height:16px;font-size:16px}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip.dbx-mapbox-marker-no-icon>.dbx-mapbox-marker-icon-content{display:none}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip.dbx-mapbox-marker-no-icon>.dbx-mapbox-marker-icon-content .dbx-mapbox-marker-label{padding-left:0}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip .dbx-mapbox-marker-label{padding-left:4px}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.DbxAnchorComponent, selector: "dbx-anchor, [dbx-anchor]", inputs: ["block"] }, { kind: "component", type: i1.MarkerComponent, selector: "mgl-marker", inputs: ["offset", "anchor", "clickTolerance", "feature", "lngLat", "draggable", "popupShown", "className", "pitchAlignment", "rotationAlignment"], outputs: ["markerDragStart", "markerDragEnd", "markerDrag", "dragStart", "dragEnd", "drag"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1222
+ `, isInline: true, styles: [".dbx-mapbox-marker{display:flex;align-items:center;flex-direction:column}.dbx-mapbox-marker .dbx-mapbox-marker-icon-content{display:flex;align-items:center;justify-content:center}.dbx-mapbox-marker .dbx-mapbox-marker-icon-content mat-icon{width:100%;height:100%;font-size:inherit}.dbx-mapbox-marker .dbx-mapbox-marker-label{font-size:.9em}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip{flex-direction:row;font-size:1em}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip .dbx-mapbox-marker-icon-content{width:18px;height:18px;font-size:18px}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip.dbx-chip-small .dbx-mapbox-marker-label{padding-left:3px}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip.dbx-chip-small .dbx-mapbox-marker-icon-content{padding:0!important;width:16px;height:16px;font-size:16px}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip.dbx-mapbox-marker-no-icon>.dbx-mapbox-marker-icon-content{display:none}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip.dbx-mapbox-marker-no-icon>.dbx-mapbox-marker-icon-content .dbx-mapbox-marker-label{padding-left:0}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip .dbx-mapbox-marker-label{padding-left:4px}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.DbxAnchorComponent, selector: "dbx-anchor, [dbx-anchor]", inputs: ["block"] }, { kind: "component", type: i4$1.MarkerComponent, selector: "mgl-marker", inputs: ["offset", "anchor", "clickTolerance", "feature", "lngLat", "draggable", "popupShown", "className", "pitchAlignment", "rotationAlignment"], outputs: ["markerDragStart", "markerDragEnd", "markerDrag", "dragStart", "dragEnd", "drag"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1256
1223
  }
1257
1224
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxMarkerComponent, decorators: [{
1258
1225
  type: Component,
@@ -1268,9 +1235,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1268
1235
  </dbx-anchor>
1269
1236
  </mgl-marker>
1270
1237
  `, changeDetection: ChangeDetectionStrategy.OnPush, styles: [".dbx-mapbox-marker{display:flex;align-items:center;flex-direction:column}.dbx-mapbox-marker .dbx-mapbox-marker-icon-content{display:flex;align-items:center;justify-content:center}.dbx-mapbox-marker .dbx-mapbox-marker-icon-content mat-icon{width:100%;height:100%;font-size:inherit}.dbx-mapbox-marker .dbx-mapbox-marker-label{font-size:.9em}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip{flex-direction:row;font-size:1em}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip .dbx-mapbox-marker-icon-content{width:18px;height:18px;font-size:18px}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip.dbx-chip-small .dbx-mapbox-marker-label{padding-left:3px}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip.dbx-chip-small .dbx-mapbox-marker-icon-content{padding:0!important;width:16px;height:16px;font-size:16px}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip.dbx-mapbox-marker-no-icon>.dbx-mapbox-marker-icon-content{display:none}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip.dbx-mapbox-marker-no-icon>.dbx-mapbox-marker-icon-content .dbx-mapbox-marker-label{padding-left:0}.dbx-mapbox-marker.dbx-mapbox-marker-chip.dbx-chip .dbx-mapbox-marker-label{padding-left:4px}\n"] }]
1271
- }], ctorParameters: function () { return [{ type: DbxMapboxChangeService, decorators: [{
1272
- type: Optional
1273
- }] }]; }, propDecorators: { marker: [{
1238
+ }], propDecorators: { marker: [{
1274
1239
  type: Input
1275
1240
  }] } });
1276
1241
 
@@ -1278,18 +1243,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1278
1243
  * Component used to render a set of DbxMapboxMarker values from the input data and marker factory.
1279
1244
  */
1280
1245
  class DbxMapboxMarkersComponent {
1281
- constructor() {
1282
- this._data = new BehaviorSubject(undefined);
1283
- this._markerFactory = new BehaviorSubject(undefined);
1284
- this.markers$ = combineLatest([this._data.pipe(distinctUntilChanged()), this._markerFactory.pipe(distinctUntilChanged())]).pipe(map(([data, markerFactory]) => {
1285
- if (data?.length && markerFactory) {
1286
- return data.map(markerFactory);
1287
- }
1288
- else {
1289
- return [];
1290
- }
1291
- }), shareReplay(1));
1292
- }
1246
+ _data = new BehaviorSubject(undefined);
1247
+ _markerFactory = new BehaviorSubject(undefined);
1248
+ markers$ = combineLatest([this._data.pipe(distinctUntilChanged()), this._markerFactory.pipe(distinctUntilChanged())]).pipe(map(([data, markerFactory]) => {
1249
+ if (data?.length && markerFactory) {
1250
+ return data.map(markerFactory);
1251
+ }
1252
+ else {
1253
+ return [];
1254
+ }
1255
+ }), shareReplay(1));
1293
1256
  trackMarkerById(index, marker) {
1294
1257
  return marker.id;
1295
1258
  }
@@ -1309,10 +1272,10 @@ class DbxMapboxMarkersComponent {
1309
1272
  this._data.complete();
1310
1273
  this._markerFactory.complete();
1311
1274
  }
1312
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxMarkersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1313
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxMapboxMarkersComponent, selector: "dbx-mapbox-markers", inputs: { data: "data", markerFactory: "markerFactory" }, ngImport: i0, template: `
1275
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxMarkersComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1276
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxMapboxMarkersComponent, selector: "dbx-mapbox-markers", inputs: { data: "data", markerFactory: "markerFactory" }, ngImport: i0, template: `
1314
1277
  <dbx-mapbox-marker *ngFor="let marker of markers$ | async; trackBy: trackMarkerById" [marker]="marker"></dbx-mapbox-marker>
1315
- `, isInline: true, dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: DbxMapboxMarkerComponent, selector: "dbx-mapbox-marker", inputs: ["marker"] }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1278
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: DbxMapboxMarkerComponent, selector: "dbx-mapbox-marker", inputs: ["marker"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1316
1279
  }
1317
1280
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxMarkersComponent, decorators: [{
1318
1281
  type: Component,
@@ -1332,33 +1295,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1332
1295
  /**
1333
1296
  * Directive that synchronizes a map's virtual size with the size of the element.
1334
1297
  */
1335
- class DbxMapboxLayoutVirtualResizeSyncComponent extends SubscriptionObject {
1336
- constructor(dbxMapboxLayoutComponent) {
1337
- super();
1338
- this.dbxMapboxLayoutComponent = dbxMapboxLayoutComponent;
1339
- this.resizedVector$ = this.dbxMapboxLayoutComponent.resized$.pipe(map(() => {
1340
- const element = this.dbxMapboxLayoutComponent.containerElement.nativeElement;
1341
- const { clientWidth, clientHeight } = element;
1342
- return {
1343
- x: clientWidth,
1344
- y: clientHeight
1345
- };
1346
- }), distinctUntilChanged(isSameVector), shareReplay(1));
1347
- }
1298
+ class DbxMapboxLayoutVirtualResizeSyncComponent extends AbstractSubscriptionDirective {
1299
+ dbxMapboxLayoutComponent = inject(DbxMapboxLayoutComponent, { host: true });
1300
+ resizedVector$ = this.dbxMapboxLayoutComponent.resized$.pipe(map(() => {
1301
+ const element = this.dbxMapboxLayoutComponent.containerElement.nativeElement;
1302
+ const { clientWidth, clientHeight } = element;
1303
+ return {
1304
+ x: clientWidth,
1305
+ y: clientHeight
1306
+ };
1307
+ }), distinctUntilChanged(isSameVector), shareReplay(1));
1348
1308
  ngOnInit() {
1349
- this.dbxMapboxLayoutComponent.dbxMapboxMapStore.setMinimumVirtualViewportSize(this.resizedVector$);
1309
+ this.sub = this.dbxMapboxLayoutComponent.dbxMapboxMapStore.setMinimumVirtualViewportSize(this.resizedVector$) ?? undefined;
1350
1310
  }
1351
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxLayoutVirtualResizeSyncComponent, deps: [{ token: DbxMapboxLayoutComponent, host: true }], target: i0.ɵɵFactoryTarget.Directive }); }
1352
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxMapboxLayoutVirtualResizeSyncComponent, selector: "[dbxMapboxLayoutVirtualResizeSync]", usesInheritance: true, ngImport: i0 }); }
1311
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxLayoutVirtualResizeSyncComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1312
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DbxMapboxLayoutVirtualResizeSyncComponent, selector: "[dbxMapboxLayoutVirtualResizeSync]", usesInheritance: true, ngImport: i0 });
1353
1313
  }
1354
1314
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxLayoutVirtualResizeSyncComponent, decorators: [{
1355
1315
  type: Directive,
1356
1316
  args: [{
1357
1317
  selector: '[dbxMapboxLayoutVirtualResizeSync]'
1358
1318
  }]
1359
- }], ctorParameters: function () { return [{ type: DbxMapboxLayoutComponent, decorators: [{
1360
- type: Host
1361
- }] }]; } });
1319
+ }] });
1362
1320
 
1363
1321
  const declarations = [
1364
1322
  //
@@ -1384,8 +1342,8 @@ class DbxMapboxModule {
1384
1342
  ]
1385
1343
  };
1386
1344
  }
1387
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1388
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxModule, declarations: [
1345
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1346
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxModule, declarations: [
1389
1347
  //
1390
1348
  DbxMapboxLayoutVirtualResizeSyncComponent,
1391
1349
  DbxMapboxMapDirective,
@@ -1415,8 +1373,8 @@ class DbxMapboxModule {
1415
1373
  DbxMapboxMenuComponent,
1416
1374
  DbxMapboxMarkerComponent,
1417
1375
  DbxMapboxMarkersComponent,
1418
- DbxMapboxMapStoreInjectionBlockDirective] }); }
1419
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxModule, imports: [
1376
+ DbxMapboxMapStoreInjectionBlockDirective] });
1377
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxModule, imports: [
1420
1378
  //
1421
1379
  CommonModule,
1422
1380
  MatSidenavModule,
@@ -1426,7 +1384,7 @@ class DbxMapboxModule {
1426
1384
  MatIconModule,
1427
1385
  AngularResizeEventModule,
1428
1386
  DbxRouterAnchorModule,
1429
- NgxMapboxGLModule] }); }
1387
+ NgxMapboxGLModule] });
1430
1388
  }
1431
1389
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxMapboxModule, decorators: [{
1432
1390
  type: NgModule,