@coolon/angular-ui-powerups 0.0.24 → 0.0.26

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