@coolon/angular-ui-powerups 0.0.135 → 1.0.0-alpha.12

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 (419) hide show
  1. package/CHANGELOG.md +303 -0
  2. package/bundles/coolon-angular-ui-powerups.umd.js +1142 -6275
  3. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js +16 -1
  5. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  6. package/coolon-angular-ui-powerups.metadata.json +1 -1
  7. package/esm2015/coolon-angular-ui-powerups.js +1 -5
  8. package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
  9. package/esm2015/index.js +1 -5
  10. package/esm2015/index.js.map +1 -1
  11. package/esm2015/lib/angular-ui-powerups.module.js +32 -32
  12. package/esm2015/lib/angular-ui-powerups.module.js.map +1 -1
  13. package/esm2015/lib/angular-ui-powerups.module.metadata.json +1 -1
  14. package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  15. package/esm2015/lib/animations/index.js +1 -5
  16. package/esm2015/lib/animations/index.js.map +1 -1
  17. package/esm2015/lib/animations/slide-animations.js +0 -8
  18. package/esm2015/lib/animations/slide-animations.js.map +1 -1
  19. package/esm2015/lib/components/components.module.js +39 -39
  20. package/esm2015/lib/components/components.module.js.map +1 -1
  21. package/esm2015/lib/components/components.module.metadata.json +1 -1
  22. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  23. package/esm2015/lib/components/disposable-component.js +8 -9
  24. package/esm2015/lib/components/disposable-component.js.map +1 -1
  25. package/esm2015/lib/components/disposable-component.metadata.json +1 -1
  26. package/esm2015/lib/components/forms/abstract-input.component.js +82 -114
  27. package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
  28. package/esm2015/lib/components/forms/abstract-input.component.metadata.json +1 -1
  29. package/esm2015/lib/components/forms/number-input/number-input.component.js +12 -18
  30. package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
  31. package/esm2015/lib/components/forms/password-input/password-input.component.js +12 -18
  32. package/esm2015/lib/components/forms/password-input/password-input.component.js.map +1 -1
  33. package/esm2015/lib/components/forms/select-input/select-input.component.js +38 -57
  34. package/esm2015/lib/components/forms/select-input/select-input.component.js.map +1 -1
  35. package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
  36. package/esm2015/lib/components/forms/string-input/string-input.component.js +19 -41
  37. package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
  38. package/esm2015/lib/components/index.js +13 -17
  39. package/esm2015/lib/components/index.js.map +1 -1
  40. package/esm2015/lib/components/noop/noop.component.js +12 -15
  41. package/esm2015/lib/components/noop/noop.component.js.map +1 -1
  42. package/esm2015/lib/components/resize-aware.component.js +17 -64
  43. package/esm2015/lib/components/resize-aware.component.js.map +1 -1
  44. package/esm2015/lib/components/resize-aware.component.metadata.json +1 -1
  45. package/esm2015/lib/components/scroll-container/scroll-container.component.js +12 -18
  46. package/esm2015/lib/components/scroll-container/scroll-container.component.js.map +1 -1
  47. package/esm2015/lib/components/types/bounds.class.js +0 -29
  48. package/esm2015/lib/components/types/bounds.class.js.map +1 -1
  49. package/esm2015/lib/components/types/dimension.class.js +0 -14
  50. package/esm2015/lib/components/types/dimension.class.js.map +1 -1
  51. package/esm2015/lib/components/types/point.class.js +0 -23
  52. package/esm2015/lib/components/types/point.class.js.map +1 -1
  53. package/esm2015/lib/directives/command.directive.js +31 -85
  54. package/esm2015/lib/directives/command.directive.js.map +1 -1
  55. package/esm2015/lib/directives/directives.module.js +28 -28
  56. package/esm2015/lib/directives/directives.module.js.map +1 -1
  57. package/esm2015/lib/directives/directives.module.metadata.json +1 -1
  58. package/esm2015/lib/directives/directives.module.ngfactory.js.map +1 -1
  59. package/esm2015/lib/directives/focus-binding.directive.js +41 -96
  60. package/esm2015/lib/directives/focus-binding.directive.js.map +1 -1
  61. package/esm2015/lib/directives/index.js +3 -7
  62. package/esm2015/lib/directives/index.js.map +1 -1
  63. package/esm2015/lib/interaction/abstract-interaction-context.js +4 -73
  64. package/esm2015/lib/interaction/abstract-interaction-context.js.map +1 -1
  65. package/esm2015/lib/interaction/activity-ref.js +2 -79
  66. package/esm2015/lib/interaction/activity-ref.js.map +1 -1
  67. package/esm2015/lib/interaction/activity.js +0 -72
  68. package/esm2015/lib/interaction/activity.js.map +1 -1
  69. package/esm2015/lib/interaction/alert.js +0 -22
  70. package/esm2015/lib/interaction/alert.js.map +1 -1
  71. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +41 -187
  72. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
  73. package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js +24 -74
  74. package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
  75. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js +13 -24
  76. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js.map +1 -1
  77. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +15 -62
  78. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js.map +1 -1
  79. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +13 -27
  80. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js.map +1 -1
  81. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js +16 -71
  82. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -1
  83. package/esm2015/lib/interaction/confirm.js +0 -16
  84. package/esm2015/lib/interaction/confirm.js.map +1 -1
  85. package/esm2015/lib/interaction/index.js +15 -24
  86. package/esm2015/lib/interaction/index.js.map +1 -1
  87. package/esm2015/lib/interaction/interaction-context.js +0 -50
  88. package/esm2015/lib/interaction/interaction-context.js.map +1 -1
  89. package/esm2015/lib/interaction/interaction.module.js +41 -41
  90. package/esm2015/lib/interaction/interaction.module.js.map +1 -1
  91. package/esm2015/lib/interaction/interaction.module.metadata.json +1 -1
  92. package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  93. package/esm2015/lib/interaction/result.js +2 -23
  94. package/esm2015/lib/interaction/result.js.map +1 -1
  95. package/esm2015/lib/interaction/route-synchronisation-adapter.js +0 -16
  96. package/esm2015/lib/interaction/route-synchronisation-adapter.js.map +1 -1
  97. package/esm2015/lib/interaction/services/interaction-service-routing-adapter.js +0 -43
  98. package/esm2015/lib/interaction/services/interaction-service-routing-adapter.js.map +1 -1
  99. package/esm2015/lib/interaction/services/interaction.service.js +22 -172
  100. package/esm2015/lib/interaction/services/interaction.service.js.map +1 -1
  101. package/esm2015/lib/interaction/services/interaction.service.metadata.json +1 -1
  102. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js +17 -40
  103. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js.map +1 -1
  104. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.metadata.json +1 -1
  105. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js +7 -86
  106. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js.map +1 -1
  107. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.metadata.json +1 -1
  108. package/esm2015/lib/interaction/services/modal-interaction-context.factory.js +0 -16
  109. package/esm2015/lib/interaction/services/modal-interaction-context.factory.js.map +1 -1
  110. package/esm2015/lib/place/components/abstract-place-navigation.component.js +36 -105
  111. package/esm2015/lib/place/components/abstract-place-navigation.component.js.map +1 -1
  112. package/esm2015/lib/place/components/busy-overlay/busy-overlay.component.js +17 -34
  113. package/esm2015/lib/place/components/busy-overlay/busy-overlay.component.js.map +1 -1
  114. package/esm2015/lib/place/components/empty-state/empty-state.component.js +12 -18
  115. package/esm2015/lib/place/components/empty-state/empty-state.component.js.map +1 -1
  116. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +16 -33
  117. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
  118. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +52 -240
  119. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
  120. package/esm2015/lib/place/components/place-outlet/route-animations.js +0 -12
  121. package/esm2015/lib/place/components/place-outlet/route-animations.js.map +1 -1
  122. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +12 -17
  123. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
  124. package/esm2015/lib/place/guards/consolidated-param-map.js +9 -92
  125. package/esm2015/lib/place/guards/consolidated-param-map.js.map +1 -1
  126. package/esm2015/lib/place/guards/noop-auth-guard.service.js +12 -21
  127. package/esm2015/lib/place/guards/noop-auth-guard.service.js.map +1 -1
  128. package/esm2015/lib/place/guards/noop-auth-guard.service.metadata.json +1 -1
  129. package/esm2015/lib/place/guards/place.guard.js +10 -119
  130. package/esm2015/lib/place/guards/place.guard.js.map +1 -1
  131. package/esm2015/lib/place/index.js +38 -46
  132. package/esm2015/lib/place/index.js.map +1 -1
  133. package/esm2015/lib/place/nav-item.js +0 -22
  134. package/esm2015/lib/place/nav-item.js.map +1 -1
  135. package/esm2015/lib/place/navigation/place-component-deactivation-handler.js +3 -49
  136. package/esm2015/lib/place/navigation/place-component-deactivation-handler.js.map +1 -1
  137. package/esm2015/lib/place/navigation/session/abstract-pop-state-navigation.js +0 -23
  138. package/esm2015/lib/place/navigation/session/abstract-pop-state-navigation.js.map +1 -1
  139. package/esm2015/lib/place/navigation/session/event-cleanup/event-clean-up-session.js +0 -11
  140. package/esm2015/lib/place/navigation/session/event-cleanup/event-clean-up-session.js.map +1 -1
  141. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js +2 -51
  142. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js.map +1 -1
  143. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js +2 -54
  144. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js.map +1 -1
  145. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js +2 -60
  146. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js.map +1 -1
  147. package/esm2015/lib/place/navigation/session/interactions/navigating-during-interaction.js +0 -24
  148. package/esm2015/lib/place/navigation/session/interactions/navigating-during-interaction.js.map +1 -1
  149. package/esm2015/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js +1 -19
  150. package/esm2015/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js.map +1 -1
  151. package/esm2015/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js +0 -55
  152. package/esm2015/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js.map +1 -1
  153. package/esm2015/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js +4 -60
  154. package/esm2015/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js.map +1 -1
  155. package/esm2015/lib/place/navigation/session/navigating.js +0 -31
  156. package/esm2015/lib/place/navigation/session/navigating.js.map +1 -1
  157. package/esm2015/lib/place/navigation/session/navigation-context.js +0 -24
  158. package/esm2015/lib/place/navigation/session/navigation-context.js.map +1 -1
  159. package/esm2015/lib/place/navigation/session/navigation-session.js +12 -178
  160. package/esm2015/lib/place/navigation/session/navigation-session.js.map +1 -1
  161. package/esm2015/lib/place/navigation/session/pop-state-navigation.js +0 -16
  162. package/esm2015/lib/place/navigation/session/pop-state-navigation.js.map +1 -1
  163. package/esm2015/lib/place/place-component.js +22 -107
  164. package/esm2015/lib/place/place-component.js.map +1 -1
  165. package/esm2015/lib/place/place-component.metadata.json +1 -1
  166. package/esm2015/lib/place/place-config.js +0 -13
  167. package/esm2015/lib/place/place-config.js.map +1 -1
  168. package/esm2015/lib/place/place-definition.js +26 -163
  169. package/esm2015/lib/place/place-definition.js.map +1 -1
  170. package/esm2015/lib/place/place-history.js +11 -38
  171. package/esm2015/lib/place/place-history.js.map +1 -1
  172. package/esm2015/lib/place/place-history.metadata.json +1 -1
  173. package/esm2015/lib/place/place-router.js +38 -247
  174. package/esm2015/lib/place/place-router.js.map +1 -1
  175. package/esm2015/lib/place/place-router.metadata.json +1 -1
  176. package/esm2015/lib/place/place.decorator.js +3 -38
  177. package/esm2015/lib/place/place.decorator.js.map +1 -1
  178. package/esm2015/lib/place/place.module.js +40 -42
  179. package/esm2015/lib/place/place.module.js.map +1 -1
  180. package/esm2015/lib/place/place.module.metadata.json +1 -1
  181. package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
  182. package/esm2015/lib/place/route/formatter.js +0 -30
  183. package/esm2015/lib/place/route/formatter.js.map +1 -1
  184. package/esm2015/lib/place/route/json-types.js +0 -12
  185. package/esm2015/lib/place/route/json-types.js.map +1 -1
  186. package/esm2015/lib/place/route/parameter-decorators.js +14 -133
  187. package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
  188. package/esm2015/lib/place/route/parameter-definition.class.js +2 -147
  189. package/esm2015/lib/place/route/parameter-definition.class.js.map +1 -1
  190. package/esm2015/lib/place/route/parameter-sanitiser.js +0 -18
  191. package/esm2015/lib/place/route/parameter-sanitiser.js.map +1 -1
  192. package/esm2015/lib/place/route/parameter-snapshot.js +0 -19
  193. package/esm2015/lib/place/route/parameter-snapshot.js.map +1 -1
  194. package/esm2015/lib/place/route/visit-sanitiser.js +2 -47
  195. package/esm2015/lib/place/route/visit-sanitiser.js.map +1 -1
  196. package/esm2015/lib/place/url-service.js +13 -68
  197. package/esm2015/lib/place/url-service.js.map +1 -1
  198. package/esm2015/lib/place/url-service.metadata.json +1 -1
  199. package/esm2015/lib/place/url-snapshot.js +3 -86
  200. package/esm2015/lib/place/url-snapshot.js.map +1 -1
  201. package/esm2015/lib/place/visit.js +5 -73
  202. package/esm2015/lib/place/visit.js.map +1 -1
  203. package/esm2015/public_api.js +6 -10
  204. package/esm2015/public_api.js.map +1 -1
  205. package/esm5/coolon-angular-ui-powerups.js +1 -5
  206. package/esm5/coolon-angular-ui-powerups.js.map +1 -1
  207. package/esm5/index.js +1 -5
  208. package/esm5/index.js.map +1 -1
  209. package/esm5/lib/angular-ui-powerups.module.js +29 -30
  210. package/esm5/lib/angular-ui-powerups.module.js.map +1 -1
  211. package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  212. package/esm5/lib/animations/index.js +1 -5
  213. package/esm5/lib/animations/index.js.map +1 -1
  214. package/esm5/lib/animations/slide-animations.js +0 -8
  215. package/esm5/lib/animations/slide-animations.js.map +1 -1
  216. package/esm5/lib/components/components.module.js +36 -37
  217. package/esm5/lib/components/components.module.js.map +1 -1
  218. package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
  219. package/esm5/lib/components/disposable-component.js +7 -13
  220. package/esm5/lib/components/disposable-component.js.map +1 -1
  221. package/esm5/lib/components/forms/abstract-input.component.js +95 -157
  222. package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
  223. package/esm5/lib/components/forms/number-input/number-input.component.js +11 -22
  224. package/esm5/lib/components/forms/number-input/number-input.component.js.map +1 -1
  225. package/esm5/lib/components/forms/password-input/password-input.component.js +11 -22
  226. package/esm5/lib/components/forms/password-input/password-input.component.js.map +1 -1
  227. package/esm5/lib/components/forms/select-input/select-input.component.js +38 -61
  228. package/esm5/lib/components/forms/select-input/select-input.component.js.map +1 -1
  229. package/esm5/lib/components/forms/string-input/string-input.component.js +19 -45
  230. package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
  231. package/esm5/lib/components/index.js +13 -17
  232. package/esm5/lib/components/index.js.map +1 -1
  233. package/esm5/lib/components/noop/noop.component.js +9 -13
  234. package/esm5/lib/components/noop/noop.component.js.map +1 -1
  235. package/esm5/lib/components/resize-aware.component.js +21 -80
  236. package/esm5/lib/components/resize-aware.component.js.map +1 -1
  237. package/esm5/lib/components/scroll-container/scroll-container.component.js +10 -20
  238. package/esm5/lib/components/scroll-container/scroll-container.component.js.map +1 -1
  239. package/esm5/lib/components/types/bounds.class.js +3 -30
  240. package/esm5/lib/components/types/bounds.class.js.map +1 -1
  241. package/esm5/lib/components/types/dimension.class.js +0 -10
  242. package/esm5/lib/components/types/dimension.class.js.map +1 -1
  243. package/esm5/lib/components/types/point.class.js +2 -30
  244. package/esm5/lib/components/types/point.class.js.map +1 -1
  245. package/esm5/lib/directives/command.directive.js +37 -103
  246. package/esm5/lib/directives/command.directive.js.map +1 -1
  247. package/esm5/lib/directives/directives.module.js +25 -26
  248. package/esm5/lib/directives/directives.module.js.map +1 -1
  249. package/esm5/lib/directives/directives.module.ngfactory.js.map +1 -1
  250. package/esm5/lib/directives/focus-binding.directive.js +50 -147
  251. package/esm5/lib/directives/focus-binding.directive.js.map +1 -1
  252. package/esm5/lib/directives/index.js +3 -7
  253. package/esm5/lib/directives/index.js.map +1 -1
  254. package/esm5/lib/interaction/abstract-interaction-context.js +7 -114
  255. package/esm5/lib/interaction/abstract-interaction-context.js.map +1 -1
  256. package/esm5/lib/interaction/activity-ref.js +12 -109
  257. package/esm5/lib/interaction/activity-ref.js.map +1 -1
  258. package/esm5/lib/interaction/activity.js +12 -121
  259. package/esm5/lib/interaction/activity.js.map +1 -1
  260. package/esm5/lib/interaction/alert.js +0 -22
  261. package/esm5/lib/interaction/alert.js.map +1 -1
  262. package/esm5/lib/interaction/components/activity-container/activity-container.component.js +64 -330
  263. package/esm5/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
  264. package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js +26 -79
  265. package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
  266. package/esm5/lib/interaction/components/alert-dialog/alert-dialog.component.js +12 -25
  267. package/esm5/lib/interaction/components/alert-dialog/alert-dialog.component.js.map +1 -1
  268. package/esm5/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +17 -72
  269. package/esm5/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js.map +1 -1
  270. package/esm5/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +13 -32
  271. package/esm5/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js.map +1 -1
  272. package/esm5/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js +24 -117
  273. package/esm5/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -1
  274. package/esm5/lib/interaction/confirm.js +0 -16
  275. package/esm5/lib/interaction/confirm.js.map +1 -1
  276. package/esm5/lib/interaction/index.js +15 -24
  277. package/esm5/lib/interaction/index.js.map +1 -1
  278. package/esm5/lib/interaction/interaction-context.js +0 -50
  279. package/esm5/lib/interaction/interaction-context.js.map +1 -1
  280. package/esm5/lib/interaction/interaction.module.js +38 -39
  281. package/esm5/lib/interaction/interaction.module.js.map +1 -1
  282. package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  283. package/esm5/lib/interaction/result.js +2 -23
  284. package/esm5/lib/interaction/result.js.map +1 -1
  285. package/esm5/lib/interaction/route-synchronisation-adapter.js +0 -16
  286. package/esm5/lib/interaction/route-synchronisation-adapter.js.map +1 -1
  287. package/esm5/lib/interaction/services/interaction-service-routing-adapter.js +6 -73
  288. package/esm5/lib/interaction/services/interaction-service-routing-adapter.js.map +1 -1
  289. package/esm5/lib/interaction/services/interaction.service.js +33 -290
  290. package/esm5/lib/interaction/services/interaction.service.js.map +1 -1
  291. package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js +16 -41
  292. package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js.map +1 -1
  293. package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js +14 -109
  294. package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js.map +1 -1
  295. package/esm5/lib/interaction/services/modal-interaction-context.factory.js +1 -23
  296. package/esm5/lib/interaction/services/modal-interaction-context.factory.js.map +1 -1
  297. package/esm5/lib/place/components/abstract-place-navigation.component.js +37 -115
  298. package/esm5/lib/place/components/abstract-place-navigation.component.js.map +1 -1
  299. package/esm5/lib/place/components/busy-overlay/busy-overlay.component.js +16 -37
  300. package/esm5/lib/place/components/busy-overlay/busy-overlay.component.js.map +1 -1
  301. package/esm5/lib/place/components/empty-state/empty-state.component.js +10 -20
  302. package/esm5/lib/place/components/empty-state/empty-state.component.js.map +1 -1
  303. package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js +17 -42
  304. package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
  305. package/esm5/lib/place/components/place-outlet/place-outlet.component.js +64 -314
  306. package/esm5/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
  307. package/esm5/lib/place/components/place-outlet/route-animations.js +0 -12
  308. package/esm5/lib/place/components/place-outlet/route-animations.js.map +1 -1
  309. package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +10 -14
  310. package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
  311. package/esm5/lib/place/guards/consolidated-param-map.js +17 -117
  312. package/esm5/lib/place/guards/consolidated-param-map.js.map +1 -1
  313. package/esm5/lib/place/guards/noop-auth-guard.service.js +11 -26
  314. package/esm5/lib/place/guards/noop-auth-guard.service.js.map +1 -1
  315. package/esm5/lib/place/guards/place.guard.js +24 -172
  316. package/esm5/lib/place/guards/place.guard.js.map +1 -1
  317. package/esm5/lib/place/index.js +38 -46
  318. package/esm5/lib/place/index.js.map +1 -1
  319. package/esm5/lib/place/nav-item.js +0 -22
  320. package/esm5/lib/place/nav-item.js.map +1 -1
  321. package/esm5/lib/place/navigation/place-component-deactivation-handler.js +11 -86
  322. package/esm5/lib/place/navigation/place-component-deactivation-handler.js.map +1 -1
  323. package/esm5/lib/place/navigation/session/abstract-pop-state-navigation.js +4 -34
  324. package/esm5/lib/place/navigation/session/abstract-pop-state-navigation.js.map +1 -1
  325. package/esm5/lib/place/navigation/session/event-cleanup/event-clean-up-session.js +4 -25
  326. package/esm5/lib/place/navigation/session/event-cleanup/event-clean-up-session.js.map +1 -1
  327. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js +11 -110
  328. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js.map +1 -1
  329. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js +12 -147
  330. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js.map +1 -1
  331. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js +11 -126
  332. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js.map +1 -1
  333. package/esm5/lib/place/navigation/session/interactions/navigating-during-interaction.js +7 -71
  334. package/esm5/lib/place/navigation/session/interactions/navigating-during-interaction.js.map +1 -1
  335. package/esm5/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js +6 -49
  336. package/esm5/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js.map +1 -1
  337. package/esm5/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js +11 -120
  338. package/esm5/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js.map +1 -1
  339. package/esm5/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js +13 -106
  340. package/esm5/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js.map +1 -1
  341. package/esm5/lib/place/navigation/session/navigating.js +6 -53
  342. package/esm5/lib/place/navigation/session/navigating.js.map +1 -1
  343. package/esm5/lib/place/navigation/session/navigation-context.js +0 -17
  344. package/esm5/lib/place/navigation/session/navigation-context.js.map +1 -1
  345. package/esm5/lib/place/navigation/session/navigation-session.js +39 -306
  346. package/esm5/lib/place/navigation/session/navigation-session.js.map +1 -1
  347. package/esm5/lib/place/navigation/session/pop-state-navigation.js +5 -33
  348. package/esm5/lib/place/navigation/session/pop-state-navigation.js.map +1 -1
  349. package/esm5/lib/place/place-component.js +30 -142
  350. package/esm5/lib/place/place-component.js.map +1 -1
  351. package/esm5/lib/place/place-config.js +0 -13
  352. package/esm5/lib/place/place-config.js.map +1 -1
  353. package/esm5/lib/place/place-definition.js +37 -219
  354. package/esm5/lib/place/place-definition.js.map +1 -1
  355. package/esm5/lib/place/place-history.js +11 -56
  356. package/esm5/lib/place/place-history.js.map +1 -1
  357. package/esm5/lib/place/place-router.js +59 -372
  358. package/esm5/lib/place/place-router.js.map +1 -1
  359. package/esm5/lib/place/place.decorator.js +3 -38
  360. package/esm5/lib/place/place.decorator.js.map +1 -1
  361. package/esm5/lib/place/place.module.js +37 -40
  362. package/esm5/lib/place/place.module.js.map +1 -1
  363. package/esm5/lib/place/place.module.ngfactory.js.map +1 -1
  364. package/esm5/lib/place/route/formatter.js +6 -60
  365. package/esm5/lib/place/route/formatter.js.map +1 -1
  366. package/esm5/lib/place/route/json-types.js +0 -12
  367. package/esm5/lib/place/route/json-types.js.map +1 -1
  368. package/esm5/lib/place/route/parameter-decorators.js +14 -133
  369. package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
  370. package/esm5/lib/place/route/parameter-definition.class.js +21 -222
  371. package/esm5/lib/place/route/parameter-definition.class.js.map +1 -1
  372. package/esm5/lib/place/route/parameter-sanitiser.js +0 -18
  373. package/esm5/lib/place/route/parameter-sanitiser.js.map +1 -1
  374. package/esm5/lib/place/route/parameter-snapshot.js +0 -19
  375. package/esm5/lib/place/route/parameter-snapshot.js.map +1 -1
  376. package/esm5/lib/place/route/visit-sanitiser.js +4 -42
  377. package/esm5/lib/place/route/visit-sanitiser.js.map +1 -1
  378. package/esm5/lib/place/url-service.js +20 -119
  379. package/esm5/lib/place/url-service.js.map +1 -1
  380. package/esm5/lib/place/url-snapshot.js +15 -143
  381. package/esm5/lib/place/url-snapshot.js.map +1 -1
  382. package/esm5/lib/place/visit.js +14 -132
  383. package/esm5/lib/place/visit.js.map +1 -1
  384. package/esm5/public_api.js +6 -10
  385. package/esm5/public_api.js.map +1 -1
  386. package/fesm2015/coolon-angular-ui-powerups.js +861 -4526
  387. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  388. package/fesm5/coolon-angular-ui-powerups.js +1129 -6274
  389. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  390. package/lib/components/forms/abstract-input.component.d.ts +9 -9
  391. package/lib/components/resize-aware.component.d.ts +3 -3
  392. package/lib/directives/command.directive.d.ts +4 -2
  393. package/lib/directives/focus-binding.directive.d.ts +1 -1
  394. package/lib/interaction/activity-ref.d.ts +2 -2
  395. package/lib/interaction/activity.d.ts +2 -2
  396. package/lib/interaction/components/activity-container/activity-container.component.d.ts +2 -2
  397. package/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.d.ts +3 -2
  398. package/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.d.ts +1 -1
  399. package/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.d.ts +1 -1
  400. package/lib/interaction/services/interaction.service.d.ts +1 -1
  401. package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.d.ts +1 -1
  402. package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.d.ts +1 -1
  403. package/lib/place/components/place-outlet/place-outlet.component.d.ts +4 -4
  404. package/lib/place/guards/consolidated-param-map.d.ts +1 -1
  405. package/lib/place/navigation/place-component-deactivation-handler.d.ts +2 -2
  406. package/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.d.ts +1 -1
  407. package/lib/place/navigation/session/navigation-session.d.ts +4 -4
  408. package/lib/place/place-component.d.ts +2 -2
  409. package/lib/place/place-router.d.ts +3 -3
  410. package/lib/place/route/formatter.d.ts +4 -3
  411. package/lib/place/route/parameter-definition.class.d.ts +2 -2
  412. package/package.json +10 -10
  413. package/schematics/place-routes/place-builder.js +4 -2
  414. package/schematics/place-routes/place-builder.js.map +1 -1
  415. package/schematics/place-routes/place-class-scanner.d.ts +3 -3
  416. package/schematics/place-routes/place-class-scanner.js +1 -1
  417. package/schematics/place-routes/place-class-scanner.js.map +1 -1
  418. package/schematics/place-routes/place-def.d.ts +9 -9
  419. /package/{styles → assets}/styles.scss +0 -0
@@ -1,8 +1,4 @@
1
- /**
2
- * @fileoverview added by tsickle
3
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4
- */
5
- import * as tslib_1 from "tslib";
1
+ import { __decorate, __extends, __metadata } from "tslib";
6
2
  import { Injectable } from '@angular/core';
7
3
  import { DelegatingValueModel, Dsl, GarbageCollector, MutableListModel } from '@coolon/pectin';
8
4
  import { assert } from '@coolon/typescript-utilities';
@@ -10,7 +6,6 @@ import { InteractionServiceRoutingAdapter } from './interaction-service-routing-
10
6
  import { ModalInteractionContextFactory } from './modal-interaction-context.factory';
11
7
  import * as i0 from "@angular/core";
12
8
  import * as i1 from "./modal-interaction-context.factory";
13
- /** @type {?} */
14
9
  var inplaceMonitorCount = 0;
15
10
  var InteractionService = /** @class */ (function () {
16
11
  function InteractionService(modelInteractionContextFactory) {
@@ -21,9 +16,9 @@ var InteractionService = /** @class */ (function () {
21
16
  // private readonly _activeContext: ValueModelChain<InteractionContext>;
22
17
  this._navigationInProgress = new DelegatingValueModel().withDefault(false);
23
18
  var _a = Dsl.disposeWith(this.garbage), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
24
- this.exclusiveInteractionRegistry = new InteractionService.ContextRegistry();
25
- this.modalInteractionRegistry = new InteractionService.ContextRegistry();
26
- this.inPlaceInteractionRegistry = new InteractionService.ContextRegistry();
19
+ this.exclusiveInteractionRegistry = new InteractionService_1.ContextRegistry();
20
+ this.modalInteractionRegistry = new InteractionService_1.ContextRegistry();
21
+ this.inPlaceInteractionRegistry = new InteractionService_1.ContextRegistry();
27
22
  this.modalInteractionRegistry.disableWhen(valueOf.any(this.exclusiveInteractionRegistry.active, this.modalInteractionRegistry.active).areTruthy());
28
23
  this.inPlaceInteractionRegistry.disableWhen(valueOf.any(this.exclusiveInteractionRegistry.active, this.modalInteractionRegistry.active, this.inPlaceInteractionRegistry.active).areTruthy());
29
24
  this.active = valueOf.any(this.inPlaceInteractionRegistry.active, this.modalInteractionRegistry.active).areTruthy();
@@ -33,63 +28,30 @@ var InteractionService = /** @class */ (function () {
33
28
  this.activeModalContext = chain(this.modalInteractionRegistry.interactionContexts).first();
34
29
  this.inModalInteraction = chain(this.activeModalContext).isNotNil();
35
30
  }
36
- /**
37
- * @return {?}
38
- */
39
- InteractionService.prototype.isActive = /**
40
- * @return {?}
41
- */
42
- function () {
31
+ InteractionService_1 = InteractionService;
32
+ InteractionService.prototype.isActive = function () {
43
33
  return this.active.value;
44
34
  };
45
35
  /**
46
36
  * @deprecated use #createModalInteractionContextDisposedWith instead.
47
37
  * @param disposable
48
38
  */
49
- /**
50
- * @deprecated use #createModalInteractionContextDisposedWith instead.
51
- * @param {?} disposable
52
- * @return {?}
53
- */
54
- InteractionService.prototype.createModalInteractionContextFor = /**
55
- * @deprecated use #createModalInteractionContextDisposedWith instead.
56
- * @param {?} disposable
57
- * @return {?}
58
- */
59
- function (disposable) {
39
+ InteractionService.prototype.createModalInteractionContextFor = function (disposable) {
60
40
  return this.createModalInteractionContextDisposedWith(disposable);
61
41
  };
62
42
  /**
63
43
  * Creates a new model interaction context that will be disposed along with the component.
64
44
  * @param disposable
65
45
  */
66
- /**
67
- * Creates a new model interaction context that will be disposed along with the component.
68
- * @param {?} disposable
69
- * @return {?}
70
- */
71
- InteractionService.prototype.createModalInteractionContextDisposedWith = /**
72
- * Creates a new model interaction context that will be disposed along with the component.
73
- * @param {?} disposable
74
- * @return {?}
75
- */
76
- function (disposable) {
46
+ InteractionService.prototype.createModalInteractionContextDisposedWith = function (disposable) {
77
47
  // TODO: look at making the registry the factory..
78
- return this.modelInteractionContextFactory.createInteractionContext('modal', new InteractionService.ApiAdapter(this.placeRouter, this.modalInteractionRegistry));
48
+ return this.modelInteractionContextFactory.createInteractionContext('modal', new InteractionService_1.ApiAdapter(this.placeRouter, this.modalInteractionRegistry));
79
49
  };
80
- /**
81
- * @param {?} interactionContext
82
- * @return {?}
83
- */
84
- InteractionService.prototype.registerInplaceInteractionContext = /**
85
- * @param {?} interactionContext
86
- * @return {?}
87
- */
88
- function (interactionContext) {
50
+ InteractionService.prototype.registerInplaceInteractionContext = function (interactionContext) {
89
51
  // TODO: look at making the registry the factory..
90
52
  // Todo: check for double registration.
91
53
  // Todo: allow multiple inplace interactions..
92
- interactionContext.initialise("ip" + ++inplaceMonitorCount, new InteractionService.ApiAdapter(this.placeRouter, this.inPlaceInteractionRegistry));
54
+ interactionContext.initialise("ip" + ++inplaceMonitorCount, new InteractionService_1.ApiAdapter(this.placeRouter, this.inPlaceInteractionRegistry));
93
55
  };
94
56
  // private assertModalCanStart() {
95
57
  // assert.isFalsey(this.inExclusiveInteraction.value);
@@ -113,163 +75,38 @@ var InteractionService = /** @class */ (function () {
113
75
  * try and interact in a way that we can't track and synchronise with the browser back
114
76
  * button.
115
77
  */
116
- // private assertModalCanStart() {
117
- // assert.isFalsey(this.inExclusiveInteraction.value);
118
- // assert.isFalsey(this.modalActive.value);
119
- // }
120
- //
121
- // private assertInPlaceCanStart() {
122
- // assert.isFalsey(this.inExclusiveInteraction.value);
123
- // assert.isFalsey(this.modalActive.value);
124
- // assert.isFalsey(this._activeInlineContext.value);
125
- // }
126
- // // @Trace()
127
- // getActiveContext(): InteractionContext {
128
- // assert.isTruthy(this.isActive());
129
- // return this._activeContext.value;
130
- // }
131
- /**
132
- * Creates an interaction context that will prevent any other contexts from starting an
133
- * activity until it is disposed. This is intended for use by the router for passing
134
- * to PlaceComponent.canDeactivate(interactionContext). This ensures components don't
135
- * try and interact in a way that we can't track and synchronise with the browser back
136
- * button.
137
- * @param {?} router
138
- * @return {?}
139
- */
140
- InteractionService.prototype.registerPlaceRouter =
141
- // private assertModalCanStart() {
142
- // assert.isFalsey(this.inExclusiveInteraction.value);
143
- // assert.isFalsey(this.modalActive.value);
144
- // }
145
- //
146
- // private assertInPlaceCanStart() {
147
- // assert.isFalsey(this.inExclusiveInteraction.value);
148
- // assert.isFalsey(this.modalActive.value);
149
- // assert.isFalsey(this._activeInlineContext.value);
150
- // }
151
- // // @Trace()
152
- // getActiveContext(): InteractionContext {
153
- // assert.isTruthy(this.isActive());
154
- // return this._activeContext.value;
155
- // }
156
- /**
157
- * Creates an interaction context that will prevent any other contexts from starting an
158
- * activity until it is disposed. This is intended for use by the router for passing
159
- * to PlaceComponent.canDeactivate(interactionContext). This ensures components don't
160
- * try and interact in a way that we can't track and synchronise with the browser back
161
- * button.
162
- * @param {?} router
163
- * @return {?}
164
- */
165
- function (router) {
78
+ InteractionService.prototype.registerPlaceRouter = function (router) {
166
79
  var _this = this;
167
80
  assert.isFalsey(this.placeRouter);
168
81
  this.placeRouter = router;
169
82
  this._navigationInProgress.setDelegate(this.placeRouter.navigationInProgress);
170
- /** @type {?} */
171
83
  var self = this;
172
- return new InteractionServiceRoutingAdapter(this.activeInteractionContextIds, this.activeModalContext, (/**
173
- * @return {?}
174
- */
175
- function () {
176
- return self.modelInteractionContextFactory.createInteractionContext('exclusive', new InteractionService.ApiAdapter(_this.placeRouter, _this.exclusiveInteractionRegistry));
177
- }));
84
+ return new InteractionServiceRoutingAdapter(this.activeInteractionContextIds, this.activeModalContext, function () {
85
+ return self.modelInteractionContextFactory.createInteractionContext('exclusive', new InteractionService_1.ApiAdapter(_this.placeRouter, _this.exclusiveInteractionRegistry));
86
+ });
178
87
  };
179
- InteractionService.decorators = [
180
- { type: Injectable, args: [{
181
- providedIn: 'root'
182
- },] }
183
- ];
184
- /** @nocollapse */
88
+ var InteractionService_1;
185
89
  InteractionService.ctorParameters = function () { return [
186
90
  { type: ModalInteractionContextFactory }
187
91
  ]; };
188
- /** @nocollapse */ InteractionService.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function InteractionService_Factory() { return new InteractionService(i0.ɵɵinject(i1.ModalInteractionContextFactory)); }, token: InteractionService, providedIn: "root" });
92
+ InteractionService.ɵprov = i0.ɵɵdefineInjectable({ factory: function InteractionService_Factory() { return new InteractionService(i0.ɵɵinject(i1.ModalInteractionContextFactory)); }, token: InteractionService, providedIn: "root" });
93
+ InteractionService = InteractionService_1 = __decorate([
94
+ Injectable({
95
+ providedIn: 'root'
96
+ }),
97
+ __metadata("design:paramtypes", [ModalInteractionContextFactory])
98
+ ], InteractionService);
189
99
  return InteractionService;
190
100
  }());
191
101
  export { InteractionService };
192
- if (false) {
193
- /**
194
- * @type {?}
195
- * @private
196
- */
197
- InteractionService.prototype.garbage;
198
- /** @type {?} */
199
- InteractionService.prototype.active;
200
- /**
201
- * @type {?}
202
- * @private
203
- */
204
- InteractionService.prototype._navigationInProgress;
205
- /**
206
- * @type {?}
207
- * @private
208
- */
209
- InteractionService.prototype.placeRouter;
210
- /**
211
- * @type {?}
212
- * @private
213
- */
214
- InteractionService.prototype.exclusiveInteractionRegistry;
215
- /**
216
- * @type {?}
217
- * @private
218
- */
219
- InteractionService.prototype.modalInteractionRegistry;
220
- /**
221
- * @type {?}
222
- * @private
223
- */
224
- InteractionService.prototype.inPlaceInteractionRegistry;
225
- /**
226
- * @type {?}
227
- * @private
228
- */
229
- InteractionService.prototype.activeModalContext;
230
- /** @type {?} */
231
- InteractionService.prototype.activeInteractionContextIds;
232
- /** @type {?} */
233
- InteractionService.prototype.inModalInteraction;
234
- /** @type {?} */
235
- InteractionService.prototype.modelInteractionContextFactory;
236
- }
237
102
  (function (InteractionService) {
238
103
  /**
239
- * @record
240
- */
241
- function Api() { }
242
- InteractionService.Api = Api;
243
- if (false) {
244
- /**
245
- * Notifies the interaction service that a particular interactionContext has become active. The interaction
246
- * services will then push changes to the router to track state. If the router is idle, the promise will
247
- * resolve when the routing has finished updating. Otherwise it will return immediately.
248
- * @param {?} interactionContext
249
- * @return {?}
250
- */
251
- Api.prototype.notifyActive = function (interactionContext) { };
252
- /**
253
- * Notifies the interaction service that a particular interactionContext has become idle. The interaction
254
- * services will then push changes to the router to track state. If the router is idle, the promise will
255
- * resolve when the routing has finished updating. Otherwise it will return immediately.
256
- * @param {?} interactionContext
257
- * @return {?}
258
- */
259
- Api.prototype.notifyFinished = function (interactionContext) { };
260
- }
261
- /**
262
- * Provides a mechanism for the service to keep track of what the API adapters are doing to
263
- * ensure the rules are followed, i.e. modal or in-place interaction aren't started while
264
- * an exclusive routing interaction is active.
265
- */
266
- var /**
267
104
  * Provides a mechanism for the service to keep track of what the API adapters are doing to
268
105
  * ensure the rules are followed, i.e. modal or in-place interaction aren't started while
269
106
  * an exclusive routing interaction is active.
270
107
  */
271
- ContextRegistry = /** @class */ (function (_super) {
272
- tslib_1.__extends(ContextRegistry, _super);
108
+ var ContextRegistry = /** @class */ (function (_super) {
109
+ __extends(ContextRegistry, _super);
273
110
  function ContextRegistry() {
274
111
  var _this = _super.call(this) || this;
275
112
  _this._interactions = new MutableListModel();
@@ -280,126 +117,44 @@ if (false) {
280
117
  return _this;
281
118
  }
282
119
  Object.defineProperty(ContextRegistry.prototype, "interactionContexts", {
283
- get: /**
284
- * @return {?}
285
- */
286
- function () {
120
+ get: function () {
287
121
  return this._interactions.readonly;
288
122
  },
289
123
  enumerable: true,
290
124
  configurable: true
291
125
  });
292
- /**
293
- * @param {?} context
294
- * @return {?}
295
- */
296
- ContextRegistry.prototype.start = /**
297
- * @param {?} context
298
- * @return {?}
299
- */
300
- function (context) {
126
+ ContextRegistry.prototype.start = function (context) {
301
127
  this._interactions.push(context);
302
128
  };
303
- /**
304
- * @param {?} context
305
- * @return {?}
306
- */
307
- ContextRegistry.prototype.finish = /**
308
- * @param {?} context
309
- * @return {?}
310
- */
311
- function (context) {
129
+ ContextRegistry.prototype.finish = function (context) {
312
130
  this._interactions.remove(context);
313
131
  };
314
- /**
315
- * @return {?}
316
- */
317
- ContextRegistry.prototype.isActive = /**
318
- * @return {?}
319
- */
320
- function () {
132
+ ContextRegistry.prototype.isActive = function () {
321
133
  return this.active.value;
322
134
  };
323
- /**
324
- * @param {?} disabled
325
- * @return {?}
326
- */
327
- ContextRegistry.prototype.disableWhen = /**
328
- * @param {?} disabled
329
- * @return {?}
330
- */
331
- function (disabled) {
135
+ ContextRegistry.prototype.disableWhen = function (disabled) {
332
136
  this._disabledDelegate.setDelegate(disabled);
333
137
  };
334
138
  return ContextRegistry;
335
139
  }(GarbageCollector));
336
140
  InteractionService.ContextRegistry = ContextRegistry;
337
- if (false) {
338
- /**
339
- * @type {?}
340
- * @private
341
- */
342
- ContextRegistry.prototype._interactions;
343
- /**
344
- * @type {?}
345
- * @private
346
- */
347
- ContextRegistry.prototype._disabledDelegate;
348
- /** @type {?} */
349
- ContextRegistry.prototype.active;
350
- /** @type {?} */
351
- ContextRegistry.prototype.interactionContextIds;
352
- }
353
141
  var ApiAdapter = /** @class */ (function () {
354
142
  function ApiAdapter(placeRouter, contextRegistry) {
355
143
  this.placeRouter = placeRouter;
356
144
  this.contextRegistry = contextRegistry;
357
145
  }
358
146
  // @Trace()
359
- // @Trace()
360
- /**
361
- * @param {?} context
362
- * @return {?}
363
- */
364
- ApiAdapter.prototype.notifyActive =
365
- // @Trace()
366
- /**
367
- * @param {?} context
368
- * @return {?}
369
- */
370
- function (context) {
147
+ ApiAdapter.prototype.notifyActive = function (context) {
371
148
  assert.isTruthy(context.identifier);
372
149
  this.contextRegistry.start(context);
373
150
  return this.isNavigationInProgress() ? Promise.resolve() : this.placeRouter.syncInteractionContextIdsWithRouter();
374
151
  };
375
152
  // @Trace()
376
- // @Trace()
377
- /**
378
- * @private
379
- * @return {?}
380
- */
381
- ApiAdapter.prototype.isNavigationInProgress =
382
- // @Trace()
383
- /**
384
- * @private
385
- * @return {?}
386
- */
387
- function () {
153
+ ApiAdapter.prototype.isNavigationInProgress = function () {
388
154
  return this.placeRouter.navigationInProgress.value;
389
155
  };
390
156
  // @Trace()
391
- // @Trace()
392
- /**
393
- * @param {?} context
394
- * @return {?}
395
- */
396
- ApiAdapter.prototype.notifyFinished =
397
- // @Trace()
398
- /**
399
- * @param {?} context
400
- * @return {?}
401
- */
402
- function (context) {
157
+ ApiAdapter.prototype.notifyFinished = function (context) {
403
158
  this.contextRegistry.finish(context);
404
159
  // :: Important ::
405
160
  // This method will be traversed by both the place router (during can canDeactivate guards) and user land code
@@ -413,17 +168,5 @@ if (false) {
413
168
  return ApiAdapter;
414
169
  }());
415
170
  InteractionService.ApiAdapter = ApiAdapter;
416
- if (false) {
417
- /**
418
- * @type {?}
419
- * @private
420
- */
421
- ApiAdapter.prototype.placeRouter;
422
- /**
423
- * @type {?}
424
- * @private
425
- */
426
- ApiAdapter.prototype.contextRegistry;
427
- }
428
171
  })(InteractionService || (InteractionService = {}));
429
172
  //# sourceMappingURL=interaction.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"interaction.service.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/services/interaction.service.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAEL,oBAAoB,EAEpB,GAAG,EACH,gBAAgB,EAEhB,gBAAgB,EAIjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAItD,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AAEzF,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;;;;IAEjF,mBAAmB,GAAG,CAAC;AAE3B;IAsBE,4BAAqB,8BAA8D;QAA9D,mCAA8B,GAA9B,8BAA8B,CAAgC;QAjBlE,YAAO,GAAG,IAAI,gBAAgB,EAAE,CAAC;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AC,WAAW,CAAC,mCAAmC,EAAE,CAAC;QACpH,CAAC;QAED,WAAW;;;;;;QACH,2CAAsB;;;;;;QAA9B;YACE,OAAO,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAAC,KAAK,CAAC;QACrD,CAAC;QAED,WAAW;;;;;;QACX,mCAAc;;;;;;QAAd,UAAe,OAA2B;YACxC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YACrC,kBAAkB;YAClB,8GAA8G;YAC9G,wFAAwF;YACxF,yGAAyG;YACzG,2EAA2E;YAC3E,iGAAiG;YACjG,iFAAiF;YACjF,OAAO,IAAI,CAAC,sBAAsB,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,mCAAmC,EAAE,CAAC;QACpH,CAAC;QACH,iBAAC;IAAD,CAAC,AA7BD,IA6BC;IA7BY,6BAAU,aA6BtB,CAAA;;;;;;QA3Ba,iCAAyC;;;;;QAAE,qCAAiD;;AA6B5G,CAAC,EA5FgB,kBAAkB,KAAlB,kBAAkB,QA4FlC","sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n BooleanValueModelChain,\n DelegatingValueModel,\n Disposable,\n Dsl,\n GarbageCollector, ListModel,\n ListModelChain,\n MutableListModel,\n MutableValueModel, Trace,\n ValueModel,\n ValueModelChain\n} from '@coolon/pectin';\nimport { assert } from '@coolon/typescript-utilities';\nimport { PlaceRouter } from '../../place/place-router';\nimport { InPlaceInteractionContextComponent } from '../components/inplace-interaction-context/in-place-interaction-context.component';\nimport { InteractionContext } from '../interaction-context';\nimport { InteractionServiceRoutingAdapter } from './interaction-service-routing-adapter';\n\nimport { ModalInteractionContextFactory } from './modal-interaction-context.factory';\n\nlet inplaceMonitorCount = 0;\n\n@Injectable({\n providedIn: 'root'\n})\nexport class InteractionService {\n\n private readonly garbage = new GarbageCollector();\n readonly active: BooleanValueModelChain;\n\n // private readonly _activeModalContext = new MutableValueModel<InteractionContext>();\n // private readonly _activeInlineContext = new MutableValueModel<InteractionContext>();\n // private readonly _activeContext: ValueModelChain<InteractionContext>;\n private readonly _navigationInProgress = new DelegatingValueModel<boolean>().withDefault(false);\n\n private placeRouter: PlaceRouter;\n private exclusiveInteractionRegistry: InteractionService.ContextRegistry;\n private modalInteractionRegistry: InteractionService.ContextRegistry;\n private inPlaceInteractionRegistry: InteractionService.ContextRegistry;\n private activeModalContext: ValueModelChain<InteractionContext>;\n\n readonly activeInteractionContextIds: ListModelChain<string>;\n readonly inModalInteraction: BooleanValueModelChain;\n\n constructor(readonly modelInteractionContextFactory: ModalInteractionContextFactory) {\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this.garbage);\n\n this.exclusiveInteractionRegistry = new InteractionService.ContextRegistry();\n this.modalInteractionRegistry = new InteractionService.ContextRegistry();\n this.inPlaceInteractionRegistry = new InteractionService.ContextRegistry();\n\n this.modalInteractionRegistry.disableWhen(valueOf.any(\n this.exclusiveInteractionRegistry.active,\n this.modalInteractionRegistry.active\n ).areTruthy());\n\n this.inPlaceInteractionRegistry.disableWhen(valueOf.any(\n this.exclusiveInteractionRegistry.active,\n this.modalInteractionRegistry.active,\n this.inPlaceInteractionRegistry.active\n ).areTruthy());\n\n this.active = valueOf.any(\n this.inPlaceInteractionRegistry.active,\n this.modalInteractionRegistry.active\n ).areTruthy();\n\n\n // TODO: chain.concat(listOrValueModels) would be nice.\n this.activeInteractionContextIds = chain(this.inPlaceInteractionRegistry.interactionContextIds)\n .concat(this.modalInteractionRegistry.interactionContextIds);\n\n this.activeModalContext = chain(this.modalInteractionRegistry.interactionContexts).first();\n this.inModalInteraction = chain(this.activeModalContext).isNotNil();\n\n }\n\n isActive(): boolean {\n return this.active.value;\n }\n\n /**\n * @deprecated use #createModalInteractionContextDisposedWith instead.\n * @param disposable\n */\n createModalInteractionContextFor(disposable: Disposable.Collector): InteractionContext {\n return this.createModalInteractionContextDisposedWith(disposable);\n }\n\n /**\n * Creates a new model interaction context that will be disposed along with the component.\n * @param disposable\n */\n createModalInteractionContextDisposedWith(disposable: Disposable.Collector): InteractionContext {\n // TODO: look at making the registry the factory..\n return this.modelInteractionContextFactory.createInteractionContext('modal', new InteractionService.ApiAdapter(this.placeRouter, this.modalInteractionRegistry));\n }\n\n registerInplaceInteractionContext(interactionContext: InPlaceInteractionContextComponent<any, any, any>) {\n // TODO: look at making the registry the factory..\n // Todo: check for double registration.\n // Todo: allow multiple inplace interactions..\n interactionContext.initialise(`ip${++inplaceMonitorCount}`, new InteractionService.ApiAdapter(this.placeRouter, this.inPlaceInteractionRegistry));\n }\n\n\n // private assertModalCanStart() {\n // assert.isFalsey(this.inExclusiveInteraction.value);\n // assert.isFalsey(this.modalActive.value);\n // }\n //\n // private assertInPlaceCanStart() {\n // assert.isFalsey(this.inExclusiveInteraction.value);\n // assert.isFalsey(this.modalActive.value);\n // assert.isFalsey(this._activeInlineContext.value);\n // }\n\n\n // // @Trace()\n // getActiveContext(): InteractionContext {\n // assert.isTruthy(this.isActive());\n // return this._activeContext.value;\n // }\n\n /**\n * Creates an interaction context that will prevent any other contexts from starting an\n * activity until it is disposed. This is intended for use by the router for passing\n * to PlaceComponent.canDeactivate(interactionContext). This ensures components don't\n * try and interact in a way that we can't track and synchronise with the browser back\n * button.\n */\n registerPlaceRouter(router: PlaceRouter): InteractionServiceRoutingAdapter {\n assert.isFalsey(this.placeRouter);\n this.placeRouter = router;\n this._navigationInProgress.setDelegate(this.placeRouter.navigationInProgress);\n const self = this;\n return new InteractionServiceRoutingAdapter(\n this.activeInteractionContextIds,\n this.activeModalContext,\n () => {\n return self.modelInteractionContextFactory.createInteractionContext('exclusive', new InteractionService.ApiAdapter(this.placeRouter, this.exclusiveInteractionRegistry));\n });\n }\n\n}\n\nexport namespace InteractionService {\n\n export interface Api {\n\n /**\n * Notifies the interaction service that a particular interactionContext has become active. The interaction\n * services will then push changes to the router to track state. If the router is idle, the promise will\n * resolve when the routing has finished updating. Otherwise it will return immediately.\n * @param interactionContext\n */\n notifyActive(interactionContext: InteractionContext): Promise<unknown>;\n\n /**\n * Notifies the interaction service that a particular interactionContext has become idle. The interaction\n * services will then push changes to the router to track state. If the router is idle, the promise will\n * resolve when the routing has finished updating. Otherwise it will return immediately.\n * @param interactionContext\n */\n notifyFinished(interactionContext: InteractionContext): Promise<unknown>;\n }\n\n /**\n * Provides a mechanism for the service to keep track of what the API adapters are doing to\n * ensure the rules are followed, i.e. modal or in-place interaction aren't started while\n * an exclusive routing interaction is active.\n */\n export class ContextRegistry extends GarbageCollector {\n\n private _interactions = new MutableListModel<InteractionContext>();\n private _disabledDelegate = new DelegatingValueModel<boolean>().withDefault(false);\n readonly active: BooleanValueModelChain;\n readonly interactionContextIds: ListModelChain<string>;\n\n constructor() {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n this.active = chain(this._interactions).isNotEmpty();\n this.interactionContextIds = chain(this._interactions).pluck(\"identifier\");\n }\n\n get interactionContexts():ListModel<InteractionContext> {\n return this._interactions.readonly;\n }\n\n start(context: InteractionContext) {\n this._interactions.push(context);\n }\n\n finish(context: InteractionContext) {\n this._interactions.remove(context);\n }\n\n isActive() {\n return this.active.value;\n }\n\n disableWhen(disabled: ValueModel<boolean>) {\n this._disabledDelegate.setDelegate(disabled);\n }\n }\n\n export class ApiAdapter implements Api {\n\n constructor(private readonly placeRouter: PlaceRouter, private readonly contextRegistry: ContextRegistry) {\n }\n\n // @Trace()\n notifyActive(context: InteractionContext): Promise<any> {\n assert.isTruthy(context.identifier);\n this.contextRegistry.start(context);\n return this.isNavigationInProgress() ? Promise.resolve() : this.placeRouter.syncInteractionContextIdsWithRouter();\n }\n\n // @Trace()\n private isNavigationInProgress() {\n return this.placeRouter.navigationInProgress.value;\n }\n\n // @Trace()\n notifyFinished(context: InteractionContext): Promise<any> {\n this.contextRegistry.finish(context);\n // :: Important ::\n // This method will be traversed by both the place router (during can canDeactivate guards) and user land code\n // (both when routing is idle and while it is active in PlaceComponent.canDeactivate()).\n // The result of pushInteractionIdsToRoute will not start until after the current route finishes, and the\n // current route won't finish until after this promise returns... Deadlock.\n // So in order to keep this logic out of the activities we perform the check here and ensure that\n // any interactions with the context while routing is active returns immediately.\n return this.isNavigationInProgress() ? Promise.resolve() : this.placeRouter.syncInteractionContextIdsWithRouter();\n }\n }\n\n}\n"]}
1
+ {"version":3,"file":"interaction.service.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/services/interaction.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAEL,oBAAoB,EAEpB,GAAG,EACH,gBAAgB,EAEhB,gBAAgB,EAIjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAItD,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AAEzF,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;;;AAErF,IAAI,mBAAmB,GAAG,CAAC,CAAC;AAK5B;IAmBE,4BAAqB,8BAA8D;QAA9D,mCAA8B,GAA9B,8BAA8B,CAAgC;QAjBlE,YAAO,GAAG,IAAI,gBAAgB,EAAE,CAAC;QAGlD,sFAAsF;QACtF,uFAAuF;QACvF,wEAAwE;QACvD,0BAAqB,GAAG,IAAI,oBAAoB,EAAW,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAYxF,IAAA,kCAA0F,EAAxF,gBAAK,EAAE,oBAAO,EAAE,kBAAM,EAAE,cAAI,EAAE,gBAAK,EAAE,oBAAO,EAAE,sBAA0C,CAAC;QAEjG,IAAI,CAAC,4BAA4B,GAAG,IAAI,oBAAkB,CAAC,eAAe,EAAE,CAAC;QAC7E,IAAI,CAAC,wBAAwB,GAAG,IAAI,oBAAkB,CAAC,eAAe,EAAE,CAAC;QACzE,IAAI,CAAC,0BAA0B,GAAG,IAAI,oB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CAAC,AAjCD,CAAqC,gBAAgB,GAiCpD;IAjCY,kCAAe,kBAiC3B,CAAA;IAED;QAEE,oBAA6B,WAAwB,EAAmB,eAAgC;YAA3E,gBAAW,GAAX,WAAW,CAAa;YAAmB,oBAAe,GAAf,eAAe,CAAiB;QACxG,CAAC;QAED,WAAW;QACX,iCAAY,GAAZ,UAAa,OAA2B;YACtC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YACpC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACpC,OAAO,IAAI,CAAC,sBAAsB,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,mCAAmC,EAAE,CAAC;QACpH,CAAC;QAED,WAAW;QACH,2CAAsB,GAA9B;YACE,OAAO,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAAC,KAAK,CAAC;QACrD,CAAC;QAED,WAAW;QACX,mCAAc,GAAd,UAAe,OAA2B;YACxC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YACrC,kBAAkB;YAClB,8GAA8G;YAC9G,wFAAwF;YACxF,yGAAyG;YACzG,2EAA2E;YAC3E,iGAAiG;YACjG,iFAAiF;YACjF,OAAO,IAAI,CAAC,sBAAsB,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,mCAAmC,EAAE,CAAC;QACpH,CAAC;QACH,iBAAC;IAAD,CAAC,AA7BD,IA6BC;IA7BY,6BAAU,aA6BtB,CAAA;AAEH,CAAC,EA5FgB,kBAAkB,KAAlB,kBAAkB,QA4FlC","sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n BooleanValueModelChain,\n DelegatingValueModel,\n Disposable,\n Dsl,\n GarbageCollector, ListModel,\n ListModelChain,\n MutableListModel,\n MutableValueModel, Trace,\n ValueModel,\n ValueModelChain\n} from '@coolon/pectin';\nimport { assert } from '@coolon/typescript-utilities';\nimport { PlaceRouter } from '../../place/place-router';\nimport { InPlaceInteractionContextComponent } from '../components/inplace-interaction-context/in-place-interaction-context.component';\nimport { InteractionContext } from '../interaction-context';\nimport { InteractionServiceRoutingAdapter } from './interaction-service-routing-adapter';\n\nimport { ModalInteractionContextFactory } from './modal-interaction-context.factory';\n\nlet inplaceMonitorCount = 0;\n\n@Injectable({\n providedIn: 'root'\n})\nexport class InteractionService {\n\n private readonly garbage = new GarbageCollector();\n readonly active: BooleanValueModelChain;\n\n // private readonly _activeModalContext = new MutableValueModel<InteractionContext>();\n // private readonly _activeInlineContext = new MutableValueModel<InteractionContext>();\n // private readonly _activeContext: ValueModelChain<InteractionContext>;\n private readonly _navigationInProgress = new DelegatingValueModel<boolean>().withDefault(false);\n\n private placeRouter: PlaceRouter;\n private exclusiveInteractionRegistry: InteractionService.ContextRegistry;\n private modalInteractionRegistry: InteractionService.ContextRegistry;\n private inPlaceInteractionRegistry: InteractionService.ContextRegistry;\n private activeModalContext: ValueModelChain<InteractionContext>;\n\n readonly activeInteractionContextIds: ListModelChain<string>;\n readonly inModalInteraction: BooleanValueModelChain;\n\n constructor(readonly modelInteractionContextFactory: ModalInteractionContextFactory) {\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this.garbage);\n\n this.exclusiveInteractionRegistry = new InteractionService.ContextRegistry();\n this.modalInteractionRegistry = new InteractionService.ContextRegistry();\n this.inPlaceInteractionRegistry = new InteractionService.ContextRegistry();\n\n this.modalInteractionRegistry.disableWhen(valueOf.any(\n this.exclusiveInteractionRegistry.active,\n this.modalInteractionRegistry.active\n ).areTruthy());\n\n this.inPlaceInteractionRegistry.disableWhen(valueOf.any(\n this.exclusiveInteractionRegistry.active,\n this.modalInteractionRegistry.active,\n this.inPlaceInteractionRegistry.active\n ).areTruthy());\n\n this.active = valueOf.any(\n this.inPlaceInteractionRegistry.active,\n this.modalInteractionRegistry.active\n ).areTruthy();\n\n\n // TODO: chain.concat(listOrValueModels) would be nice.\n this.activeInteractionContextIds = chain(this.inPlaceInteractionRegistry.interactionContextIds)\n .concat(this.modalInteractionRegistry.interactionContextIds);\n\n this.activeModalContext = chain(this.modalInteractionRegistry.interactionContexts).first();\n this.inModalInteraction = chain(this.activeModalContext).isNotNil();\n\n }\n\n isActive(): boolean {\n return this.active.value;\n }\n\n /**\n * @deprecated use #createModalInteractionContextDisposedWith instead.\n * @param disposable\n */\n createModalInteractionContextFor(disposable: Disposable.Collector): InteractionContext {\n return this.createModalInteractionContextDisposedWith(disposable);\n }\n\n /**\n * Creates a new model interaction context that will be disposed along with the component.\n * @param disposable\n */\n createModalInteractionContextDisposedWith(disposable: Disposable.Collector): InteractionContext {\n // TODO: look at making the registry the factory..\n return this.modelInteractionContextFactory.createInteractionContext('modal', new InteractionService.ApiAdapter(this.placeRouter, this.modalInteractionRegistry));\n }\n\n registerInplaceInteractionContext(interactionContext: InPlaceInteractionContextComponent<any, any, any>) {\n // TODO: look at making the registry the factory..\n // Todo: check for double registration.\n // Todo: allow multiple inplace interactions..\n interactionContext.initialise(`ip${++inplaceMonitorCount}`, new InteractionService.ApiAdapter(this.placeRouter, this.inPlaceInteractionRegistry));\n }\n\n\n // private assertModalCanStart() {\n // assert.isFalsey(this.inExclusiveInteraction.value);\n // assert.isFalsey(this.modalActive.value);\n // }\n //\n // private assertInPlaceCanStart() {\n // assert.isFalsey(this.inExclusiveInteraction.value);\n // assert.isFalsey(this.modalActive.value);\n // assert.isFalsey(this._activeInlineContext.value);\n // }\n\n\n // // @Trace()\n // getActiveContext(): InteractionContext {\n // assert.isTruthy(this.isActive());\n // return this._activeContext.value;\n // }\n\n /**\n * Creates an interaction context that will prevent any other contexts from starting an\n * activity until it is disposed. This is intended for use by the router for passing\n * to PlaceComponent.canDeactivate(interactionContext). This ensures components don't\n * try and interact in a way that we can't track and synchronise with the browser back\n * button.\n */\n registerPlaceRouter(router: PlaceRouter): InteractionServiceRoutingAdapter {\n assert.isFalsey(this.placeRouter);\n this.placeRouter = router;\n this._navigationInProgress.setDelegate(this.placeRouter.navigationInProgress);\n const self = this;\n return new InteractionServiceRoutingAdapter(\n this.activeInteractionContextIds,\n this.activeModalContext,\n () => {\n return self.modelInteractionContextFactory.createInteractionContext('exclusive', new InteractionService.ApiAdapter(this.placeRouter, this.exclusiveInteractionRegistry));\n });\n }\n\n}\n\nexport namespace InteractionService {\n\n export interface Api {\n\n /**\n * Notifies the interaction service that a particular interactionContext has become active. The interaction\n * services will then push changes to the router to track state. If the router is idle, the promise will\n * resolve when the routing has finished updating. Otherwise it will return immediately.\n * @param interactionContext\n */\n notifyActive(interactionContext: InteractionContext): Promise<unknown>;\n\n /**\n * Notifies the interaction service that a particular interactionContext has become idle. The interaction\n * services will then push changes to the router to track state. If the router is idle, the promise will\n * resolve when the routing has finished updating. Otherwise it will return immediately.\n * @param interactionContext\n */\n notifyFinished(interactionContext: InteractionContext): Promise<unknown>;\n }\n\n /**\n * Provides a mechanism for the service to keep track of what the API adapters are doing to\n * ensure the rules are followed, i.e. modal or in-place interaction aren't started while\n * an exclusive routing interaction is active.\n */\n export class ContextRegistry extends GarbageCollector {\n\n private _interactions = new MutableListModel<InteractionContext>();\n private _disabledDelegate = new DelegatingValueModel<boolean>().withDefault(false);\n readonly active: BooleanValueModelChain;\n readonly interactionContextIds: ListModelChain<string>;\n\n constructor() {\n super();\n const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);\n this.active = chain(this._interactions).isNotEmpty();\n this.interactionContextIds = chain(this._interactions).pluck(\"identifier\");\n }\n\n get interactionContexts():ListModel<InteractionContext> {\n return this._interactions.readonly;\n }\n\n start(context: InteractionContext) {\n this._interactions.push(context);\n }\n\n finish(context: InteractionContext) {\n this._interactions.remove(context);\n }\n\n isActive() {\n return this.active.value;\n }\n\n disableWhen(disabled: ValueModel<boolean>) {\n this._disabledDelegate.setDelegate(disabled);\n }\n }\n\n export class ApiAdapter implements Api {\n\n constructor(private readonly placeRouter: PlaceRouter, private readonly contextRegistry: ContextRegistry) {\n }\n\n // @Trace()\n notifyActive(context: InteractionContext): Promise<any> {\n assert.isTruthy(context.identifier);\n this.contextRegistry.start(context);\n return this.isNavigationInProgress() ? Promise.resolve() : this.placeRouter.syncInteractionContextIdsWithRouter();\n }\n\n // @Trace()\n private isNavigationInProgress() {\n return this.placeRouter.navigationInProgress.value;\n }\n\n // @Trace()\n notifyFinished(context: InteractionContext): Promise<any> {\n this.contextRegistry.finish(context);\n // :: Important ::\n // This method will be traversed by both the place router (during can canDeactivate guards) and user land code\n // (both when routing is idle and while it is active in PlaceComponent.canDeactivate()).\n // The result of pushInteractionIdsToRoute will not start until after the current route finishes, and the\n // current route won't finish until after this promise returns... Deadlock.\n // So in order to keep this logic out of the activities we perform the check here and ensure that\n // any interactions with the context while routing is active returns immediately.\n return this.isNavigationInProgress() ? Promise.resolve() : this.placeRouter.syncInteractionContextIdsWithRouter();\n }\n }\n\n}\n"]}
@@ -1,20 +1,15 @@
1
- /**
2
- * @fileoverview added by tsickle
3
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4
- */
5
- import * as tslib_1 from "tslib";
1
+ import { __assign, __decorate, __extends, __metadata, __param } from "tslib";
6
2
  import { Inject, Injectable, InjectionToken, Optional } from '@angular/core';
7
- import { MatDialog } from '@angular/material';
3
+ import { MatDialog } from '@angular/material/dialog';
8
4
  import { MAT_DIALOG_DEFAULT_OPTIONS, MatDialogConfig } from '@angular/material/dialog';
9
5
  import { assert } from '@coolon/typescript-utilities';
10
6
  import { ModalInteractionContextFactory } from '../modal-interaction-context.factory';
11
7
  import { DialogInteractionContext } from './dialog-interaction-context';
12
8
  import * as i0 from "@angular/core";
13
9
  import * as i1 from "@angular/material/dialog";
14
- /** @type {?} */
15
10
  export var DIALOG_INTERACTION_SERVICE_DEFAULTS = new InjectionToken('DIALOG_INTERACTION_SERVICE_DEFAULTS');
16
11
  var DialogInteractionContextFactory = /** @class */ (function (_super) {
17
- tslib_1.__extends(DialogInteractionContextFactory, _super);
12
+ __extends(DialogInteractionContextFactory, _super);
18
13
  function DialogInteractionContextFactory(dialogService, dialogServiceDefaults, matDialogDefaultConfig) {
19
14
  var _this = _super.call(this) || this;
20
15
  _this.dialogService = dialogService;
@@ -23,47 +18,27 @@ var DialogInteractionContextFactory = /** @class */ (function (_super) {
23
18
  assert.notNil(dialogService);
24
19
  return _this;
25
20
  }
26
- /**
27
- * @param {?} identifier
28
- * @param {?} api
29
- * @return {?}
30
- */
31
- DialogInteractionContextFactory.prototype.createInteractionContext = /**
32
- * @param {?} identifier
33
- * @param {?} api
34
- * @return {?}
35
- */
36
- function (identifier, api) {
37
- /** @type {?} */
38
- var config = tslib_1.__assign({ autoFocus: false, hasBackdrop: true, closeOnNavigation: false }, this.matDialogDefaultConfig, this.dialogServiceDefaults);
21
+ DialogInteractionContextFactory.prototype.createInteractionContext = function (identifier, api) {
22
+ var config = __assign(__assign({ autoFocus: false, hasBackdrop: true, closeOnNavigation: false }, this.matDialogDefaultConfig), this.dialogServiceDefaults);
39
23
  return new DialogInteractionContext(identifier, api, this.dialogService, config);
40
24
  };
41
- DialogInteractionContextFactory.decorators = [
42
- { type: Injectable, args: [{
43
- providedIn: 'root'
44
- },] }
45
- ];
46
- /** @nocollapse */
47
25
  DialogInteractionContextFactory.ctorParameters = function () { return [
48
26
  { type: MatDialog },
49
27
  { type: MatDialogConfig, decorators: [{ type: Optional }, { type: Inject, args: [DIALOG_INTERACTION_SERVICE_DEFAULTS,] }] },
50
28
  { type: MatDialogConfig, decorators: [{ type: Optional }, { type: Inject, args: [MAT_DIALOG_DEFAULT_OPTIONS,] }] }
51
29
  ]; };
52
- /** @nocollapse */ DialogInteractionContextFactory.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function DialogInteractionContextFactory_Factory() { return new DialogInteractionContextFactory(i0.ɵɵinject(i1.MatDialog), i0.ɵɵinject(DIALOG_INTERACTION_SERVICE_DEFAULTS, 8), i0.ɵɵinject(i1.MAT_DIALOG_DEFAULT_OPTIONS, 8)); }, token: DialogInteractionContextFactory, providedIn: "root" });
30
+ DialogInteractionContextFactory.ɵprov = i0.ɵɵdefineInjectable({ factory: function DialogInteractionContextFactory_Factory() { return new DialogInteractionContextFactory(i0.ɵɵinject(i1.MatDialog), i0.ɵɵinject(DIALOG_INTERACTION_SERVICE_DEFAULTS, 8), i0.ɵɵinject(i1.MAT_DIALOG_DEFAULT_OPTIONS, 8)); }, token: DialogInteractionContextFactory, providedIn: "root" });
31
+ DialogInteractionContextFactory = __decorate([
32
+ Injectable({
33
+ providedIn: 'root'
34
+ }),
35
+ __param(1, Optional()), __param(1, Inject(DIALOG_INTERACTION_SERVICE_DEFAULTS)),
36
+ __param(2, Optional()), __param(2, Inject(MAT_DIALOG_DEFAULT_OPTIONS)),
37
+ __metadata("design:paramtypes", [MatDialog,
38
+ MatDialogConfig,
39
+ MatDialogConfig])
40
+ ], DialogInteractionContextFactory);
53
41
  return DialogInteractionContextFactory;
54
42
  }(ModalInteractionContextFactory));
55
43
  export { DialogInteractionContextFactory };
56
- if (false) {
57
- /** @type {?} */
58
- DialogInteractionContextFactory.prototype.active;
59
- /**
60
- * @type {?}
61
- * @private
62
- */
63
- DialogInteractionContextFactory.prototype.dialogService;
64
- /** @type {?} */
65
- DialogInteractionContextFactory.prototype.dialogServiceDefaults;
66
- /** @type {?} */
67
- DialogInteractionContextFactory.prototype.matDialogDefaultConfig;
68
- }
69
44
  //# sourceMappingURL=dialog-interaction-context-factory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-interaction-context-factory.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.ts"],"names":[],"mappings":";;;;;AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC7E,O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AC7G,iEAAqG","sourcesContent":["import { Inject, Injectable, InjectionToken, Optional } from '@angular/core';\nimport { MatDialog } from '@angular/material';\nimport { MAT_DIALOG_DEFAULT_OPTIONS, MatDialogConfig } from '@angular/material/dialog';\nimport { BooleanValueModelChain } from '@coolon/pectin';\nimport { assert } from '@coolon/typescript-utilities';\n\nimport { InteractionContext } from '../../interaction-context';\nimport { InteractionService } from '../interaction.service';\nimport { ModalInteractionContextFactory } from '../modal-interaction-context.factory';\nimport { DialogInteractionContext } from './dialog-interaction-context';\n\nexport const DIALOG_INTERACTION_SERVICE_DEFAULTS = new InjectionToken<MatDialogConfig<any>>('DIALOG_INTERACTION_SERVICE_DEFAULTS');\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DialogInteractionContextFactory extends ModalInteractionContextFactory {\n\n readonly active: BooleanValueModelChain;\n\n constructor(private readonly dialogService: MatDialog,\n @Optional() @Inject(DIALOG_INTERACTION_SERVICE_DEFAULTS) readonly dialogServiceDefaults: MatDialogConfig<any>,\n @Optional() @Inject(MAT_DIALOG_DEFAULT_OPTIONS) readonly matDialogDefaultConfig: MatDialogConfig<any>\n ) {\n super();\n assert.notNil(dialogService);\n }\n\n createInteractionContext(identifier: string, api: InteractionService.Api): InteractionContext {\n const config: MatDialogConfig = {\n autoFocus: false,\n hasBackdrop: true,\n closeOnNavigation: false,\n ...this.matDialogDefaultConfig,\n ...this.dialogServiceDefaults\n };\n\n return new DialogInteractionContext(identifier, api, this.dialogService, config);\n }\n}\n"]}
1
+ {"version":3,"file":"dialog-interaction-context-factory.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,0BAA0B,EAAE,eA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e;YACvB,eAAe;OANjG,+BAA+B,CAuB3C;0CAvCD;CAuCC,AAvBD,CAAqD,8BAA8B,GAuBlF;SAvBY,+BAA+B","sourcesContent":["import { Inject, Injectable, InjectionToken, Optional } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { MAT_DIALOG_DEFAULT_OPTIONS, MatDialogConfig } from '@angular/material/dialog';\nimport { BooleanValueModelChain } from '@coolon/pectin';\nimport { assert } from '@coolon/typescript-utilities';\n\nimport { InteractionContext } from '../../interaction-context';\nimport { InteractionService } from '../interaction.service';\nimport { ModalInteractionContextFactory } from '../modal-interaction-context.factory';\nimport { DialogInteractionContext } from './dialog-interaction-context';\n\nexport const DIALOG_INTERACTION_SERVICE_DEFAULTS = new InjectionToken<MatDialogConfig<any>>('DIALOG_INTERACTION_SERVICE_DEFAULTS');\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DialogInteractionContextFactory extends ModalInteractionContextFactory {\n\n readonly active: BooleanValueModelChain;\n\n constructor(private readonly dialogService: MatDialog,\n @Optional() @Inject(DIALOG_INTERACTION_SERVICE_DEFAULTS) readonly dialogServiceDefaults: MatDialogConfig<any>,\n @Optional() @Inject(MAT_DIALOG_DEFAULT_OPTIONS) readonly matDialogDefaultConfig: MatDialogConfig<any>\n ) {\n super();\n assert.notNil(dialogService);\n }\n\n createInteractionContext(identifier: string, api: InteractionService.Api): InteractionContext {\n const config: MatDialogConfig = {\n autoFocus: false,\n hasBackdrop: true,\n closeOnNavigation: false,\n ...this.matDialogDefaultConfig,\n ...this.dialogServiceDefaults\n };\n\n return new DialogInteractionContext(identifier, api, this.dialogService, config);\n }\n}\n"]}