@coolon/angular-ui-powerups 0.0.26 → 0.0.27

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 (286) hide show
  1. package/bundles/coolon-angular-ui-powerups.umd.js +3926 -0
  2. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -0
  3. package/bundles/coolon-angular-ui-powerups.umd.min.js +2 -0
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -0
  5. package/coolon-angular-ui-powerups.d.ts +30 -0
  6. package/coolon-angular-ui-powerups.metadata.json +1 -0
  7. package/esm2015/coolon-angular-ui-powerups.js +33 -0
  8. package/esm2015/index.js +6 -0
  9. package/esm2015/lib/angular-ui-powerups.module.js +54 -0
  10. package/esm2015/lib/animations/index.js +9 -0
  11. package/esm2015/lib/animations/slideDownAndUpAnimation.js +30 -0
  12. package/esm2015/lib/components/disposable-component.js +14 -0
  13. package/esm2015/lib/components/forms/abstract-input.component.js +183 -0
  14. package/esm2015/lib/components/forms/number-input/number-input.component.js +26 -0
  15. package/esm2015/lib/components/forms/password-input/password-input.component.js +26 -0
  16. package/esm2015/lib/components/forms/select-input/select-input.component.js +60 -0
  17. package/esm2015/lib/components/forms/string-input/string-input.component.js +26 -0
  18. package/esm2015/lib/components/index.js +18 -0
  19. package/esm2015/lib/components/resize-aware.component.js +96 -0
  20. package/esm2015/lib/components/types/bounds.class.js +56 -0
  21. package/esm2015/lib/components/types/dimension.class.js +21 -0
  22. package/esm2015/lib/components/types/point.class.js +36 -0
  23. package/esm2015/lib/directives/command.directive.js +135 -0
  24. package/esm2015/lib/directives/focus-binding.directive.js +179 -0
  25. package/esm2015/lib/directives/index.js +10 -0
  26. package/esm2015/lib/interaction/abstract-activity.js +129 -0
  27. package/esm2015/lib/interaction/activity.js +27 -0
  28. package/esm2015/lib/interaction/alert.js +23 -0
  29. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +144 -0
  30. package/esm2015/lib/interaction/components/activity-outlet/activity-outlet-context.js +22 -0
  31. package/esm2015/lib/interaction/components/activity-outlet/activity-outlet.component.js +169 -0
  32. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js +37 -0
  33. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +46 -0
  34. package/esm2015/lib/interaction/confirm.js +17 -0
  35. package/esm2015/lib/interaction/index.js +21 -0
  36. package/esm2015/lib/interaction/interaction-context.js +35 -0
  37. package/esm2015/lib/interaction/interaction.module.js +41 -0
  38. package/esm2015/lib/interaction/result.js +24 -0
  39. package/esm2015/lib/interaction/services/dialog-interaction.service.js +114 -0
  40. package/esm2015/lib/place/abstract-place-component.js +59 -0
  41. package/esm2015/lib/place/components/busy-overlay/busy-overlay.component.js +44 -0
  42. package/esm2015/lib/place/components/empty-state/empty-state.component.js +28 -0
  43. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +67 -0
  44. package/esm2015/lib/place/components/place-outlet/route-animations.js +35 -0
  45. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +50 -0
  46. package/esm2015/lib/place/guards/leave-place.guard.js +52 -0
  47. package/esm2015/lib/place/guards/place-route.guard.js +74 -0
  48. package/esm2015/lib/place/index.js +27 -0
  49. package/esm2015/lib/place/place-component.js +17 -0
  50. package/esm2015/lib/place/place.decorator.js +72 -0
  51. package/esm2015/lib/place/place.module.js +49 -0
  52. package/esm2015/lib/place/place.service.js +61 -0
  53. package/esm2015/lib/place/route/json-types.js +13 -0
  54. package/esm2015/lib/place/route/parameter-decorators.js +178 -0
  55. package/esm2015/lib/place/route/parameter-definition.class.js +24 -0
  56. package/esm2015/lib/place/route/parameter-sanitiser.js +17 -0
  57. package/esm2015/lib/place/route/parameter-type.js +43 -0
  58. package/esm2015/lib/place/route/route-parameter-bindings.js +294 -0
  59. package/esm2015/lib/place/route/route-parameter-sanitiser.js +280 -0
  60. package/esm2015/public_api.js +11 -0
  61. package/esm5/coolon-angular-ui-powerups.js +33 -0
  62. package/esm5/index.js +6 -0
  63. package/esm5/lib/angular-ui-powerups.module.js +58 -0
  64. package/esm5/lib/animations/index.js +9 -0
  65. package/esm5/lib/animations/slideDownAndUpAnimation.js +30 -0
  66. package/esm5/lib/components/disposable-component.js +24 -0
  67. package/esm5/lib/components/forms/abstract-input.component.js +232 -0
  68. package/esm5/lib/components/forms/number-input/number-input.component.js +33 -0
  69. package/esm5/lib/components/forms/password-input/password-input.component.js +33 -0
  70. package/esm5/lib/components/forms/select-input/select-input.component.js +67 -0
  71. package/esm5/lib/components/forms/string-input/string-input.component.js +33 -0
  72. package/esm5/lib/components/index.js +18 -0
  73. package/esm5/lib/components/resize-aware.component.js +124 -0
  74. package/esm5/lib/components/types/bounds.class.js +59 -0
  75. package/esm5/lib/components/types/dimension.class.js +19 -0
  76. package/esm5/lib/components/types/point.class.js +43 -0
  77. package/esm5/lib/directives/command.directive.js +155 -0
  78. package/esm5/lib/directives/focus-binding.directive.js +231 -0
  79. package/esm5/lib/directives/index.js +10 -0
  80. package/esm5/lib/interaction/abstract-activity.js +173 -0
  81. package/esm5/lib/interaction/activity.js +27 -0
  82. package/esm5/lib/interaction/alert.js +23 -0
  83. package/esm5/lib/interaction/components/activity-container/activity-container.component.js +181 -0
  84. package/esm5/lib/interaction/components/activity-outlet/activity-outlet-context.js +22 -0
  85. package/esm5/lib/interaction/components/activity-outlet/activity-outlet.component.js +206 -0
  86. package/esm5/lib/interaction/components/alert-dialog/alert-dialog.component.js +42 -0
  87. package/esm5/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +54 -0
  88. package/esm5/lib/interaction/confirm.js +17 -0
  89. package/esm5/lib/interaction/index.js +21 -0
  90. package/esm5/lib/interaction/interaction-context.js +45 -0
  91. package/esm5/lib/interaction/interaction.module.js +45 -0
  92. package/esm5/lib/interaction/result.js +24 -0
  93. package/esm5/lib/interaction/services/dialog-interaction.service.js +140 -0
  94. package/esm5/lib/place/abstract-place-component.js +66 -0
  95. package/esm5/lib/place/components/busy-overlay/busy-overlay.component.js +49 -0
  96. package/esm5/lib/place/components/empty-state/empty-state.component.js +29 -0
  97. package/esm5/lib/place/components/place-outlet/place-outlet.component.js +81 -0
  98. package/esm5/lib/place/components/place-outlet/route-animations.js +35 -0
  99. package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +57 -0
  100. package/esm5/lib/place/guards/leave-place.guard.js +57 -0
  101. package/esm5/lib/place/guards/place-route.guard.js +78 -0
  102. package/esm5/lib/place/index.js +27 -0
  103. package/esm5/lib/place/place-component.js +17 -0
  104. package/esm5/lib/place/place.decorator.js +69 -0
  105. package/esm5/lib/place/place.module.js +53 -0
  106. package/esm5/lib/place/place.service.js +75 -0
  107. package/esm5/lib/place/route/json-types.js +13 -0
  108. package/esm5/lib/place/route/parameter-decorators.js +178 -0
  109. package/esm5/lib/place/route/parameter-definition.class.js +24 -0
  110. package/esm5/lib/place/route/parameter-sanitiser.js +17 -0
  111. package/esm5/lib/place/route/parameter-type.js +65 -0
  112. package/esm5/lib/place/route/route-parameter-bindings.js +339 -0
  113. package/esm5/lib/place/route/route-parameter-sanitiser.js +395 -0
  114. package/esm5/public_api.js +11 -0
  115. package/fesm2015/coolon-angular-ui-powerups.js +3145 -0
  116. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -0
  117. package/fesm5/coolon-angular-ui-powerups.js +3699 -0
  118. package/fesm5/coolon-angular-ui-powerups.js.map +1 -0
  119. package/lib/angular-ui-powerups.module.d.ts +2 -0
  120. package/{src/lib/animations/index.ts → lib/animations/index.d.ts} +0 -1
  121. package/lib/animations/slideDownAndUpAnimation.d.ts +5 -0
  122. package/lib/components/disposable-component.d.ts +5 -0
  123. package/lib/components/forms/abstract-input.component.d.ts +35 -0
  124. package/lib/components/forms/number-input/number-input.component.d.ts +6 -0
  125. package/lib/components/forms/password-input/password-input.component.d.ts +6 -0
  126. package/lib/components/forms/select-input/select-input.component.d.ts +11 -0
  127. package/lib/components/forms/string-input/string-input.component.d.ts +6 -0
  128. package/{src/lib/components/index.ts → lib/components/index.d.ts} +0 -1
  129. package/lib/components/resize-aware.component.d.ts +22 -0
  130. package/lib/components/types/bounds.class.d.ts +16 -0
  131. package/lib/components/types/dimension.class.d.ts +5 -0
  132. package/lib/components/types/point.class.d.ts +10 -0
  133. package/lib/directives/command.directive.d.ts +14 -0
  134. package/lib/directives/focus-binding.directive.d.ts +22 -0
  135. package/{src/lib/directives/index.ts → lib/directives/index.d.ts} +0 -1
  136. package/lib/interaction/abstract-activity.d.ts +17 -0
  137. package/lib/interaction/activity.d.ts +11 -0
  138. package/lib/interaction/alert.d.ts +5 -0
  139. package/lib/interaction/components/activity-container/activity-container.component.d.ts +32 -0
  140. package/{src/lib/interaction/components/activity-outlet/activity-outlet-context.ts → lib/interaction/components/activity-outlet/activity-outlet-context.d.ts} +5 -7
  141. package/lib/interaction/components/activity-outlet/activity-outlet.component.d.ts +30 -0
  142. package/lib/interaction/components/alert-dialog/alert-dialog.component.d.ts +8 -0
  143. package/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.d.ts +9 -0
  144. package/{src/lib/interaction/confirm.ts → lib/interaction/confirm.d.ts} +2 -3
  145. package/{src/lib/interaction/index.ts → lib/interaction/index.d.ts} +0 -1
  146. package/lib/interaction/interaction-context.d.ts +11 -0
  147. package/lib/interaction/interaction.module.d.ts +2 -0
  148. package/lib/interaction/result.d.ts +8 -0
  149. package/lib/interaction/services/dialog-interaction.service.d.ts +14 -0
  150. package/lib/place/abstract-place-component.d.ts +13 -0
  151. package/lib/place/components/busy-overlay/busy-overlay.component.d.ts +8 -0
  152. package/lib/place/components/empty-state/empty-state.component.d.ts +5 -0
  153. package/lib/place/components/place-outlet/place-outlet.component.d.ts +13 -0
  154. package/lib/place/components/place-outlet/route-animations.d.ts +1 -0
  155. package/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.d.ts +11 -0
  156. package/lib/place/guards/leave-place.guard.d.ts +10 -0
  157. package/lib/place/guards/place-route.guard.d.ts +9 -0
  158. package/{src/lib/place/index.ts → lib/place/index.d.ts} +0 -1
  159. package/lib/place/place-component.d.ts +5 -0
  160. package/lib/place/place.decorator.d.ts +20 -0
  161. package/lib/place/place.module.d.ts +2 -0
  162. package/lib/place/place.service.d.ts +8 -0
  163. package/lib/place/route/json-types.d.ts +7 -0
  164. package/lib/place/route/parameter-decorators.d.ts +26 -0
  165. package/lib/place/route/parameter-definition.class.d.ts +11 -0
  166. package/{src/lib/place/route/parameter-sanitiser.ts → lib/place/route/parameter-sanitiser.d.ts} +1 -1
  167. package/lib/place/route/parameter-type.d.ts +16 -0
  168. package/lib/place/route/route-parameter-bindings.d.ts +18 -0
  169. package/lib/place/route/route-parameter-sanitiser.d.ts +42 -0
  170. package/package.json +14 -12
  171. package/schematics/ng-add/index.d.ts +2 -0
  172. package/schematics/ng-add/index.js +12 -0
  173. package/schematics/ng-add/index.js.map +1 -0
  174. package/schematics/place-routes/index.d.ts +3 -0
  175. package/schematics/place-routes/index.js +114 -0
  176. package/schematics/place-routes/index.js.map +1 -0
  177. package/schematics/place-routes/place-def.d.ts +34 -0
  178. package/schematics/place-routes/place-def.js +84 -0
  179. package/schematics/place-routes/place-def.js.map +1 -0
  180. package/schematics/place-routes/scanner.d.ts +26 -0
  181. package/schematics/place-routes/scanner.js +125 -0
  182. package/schematics/place-routes/scanner.js.map +1 -0
  183. package/schematics/place-routes/schema.d.ts +7 -0
  184. package/schematics/place-routes/schema.js +3 -0
  185. package/schematics/place-routes/schema.js.map +1 -0
  186. package/CHANGELOG.md +0 -7
  187. package/jest.config.js +0 -9
  188. package/ng-package.json +0 -13
  189. package/schematics/ng-add/index.ts +0 -10
  190. package/schematics/place-routes/index.ts +0 -152
  191. package/schematics/place-routes/place-def.ts +0 -93
  192. package/schematics/place-routes/scanner.ts +0 -145
  193. package/schematics/place-routes/schema.ts +0 -7
  194. package/src/lib/angular-ui-powerups.module.spec.ts +0 -14
  195. package/src/lib/angular-ui-powerups.module.ts +0 -49
  196. package/src/lib/animations/slideDownAndUpAnimation.ts +0 -39
  197. package/src/lib/components/disposable-component.ts +0 -9
  198. package/src/lib/components/forms/abstract-input.component.ts +0 -108
  199. package/src/lib/components/forms/number-input/number-input.component.html +0 -15
  200. package/src/lib/components/forms/number-input/number-input.component.scss +0 -3
  201. package/src/lib/components/forms/number-input/number-input.component.spec.ts +0 -25
  202. package/src/lib/components/forms/number-input/number-input.component.ts +0 -19
  203. package/src/lib/components/forms/password-input/password-input.component.html +0 -16
  204. package/src/lib/components/forms/password-input/password-input.component.scss +0 -3
  205. package/src/lib/components/forms/password-input/password-input.component.spec.ts +0 -25
  206. package/src/lib/components/forms/password-input/password-input.component.ts +0 -18
  207. package/src/lib/components/forms/scss/mixins.scss +0 -16
  208. package/src/lib/components/forms/select-input/select-input.component.html +0 -16
  209. package/src/lib/components/forms/select-input/select-input.component.scss +0 -7
  210. package/src/lib/components/forms/select-input/select-input.component.spec.ts +0 -25
  211. package/src/lib/components/forms/select-input/select-input.component.ts +0 -31
  212. package/src/lib/components/forms/string-input/string-input.component.html +0 -15
  213. package/src/lib/components/forms/string-input/string-input.component.scss +0 -3
  214. package/src/lib/components/forms/string-input/string-input.component.spec.ts +0 -25
  215. package/src/lib/components/forms/string-input/string-input.component.ts +0 -18
  216. package/src/lib/components/resize-aware.component.ts +0 -52
  217. package/src/lib/components/types/bounds.class.ts +0 -25
  218. package/src/lib/components/types/dimension.class.ts +0 -3
  219. package/src/lib/components/types/point.class.ts +0 -13
  220. package/src/lib/directives/command.directive.spec.ts +0 -73
  221. package/src/lib/directives/command.directive.ts +0 -81
  222. package/src/lib/directives/focus-binding.directive.spec.ts +0 -8
  223. package/src/lib/directives/focus-binding.directive.ts +0 -108
  224. package/src/lib/interaction/abstract-activity.ts +0 -57
  225. package/src/lib/interaction/activity.ts +0 -17
  226. package/src/lib/interaction/alert.ts +0 -6
  227. package/src/lib/interaction/components/activity-container/activity-container.component.html +0 -8
  228. package/src/lib/interaction/components/activity-container/activity-container.component.scss +0 -3
  229. package/src/lib/interaction/components/activity-container/activity-container.component.spec.ts +0 -25
  230. package/src/lib/interaction/components/activity-container/activity-container.component.ts +0 -93
  231. package/src/lib/interaction/components/activity-outlet/activity-outlet.component.scss +0 -3
  232. package/src/lib/interaction/components/activity-outlet/activity-outlet.component.spec.ts +0 -25
  233. package/src/lib/interaction/components/activity-outlet/activity-outlet.component.ts +0 -96
  234. package/src/lib/interaction/components/alert-dialog/alert-dialog.component.html +0 -7
  235. package/src/lib/interaction/components/alert-dialog/alert-dialog.component.scss +0 -7
  236. package/src/lib/interaction/components/alert-dialog/alert-dialog.component.spec.ts +0 -25
  237. package/src/lib/interaction/components/alert-dialog/alert-dialog.component.ts +0 -20
  238. package/src/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.html +0 -9
  239. package/src/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.scss +0 -8
  240. package/src/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.spec.ts +0 -25
  241. package/src/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.ts +0 -26
  242. package/src/lib/interaction/interaction-context.ts +0 -16
  243. package/src/lib/interaction/interaction.module.ts +0 -35
  244. package/src/lib/interaction/result.ts +0 -16
  245. package/src/lib/interaction/services/dialog-interaction.service.scss +0 -11
  246. package/src/lib/interaction/services/dialog-interaction.service.spec.ts +0 -12
  247. package/src/lib/interaction/services/dialog-interaction.service.ts +0 -63
  248. package/src/lib/place/abstract-place-component.ts +0 -33
  249. package/src/lib/place/components/busy-overlay/busy-overlay.component.html +0 -4
  250. package/src/lib/place/components/busy-overlay/busy-overlay.component.scss +0 -27
  251. package/src/lib/place/components/busy-overlay/busy-overlay.component.spec.ts +0 -25
  252. package/src/lib/place/components/busy-overlay/busy-overlay.component.ts +0 -23
  253. package/src/lib/place/components/empty-state/empty-state.component.scss +0 -15
  254. package/src/lib/place/components/empty-state/empty-state.component.spec.ts +0 -25
  255. package/src/lib/place/components/empty-state/empty-state.component.ts +0 -19
  256. package/src/lib/place/components/place-outlet/place-outlet.component.html +0 -7
  257. package/src/lib/place/components/place-outlet/place-outlet.component.scss +0 -12
  258. package/src/lib/place/components/place-outlet/place-outlet.component.spec.ts +0 -25
  259. package/src/lib/place/components/place-outlet/place-outlet.component.ts +0 -37
  260. package/src/lib/place/components/place-outlet/route-animations.ts +0 -30
  261. package/src/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.html +0 -7
  262. package/src/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.scss +0 -100
  263. package/src/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.spec.ts +0 -25
  264. package/src/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.ts +0 -30
  265. package/src/lib/place/guards/leave-place.guard.spec.ts +0 -15
  266. package/src/lib/place/guards/leave-place.guard.ts +0 -18
  267. package/src/lib/place/guards/place-route.guard.ts +0 -37
  268. package/src/lib/place/place-component.ts +0 -6
  269. package/src/lib/place/place.decorator.ts +0 -40
  270. package/src/lib/place/place.module.ts +0 -44
  271. package/src/lib/place/place.service.spec.ts +0 -12
  272. package/src/lib/place/place.service.ts +0 -29
  273. package/src/lib/place/route/json-types.ts +0 -5
  274. package/src/lib/place/route/parameter-decorators.ts +0 -99
  275. package/src/lib/place/route/parameter-definition.class.ts +0 -12
  276. package/src/lib/place/route/parameter-type.ts +0 -31
  277. package/src/lib/place/route/route-parameter-bindings.ts +0 -140
  278. package/src/lib/place/route/route-parameter-sanitiser.ts +0 -135
  279. package/src/test-setup.ts +0 -1
  280. package/tsconfig.json +0 -7
  281. package/tsconfig.lib.json +0 -20
  282. package/tsconfig.schematics.json +0 -35
  283. package/tsconfig.spec.json +0 -10
  284. package/tslint.json +0 -7
  285. /package/{src/index.ts → index.d.ts} +0 -0
  286. /package/{src/public_api.ts → public_api.d.ts} +0 -0
@@ -0,0 +1,3926 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material'), require('@angular/platform-browser'), require('@angular/platform-browser/animations'), require('@coolon/pectin'), require('@angular/cdk/portal'), require('@coolon/pectin/lib/promise/deferred.class'), require('@coolon/typescript-utilities'), require('@angular/material/dialog'), require('@angular/material/list'), require('@angular/material/tabs'), require('@angular/material/tooltip'), require('@angular/router'), require('@angular/animations'), require('resize-observer-polyfill'), require('@typescript-plus/fast-memoize-decorator'), require('lodash'), require('reflect-metadata'), require('@typescript-plus/fast-memoize-decorator/dist/src')) :
3
+ typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material', '@angular/platform-browser', '@angular/platform-browser/animations', '@coolon/pectin', '@angular/cdk/portal', '@coolon/pectin/lib/promise/deferred.class', '@coolon/typescript-utilities', '@angular/material/dialog', '@angular/material/list', '@angular/material/tabs', '@angular/material/tooltip', '@angular/router', '@angular/animations', 'resize-observer-polyfill', '@typescript-plus/fast-memoize-decorator', 'lodash', 'reflect-metadata', '@typescript-plus/fast-memoize-decorator/dist/src'], factory) :
4
+ (global = global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material, global.ng.platformBrowser, global.ng.platformBrowser.animations, global.pectin, global.ng.cdk.portal, global.deferred_class, global.typescriptUtilities, global.ng.material.dialog, global.ng.material.list, global.ng.material.tabs, global.ng.material.tooltip, global.ng.router, global.ng.animations, global.ResizeObserver, global.fastMemoizeDecorator, global.lodash, null, global.src));
5
+ }(this, function (exports, common, core, forms, material, platformBrowser, animations, pectin, portal, deferred_class, typescriptUtilities, dialog, list, tabs, tooltip, router, animations$1, ResizeObserver, fastMemoizeDecorator, lodash, reflectMetadata, src) { 'use strict';
6
+
7
+ ResizeObserver = ResizeObserver && ResizeObserver.hasOwnProperty('default') ? ResizeObserver['default'] : ResizeObserver;
8
+
9
+ /*! *****************************************************************************
10
+ Copyright (c) Microsoft Corporation. All rights reserved.
11
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
12
+ this file except in compliance with the License. You may obtain a copy of the
13
+ License at http://www.apache.org/licenses/LICENSE-2.0
14
+
15
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
17
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
18
+ MERCHANTABLITY OR NON-INFRINGEMENT.
19
+
20
+ See the Apache Version 2.0 License for specific language governing permissions
21
+ and limitations under the License.
22
+ ***************************************************************************** */
23
+ /* global Reflect, Promise */
24
+
25
+ var extendStatics = function(d, b) {
26
+ extendStatics = Object.setPrototypeOf ||
27
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
28
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
29
+ return extendStatics(d, b);
30
+ };
31
+
32
+ function __extends(d, b) {
33
+ extendStatics(d, b);
34
+ function __() { this.constructor = d; }
35
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
36
+ }
37
+
38
+ var __assign = function() {
39
+ __assign = Object.assign || function __assign(t) {
40
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
41
+ s = arguments[i];
42
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
43
+ }
44
+ return t;
45
+ };
46
+ return __assign.apply(this, arguments);
47
+ };
48
+
49
+ function __rest(s, e) {
50
+ var t = {};
51
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
52
+ t[p] = s[p];
53
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
54
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
55
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
56
+ t[p[i]] = s[p[i]];
57
+ }
58
+ return t;
59
+ }
60
+
61
+ function __decorate(decorators, target, key, desc) {
62
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
63
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
64
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
65
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
66
+ }
67
+
68
+ function __param(paramIndex, decorator) {
69
+ return function (target, key) { decorator(target, key, paramIndex); }
70
+ }
71
+
72
+ function __metadata(metadataKey, metadataValue) {
73
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
74
+ }
75
+
76
+ function __awaiter(thisArg, _arguments, P, generator) {
77
+ return new (P || (P = Promise))(function (resolve, reject) {
78
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
79
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
80
+ function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
81
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
82
+ });
83
+ }
84
+
85
+ function __generator(thisArg, body) {
86
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
87
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
88
+ function verb(n) { return function (v) { return step([n, v]); }; }
89
+ function step(op) {
90
+ if (f) throw new TypeError("Generator is already executing.");
91
+ while (_) try {
92
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
93
+ if (y = 0, t) op = [op[0] & 2, t.value];
94
+ switch (op[0]) {
95
+ case 0: case 1: t = op; break;
96
+ case 4: _.label++; return { value: op[1], done: false };
97
+ case 5: _.label++; y = op[1]; op = [0]; continue;
98
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
99
+ default:
100
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
101
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
102
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
103
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
104
+ if (t[2]) _.ops.pop();
105
+ _.trys.pop(); continue;
106
+ }
107
+ op = body.call(thisArg, _);
108
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
109
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
110
+ }
111
+ }
112
+
113
+ function __exportStar(m, exports) {
114
+ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
115
+ }
116
+
117
+ function __values(o) {
118
+ var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
119
+ if (m) return m.call(o);
120
+ return {
121
+ next: function () {
122
+ if (o && i >= o.length) o = void 0;
123
+ return { value: o && o[i++], done: !o };
124
+ }
125
+ };
126
+ }
127
+
128
+ function __read(o, n) {
129
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
130
+ if (!m) return o;
131
+ var i = m.call(o), r, ar = [], e;
132
+ try {
133
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
134
+ }
135
+ catch (error) { e = { error: error }; }
136
+ finally {
137
+ try {
138
+ if (r && !r.done && (m = i["return"])) m.call(i);
139
+ }
140
+ finally { if (e) throw e.error; }
141
+ }
142
+ return ar;
143
+ }
144
+
145
+ function __spread() {
146
+ for (var ar = [], i = 0; i < arguments.length; i++)
147
+ ar = ar.concat(__read(arguments[i]));
148
+ return ar;
149
+ }
150
+
151
+ function __spreadArrays() {
152
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
153
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
154
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
155
+ r[k] = a[j];
156
+ return r;
157
+ };
158
+
159
+ function __await(v) {
160
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
161
+ }
162
+
163
+ function __asyncGenerator(thisArg, _arguments, generator) {
164
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
165
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
166
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
167
+ function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
168
+ function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
169
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
170
+ function fulfill(value) { resume("next", value); }
171
+ function reject(value) { resume("throw", value); }
172
+ function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
173
+ }
174
+
175
+ function __asyncDelegator(o) {
176
+ var i, p;
177
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
178
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
179
+ }
180
+
181
+ function __asyncValues(o) {
182
+ if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
183
+ var m = o[Symbol.asyncIterator], i;
184
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
185
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
186
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
187
+ }
188
+
189
+ function __makeTemplateObject(cooked, raw) {
190
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
191
+ return cooked;
192
+ };
193
+
194
+ function __importStar(mod) {
195
+ if (mod && mod.__esModule) return mod;
196
+ var result = {};
197
+ if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
198
+ result.default = mod;
199
+ return result;
200
+ }
201
+
202
+ function __importDefault(mod) {
203
+ return (mod && mod.__esModule) ? mod : { default: mod };
204
+ }
205
+
206
+ /**
207
+ * @fileoverview added by tsickle
208
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
209
+ */
210
+ var DisposableComponent = /** @class */ (function (_super) {
211
+ __extends(DisposableComponent, _super);
212
+ function DisposableComponent() {
213
+ return _super !== null && _super.apply(this, arguments) || this;
214
+ }
215
+ /**
216
+ * @return {?}
217
+ */
218
+ DisposableComponent.prototype.ngOnDestroy = /**
219
+ * @return {?}
220
+ */
221
+ function () {
222
+ this.dispose();
223
+ };
224
+ return DisposableComponent;
225
+ }(pectin.GarbageCollector));
226
+
227
+ /**
228
+ * @fileoverview added by tsickle
229
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
230
+ */
231
+ /**
232
+ * @abstract
233
+ * @template T
234
+ */
235
+ var AbstractInputComponent = /** @class */ (function (_super) {
236
+ __extends(AbstractInputComponent, _super);
237
+ function AbstractInputComponent() {
238
+ var _this = _super.call(this) || this;
239
+ _this.valueModel = new pectin.DelegatingFormValueModel();
240
+ // TODO: fix this.
241
+ // tslint:disable-next-line:no-output-native
242
+ _this.focus = new core.EventEmitter();
243
+ // tslint:disable-next-line:no-output-native
244
+ _this.blur = new core.EventEmitter();
245
+ // tslint:disable-next-line:no-output-native
246
+ _this.enterKey = new core.EventEmitter();
247
+ // tslint:disable-next-line:no-output-native
248
+ _this.escapeKey = new core.EventEmitter();
249
+ /** @type {?} */
250
+ var self = _this;
251
+ _this.errorStateMatcher = {
252
+ isErrorState: /**
253
+ * @param {?} control
254
+ * @param {?} form
255
+ * @return {?}
256
+ */
257
+ function (control, form) {
258
+ return self.hasErrors();
259
+ }
260
+ };
261
+ return _this;
262
+ }
263
+ Object.defineProperty(AbstractInputComponent.prototype, "userValueModel", {
264
+ set: /**
265
+ * @param {?} model
266
+ * @return {?}
267
+ */
268
+ function (model) {
269
+ this.valueModel.setDelegate(model);
270
+ },
271
+ enumerable: true,
272
+ configurable: true
273
+ });
274
+ /**
275
+ * @return {?}
276
+ */
277
+ AbstractInputComponent.prototype.notifyClick = /**
278
+ * @return {?}
279
+ */
280
+ function () {
281
+ this.safelyInvoke(this.clickCommand);
282
+ };
283
+ /**
284
+ * @return {?}
285
+ */
286
+ AbstractInputComponent.prototype.notifyFocusIn = /**
287
+ * @return {?}
288
+ */
289
+ function () {
290
+ this.safelyInvoke(this.focusCommand);
291
+ this.focus.emit();
292
+ };
293
+ /**
294
+ * @return {?}
295
+ */
296
+ AbstractInputComponent.prototype.notifyFocusOut = /**
297
+ * @return {?}
298
+ */
299
+ function () {
300
+ this.safelyInvoke(this.blurCommand);
301
+ this.blur.emit();
302
+ };
303
+ /**
304
+ * @return {?}
305
+ */
306
+ AbstractInputComponent.prototype.notifyEnterKey = /**
307
+ * @return {?}
308
+ */
309
+ function () {
310
+ this.safelyInvoke(this.enterCommand);
311
+ this.enterKey.emit();
312
+ };
313
+ /**
314
+ * @return {?}
315
+ */
316
+ AbstractInputComponent.prototype.notifyEscapeKey = /**
317
+ * @return {?}
318
+ */
319
+ function () {
320
+ this.safelyInvoke(this.escapeCommand);
321
+ this.escapeKey.emit();
322
+ };
323
+ /**
324
+ * @protected
325
+ * @param {?} command
326
+ * @return {?}
327
+ */
328
+ AbstractInputComponent.prototype.safelyInvoke = /**
329
+ * @protected
330
+ * @param {?} command
331
+ * @return {?}
332
+ */
333
+ function (command) {
334
+ if (command && command.enabled.value) {
335
+ command.execute();
336
+ }
337
+ };
338
+ /**
339
+ * @return {?}
340
+ */
341
+ AbstractInputComponent.prototype.ngOnInit = /**
342
+ * @return {?}
343
+ */
344
+ function () {
345
+ };
346
+ /**
347
+ * @return {?}
348
+ */
349
+ AbstractInputComponent.prototype.isEnabled = /**
350
+ * @return {?}
351
+ */
352
+ function () {
353
+ return this.enabled.value;
354
+ };
355
+ Object.defineProperty(AbstractInputComponent.prototype, "enabled", {
356
+ get: /**
357
+ * @return {?}
358
+ */
359
+ function () {
360
+ return this.valueModel.enabled;
361
+ },
362
+ enumerable: true,
363
+ configurable: true
364
+ });
365
+ /**
366
+ * @return {?}
367
+ */
368
+ AbstractInputComponent.prototype.hasErrors = /**
369
+ * @return {?}
370
+ */
371
+ function () {
372
+ return !this.errorList.query().isEmpty();
373
+ };
374
+ Object.defineProperty(AbstractInputComponent.prototype, "errorList", {
375
+ get: /**
376
+ * @return {?}
377
+ */
378
+ function () {
379
+ return this.valueModel.errorList;
380
+ },
381
+ enumerable: true,
382
+ configurable: true
383
+ });
384
+ Object.defineProperty(AbstractInputComponent.prototype, "firstError", {
385
+ get: /**
386
+ * @return {?}
387
+ */
388
+ function () {
389
+ return this.hasErrors() ? this.errorList.value[0] : null;
390
+ },
391
+ enumerable: true,
392
+ configurable: true
393
+ });
394
+ AbstractInputComponent.propDecorators = {
395
+ userValueModel: [{ type: core.Input, args: ['valueModel',] }],
396
+ label: [{ type: core.Input }],
397
+ floatLabel: [{ type: core.Input }],
398
+ hint: [{ type: core.Input }],
399
+ placeholder: [{ type: core.Input }],
400
+ focusCommand: [{ type: core.Input, args: ['command.focus',] }],
401
+ blurCommand: [{ type: core.Input, args: ['command.blur',] }],
402
+ enterCommand: [{ type: core.Input, args: ['command.enter',] }],
403
+ escapeCommand: [{ type: core.Input, args: ['command.escape',] }],
404
+ clickCommand: [{ type: core.Input, args: ['command.click',] }],
405
+ focus: [{ type: core.Output }],
406
+ blur: [{ type: core.Output }],
407
+ enterKey: [{ type: core.Output }],
408
+ escapeKey: [{ type: core.Output }],
409
+ notifyClick: [{ type: core.HostListener, args: ['click',] }],
410
+ notifyFocusIn: [{ type: core.HostListener, args: ['focusin',] }],
411
+ notifyFocusOut: [{ type: core.HostListener, args: ['focusout',] }]
412
+ };
413
+ __decorate([
414
+ pectin.UseDelegate(),
415
+ __metadata("design:type", pectin.ValueModel),
416
+ __metadata("design:paramtypes", [pectin.ValueModel])
417
+ ], AbstractInputComponent.prototype, "userValueModel", null);
418
+ return AbstractInputComponent;
419
+ }(DisposableComponent));
420
+ if (false) {
421
+ /** @type {?} */
422
+ AbstractInputComponent.prototype.valueModel;
423
+ /** @type {?} */
424
+ AbstractInputComponent.prototype.label;
425
+ /** @type {?} */
426
+ AbstractInputComponent.prototype.floatLabel;
427
+ /** @type {?} */
428
+ AbstractInputComponent.prototype.hint;
429
+ /** @type {?} */
430
+ AbstractInputComponent.prototype.placeholder;
431
+ /** @type {?} */
432
+ AbstractInputComponent.prototype.focusCommand;
433
+ /** @type {?} */
434
+ AbstractInputComponent.prototype.blurCommand;
435
+ /** @type {?} */
436
+ AbstractInputComponent.prototype.enterCommand;
437
+ /** @type {?} */
438
+ AbstractInputComponent.prototype.escapeCommand;
439
+ /** @type {?} */
440
+ AbstractInputComponent.prototype.clickCommand;
441
+ /** @type {?} */
442
+ AbstractInputComponent.prototype.focus;
443
+ /** @type {?} */
444
+ AbstractInputComponent.prototype.blur;
445
+ /** @type {?} */
446
+ AbstractInputComponent.prototype.enterKey;
447
+ /** @type {?} */
448
+ AbstractInputComponent.prototype.escapeKey;
449
+ /** @type {?} */
450
+ AbstractInputComponent.prototype.errorStateMatcher;
451
+ }
452
+
453
+ /**
454
+ * @fileoverview added by tsickle
455
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
456
+ */
457
+ var NumberInputComponent = /** @class */ (function (_super) {
458
+ __extends(NumberInputComponent, _super);
459
+ function NumberInputComponent() {
460
+ return _super.call(this) || this;
461
+ }
462
+ /**
463
+ * @return {?}
464
+ */
465
+ NumberInputComponent.prototype.ngOnInit = /**
466
+ * @return {?}
467
+ */
468
+ function () {
469
+ };
470
+ NumberInputComponent.decorators = [
471
+ { type: core.Component, args: [{
472
+ selector: 'angular-ui-powerups-number-input',
473
+ template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"number\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"valueModel\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
474
+ styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]
475
+ }] }
476
+ ];
477
+ /** @nocollapse */
478
+ NumberInputComponent.ctorParameters = function () { return []; };
479
+ return NumberInputComponent;
480
+ }(AbstractInputComponent));
481
+
482
+ /**
483
+ * @fileoverview added by tsickle
484
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
485
+ */
486
+ /**
487
+ * @template P
488
+ */
489
+ var CommandDirective = /** @class */ (function (_super) {
490
+ __extends(CommandDirective, _super);
491
+ function CommandDirective(elementRef) {
492
+ var _this = _super.call(this) || this;
493
+ _this.elementRef = elementRef;
494
+ _this._commandParameterProvided = false;
495
+ return _this;
496
+ }
497
+ Object.defineProperty(CommandDirective.prototype, "commandParameter", {
498
+ get: /**
499
+ * @return {?}
500
+ */
501
+ function () {
502
+ return this._commandParameter;
503
+ },
504
+ set: /**
505
+ * @param {?} value
506
+ * @return {?}
507
+ */
508
+ function (value) {
509
+ this._commandParameterProvided = true;
510
+ this._commandParameter = value;
511
+ },
512
+ enumerable: true,
513
+ configurable: true
514
+ });
515
+ /**
516
+ * @return {?}
517
+ */
518
+ CommandDirective.prototype.ngOnInit = /**
519
+ * @return {?}
520
+ */
521
+ function () {
522
+ pectin.assert.notNil(this.pectinCommand);
523
+ if (this.pectinCommand instanceof pectin.UnaryCommand) {
524
+ if (!this._commandParameterProvided) {
525
+ pectin.lang.illegalState('UnaryCommands required the command parameter to be specified.');
526
+ }
527
+ }
528
+ else {
529
+ if (this._commandParameterProvided) {
530
+ pectin.lang.illegalState('command parameters are only supported by UnaryCommands');
531
+ }
532
+ }
533
+ };
534
+ /**
535
+ * @return {?}
536
+ */
537
+ CommandDirective.prototype.ngAfterViewInit = /**
538
+ * @return {?}
539
+ */
540
+ function () {
541
+ var _this = this;
542
+ // for some reason mat-buttons kills the disabled host binding. It works on a regular button but for now
543
+ // we need to do this.
544
+ var chain = pectin.Dsl.disposeWith(this).chain;
545
+ chain(this.pectinCommand.enabled).subscribe((/**
546
+ * @param {?} enabled
547
+ * @return {?}
548
+ */
549
+ function (enabled) {
550
+ if (enabled) {
551
+ _this.elementRef.nativeElement.removeAttribute('disabled');
552
+ if (_this.elementRef.nativeElement.tagName === 'A') {
553
+ _this.elementRef.nativeElement.setAttribute('href', 'javascript:void');
554
+ }
555
+ }
556
+ else {
557
+ _this.elementRef.nativeElement.setAttribute('disabled', 'disabled');
558
+ if (_this.elementRef.nativeElement.tagName === 'A') {
559
+ _this.elementRef.nativeElement.removeAttribute('href');
560
+ }
561
+ }
562
+ }));
563
+ };
564
+ /**
565
+ * @return {?}
566
+ */
567
+ CommandDirective.prototype.ngOnDestroy = /**
568
+ * @return {?}
569
+ */
570
+ function () {
571
+ this.dispose();
572
+ };
573
+ /**
574
+ * @param {?} $event
575
+ * @return {?}
576
+ */
577
+ CommandDirective.prototype.notifyClick = /**
578
+ * @param {?} $event
579
+ * @return {?}
580
+ */
581
+ function ($event) {
582
+ $event.preventDefault();
583
+ $event.stopPropagation();
584
+ if (this.pectinCommand.enabled.value) {
585
+ if (this.pectinCommand instanceof pectin.UnaryCommand) {
586
+ this.pectinCommand.withContext({ event: $event }).execute(this.commandParameter);
587
+ }
588
+ else {
589
+ this.pectinCommand.withContext({ event: $event }).execute();
590
+ }
591
+ }
592
+ else {
593
+ console.warn('disabled command clicked, ignoring.');
594
+ }
595
+ };
596
+ CommandDirective.decorators = [
597
+ { type: core.Directive, args: [{
598
+ // tslint:disable-next-line:directive-selector
599
+ selector: '[pectinCommand]'
600
+ },] }
601
+ ];
602
+ /** @nocollapse */
603
+ CommandDirective.ctorParameters = function () { return [
604
+ { type: core.ElementRef, decorators: [{ type: core.Inject, args: [core.ElementRef,] }] }
605
+ ]; };
606
+ CommandDirective.propDecorators = {
607
+ pectinCommand: [{ type: core.Input }],
608
+ commandParameter: [{ type: core.Input }],
609
+ notifyClick: [{ type: core.HostListener, args: ['click', ['$event'],] }]
610
+ };
611
+ return CommandDirective;
612
+ }(pectin.GarbageCollector));
613
+ if (false) {
614
+ /** @type {?} */
615
+ CommandDirective.prototype.pectinCommand;
616
+ /**
617
+ * @type {?}
618
+ * @private
619
+ */
620
+ CommandDirective.prototype._commandParameter;
621
+ /**
622
+ * @type {?}
623
+ * @private
624
+ */
625
+ CommandDirective.prototype._commandParameterProvided;
626
+ /**
627
+ * @type {?}
628
+ * @private
629
+ */
630
+ CommandDirective.prototype.elementRef;
631
+ }
632
+
633
+ /**
634
+ * @fileoverview added by tsickle
635
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
636
+ */
637
+ var FocusBindingDirective = /** @class */ (function (_super) {
638
+ __extends(FocusBindingDirective, _super);
639
+ function FocusBindingDirective(el, ngZone, document) {
640
+ var _this = _super.call(this) || this;
641
+ _this.el = el;
642
+ _this.ngZone = ngZone;
643
+ // @see https://stackoverflow.com/questions/49513359/could-not-resolve-type-document-in-angular5/53715642#53715642
644
+ _this.document = (/** @type {?} */ (document));
645
+ return _this;
646
+ }
647
+ /**
648
+ * @return {?}
649
+ */
650
+ FocusBindingDirective.prototype.onFocusIn = /**
651
+ * @return {?}
652
+ */
653
+ function () {
654
+ if (this.hasBinding()) {
655
+ this.pectinFocusBinding.focusContext.notifyFocusIn();
656
+ }
657
+ };
658
+ /**
659
+ * @return {?}
660
+ */
661
+ FocusBindingDirective.prototype.onFocusOut = /**
662
+ * @return {?}
663
+ */
664
+ function () {
665
+ if (this.hasBinding()) {
666
+ this.pectinFocusBinding.focusContext.notifyFocusOut();
667
+ }
668
+ };
669
+ /**
670
+ * @return {?}
671
+ */
672
+ FocusBindingDirective.prototype.ngOnInit = /**
673
+ * @return {?}
674
+ */
675
+ function () {
676
+ };
677
+ /**
678
+ * @return {?}
679
+ */
680
+ FocusBindingDirective.prototype.ngAfterViewInit = /**
681
+ * @return {?}
682
+ */
683
+ function () {
684
+ var _this = this;
685
+ // TODO: Make this also track the current enabled/disabled state.
686
+ if (this.hasBinding()) {
687
+ var chain = pectin.Dsl.disposeWith(this).chain;
688
+ chain(this.pectinFocusBinding.focusContext.focused).subscribe((/**
689
+ * @param {?} focused
690
+ * @return {?}
691
+ */
692
+ function (focused) {
693
+ if (focused && !_this.alreadyHasFocus()) {
694
+ _this.tryAndFocus();
695
+ }
696
+ }));
697
+ }
698
+ else {
699
+ pectin.Logger.get(this).warn("pectinFocusBinding was nil");
700
+ }
701
+ };
702
+ /**
703
+ * @private
704
+ * @return {?}
705
+ */
706
+ FocusBindingDirective.prototype.hasBinding = /**
707
+ * @private
708
+ * @return {?}
709
+ */
710
+ function () {
711
+ return !!this.pectinFocusBinding && !!this.pectinFocusBinding.focusContext;
712
+ };
713
+ // Hook method for debugging via tracing.
714
+ // Hook method for debugging via tracing.
715
+ /**
716
+ * @return {?}
717
+ */
718
+ FocusBindingDirective.prototype.alreadyHasFocus =
719
+ // Hook method for debugging via tracing.
720
+ /**
721
+ * @return {?}
722
+ */
723
+ function () {
724
+ return this.isFocused(this.focusTarget);
725
+ };
726
+ // Hook method for debugging via tracing.
727
+ // Hook method for debugging via tracing.
728
+ /**
729
+ * @param {?} element
730
+ * @return {?}
731
+ */
732
+ FocusBindingDirective.prototype.isFocused =
733
+ // Hook method for debugging via tracing.
734
+ /**
735
+ * @param {?} element
736
+ * @return {?}
737
+ */
738
+ function (element) {
739
+ return this.document.activeElement === element;
740
+ };
741
+ /**
742
+ * @param {?=} retries
743
+ * @return {?}
744
+ */
745
+ FocusBindingDirective.prototype.tryAndFocus = /**
746
+ * @param {?=} retries
747
+ * @return {?}
748
+ */
749
+ function (retries) {
750
+ var _this = this;
751
+ if (retries === void 0) { retries = 5; }
752
+ if (this.modelShouldStillHaveFocus() && this.canFocus()) {
753
+ if (!this.alreadyHasFocus()) {
754
+ this.focusTarget.focus();
755
+ }
756
+ // if we didn't get the focus we try again later.
757
+ if (!this.alreadyHasFocus()) {
758
+ pectin.Logger.get(this).log("focus failed, trying " + retries + " more times");
759
+ if (retries > 0) {
760
+ // try again on the next paint
761
+ // TODO: is there an angular way of doing this without calling a window function.
762
+ requestAnimationFrame((/**
763
+ * @return {?}
764
+ */
765
+ function () {
766
+ _this.tryAndFocus(retries - 1);
767
+ }));
768
+ }
769
+ else {
770
+ pectin.Logger.get(this).warn("Tried to focus but gave up as the component wasn't enabled or visible.");
771
+ }
772
+ }
773
+ }
774
+ };
775
+ Object.defineProperty(FocusBindingDirective.prototype, "focusTarget", {
776
+ get: /**
777
+ * @return {?}
778
+ */
779
+ function () {
780
+ return this.focusBindingTarget || this.el.nativeElement;
781
+ },
782
+ enumerable: true,
783
+ configurable: true
784
+ });
785
+ // Hook method for debugging via tracing.
786
+ // Hook method for debugging via tracing.
787
+ /**
788
+ * @return {?}
789
+ */
790
+ FocusBindingDirective.prototype.modelShouldStillHaveFocus =
791
+ // Hook method for debugging via tracing.
792
+ /**
793
+ * @return {?}
794
+ */
795
+ function () {
796
+ return this.hasBinding() && this.pectinFocusBinding.focusContext.focused.value;
797
+ };
798
+ // Hook method for debugging via tracing.
799
+ // Hook method for debugging via tracing.
800
+ /**
801
+ * @return {?}
802
+ */
803
+ FocusBindingDirective.prototype.canFocus =
804
+ // Hook method for debugging via tracing.
805
+ /**
806
+ * @return {?}
807
+ */
808
+ function () {
809
+ /** @type {?} */
810
+ var dimension = this.focusTarget.getBoundingClientRect();
811
+ /** @type {?} */
812
+ var hasSize = dimension.height >= 0 && dimension.height >= 0;
813
+ // tslint:disable-next-line:no-string-literal
814
+ return hasSize && !this.focusTarget['disabled'];
815
+ };
816
+ FocusBindingDirective.decorators = [
817
+ { type: core.Directive, args: [{
818
+ // tslint:disable-next-line:directive-selector
819
+ selector: '[pectinFocusBinding]'
820
+ },] }
821
+ ];
822
+ /** @nocollapse */
823
+ FocusBindingDirective.ctorParameters = function () { return [
824
+ { type: core.ElementRef, decorators: [{ type: core.Inject, args: [core.ElementRef,] }] },
825
+ { type: core.NgZone, decorators: [{ type: core.Inject, args: [core.NgZone,] }] },
826
+ { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] }
827
+ ]; };
828
+ FocusBindingDirective.propDecorators = {
829
+ pectinFocusBinding: [{ type: core.Input }],
830
+ focusBindingTarget: [{ type: core.Input }],
831
+ onFocusIn: [{ type: core.HostListener, args: ['focusin',] }],
832
+ onFocusOut: [{ type: core.HostListener, args: ['focusout',] }]
833
+ };
834
+ return FocusBindingDirective;
835
+ }(DisposableComponent));
836
+ if (false) {
837
+ /**
838
+ * @type {?}
839
+ * @private
840
+ */
841
+ FocusBindingDirective.prototype.document;
842
+ /** @type {?} */
843
+ FocusBindingDirective.prototype.pectinFocusBinding;
844
+ /** @type {?} */
845
+ FocusBindingDirective.prototype.focusBindingTarget;
846
+ /**
847
+ * @type {?}
848
+ * @private
849
+ */
850
+ FocusBindingDirective.prototype.el;
851
+ /**
852
+ * @type {?}
853
+ * @private
854
+ */
855
+ FocusBindingDirective.prototype.ngZone;
856
+ }
857
+
858
+ /**
859
+ * @fileoverview added by tsickle
860
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
861
+ */
862
+ var StringInputComponent = /** @class */ (function (_super) {
863
+ __extends(StringInputComponent, _super);
864
+ function StringInputComponent() {
865
+ return _super.call(this) || this;
866
+ }
867
+ /**
868
+ * @return {?}
869
+ */
870
+ StringInputComponent.prototype.ngOnInit = /**
871
+ * @return {?}
872
+ */
873
+ function () {
874
+ };
875
+ StringInputComponent.decorators = [
876
+ { type: core.Component, args: [{
877
+ selector: 'angular-ui-powerups-string-input',
878
+ template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"valueModel\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
879
+ styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]
880
+ }] }
881
+ ];
882
+ /** @nocollapse */
883
+ StringInputComponent.ctorParameters = function () { return []; };
884
+ return StringInputComponent;
885
+ }(AbstractInputComponent));
886
+
887
+ /**
888
+ * @fileoverview added by tsickle
889
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
890
+ */
891
+ var PasswordInputComponent = /** @class */ (function (_super) {
892
+ __extends(PasswordInputComponent, _super);
893
+ function PasswordInputComponent() {
894
+ return _super.call(this) || this;
895
+ }
896
+ /**
897
+ * @return {?}
898
+ */
899
+ PasswordInputComponent.prototype.ngOnInit = /**
900
+ * @return {?}
901
+ */
902
+ function () {
903
+ };
904
+ PasswordInputComponent.decorators = [
905
+ { type: core.Component, args: [{
906
+ selector: 'angular-ui-powerups-password-input',
907
+ template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <input type=\"password\"\n matInput\n placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"valueModel\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n\n",
908
+ styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]
909
+ }] }
910
+ ];
911
+ /** @nocollapse */
912
+ PasswordInputComponent.ctorParameters = function () { return []; };
913
+ return PasswordInputComponent;
914
+ }(AbstractInputComponent));
915
+
916
+ /**
917
+ * @fileoverview added by tsickle
918
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
919
+ */
920
+ /**
921
+ * @template T
922
+ */
923
+ var SelectInputComponent = /** @class */ (function (_super) {
924
+ __extends(SelectInputComponent, _super);
925
+ function SelectInputComponent() {
926
+ var _this = _super.call(this) || this;
927
+ _this.optionLabelFormat = (/**
928
+ * @param {?} option
929
+ * @return {?}
930
+ */
931
+ function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; });
932
+ return _this;
933
+ }
934
+ /**
935
+ * @return {?}
936
+ */
937
+ SelectInputComponent.prototype.ngOnInit = /**
938
+ * @return {?}
939
+ */
940
+ function () {
941
+ };
942
+ SelectInputComponent.decorators = [
943
+ { type: core.Component, args: [{
944
+ selector: 'angular-ui-powerups-select-input',
945
+ template: "<mat-form-field appearance=\"standard\" [floatLabel]=\"floatLabel\">\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\n <mat-select placeholder=\"{{placeholder}}\"\n [(ngModel)]=\"valueModel.value\"\n [disabled]=\"!enabled.value\"\n (keydown.enter)=\"notifyEnterKey()\"\n (keydown.escape)=\"notifyEscapeKey()\"\n [pectinFocusBinding]=\"valueModel\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngFor=\"let option of optionsModel.value\" [value]=\"option\">{{optionLabelFormat(option)}}\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n</mat-form-field>\n",
946
+ styles: [":host{display:inline-block}mat-form-field{width:100%}"]
947
+ }] }
948
+ ];
949
+ /** @nocollapse */
950
+ SelectInputComponent.ctorParameters = function () { return []; };
951
+ SelectInputComponent.propDecorators = {
952
+ optionsModel: [{ type: core.Input }],
953
+ options: [{ type: core.Input }],
954
+ optionLabel: [{ type: core.Input }],
955
+ optionLabelFormat: [{ type: core.Input }]
956
+ };
957
+ __decorate([
958
+ pectin.UseDelegate(),
959
+ __metadata("design:type", pectin.ListModel)
960
+ ], SelectInputComponent.prototype, "optionsModel", void 0);
961
+ __decorate([
962
+ pectin.StoreInListModel('optionsModel'),
963
+ __metadata("design:type", Array)
964
+ ], SelectInputComponent.prototype, "options", void 0);
965
+ return SelectInputComponent;
966
+ }(AbstractInputComponent));
967
+ if (false) {
968
+ /** @type {?} */
969
+ SelectInputComponent.prototype.optionsModel;
970
+ /** @type {?} */
971
+ SelectInputComponent.prototype.options;
972
+ /** @type {?} */
973
+ SelectInputComponent.prototype.optionLabel;
974
+ /** @type {?} */
975
+ SelectInputComponent.prototype.optionLabelFormat;
976
+ }
977
+
978
+ /**
979
+ * @fileoverview added by tsickle
980
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
981
+ */
982
+ /** @type {?} */
983
+ var INTERACTION_CONTEXT = new core.InjectionToken('InteractionContext');
984
+ /**
985
+ * @abstract
986
+ */
987
+ var /**
988
+ * @abstract
989
+ */
990
+ InteractionContext = /** @class */ (function () {
991
+ function InteractionContext() {
992
+ }
993
+ return InteractionContext;
994
+ }());
995
+ if (false) {
996
+ /**
997
+ * @abstract
998
+ * @template D, R, E
999
+ * @param {?} activityType
1000
+ * @param {?=} data
1001
+ * @return {?}
1002
+ */
1003
+ InteractionContext.prototype.startActivity = function (activityType, data) { };
1004
+ /**
1005
+ * @abstract
1006
+ * @param {?} confirm
1007
+ * @return {?}
1008
+ */
1009
+ InteractionContext.prototype.confirm = function (confirm) { };
1010
+ /**
1011
+ * @abstract
1012
+ * @param {?} alert
1013
+ * @return {?}
1014
+ */
1015
+ InteractionContext.prototype.alert = function (alert) { };
1016
+ }
1017
+
1018
+ /**
1019
+ * @fileoverview added by tsickle
1020
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1021
+ */
1022
+ /**
1023
+ * @template D, R, E
1024
+ */
1025
+ var /**
1026
+ * @template D, R, E
1027
+ */
1028
+ AbstractActivity = /** @class */ (function (_super) {
1029
+ __extends(AbstractActivity, _super);
1030
+ function AbstractActivity() {
1031
+ var _this = _super !== null && _super.apply(this, arguments) || this;
1032
+ _this._doneListeners = new pectin.EventListenerList();
1033
+ _this._cancelListeners = new pectin.EventListenerList();
1034
+ _this._finishListeners = new pectin.EventListenerList();
1035
+ _this._busyModel = new pectin.DelegatingValueModel().withDefault(false);
1036
+ return _this;
1037
+ }
1038
+ /**
1039
+ * @param {?} callback
1040
+ * @return {?}
1041
+ */
1042
+ AbstractActivity.prototype.onDone = /**
1043
+ * @param {?} callback
1044
+ * @return {?}
1045
+ */
1046
+ function (callback) {
1047
+ this._doneListeners.add(callback);
1048
+ };
1049
+ /**
1050
+ * @param {?} callback
1051
+ * @return {?}
1052
+ */
1053
+ AbstractActivity.prototype.onCancel = /**
1054
+ * @param {?} callback
1055
+ * @return {?}
1056
+ */
1057
+ function (callback) {
1058
+ this._cancelListeners.add(callback);
1059
+ };
1060
+ /**
1061
+ * @param {?=} result
1062
+ * @return {?}
1063
+ */
1064
+ AbstractActivity.prototype.done = /**
1065
+ * @param {?=} result
1066
+ * @return {?}
1067
+ */
1068
+ function (result) {
1069
+ var _this = this;
1070
+ return this._doneListeners
1071
+ .fireAndWait((/**
1072
+ * @param {?} l
1073
+ * @return {?}
1074
+ */
1075
+ function (l) { return l(result); }))
1076
+ .finally((/**
1077
+ * @return {?}
1078
+ */
1079
+ function () { return _this.finalizeAndDispose(); }));
1080
+ };
1081
+ /**
1082
+ * @param {?=} error
1083
+ * @return {?}
1084
+ */
1085
+ AbstractActivity.prototype.cancel = /**
1086
+ * @param {?=} error
1087
+ * @return {?}
1088
+ */
1089
+ function (error) {
1090
+ var _this = this;
1091
+ return this._cancelListeners
1092
+ .fireAndWait((/**
1093
+ * @param {?} l
1094
+ * @return {?}
1095
+ */
1096
+ function (l) { return l(error); }))
1097
+ .finally((/**
1098
+ * @return {?}
1099
+ */
1100
+ function () { return _this.finalizeAndDispose(); }));
1101
+ };
1102
+ /**
1103
+ * @private
1104
+ * @return {?}
1105
+ */
1106
+ AbstractActivity.prototype.finalizeAndDispose = /**
1107
+ * @private
1108
+ * @return {?}
1109
+ */
1110
+ function () {
1111
+ // this._activeModel.value = false;
1112
+ this._finishListeners.fire((/**
1113
+ * @param {?} l
1114
+ * @return {?}
1115
+ */
1116
+ function (l) { return l(); }));
1117
+ // this._interactionContext = null;
1118
+ // this._initialized = false;
1119
+ [
1120
+ this._finishListeners,
1121
+ this._doneListeners,
1122
+ this._cancelListeners
1123
+ ].forEach((/**
1124
+ * @param {?} l
1125
+ * @return {?}
1126
+ */
1127
+ function (l) { return l.dispose(); }));
1128
+ };
1129
+ Object.defineProperty(AbstractActivity.prototype, "busy", {
1130
+ get: /**
1131
+ * @return {?}
1132
+ */
1133
+ function () {
1134
+ return this._busyModel.readonly;
1135
+ },
1136
+ enumerable: true,
1137
+ configurable: true
1138
+ });
1139
+ /**
1140
+ * @param {?} busyModel
1141
+ * @return {?}
1142
+ */
1143
+ AbstractActivity.prototype.busyWhile = /**
1144
+ * @param {?} busyModel
1145
+ * @return {?}
1146
+ */
1147
+ function (busyModel) {
1148
+ this._busyModel.setDelegate(busyModel);
1149
+ };
1150
+ /**
1151
+ * @return {?}
1152
+ */
1153
+ AbstractActivity.prototype.isBusy = /**
1154
+ * @return {?}
1155
+ */
1156
+ function () {
1157
+ return this._busyModel.value;
1158
+ };
1159
+ return AbstractActivity;
1160
+ }(DisposableComponent));
1161
+ if (false) {
1162
+ /**
1163
+ * @type {?}
1164
+ * @private
1165
+ */
1166
+ AbstractActivity.prototype._doneListeners;
1167
+ /**
1168
+ * @type {?}
1169
+ * @private
1170
+ */
1171
+ AbstractActivity.prototype._cancelListeners;
1172
+ /**
1173
+ * @type {?}
1174
+ * @private
1175
+ */
1176
+ AbstractActivity.prototype._finishListeners;
1177
+ /**
1178
+ * @type {?}
1179
+ * @private
1180
+ */
1181
+ AbstractActivity.prototype._busyModel;
1182
+ }
1183
+
1184
+ /**
1185
+ * @fileoverview added by tsickle
1186
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1187
+ */
1188
+ /** @type {?} */
1189
+ var ACTIVITY_DATA = new core.InjectionToken('InteractionActivityData');
1190
+ /**
1191
+ * @record
1192
+ * @template D, R, E
1193
+ */
1194
+ function Activity() { }
1195
+ if (false) {
1196
+ /** @type {?} */
1197
+ Activity.prototype.busy;
1198
+ /**
1199
+ * @param {?} callback
1200
+ * @return {?}
1201
+ */
1202
+ Activity.prototype.onDone = function (callback) { };
1203
+ /**
1204
+ * @param {?} callback
1205
+ * @return {?}
1206
+ */
1207
+ Activity.prototype.onCancel = function (callback) { };
1208
+ }
1209
+
1210
+ /**
1211
+ * @fileoverview added by tsickle
1212
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1213
+ */
1214
+ var AlertDialogComponent = /** @class */ (function (_super) {
1215
+ __extends(AlertDialogComponent, _super);
1216
+ function AlertDialogComponent(alert) {
1217
+ var _this = _super.call(this) || this;
1218
+ _this.alert = alert;
1219
+ return _this;
1220
+ }
1221
+ /**
1222
+ * @return {?}
1223
+ */
1224
+ AlertDialogComponent.prototype.ngOnInit = /**
1225
+ * @return {?}
1226
+ */
1227
+ function () {
1228
+ };
1229
+ AlertDialogComponent.decorators = [
1230
+ { type: core.Component, args: [{
1231
+ selector: 'angular-ui-powerups-alert-dialog',
1232
+ template: "<h3 matDialogTitle *ngIf=\"alert.title\">{{alert.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of alert.content()\">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-raised-button color=\"primary\" (click)=\"done()\">{{alert.ok()}}</button>\n</p>\n",
1233
+ styles: [":host{display:block;padding:var(--angular-ui-powerups-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]
1234
+ }] }
1235
+ ];
1236
+ /** @nocollapse */
1237
+ AlertDialogComponent.ctorParameters = function () { return [
1238
+ { type: undefined, decorators: [{ type: core.Inject, args: [ACTIVITY_DATA,] }] }
1239
+ ]; };
1240
+ return AlertDialogComponent;
1241
+ }(AbstractActivity));
1242
+ if (false) {
1243
+ /** @type {?} */
1244
+ AlertDialogComponent.prototype.alert;
1245
+ }
1246
+
1247
+ /**
1248
+ * @fileoverview added by tsickle
1249
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1250
+ */
1251
+ var ConfirmationDialogComponent = /** @class */ (function (_super) {
1252
+ __extends(ConfirmationDialogComponent, _super);
1253
+ function ConfirmationDialogComponent(confirm) {
1254
+ var _this = _super.call(this) || this;
1255
+ _this.confirm = confirm;
1256
+ pectin.assert.notNil(confirm);
1257
+ console.log(confirm);
1258
+ return _this;
1259
+ }
1260
+ /**
1261
+ * @return {?}
1262
+ */
1263
+ ConfirmationDialogComponent.prototype.ngOnInit = /**
1264
+ * @return {?}
1265
+ */
1266
+ function () {
1267
+ };
1268
+ /**
1269
+ * @return {?}
1270
+ */
1271
+ ConfirmationDialogComponent.prototype.isDestructive = /**
1272
+ * @return {?}
1273
+ */
1274
+ function () {
1275
+ return this.confirm.destructive && this.confirm.destructive();
1276
+ };
1277
+ ConfirmationDialogComponent.decorators = [
1278
+ { type: core.Component, args: [{
1279
+ selector: 'angular-ui-powerups-confirmation-dialog',
1280
+ template: "<h3 matDialogTitle *ngIf=\"confirm.title\">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor=\"let line of confirm.content()\">{{line}}</p>\n</div>\n<p matDialogActions>\n <button mat-button (click)=\"cancel()\">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]=\"isDestructive() ? 'warn' : 'primary'\" (click)=\"done(true)\">{{confirm.ok()}}</button>\n</p>\n\n",
1281
+ styles: [":host{display:block;padding:var(--angular-ui-powerups-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]
1282
+ }] }
1283
+ ];
1284
+ /** @nocollapse */
1285
+ ConfirmationDialogComponent.ctorParameters = function () { return [
1286
+ { type: undefined, decorators: [{ type: core.Inject, args: [ACTIVITY_DATA,] }] }
1287
+ ]; };
1288
+ return ConfirmationDialogComponent;
1289
+ }(AbstractActivity));
1290
+ if (false) {
1291
+ /** @type {?} */
1292
+ ConfirmationDialogComponent.prototype.confirm;
1293
+ }
1294
+
1295
+ /**
1296
+ * @fileoverview added by tsickle
1297
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1298
+ */
1299
+ exports.ɵq = /** @class */ (function (_super) {
1300
+ __extends(ActivityContainerComponent, _super);
1301
+ function ActivityContainerComponent() {
1302
+ var _this = _super.call(this) || this;
1303
+ _this.activityTabs = new pectin.MutableListModel();
1304
+ _this.obsoleteTabs = [];
1305
+ return _this;
1306
+ }
1307
+ /**
1308
+ * @return {?}
1309
+ */
1310
+ ActivityContainerComponent.prototype.ngOnInit = /**
1311
+ * @return {?}
1312
+ */
1313
+ function () {
1314
+ };
1315
+ /**
1316
+ * @return {?}
1317
+ */
1318
+ ActivityContainerComponent.prototype.ngAfterViewInit = /**
1319
+ * @return {?}
1320
+ */
1321
+ function () {
1322
+ var _this = this;
1323
+ var observe = pectin.Dsl.disposeWith(this).observe;
1324
+ observe.valuesFrom(this.tabs.animationDone).subscribe((/**
1325
+ * @return {?}
1326
+ */
1327
+ function () { return _this.cleanUpTabs(); }));
1328
+ };
1329
+ /**
1330
+ * @template D, R, E
1331
+ * @param {?} options
1332
+ * @return {?}
1333
+ */
1334
+ ActivityContainerComponent.prototype.initialise = /**
1335
+ * @template D, R, E
1336
+ * @param {?} options
1337
+ * @return {?}
1338
+ */
1339
+ function (options) {
1340
+ this.initialActivity = __assign({}, options, { interactionContext: this });
1341
+ };
1342
+ /**
1343
+ * @template D, R, E
1344
+ * @param {?} activityType
1345
+ * @param {?=} data
1346
+ * @return {?}
1347
+ */
1348
+ ActivityContainerComponent.prototype.startActivity = /**
1349
+ * @template D, R, E
1350
+ * @param {?} activityType
1351
+ * @param {?=} data
1352
+ * @return {?}
1353
+ */
1354
+ function (activityType, data) {
1355
+ var _this = this;
1356
+ /** @type {?} */
1357
+ var deferred = deferred_class.Deferred.defer();
1358
+ /** @type {?} */
1359
+ var context = {
1360
+ interactionContext: this,
1361
+ activityClass: activityType,
1362
+ activityData: data,
1363
+ onDone: deferred.resolve,
1364
+ onCancel: deferred.reject
1365
+ };
1366
+ this.activityTabs.push(context);
1367
+ this.tabs.selectedIndex = this.activityTabs.length;
1368
+ return deferred.promise.finally((/**
1369
+ * @return {?}
1370
+ */
1371
+ function () {
1372
+ _this.obsoleteTabs.push(context);
1373
+ _this.tabs.selectedIndex = _this.activityTabs.length - 1;
1374
+ }));
1375
+ };
1376
+ /**
1377
+ * @param {?} alert
1378
+ * @return {?}
1379
+ */
1380
+ ActivityContainerComponent.prototype.alert = /**
1381
+ * @param {?} alert
1382
+ * @return {?}
1383
+ */
1384
+ function (alert) {
1385
+ return this.startActivity(AlertDialogComponent, alert);
1386
+ };
1387
+ /**
1388
+ * @param {?} confirm
1389
+ * @return {?}
1390
+ */
1391
+ ActivityContainerComponent.prototype.confirm = /**
1392
+ * @param {?} confirm
1393
+ * @return {?}
1394
+ */
1395
+ function (confirm) {
1396
+ return this.startActivity(ConfirmationDialogComponent, confirm);
1397
+ };
1398
+ /**
1399
+ * @private
1400
+ * @return {?}
1401
+ */
1402
+ ActivityContainerComponent.prototype.cleanUpTabs = /**
1403
+ * @private
1404
+ * @return {?}
1405
+ */
1406
+ function () {
1407
+ var _this = this;
1408
+ this.activityTabs.value = this.activityTabs.value.filter((/**
1409
+ * @param {?} tab
1410
+ * @return {?}
1411
+ */
1412
+ function (tab) {
1413
+ return !_this.obsoleteTabs.includes(tab);
1414
+ }));
1415
+ };
1416
+ ActivityContainerComponent.decorators = [
1417
+ { type: core.Component, args: [{
1418
+ selector: 'angular-ui-powerups-activity-container',
1419
+ template: "<mat-tab-group #tabs no-tab-header [dynamicHeight]=\"true\">\n <mat-tab>\n <angular-ui-powerups-activity-outlet [interactionContext]=\"this\" [activityContext]=\"initialActivity\"></angular-ui-powerups-activity-outlet>\n </mat-tab>\n <mat-tab *ngFor=\"let tab of activityTabs.value\">\n <angular-ui-powerups-activity-outlet [interactionContext]=\"this\" [activityContext]=\"tab\"></angular-ui-powerups-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n",
1420
+ styles: [":host{display:block}"]
1421
+ }] }
1422
+ ];
1423
+ /** @nocollapse */
1424
+ ActivityContainerComponent.ctorParameters = function () { return []; };
1425
+ ActivityContainerComponent.propDecorators = {
1426
+ parentInteractionContext: [{ type: core.Input }],
1427
+ initialActivity: [{ type: core.Input }],
1428
+ tabs: [{ type: core.ViewChild, args: ['tabs', { static: true },] }]
1429
+ };
1430
+ return ActivityContainerComponent;
1431
+ }(DisposableComponent));
1432
+ if (false) {
1433
+ /** @type {?} */
1434
+ exports.ɵq.prototype.parentInteractionContext;
1435
+ /** @type {?} */
1436
+ exports.ɵq.prototype.initialActivity;
1437
+ /** @type {?} */
1438
+ exports.ɵq.prototype.tabs;
1439
+ /** @type {?} */
1440
+ exports.ɵq.prototype.activityTabs;
1441
+ /**
1442
+ * @type {?}
1443
+ * @private
1444
+ */
1445
+ exports.ɵq.prototype.obsoleteTabs;
1446
+ }
1447
+ (function (ActivityContainerComponent) {
1448
+ /**
1449
+ * @record
1450
+ * @template D, R, E
1451
+ */
1452
+ function ActivityContext() { }
1453
+ ActivityContainerComponent.ActivityContext = ActivityContext;
1454
+ if (false) {
1455
+ /** @type {?} */
1456
+ ActivityContext.prototype.activityClass;
1457
+ /** @type {?} */
1458
+ ActivityContext.prototype.activityData;
1459
+ /** @type {?} */
1460
+ ActivityContext.prototype.onDone;
1461
+ /** @type {?} */
1462
+ ActivityContext.prototype.onCancel;
1463
+ }
1464
+ })(exports.ɵq || (exports.ɵq = {}));
1465
+
1466
+ /**
1467
+ * @fileoverview added by tsickle
1468
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1469
+ */
1470
+ /**
1471
+ * @template D, R, E
1472
+ */
1473
+ exports.ɵx = /** @class */ (function () {
1474
+ function ActivityOutletComponent(componentFactoryResolver, viewContainerRef, injector) {
1475
+ this.componentFactoryResolver = componentFactoryResolver;
1476
+ this.viewContainerRef = viewContainerRef;
1477
+ this.injector = injector;
1478
+ }
1479
+ Object.defineProperty(ActivityOutletComponent.prototype, "activityContext", {
1480
+ set: /**
1481
+ * @param {?} activityContext
1482
+ * @return {?}
1483
+ */
1484
+ function (activityContext) {
1485
+ this.loadActivity(activityContext);
1486
+ },
1487
+ enumerable: true,
1488
+ configurable: true
1489
+ });
1490
+ ;
1491
+ /**
1492
+ * @return {?}
1493
+ */
1494
+ ActivityOutletComponent.prototype.ngOnInit = /**
1495
+ * @return {?}
1496
+ */
1497
+ function () {
1498
+ };
1499
+ /**
1500
+ * @param {?} activityContext
1501
+ * @return {?}
1502
+ */
1503
+ ActivityOutletComponent.prototype.loadActivity = /**
1504
+ * @param {?} activityContext
1505
+ * @return {?}
1506
+ */
1507
+ function (activityContext) {
1508
+ /** @type {?} */
1509
+ var injector = core.Injector.create({
1510
+ providers: [
1511
+ {
1512
+ provide: InteractionContext,
1513
+ useValue: this
1514
+ },
1515
+ { provide: ACTIVITY_DATA, useValue: activityContext.activityData }
1516
+ ],
1517
+ parent: this.injector
1518
+ });
1519
+ /** @type {?} */
1520
+ var componentFactory = this.componentFactoryResolver.resolveComponentFactory(activityContext.activityClass);
1521
+ this.viewContainerRef.clear();
1522
+ this.activityComponent = this.viewContainerRef.createComponent(componentFactory, 0, injector);
1523
+ this.activityComponent.instance.onDone(activityContext.onDone);
1524
+ this.activityComponent.instance.onCancel(activityContext.onCancel);
1525
+ };
1526
+ /**
1527
+ * @param {?} alert
1528
+ * @return {?}
1529
+ */
1530
+ ActivityOutletComponent.prototype.alert = /**
1531
+ * @param {?} alert
1532
+ * @return {?}
1533
+ */
1534
+ function (alert) {
1535
+ return this.interactionContext.alert(alert);
1536
+ };
1537
+ /**
1538
+ * @param {?} confirm
1539
+ * @return {?}
1540
+ */
1541
+ ActivityOutletComponent.prototype.confirm = /**
1542
+ * @param {?} confirm
1543
+ * @return {?}
1544
+ */
1545
+ function (confirm) {
1546
+ return this.interactionContext.confirm(confirm);
1547
+ };
1548
+ /**
1549
+ * @template D1, R1, E1
1550
+ * @param {?} activityType
1551
+ * @param {?=} data
1552
+ * @return {?}
1553
+ */
1554
+ ActivityOutletComponent.prototype.startActivity = /**
1555
+ * @template D1, R1, E1
1556
+ * @param {?} activityType
1557
+ * @param {?=} data
1558
+ * @return {?}
1559
+ */
1560
+ function (activityType, data) {
1561
+ return this.interactionContext.startActivity(activityType, data);
1562
+ };
1563
+ ActivityOutletComponent.decorators = [
1564
+ { type: core.Component, args: [{
1565
+ selector: 'angular-ui-powerups-activity-outlet',
1566
+ template: '',
1567
+ styles: [":host{display:block}"]
1568
+ }] }
1569
+ ];
1570
+ /** @nocollapse */
1571
+ ActivityOutletComponent.ctorParameters = function () { return [
1572
+ { type: core.ComponentFactoryResolver },
1573
+ { type: core.ViewContainerRef },
1574
+ { type: core.Injector }
1575
+ ]; };
1576
+ ActivityOutletComponent.propDecorators = {
1577
+ interactionContext: [{ type: core.Input }],
1578
+ activityContext: [{ type: core.Input }]
1579
+ };
1580
+ return ActivityOutletComponent;
1581
+ }());
1582
+ if (false) {
1583
+ /** @type {?} */
1584
+ exports.ɵx.prototype.interactionContext;
1585
+ /**
1586
+ * @type {?}
1587
+ * @private
1588
+ */
1589
+ exports.ɵx.prototype.activityComponent;
1590
+ /**
1591
+ * @type {?}
1592
+ * @private
1593
+ */
1594
+ exports.ɵx.prototype.componentFactoryResolver;
1595
+ /**
1596
+ * @type {?}
1597
+ * @private
1598
+ */
1599
+ exports.ɵx.prototype.viewContainerRef;
1600
+ /**
1601
+ * @type {?}
1602
+ * @private
1603
+ */
1604
+ exports.ɵx.prototype.injector;
1605
+ /* Skipping unhandled member: ;*/
1606
+ }
1607
+ (function (ActivityOutletComponent) {
1608
+ /**
1609
+ * @template D, R, E
1610
+ */
1611
+ var /**
1612
+ * @template D, R, E
1613
+ */
1614
+ OutletInteractionContext = /** @class */ (function () {
1615
+ function OutletInteractionContext(context) {
1616
+ this.context = context;
1617
+ }
1618
+ /**
1619
+ * @param {?} alert
1620
+ * @return {?}
1621
+ */
1622
+ OutletInteractionContext.prototype.alert = /**
1623
+ * @param {?} alert
1624
+ * @return {?}
1625
+ */
1626
+ function (alert) {
1627
+ return pectin.lang.notImplemented();
1628
+ };
1629
+ /**
1630
+ * @param {?} confirm
1631
+ * @return {?}
1632
+ */
1633
+ OutletInteractionContext.prototype.confirm = /**
1634
+ * @param {?} confirm
1635
+ * @return {?}
1636
+ */
1637
+ function (confirm) {
1638
+ return pectin.lang.notImplemented();
1639
+ };
1640
+ /**
1641
+ * @template D1, R1, E1
1642
+ * @param {?} activityType
1643
+ * @param {?=} data
1644
+ * @return {?}
1645
+ */
1646
+ OutletInteractionContext.prototype.startActivity = /**
1647
+ * @template D1, R1, E1
1648
+ * @param {?} activityType
1649
+ * @param {?=} data
1650
+ * @return {?}
1651
+ */
1652
+ function (activityType, data) {
1653
+ return pectin.lang.notImplemented();
1654
+ };
1655
+ return OutletInteractionContext;
1656
+ }());
1657
+ ActivityOutletComponent.OutletInteractionContext = OutletInteractionContext;
1658
+ if (false) {
1659
+ /**
1660
+ * @type {?}
1661
+ * @private
1662
+ */
1663
+ OutletInteractionContext.prototype.context;
1664
+ }
1665
+ })(exports.ɵx || (exports.ɵx = {}));
1666
+
1667
+ /**
1668
+ * @fileoverview added by tsickle
1669
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1670
+ */
1671
+ var DialogInteractionService = /** @class */ (function (_super) {
1672
+ __extends(DialogInteractionService, _super);
1673
+ function DialogInteractionService(dialogService) {
1674
+ var _this = _super.call(this) || this;
1675
+ _this.dialogService = dialogService;
1676
+ typescriptUtilities.assert.notNil(dialogService);
1677
+ return _this;
1678
+ }
1679
+ /**
1680
+ * @template D, R, E
1681
+ * @param {?} activityType
1682
+ * @param {?=} data
1683
+ * @return {?}
1684
+ */
1685
+ DialogInteractionService.prototype.startActivity = /**
1686
+ * @template D, R, E
1687
+ * @param {?} activityType
1688
+ * @param {?=} data
1689
+ * @return {?}
1690
+ */
1691
+ function (activityType, data) {
1692
+ return this._startActivity(activityType, data);
1693
+ };
1694
+ /**
1695
+ * @private
1696
+ * @template D, R, E
1697
+ * @param {?} activityType
1698
+ * @param {?} data
1699
+ * @param {?=} disableClose
1700
+ * @return {?}
1701
+ */
1702
+ DialogInteractionService.prototype._startActivity = /**
1703
+ * @private
1704
+ * @template D, R, E
1705
+ * @param {?} activityType
1706
+ * @param {?} data
1707
+ * @param {?=} disableClose
1708
+ * @return {?}
1709
+ */
1710
+ function (activityType, data, disableClose) {
1711
+ var _this = this;
1712
+ if (disableClose === void 0) { disableClose = true; }
1713
+ /** @type {?} */
1714
+ var config = {
1715
+ data: data,
1716
+ disableClose: disableClose,
1717
+ panelClass: 'dialog-interaction-service',
1718
+ autoFocus: false
1719
+ };
1720
+ /** @type {?} */
1721
+ var matDialogRef = (/** @type {?} */ (this.dialogService.open(exports.ɵq, config)));
1722
+ return new Promise((/**
1723
+ * @param {?} resolve
1724
+ * @param {?} reject
1725
+ * @return {?}
1726
+ */
1727
+ function (resolve, reject) {
1728
+ /** @type {?} */
1729
+ var activityContainer = matDialogRef.componentInstance;
1730
+ activityContainer.parentInteractionContext = _this;
1731
+ activityContainer.initialise({
1732
+ activityClass: activityType,
1733
+ activityData: data,
1734
+ onDone: /**
1735
+ * @param {?} result
1736
+ * @return {?}
1737
+ */
1738
+ function (result) {
1739
+ resolve(result);
1740
+ matDialogRef.close(result);
1741
+ },
1742
+ onCancel: /**
1743
+ * @param {?} error
1744
+ * @return {?}
1745
+ */
1746
+ function (error) {
1747
+ reject(error);
1748
+ matDialogRef.close(error);
1749
+ }
1750
+ });
1751
+ matDialogRef.updateSize();
1752
+ }));
1753
+ };
1754
+ /**
1755
+ * @param {?} alert
1756
+ * @return {?}
1757
+ */
1758
+ DialogInteractionService.prototype.alert = /**
1759
+ * @param {?} alert
1760
+ * @return {?}
1761
+ */
1762
+ function (alert) {
1763
+ return this._startActivity(AlertDialogComponent, alert, false);
1764
+ };
1765
+ /**
1766
+ * @param {?} confirm
1767
+ * @return {?}
1768
+ */
1769
+ DialogInteractionService.prototype.confirm = /**
1770
+ * @param {?} confirm
1771
+ * @return {?}
1772
+ */
1773
+ function (confirm) {
1774
+ return this._startActivity(ConfirmationDialogComponent, confirm, true);
1775
+ };
1776
+ DialogInteractionService.decorators = [
1777
+ { type: core.Injectable, args: [{
1778
+ providedIn: 'root'
1779
+ },] }
1780
+ ];
1781
+ /** @nocollapse */
1782
+ DialogInteractionService.ctorParameters = function () { return [
1783
+ { type: material.MatDialog }
1784
+ ]; };
1785
+ /** @nocollapse */ DialogInteractionService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function DialogInteractionService_Factory() { return new DialogInteractionService(core.ɵɵinject(dialog.MatDialog)); }, token: DialogInteractionService, providedIn: "root" });
1786
+ return DialogInteractionService;
1787
+ }(InteractionContext));
1788
+ if (false) {
1789
+ /**
1790
+ * @type {?}
1791
+ * @private
1792
+ */
1793
+ DialogInteractionService.prototype.dialogService;
1794
+ }
1795
+
1796
+ /**
1797
+ * @fileoverview added by tsickle
1798
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1799
+ */
1800
+ var InteractionModule = /** @class */ (function () {
1801
+ function InteractionModule() {
1802
+ }
1803
+ InteractionModule.decorators = [
1804
+ { type: core.NgModule, args: [{
1805
+ imports: [
1806
+ common.CommonModule,
1807
+ material.MatButtonModule,
1808
+ material.MatDialogModule,
1809
+ material.MatTabsModule,
1810
+ portal.PortalModule
1811
+ ],
1812
+ declarations: [
1813
+ exports.ɵq,
1814
+ ConfirmationDialogComponent,
1815
+ AlertDialogComponent,
1816
+ exports.ɵx
1817
+ ],
1818
+ entryComponents: [
1819
+ exports.ɵq,
1820
+ ConfirmationDialogComponent,
1821
+ AlertDialogComponent
1822
+ ],
1823
+ providers: [
1824
+ DialogInteractionService
1825
+ ]
1826
+ },] }
1827
+ ];
1828
+ return InteractionModule;
1829
+ }());
1830
+
1831
+ /**
1832
+ * @fileoverview added by tsickle
1833
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1834
+ */
1835
+ var BusyOverlayComponent = /** @class */ (function () {
1836
+ function BusyOverlayComponent() {
1837
+ }
1838
+ /**
1839
+ * @return {?}
1840
+ */
1841
+ BusyOverlayComponent.prototype.ngOnInit = /**
1842
+ * @return {?}
1843
+ */
1844
+ function () {
1845
+ };
1846
+ BusyOverlayComponent.decorators = [
1847
+ { type: core.Component, args: [{
1848
+ selector: 'angular-ui-powerups-busy-overlay',
1849
+ template: "<ng-content></ng-content>\n<div class=\"busy-overlay-backdrop\" *ngIf=\"busyModel.value\">\n <mat-progress-spinner mode=\"indeterminate\" [diameter]=\"52\"></mat-progress-spinner>\n</div>\n",
1850
+ styles: [":host{position:relative}div.busy-overlay-backdrop{position:absolute;background-color:rgba(0,0,0,.2);top:0;left:0;bottom:0;right:0;display:-ms-grid;display:grid;-ms-grid-columns:auto;grid-template-columns:auto;-ms-grid-rows:auto;grid-template-rows:auto;place-content:center}"]
1851
+ }] }
1852
+ ];
1853
+ /** @nocollapse */
1854
+ BusyOverlayComponent.ctorParameters = function () { return []; };
1855
+ BusyOverlayComponent.propDecorators = {
1856
+ busyModel: [{ type: core.Input }],
1857
+ busy: [{ type: core.Input }]
1858
+ };
1859
+ __decorate([
1860
+ pectin.UseDelegate(),
1861
+ __metadata("design:type", pectin.ValueModel)
1862
+ ], BusyOverlayComponent.prototype, "busyModel", void 0);
1863
+ __decorate([
1864
+ pectin.StoreInValueModel('busyModel'),
1865
+ __metadata("design:type", Boolean)
1866
+ ], BusyOverlayComponent.prototype, "busy", void 0);
1867
+ return BusyOverlayComponent;
1868
+ }());
1869
+ if (false) {
1870
+ /** @type {?} */
1871
+ BusyOverlayComponent.prototype.busyModel;
1872
+ /** @type {?} */
1873
+ BusyOverlayComponent.prototype.busy;
1874
+ }
1875
+
1876
+ /**
1877
+ * @fileoverview added by tsickle
1878
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1879
+ */
1880
+ var EmptyStateComponent = /** @class */ (function () {
1881
+ function EmptyStateComponent() {
1882
+ }
1883
+ /**
1884
+ * @return {?}
1885
+ */
1886
+ EmptyStateComponent.prototype.ngOnInit = /**
1887
+ * @return {?}
1888
+ */
1889
+ function () {
1890
+ };
1891
+ EmptyStateComponent.decorators = [
1892
+ { type: core.Component, args: [{
1893
+ selector: 'angular-ui-powerups-empty-state',
1894
+ template: "\n <div class=\"container\">\n <ng-content></ng-content>\n </div>\n ",
1895
+ styles: [":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{padding:var(--angular-ui-powerups-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]
1896
+ }] }
1897
+ ];
1898
+ /** @nocollapse */
1899
+ EmptyStateComponent.ctorParameters = function () { return []; };
1900
+ return EmptyStateComponent;
1901
+ }());
1902
+
1903
+ /**
1904
+ * @fileoverview added by tsickle
1905
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1906
+ */
1907
+ var PlaceService = /** @class */ (function () {
1908
+ function PlaceService() {
1909
+ this._activePlaces = new pectin.MutableListModel();
1910
+ }
1911
+ Object.defineProperty(PlaceService.prototype, "activePlaces", {
1912
+ get: /**
1913
+ * @return {?}
1914
+ */
1915
+ function () {
1916
+ return this._activePlaces.readonly;
1917
+ },
1918
+ enumerable: true,
1919
+ configurable: true
1920
+ });
1921
+ /**
1922
+ * @param {?} place
1923
+ * @return {?}
1924
+ */
1925
+ PlaceService.prototype.onActivate = /**
1926
+ * @param {?} place
1927
+ * @return {?}
1928
+ */
1929
+ function (place) {
1930
+ this._activePlaces.push(place);
1931
+ };
1932
+ /**
1933
+ * @param {?} place
1934
+ * @return {?}
1935
+ */
1936
+ PlaceService.prototype.onDeactivate = /**
1937
+ * @param {?} place
1938
+ * @return {?}
1939
+ */
1940
+ function (place) {
1941
+ this._activePlaces.remove(place);
1942
+ };
1943
+ PlaceService.decorators = [
1944
+ { type: core.Injectable, args: [{
1945
+ providedIn: 'root'
1946
+ },] }
1947
+ ];
1948
+ /** @nocollapse */
1949
+ PlaceService.ctorParameters = function () { return []; };
1950
+ /** @nocollapse */ PlaceService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function PlaceService_Factory() { return new PlaceService(); }, token: PlaceService, providedIn: "root" });
1951
+ __decorate([
1952
+ pectin.Trace(),
1953
+ __metadata("design:type", Function),
1954
+ __metadata("design:paramtypes", [Object]),
1955
+ __metadata("design:returntype", void 0)
1956
+ ], PlaceService.prototype, "onActivate", null);
1957
+ __decorate([
1958
+ pectin.Trace(),
1959
+ __metadata("design:type", Function),
1960
+ __metadata("design:paramtypes", [Object]),
1961
+ __metadata("design:returntype", void 0)
1962
+ ], PlaceService.prototype, "onDeactivate", null);
1963
+ return PlaceService;
1964
+ }());
1965
+ if (false) {
1966
+ /**
1967
+ * @type {?}
1968
+ * @private
1969
+ */
1970
+ PlaceService.prototype._activePlaces;
1971
+ }
1972
+
1973
+ /**
1974
+ * @fileoverview added by tsickle
1975
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1976
+ */
1977
+ /** @type {?} */
1978
+ var left = [
1979
+ animations$1.query(':enter, :leave', animations$1.style({ position: 'fixed', width: '100%' }), { optional: true }),
1980
+ animations$1.group([
1981
+ animations$1.query(':enter', [animations$1.style({ transform: 'translateX(-100%)' }), animations$1.animate('.3s ease-out', animations$1.style({ transform: 'translateX(0%)' }))], {
1982
+ optional: true,
1983
+ }),
1984
+ animations$1.query(':leave', [animations$1.style({ transform: 'translateX(0%)' }), animations$1.animate('.3s ease-out', animations$1.style({ transform: 'translateX(100%)' }))], {
1985
+ optional: true,
1986
+ }),
1987
+ ]),
1988
+ ];
1989
+ /** @type {?} */
1990
+ var right = [
1991
+ animations$1.query(':enter, :leave', animations$1.style({ position: 'fixed', width: '100%' }), { optional: true }),
1992
+ animations$1.group([
1993
+ animations$1.query(':enter', [animations$1.style({ transform: 'translateX(100%)' }), animations$1.animate('.3s ease-out', animations$1.style({ transform: 'translateX(0%)' }))], {
1994
+ optional: true,
1995
+ }),
1996
+ animations$1.query(':leave', [animations$1.style({ transform: 'translateX(0%)' }), animations$1.animate('.3s ease-out', animations$1.style({ transform: 'translateX(-100%)' }))], {
1997
+ optional: true,
1998
+ }),
1999
+ ]),
2000
+ ];
2001
+ /** @type {?} */
2002
+ var LEFT_RIGHT_PLACE_ANIMATION = animations$1.trigger('routeAnimations', [
2003
+ animations$1.transition(':increment', right),
2004
+ animations$1.transition(':decrement', left),
2005
+ ]);
2006
+
2007
+ /**
2008
+ * @fileoverview added by tsickle
2009
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2010
+ */
2011
+ var PlaceOutletComponent = /** @class */ (function () {
2012
+ function PlaceOutletComponent(placeService) {
2013
+ this.placeService = placeService;
2014
+ this.animate = true;
2015
+ }
2016
+ /**
2017
+ * @return {?}
2018
+ */
2019
+ PlaceOutletComponent.prototype.ngOnInit = /**
2020
+ * @return {?}
2021
+ */
2022
+ function () {
2023
+ };
2024
+ /**
2025
+ * @param {?} $event
2026
+ * @return {?}
2027
+ */
2028
+ PlaceOutletComponent.prototype.onActivate = /**
2029
+ * @param {?} $event
2030
+ * @return {?}
2031
+ */
2032
+ function ($event) {
2033
+ this.placeService.onActivate($event);
2034
+ };
2035
+ /**
2036
+ * @param {?} $event
2037
+ * @return {?}
2038
+ */
2039
+ PlaceOutletComponent.prototype.onDeactivate = /**
2040
+ * @param {?} $event
2041
+ * @return {?}
2042
+ */
2043
+ function ($event) {
2044
+ this.placeService.onDeactivate($event);
2045
+ };
2046
+ /**
2047
+ * @param {?} outlet
2048
+ * @return {?}
2049
+ */
2050
+ PlaceOutletComponent.prototype.getPlaceOrder = /**
2051
+ * @param {?} outlet
2052
+ * @return {?}
2053
+ */
2054
+ function (outlet) {
2055
+ return this.animate && outlet && outlet.activatedRouteData && outlet.activatedRouteData['placeOrder'];
2056
+ };
2057
+ PlaceOutletComponent.decorators = [
2058
+ { type: core.Component, args: [{
2059
+ selector: 'angular-ui-powerups-place-outlet',
2060
+ template: "<div container [@routeAnimations]=\"getPlaceOrder(routerOutlet)\">\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onActivate($event)\"\n (deactivate)=\"onDeactivate($event)\">\n </router-outlet>\n</div>\n\n",
2061
+ animations: [LEFT_RIGHT_PLACE_ANIMATION],
2062
+ styles: [":host{display:flex;flex-direction:column;min-height:0}[container]{flex:1;display:-ms-grid;display:grid;-ms-grid-rows:0 1fr;grid-template-rows:0 1fr;min-height:0}"]
2063
+ }] }
2064
+ ];
2065
+ /** @nocollapse */
2066
+ PlaceOutletComponent.ctorParameters = function () { return [
2067
+ { type: PlaceService }
2068
+ ]; };
2069
+ PlaceOutletComponent.propDecorators = {
2070
+ animate: [{ type: core.Input }]
2071
+ };
2072
+ return PlaceOutletComponent;
2073
+ }());
2074
+ if (false) {
2075
+ /** @type {?} */
2076
+ PlaceOutletComponent.prototype.animate;
2077
+ /**
2078
+ * @type {?}
2079
+ * @private
2080
+ */
2081
+ PlaceOutletComponent.prototype.placeService;
2082
+ }
2083
+
2084
+ /**
2085
+ * @fileoverview added by tsickle
2086
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2087
+ */
2088
+ var TabbedPlaceNavigationComponent = /** @class */ (function (_super) {
2089
+ __extends(TabbedPlaceNavigationComponent, _super);
2090
+ function TabbedPlaceNavigationComponent() {
2091
+ var _this = _super.call(this) || this;
2092
+ var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
2093
+ _this.orderedPlaces = chain(_this.placesModel).sortBy('order');
2094
+ return _this;
2095
+ }
2096
+ /**
2097
+ * @return {?}
2098
+ */
2099
+ TabbedPlaceNavigationComponent.prototype.ngOnInit = /**
2100
+ * @return {?}
2101
+ */
2102
+ function () {
2103
+ };
2104
+ TabbedPlaceNavigationComponent.decorators = [
2105
+ { type: core.Component, args: [{
2106
+ selector: 'angular-ui-powerups-tabbed-place-navigation',
2107
+ template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let placeDescriptor of orderedPlaces.value\" [routerLink]='placeDescriptor.path'\n routerLinkActive #rla=\"routerLinkActive\"\n [active]=\"rla.isActive\"\n [matTooltip]=\"placeDescriptor.title\">{{placeDescriptor.title}}</a>\n</nav>\n\n",
2108
+ styles: [""]
2109
+ }] }
2110
+ ];
2111
+ /** @nocollapse */
2112
+ TabbedPlaceNavigationComponent.ctorParameters = function () { return []; };
2113
+ TabbedPlaceNavigationComponent.propDecorators = {
2114
+ places: [{ type: core.Input }],
2115
+ placesModel: [{ type: core.Input }]
2116
+ };
2117
+ __decorate([
2118
+ pectin.StoreInListModel('placesModel'),
2119
+ __metadata("design:type", Array)
2120
+ ], TabbedPlaceNavigationComponent.prototype, "places", void 0);
2121
+ __decorate([
2122
+ pectin.UseDelegate(),
2123
+ __metadata("design:type", pectin.ListModel)
2124
+ ], TabbedPlaceNavigationComponent.prototype, "placesModel", void 0);
2125
+ return TabbedPlaceNavigationComponent;
2126
+ }(DisposableComponent));
2127
+ if (false) {
2128
+ /** @type {?} */
2129
+ TabbedPlaceNavigationComponent.prototype.places;
2130
+ /** @type {?} */
2131
+ TabbedPlaceNavigationComponent.prototype.placesModel;
2132
+ /** @type {?} */
2133
+ TabbedPlaceNavigationComponent.prototype.orderedPlaces;
2134
+ }
2135
+
2136
+ /**
2137
+ * @fileoverview added by tsickle
2138
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2139
+ */
2140
+ var PlaceModule = /** @class */ (function () {
2141
+ function PlaceModule() {
2142
+ }
2143
+ PlaceModule.decorators = [
2144
+ { type: core.NgModule, args: [{
2145
+ imports: [
2146
+ common.CommonModule,
2147
+ animations.BrowserAnimationsModule,
2148
+ material.MatProgressSpinnerModule,
2149
+ router.RouterModule,
2150
+ tabs.MatTabsModule,
2151
+ list.MatListModule,
2152
+ tooltip.MatTooltipModule
2153
+ ],
2154
+ declarations: [
2155
+ EmptyStateComponent,
2156
+ BusyOverlayComponent,
2157
+ PlaceOutletComponent,
2158
+ TabbedPlaceNavigationComponent
2159
+ ],
2160
+ entryComponents: [BusyOverlayComponent],
2161
+ exports: [
2162
+ BusyOverlayComponent,
2163
+ PlaceOutletComponent,
2164
+ EmptyStateComponent,
2165
+ TabbedPlaceNavigationComponent
2166
+ ],
2167
+ providers: [
2168
+ PlaceService
2169
+ ]
2170
+ },] }
2171
+ ];
2172
+ return PlaceModule;
2173
+ }());
2174
+
2175
+ /**
2176
+ * @fileoverview added by tsickle
2177
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2178
+ */
2179
+ var AngularUiPowerupsModule = /** @class */ (function () {
2180
+ function AngularUiPowerupsModule() {
2181
+ }
2182
+ AngularUiPowerupsModule.decorators = [
2183
+ { type: core.NgModule, args: [{
2184
+ declarations: [
2185
+ CommandDirective,
2186
+ FocusBindingDirective,
2187
+ NumberInputComponent,
2188
+ StringInputComponent,
2189
+ PasswordInputComponent,
2190
+ SelectInputComponent,
2191
+ ],
2192
+ imports: [
2193
+ common.CommonModule,
2194
+ platformBrowser.BrowserModule,
2195
+ animations.BrowserAnimationsModule,
2196
+ forms.FormsModule,
2197
+ material.MatInputModule,
2198
+ material.MatFormFieldModule,
2199
+ material.MatSelectModule,
2200
+ PlaceModule,
2201
+ InteractionModule
2202
+ ],
2203
+ exports: [
2204
+ CommandDirective,
2205
+ FocusBindingDirective,
2206
+ NumberInputComponent,
2207
+ StringInputComponent,
2208
+ PasswordInputComponent,
2209
+ SelectInputComponent,
2210
+ InteractionModule,
2211
+ PlaceModule,
2212
+ ]
2213
+ },] }
2214
+ ];
2215
+ return AngularUiPowerupsModule;
2216
+ }());
2217
+
2218
+ /**
2219
+ * @fileoverview added by tsickle
2220
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2221
+ */
2222
+ /** @type {?} */
2223
+ var defaultHiddenStyleDef = animations$1.style({
2224
+ opacity: 0,
2225
+ 'height': '0',
2226
+ paddingTop: '0',
2227
+ paddingBottom: '0'
2228
+ });
2229
+ /**
2230
+ * @param {?} triggerName
2231
+ * @param {?=} options
2232
+ * @return {?}
2233
+ */
2234
+ function slideDownAndUpAnimation(triggerName, options) {
2235
+ // SEE to fix this: https://github.com/angular/angular/issues/15587#issuecomment-351510501
2236
+ /** @type {?} */
2237
+ var duration = pectin.OptionsHelper.get(options).getOptional('duration', '100ms');
2238
+ /** @type {?} */
2239
+ var hiddenStyleDef = pectin.OptionsHelper.get(options).getOptional('hiddenStyleDef', defaultHiddenStyleDef);
2240
+ return animations$1.trigger(triggerName, [
2241
+ animations$1.transition(':enter', [hiddenStyleDef, animations$1.animate('100ms')]),
2242
+ animations$1.transition(':leave', [animations$1.animate('100ms', hiddenStyleDef)])
2243
+ ]);
2244
+ }
2245
+
2246
+ /**
2247
+ * @fileoverview added by tsickle
2248
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2249
+ */
2250
+
2251
+ /**
2252
+ * @fileoverview added by tsickle
2253
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2254
+ */
2255
+ var Dimension = /** @class */ (function () {
2256
+ function Dimension(width, height) {
2257
+ this.width = width;
2258
+ this.height = height;
2259
+ }
2260
+ return Dimension;
2261
+ }());
2262
+ if (false) {
2263
+ /** @type {?} */
2264
+ Dimension.prototype.width;
2265
+ /** @type {?} */
2266
+ Dimension.prototype.height;
2267
+ }
2268
+
2269
+ /**
2270
+ * @fileoverview added by tsickle
2271
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2272
+ */
2273
+ var Point = /** @class */ (function () {
2274
+ function Point(x, y) {
2275
+ this.x = x;
2276
+ this.y = y;
2277
+ }
2278
+ /**
2279
+ * @param {?} data
2280
+ * @return {?}
2281
+ */
2282
+ Point.from = /**
2283
+ * @param {?} data
2284
+ * @return {?}
2285
+ */
2286
+ function (data) {
2287
+ return new Point(data.x, data.y);
2288
+ };
2289
+ /**
2290
+ * @param {?} x
2291
+ * @param {?} y
2292
+ * @return {?}
2293
+ */
2294
+ Point.prototype.translate = /**
2295
+ * @param {?} x
2296
+ * @param {?} y
2297
+ * @return {?}
2298
+ */
2299
+ function (x, y) {
2300
+ return new Point(this.x + x, this.y + y);
2301
+ };
2302
+ return Point;
2303
+ }());
2304
+ if (false) {
2305
+ /** @type {?} */
2306
+ Point.prototype.x;
2307
+ /** @type {?} */
2308
+ Point.prototype.y;
2309
+ }
2310
+
2311
+ /**
2312
+ * @fileoverview added by tsickle
2313
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2314
+ */
2315
+ exports.Bounds = /** @class */ (function (_super) {
2316
+ __extends(Bounds, _super);
2317
+ function Bounds(top, left, width, height) {
2318
+ var _this = _super.call(this, width, height) || this;
2319
+ _this.top = top;
2320
+ _this.left = left;
2321
+ _this.width = width;
2322
+ _this.height = height;
2323
+ return _this;
2324
+ }
2325
+ /**
2326
+ * @param {?} point
2327
+ * @return {?}
2328
+ */
2329
+ Bounds.prototype.relativePositionOf = /**
2330
+ * @param {?} point
2331
+ * @return {?}
2332
+ */
2333
+ function (point) {
2334
+ if (point instanceof MouseEvent) {
2335
+ return new Point(point.clientX - this.left, point.clientY - this.top);
2336
+ }
2337
+ else {
2338
+ return new Point(point.x - this.left, point.y - this.top);
2339
+ }
2340
+ };
2341
+ return Bounds;
2342
+ }(Dimension));
2343
+ if (false) {
2344
+ /** @type {?} */
2345
+ exports.Bounds.prototype.top;
2346
+ /** @type {?} */
2347
+ exports.Bounds.prototype.left;
2348
+ /** @type {?} */
2349
+ exports.Bounds.prototype.width;
2350
+ /** @type {?} */
2351
+ exports.Bounds.prototype.height;
2352
+ }
2353
+ (function (Bounds) {
2354
+ /**
2355
+ * @param {?} element
2356
+ * @return {?}
2357
+ */
2358
+ function ofElement(element) {
2359
+ /** @type {?} */
2360
+ var rect = element.getBoundingClientRect();
2361
+ return new Bounds(rect.top, rect.left, rect.width, rect.height);
2362
+ }
2363
+ Bounds.ofElement = ofElement;
2364
+ })(exports.Bounds || (exports.Bounds = {}));
2365
+
2366
+ /**
2367
+ * @fileoverview added by tsickle
2368
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2369
+ */
2370
+ var ResizeAwareComponent = /** @class */ (function (_super) {
2371
+ __extends(ResizeAwareComponent, _super);
2372
+ function ResizeAwareComponent(elementRef, ngZone) {
2373
+ var _this = _super.call(this) || this;
2374
+ _this.elementRef = elementRef;
2375
+ _this.ngZone = ngZone;
2376
+ _this._boundsModel = new pectin.ValueHolder(new exports.Bounds(0, 0, 0, 0));
2377
+ return _this;
2378
+ }
2379
+ /**
2380
+ * @return {?}
2381
+ */
2382
+ ResizeAwareComponent.prototype.ngAfterViewInit = /**
2383
+ * @return {?}
2384
+ */
2385
+ function () {
2386
+ var _this = this;
2387
+ this.updateBounds();
2388
+ /** @type {?} */
2389
+ var element = this.elementRef.nativeElement;
2390
+ /** @type {?} */
2391
+ var ro = new ResizeObserver((/**
2392
+ * @param {?} entries
2393
+ * @param {?} observer
2394
+ * @return {?}
2395
+ */
2396
+ function (entries, observer) {
2397
+ _this.ngZone.run((/**
2398
+ * @return {?}
2399
+ */
2400
+ function () { return _this.updateBounds(); }));
2401
+ }));
2402
+ ro.observe(element);
2403
+ this.onDispose((/**
2404
+ * @return {?}
2405
+ */
2406
+ function () { return ro.disconnect(); }));
2407
+ };
2408
+ Object.defineProperty(ResizeAwareComponent.prototype, "boundsModel", {
2409
+ get: /**
2410
+ * @return {?}
2411
+ */
2412
+ function () {
2413
+ return this._boundsModel.readonly;
2414
+ },
2415
+ enumerable: true,
2416
+ configurable: true
2417
+ });
2418
+ Object.defineProperty(ResizeAwareComponent.prototype, "nativeElement", {
2419
+ get: /**
2420
+ * @return {?}
2421
+ */
2422
+ function () {
2423
+ return this.elementRef.nativeElement;
2424
+ },
2425
+ enumerable: true,
2426
+ configurable: true
2427
+ });
2428
+ // TODO: Make this handle body scroll
2429
+ // TODO: Make this handle body scroll
2430
+ /**
2431
+ * @param {?} point
2432
+ * @return {?}
2433
+ */
2434
+ ResizeAwareComponent.prototype.relativePositionOf =
2435
+ // TODO: Make this handle body scroll
2436
+ /**
2437
+ * @param {?} point
2438
+ * @return {?}
2439
+ */
2440
+ function (point) {
2441
+ return this.bounds.relativePositionOf(point);
2442
+ };
2443
+ Object.defineProperty(ResizeAwareComponent.prototype, "bounds", {
2444
+ get: /**
2445
+ * @return {?}
2446
+ */
2447
+ function () {
2448
+ return this._boundsModel.value;
2449
+ },
2450
+ enumerable: true,
2451
+ configurable: true
2452
+ });
2453
+ /**
2454
+ * @private
2455
+ * @return {?}
2456
+ */
2457
+ ResizeAwareComponent.prototype.updateBounds = /**
2458
+ * @private
2459
+ * @return {?}
2460
+ */
2461
+ function () {
2462
+ this._boundsModel.value = exports.Bounds.ofElement(this.nativeElement);
2463
+ };
2464
+ return ResizeAwareComponent;
2465
+ }(DisposableComponent));
2466
+ if (false) {
2467
+ /**
2468
+ * @type {?}
2469
+ * @private
2470
+ */
2471
+ ResizeAwareComponent.prototype._boundsModel;
2472
+ /**
2473
+ * @type {?}
2474
+ * @protected
2475
+ */
2476
+ ResizeAwareComponent.prototype.elementRef;
2477
+ /**
2478
+ * @type {?}
2479
+ * @protected
2480
+ */
2481
+ ResizeAwareComponent.prototype.ngZone;
2482
+ }
2483
+
2484
+ /**
2485
+ * @fileoverview added by tsickle
2486
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2487
+ */
2488
+
2489
+ /**
2490
+ * @fileoverview added by tsickle
2491
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2492
+ */
2493
+
2494
+ /**
2495
+ * @fileoverview added by tsickle
2496
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2497
+ */
2498
+ /**
2499
+ * @record
2500
+ */
2501
+ function Alert() { }
2502
+ if (false) {
2503
+ /**
2504
+ * @return {?}
2505
+ */
2506
+ Alert.prototype.title = function () { };
2507
+ /**
2508
+ * @return {?}
2509
+ */
2510
+ Alert.prototype.content = function () { };
2511
+ /**
2512
+ * @return {?}
2513
+ */
2514
+ Alert.prototype.ok = function () { };
2515
+ }
2516
+
2517
+ /**
2518
+ * @fileoverview added by tsickle
2519
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2520
+ */
2521
+ /**
2522
+ * @record
2523
+ */
2524
+ function Confirm() { }
2525
+ if (false) {
2526
+ /** @type {?|undefined} */
2527
+ Confirm.prototype.destructive;
2528
+ /**
2529
+ * @return {?}
2530
+ */
2531
+ Confirm.prototype.cancel = function () { };
2532
+ }
2533
+
2534
+ /**
2535
+ * @fileoverview added by tsickle
2536
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2537
+ */
2538
+ /**
2539
+ * @record
2540
+ * @template R, E
2541
+ */
2542
+ function Result() { }
2543
+ (function (Result) {
2544
+ /**
2545
+ * @record
2546
+ * @template R, E
2547
+ */
2548
+ function Callback() { }
2549
+ Result.Callback = Callback;
2550
+ if (false) {
2551
+ /** @type {?} */
2552
+ Callback.prototype.then;
2553
+ /** @type {?} */
2554
+ Callback.prototype.catch;
2555
+ }
2556
+ })(Result || (Result = {}));
2557
+
2558
+ /**
2559
+ * @fileoverview added by tsickle
2560
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2561
+ */
2562
+ /**
2563
+ * @record
2564
+ * @template D, R, E
2565
+ */
2566
+ function ActivityOutletContext() { }
2567
+ if (false) {
2568
+ /** @type {?} */
2569
+ ActivityOutletContext.prototype.interactionContext;
2570
+ /** @type {?} */
2571
+ ActivityOutletContext.prototype.activityClass;
2572
+ /** @type {?} */
2573
+ ActivityOutletContext.prototype.activityData;
2574
+ /** @type {?} */
2575
+ ActivityOutletContext.prototype.onDone;
2576
+ /** @type {?} */
2577
+ ActivityOutletContext.prototype.onCancel;
2578
+ }
2579
+
2580
+ /**
2581
+ * @fileoverview added by tsickle
2582
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2583
+ */
2584
+
2585
+ /**
2586
+ * @fileoverview added by tsickle
2587
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2588
+ */
2589
+ /**
2590
+ * @param {?} options
2591
+ * @return {?}
2592
+ */
2593
+ function Place(options) {
2594
+ return (/**
2595
+ * @param {?} target
2596
+ * @return {?}
2597
+ */
2598
+ function (target) {
2599
+ Reflect.defineMetadata('place.options', options, target);
2600
+ });
2601
+ }
2602
+ (function (Place) {
2603
+ /**
2604
+ * @record
2605
+ */
2606
+ function Options() { }
2607
+ Place.Options = Options;
2608
+ if (false) {
2609
+ /** @type {?} */
2610
+ Options.prototype.path;
2611
+ /** @type {?} */
2612
+ Options.prototype.title;
2613
+ /** @type {?} */
2614
+ Options.prototype.order;
2615
+ /** @type {?|undefined} */
2616
+ Options.prototype.authenticate;
2617
+ }
2618
+ var Descriptor = /** @class */ (function () {
2619
+ function Descriptor(placeClass, options) {
2620
+ pectin.assert.notNil(options);
2621
+ this.path = options.path;
2622
+ this.title = options.title;
2623
+ this.order = options.order;
2624
+ this.authenticate = lodash.isNil(options.authenticate) || options.authenticate;
2625
+ }
2626
+ return Descriptor;
2627
+ }());
2628
+ Place.Descriptor = Descriptor;
2629
+ if (false) {
2630
+ /** @type {?} */
2631
+ Descriptor.prototype.path;
2632
+ /** @type {?} */
2633
+ Descriptor.prototype.authenticate;
2634
+ /** @type {?} */
2635
+ Descriptor.prototype.title;
2636
+ /** @type {?} */
2637
+ Descriptor.prototype.order;
2638
+ }
2639
+ /**
2640
+ * @param {?} klass
2641
+ * @return {?}
2642
+ */
2643
+ function getDescriptor(klass) {
2644
+ /** @type {?} */
2645
+ var placeOptions = Reflect.getMetadata('place.options', klass);
2646
+ return new Descriptor(klass, placeOptions);
2647
+ }
2648
+ Place.getDescriptor = getDescriptor;
2649
+ })(Place || (Place = {}));
2650
+
2651
+ /**
2652
+ * @fileoverview added by tsickle
2653
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2654
+ */
2655
+ /**
2656
+ * @record
2657
+ * @template T
2658
+ */
2659
+ function ResolvedParameter() { }
2660
+ if (false) {
2661
+ /** @type {?} */
2662
+ ResolvedParameter.prototype.parameterDef;
2663
+ /** @type {?} */
2664
+ ResolvedParameter.prototype.resolvedValue;
2665
+ }
2666
+ var ResolvedParameters = /** @class */ (function () {
2667
+ function ResolvedParameters(parameters) {
2668
+ this.parameters = parameters;
2669
+ }
2670
+ /**
2671
+ * @template T
2672
+ * @param {?} parameter
2673
+ * @return {?}
2674
+ */
2675
+ ResolvedParameters.prototype.get = /**
2676
+ * @template T
2677
+ * @param {?} parameter
2678
+ * @return {?}
2679
+ */
2680
+ function (parameter) {
2681
+ /** @type {?} */
2682
+ var resolved = this.parameters.find((/**
2683
+ * @param {?} p
2684
+ * @return {?}
2685
+ */
2686
+ function (p) { return p.parameterDef === parameter; }));
2687
+ return resolved ? resolved.resolvedValue : null;
2688
+ };
2689
+ /**
2690
+ * @template T
2691
+ * @param {?} parameter
2692
+ * @param {?} value
2693
+ * @return {?}
2694
+ */
2695
+ ResolvedParameters.prototype.replace = /**
2696
+ * @template T
2697
+ * @param {?} parameter
2698
+ * @param {?} value
2699
+ * @return {?}
2700
+ */
2701
+ function (parameter, value) {
2702
+ return new ResolvedParameters(this.parameters.filter((/**
2703
+ * @param {?} p
2704
+ * @return {?}
2705
+ */
2706
+ function (p) { return p.parameterDef !== parameter; })).concat({
2707
+ parameterDef: parameter,
2708
+ resolvedValue: value
2709
+ }));
2710
+ };
2711
+ /**
2712
+ * @protected
2713
+ * @return {?}
2714
+ */
2715
+ ResolvedParameters.prototype.getFormattedRouteId = /**
2716
+ * @protected
2717
+ * @return {?}
2718
+ */
2719
+ function () {
2720
+ /** @type {?} */
2721
+ var routeIdParam = this.getRouteIdParam();
2722
+ return routeIdParam ? routeIdParam.parameterDef.type.format(routeIdParam.resolvedValue) : null;
2723
+ };
2724
+ /**
2725
+ * @private
2726
+ * @return {?}
2727
+ */
2728
+ ResolvedParameters.prototype.getRouteIdParam = /**
2729
+ * @private
2730
+ * @return {?}
2731
+ */
2732
+ function () {
2733
+ return this.parameters.find((/**
2734
+ * @param {?} p
2735
+ * @return {?}
2736
+ */
2737
+ function (p) { return p.parameterDef.isRouteId; }));
2738
+ };
2739
+ /**
2740
+ * @protected
2741
+ * @return {?}
2742
+ */
2743
+ ResolvedParameters.prototype.getFormattedParameters = /**
2744
+ * @protected
2745
+ * @return {?}
2746
+ */
2747
+ function () {
2748
+ /** @type {?} */
2749
+ var params = {};
2750
+ /** @type {?} */
2751
+ var routeIdParam = this.parameters.filter((/**
2752
+ * @param {?} p
2753
+ * @return {?}
2754
+ */
2755
+ function (p) { return !p.parameterDef.isRouteId; })).forEach((/**
2756
+ * @param {?} p
2757
+ * @return {?}
2758
+ */
2759
+ function (p) {
2760
+ params[p.parameterDef.name] = p.parameterDef.type.format(p.resolvedValue);
2761
+ }));
2762
+ return params;
2763
+ };
2764
+ /**
2765
+ * @return {?}
2766
+ */
2767
+ ResolvedParameters.prototype.hasRouteId = /**
2768
+ * @return {?}
2769
+ */
2770
+ function () {
2771
+ return !!this.getRouteIdParam();
2772
+ };
2773
+ /**
2774
+ * @param {?} previous
2775
+ * @param {?} router
2776
+ * @param {?} activatedRoute
2777
+ * @return {?}
2778
+ */
2779
+ ResolvedParameters.prototype.redirect = /**
2780
+ * @param {?} previous
2781
+ * @param {?} router
2782
+ * @param {?} activatedRoute
2783
+ * @return {?}
2784
+ */
2785
+ function (previous, router, activatedRoute) {
2786
+ /** @type {?} */
2787
+ var routeId = this.getFormattedRouteId();
2788
+ /** @type {?} */
2789
+ var relativePath = !!previous.hasRouteId() ? '..' : '.';
2790
+ /** @type {?} */
2791
+ var path = routeId ? [relativePath, routeId, this.getFormattedParameters()] : [relativePath, this.getFormattedParameters()];
2792
+ router.navigate(path, {
2793
+ relativeTo: activatedRoute
2794
+ });
2795
+ };
2796
+ __decorate([
2797
+ pectin.Trace(),
2798
+ __metadata("design:type", Function),
2799
+ __metadata("design:paramtypes", []),
2800
+ __metadata("design:returntype", void 0)
2801
+ ], ResolvedParameters.prototype, "getFormattedRouteId", null);
2802
+ __decorate([
2803
+ pectin.Trace(),
2804
+ __metadata("design:type", Function),
2805
+ __metadata("design:paramtypes", []),
2806
+ __metadata("design:returntype", void 0)
2807
+ ], ResolvedParameters.prototype, "getFormattedParameters", null);
2808
+ __decorate([
2809
+ pectin.Trace(),
2810
+ __metadata("design:type", Function),
2811
+ __metadata("design:paramtypes", [ResolvedParameters, router.Router, router.ActivatedRoute]),
2812
+ __metadata("design:returntype", void 0)
2813
+ ], ResolvedParameters.prototype, "redirect", null);
2814
+ return ResolvedParameters;
2815
+ }());
2816
+ if (false) {
2817
+ /** @type {?} */
2818
+ ResolvedParameters.prototype.parameters;
2819
+ }
2820
+ exports.RouteParameterBindings = /** @class */ (function (_super) {
2821
+ __extends(RouteParameterBindings, _super);
2822
+ function RouteParameterBindings(component, router, activatedRoute) {
2823
+ var _this = _super.call(this) || this;
2824
+ _this.component = component;
2825
+ _this.router = router;
2826
+ _this.activatedRoute = activatedRoute;
2827
+ _this._incomingRouteChange = new pectin.MutableValueModel(false);
2828
+ _this.resolvedParameters = new pectin.MutableValueModel();
2829
+ var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe;
2830
+ _this.txo = new pectin.TransactionObserver(); //.onEvent(e => console.log(e.toString()));
2831
+ //.onEvent(e => console.log(e.toString()));
2832
+ /** @type {?} */
2833
+ var routeParameterDefs = typescriptUtilities.Klass.get(component).getMetadataList(RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY);
2834
+ routeParameterDefs.forEach((/**
2835
+ * @param {?} parameter
2836
+ * @return {?}
2837
+ */
2838
+ function (parameter) { return _this.installBinding(parameter); }));
2839
+ /** @type {?} */
2840
+ var incomingResolvedRouteParameters = observe.valuesFrom(activatedRoute.paramMap)
2841
+ .last()
2842
+ .map((/**
2843
+ * @param {?} params
2844
+ * @return {?}
2845
+ */
2846
+ function (params) {
2847
+ /** @type {?} */
2848
+ var result = [];
2849
+ routeParameterDefs.forEach((/**
2850
+ * @param {?} parameterDef
2851
+ * @return {?}
2852
+ */
2853
+ function (parameterDef) {
2854
+ /** @type {?} */
2855
+ var resolvedValue;
2856
+ if (parameterDef.isArray) {
2857
+ resolvedValue = params.getAll(parameterDef.name).map((/**
2858
+ * @param {?} v
2859
+ * @return {?}
2860
+ */
2861
+ function (v) { return parameterDef.type.parse(v); }));
2862
+ }
2863
+ else {
2864
+ resolvedValue = parameterDef.type.parse(params.get(parameterDef.name));
2865
+ }
2866
+ result.push({ parameterDef: parameterDef, resolvedValue: resolvedValue });
2867
+ }));
2868
+ return new ResolvedParameters(result);
2869
+ }));
2870
+ incomingResolvedRouteParameters.subscribe((/**
2871
+ * @param {?} resolvedParameters
2872
+ * @return {?}
2873
+ */
2874
+ function (resolvedParameters) {
2875
+ _this._incomingRouteChange.value = true;
2876
+ _this.resolvedParameters.value = resolvedParameters;
2877
+ _this._incomingRouteChange.value = false;
2878
+ }));
2879
+ when.valueOf(_this.resolvedParameters).changes((/**
2880
+ * @param {?} params
2881
+ * @param {?} previous
2882
+ * @return {?}
2883
+ */
2884
+ function (params, previous) {
2885
+ params.redirect(previous, router, activatedRoute);
2886
+ }), { unless: _this.incomingRouteChange });
2887
+ _this.txo.observe('incomingResolvedRouteParameters', incomingResolvedRouteParameters);
2888
+ _this.txo.observe('this.routeIsChanging', _this.incomingRouteChange);
2889
+ return _this;
2890
+ }
2891
+ Object.defineProperty(RouteParameterBindings.prototype, "incomingRouteChange", {
2892
+ get: /**
2893
+ * @return {?}
2894
+ */
2895
+ function () {
2896
+ return this._incomingRouteChange.readonly;
2897
+ },
2898
+ enumerable: true,
2899
+ configurable: true
2900
+ });
2901
+ /**
2902
+ * @protected
2903
+ * @template T
2904
+ * @param {?} parameter
2905
+ * @return {?}
2906
+ */
2907
+ RouteParameterBindings.prototype.installBinding = /**
2908
+ * @protected
2909
+ * @template T
2910
+ * @param {?} parameter
2911
+ * @return {?}
2912
+ */
2913
+ function (parameter) {
2914
+ /** @type {?} */
2915
+ var model = this.getModelFor(parameter);
2916
+ // this.txo.observe(parameter.propertyName, model);
2917
+ this.registerDisposable(new pectin.Binding(this.resolvedParameters, model, {
2918
+ toRight: /**
2919
+ * @param {?} parameters
2920
+ * @return {?}
2921
+ */
2922
+ function (parameters) {
2923
+ return parameters.get(parameter);
2924
+ },
2925
+ toLeft: /**
2926
+ * @param {?} value
2927
+ * @param {?=} currentParameters
2928
+ * @return {?}
2929
+ */
2930
+ function (value, currentParameters) {
2931
+ return currentParameters.replace(parameter, value);
2932
+ }
2933
+ }));
2934
+ };
2935
+ /**
2936
+ * @private
2937
+ * @template T
2938
+ * @param {?} parameter
2939
+ * @return {?}
2940
+ */
2941
+ RouteParameterBindings.prototype.getModelFor = /**
2942
+ * @private
2943
+ * @template T
2944
+ * @param {?} parameter
2945
+ * @return {?}
2946
+ */
2947
+ function (parameter) {
2948
+ return this.component[parameter.propertyName];
2949
+ };
2950
+ return RouteParameterBindings;
2951
+ }(pectin.GarbageCollector));
2952
+ if (false) {
2953
+ /** @type {?} */
2954
+ exports.RouteParameterBindings.prototype._incomingRouteChange;
2955
+ /**
2956
+ * @type {?}
2957
+ * @private
2958
+ */
2959
+ exports.RouteParameterBindings.prototype.txo;
2960
+ /**
2961
+ * @type {?}
2962
+ * @private
2963
+ */
2964
+ exports.RouteParameterBindings.prototype.resolvedParameters;
2965
+ /**
2966
+ * @type {?}
2967
+ * @private
2968
+ */
2969
+ exports.RouteParameterBindings.prototype.component;
2970
+ /**
2971
+ * @type {?}
2972
+ * @private
2973
+ */
2974
+ exports.RouteParameterBindings.prototype.router;
2975
+ /**
2976
+ * @type {?}
2977
+ * @private
2978
+ */
2979
+ exports.RouteParameterBindings.prototype.activatedRoute;
2980
+ }
2981
+ (function (RouteParameterBindings) {
2982
+ RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY = Symbol('place:route:parameters');
2983
+ })(exports.RouteParameterBindings || (exports.RouteParameterBindings = {}));
2984
+
2985
+ /**
2986
+ * @fileoverview added by tsickle
2987
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2988
+ */
2989
+ var AbstractPlaceComponent = /** @class */ (function (_super) {
2990
+ __extends(AbstractPlaceComponent, _super);
2991
+ function AbstractPlaceComponent(activatedRoute, router) {
2992
+ var _this = _super.call(this) || this;
2993
+ _this.activatedRoute = activatedRoute;
2994
+ _this.routeBindingMediator = _this.registerDisposable(new exports.RouteParameterBindings(_this, router, activatedRoute));
2995
+ // See https://coolon.atlassian.net/browse/PEC-59
2996
+ ((/** @type {?} */ ((/** @type {?} */ (_this.titleModel))))).setDefault(_this.placeConfig.title);
2997
+ return _this;
2998
+ }
2999
+ Object.defineProperty(AbstractPlaceComponent.prototype, "placeConfig", {
3000
+ get: /**
3001
+ * @return {?}
3002
+ */
3003
+ function () {
3004
+ return Place.getDescriptor((/** @type {?} */ ((/** @type {?} */ (this.constructor)))));
3005
+ },
3006
+ enumerable: true,
3007
+ configurable: true
3008
+ });
3009
+ /**
3010
+ * @return {?}
3011
+ */
3012
+ AbstractPlaceComponent.prototype.canDeactivate = /**
3013
+ * @return {?}
3014
+ */
3015
+ function () {
3016
+ return true;
3017
+ };
3018
+ __decorate([
3019
+ pectin.UseDelegate(),
3020
+ __metadata("design:type", pectin.MutableValueModel)
3021
+ ], AbstractPlaceComponent.prototype, "titleModel", void 0);
3022
+ __decorate([
3023
+ fastMemoizeDecorator.Memoize(),
3024
+ __metadata("design:type", Place.Descriptor),
3025
+ __metadata("design:paramtypes", [])
3026
+ ], AbstractPlaceComponent.prototype, "placeConfig", null);
3027
+ return AbstractPlaceComponent;
3028
+ }(DisposableComponent));
3029
+ if (false) {
3030
+ /** @type {?} */
3031
+ AbstractPlaceComponent.prototype.titleModel;
3032
+ /**
3033
+ * @type {?}
3034
+ * @private
3035
+ */
3036
+ AbstractPlaceComponent.prototype.routeBindingMediator;
3037
+ /**
3038
+ * @type {?}
3039
+ * @protected
3040
+ */
3041
+ AbstractPlaceComponent.prototype.activatedRoute;
3042
+ }
3043
+
3044
+ /**
3045
+ * @fileoverview added by tsickle
3046
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3047
+ */
3048
+ /**
3049
+ * @record
3050
+ */
3051
+ function PlaceComponent() { }
3052
+ if (false) {
3053
+ /** @type {?} */
3054
+ PlaceComponent.prototype.titleModel;
3055
+ /**
3056
+ * @return {?}
3057
+ */
3058
+ PlaceComponent.prototype.canDeactivate = function () { };
3059
+ }
3060
+
3061
+ /**
3062
+ * @fileoverview added by tsickle
3063
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3064
+ */
3065
+ var LeavePlaceGuard = /** @class */ (function () {
3066
+ function LeavePlaceGuard(router, injector) {
3067
+ this.router = router;
3068
+ this.injector = injector;
3069
+ }
3070
+ /**
3071
+ * @param {?} component
3072
+ * @param {?} currentRoute
3073
+ * @param {?} currentState
3074
+ * @param {?=} nextState
3075
+ * @return {?}
3076
+ */
3077
+ LeavePlaceGuard.prototype.canDeactivate = /**
3078
+ * @param {?} component
3079
+ * @param {?} currentRoute
3080
+ * @param {?} currentState
3081
+ * @param {?=} nextState
3082
+ * @return {?}
3083
+ */
3084
+ function (component, currentRoute, currentState, nextState) {
3085
+ return component.canDeactivate();
3086
+ };
3087
+ LeavePlaceGuard.decorators = [
3088
+ { type: core.Injectable, args: [{
3089
+ providedIn: 'root'
3090
+ },] }
3091
+ ];
3092
+ /** @nocollapse */
3093
+ LeavePlaceGuard.ctorParameters = function () { return [
3094
+ { type: router.Router },
3095
+ { type: core.Injector }
3096
+ ]; };
3097
+ /** @nocollapse */ LeavePlaceGuard.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function LeavePlaceGuard_Factory() { return new LeavePlaceGuard(core.ɵɵinject(router.Router), core.ɵɵinject(core.INJECTOR)); }, token: LeavePlaceGuard, providedIn: "root" });
3098
+ return LeavePlaceGuard;
3099
+ }());
3100
+ if (false) {
3101
+ /**
3102
+ * @type {?}
3103
+ * @private
3104
+ */
3105
+ LeavePlaceGuard.prototype.router;
3106
+ /**
3107
+ * @type {?}
3108
+ * @private
3109
+ */
3110
+ LeavePlaceGuard.prototype.injector;
3111
+ }
3112
+
3113
+ /**
3114
+ * @fileoverview added by tsickle
3115
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3116
+ */
3117
+ /**
3118
+ * @abstract
3119
+ * @template T, S
3120
+ */
3121
+ /**
3122
+ * @abstract
3123
+ * @template T, S
3124
+ */
3125
+ exports.Sanitiser = /** @class */ (function () {
3126
+ function Sanitiser(parameterDef, snapshot, sanitiser) {
3127
+ this.parameterDef = parameterDef;
3128
+ this.snapshot = snapshot;
3129
+ this.sanitiser = sanitiser;
3130
+ }
3131
+ /**
3132
+ * @return {?}
3133
+ */
3134
+ Sanitiser.prototype.isRouteId = /**
3135
+ * @return {?}
3136
+ */
3137
+ function () {
3138
+ return this.parameterDef.isRouteId;
3139
+ };
3140
+ Object.defineProperty(Sanitiser.prototype, "valueChanged", {
3141
+ get: /**
3142
+ * @return {?}
3143
+ */
3144
+ function () {
3145
+ return !lodash.isNil(this.initialValue) && this.hasChanged(this.initialValue, this.sanitisedValue);
3146
+ },
3147
+ enumerable: true,
3148
+ configurable: true
3149
+ });
3150
+ Object.defineProperty(Sanitiser.prototype, "sanitisedValue", {
3151
+ get: /**
3152
+ * @return {?}
3153
+ */
3154
+ function () {
3155
+ return this._sanitisedValue;
3156
+ },
3157
+ enumerable: true,
3158
+ configurable: true
3159
+ });
3160
+ /**
3161
+ * @return {?}
3162
+ */
3163
+ Sanitiser.prototype.sanitize = /**
3164
+ * @return {?}
3165
+ */
3166
+ function () {
3167
+ return __awaiter(this, void 0, void 0, function () {
3168
+ var _a;
3169
+ return __generator(this, function (_b) {
3170
+ switch (_b.label) {
3171
+ case 0:
3172
+ if (!this.sanitiser) return [3 /*break*/, 2];
3173
+ this.initialValue = this.readFrom(this.snapshot);
3174
+ _a = this;
3175
+ return [4 /*yield*/, this.sanitiser.sanitise(this.initialValue)];
3176
+ case 1:
3177
+ _a._sanitisedValue = _b.sent();
3178
+ if (this.initialValue !== this._sanitisedValue) {
3179
+ return [2 /*return*/, false];
3180
+ }
3181
+ _b.label = 2;
3182
+ case 2: return [2 /*return*/, true];
3183
+ }
3184
+ });
3185
+ });
3186
+ };
3187
+ return Sanitiser;
3188
+ }());
3189
+ if (false) {
3190
+ /**
3191
+ * @type {?}
3192
+ * @private
3193
+ */
3194
+ exports.Sanitiser.prototype.initialValue;
3195
+ /**
3196
+ * @type {?}
3197
+ * @private
3198
+ */
3199
+ exports.Sanitiser.prototype._sanitisedValue;
3200
+ /** @type {?} */
3201
+ exports.Sanitiser.prototype.parameterDef;
3202
+ /** @type {?} */
3203
+ exports.Sanitiser.prototype.snapshot;
3204
+ /** @type {?} */
3205
+ exports.Sanitiser.prototype.sanitiser;
3206
+ /**
3207
+ * @abstract
3208
+ * @protected
3209
+ * @param {?} snapshot
3210
+ * @return {?}
3211
+ */
3212
+ exports.Sanitiser.prototype.readFrom = function (snapshot) { };
3213
+ /**
3214
+ * @abstract
3215
+ * @protected
3216
+ * @param {?} initialValue
3217
+ * @param {?} sanitisedValue
3218
+ * @return {?}
3219
+ */
3220
+ exports.Sanitiser.prototype.hasChanged = function (initialValue, sanitisedValue) { };
3221
+ /**
3222
+ * @abstract
3223
+ * @param {?} dest
3224
+ * @return {?}
3225
+ */
3226
+ exports.Sanitiser.prototype.injectRouteParam = function (dest) { };
3227
+ }
3228
+ var RouteParameterSanitiser = /** @class */ (function () {
3229
+ function RouteParameterSanitiser(parameterDefs, snapshot, injector) {
3230
+ var _this = this;
3231
+ this.parameterDefs = parameterDefs;
3232
+ this.snapshot = snapshot;
3233
+ this.injector = injector;
3234
+ this.parameterSanitisers = [];
3235
+ /** @type {?} */
3236
+ var sanitisers = parameterDefs.map((/**
3237
+ * @param {?} def
3238
+ * @return {?}
3239
+ */
3240
+ function (def) {
3241
+ return def.isArray ?
3242
+ new exports.Sanitiser.Array(def, snapshot, _this.getSanitiser(def)) :
3243
+ new exports.Sanitiser.Value(def, snapshot, _this.getSanitiser(def));
3244
+ }));
3245
+ this.routeIdSanitiser = sanitisers.find((/**
3246
+ * @param {?} p
3247
+ * @return {?}
3248
+ */
3249
+ function (p) { return p.isRouteId(); }));
3250
+ this.parameterSanitisers = sanitisers.filter((/**
3251
+ * @param {?} p
3252
+ * @return {?}
3253
+ */
3254
+ function (p) { return !p.isRouteId(); }));
3255
+ }
3256
+ /**
3257
+ * @return {?}
3258
+ */
3259
+ RouteParameterSanitiser.prototype.sanitise = /**
3260
+ * @return {?}
3261
+ */
3262
+ function () {
3263
+ return __awaiter(this, void 0, void 0, function () {
3264
+ var e_1, _a, _b, _c, sanitiser, e_1_1;
3265
+ return __generator(this, function (_d) {
3266
+ switch (_d.label) {
3267
+ case 0:
3268
+ if (!this.routeIdSanitiser) return [3 /*break*/, 2];
3269
+ return [4 /*yield*/, this.routeIdSanitiser.sanitize()];
3270
+ case 1:
3271
+ _d.sent();
3272
+ if (this.routeIdSanitiser.valueChanged) {
3273
+ // if the route id isn't ok we redirect immediately as the query params may need to be sanitised in the
3274
+ // context of the route id.
3275
+ return [2 /*return*/, false];
3276
+ }
3277
+ _d.label = 2;
3278
+ case 2:
3279
+ _d.trys.push([2, 7, 8, 9]);
3280
+ _b = __values(this.parameterSanitisers), _c = _b.next();
3281
+ _d.label = 3;
3282
+ case 3:
3283
+ if (!!_c.done) return [3 /*break*/, 6];
3284
+ sanitiser = _c.value;
3285
+ return [4 /*yield*/, sanitiser.sanitize()];
3286
+ case 4:
3287
+ _d.sent();
3288
+ _d.label = 5;
3289
+ case 5:
3290
+ _c = _b.next();
3291
+ return [3 /*break*/, 3];
3292
+ case 6: return [3 /*break*/, 9];
3293
+ case 7:
3294
+ e_1_1 = _d.sent();
3295
+ e_1 = { error: e_1_1 };
3296
+ return [3 /*break*/, 9];
3297
+ case 8:
3298
+ try {
3299
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
3300
+ }
3301
+ finally { if (e_1) throw e_1.error; }
3302
+ return [7 /*endfinally*/];
3303
+ case 9: return [2 /*return*/, !this.parameterSanitisers.find((/**
3304
+ * @param {?} s
3305
+ * @return {?}
3306
+ */
3307
+ function (s) { return s.valueChanged; }))];
3308
+ }
3309
+ });
3310
+ });
3311
+ };
3312
+ /**
3313
+ * @param {?} router
3314
+ * @return {?}
3315
+ */
3316
+ RouteParameterSanitiser.prototype.redirect = /**
3317
+ * @param {?} router
3318
+ * @return {?}
3319
+ */
3320
+ function (router) {
3321
+ pectin.assert.isTruthy(this.parameterSanitisers.length !== 0);
3322
+ if (this.routeIdSanitiser.valueChanged) {
3323
+ return router.navigate(['..', this.routeIdSanitiser.sanitisedValue]);
3324
+ }
3325
+ else {
3326
+ /** @type {?} */
3327
+ var routeParams_1 = {};
3328
+ this.parameterSanitisers.forEach((/**
3329
+ * @param {?} s
3330
+ * @return {?}
3331
+ */
3332
+ function (s) { return s.injectRouteParam(routeParams_1); }));
3333
+ return router.navigate(['.', routeParams_1]);
3334
+ }
3335
+ };
3336
+ /**
3337
+ * @private
3338
+ * @template T, S
3339
+ * @param {?} def
3340
+ * @return {?}
3341
+ */
3342
+ RouteParameterSanitiser.prototype.getSanitiser = /**
3343
+ * @private
3344
+ * @template T, S
3345
+ * @param {?} def
3346
+ * @return {?}
3347
+ */
3348
+ function (def) {
3349
+ return def.sanitiser ? this.injector.get(def.sanitiser, new def.sanitiser()) : null;
3350
+ };
3351
+ __decorate([
3352
+ src.Memoize(),
3353
+ __metadata("design:type", Function),
3354
+ __metadata("design:paramtypes", [Object]),
3355
+ __metadata("design:returntype", Object)
3356
+ ], RouteParameterSanitiser.prototype, "getSanitiser", null);
3357
+ return RouteParameterSanitiser;
3358
+ }());
3359
+ if (false) {
3360
+ /**
3361
+ * @type {?}
3362
+ * @private
3363
+ */
3364
+ RouteParameterSanitiser.prototype.routeIdSanitiser;
3365
+ /**
3366
+ * @type {?}
3367
+ * @private
3368
+ */
3369
+ RouteParameterSanitiser.prototype.parameterSanitisers;
3370
+ /** @type {?} */
3371
+ RouteParameterSanitiser.prototype.parameterDefs;
3372
+ /** @type {?} */
3373
+ RouteParameterSanitiser.prototype.snapshot;
3374
+ /** @type {?} */
3375
+ RouteParameterSanitiser.prototype.injector;
3376
+ }
3377
+ (function (Sanitiser) {
3378
+ /**
3379
+ * @template T
3380
+ */
3381
+ var /**
3382
+ * @template T
3383
+ */
3384
+ Value = /** @class */ (function (_super) {
3385
+ __extends(Value, _super);
3386
+ function Value() {
3387
+ return _super !== null && _super.apply(this, arguments) || this;
3388
+ }
3389
+ /**
3390
+ * @param {?} snapshot
3391
+ * @return {?}
3392
+ */
3393
+ Value.prototype.readFrom = /**
3394
+ * @param {?} snapshot
3395
+ * @return {?}
3396
+ */
3397
+ function (snapshot) {
3398
+ /** @type {?} */
3399
+ var rawValue = this.parameterDef.isRouteId ?
3400
+ snapshot.paramMap.get(this.parameterDef.name) :
3401
+ snapshot.queryParamMap.get(this.parameterDef.name);
3402
+ return this.parameterDef.type.parse(rawValue);
3403
+ };
3404
+ /**
3405
+ * @protected
3406
+ * @param {?} initialValue
3407
+ * @param {?} sanitisedValue
3408
+ * @return {?}
3409
+ */
3410
+ Value.prototype.hasChanged = /**
3411
+ * @protected
3412
+ * @param {?} initialValue
3413
+ * @param {?} sanitisedValue
3414
+ * @return {?}
3415
+ */
3416
+ function (initialValue, sanitisedValue) {
3417
+ return initialValue !== sanitisedValue;
3418
+ };
3419
+ /**
3420
+ * @param {?} dest
3421
+ * @return {?}
3422
+ */
3423
+ Value.prototype.injectRouteParam = /**
3424
+ * @param {?} dest
3425
+ * @return {?}
3426
+ */
3427
+ function (dest) {
3428
+ dest[this.parameterDef.name] = this.parameterDef.type.format(this.sanitisedValue);
3429
+ };
3430
+ return Value;
3431
+ }(Sanitiser));
3432
+ Sanitiser.Value = Value;
3433
+ /**
3434
+ * @template T
3435
+ */
3436
+ var /**
3437
+ * @template T
3438
+ */
3439
+ Array = /** @class */ (function (_super) {
3440
+ __extends(Array, _super);
3441
+ function Array() {
3442
+ return _super !== null && _super.apply(this, arguments) || this;
3443
+ }
3444
+ /**
3445
+ * @param {?} snapshot
3446
+ * @return {?}
3447
+ */
3448
+ Array.prototype.readFrom = /**
3449
+ * @param {?} snapshot
3450
+ * @return {?}
3451
+ */
3452
+ function (snapshot) {
3453
+ var _this = this;
3454
+ /** @type {?} */
3455
+ var rawValues = snapshot.queryParamMap.getAll(this.parameterDef.name);
3456
+ return rawValues.map((/**
3457
+ * @param {?} value
3458
+ * @return {?}
3459
+ */
3460
+ function (value) { return _this.parameterDef.type.parse(value); }));
3461
+ };
3462
+ /**
3463
+ * @protected
3464
+ * @param {?} initialValue
3465
+ * @param {?} sanitisedValue
3466
+ * @return {?}
3467
+ */
3468
+ Array.prototype.hasChanged = /**
3469
+ * @protected
3470
+ * @param {?} initialValue
3471
+ * @param {?} sanitisedValue
3472
+ * @return {?}
3473
+ */
3474
+ function (initialValue, sanitisedValue) {
3475
+ return initialValue !== sanitisedValue;
3476
+ };
3477
+ /**
3478
+ * @param {?} dest
3479
+ * @return {?}
3480
+ */
3481
+ Array.prototype.injectRouteParam = /**
3482
+ * @param {?} dest
3483
+ * @return {?}
3484
+ */
3485
+ function (dest) {
3486
+ var _this = this;
3487
+ dest[this.parameterDef.name] = this.sanitisedValue.map((/**
3488
+ * @param {?} v
3489
+ * @return {?}
3490
+ */
3491
+ function (v) { return _this.parameterDef.type.format(v); }));
3492
+ };
3493
+ return Array;
3494
+ }(Sanitiser));
3495
+ Sanitiser.Array = Array;
3496
+ })(exports.Sanitiser || (exports.Sanitiser = {}));
3497
+
3498
+ /**
3499
+ * @fileoverview added by tsickle
3500
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3501
+ */
3502
+ var PlaceRouteGuard = /** @class */ (function () {
3503
+ function PlaceRouteGuard(router, injector) {
3504
+ this.router = router;
3505
+ this.injector = injector;
3506
+ }
3507
+ /**
3508
+ * @param {?} route
3509
+ * @param {?} state
3510
+ * @return {?}
3511
+ */
3512
+ PlaceRouteGuard.prototype.canActivate = /**
3513
+ * @param {?} route
3514
+ * @param {?} state
3515
+ * @return {?}
3516
+ */
3517
+ function (route, state) {
3518
+ var _this = this;
3519
+ /** @type {?} */
3520
+ var routeParameters = typescriptUtilities.Klass.get(route.component).getMetadataList(exports.RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY);
3521
+ /** @type {?} */
3522
+ var sanitiser = new RouteParameterSanitiser(routeParameters, route, this.injector);
3523
+ return sanitiser.sanitise().then((/**
3524
+ * @param {?} proceed
3525
+ * @return {?}
3526
+ */
3527
+ function (proceed) {
3528
+ if (!proceed) {
3529
+ sanitiser.redirect(_this.router);
3530
+ }
3531
+ return proceed;
3532
+ }));
3533
+ };
3534
+ PlaceRouteGuard.decorators = [
3535
+ { type: core.Injectable, args: [{
3536
+ providedIn: 'root'
3537
+ },] }
3538
+ ];
3539
+ /** @nocollapse */
3540
+ PlaceRouteGuard.ctorParameters = function () { return [
3541
+ { type: router.Router },
3542
+ { type: core.Injector }
3543
+ ]; };
3544
+ /** @nocollapse */ PlaceRouteGuard.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function PlaceRouteGuard_Factory() { return new PlaceRouteGuard(core.ɵɵinject(router.Router), core.ɵɵinject(core.INJECTOR)); }, token: PlaceRouteGuard, providedIn: "root" });
3545
+ __decorate([
3546
+ pectin.Trace(),
3547
+ __metadata("design:type", Function),
3548
+ __metadata("design:paramtypes", [router.ActivatedRouteSnapshot, router.RouterStateSnapshot]),
3549
+ __metadata("design:returntype", Object)
3550
+ ], PlaceRouteGuard.prototype, "canActivate", null);
3551
+ return PlaceRouteGuard;
3552
+ }());
3553
+ if (false) {
3554
+ /**
3555
+ * @type {?}
3556
+ * @private
3557
+ */
3558
+ PlaceRouteGuard.prototype.router;
3559
+ /**
3560
+ * @type {?}
3561
+ * @private
3562
+ */
3563
+ PlaceRouteGuard.prototype.injector;
3564
+ }
3565
+
3566
+ /**
3567
+ * @fileoverview added by tsickle
3568
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3569
+ */
3570
+ /**
3571
+ * @record
3572
+ */
3573
+ function JsonArray() { }
3574
+ /**
3575
+ * @record
3576
+ */
3577
+ function JsonMap() { }
3578
+
3579
+ /**
3580
+ * @fileoverview added by tsickle
3581
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3582
+ */
3583
+ /**
3584
+ * @record
3585
+ * @template T
3586
+ */
3587
+ function ParameterOptions() { }
3588
+ if (false) {
3589
+ /** @type {?|undefined} */
3590
+ ParameterOptions.prototype.as;
3591
+ /** @type {?|undefined} */
3592
+ ParameterOptions.prototype.sanitiser;
3593
+ }
3594
+ /**
3595
+ * @record
3596
+ * @template T
3597
+ */
3598
+ function ListParameterOptions() { }
3599
+ if (false) {
3600
+ /** @type {?|undefined} */
3601
+ ListParameterOptions.prototype.as;
3602
+ /** @type {?|undefined} */
3603
+ ListParameterOptions.prototype.listSanitiser;
3604
+ }
3605
+ /**
3606
+ * @template T
3607
+ * @param {?} type
3608
+ * @param {?=} options
3609
+ * @return {?}
3610
+ */
3611
+ function RouteId(type, options) {
3612
+ // assert.isTruthy(type.isValid());
3613
+ return (/**
3614
+ * @param {?} prototype
3615
+ * @param {?} propertyKey
3616
+ * @return {?}
3617
+ */
3618
+ function (prototype, propertyKey) {
3619
+ /** @type {?} */
3620
+ var param = createDefinition(propertyKey, type, options, true);
3621
+ typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(exports.RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY, param);
3622
+ pectin.UseDelegate()(prototype, propertyKey);
3623
+ });
3624
+ }
3625
+ /**
3626
+ * @deprecated use RouteParameter instead.
3627
+ * @template T
3628
+ * @param {?} type
3629
+ * @param {?=} options
3630
+ * @return {?}
3631
+ */
3632
+ function QueryParameter(type, options) {
3633
+ return (/**
3634
+ * @param {?} prototype
3635
+ * @param {?} propertyKey
3636
+ * @return {?}
3637
+ */
3638
+ function (prototype, propertyKey) {
3639
+ /** @type {?} */
3640
+ var param = createDefinition(propertyKey, type, options, false);
3641
+ typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(exports.RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY, param);
3642
+ pectin.UseDelegate()(prototype, propertyKey);
3643
+ });
3644
+ }
3645
+ /**
3646
+ * @template T
3647
+ * @param {?} type
3648
+ * @param {?=} options
3649
+ * @return {?}
3650
+ */
3651
+ function RouteParameter(type, options) {
3652
+ // assert.isTruthy(type.isValid());
3653
+ return (/**
3654
+ * @param {?} prototype
3655
+ * @param {?} propertyKey
3656
+ * @return {?}
3657
+ */
3658
+ function (prototype, propertyKey) {
3659
+ /** @type {?} */
3660
+ var param = createDefinition(propertyKey, type, options, false);
3661
+ typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(exports.RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY, param);
3662
+ pectin.UseDelegate()(prototype, propertyKey);
3663
+ });
3664
+ }
3665
+ /**
3666
+ * @deprecated use RouteParameterList instead
3667
+ * @template E
3668
+ * @param {?} elementType
3669
+ * @param {?=} options
3670
+ * @return {?}
3671
+ */
3672
+ function QueryParameterList(elementType, options) {
3673
+ // assert.isTruthy(type.isValid());
3674
+ return (/**
3675
+ * @param {?} prototype
3676
+ * @param {?} propertyKey
3677
+ * @return {?}
3678
+ */
3679
+ function (prototype, propertyKey) {
3680
+ /** @type {?} */
3681
+ var param = createArrayDefinition(propertyKey, elementType, options);
3682
+ typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(exports.RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY, param);
3683
+ pectin.UseDelegate()(prototype, propertyKey);
3684
+ });
3685
+ }
3686
+ /**
3687
+ * @template E
3688
+ * @param {?} elementType
3689
+ * @param {?=} options
3690
+ * @return {?}
3691
+ */
3692
+ function RouteParameterList(elementType, options) {
3693
+ // assert.isTruthy(type.isValid());
3694
+ return (/**
3695
+ * @param {?} prototype
3696
+ * @param {?} propertyKey
3697
+ * @return {?}
3698
+ */
3699
+ function (prototype, propertyKey) {
3700
+ /** @type {?} */
3701
+ var param = createArrayDefinition(propertyKey, elementType, options);
3702
+ typescriptUtilities.Klass.get(prototype).addToOwnMetadataList(exports.RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY, param);
3703
+ pectin.UseDelegate()(prototype, propertyKey);
3704
+ });
3705
+ }
3706
+ /**
3707
+ * @template T
3708
+ * @param {?} propertyName
3709
+ * @param {?} type
3710
+ * @param {?} options
3711
+ * @param {?} routeId
3712
+ * @return {?}
3713
+ */
3714
+ function createDefinition(propertyName, type, options, routeId) {
3715
+ /** @type {?} */
3716
+ var opts = typescriptUtilities.Opts.get(options);
3717
+ /** @type {?} */
3718
+ var propertyNameAsString = pectin.assert.notNil(propertyName).toString();
3719
+ /** @type {?} */
3720
+ var def = {
3721
+ name: opts.getOptional('as', propertyNameAsString),
3722
+ propertyName: propertyNameAsString,
3723
+ type: pectin.assert.notNil(type),
3724
+ sanitiser: opts.getOptional('sanitiser', null),
3725
+ isRouteId: routeId,
3726
+ isArray: false
3727
+ };
3728
+ return def;
3729
+ }
3730
+ /**
3731
+ * @template T
3732
+ * @param {?} propertyName
3733
+ * @param {?} type
3734
+ * @param {?} options
3735
+ * @return {?}
3736
+ */
3737
+ function createArrayDefinition(propertyName, type, options) {
3738
+ /** @type {?} */
3739
+ var opts = typescriptUtilities.Opts.get(options);
3740
+ /** @type {?} */
3741
+ var propertyNameAsString = pectin.assert.notNil(propertyName).toString();
3742
+ /** @type {?} */
3743
+ var def = {
3744
+ name: opts.getOptional('as', propertyNameAsString),
3745
+ propertyName: propertyNameAsString,
3746
+ type: pectin.assert.notNil(type),
3747
+ sanitiser: opts.getOptional('listSanitiser', null),
3748
+ isRouteId: false,
3749
+ isArray: true
3750
+ };
3751
+ return def;
3752
+ }
3753
+
3754
+ /**
3755
+ * @fileoverview added by tsickle
3756
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3757
+ */
3758
+ /**
3759
+ * @record
3760
+ * @template E, S
3761
+ */
3762
+ function ParameterDefinition() { }
3763
+ if (false) {
3764
+ /** @type {?} */
3765
+ ParameterDefinition.prototype.name;
3766
+ /** @type {?} */
3767
+ ParameterDefinition.prototype.propertyName;
3768
+ /** @type {?} */
3769
+ ParameterDefinition.prototype.type;
3770
+ /** @type {?} */
3771
+ ParameterDefinition.prototype.sanitiser;
3772
+ /** @type {?} */
3773
+ ParameterDefinition.prototype.isRouteId;
3774
+ /** @type {?} */
3775
+ ParameterDefinition.prototype.isArray;
3776
+ }
3777
+
3778
+ /**
3779
+ * @fileoverview added by tsickle
3780
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3781
+ */
3782
+ /**
3783
+ * @record
3784
+ * @template T
3785
+ */
3786
+ function ParameterSanitiser() { }
3787
+ if (false) {
3788
+ /**
3789
+ * @param {?} value
3790
+ * @return {?}
3791
+ */
3792
+ ParameterSanitiser.prototype.sanitise = function (value) { };
3793
+ }
3794
+
3795
+ /**
3796
+ * @fileoverview added by tsickle
3797
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3798
+ */
3799
+ // WARNING: interface has both a type and a value, skipping emit
3800
+
3801
+ (function (ParameterType) {
3802
+ var StringType = /** @class */ (function () {
3803
+ function StringType() {
3804
+ }
3805
+ /**
3806
+ * @param {?} value
3807
+ * @return {?}
3808
+ */
3809
+ StringType.prototype.format = /**
3810
+ * @param {?} value
3811
+ * @return {?}
3812
+ */
3813
+ function (value) {
3814
+ return value;
3815
+ };
3816
+ /**
3817
+ * @param {?} value
3818
+ * @return {?}
3819
+ */
3820
+ StringType.prototype.parse = /**
3821
+ * @param {?} value
3822
+ * @return {?}
3823
+ */
3824
+ function (value) {
3825
+ return value;
3826
+ };
3827
+ return StringType;
3828
+ }());
3829
+ var NumberType = /** @class */ (function () {
3830
+ function NumberType() {
3831
+ }
3832
+ /**
3833
+ * @param {?} value
3834
+ * @return {?}
3835
+ */
3836
+ NumberType.prototype.format = /**
3837
+ * @param {?} value
3838
+ * @return {?}
3839
+ */
3840
+ function (value) {
3841
+ return "" + value;
3842
+ };
3843
+ /**
3844
+ * @param {?} value
3845
+ * @return {?}
3846
+ */
3847
+ NumberType.prototype.parse = /**
3848
+ * @param {?} value
3849
+ * @return {?}
3850
+ */
3851
+ function (value) {
3852
+ return +value;
3853
+ };
3854
+ return NumberType;
3855
+ }());
3856
+ ParameterType.STRING = new StringType();
3857
+ ParameterType.NUMBER = new NumberType();
3858
+ })(exports.ParameterType || (exports.ParameterType = {}));
3859
+
3860
+ exports.ACTIVITY_DATA = ACTIVITY_DATA;
3861
+ exports.AbstractActivity = AbstractActivity;
3862
+ exports.AbstractInputComponent = AbstractInputComponent;
3863
+ exports.AbstractPlaceComponent = AbstractPlaceComponent;
3864
+ exports.ActivityContainerComponent = exports.ɵq;
3865
+ exports.ActivityOutletComponent = exports.ɵx;
3866
+ exports.AlertDialogComponent = AlertDialogComponent;
3867
+ exports.AngularUiPowerupsModule = AngularUiPowerupsModule;
3868
+ exports.BusyOverlayComponent = BusyOverlayComponent;
3869
+ exports.CommandDirective = CommandDirective;
3870
+ exports.ConfirmationDialogComponent = ConfirmationDialogComponent;
3871
+ exports.DialogInteractionService = DialogInteractionService;
3872
+ exports.Dimension = Dimension;
3873
+ exports.DisposableComponent = DisposableComponent;
3874
+ exports.EmptyStateComponent = EmptyStateComponent;
3875
+ exports.FocusBindingDirective = FocusBindingDirective;
3876
+ exports.INTERACTION_CONTEXT = INTERACTION_CONTEXT;
3877
+ exports.InteractionContext = InteractionContext;
3878
+ exports.InteractionModule = InteractionModule;
3879
+ exports.LEFT_RIGHT_PLACE_ANIMATION = LEFT_RIGHT_PLACE_ANIMATION;
3880
+ exports.LeavePlaceGuard = LeavePlaceGuard;
3881
+ exports.NumberInputComponent = NumberInputComponent;
3882
+ exports.PasswordInputComponent = PasswordInputComponent;
3883
+ exports.Place = Place;
3884
+ exports.PlaceModule = PlaceModule;
3885
+ exports.PlaceOutletComponent = PlaceOutletComponent;
3886
+ exports.PlaceRouteGuard = PlaceRouteGuard;
3887
+ exports.PlaceService = PlaceService;
3888
+ exports.Point = Point;
3889
+ exports.QueryParameter = QueryParameter;
3890
+ exports.QueryParameterList = QueryParameterList;
3891
+ exports.ResizeAwareComponent = ResizeAwareComponent;
3892
+ exports.RouteId = RouteId;
3893
+ exports.RouteParameter = RouteParameter;
3894
+ exports.RouteParameterList = RouteParameterList;
3895
+ exports.RouteParameterSanitiser = RouteParameterSanitiser;
3896
+ exports.SelectInputComponent = SelectInputComponent;
3897
+ exports.StringInputComponent = StringInputComponent;
3898
+ exports.TabbedPlaceNavigationComponent = TabbedPlaceNavigationComponent;
3899
+ exports.slideDownAndUpAnimation = slideDownAndUpAnimation;
3900
+ exports.ɵa = CommandDirective;
3901
+ exports.ɵb = FocusBindingDirective;
3902
+ exports.ɵc = DisposableComponent;
3903
+ exports.ɵd = NumberInputComponent;
3904
+ exports.ɵe = AbstractInputComponent;
3905
+ exports.ɵf = StringInputComponent;
3906
+ exports.ɵg = PasswordInputComponent;
3907
+ exports.ɵh = SelectInputComponent;
3908
+ exports.ɵi = PlaceModule;
3909
+ exports.ɵj = EmptyStateComponent;
3910
+ exports.ɵk = BusyOverlayComponent;
3911
+ exports.ɵl = PlaceOutletComponent;
3912
+ exports.ɵm = LEFT_RIGHT_PLACE_ANIMATION;
3913
+ exports.ɵn = PlaceService;
3914
+ exports.ɵo = TabbedPlaceNavigationComponent;
3915
+ exports.ɵp = InteractionModule;
3916
+ exports.ɵr = ConfirmationDialogComponent;
3917
+ exports.ɵs = AbstractActivity;
3918
+ exports.ɵt = ACTIVITY_DATA;
3919
+ exports.ɵv = AlertDialogComponent;
3920
+ exports.ɵy = DialogInteractionService;
3921
+ exports.ɵz = InteractionContext;
3922
+
3923
+ Object.defineProperty(exports, '__esModule', { value: true });
3924
+
3925
+ }));
3926
+ //# sourceMappingURL=coolon-angular-ui-powerups.umd.js.map