@coolon/angular-ui-powerups 0.0.134 → 1.0.0-alpha.11

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 (429) hide show
  1. package/CHANGELOG.md +301 -0
  2. package/bundles/coolon-angular-ui-powerups.umd.js +1178 -6280
  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.d.ts +27 -26
  7. package/coolon-angular-ui-powerups.metadata.json +1 -1
  8. package/esm2015/coolon-angular-ui-powerups.js +26 -29
  9. package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
  10. package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
  11. package/esm2015/index.js +1 -5
  12. package/esm2015/index.js.map +1 -1
  13. package/esm2015/lib/angular-ui-powerups.module.js +32 -32
  14. package/esm2015/lib/angular-ui-powerups.module.js.map +1 -1
  15. package/esm2015/lib/angular-ui-powerups.module.metadata.json +1 -1
  16. package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  17. package/esm2015/lib/animations/index.js +1 -5
  18. package/esm2015/lib/animations/index.js.map +1 -1
  19. package/esm2015/lib/animations/slide-animations.js +0 -8
  20. package/esm2015/lib/animations/slide-animations.js.map +1 -1
  21. package/esm2015/lib/components/components.module.js +40 -37
  22. package/esm2015/lib/components/components.module.js.map +1 -1
  23. package/esm2015/lib/components/components.module.metadata.json +1 -1
  24. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  25. package/esm2015/lib/components/disposable-component.js +8 -9
  26. package/esm2015/lib/components/disposable-component.js.map +1 -1
  27. package/esm2015/lib/components/disposable-component.metadata.json +1 -1
  28. package/esm2015/lib/components/forms/abstract-input.component.js +82 -114
  29. package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
  30. package/esm2015/lib/components/forms/abstract-input.component.metadata.json +1 -1
  31. package/esm2015/lib/components/forms/number-input/number-input.component.js +12 -18
  32. package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
  33. package/esm2015/lib/components/forms/password-input/password-input.component.js +12 -18
  34. package/esm2015/lib/components/forms/password-input/password-input.component.js.map +1 -1
  35. package/esm2015/lib/components/forms/select-input/select-input.component.js +38 -57
  36. package/esm2015/lib/components/forms/select-input/select-input.component.js.map +1 -1
  37. package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
  38. package/esm2015/lib/components/forms/string-input/string-input.component.js +19 -41
  39. package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
  40. package/esm2015/lib/components/index.js +13 -16
  41. package/esm2015/lib/components/index.js.map +1 -1
  42. package/esm2015/lib/components/index.metadata.json +1 -1
  43. package/esm2015/lib/components/noop/noop.component.js +12 -15
  44. package/esm2015/lib/components/noop/noop.component.js.map +1 -1
  45. package/esm2015/lib/components/resize-aware.component.js +17 -64
  46. package/esm2015/lib/components/resize-aware.component.js.map +1 -1
  47. package/esm2015/lib/components/resize-aware.component.metadata.json +1 -1
  48. package/esm2015/lib/components/scroll-container/scroll-container.component.js +17 -0
  49. package/esm2015/lib/components/scroll-container/scroll-container.component.js.map +1 -0
  50. package/esm2015/lib/components/scroll-container/scroll-container.component.metadata.json +1 -0
  51. package/esm2015/lib/components/scroll-container/scroll-container.component.ngfactory.js.map +1 -0
  52. package/esm2015/lib/components/scroll-container/scroll-container.component.scss.shim.ngstyle.js.map +1 -0
  53. package/esm2015/lib/components/types/bounds.class.js +0 -29
  54. package/esm2015/lib/components/types/bounds.class.js.map +1 -1
  55. package/esm2015/lib/components/types/dimension.class.js +0 -14
  56. package/esm2015/lib/components/types/dimension.class.js.map +1 -1
  57. package/esm2015/lib/components/types/point.class.js +0 -23
  58. package/esm2015/lib/components/types/point.class.js.map +1 -1
  59. package/esm2015/lib/directives/command.directive.js +31 -85
  60. package/esm2015/lib/directives/command.directive.js.map +1 -1
  61. package/esm2015/lib/directives/directives.module.js +28 -28
  62. package/esm2015/lib/directives/directives.module.js.map +1 -1
  63. package/esm2015/lib/directives/directives.module.metadata.json +1 -1
  64. package/esm2015/lib/directives/directives.module.ngfactory.js.map +1 -1
  65. package/esm2015/lib/directives/focus-binding.directive.js +41 -96
  66. package/esm2015/lib/directives/focus-binding.directive.js.map +1 -1
  67. package/esm2015/lib/directives/index.js +3 -7
  68. package/esm2015/lib/directives/index.js.map +1 -1
  69. package/esm2015/lib/interaction/abstract-interaction-context.js +4 -73
  70. package/esm2015/lib/interaction/abstract-interaction-context.js.map +1 -1
  71. package/esm2015/lib/interaction/activity-ref.js +2 -79
  72. package/esm2015/lib/interaction/activity-ref.js.map +1 -1
  73. package/esm2015/lib/interaction/activity.js +0 -72
  74. package/esm2015/lib/interaction/activity.js.map +1 -1
  75. package/esm2015/lib/interaction/alert.js +0 -22
  76. package/esm2015/lib/interaction/alert.js.map +1 -1
  77. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +41 -187
  78. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
  79. package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js +24 -74
  80. package/esm2015/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
  81. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js +13 -24
  82. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js.map +1 -1
  83. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +15 -62
  84. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js.map +1 -1
  85. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +13 -27
  86. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js.map +1 -1
  87. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js +16 -71
  88. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -1
  89. package/esm2015/lib/interaction/confirm.js +0 -16
  90. package/esm2015/lib/interaction/confirm.js.map +1 -1
  91. package/esm2015/lib/interaction/index.js +15 -24
  92. package/esm2015/lib/interaction/index.js.map +1 -1
  93. package/esm2015/lib/interaction/interaction-context.js +0 -50
  94. package/esm2015/lib/interaction/interaction-context.js.map +1 -1
  95. package/esm2015/lib/interaction/interaction.module.js +41 -41
  96. package/esm2015/lib/interaction/interaction.module.js.map +1 -1
  97. package/esm2015/lib/interaction/interaction.module.metadata.json +1 -1
  98. package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  99. package/esm2015/lib/interaction/result.js +2 -23
  100. package/esm2015/lib/interaction/result.js.map +1 -1
  101. package/esm2015/lib/interaction/route-synchronisation-adapter.js +0 -16
  102. package/esm2015/lib/interaction/route-synchronisation-adapter.js.map +1 -1
  103. package/esm2015/lib/interaction/services/interaction-service-routing-adapter.js +0 -43
  104. package/esm2015/lib/interaction/services/interaction-service-routing-adapter.js.map +1 -1
  105. package/esm2015/lib/interaction/services/interaction.service.js +22 -172
  106. package/esm2015/lib/interaction/services/interaction.service.js.map +1 -1
  107. package/esm2015/lib/interaction/services/interaction.service.metadata.json +1 -1
  108. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js +17 -40
  109. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js.map +1 -1
  110. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.metadata.json +1 -1
  111. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js +7 -86
  112. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js.map +1 -1
  113. package/esm2015/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.metadata.json +1 -1
  114. package/esm2015/lib/interaction/services/modal-interaction-context.factory.js +0 -16
  115. package/esm2015/lib/interaction/services/modal-interaction-context.factory.js.map +1 -1
  116. package/esm2015/lib/place/components/abstract-place-navigation.component.js +36 -105
  117. package/esm2015/lib/place/components/abstract-place-navigation.component.js.map +1 -1
  118. package/esm2015/lib/place/components/busy-overlay/busy-overlay.component.js +17 -34
  119. package/esm2015/lib/place/components/busy-overlay/busy-overlay.component.js.map +1 -1
  120. package/esm2015/lib/place/components/empty-state/empty-state.component.js +12 -18
  121. package/esm2015/lib/place/components/empty-state/empty-state.component.js.map +1 -1
  122. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +16 -33
  123. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
  124. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +52 -240
  125. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
  126. package/esm2015/lib/place/components/place-outlet/route-animations.js +0 -12
  127. package/esm2015/lib/place/components/place-outlet/route-animations.js.map +1 -1
  128. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +12 -17
  129. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
  130. package/esm2015/lib/place/guards/consolidated-param-map.js +9 -92
  131. package/esm2015/lib/place/guards/consolidated-param-map.js.map +1 -1
  132. package/esm2015/lib/place/guards/noop-auth-guard.service.js +12 -21
  133. package/esm2015/lib/place/guards/noop-auth-guard.service.js.map +1 -1
  134. package/esm2015/lib/place/guards/noop-auth-guard.service.metadata.json +1 -1
  135. package/esm2015/lib/place/guards/place.guard.js +10 -119
  136. package/esm2015/lib/place/guards/place.guard.js.map +1 -1
  137. package/esm2015/lib/place/index.js +38 -46
  138. package/esm2015/lib/place/index.js.map +1 -1
  139. package/esm2015/lib/place/nav-item.js +0 -22
  140. package/esm2015/lib/place/nav-item.js.map +1 -1
  141. package/esm2015/lib/place/navigation/place-component-deactivation-handler.js +3 -49
  142. package/esm2015/lib/place/navigation/place-component-deactivation-handler.js.map +1 -1
  143. package/esm2015/lib/place/navigation/session/abstract-pop-state-navigation.js +0 -23
  144. package/esm2015/lib/place/navigation/session/abstract-pop-state-navigation.js.map +1 -1
  145. package/esm2015/lib/place/navigation/session/event-cleanup/event-clean-up-session.js +0 -11
  146. package/esm2015/lib/place/navigation/session/event-cleanup/event-clean-up-session.js.map +1 -1
  147. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js +2 -51
  148. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js.map +1 -1
  149. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js +2 -54
  150. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js.map +1 -1
  151. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js +2 -60
  152. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js.map +1 -1
  153. package/esm2015/lib/place/navigation/session/interactions/navigating-during-interaction.js +0 -24
  154. package/esm2015/lib/place/navigation/session/interactions/navigating-during-interaction.js.map +1 -1
  155. package/esm2015/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js +1 -19
  156. package/esm2015/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js.map +1 -1
  157. package/esm2015/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js +0 -55
  158. package/esm2015/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js.map +1 -1
  159. package/esm2015/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js +4 -60
  160. package/esm2015/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js.map +1 -1
  161. package/esm2015/lib/place/navigation/session/navigating.js +0 -31
  162. package/esm2015/lib/place/navigation/session/navigating.js.map +1 -1
  163. package/esm2015/lib/place/navigation/session/navigation-context.js +0 -24
  164. package/esm2015/lib/place/navigation/session/navigation-context.js.map +1 -1
  165. package/esm2015/lib/place/navigation/session/navigation-session.js +12 -178
  166. package/esm2015/lib/place/navigation/session/navigation-session.js.map +1 -1
  167. package/esm2015/lib/place/navigation/session/pop-state-navigation.js +0 -16
  168. package/esm2015/lib/place/navigation/session/pop-state-navigation.js.map +1 -1
  169. package/esm2015/lib/place/place-component.js +22 -107
  170. package/esm2015/lib/place/place-component.js.map +1 -1
  171. package/esm2015/lib/place/place-component.metadata.json +1 -1
  172. package/esm2015/lib/place/place-config.js +0 -13
  173. package/esm2015/lib/place/place-config.js.map +1 -1
  174. package/esm2015/lib/place/place-definition.js +26 -163
  175. package/esm2015/lib/place/place-definition.js.map +1 -1
  176. package/esm2015/lib/place/place-history.js +11 -38
  177. package/esm2015/lib/place/place-history.js.map +1 -1
  178. package/esm2015/lib/place/place-history.metadata.json +1 -1
  179. package/esm2015/lib/place/place-router.js +38 -247
  180. package/esm2015/lib/place/place-router.js.map +1 -1
  181. package/esm2015/lib/place/place-router.metadata.json +1 -1
  182. package/esm2015/lib/place/place.decorator.js +3 -38
  183. package/esm2015/lib/place/place.decorator.js.map +1 -1
  184. package/esm2015/lib/place/place.module.js +40 -42
  185. package/esm2015/lib/place/place.module.js.map +1 -1
  186. package/esm2015/lib/place/place.module.metadata.json +1 -1
  187. package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
  188. package/esm2015/lib/place/route/formatter.js +0 -30
  189. package/esm2015/lib/place/route/formatter.js.map +1 -1
  190. package/esm2015/lib/place/route/json-types.js +0 -12
  191. package/esm2015/lib/place/route/json-types.js.map +1 -1
  192. package/esm2015/lib/place/route/parameter-decorators.js +14 -133
  193. package/esm2015/lib/place/route/parameter-decorators.js.map +1 -1
  194. package/esm2015/lib/place/route/parameter-definition.class.js +2 -147
  195. package/esm2015/lib/place/route/parameter-definition.class.js.map +1 -1
  196. package/esm2015/lib/place/route/parameter-sanitiser.js +0 -18
  197. package/esm2015/lib/place/route/parameter-sanitiser.js.map +1 -1
  198. package/esm2015/lib/place/route/parameter-snapshot.js +0 -19
  199. package/esm2015/lib/place/route/parameter-snapshot.js.map +1 -1
  200. package/esm2015/lib/place/route/visit-sanitiser.js +2 -47
  201. package/esm2015/lib/place/route/visit-sanitiser.js.map +1 -1
  202. package/esm2015/lib/place/url-service.js +13 -68
  203. package/esm2015/lib/place/url-service.js.map +1 -1
  204. package/esm2015/lib/place/url-service.metadata.json +1 -1
  205. package/esm2015/lib/place/url-snapshot.js +3 -86
  206. package/esm2015/lib/place/url-snapshot.js.map +1 -1
  207. package/esm2015/lib/place/visit.js +5 -73
  208. package/esm2015/lib/place/visit.js.map +1 -1
  209. package/esm2015/public_api.js +6 -10
  210. package/esm2015/public_api.js.map +1 -1
  211. package/esm5/coolon-angular-ui-powerups.js +26 -29
  212. package/esm5/coolon-angular-ui-powerups.js.map +1 -1
  213. package/esm5/index.js +1 -5
  214. package/esm5/index.js.map +1 -1
  215. package/esm5/lib/angular-ui-powerups.module.js +29 -30
  216. package/esm5/lib/angular-ui-powerups.module.js.map +1 -1
  217. package/esm5/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  218. package/esm5/lib/animations/index.js +1 -5
  219. package/esm5/lib/animations/index.js.map +1 -1
  220. package/esm5/lib/animations/slide-animations.js +0 -8
  221. package/esm5/lib/animations/slide-animations.js.map +1 -1
  222. package/esm5/lib/components/components.module.js +37 -35
  223. package/esm5/lib/components/components.module.js.map +1 -1
  224. package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
  225. package/esm5/lib/components/disposable-component.js +7 -13
  226. package/esm5/lib/components/disposable-component.js.map +1 -1
  227. package/esm5/lib/components/forms/abstract-input.component.js +95 -157
  228. package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
  229. package/esm5/lib/components/forms/number-input/number-input.component.js +11 -22
  230. package/esm5/lib/components/forms/number-input/number-input.component.js.map +1 -1
  231. package/esm5/lib/components/forms/password-input/password-input.component.js +11 -22
  232. package/esm5/lib/components/forms/password-input/password-input.component.js.map +1 -1
  233. package/esm5/lib/components/forms/select-input/select-input.component.js +38 -61
  234. package/esm5/lib/components/forms/select-input/select-input.component.js.map +1 -1
  235. package/esm5/lib/components/forms/string-input/string-input.component.js +19 -45
  236. package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
  237. package/esm5/lib/components/index.js +13 -16
  238. package/esm5/lib/components/index.js.map +1 -1
  239. package/esm5/lib/components/noop/noop.component.js +9 -13
  240. package/esm5/lib/components/noop/noop.component.js.map +1 -1
  241. package/esm5/lib/components/resize-aware.component.js +21 -80
  242. package/esm5/lib/components/resize-aware.component.js.map +1 -1
  243. package/esm5/lib/components/scroll-container/scroll-container.component.js +19 -0
  244. package/esm5/lib/components/scroll-container/scroll-container.component.js.map +1 -0
  245. package/esm5/lib/components/scroll-container/scroll-container.component.ngfactory.js.map +1 -0
  246. package/esm5/lib/components/scroll-container/scroll-container.component.scss.shim.ngstyle.js.map +1 -0
  247. package/esm5/lib/components/types/bounds.class.js +3 -30
  248. package/esm5/lib/components/types/bounds.class.js.map +1 -1
  249. package/esm5/lib/components/types/dimension.class.js +0 -10
  250. package/esm5/lib/components/types/dimension.class.js.map +1 -1
  251. package/esm5/lib/components/types/point.class.js +2 -30
  252. package/esm5/lib/components/types/point.class.js.map +1 -1
  253. package/esm5/lib/directives/command.directive.js +37 -103
  254. package/esm5/lib/directives/command.directive.js.map +1 -1
  255. package/esm5/lib/directives/directives.module.js +25 -26
  256. package/esm5/lib/directives/directives.module.js.map +1 -1
  257. package/esm5/lib/directives/directives.module.ngfactory.js.map +1 -1
  258. package/esm5/lib/directives/focus-binding.directive.js +50 -147
  259. package/esm5/lib/directives/focus-binding.directive.js.map +1 -1
  260. package/esm5/lib/directives/index.js +3 -7
  261. package/esm5/lib/directives/index.js.map +1 -1
  262. package/esm5/lib/interaction/abstract-interaction-context.js +7 -114
  263. package/esm5/lib/interaction/abstract-interaction-context.js.map +1 -1
  264. package/esm5/lib/interaction/activity-ref.js +12 -109
  265. package/esm5/lib/interaction/activity-ref.js.map +1 -1
  266. package/esm5/lib/interaction/activity.js +12 -121
  267. package/esm5/lib/interaction/activity.js.map +1 -1
  268. package/esm5/lib/interaction/alert.js +0 -22
  269. package/esm5/lib/interaction/alert.js.map +1 -1
  270. package/esm5/lib/interaction/components/activity-container/activity-container.component.js +64 -330
  271. package/esm5/lib/interaction/components/activity-container/activity-container.component.js.map +1 -1
  272. package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js +26 -79
  273. package/esm5/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.js.map +1 -1
  274. package/esm5/lib/interaction/components/alert-dialog/alert-dialog.component.js +12 -25
  275. package/esm5/lib/interaction/components/alert-dialog/alert-dialog.component.js.map +1 -1
  276. package/esm5/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +17 -72
  277. package/esm5/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js.map +1 -1
  278. package/esm5/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +13 -32
  279. package/esm5/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js.map +1 -1
  280. package/esm5/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js +24 -117
  281. package/esm5/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -1
  282. package/esm5/lib/interaction/confirm.js +0 -16
  283. package/esm5/lib/interaction/confirm.js.map +1 -1
  284. package/esm5/lib/interaction/index.js +15 -24
  285. package/esm5/lib/interaction/index.js.map +1 -1
  286. package/esm5/lib/interaction/interaction-context.js +0 -50
  287. package/esm5/lib/interaction/interaction-context.js.map +1 -1
  288. package/esm5/lib/interaction/interaction.module.js +38 -39
  289. package/esm5/lib/interaction/interaction.module.js.map +1 -1
  290. package/esm5/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  291. package/esm5/lib/interaction/result.js +2 -23
  292. package/esm5/lib/interaction/result.js.map +1 -1
  293. package/esm5/lib/interaction/route-synchronisation-adapter.js +0 -16
  294. package/esm5/lib/interaction/route-synchronisation-adapter.js.map +1 -1
  295. package/esm5/lib/interaction/services/interaction-service-routing-adapter.js +6 -73
  296. package/esm5/lib/interaction/services/interaction-service-routing-adapter.js.map +1 -1
  297. package/esm5/lib/interaction/services/interaction.service.js +33 -290
  298. package/esm5/lib/interaction/services/interaction.service.js.map +1 -1
  299. package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js +16 -41
  300. package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.js.map +1 -1
  301. package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js +14 -109
  302. package/esm5/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.js.map +1 -1
  303. package/esm5/lib/interaction/services/modal-interaction-context.factory.js +1 -23
  304. package/esm5/lib/interaction/services/modal-interaction-context.factory.js.map +1 -1
  305. package/esm5/lib/place/components/abstract-place-navigation.component.js +37 -115
  306. package/esm5/lib/place/components/abstract-place-navigation.component.js.map +1 -1
  307. package/esm5/lib/place/components/busy-overlay/busy-overlay.component.js +16 -37
  308. package/esm5/lib/place/components/busy-overlay/busy-overlay.component.js.map +1 -1
  309. package/esm5/lib/place/components/empty-state/empty-state.component.js +10 -20
  310. package/esm5/lib/place/components/empty-state/empty-state.component.js.map +1 -1
  311. package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js +17 -42
  312. package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
  313. package/esm5/lib/place/components/place-outlet/place-outlet.component.js +64 -314
  314. package/esm5/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
  315. package/esm5/lib/place/components/place-outlet/route-animations.js +0 -12
  316. package/esm5/lib/place/components/place-outlet/route-animations.js.map +1 -1
  317. package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +10 -14
  318. package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
  319. package/esm5/lib/place/guards/consolidated-param-map.js +17 -117
  320. package/esm5/lib/place/guards/consolidated-param-map.js.map +1 -1
  321. package/esm5/lib/place/guards/noop-auth-guard.service.js +11 -26
  322. package/esm5/lib/place/guards/noop-auth-guard.service.js.map +1 -1
  323. package/esm5/lib/place/guards/place.guard.js +24 -172
  324. package/esm5/lib/place/guards/place.guard.js.map +1 -1
  325. package/esm5/lib/place/index.js +38 -46
  326. package/esm5/lib/place/index.js.map +1 -1
  327. package/esm5/lib/place/nav-item.js +0 -22
  328. package/esm5/lib/place/nav-item.js.map +1 -1
  329. package/esm5/lib/place/navigation/place-component-deactivation-handler.js +11 -86
  330. package/esm5/lib/place/navigation/place-component-deactivation-handler.js.map +1 -1
  331. package/esm5/lib/place/navigation/session/abstract-pop-state-navigation.js +4 -34
  332. package/esm5/lib/place/navigation/session/abstract-pop-state-navigation.js.map +1 -1
  333. package/esm5/lib/place/navigation/session/event-cleanup/event-clean-up-session.js +4 -25
  334. package/esm5/lib/place/navigation/session/event-cleanup/event-clean-up-session.js.map +1 -1
  335. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js +11 -110
  336. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-leaving-interaction-transition-cancelled.js.map +1 -1
  337. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js +12 -147
  338. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-interaction-cancelation-finishes.js.map +1 -1
  339. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js +11 -126
  340. package/esm5/lib/place/navigation/session/event-cleanup/wait-until-popstate-during-can-deactivate-transition-finishes.js.map +1 -1
  341. package/esm5/lib/place/navigation/session/interactions/navigating-during-interaction.js +7 -71
  342. package/esm5/lib/place/navigation/session/interactions/navigating-during-interaction.js.map +1 -1
  343. package/esm5/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js +6 -49
  344. package/esm5/lib/place/navigation/session/interactions/pop-state-during-interaction-navigation.js.map +1 -1
  345. package/esm5/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js +11 -120
  346. package/esm5/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.js.map +1 -1
  347. package/esm5/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js +13 -106
  348. package/esm5/lib/place/navigation/session/interactions/synchronise-interaction-context-ids-with-route.js.map +1 -1
  349. package/esm5/lib/place/navigation/session/navigating.js +6 -53
  350. package/esm5/lib/place/navigation/session/navigating.js.map +1 -1
  351. package/esm5/lib/place/navigation/session/navigation-context.js +0 -17
  352. package/esm5/lib/place/navigation/session/navigation-context.js.map +1 -1
  353. package/esm5/lib/place/navigation/session/navigation-session.js +39 -306
  354. package/esm5/lib/place/navigation/session/navigation-session.js.map +1 -1
  355. package/esm5/lib/place/navigation/session/pop-state-navigation.js +5 -33
  356. package/esm5/lib/place/navigation/session/pop-state-navigation.js.map +1 -1
  357. package/esm5/lib/place/place-component.js +30 -142
  358. package/esm5/lib/place/place-component.js.map +1 -1
  359. package/esm5/lib/place/place-config.js +0 -13
  360. package/esm5/lib/place/place-config.js.map +1 -1
  361. package/esm5/lib/place/place-definition.js +37 -219
  362. package/esm5/lib/place/place-definition.js.map +1 -1
  363. package/esm5/lib/place/place-history.js +11 -56
  364. package/esm5/lib/place/place-history.js.map +1 -1
  365. package/esm5/lib/place/place-router.js +59 -372
  366. package/esm5/lib/place/place-router.js.map +1 -1
  367. package/esm5/lib/place/place.decorator.js +3 -38
  368. package/esm5/lib/place/place.decorator.js.map +1 -1
  369. package/esm5/lib/place/place.module.js +37 -40
  370. package/esm5/lib/place/place.module.js.map +1 -1
  371. package/esm5/lib/place/place.module.ngfactory.js.map +1 -1
  372. package/esm5/lib/place/route/formatter.js +6 -60
  373. package/esm5/lib/place/route/formatter.js.map +1 -1
  374. package/esm5/lib/place/route/json-types.js +0 -12
  375. package/esm5/lib/place/route/json-types.js.map +1 -1
  376. package/esm5/lib/place/route/parameter-decorators.js +14 -133
  377. package/esm5/lib/place/route/parameter-decorators.js.map +1 -1
  378. package/esm5/lib/place/route/parameter-definition.class.js +21 -222
  379. package/esm5/lib/place/route/parameter-definition.class.js.map +1 -1
  380. package/esm5/lib/place/route/parameter-sanitiser.js +0 -18
  381. package/esm5/lib/place/route/parameter-sanitiser.js.map +1 -1
  382. package/esm5/lib/place/route/parameter-snapshot.js +0 -19
  383. package/esm5/lib/place/route/parameter-snapshot.js.map +1 -1
  384. package/esm5/lib/place/route/visit-sanitiser.js +4 -42
  385. package/esm5/lib/place/route/visit-sanitiser.js.map +1 -1
  386. package/esm5/lib/place/url-service.js +20 -119
  387. package/esm5/lib/place/url-service.js.map +1 -1
  388. package/esm5/lib/place/url-snapshot.js +15 -143
  389. package/esm5/lib/place/url-snapshot.js.map +1 -1
  390. package/esm5/lib/place/visit.js +14 -132
  391. package/esm5/lib/place/visit.js.map +1 -1
  392. package/esm5/public_api.js +6 -10
  393. package/esm5/public_api.js.map +1 -1
  394. package/fesm2015/coolon-angular-ui-powerups.js +866 -4507
  395. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  396. package/fesm5/coolon-angular-ui-powerups.js +1136 -6252
  397. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  398. package/lib/components/forms/abstract-input.component.d.ts +9 -9
  399. package/lib/components/index.d.ts +1 -0
  400. package/lib/components/resize-aware.component.d.ts +3 -3
  401. package/lib/components/scroll-container/scroll-container.component.d.ts +5 -0
  402. package/lib/directives/command.directive.d.ts +4 -2
  403. package/lib/directives/focus-binding.directive.d.ts +1 -1
  404. package/lib/interaction/activity-ref.d.ts +2 -2
  405. package/lib/interaction/activity.d.ts +2 -2
  406. package/lib/interaction/components/activity-container/activity-container.component.d.ts +2 -2
  407. package/lib/interaction/components/activity-container/activity-outlet/activity-outlet.component.d.ts +3 -2
  408. package/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.d.ts +1 -1
  409. package/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.d.ts +1 -1
  410. package/lib/interaction/services/interaction.service.d.ts +1 -1
  411. package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context-factory.d.ts +1 -1
  412. package/lib/interaction/services/mat-dialog-interaction/dialog-interaction-context.d.ts +1 -1
  413. package/lib/place/components/place-outlet/place-outlet.component.d.ts +4 -4
  414. package/lib/place/guards/consolidated-param-map.d.ts +1 -1
  415. package/lib/place/navigation/place-component-deactivation-handler.d.ts +2 -2
  416. package/lib/place/navigation/session/interactions/remove-last-interaction-from-url-navigation-session.d.ts +1 -1
  417. package/lib/place/navigation/session/navigation-session.d.ts +4 -4
  418. package/lib/place/place-component.d.ts +2 -2
  419. package/lib/place/place-router.d.ts +3 -3
  420. package/lib/place/route/formatter.d.ts +4 -3
  421. package/lib/place/route/parameter-definition.class.d.ts +2 -2
  422. package/package.json +10 -10
  423. package/schematics/place-routes/place-builder.js +4 -2
  424. package/schematics/place-routes/place-builder.js.map +1 -1
  425. package/schematics/place-routes/place-class-scanner.d.ts +3 -3
  426. package/schematics/place-routes/place-class-scanner.js +1 -1
  427. package/schematics/place-routes/place-class-scanner.js.map +1 -1
  428. package/schematics/place-routes/place-def.d.ts +9 -9
  429. /package/{styles → assets}/styles.scss +0 -0
@@ -1,7 +1,4 @@
1
- /**
2
- * @fileoverview added by tsickle
3
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4
- */
1
+ import { __decorate, __metadata } from "tslib";
5
2
  import { Location } from '@angular/common';
6
3
  import { Injectable } from '@angular/core';
7
4
  import { Router, UrlSerializer } from '@angular/router';
@@ -9,56 +6,31 @@ import { UrlSnapshot } from './url-snapshot';
9
6
  import * as i0 from "@angular/core";
10
7
  import * as i1 from "@angular/router";
11
8
  import * as i2 from "@angular/common";
12
- export class UrlService {
13
- /**
14
- * @param {?} angularRouter
15
- * @param {?} angularLocation
16
- * @param {?} urlSerializer
17
- */
9
+ let UrlService = class UrlService {
18
10
  constructor(angularRouter, angularLocation, urlSerializer) {
19
11
  this.angularRouter = angularRouter;
20
12
  this.angularLocation = angularLocation;
21
13
  this.urlSerializer = urlSerializer;
22
14
  }
23
- /**
24
- * @param {?} url
25
- * @return {?}
26
- */
27
15
  parseUrl(url) {
28
16
  return new UrlSnapshot(this.urlSerializer, url);
29
17
  }
30
- /**
31
- * @param {...?} visits
32
- * @return {?}
33
- */
34
18
  createUrlSnapshot(...visits) {
35
- /** @type {?} */
36
19
  const bits = [];
37
- visits.forEach((/**
38
- * @param {?} v
39
- * @return {?}
40
- */
41
- v => {
20
+ visits.forEach(v => {
42
21
  bits.push(this.parseUrl(`${v.placeDefinition.path}`).updateVisitSegments(v).url);
43
- }));
22
+ });
44
23
  return this.parseUrl(bits.join(''));
45
24
  }
46
- /**
47
- * @return {?}
48
- */
49
25
  getCurrentRouterUrl() {
50
26
  return this.angularRouter.routerState ? this.angularRouter.routerState.snapshot.url : null;
51
27
  }
52
- /**
53
- * @return {?}
54
- */
55
28
  getCurrentLocationUrl() {
56
29
  return this.angularLocation.path();
57
30
  }
58
31
  /**
59
32
  * Return the a UrlSnapshot using the browsers current location. Note this may not be the same
60
33
  * as the routers current url.
61
- * @return {?}
62
34
  */
63
35
  getCurrentLocationUrlSnapshot() {
64
36
  return this.parseUrl(this.getCurrentLocationUrl());
@@ -66,61 +38,34 @@ export class UrlService {
66
38
  /**
67
39
  * Return the a UrlSnapshot using the routers current state. This may not be the same as
68
40
  * the browsers actual url.
69
- * @return {?}
70
41
  */
71
42
  getCurrentRouterSnapshot() {
72
43
  return this.parseUrl(this.getCurrentRouterUrl());
73
44
  }
74
- /**
75
- * @param {?} url
76
- * @return {?}
77
- */
78
45
  getActiveInteractionIdsFromUrl(url) {
79
46
  return this.parseUrl(url).getInteractionIds();
80
47
  }
81
- /**
82
- * @param {?} url
83
- * @return {?}
84
- */
85
48
  hasActiveInteractions(url) {
86
49
  return this.getActiveInteractionIdsFromUrl(url).length > 0;
87
50
  }
88
- /**
89
- * @param {?} url
90
- * @param {?} options
91
- * @return {?}
92
- */
93
51
  resetBrowserLocation(url, options) {
94
52
  options.replaceCurrent ? this.angularLocation.replaceState(url) : this.angularLocation.go(url);
95
53
  }
96
- /**
97
- * @return {?}
98
- */
99
54
  back() {
100
55
  this.angularLocation.back();
101
56
  }
102
- }
103
- UrlService.decorators = [
104
- { type: Injectable, args: [{
105
- providedIn: 'root'
106
- },] }
107
- ];
108
- /** @nocollapse */
57
+ };
109
58
  UrlService.ctorParameters = () => [
110
59
  { type: Router },
111
60
  { type: Location },
112
61
  { type: UrlSerializer }
113
62
  ];
114
- /** @nocollapse */ UrlService.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function UrlService_Factory() { return new UrlService(i0.ɵɵinject(i1.Router), i0.ɵɵinject(i2.Location), i0.ɵɵinject(i1.UrlSerializer)); }, token: UrlService, providedIn: "root" });
115
- if (false) {
116
- /**
117
- * @type {?}
118
- * @private
119
- */
120
- UrlService.prototype.angularRouter;
121
- /** @type {?} */
122
- UrlService.prototype.angularLocation;
123
- /** @type {?} */
124
- UrlService.prototype.urlSerializer;
125
- }
63
+ UrlService.ɵprov = i0.ɵɵdefineInjectable({ factory: function UrlService_Factory() { return new UrlService(i0.ɵɵinject(i1.Router), i0.ɵɵinject(i2.Location), i0.ɵɵinject(i1.UrlSerializer)); }, token: UrlService, providedIn: "root" });
64
+ UrlService = __decorate([
65
+ Injectable({
66
+ providedIn: 'root'
67
+ }),
68
+ __metadata("design:paramtypes", [Router, Location, UrlSerializer])
69
+ ], UrlService);
70
+ export { UrlService };
126
71
  //# sourceMappingURL=url-service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"url-service.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/url-service.ts"],"names":[],"mappings":";;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,i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CAAC;;;;;IAED,8BAA8B,CAAC,GAAW;QACxC,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,iBAAiB,EAAE,CAAC;IAChD,CAAC;;;;;IAED,qBAAqB,CAAC,GAAW;QAC/B,OAAO,IAAI,CAAC,8BAA8B,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;IAC7D,CAAC;;;;;;IAED,oBAAoB,CAAC,GAAW,EAAE,OAAoC;QACpE,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACjG,CAAC;;;;IAED,IAAI;QACF,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;IAC9B,CAAC;;;YAzDF,UAAU,SAAC;gBACV,UAAU,EAAE,MAAM;aACnB;;;;YANQ,MAAM;YAFN,QAAQ;YAEA,aAAa;;;;;;;;IAQhB,mCAAsC;;IAAE,qCAAkC;;IAAE,mCAAqC","sourcesContent":["import { Location } from '@angular/common';\nimport { Injectable } from '@angular/core';\nimport { Router, UrlSerializer } from '@angular/router';\nimport { UrlSnapshot } from './url-snapshot';\nimport { Visit } from './visit';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class UrlService {\n constructor(private readonly angularRouter: Router, readonly angularLocation: Location, readonly urlSerializer: UrlSerializer) {\n }\n\n parseUrl(url: string): UrlSnapshot {\n return new UrlSnapshot(this.urlSerializer, url);\n }\n\n createUrlSnapshot(...visits: Visit[]): UrlSnapshot {\n const bits = [];\n visits.forEach(v => {\n bits.push(this.parseUrl(`${v.placeDefinition.path}`).updateVisitSegments(v).url);\n });\n return this.parseUrl(bits.join(''));\n }\n\n getCurrentRouterUrl(): string {\n return this.angularRouter.routerState ? this.angularRouter.routerState.snapshot.url : null;\n }\n\n getCurrentLocationUrl(): string {\n return this.angularLocation.path();\n }\n\n /**\n * Return the a UrlSnapshot using the browsers current location. Note this may not be the same\n * as the routers current url.\n */\n getCurrentLocationUrlSnapshot(): UrlSnapshot {\n return this.parseUrl(this.getCurrentLocationUrl());\n }\n\n /**\n * Return the a UrlSnapshot using the routers current state. This may not be the same as\n * the browsers actual url.\n */\n getCurrentRouterSnapshot(): UrlSnapshot {\n return this.parseUrl(this.getCurrentRouterUrl());\n }\n\n getActiveInteractionIdsFromUrl(url: string): string[] {\n return this.parseUrl(url).getInteractionIds();\n }\n\n hasActiveInteractions(url: string) {\n return this.getActiveInteractionIdsFromUrl(url).length > 0;\n }\n\n resetBrowserLocation(url: string, options: { replaceCurrent: boolean }) {\n options.replaceCurrent ? this.angularLocation.replaceState(url) : this.angularLocation.go(url);\n }\n\n back() {\n this.angularLocation.back();\n }\n\n\n}\n"]}
1
+ {"version":3,"file":"url-service.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/url-service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;;;;AAM7C,IAAa,UAAU,GAAvB,MAAa,UAAU;IACrB,YAA6B,aAAqB,EAAW,eAAyB,EAAW,aAA4B;QAAhG,kBAAa,GAAb,aAAa,CAAQ;QAAW,oBAAe,GAAf,eAAe,CAAU;QAAW,kBAAa,GAAb,aAAa,CAAe;IAC7H,CAAC;IAED,QAAQ,CAAC,GAAW;QAClB,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC;IAClD,CAAC;IAED,iBAAiB,CAAC,GAAG,MAAe;QAClC,MAAM,IAAI,GAAG,EAAE,CAAC;QAChB,MAAM,CAAC,OAAO,CAAC,CAAC,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ACF,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;IAC9B,CAAC;CAGF,CAAA;;YAxD6C,MAAM;YAA4B,QAAQ;YAA0B,aAAa;;;AADlH,UAAU;IAHtB,UAAU,CAAC;QACV,UAAU,EAAE,MAAM;KACnB,CAAC;qCAE4C,MAAM,EAA4B,QAAQ,EAA0B,aAAa;GADlH,UAAU,CAyDtB;SAzDY,UAAU","sourcesContent":["import { Location } from '@angular/common';\nimport { Injectable } from '@angular/core';\nimport { Router, UrlSerializer } from '@angular/router';\nimport { UrlSnapshot } from './url-snapshot';\nimport { Visit } from './visit';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class UrlService {\n constructor(private readonly angularRouter: Router, readonly angularLocation: Location, readonly urlSerializer: UrlSerializer) {\n }\n\n parseUrl(url: string): UrlSnapshot {\n return new UrlSnapshot(this.urlSerializer, url);\n }\n\n createUrlSnapshot(...visits: Visit[]): UrlSnapshot {\n const bits = [];\n visits.forEach(v => {\n bits.push(this.parseUrl(`${v.placeDefinition.path}`).updateVisitSegments(v).url);\n });\n return this.parseUrl(bits.join(''));\n }\n\n getCurrentRouterUrl(): string {\n return this.angularRouter.routerState ? this.angularRouter.routerState.snapshot.url : null;\n }\n\n getCurrentLocationUrl(): string {\n return this.angularLocation.path();\n }\n\n /**\n * Return the a UrlSnapshot using the browsers current location. Note this may not be the same\n * as the routers current url.\n */\n getCurrentLocationUrlSnapshot(): UrlSnapshot {\n return this.parseUrl(this.getCurrentLocationUrl());\n }\n\n /**\n * Return the a UrlSnapshot using the routers current state. This may not be the same as\n * the browsers actual url.\n */\n getCurrentRouterSnapshot(): UrlSnapshot {\n return this.parseUrl(this.getCurrentRouterUrl());\n }\n\n getActiveInteractionIdsFromUrl(url: string): string[] {\n return this.parseUrl(url).getInteractionIds();\n }\n\n hasActiveInteractions(url: string) {\n return this.getActiveInteractionIdsFromUrl(url).length > 0;\n }\n\n resetBrowserLocation(url: string, options: { replaceCurrent: boolean }) {\n options.replaceCurrent ? this.angularLocation.replaceState(url) : this.angularLocation.go(url);\n }\n\n back() {\n this.angularLocation.back();\n }\n\n\n}\n"]}
@@ -1 +1 @@
1
- [{"__symbolic":"module","version":4,"metadata":{"UrlService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/router","name":"Router","line":10,"character":46},{"__symbolic":"reference","module":"@angular/common","name":"Location","line":10,"character":80},{"__symbolic":"reference","module":"@angular/router","name":"UrlSerializer","line":10,"character":114}]}],"parseUrl":[{"__symbolic":"method"}],"createUrlSnapshot":[{"__symbolic":"method"}],"getCurrentRouterUrl":[{"__symbolic":"method"}],"getCurrentLocationUrl":[{"__symbolic":"method"}],"getCurrentLocationUrlSnapshot":[{"__symbolic":"method"}],"getCurrentRouterSnapshot":[{"__symbolic":"method"}],"getActiveInteractionIdsFromUrl":[{"__symbolic":"method"}],"hasActiveInteractions":[{"__symbolic":"method"}],"resetBrowserLocation":[{"__symbolic":"method"}],"back":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}}}}]
1
+ [{"__symbolic":"module","version":4,"metadata":{"UrlService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/router","name":"Router","line":10,"character":46},{"__symbolic":"reference","module":"@angular/common","name":"Location","line":10,"character":80},{"__symbolic":"reference","module":"@angular/router","name":"UrlSerializer","line":10,"character":114}]}],"parseUrl":[{"__symbolic":"method"}],"createUrlSnapshot":[{"__symbolic":"method"}],"getCurrentRouterUrl":[{"__symbolic":"method"}],"getCurrentLocationUrl":[{"__symbolic":"method"}],"getCurrentLocationUrlSnapshot":[{"__symbolic":"method"}],"getCurrentRouterSnapshot":[{"__symbolic":"method"}],"getActiveInteractionIdsFromUrl":[{"__symbolic":"method"}],"hasActiveInteractions":[{"__symbolic":"method"}],"resetBrowserLocation":[{"__symbolic":"method"}],"back":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}}}}]
@@ -1,56 +1,29 @@
1
- /**
2
- * @fileoverview added by tsickle
3
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4
- */
5
1
  import { UrlSegment } from '@angular/router';
6
2
  import _ from 'lodash';
7
3
  export class UrlSnapshot {
8
4
  // TODO: Update this accept a url Parser so it can be immutable and generate new trees on mutation using toString() are parseUrl.
9
- /**
10
- * @param {?} urlSerializer
11
- * @param {?} url
12
- */
13
5
  constructor(urlSerializer, url) {
14
6
  this.urlSerializer = urlSerializer;
15
7
  this.url = url;
16
8
  this.urlTree = urlSerializer.parse(url);
17
9
  }
18
- /**
19
- * @param {?} visit
20
- * @return {?}
21
- */
22
10
  updateVisitSegments(visit) {
23
- /** @type {?} */
24
11
  const urlTree = this.urlSerializer.parse(this.url);
25
12
  // Ugly, but it works for now.
26
- /** @type {?} */
27
13
  const segments = [...this.getPrimarySegments(urlTree)];
28
- /** @type {?} */
29
14
  const visitSegments = this.getSegmentsFor(visit);
30
- /** @type {?} */
31
- const replaceAt = segments.findIndex((/**
32
- * @param {?} segment
33
- * @return {?}
34
- */
35
- segment => segment.path === visitSegments[0].path));
15
+ const replaceAt = segments.findIndex(segment => segment.path === visitSegments[0].path);
36
16
  // do not use the return value, it's the items that were removed!
37
17
  segments.splice(replaceAt, visitSegments.length, ...visitSegments);
38
18
  urlTree.root.children.primary.segments = segments;
39
19
  return new UrlSnapshot(this.urlSerializer, urlTree.toString());
40
20
  }
41
- /**
42
- * @private
43
- * @param {?} urlTree
44
- * @return {?}
45
- */
46
21
  getPrimarySegments(urlTree) {
47
22
  return this.urlTree.root.children.primary.segments;
48
23
  }
49
24
  /**
50
25
  * Converts the visit into segments. Please not that these segments are not e
51
- * @protected
52
- * @param {?} visit
53
- * @return {?}
26
+ * @param visit
54
27
  */
55
28
  getSegmentsFor(visit) {
56
29
  return visit.placeDefinition.hasRouteId() ?
@@ -66,22 +39,10 @@ export class UrlSnapshot {
66
39
  new UrlSegment(visit.placeDefinition.path, visit.placeDefinition.getFormattedRouteParameters(visit))
67
40
  ];
68
41
  }
69
- /**
70
- * @param {?} placeDef
71
- * @return {?}
72
- */
73
42
  includesPathOf(placeDef) {
74
- return this.getPrimarySegments(this.urlTree).find((/**
75
- * @param {?} s
76
- * @return {?}
77
- */
78
- s => s.path === placeDef.path));
43
+ return this.getPrimarySegments(this.urlTree).find(s => s.path === placeDef.path);
79
44
  }
80
- /**
81
- * @return {?}
82
- */
83
45
  getInteractionIds() {
84
- /** @type {?} */
85
46
  const queryParam = this.urlTree.queryParams[UrlSnapshot.INTERACTION_QUERY_PARAM];
86
47
  if (queryParam) {
87
48
  return UrlSnapshot.parseInteractionIds(queryParam);
@@ -90,89 +51,45 @@ export class UrlSnapshot {
90
51
  return [];
91
52
  }
92
53
  }
93
- /**
94
- * @return {?}
95
- */
96
54
  hasInteractions() {
97
55
  return this.getInteractionIds().length > 0;
98
56
  }
99
- /**
100
- * @param {?} ids
101
- * @return {?}
102
- */
103
57
  hasInteractionIds(ids) {
104
58
  return _.isEqual(this.getInteractionIds(), ids);
105
59
  }
106
60
  // @Trace()
107
- /**
108
- * @param {?} ids
109
- * @return {?}
110
- */
111
61
  updateInteractionIds(ids) {
112
62
  if (ids.length === 0) {
113
63
  return this.removeInteractionIds();
114
64
  }
115
65
  else {
116
- /** @type {?} */
117
66
  const urlTree = this.urlSerializer.parse(this.url);
118
67
  urlTree.queryParams[UrlSnapshot.INTERACTION_QUERY_PARAM] = UrlSnapshot.createPathIdFor(ids);
119
68
  return new UrlSnapshot(this.urlSerializer, urlTree.toString());
120
69
  }
121
70
  }
122
71
  // @Trace()
123
- /**
124
- * @return {?}
125
- */
126
72
  removeInteractionIds() {
127
- /** @type {?} */
128
73
  const urlTree = this.urlSerializer.parse(this.url);
129
74
  if (urlTree.queryParams && urlTree.queryParams[UrlSnapshot.INTERACTION_QUERY_PARAM]) {
130
75
  urlTree.queryParams = {}; //[UrlSnapshot.INTERACTION_ROUTER_OUTLET]
131
76
  }
132
77
  return new UrlSnapshot(this.urlSerializer, urlTree.toString());
133
78
  }
134
- /**
135
- * @return {?}
136
- */
137
79
  toString() {
138
80
  return `UrlSnapshot(${this.url})`;
139
81
  }
140
82
  }
141
- if (false) {
142
- /** @type {?} */
143
- UrlSnapshot.prototype.urlTree;
144
- /** @type {?} */
145
- UrlSnapshot.prototype.urlSerializer;
146
- /** @type {?} */
147
- UrlSnapshot.prototype.url;
148
- }
149
83
  (function (UrlSnapshot) {
150
84
  UrlSnapshot.INTERACTION_QUERY_PARAM = 'aup-interactions';
151
85
  UrlSnapshot.INTERACTION_ID_SEPARATOR = '--';
152
- /**
153
- * @param {?} path
154
- * @return {?}
155
- */
156
86
  function parseInteractionIds(path) {
157
87
  return path.split(UrlSnapshot.INTERACTION_ID_SEPARATOR);
158
88
  }
159
89
  UrlSnapshot.parseInteractionIds = parseInteractionIds;
160
- /**
161
- * @param {?} interactionIds
162
- * @return {?}
163
- */
164
90
  function createPathIdFor(interactionIds) {
165
91
  return interactionIds.join(UrlSnapshot.INTERACTION_ID_SEPARATOR);
166
92
  }
167
93
  UrlSnapshot.createPathIdFor = createPathIdFor;
168
- /**
169
- * @record
170
- */
171
- function NavigationOptions() { }
172
- UrlSnapshot.NavigationOptions = NavigationOptions;
173
- if (false) {
174
- /** @type {?|undefined} */
175
- NavigationOptions.prototype.replaceUrl;
176
- }
177
94
  })(UrlSnapshot || (UrlSnapshot = {}));
178
95
  //# sourceMappingURL=url-snapshot.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"url-snapshot.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/url-snapshot.ts"],"names":[],"mappings":";;;;AAAA,O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from 'lodash';\nimport { PlaceDefinition } from './place-definition';\nimport { Visit } from './visit';\n\nexport class UrlSnapshot {\n\n readonly urlTree: UrlTree;\n\n // TODO: Update this accept a url Parser so it can be immutable and generate new trees on mutation using toString() are parseUrl.\n constructor(readonly urlSerializer: UrlSerializer, readonly url: string) {\n this.urlTree = urlSerializer.parse(url);\n }\n\n public updateVisitSegments(visit: Visit): UrlSnapshot {\n const urlTree = this.urlSerializer.parse(this.url);\n // Ugly, but it works for now.\n const segments = [...this.getPrimarySegments(urlTree)];\n const visitSegments = this.getSegmentsFor(visit);\n const replaceAt = segments.findIndex(segment => segment.path === visitSegments[0].path);\n // do not use the return value, it's the items that were removed!\n segments.splice(replaceAt, visitSegments.length, ...visitSegments);\n urlTree.root.children.primary.segments = segments;\n return new UrlSnapshot(this.urlSerializer, urlTree.toString());\n }\n\n private getPrimarySegments(urlTree: UrlTree) {\n return this.urlTree.root.children.primary.segments;\n }\n\n /**\n * Converts the visit into segments. Please not that these segments are not e\n * @param visit\n */\n protected getSegmentsFor(visit: Visit): UrlSegment[] {\n return visit.placeDefinition.hasRouteId() ?\n [\n // NOTE:\n // It's important to attach the params to the root path and not the id. If we attach them\n // to an empty id then the angular router won't match the pattern.\n new UrlSegment(visit.placeDefinition.path, visit.placeDefinition.getFormattedRouteParameters(visit)),\n new UrlSegment(visit.placeDefinition.getFormattedRouteId(visit), {})]\n :\n [\n new UrlSegment(visit.placeDefinition.path, visit.placeDefinition.getFormattedRouteParameters(visit))\n ];\n }\n\n includesPathOf(placeDef: PlaceDefinition) {\n return this.getPrimarySegments(this.urlTree).find(s => s.path === placeDef.path);\n }\n\n getInteractionIds() {\n const queryParam = this.urlTree.queryParams[UrlSnapshot.INTERACTION_QUERY_PARAM];\n if (queryParam) {\n return UrlSnapshot.parseInteractionIds(queryParam);\n } else {\n return [];\n }\n }\n\n hasInteractions() {\n return this.getInteractionIds().length > 0;\n }\n\n hasInteractionIds(ids: string[]): boolean {\n return _.isEqual(this.getInteractionIds(), ids);\n }\n\n // @Trace()\n updateInteractionIds(ids: string[]): UrlSnapshot {\n if (ids.length === 0) {\n return this.removeInteractionIds();\n } else {\n const urlTree = this.urlSerializer.parse(this.url);\n urlTree.queryParams[UrlSnapshot.INTERACTION_QUERY_PARAM] = UrlSnapshot.createPathIdFor(ids);\n return new UrlSnapshot(this.urlSerializer, urlTree.toString());\n }\n }\n\n // @Trace()\n removeInteractionIds(): UrlSnapshot {\n const urlTree = this.urlSerializer.parse(this.url);\n if (urlTree.queryParams && urlTree.queryParams[UrlSnapshot.INTERACTION_QUERY_PARAM]) {\n urlTree.queryParams = {};//[UrlSnapshot.INTERACTION_ROUTER_OUTLET]\n }\n return new UrlSnapshot(this.urlSerializer, urlTree.toString());\n }\n\n toString(): string {\n return `UrlSnapshot(${this.url})`;\n }\n\n // withOptions(options: NavigationExtras) {\n // return new UrlSnapshot(this.urlSerializer, this.url, options);\n // }\n //\n // @Trace()\n // getNavigationExtras(): NavigationExtras {\n // return this.options;\n // }\n\n}\n\nexport namespace UrlSnapshot {\n\n export const INTERACTION_QUERY_PARAM = 'aup-interactions';\n export const INTERACTION_ID_SEPARATOR = '--';\n\n export function parseInteractionIds(path: string) {\n return path.split(INTERACTION_ID_SEPARATOR);\n }\n\n export function createPathIdFor(interactionIds: string[]) {\n return interactionIds.join(INTERACTION_ID_SEPARATOR);\n }\n\n export interface NavigationOptions {\n replaceUrl?: boolean;\n }\n}\n"]}
1
+ {"version":3,"file":"url-snapshot.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/url-snapshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAA0B,MAAM,iBAAiB,CAAC;AACrE,OAAO,CAAC,MAAM,QAAQ,CAAC;AAIvB,MAAM,OAAO,WAAW;IAItB,iIAAiI;IACjI,YAAqB,aAA4B,EAAW,GAAW;QAAlD,kBAAa,GAAb,aAAa,CAAe;QAAW,QAAG,GAAH,GAAG,CAAQ;QACrE,IAAI,CAAC,O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aAAa,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;SAChE;IACH,CAAC;IAED,WAAW;IACX,oBAAoB;QAClB,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACnD,IAAI,OAAO,CAAC,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,uBAAuB,CAAC,EAAE;YACnF,OAAO,CAAC,WAAW,GAAG,EAAE,CAAC,CAAA,yCAAyC;SACnE;QACD,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,QAAQ;QACN,OAAO,eAAe,IAAI,CAAC,GAAG,GAAG,CAAC;IACpC,CAAC;CAWF;AAED,WAAiB,WAAW;IAEb,mCAAuB,GAAG,kBAAkB,CAAC;IAC7C,oCAAwB,GAAG,IAAI,CAAC;IAE7C,SAAgB,mBAAmB,CAAC,IAAY;QAC9C,OAAO,IAAI,CAAC,KAAK,CAAC,YAAA,wBAAwB,CAAC,CAAC;IAC9C,CAAC;IAFe,+BAAmB,sBAElC,CAAA;IAED,SAAgB,eAAe,CAAC,cAAwB;QACtD,OAAO,cAAc,CAAC,IAAI,CAAC,YAAA,wBAAwB,CAAC,CAAC;IACvD,CAAC;IAFe,2BAAe,kBAE9B,CAAA;AAKH,CAAC,EAhBgB,WAAW,KAAX,WAAW,QAgB3B","sourcesContent":["import { UrlSegment, UrlSerializer, UrlTree } from '@angular/router';\nimport _ from 'lodash';\nimport { PlaceDefinition } from './place-definition';\nimport { Visit } from './visit';\n\nexport class UrlSnapshot {\n\n readonly urlTree: UrlTree;\n\n // TODO: Update this accept a url Parser so it can be immutable and generate new trees on mutation using toString() are parseUrl.\n constructor(readonly urlSerializer: UrlSerializer, readonly url: string) {\n this.urlTree = urlSerializer.parse(url);\n }\n\n public updateVisitSegments(visit: Visit): UrlSnapshot {\n const urlTree = this.urlSerializer.parse(this.url);\n // Ugly, but it works for now.\n const segments = [...this.getPrimarySegments(urlTree)];\n const visitSegments = this.getSegmentsFor(visit);\n const replaceAt = segments.findIndex(segment => segment.path === visitSegments[0].path);\n // do not use the return value, it's the items that were removed!\n segments.splice(replaceAt, visitSegments.length, ...visitSegments);\n urlTree.root.children.primary.segments = segments;\n return new UrlSnapshot(this.urlSerializer, urlTree.toString());\n }\n\n private getPrimarySegments(urlTree: UrlTree) {\n return this.urlTree.root.children.primary.segments;\n }\n\n /**\n * Converts the visit into segments. Please not that these segments are not e\n * @param visit\n */\n protected getSegmentsFor(visit: Visit): UrlSegment[] {\n return visit.placeDefinition.hasRouteId() ?\n [\n // NOTE:\n // It's important to attach the params to the root path and not the id. If we attach them\n // to an empty id then the angular router won't match the pattern.\n new UrlSegment(visit.placeDefinition.path, visit.placeDefinition.getFormattedRouteParameters(visit)),\n new UrlSegment(visit.placeDefinition.getFormattedRouteId(visit), {})]\n :\n [\n new UrlSegment(visit.placeDefinition.path, visit.placeDefinition.getFormattedRouteParameters(visit))\n ];\n }\n\n includesPathOf(placeDef: PlaceDefinition) {\n return this.getPrimarySegments(this.urlTree).find(s => s.path === placeDef.path);\n }\n\n getInteractionIds() {\n const queryParam = this.urlTree.queryParams[UrlSnapshot.INTERACTION_QUERY_PARAM];\n if (queryParam) {\n return UrlSnapshot.parseInteractionIds(queryParam);\n } else {\n return [];\n }\n }\n\n hasInteractions() {\n return this.getInteractionIds().length > 0;\n }\n\n hasInteractionIds(ids: string[]): boolean {\n return _.isEqual(this.getInteractionIds(), ids);\n }\n\n // @Trace()\n updateInteractionIds(ids: string[]): UrlSnapshot {\n if (ids.length === 0) {\n return this.removeInteractionIds();\n } else {\n const urlTree = this.urlSerializer.parse(this.url);\n urlTree.queryParams[UrlSnapshot.INTERACTION_QUERY_PARAM] = UrlSnapshot.createPathIdFor(ids);\n return new UrlSnapshot(this.urlSerializer, urlTree.toString());\n }\n }\n\n // @Trace()\n removeInteractionIds(): UrlSnapshot {\n const urlTree = this.urlSerializer.parse(this.url);\n if (urlTree.queryParams && urlTree.queryParams[UrlSnapshot.INTERACTION_QUERY_PARAM]) {\n urlTree.queryParams = {};//[UrlSnapshot.INTERACTION_ROUTER_OUTLET]\n }\n return new UrlSnapshot(this.urlSerializer, urlTree.toString());\n }\n\n toString(): string {\n return `UrlSnapshot(${this.url})`;\n }\n\n // withOptions(options: NavigationExtras) {\n // return new UrlSnapshot(this.urlSerializer, this.url, options);\n // }\n //\n // @Trace()\n // getNavigationExtras(): NavigationExtras {\n // return this.options;\n // }\n\n}\n\nexport namespace UrlSnapshot {\n\n export const INTERACTION_QUERY_PARAM = 'aup-interactions';\n export const INTERACTION_ID_SEPARATOR = '--';\n\n export function parseInteractionIds(path: string) {\n return path.split(INTERACTION_ID_SEPARATOR);\n }\n\n export function createPathIdFor(interactionIds: string[]) {\n return interactionIds.join(INTERACTION_ID_SEPARATOR);\n }\n\n export interface NavigationOptions {\n replaceUrl?: boolean;\n }\n}\n"]}
@@ -1,32 +1,14 @@
1
- /**
2
- * @fileoverview added by tsickle
3
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4
- */
5
1
  import * as _ from 'lodash';
6
- /**
7
- * @record
8
- */
9
- function Params() { }
10
2
  export class Visit {
11
- /**
12
- * @param {?} placeDefinition
13
- * @param {?=} visitParameters
14
- */
15
3
  constructor(placeDefinition, visitParameters = {}) {
16
4
  this.placeDefinition = placeDefinition;
17
5
  this.visitParameters = visitParameters;
18
6
  }
19
7
  // @Trace()
20
- /**
21
- * @return {?}
22
- */
23
8
  getRouteId() {
24
9
  return this.placeDefinition.getRouteIdFrom(this);
25
10
  }
26
11
  // @Trace()
27
- /**
28
- * @return {?}
29
- */
30
12
  hasRouteId() {
31
13
  return !_.isNil(this.getRouteId());
32
14
  }
@@ -34,45 +16,23 @@ export class Visit {
34
16
  * Returns the value of the place parameter with the specified name. The parameter
35
17
  * name is taken from the `as` option, e.g. {as: 'aCustomName'} otherwise it is the
36
18
  * same as the the ValueModel property name.
37
- * @param {?} parameterName the field name of the property model or the `as` option if specified.
38
- * @return {?}
19
+ * @param parameterName the field name of the property model or the `as` option if specified.
39
20
  */
40
21
  getParameter(parameterName) {
41
22
  return this.visitParameters[parameterName];
42
23
  }
43
24
  // @Trace()
44
- /**
45
- * @param {?} parameterName
46
- * @return {?}
47
- */
48
25
  hasParameter(parameterName) {
49
26
  return Object.keys(this.visitParameters).includes(parameterName);
50
27
  }
51
- /**
52
- * @template S
53
- * @param {?} parameter
54
- * @param {?} value
55
- * @return {?}
56
- */
57
28
  replace(parameter, value) {
58
- return new Visit(this.placeDefinition, Object.assign({}, this.visitParameters, { [parameter.name]: value }));
29
+ return new Visit(this.placeDefinition, Object.assign(Object.assign({}, this.visitParameters), { [parameter.name]: value }));
59
30
  }
60
- /**
61
- * @template S
62
- * @param {?} routeParams
63
- * @return {?}
64
- */
65
31
  mergeRouteParameters(routeParams) {
66
32
  // todo: whitelist parameters.
67
- /** @type {?} */
68
33
  const routeParameterKeys = Object.keys(routeParams);
69
- /** @type {?} */
70
34
  const params = {};
71
- this.placeDefinition.getVisitParameterDefs().forEach((/**
72
- * @param {?} def
73
- * @return {?}
74
- */
75
- def => {
35
+ this.placeDefinition.getVisitParameterDefs().forEach(def => {
76
36
  if (def.isRouteId || def.isRouteParameter) {
77
37
  if (routeParameterKeys.includes(def.name)) {
78
38
  params[def.name] = routeParams[def.name];
@@ -81,53 +41,25 @@ export class Visit {
81
41
  else {
82
42
  // copy non route params as is, but only if they already exist otherwise we'll inject nil values and break the
83
43
  // defaults and remember sanitisation process.
84
- /** @type {?} */
85
44
  const value = this.getParameter(def.name);
86
45
  if (this.hasParameter(def.name)) {
87
46
  params[def.name] = value;
88
47
  }
89
48
  }
90
- }));
49
+ });
91
50
  return new Visit(this.placeDefinition, params);
92
51
  }
93
- /**
94
- * @param {?} other
95
- * @return {?}
96
- */
97
52
  hasRoutingChangedFrom(other) {
98
- /** @type {?} */
99
53
  const samePlace = other.placeDefinition === this.placeDefinition;
100
- /** @type {?} */
101
54
  const sameRouteParameters = _.isEqual(this.placeDefinition.getFormattedRouteParameters(this, true), this.placeDefinition.getFormattedRouteParameters(other, true));
102
55
  return !samePlace || !sameRouteParameters;
103
56
  }
104
- /**
105
- * @param {?} other
106
- * @return {?}
107
- */
108
57
  hasChangedFrom(other) {
109
- /** @type {?} */
110
58
  const sameNonRouteParameters = _.isEqual(this.placeDefinition.getNonRouteParameters(this), this.placeDefinition.getNonRouteParameters(other));
111
59
  return !sameNonRouteParameters || this.hasRoutingChangedFrom(other);
112
60
  }
113
- /**
114
- * @return {?}
115
- */
116
61
  toDebugString() {
117
- return Object.keys(this.visitParameters).map((/**
118
- * @param {?} k
119
- * @return {?}
120
- */
121
- k => `${k}=${this.visitParameters[k]}`)).join(",");
62
+ return Object.keys(this.visitParameters).map(k => `${k}=${this.visitParameters[k]}`).join(",");
122
63
  }
123
64
  }
124
- if (false) {
125
- /** @type {?} */
126
- Visit.prototype.placeDefinition;
127
- /**
128
- * @type {?}
129
- * @private
130
- */
131
- Visit.prototype.visitParameters;
132
- }
133
65
  //# sourceMappingURL=visit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"visit.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/visit.ts"],"names":[],"mappings":";;;;AACA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;;;;AAI5B,qBAEC;AAGD,MAAM,OAAO,KAAK;;;;;IAEhB,YAAqB,eAAgC,EAAmB,kBAA0B,EAAE;QAA/E,oBAAe,GAAf,eAAe,CAAiB;QAAmB,oBAAe,GAAf,eAAe,CAAa;IACpG,CAAC;;;;;IAGD,UAAU;QACR,OAAO,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IACnD,CAAC;;;;;IAGD,UAAU;QACR,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,UAA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C;;;;;IAED,qBAAqB,CAAC,KAAY;;cAC1B,SAAS,GAAG,KAAK,CAAC,eAAe,KAAK,IAAI,CAAC,eAAe;;cAC1D,mBAAmB,GAAG,CAAC,CAAC,OAAO,CACnC,IAAI,CAAC,eAAe,CAAC,2BAA2B,CAAC,IAAI,EAAE,IAAI,CAAC,EAC5D,IAAI,CAAC,eAAe,CAAC,2BAA2B,CAAC,KAAK,EAAE,IAAI,CAAC,CAC9D;QACD,OAAO,CAAC,SAAS,IAAI,CAAC,mBAAmB,CAAC;IAC5C,CAAC;;;;;IAED,cAAc,CAAC,KAAY;;cACnB,sBAAsB,GAAG,CAAC,CAAC,OAAO,CACtC,IAAI,CAAC,eAAe,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAChD,IAAI,CAAC,eAAe,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAClD;QACD,OAAO,CAAC,sBAAsB,IAAI,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC;IACtE,CAAC;;;;IAED,aAAa;QACX,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,GAAG;;;;QAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,EAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACjG,CAAC;CAEF;;;IA1Ea,gCAAyC;;;;;IAAE,gCAA6C","sourcesContent":["import { UrlSegment } from '@angular/router';\nimport * as _ from 'lodash';\nimport { PlaceDefinition } from './place-definition';\nimport { ParameterDefinition } from './route/parameter-definition.class';\n\ninterface Params {\n [p: string]: any\n}\n\n\nexport class Visit {\n\n constructor(readonly placeDefinition: PlaceDefinition, private readonly visitParameters: Params = {}) {\n }\n\n // @Trace()\n getRouteId(): any {\n return this.placeDefinition.getRouteIdFrom(this);\n }\n\n // @Trace()\n hasRouteId(): boolean {\n return !_.isNil(this.getRouteId());\n }\n\n /**\n * Returns the value of the place parameter with the specified name. The parameter\n * name is taken from the `as` option, e.g. {as: 'aCustomName'} otherwise it is the\n * same as the the ValueModel property name.\n * @param parameterName the field name of the property model or the `as` option if specified.\n */\n getParameter(parameterName: string): any {\n return this.visitParameters[parameterName];\n }\n\n // @Trace()\n hasParameter(parameterName: string) {\n return Object.keys(this.visitParameters).includes(parameterName);\n }\n\n replace<S>(parameter: ParameterDefinition<any, S>, value: S): Visit {\n return new Visit(this.placeDefinition, { ...this.visitParameters, [parameter.name]: value });\n }\n\n mergeRouteParameters<S>(routeParams: { [p: string]: any }): Visit {\n // todo: whitelist parameters.\n const routeParameterKeys = Object.keys(routeParams);\n const params = {};\n this.placeDefinition.getVisitParameterDefs().forEach(def => {\n if (def.isRouteId || def.isRouteParameter) {\n if (routeParameterKeys.includes(def.name)) {\n params[def.name] = routeParams[def.name];\n }\n } else {\n // copy non route params as is, but only if they already exist otherwise we'll inject nil values and break the\n // defaults and remember sanitisation process.\n const value = this.getParameter(def.name);\n if (this.hasParameter(def.name)) {\n params[def.name] = value;\n }\n }\n });\n return new Visit(this.placeDefinition, params);\n }\n\n hasRoutingChangedFrom(other: Visit): boolean {\n const samePlace = other.placeDefinition === this.placeDefinition;\n const sameRouteParameters = _.isEqual(\n this.placeDefinition.getFormattedRouteParameters(this, true),\n this.placeDefinition.getFormattedRouteParameters(other, true)\n );\n return !samePlace || !sameRouteParameters;\n }\n\n hasChangedFrom(other: Visit) {\n const sameNonRouteParameters = _.isEqual(\n this.placeDefinition.getNonRouteParameters(this),\n this.placeDefinition.getNonRouteParameters(other)\n );\n return !sameNonRouteParameters || this.hasRoutingChangedFrom(other);\n }\n\n toDebugString() {\n return Object.keys(this.visitParameters).map(k => `${k}=${this.visitParameters[k]}`).join(\",\");\n }\n\n}\n"]}
1
+ {"version":3,"file":"visit.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["lib/place/visit.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAS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AC,CAAC;IACjG,CAAC;CAEF","sourcesContent":["import { UrlSegment } from '@angular/router';\nimport * as _ from 'lodash';\nimport { PlaceDefinition } from './place-definition';\nimport { ParameterDefinition } from './route/parameter-definition.class';\n\ninterface Params {\n [p: string]: any\n}\n\n\nexport class Visit {\n\n constructor(readonly placeDefinition: PlaceDefinition, private readonly visitParameters: Params = {}) {\n }\n\n // @Trace()\n getRouteId(): any {\n return this.placeDefinition.getRouteIdFrom(this);\n }\n\n // @Trace()\n hasRouteId(): boolean {\n return !_.isNil(this.getRouteId());\n }\n\n /**\n * Returns the value of the place parameter with the specified name. The parameter\n * name is taken from the `as` option, e.g. {as: 'aCustomName'} otherwise it is the\n * same as the the ValueModel property name.\n * @param parameterName the field name of the property model or the `as` option if specified.\n */\n getParameter(parameterName: string): any {\n return this.visitParameters[parameterName];\n }\n\n // @Trace()\n hasParameter(parameterName: string) {\n return Object.keys(this.visitParameters).includes(parameterName);\n }\n\n replace<S>(parameter: ParameterDefinition<any, S>, value: S): Visit {\n return new Visit(this.placeDefinition, { ...this.visitParameters, [parameter.name]: value });\n }\n\n mergeRouteParameters<S>(routeParams: { [p: string]: any }): Visit {\n // todo: whitelist parameters.\n const routeParameterKeys = Object.keys(routeParams);\n const params = {};\n this.placeDefinition.getVisitParameterDefs().forEach(def => {\n if (def.isRouteId || def.isRouteParameter) {\n if (routeParameterKeys.includes(def.name)) {\n params[def.name] = routeParams[def.name];\n }\n } else {\n // copy non route params as is, but only if they already exist otherwise we'll inject nil values and break the\n // defaults and remember sanitisation process.\n const value = this.getParameter(def.name);\n if (this.hasParameter(def.name)) {\n params[def.name] = value;\n }\n }\n });\n return new Visit(this.placeDefinition, params);\n }\n\n hasRoutingChangedFrom(other: Visit): boolean {\n const samePlace = other.placeDefinition === this.placeDefinition;\n const sameRouteParameters = _.isEqual(\n this.placeDefinition.getFormattedRouteParameters(this, true),\n this.placeDefinition.getFormattedRouteParameters(other, true)\n );\n return !samePlace || !sameRouteParameters;\n }\n\n hasChangedFrom(other: Visit) {\n const sameNonRouteParameters = _.isEqual(\n this.placeDefinition.getNonRouteParameters(this),\n this.placeDefinition.getNonRouteParameters(other)\n );\n return !sameNonRouteParameters || this.hasRoutingChangedFrom(other);\n }\n\n toDebugString() {\n return Object.keys(this.visitParameters).map(k => `${k}=${this.visitParameters[k]}`).join(\",\");\n }\n\n}\n"]}
@@ -1,11 +1,7 @@
1
- /**
2
- * @fileoverview added by tsickle
3
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4
- */
5
- export { AngularUiPowerupsModule } from './lib/angular-ui-powerups.module';
6
- export { slideDownOnEnterAnimation, slideRightOnEnterAnimation } from './lib/animations';
7
- export { ComponentsModule, DisposableComponent, ResizeAwareComponent, AbstractInputComponent, NumberInputComponent, PasswordInputComponent, SelectInputComponent, StringInputComponent, NoopComponent, Bounds, Dimension, Point } from './lib/components';
8
- export { CommandDirective, DirectivesModule, FocusBindingDirective } from './lib/directives';
9
- export { AbstractInteractionContext, ActivityRef, ACTIVITY_DATA, Activity, InteractionModule, ActivityContainerComponent, ActivityOutletComponent, AlertDialogComponent, ConfirmThenDialogComponent, ConfirmationDialogComponent, InPlaceInteractionContextComponent, InteractionServiceRoutingAdapter, InteractionService, ModalInteractionContextFactory, DIALOG_INTERACTION_SERVICE_DEFAULTS, DialogInteractionContextFactory, DialogInteractionContext } from './lib/interaction';
10
- export { DEFINITION_META_DATA_KEY, ROUTE_PARAMETER_LIST_KEY, PlaceComponent, AUP_PLACE_CONFIG, PlaceDefinition, PlaceHistory, PlaceRouter, Place, PlaceModule, UrlService, UrlSnapshot, Visit, AbstractPlaceNavigationComponent, BusyOverlayComponent, EmptyStateComponent, ListPlaceNavComponent, PlaceOutletComponent, leftRightPlaceAnimation, LEFT_RIGHT_PLACE_ANIMATION, TabbedPlaceNavigationComponent, ConsolidatedParameterMap, NoopAuthGuard, PlaceGuard, PlaceComponentDeactivationHandler, AbstractPopStateNavigation, Navigating, NavigationContext, NavigationSession, PopStateNavigation, EventCleanUpSession, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, NavigatingDuringInteraction, PopStateDuringInteractionNavigation, RemoveLastInteractionFromUrlNavigationSession, SynchroniseInteractionContextIdsWithRoute, Formatter, RouteId, VisitParameter, VisitParameterList, ParameterDefinition, VisitSanitiser } from './lib/place';
1
+ export * from './lib/angular-ui-powerups.module';
2
+ export * from './lib/animations';
3
+ export * from './lib/components';
4
+ export * from './lib/directives';
5
+ export * from './lib/interaction';
6
+ export * from './lib/place';
11
7
  //# sourceMappingURL=public_api.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"public_api.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["public_api.ts"],"names":[],"mappings":";;;;AAAA,wCAAc,kCAAkC,CAAC;AACjD,sEAAc,kBAAkB,CAAC;AACjC,uOAAc,kBAAkB,CAAC;AACjC,0EAAc,kBAAkB,CAAC;AACjC,kcAAc,mBAAmB,CAAC;AAClC,0gCAAc,aAAa,CAAC","sourcesContent":["export * from './lib/angular-ui-powerups.module';\nexport * from './lib/animations';\nexport * from './lib/components';\nexport * from './lib/directives';\nexport * from './lib/interaction';\nexport * from './lib/place';\n"]}
1
+ {"version":3,"file":"public_api.js","sourceRoot":"ng://@coolon/angular-ui-powerups/","sources":["public_api.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC","sourcesContent":["export * from './lib/angular-ui-powerups.module';\nexport * from './lib/animations';\nexport * from './lib/components';\nexport * from './lib/directives';\nexport * from './lib/interaction';\nexport * from './lib/place';\n"]}