@coolon/angular-ui-powerups 0.0.23 → 0.0.25

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 +5 -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} +2 -1
  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 -3908
  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/nav/nav.component.js +0 -31
  152. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +0 -67
  153. package/esm2015/lib/place/components/place-outlet/route-animations.js +0 -35
  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/nav/nav.component.js +0 -36
  206. package/esm5/lib/place/components/place-outlet/place-outlet.component.js +0 -81
  207. package/esm5/lib/place/components/place-outlet/route-animations.js +0 -35
  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 -3129
  224. package/fesm2015/coolon-angular-ui-powerups.js.map +0 -1
  225. package/fesm5/coolon-angular-ui-powerups.js +0 -3681
  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/nav/nav.component.d.ts +0 -7
  256. package/lib/place/components/place-outlet/place-outlet.component.d.ts +0 -13
  257. package/lib/place/components/place-outlet/route-animations.d.ts +0 -1
  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,3681 +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 NavComponent = /** @class */ (function () {
1726
- function NavComponent() {
1727
- }
1728
- /**
1729
- * @return {?}
1730
- */
1731
- NavComponent.prototype.ngOnInit = /**
1732
- * @return {?}
1733
- */
1734
- function () {
1735
- };
1736
- NavComponent.decorators = [
1737
- { type: Component, args: [{
1738
- selector: 'angular-ui-powerups-nav',
1739
- template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let placeDescriptor of places\" [routerLink]='placeDescriptor.path'\n routerLinkActive #rla=\"routerLinkActive\"\n [active]=\"rla.isActive\"\n [matTooltip]=\"placeDescriptor.title\">{{placeDescriptor.title}}</a>\n</nav>\n\n",
1740
- styles: [""]
1741
- }] }
1742
- ];
1743
- /** @nocollapse */
1744
- NavComponent.ctorParameters = function () { return []; };
1745
- NavComponent.propDecorators = {
1746
- places: [{ type: Input }]
1747
- };
1748
- return NavComponent;
1749
- }());
1750
- if (false) {
1751
- /** @type {?} */
1752
- NavComponent.prototype.places;
1753
- }
1754
-
1755
- /**
1756
- * @fileoverview added by tsickle
1757
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1758
- */
1759
- var PlaceService = /** @class */ (function () {
1760
- function PlaceService() {
1761
- this._activePlaces = new MutableListModel();
1762
- }
1763
- Object.defineProperty(PlaceService.prototype, "activePlaces", {
1764
- get: /**
1765
- * @return {?}
1766
- */
1767
- function () {
1768
- return this._activePlaces.readonly;
1769
- },
1770
- enumerable: true,
1771
- configurable: true
1772
- });
1773
- /**
1774
- * @param {?} place
1775
- * @return {?}
1776
- */
1777
- PlaceService.prototype.onActivate = /**
1778
- * @param {?} place
1779
- * @return {?}
1780
- */
1781
- function (place) {
1782
- this._activePlaces.push(place);
1783
- };
1784
- /**
1785
- * @param {?} place
1786
- * @return {?}
1787
- */
1788
- PlaceService.prototype.onDeactivate = /**
1789
- * @param {?} place
1790
- * @return {?}
1791
- */
1792
- function (place) {
1793
- this._activePlaces.remove(place);
1794
- };
1795
- PlaceService.decorators = [
1796
- { type: Injectable, args: [{
1797
- providedIn: 'root'
1798
- },] }
1799
- ];
1800
- /** @nocollapse */
1801
- PlaceService.ctorParameters = function () { return []; };
1802
- /** @nocollapse */ PlaceService.ngInjectableDef = ɵɵdefineInjectable({ factory: function PlaceService_Factory() { return new PlaceService(); }, token: PlaceService, providedIn: "root" });
1803
- __decorate([
1804
- Trace(),
1805
- __metadata("design:type", Function),
1806
- __metadata("design:paramtypes", [Object]),
1807
- __metadata("design:returntype", void 0)
1808
- ], PlaceService.prototype, "onActivate", null);
1809
- __decorate([
1810
- Trace(),
1811
- __metadata("design:type", Function),
1812
- __metadata("design:paramtypes", [Object]),
1813
- __metadata("design:returntype", void 0)
1814
- ], PlaceService.prototype, "onDeactivate", null);
1815
- return PlaceService;
1816
- }());
1817
- if (false) {
1818
- /**
1819
- * @type {?}
1820
- * @private
1821
- */
1822
- PlaceService.prototype._activePlaces;
1823
- }
1824
-
1825
- /**
1826
- * @fileoverview added by tsickle
1827
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1828
- */
1829
- /** @type {?} */
1830
- var left = [
1831
- query(':enter, :leave', style({ position: 'fixed', width: '100%' }), { optional: true }),
1832
- group([
1833
- query(':enter', [style({ transform: 'translateX(-100%)' }), animate('.3s ease-out', style({ transform: 'translateX(0%)' }))], {
1834
- optional: true,
1835
- }),
1836
- query(':leave', [style({ transform: 'translateX(0%)' }), animate('.3s ease-out', style({ transform: 'translateX(100%)' }))], {
1837
- optional: true,
1838
- }),
1839
- ]),
1840
- ];
1841
- /** @type {?} */
1842
- var right = [
1843
- query(':enter, :leave', style({ position: 'fixed', width: '100%' }), { optional: true }),
1844
- group([
1845
- query(':enter', [style({ transform: 'translateX(100%)' }), animate('.3s ease-out', style({ transform: 'translateX(0%)' }))], {
1846
- optional: true,
1847
- }),
1848
- query(':leave', [style({ transform: 'translateX(0%)' }), animate('.3s ease-out', style({ transform: 'translateX(-100%)' }))], {
1849
- optional: true,
1850
- }),
1851
- ]),
1852
- ];
1853
- /** @type {?} */
1854
- var LEFT_RIGHT_PLACE_ANIMATION = trigger('routeAnimations', [
1855
- transition(':increment', right),
1856
- transition(':decrement', left),
1857
- ]);
1858
-
1859
- /**
1860
- * @fileoverview added by tsickle
1861
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1862
- */
1863
- var PlaceOutletComponent = /** @class */ (function () {
1864
- function PlaceOutletComponent(placeService) {
1865
- this.placeService = placeService;
1866
- this.animate = true;
1867
- }
1868
- /**
1869
- * @return {?}
1870
- */
1871
- PlaceOutletComponent.prototype.ngOnInit = /**
1872
- * @return {?}
1873
- */
1874
- function () {
1875
- };
1876
- /**
1877
- * @param {?} $event
1878
- * @return {?}
1879
- */
1880
- PlaceOutletComponent.prototype.onActivate = /**
1881
- * @param {?} $event
1882
- * @return {?}
1883
- */
1884
- function ($event) {
1885
- this.placeService.onActivate($event);
1886
- };
1887
- /**
1888
- * @param {?} $event
1889
- * @return {?}
1890
- */
1891
- PlaceOutletComponent.prototype.onDeactivate = /**
1892
- * @param {?} $event
1893
- * @return {?}
1894
- */
1895
- function ($event) {
1896
- this.placeService.onDeactivate($event);
1897
- };
1898
- /**
1899
- * @param {?} outlet
1900
- * @return {?}
1901
- */
1902
- PlaceOutletComponent.prototype.getPlaceOrder = /**
1903
- * @param {?} outlet
1904
- * @return {?}
1905
- */
1906
- function (outlet) {
1907
- return this.animate && outlet && outlet.activatedRouteData && outlet.activatedRouteData['placeOrder'];
1908
- };
1909
- PlaceOutletComponent.decorators = [
1910
- { type: Component, args: [{
1911
- selector: 'angular-ui-powerups-place-outlet',
1912
- 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",
1913
- animations: [LEFT_RIGHT_PLACE_ANIMATION],
1914
- styles: [":host{display:block}.container{grid-area:main;display:-ms-grid;display:grid;-ms-grid-rows:0 1fr;grid-template-rows:0 1fr;min-height:0}"]
1915
- }] }
1916
- ];
1917
- /** @nocollapse */
1918
- PlaceOutletComponent.ctorParameters = function () { return [
1919
- { type: PlaceService }
1920
- ]; };
1921
- PlaceOutletComponent.propDecorators = {
1922
- animate: [{ type: Input }]
1923
- };
1924
- return PlaceOutletComponent;
1925
- }());
1926
- if (false) {
1927
- /** @type {?} */
1928
- PlaceOutletComponent.prototype.animate;
1929
- /**
1930
- * @type {?}
1931
- * @private
1932
- */
1933
- PlaceOutletComponent.prototype.placeService;
1934
- }
1935
-
1936
- /**
1937
- * @fileoverview added by tsickle
1938
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1939
- */
1940
- var PlaceModule = /** @class */ (function () {
1941
- function PlaceModule() {
1942
- }
1943
- PlaceModule.decorators = [
1944
- { type: NgModule, args: [{
1945
- imports: [
1946
- CommonModule,
1947
- BrowserAnimationsModule,
1948
- MatProgressSpinnerModule,
1949
- RouterModule,
1950
- MatTabsModule$1,
1951
- MatListModule,
1952
- MatTooltipModule
1953
- ],
1954
- declarations: [
1955
- EmptyStateComponent,
1956
- BusyOverlayComponent,
1957
- PlaceOutletComponent,
1958
- NavComponent
1959
- ],
1960
- entryComponents: [BusyOverlayComponent],
1961
- exports: [
1962
- BusyOverlayComponent,
1963
- PlaceOutletComponent,
1964
- EmptyStateComponent,
1965
- NavComponent
1966
- ],
1967
- providers: [
1968
- PlaceService
1969
- ]
1970
- },] }
1971
- ];
1972
- return PlaceModule;
1973
- }());
1974
-
1975
- /**
1976
- * @fileoverview added by tsickle
1977
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1978
- */
1979
- var AngularUiPowerupsModule = /** @class */ (function () {
1980
- function AngularUiPowerupsModule() {
1981
- }
1982
- AngularUiPowerupsModule.decorators = [
1983
- { type: NgModule, args: [{
1984
- declarations: [
1985
- CommandDirective,
1986
- FocusBindingDirective,
1987
- NumberInputComponent,
1988
- StringInputComponent,
1989
- PasswordInputComponent,
1990
- SelectInputComponent,
1991
- ],
1992
- imports: [
1993
- CommonModule,
1994
- BrowserModule,
1995
- BrowserAnimationsModule,
1996
- FormsModule,
1997
- MatInputModule,
1998
- MatFormFieldModule,
1999
- MatSelectModule,
2000
- PlaceModule,
2001
- InteractionModule
2002
- ],
2003
- exports: [
2004
- CommandDirective,
2005
- FocusBindingDirective,
2006
- NumberInputComponent,
2007
- StringInputComponent,
2008
- PasswordInputComponent,
2009
- SelectInputComponent,
2010
- InteractionModule,
2011
- PlaceModule,
2012
- ]
2013
- },] }
2014
- ];
2015
- return AngularUiPowerupsModule;
2016
- }());
2017
-
2018
- /**
2019
- * @fileoverview added by tsickle
2020
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2021
- */
2022
- /** @type {?} */
2023
- var defaultHiddenStyleDef = style({
2024
- opacity: 0,
2025
- 'height': '0',
2026
- paddingTop: '0',
2027
- paddingBottom: '0'
2028
- });
2029
- /**
2030
- * @param {?} triggerName
2031
- * @param {?=} options
2032
- * @return {?}
2033
- */
2034
- function slideDownAndUpAnimation(triggerName, options) {
2035
- // SEE to fix this: https://github.com/angular/angular/issues/15587#issuecomment-351510501
2036
- /** @type {?} */
2037
- var duration = OptionsHelper.get(options).getOptional('duration', '100ms');
2038
- /** @type {?} */
2039
- var hiddenStyleDef = OptionsHelper.get(options).getOptional('hiddenStyleDef', defaultHiddenStyleDef);
2040
- return trigger(triggerName, [
2041
- transition(':enter', [hiddenStyleDef, animate('100ms')]),
2042
- transition(':leave', [animate('100ms', hiddenStyleDef)])
2043
- ]);
2044
- }
2045
-
2046
- /**
2047
- * @fileoverview added by tsickle
2048
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2049
- */
2050
-
2051
- /**
2052
- * @fileoverview added by tsickle
2053
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2054
- */
2055
- var Dimension = /** @class */ (function () {
2056
- function Dimension(width, height) {
2057
- this.width = width;
2058
- this.height = height;
2059
- }
2060
- return Dimension;
2061
- }());
2062
- if (false) {
2063
- /** @type {?} */
2064
- Dimension.prototype.width;
2065
- /** @type {?} */
2066
- Dimension.prototype.height;
2067
- }
2068
-
2069
- /**
2070
- * @fileoverview added by tsickle
2071
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2072
- */
2073
- var Point = /** @class */ (function () {
2074
- function Point(x, y) {
2075
- this.x = x;
2076
- this.y = y;
2077
- }
2078
- /**
2079
- * @param {?} data
2080
- * @return {?}
2081
- */
2082
- Point.from = /**
2083
- * @param {?} data
2084
- * @return {?}
2085
- */
2086
- function (data) {
2087
- return new Point(data.x, data.y);
2088
- };
2089
- /**
2090
- * @param {?} x
2091
- * @param {?} y
2092
- * @return {?}
2093
- */
2094
- Point.prototype.translate = /**
2095
- * @param {?} x
2096
- * @param {?} y
2097
- * @return {?}
2098
- */
2099
- function (x, y) {
2100
- return new Point(this.x + x, this.y + y);
2101
- };
2102
- return Point;
2103
- }());
2104
- if (false) {
2105
- /** @type {?} */
2106
- Point.prototype.x;
2107
- /** @type {?} */
2108
- Point.prototype.y;
2109
- }
2110
-
2111
- /**
2112
- * @fileoverview added by tsickle
2113
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2114
- */
2115
- var Bounds = /** @class */ (function (_super) {
2116
- __extends(Bounds, _super);
2117
- function Bounds(top, left, width, height) {
2118
- var _this = _super.call(this, width, height) || this;
2119
- _this.top = top;
2120
- _this.left = left;
2121
- _this.width = width;
2122
- _this.height = height;
2123
- return _this;
2124
- }
2125
- /**
2126
- * @param {?} point
2127
- * @return {?}
2128
- */
2129
- Bounds.prototype.relativePositionOf = /**
2130
- * @param {?} point
2131
- * @return {?}
2132
- */
2133
- function (point) {
2134
- if (point instanceof MouseEvent) {
2135
- return new Point(point.clientX - this.left, point.clientY - this.top);
2136
- }
2137
- else {
2138
- return new Point(point.x - this.left, point.y - this.top);
2139
- }
2140
- };
2141
- return Bounds;
2142
- }(Dimension));
2143
- if (false) {
2144
- /** @type {?} */
2145
- Bounds.prototype.top;
2146
- /** @type {?} */
2147
- Bounds.prototype.left;
2148
- /** @type {?} */
2149
- Bounds.prototype.width;
2150
- /** @type {?} */
2151
- Bounds.prototype.height;
2152
- }
2153
- (function (Bounds) {
2154
- /**
2155
- * @param {?} element
2156
- * @return {?}
2157
- */
2158
- function ofElement(element) {
2159
- /** @type {?} */
2160
- var rect = element.getBoundingClientRect();
2161
- return new Bounds(rect.top, rect.left, rect.width, rect.height);
2162
- }
2163
- Bounds.ofElement = ofElement;
2164
- })(Bounds || (Bounds = {}));
2165
-
2166
- /**
2167
- * @fileoverview added by tsickle
2168
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2169
- */
2170
- var ResizeAwareComponent = /** @class */ (function (_super) {
2171
- __extends(ResizeAwareComponent, _super);
2172
- function ResizeAwareComponent(elementRef, ngZone) {
2173
- var _this = _super.call(this) || this;
2174
- _this.elementRef = elementRef;
2175
- _this.ngZone = ngZone;
2176
- _this._boundsModel = new ValueHolder(new Bounds(0, 0, 0, 0));
2177
- return _this;
2178
- }
2179
- /**
2180
- * @return {?}
2181
- */
2182
- ResizeAwareComponent.prototype.ngAfterViewInit = /**
2183
- * @return {?}
2184
- */
2185
- function () {
2186
- var _this = this;
2187
- this.updateBounds();
2188
- /** @type {?} */
2189
- var element = this.elementRef.nativeElement;
2190
- /** @type {?} */
2191
- var ro = new ResizeObserver((/**
2192
- * @param {?} entries
2193
- * @param {?} observer
2194
- * @return {?}
2195
- */
2196
- function (entries, observer) {
2197
- _this.ngZone.run((/**
2198
- * @return {?}
2199
- */
2200
- function () { return _this.updateBounds(); }));
2201
- }));
2202
- ro.observe(element);
2203
- this.onDispose((/**
2204
- * @return {?}
2205
- */
2206
- function () { return ro.disconnect(); }));
2207
- };
2208
- Object.defineProperty(ResizeAwareComponent.prototype, "boundsModel", {
2209
- get: /**
2210
- * @return {?}
2211
- */
2212
- function () {
2213
- return this._boundsModel.readonly;
2214
- },
2215
- enumerable: true,
2216
- configurable: true
2217
- });
2218
- Object.defineProperty(ResizeAwareComponent.prototype, "nativeElement", {
2219
- get: /**
2220
- * @return {?}
2221
- */
2222
- function () {
2223
- return this.elementRef.nativeElement;
2224
- },
2225
- enumerable: true,
2226
- configurable: true
2227
- });
2228
- // TODO: Make this handle body scroll
2229
- // TODO: Make this handle body scroll
2230
- /**
2231
- * @param {?} point
2232
- * @return {?}
2233
- */
2234
- ResizeAwareComponent.prototype.relativePositionOf =
2235
- // TODO: Make this handle body scroll
2236
- /**
2237
- * @param {?} point
2238
- * @return {?}
2239
- */
2240
- function (point) {
2241
- return this.bounds.relativePositionOf(point);
2242
- };
2243
- Object.defineProperty(ResizeAwareComponent.prototype, "bounds", {
2244
- get: /**
2245
- * @return {?}
2246
- */
2247
- function () {
2248
- return this._boundsModel.value;
2249
- },
2250
- enumerable: true,
2251
- configurable: true
2252
- });
2253
- /**
2254
- * @private
2255
- * @return {?}
2256
- */
2257
- ResizeAwareComponent.prototype.updateBounds = /**
2258
- * @private
2259
- * @return {?}
2260
- */
2261
- function () {
2262
- this._boundsModel.value = Bounds.ofElement(this.nativeElement);
2263
- };
2264
- return ResizeAwareComponent;
2265
- }(DisposableComponent));
2266
- if (false) {
2267
- /**
2268
- * @type {?}
2269
- * @private
2270
- */
2271
- ResizeAwareComponent.prototype._boundsModel;
2272
- /**
2273
- * @type {?}
2274
- * @protected
2275
- */
2276
- ResizeAwareComponent.prototype.elementRef;
2277
- /**
2278
- * @type {?}
2279
- * @protected
2280
- */
2281
- ResizeAwareComponent.prototype.ngZone;
2282
- }
2283
-
2284
- /**
2285
- * @fileoverview added by tsickle
2286
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2287
- */
2288
-
2289
- /**
2290
- * @fileoverview added by tsickle
2291
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2292
- */
2293
-
2294
- /**
2295
- * @fileoverview added by tsickle
2296
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2297
- */
2298
- /**
2299
- * @record
2300
- */
2301
- function Alert() { }
2302
- if (false) {
2303
- /**
2304
- * @return {?}
2305
- */
2306
- Alert.prototype.title = function () { };
2307
- /**
2308
- * @return {?}
2309
- */
2310
- Alert.prototype.content = function () { };
2311
- /**
2312
- * @return {?}
2313
- */
2314
- Alert.prototype.ok = function () { };
2315
- }
2316
-
2317
- /**
2318
- * @fileoverview added by tsickle
2319
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2320
- */
2321
- /**
2322
- * @record
2323
- */
2324
- function Confirm() { }
2325
- if (false) {
2326
- /** @type {?|undefined} */
2327
- Confirm.prototype.destructive;
2328
- /**
2329
- * @return {?}
2330
- */
2331
- Confirm.prototype.cancel = function () { };
2332
- }
2333
-
2334
- /**
2335
- * @fileoverview added by tsickle
2336
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2337
- */
2338
- /**
2339
- * @record
2340
- * @template R, E
2341
- */
2342
- function Result() { }
2343
- (function (Result) {
2344
- /**
2345
- * @record
2346
- * @template R, E
2347
- */
2348
- function Callback() { }
2349
- Result.Callback = Callback;
2350
- if (false) {
2351
- /** @type {?} */
2352
- Callback.prototype.then;
2353
- /** @type {?} */
2354
- Callback.prototype.catch;
2355
- }
2356
- })(Result || (Result = {}));
2357
-
2358
- /**
2359
- * @fileoverview added by tsickle
2360
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2361
- */
2362
- /**
2363
- * @record
2364
- * @template D, R, E
2365
- */
2366
- function ActivityOutletContext() { }
2367
- if (false) {
2368
- /** @type {?} */
2369
- ActivityOutletContext.prototype.interactionContext;
2370
- /** @type {?} */
2371
- ActivityOutletContext.prototype.activityClass;
2372
- /** @type {?} */
2373
- ActivityOutletContext.prototype.activityData;
2374
- /** @type {?} */
2375
- ActivityOutletContext.prototype.onDone;
2376
- /** @type {?} */
2377
- ActivityOutletContext.prototype.onCancel;
2378
- }
2379
-
2380
- /**
2381
- * @fileoverview added by tsickle
2382
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2383
- */
2384
-
2385
- /**
2386
- * @fileoverview added by tsickle
2387
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2388
- */
2389
- /**
2390
- * @param {?} options
2391
- * @return {?}
2392
- */
2393
- function Place(options) {
2394
- return (/**
2395
- * @param {?} target
2396
- * @return {?}
2397
- */
2398
- function (target) {
2399
- Reflect.defineMetadata('place.options', options, target);
2400
- });
2401
- }
2402
- (function (Place) {
2403
- /**
2404
- * @record
2405
- */
2406
- function Options() { }
2407
- Place.Options = Options;
2408
- if (false) {
2409
- /** @type {?} */
2410
- Options.prototype.path;
2411
- /** @type {?} */
2412
- Options.prototype.title;
2413
- /** @type {?} */
2414
- Options.prototype.order;
2415
- /** @type {?|undefined} */
2416
- Options.prototype.authenticate;
2417
- }
2418
- var Descriptor = /** @class */ (function () {
2419
- function Descriptor(placeClass, options) {
2420
- assert.notNil(options);
2421
- this.path = options.path;
2422
- this.title = options.title;
2423
- this.order = options.order;
2424
- this.authenticate = isNil(options.authenticate) || options.authenticate;
2425
- }
2426
- return Descriptor;
2427
- }());
2428
- Place.Descriptor = Descriptor;
2429
- if (false) {
2430
- /** @type {?} */
2431
- Descriptor.prototype.path;
2432
- /** @type {?} */
2433
- Descriptor.prototype.authenticate;
2434
- /** @type {?} */
2435
- Descriptor.prototype.title;
2436
- /** @type {?} */
2437
- Descriptor.prototype.order;
2438
- }
2439
- /**
2440
- * @param {?} klass
2441
- * @return {?}
2442
- */
2443
- function getDescriptor(klass) {
2444
- /** @type {?} */
2445
- var placeOptions = Reflect.getMetadata('place.options', klass);
2446
- return new Descriptor(klass, placeOptions);
2447
- }
2448
- Place.getDescriptor = getDescriptor;
2449
- })(Place || (Place = {}));
2450
-
2451
- /**
2452
- * @fileoverview added by tsickle
2453
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2454
- */
2455
- /**
2456
- * @record
2457
- * @template T
2458
- */
2459
- function ResolvedParameter() { }
2460
- if (false) {
2461
- /** @type {?} */
2462
- ResolvedParameter.prototype.parameterDef;
2463
- /** @type {?} */
2464
- ResolvedParameter.prototype.resolvedValue;
2465
- }
2466
- var ResolvedParameters = /** @class */ (function () {
2467
- function ResolvedParameters(parameters) {
2468
- this.parameters = parameters;
2469
- }
2470
- /**
2471
- * @template T
2472
- * @param {?} parameter
2473
- * @return {?}
2474
- */
2475
- ResolvedParameters.prototype.get = /**
2476
- * @template T
2477
- * @param {?} parameter
2478
- * @return {?}
2479
- */
2480
- function (parameter) {
2481
- /** @type {?} */
2482
- var resolved = this.parameters.find((/**
2483
- * @param {?} p
2484
- * @return {?}
2485
- */
2486
- function (p) { return p.parameterDef === parameter; }));
2487
- return resolved ? resolved.resolvedValue : null;
2488
- };
2489
- /**
2490
- * @template T
2491
- * @param {?} parameter
2492
- * @param {?} value
2493
- * @return {?}
2494
- */
2495
- ResolvedParameters.prototype.replace = /**
2496
- * @template T
2497
- * @param {?} parameter
2498
- * @param {?} value
2499
- * @return {?}
2500
- */
2501
- function (parameter, value) {
2502
- return new ResolvedParameters(this.parameters.filter((/**
2503
- * @param {?} p
2504
- * @return {?}
2505
- */
2506
- function (p) { return p.parameterDef !== parameter; })).concat({
2507
- parameterDef: parameter,
2508
- resolvedValue: value
2509
- }));
2510
- };
2511
- /**
2512
- * @protected
2513
- * @return {?}
2514
- */
2515
- ResolvedParameters.prototype.getFormattedRouteId = /**
2516
- * @protected
2517
- * @return {?}
2518
- */
2519
- function () {
2520
- /** @type {?} */
2521
- var routeIdParam = this.getRouteIdParam();
2522
- return routeIdParam ? routeIdParam.parameterDef.type.format(routeIdParam.resolvedValue) : null;
2523
- };
2524
- /**
2525
- * @private
2526
- * @return {?}
2527
- */
2528
- ResolvedParameters.prototype.getRouteIdParam = /**
2529
- * @private
2530
- * @return {?}
2531
- */
2532
- function () {
2533
- return this.parameters.find((/**
2534
- * @param {?} p
2535
- * @return {?}
2536
- */
2537
- function (p) { return p.parameterDef.isRouteId; }));
2538
- };
2539
- /**
2540
- * @protected
2541
- * @return {?}
2542
- */
2543
- ResolvedParameters.prototype.getFormattedParameters = /**
2544
- * @protected
2545
- * @return {?}
2546
- */
2547
- function () {
2548
- /** @type {?} */
2549
- var params = {};
2550
- /** @type {?} */
2551
- var routeIdParam = this.parameters.filter((/**
2552
- * @param {?} p
2553
- * @return {?}
2554
- */
2555
- function (p) { return !p.parameterDef.isRouteId; })).forEach((/**
2556
- * @param {?} p
2557
- * @return {?}
2558
- */
2559
- function (p) {
2560
- params[p.parameterDef.name] = p.parameterDef.type.format(p.resolvedValue);
2561
- }));
2562
- return params;
2563
- };
2564
- /**
2565
- * @return {?}
2566
- */
2567
- ResolvedParameters.prototype.hasRouteId = /**
2568
- * @return {?}
2569
- */
2570
- function () {
2571
- return !!this.getRouteIdParam();
2572
- };
2573
- /**
2574
- * @param {?} previous
2575
- * @param {?} router
2576
- * @param {?} activatedRoute
2577
- * @return {?}
2578
- */
2579
- ResolvedParameters.prototype.redirect = /**
2580
- * @param {?} previous
2581
- * @param {?} router
2582
- * @param {?} activatedRoute
2583
- * @return {?}
2584
- */
2585
- function (previous, router, activatedRoute) {
2586
- /** @type {?} */
2587
- var routeId = this.getFormattedRouteId();
2588
- /** @type {?} */
2589
- var relativePath = !!previous.hasRouteId() ? '..' : '.';
2590
- /** @type {?} */
2591
- var path = routeId ? [relativePath, routeId, this.getFormattedParameters()] : [relativePath, this.getFormattedParameters()];
2592
- router.navigate(path, {
2593
- relativeTo: activatedRoute
2594
- });
2595
- };
2596
- __decorate([
2597
- Trace(),
2598
- __metadata("design:type", Function),
2599
- __metadata("design:paramtypes", []),
2600
- __metadata("design:returntype", void 0)
2601
- ], ResolvedParameters.prototype, "getFormattedRouteId", null);
2602
- __decorate([
2603
- Trace(),
2604
- __metadata("design:type", Function),
2605
- __metadata("design:paramtypes", []),
2606
- __metadata("design:returntype", void 0)
2607
- ], ResolvedParameters.prototype, "getFormattedParameters", null);
2608
- __decorate([
2609
- Trace(),
2610
- __metadata("design:type", Function),
2611
- __metadata("design:paramtypes", [ResolvedParameters, Router, ActivatedRoute]),
2612
- __metadata("design:returntype", void 0)
2613
- ], ResolvedParameters.prototype, "redirect", null);
2614
- return ResolvedParameters;
2615
- }());
2616
- if (false) {
2617
- /** @type {?} */
2618
- ResolvedParameters.prototype.parameters;
2619
- }
2620
- var RouteParameterBindings = /** @class */ (function (_super) {
2621
- __extends(RouteParameterBindings, _super);
2622
- function RouteParameterBindings(component, router, activatedRoute) {
2623
- var _this = _super.call(this) || this;
2624
- _this.component = component;
2625
- _this.router = router;
2626
- _this.activatedRoute = activatedRoute;
2627
- _this._incomingRouteChange = new MutableValueModel(false);
2628
- _this.resolvedParameters = new MutableValueModel();
2629
- var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe;
2630
- _this.txo = new TransactionObserver(); //.onEvent(e => console.log(e.toString()));
2631
- //.onEvent(e => console.log(e.toString()));
2632
- /** @type {?} */
2633
- var routeParameterDefs = Klass.get(component).getMetadataList(RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY);
2634
- routeParameterDefs.forEach((/**
2635
- * @param {?} parameter
2636
- * @return {?}
2637
- */
2638
- function (parameter) { return _this.installBinding(parameter); }));
2639
- /** @type {?} */
2640
- var incomingResolvedRouteParameters = observe.valuesFrom(activatedRoute.paramMap)
2641
- .last()
2642
- .map((/**
2643
- * @param {?} params
2644
- * @return {?}
2645
- */
2646
- function (params) {
2647
- /** @type {?} */
2648
- var result = [];
2649
- routeParameterDefs.forEach((/**
2650
- * @param {?} parameterDef
2651
- * @return {?}
2652
- */
2653
- function (parameterDef) {
2654
- /** @type {?} */
2655
- var resolvedValue;
2656
- if (parameterDef.isArray) {
2657
- resolvedValue = params.getAll(parameterDef.name).map((/**
2658
- * @param {?} v
2659
- * @return {?}
2660
- */
2661
- function (v) { return parameterDef.type.parse(v); }));
2662
- }
2663
- else {
2664
- resolvedValue = parameterDef.type.parse(params.get(parameterDef.name));
2665
- }
2666
- result.push({ parameterDef: parameterDef, resolvedValue: resolvedValue });
2667
- }));
2668
- return new ResolvedParameters(result);
2669
- }));
2670
- incomingResolvedRouteParameters.subscribe((/**
2671
- * @param {?} resolvedParameters
2672
- * @return {?}
2673
- */
2674
- function (resolvedParameters) {
2675
- _this._incomingRouteChange.value = true;
2676
- _this.resolvedParameters.value = resolvedParameters;
2677
- _this._incomingRouteChange.value = false;
2678
- }));
2679
- when.valueOf(_this.resolvedParameters).changes((/**
2680
- * @param {?} params
2681
- * @param {?} previous
2682
- * @return {?}
2683
- */
2684
- function (params, previous) {
2685
- params.redirect(previous, router, activatedRoute);
2686
- }), { unless: _this.incomingRouteChange });
2687
- _this.txo.observe('incomingResolvedRouteParameters', incomingResolvedRouteParameters);
2688
- _this.txo.observe('this.routeIsChanging', _this.incomingRouteChange);
2689
- return _this;
2690
- }
2691
- Object.defineProperty(RouteParameterBindings.prototype, "incomingRouteChange", {
2692
- get: /**
2693
- * @return {?}
2694
- */
2695
- function () {
2696
- return this._incomingRouteChange.readonly;
2697
- },
2698
- enumerable: true,
2699
- configurable: true
2700
- });
2701
- /**
2702
- * @protected
2703
- * @template T
2704
- * @param {?} parameter
2705
- * @return {?}
2706
- */
2707
- RouteParameterBindings.prototype.installBinding = /**
2708
- * @protected
2709
- * @template T
2710
- * @param {?} parameter
2711
- * @return {?}
2712
- */
2713
- function (parameter) {
2714
- /** @type {?} */
2715
- var model = this.getModelFor(parameter);
2716
- // this.txo.observe(parameter.propertyName, model);
2717
- this.registerDisposable(new Binding(this.resolvedParameters, model, {
2718
- toRight: /**
2719
- * @param {?} parameters
2720
- * @return {?}
2721
- */
2722
- function (parameters) {
2723
- return parameters.get(parameter);
2724
- },
2725
- toLeft: /**
2726
- * @param {?} value
2727
- * @param {?=} currentParameters
2728
- * @return {?}
2729
- */
2730
- function (value, currentParameters) {
2731
- return currentParameters.replace(parameter, value);
2732
- }
2733
- }));
2734
- };
2735
- /**
2736
- * @private
2737
- * @template T
2738
- * @param {?} parameter
2739
- * @return {?}
2740
- */
2741
- RouteParameterBindings.prototype.getModelFor = /**
2742
- * @private
2743
- * @template T
2744
- * @param {?} parameter
2745
- * @return {?}
2746
- */
2747
- function (parameter) {
2748
- return this.component[parameter.propertyName];
2749
- };
2750
- return RouteParameterBindings;
2751
- }(GarbageCollector));
2752
- if (false) {
2753
- /** @type {?} */
2754
- RouteParameterBindings.prototype._incomingRouteChange;
2755
- /**
2756
- * @type {?}
2757
- * @private
2758
- */
2759
- RouteParameterBindings.prototype.txo;
2760
- /**
2761
- * @type {?}
2762
- * @private
2763
- */
2764
- RouteParameterBindings.prototype.resolvedParameters;
2765
- /**
2766
- * @type {?}
2767
- * @private
2768
- */
2769
- RouteParameterBindings.prototype.component;
2770
- /**
2771
- * @type {?}
2772
- * @private
2773
- */
2774
- RouteParameterBindings.prototype.router;
2775
- /**
2776
- * @type {?}
2777
- * @private
2778
- */
2779
- RouteParameterBindings.prototype.activatedRoute;
2780
- }
2781
- (function (RouteParameterBindings) {
2782
- RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY = Symbol('place:route:parameters');
2783
- })(RouteParameterBindings || (RouteParameterBindings = {}));
2784
-
2785
- /**
2786
- * @fileoverview added by tsickle
2787
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2788
- */
2789
- var AbstractPlaceComponent = /** @class */ (function (_super) {
2790
- __extends(AbstractPlaceComponent, _super);
2791
- function AbstractPlaceComponent(activatedRoute, router) {
2792
- var _this = _super.call(this) || this;
2793
- _this.activatedRoute = activatedRoute;
2794
- _this.routeBindingMediator = _this.registerDisposable(new RouteParameterBindings(_this, router, activatedRoute));
2795
- // See https://coolon.atlassian.net/browse/PEC-59
2796
- ((/** @type {?} */ ((/** @type {?} */ (_this.titleModel))))).setDefault(_this.placeConfig.title);
2797
- return _this;
2798
- }
2799
- Object.defineProperty(AbstractPlaceComponent.prototype, "placeConfig", {
2800
- get: /**
2801
- * @return {?}
2802
- */
2803
- function () {
2804
- return Place.getDescriptor((/** @type {?} */ ((/** @type {?} */ (this.constructor)))));
2805
- },
2806
- enumerable: true,
2807
- configurable: true
2808
- });
2809
- /**
2810
- * @return {?}
2811
- */
2812
- AbstractPlaceComponent.prototype.canDeactivate = /**
2813
- * @return {?}
2814
- */
2815
- function () {
2816
- return true;
2817
- };
2818
- __decorate([
2819
- UseDelegate(),
2820
- __metadata("design:type", MutableValueModel)
2821
- ], AbstractPlaceComponent.prototype, "titleModel", void 0);
2822
- __decorate([
2823
- Memoize(),
2824
- __metadata("design:type", Place.Descriptor),
2825
- __metadata("design:paramtypes", [])
2826
- ], AbstractPlaceComponent.prototype, "placeConfig", null);
2827
- return AbstractPlaceComponent;
2828
- }(DisposableComponent));
2829
- if (false) {
2830
- /** @type {?} */
2831
- AbstractPlaceComponent.prototype.titleModel;
2832
- /**
2833
- * @type {?}
2834
- * @private
2835
- */
2836
- AbstractPlaceComponent.prototype.routeBindingMediator;
2837
- /**
2838
- * @type {?}
2839
- * @protected
2840
- */
2841
- AbstractPlaceComponent.prototype.activatedRoute;
2842
- }
2843
-
2844
- /**
2845
- * @fileoverview added by tsickle
2846
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2847
- */
2848
- /**
2849
- * @record
2850
- */
2851
- function PlaceComponent() { }
2852
- if (false) {
2853
- /** @type {?} */
2854
- PlaceComponent.prototype.titleModel;
2855
- /**
2856
- * @return {?}
2857
- */
2858
- PlaceComponent.prototype.canDeactivate = function () { };
2859
- }
2860
-
2861
- /**
2862
- * @fileoverview added by tsickle
2863
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2864
- */
2865
- var LeavePlaceGuard = /** @class */ (function () {
2866
- function LeavePlaceGuard(router, injector) {
2867
- this.router = router;
2868
- this.injector = injector;
2869
- }
2870
- /**
2871
- * @param {?} component
2872
- * @param {?} currentRoute
2873
- * @param {?} currentState
2874
- * @param {?=} nextState
2875
- * @return {?}
2876
- */
2877
- LeavePlaceGuard.prototype.canDeactivate = /**
2878
- * @param {?} component
2879
- * @param {?} currentRoute
2880
- * @param {?} currentState
2881
- * @param {?=} nextState
2882
- * @return {?}
2883
- */
2884
- function (component, currentRoute, currentState, nextState) {
2885
- return component.canDeactivate();
2886
- };
2887
- LeavePlaceGuard.decorators = [
2888
- { type: Injectable, args: [{
2889
- providedIn: 'root'
2890
- },] }
2891
- ];
2892
- /** @nocollapse */
2893
- LeavePlaceGuard.ctorParameters = function () { return [
2894
- { type: Router },
2895
- { type: Injector }
2896
- ]; };
2897
- /** @nocollapse */ LeavePlaceGuard.ngInjectableDef = ɵɵdefineInjectable({ factory: function LeavePlaceGuard_Factory() { return new LeavePlaceGuard(ɵɵinject(Router), ɵɵinject(INJECTOR)); }, token: LeavePlaceGuard, providedIn: "root" });
2898
- return LeavePlaceGuard;
2899
- }());
2900
- if (false) {
2901
- /**
2902
- * @type {?}
2903
- * @private
2904
- */
2905
- LeavePlaceGuard.prototype.router;
2906
- /**
2907
- * @type {?}
2908
- * @private
2909
- */
2910
- LeavePlaceGuard.prototype.injector;
2911
- }
2912
-
2913
- /**
2914
- * @fileoverview added by tsickle
2915
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2916
- */
2917
- /**
2918
- * @abstract
2919
- * @template T, S
2920
- */
2921
- var /**
2922
- * @abstract
2923
- * @template T, S
2924
- */
2925
- Sanitiser = /** @class */ (function () {
2926
- function Sanitiser(parameterDef, snapshot, sanitiser) {
2927
- this.parameterDef = parameterDef;
2928
- this.snapshot = snapshot;
2929
- this.sanitiser = sanitiser;
2930
- }
2931
- /**
2932
- * @return {?}
2933
- */
2934
- Sanitiser.prototype.isRouteId = /**
2935
- * @return {?}
2936
- */
2937
- function () {
2938
- return this.parameterDef.isRouteId;
2939
- };
2940
- Object.defineProperty(Sanitiser.prototype, "valueChanged", {
2941
- get: /**
2942
- * @return {?}
2943
- */
2944
- function () {
2945
- return !isNil(this.initialValue) && this.hasChanged(this.initialValue, this.sanitisedValue);
2946
- },
2947
- enumerable: true,
2948
- configurable: true
2949
- });
2950
- Object.defineProperty(Sanitiser.prototype, "sanitisedValue", {
2951
- get: /**
2952
- * @return {?}
2953
- */
2954
- function () {
2955
- return this._sanitisedValue;
2956
- },
2957
- enumerable: true,
2958
- configurable: true
2959
- });
2960
- /**
2961
- * @return {?}
2962
- */
2963
- Sanitiser.prototype.sanitize = /**
2964
- * @return {?}
2965
- */
2966
- function () {
2967
- return __awaiter(this, void 0, void 0, function () {
2968
- var _a;
2969
- return __generator(this, function (_b) {
2970
- switch (_b.label) {
2971
- case 0:
2972
- if (!this.sanitiser) return [3 /*break*/, 2];
2973
- this.initialValue = this.readFrom(this.snapshot);
2974
- _a = this;
2975
- return [4 /*yield*/, this.sanitiser.sanitise(this.initialValue)];
2976
- case 1:
2977
- _a._sanitisedValue = _b.sent();
2978
- if (this.initialValue !== this._sanitisedValue) {
2979
- return [2 /*return*/, false];
2980
- }
2981
- _b.label = 2;
2982
- case 2: return [2 /*return*/, true];
2983
- }
2984
- });
2985
- });
2986
- };
2987
- return Sanitiser;
2988
- }());
2989
- if (false) {
2990
- /**
2991
- * @type {?}
2992
- * @private
2993
- */
2994
- Sanitiser.prototype.initialValue;
2995
- /**
2996
- * @type {?}
2997
- * @private
2998
- */
2999
- Sanitiser.prototype._sanitisedValue;
3000
- /** @type {?} */
3001
- Sanitiser.prototype.parameterDef;
3002
- /** @type {?} */
3003
- Sanitiser.prototype.snapshot;
3004
- /** @type {?} */
3005
- Sanitiser.prototype.sanitiser;
3006
- /**
3007
- * @abstract
3008
- * @protected
3009
- * @param {?} snapshot
3010
- * @return {?}
3011
- */
3012
- Sanitiser.prototype.readFrom = function (snapshot) { };
3013
- /**
3014
- * @abstract
3015
- * @protected
3016
- * @param {?} initialValue
3017
- * @param {?} sanitisedValue
3018
- * @return {?}
3019
- */
3020
- Sanitiser.prototype.hasChanged = function (initialValue, sanitisedValue) { };
3021
- /**
3022
- * @abstract
3023
- * @param {?} dest
3024
- * @return {?}
3025
- */
3026
- Sanitiser.prototype.injectRouteParam = function (dest) { };
3027
- }
3028
- var RouteParameterSanitiser = /** @class */ (function () {
3029
- function RouteParameterSanitiser(parameterDefs, snapshot, injector) {
3030
- var _this = this;
3031
- this.parameterDefs = parameterDefs;
3032
- this.snapshot = snapshot;
3033
- this.injector = injector;
3034
- this.parameterSanitisers = [];
3035
- /** @type {?} */
3036
- var sanitisers = parameterDefs.map((/**
3037
- * @param {?} def
3038
- * @return {?}
3039
- */
3040
- function (def) {
3041
- return def.isArray ?
3042
- new Sanitiser.Array(def, snapshot, _this.getSanitiser(def)) :
3043
- new Sanitiser.Value(def, snapshot, _this.getSanitiser(def));
3044
- }));
3045
- this.routeIdSanitiser = sanitisers.find((/**
3046
- * @param {?} p
3047
- * @return {?}
3048
- */
3049
- function (p) { return p.isRouteId(); }));
3050
- this.parameterSanitisers = sanitisers.filter((/**
3051
- * @param {?} p
3052
- * @return {?}
3053
- */
3054
- function (p) { return !p.isRouteId(); }));
3055
- }
3056
- /**
3057
- * @return {?}
3058
- */
3059
- RouteParameterSanitiser.prototype.sanitise = /**
3060
- * @return {?}
3061
- */
3062
- function () {
3063
- return __awaiter(this, void 0, void 0, function () {
3064
- var e_1, _a, _b, _c, sanitiser, e_1_1;
3065
- return __generator(this, function (_d) {
3066
- switch (_d.label) {
3067
- case 0:
3068
- if (!this.routeIdSanitiser) return [3 /*break*/, 2];
3069
- return [4 /*yield*/, this.routeIdSanitiser.sanitize()];
3070
- case 1:
3071
- _d.sent();
3072
- if (this.routeIdSanitiser.valueChanged) {
3073
- // if the route id isn't ok we redirect immediately as the query params may need to be sanitised in the
3074
- // context of the route id.
3075
- return [2 /*return*/, false];
3076
- }
3077
- _d.label = 2;
3078
- case 2:
3079
- _d.trys.push([2, 7, 8, 9]);
3080
- _b = __values(this.parameterSanitisers), _c = _b.next();
3081
- _d.label = 3;
3082
- case 3:
3083
- if (!!_c.done) return [3 /*break*/, 6];
3084
- sanitiser = _c.value;
3085
- return [4 /*yield*/, sanitiser.sanitize()];
3086
- case 4:
3087
- _d.sent();
3088
- _d.label = 5;
3089
- case 5:
3090
- _c = _b.next();
3091
- return [3 /*break*/, 3];
3092
- case 6: return [3 /*break*/, 9];
3093
- case 7:
3094
- e_1_1 = _d.sent();
3095
- e_1 = { error: e_1_1 };
3096
- return [3 /*break*/, 9];
3097
- case 8:
3098
- try {
3099
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
3100
- }
3101
- finally { if (e_1) throw e_1.error; }
3102
- return [7 /*endfinally*/];
3103
- case 9: return [2 /*return*/, !this.parameterSanitisers.find((/**
3104
- * @param {?} s
3105
- * @return {?}
3106
- */
3107
- function (s) { return s.valueChanged; }))];
3108
- }
3109
- });
3110
- });
3111
- };
3112
- /**
3113
- * @param {?} router
3114
- * @return {?}
3115
- */
3116
- RouteParameterSanitiser.prototype.redirect = /**
3117
- * @param {?} router
3118
- * @return {?}
3119
- */
3120
- function (router) {
3121
- assert.isTruthy(this.parameterSanitisers.length !== 0);
3122
- if (this.routeIdSanitiser.valueChanged) {
3123
- return router.navigate(['..', this.routeIdSanitiser.sanitisedValue]);
3124
- }
3125
- else {
3126
- /** @type {?} */
3127
- var routeParams_1 = {};
3128
- this.parameterSanitisers.forEach((/**
3129
- * @param {?} s
3130
- * @return {?}
3131
- */
3132
- function (s) { return s.injectRouteParam(routeParams_1); }));
3133
- return router.navigate(['.', routeParams_1]);
3134
- }
3135
- };
3136
- /**
3137
- * @private
3138
- * @template T, S
3139
- * @param {?} def
3140
- * @return {?}
3141
- */
3142
- RouteParameterSanitiser.prototype.getSanitiser = /**
3143
- * @private
3144
- * @template T, S
3145
- * @param {?} def
3146
- * @return {?}
3147
- */
3148
- function (def) {
3149
- return def.sanitiser ? this.injector.get(def.sanitiser, new def.sanitiser()) : null;
3150
- };
3151
- __decorate([
3152
- Memoize$1(),
3153
- __metadata("design:type", Function),
3154
- __metadata("design:paramtypes", [Object]),
3155
- __metadata("design:returntype", Object)
3156
- ], RouteParameterSanitiser.prototype, "getSanitiser", null);
3157
- return RouteParameterSanitiser;
3158
- }());
3159
- if (false) {
3160
- /**
3161
- * @type {?}
3162
- * @private
3163
- */
3164
- RouteParameterSanitiser.prototype.routeIdSanitiser;
3165
- /**
3166
- * @type {?}
3167
- * @private
3168
- */
3169
- RouteParameterSanitiser.prototype.parameterSanitisers;
3170
- /** @type {?} */
3171
- RouteParameterSanitiser.prototype.parameterDefs;
3172
- /** @type {?} */
3173
- RouteParameterSanitiser.prototype.snapshot;
3174
- /** @type {?} */
3175
- RouteParameterSanitiser.prototype.injector;
3176
- }
3177
- (function (Sanitiser) {
3178
- /**
3179
- * @template T
3180
- */
3181
- var /**
3182
- * @template T
3183
- */
3184
- Value = /** @class */ (function (_super) {
3185
- __extends(Value, _super);
3186
- function Value() {
3187
- return _super !== null && _super.apply(this, arguments) || this;
3188
- }
3189
- /**
3190
- * @param {?} snapshot
3191
- * @return {?}
3192
- */
3193
- Value.prototype.readFrom = /**
3194
- * @param {?} snapshot
3195
- * @return {?}
3196
- */
3197
- function (snapshot) {
3198
- /** @type {?} */
3199
- var rawValue = this.parameterDef.isRouteId ?
3200
- snapshot.paramMap.get(this.parameterDef.name) :
3201
- snapshot.queryParamMap.get(this.parameterDef.name);
3202
- return this.parameterDef.type.parse(rawValue);
3203
- };
3204
- /**
3205
- * @protected
3206
- * @param {?} initialValue
3207
- * @param {?} sanitisedValue
3208
- * @return {?}
3209
- */
3210
- Value.prototype.hasChanged = /**
3211
- * @protected
3212
- * @param {?} initialValue
3213
- * @param {?} sanitisedValue
3214
- * @return {?}
3215
- */
3216
- function (initialValue, sanitisedValue) {
3217
- return initialValue !== sanitisedValue;
3218
- };
3219
- /**
3220
- * @param {?} dest
3221
- * @return {?}
3222
- */
3223
- Value.prototype.injectRouteParam = /**
3224
- * @param {?} dest
3225
- * @return {?}
3226
- */
3227
- function (dest) {
3228
- dest[this.parameterDef.name] = this.parameterDef.type.format(this.sanitisedValue);
3229
- };
3230
- return Value;
3231
- }(Sanitiser));
3232
- Sanitiser.Value = Value;
3233
- /**
3234
- * @template T
3235
- */
3236
- var /**
3237
- * @template T
3238
- */
3239
- Array = /** @class */ (function (_super) {
3240
- __extends(Array, _super);
3241
- function Array() {
3242
- return _super !== null && _super.apply(this, arguments) || this;
3243
- }
3244
- /**
3245
- * @param {?} snapshot
3246
- * @return {?}
3247
- */
3248
- Array.prototype.readFrom = /**
3249
- * @param {?} snapshot
3250
- * @return {?}
3251
- */
3252
- function (snapshot) {
3253
- var _this = this;
3254
- /** @type {?} */
3255
- var rawValues = snapshot.queryParamMap.getAll(this.parameterDef.name);
3256
- return rawValues.map((/**
3257
- * @param {?} value
3258
- * @return {?}
3259
- */
3260
- function (value) { return _this.parameterDef.type.parse(value); }));
3261
- };
3262
- /**
3263
- * @protected
3264
- * @param {?} initialValue
3265
- * @param {?} sanitisedValue
3266
- * @return {?}
3267
- */
3268
- Array.prototype.hasChanged = /**
3269
- * @protected
3270
- * @param {?} initialValue
3271
- * @param {?} sanitisedValue
3272
- * @return {?}
3273
- */
3274
- function (initialValue, sanitisedValue) {
3275
- return initialValue !== sanitisedValue;
3276
- };
3277
- /**
3278
- * @param {?} dest
3279
- * @return {?}
3280
- */
3281
- Array.prototype.injectRouteParam = /**
3282
- * @param {?} dest
3283
- * @return {?}
3284
- */
3285
- function (dest) {
3286
- var _this = this;
3287
- dest[this.parameterDef.name] = this.sanitisedValue.map((/**
3288
- * @param {?} v
3289
- * @return {?}
3290
- */
3291
- function (v) { return _this.parameterDef.type.format(v); }));
3292
- };
3293
- return Array;
3294
- }(Sanitiser));
3295
- Sanitiser.Array = Array;
3296
- })(Sanitiser || (Sanitiser = {}));
3297
-
3298
- /**
3299
- * @fileoverview added by tsickle
3300
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3301
- */
3302
- var PlaceRouteGuard = /** @class */ (function () {
3303
- function PlaceRouteGuard(router, injector) {
3304
- this.router = router;
3305
- this.injector = injector;
3306
- }
3307
- /**
3308
- * @param {?} route
3309
- * @param {?} state
3310
- * @return {?}
3311
- */
3312
- PlaceRouteGuard.prototype.canActivate = /**
3313
- * @param {?} route
3314
- * @param {?} state
3315
- * @return {?}
3316
- */
3317
- function (route, state) {
3318
- var _this = this;
3319
- /** @type {?} */
3320
- var routeParameters = Klass.get(route.component).getMetadataList(RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY);
3321
- /** @type {?} */
3322
- var sanitiser = new RouteParameterSanitiser(routeParameters, route, this.injector);
3323
- return sanitiser.sanitise().then((/**
3324
- * @param {?} proceed
3325
- * @return {?}
3326
- */
3327
- function (proceed) {
3328
- if (!proceed) {
3329
- sanitiser.redirect(_this.router);
3330
- }
3331
- return proceed;
3332
- }));
3333
- };
3334
- PlaceRouteGuard.decorators = [
3335
- { type: Injectable, args: [{
3336
- providedIn: 'root'
3337
- },] }
3338
- ];
3339
- /** @nocollapse */
3340
- PlaceRouteGuard.ctorParameters = function () { return [
3341
- { type: Router },
3342
- { type: Injector }
3343
- ]; };
3344
- /** @nocollapse */ PlaceRouteGuard.ngInjectableDef = ɵɵdefineInjectable({ factory: function PlaceRouteGuard_Factory() { return new PlaceRouteGuard(ɵɵinject(Router), ɵɵinject(INJECTOR)); }, token: PlaceRouteGuard, providedIn: "root" });
3345
- __decorate([
3346
- Trace(),
3347
- __metadata("design:type", Function),
3348
- __metadata("design:paramtypes", [ActivatedRouteSnapshot, RouterStateSnapshot]),
3349
- __metadata("design:returntype", Object)
3350
- ], PlaceRouteGuard.prototype, "canActivate", null);
3351
- return PlaceRouteGuard;
3352
- }());
3353
- if (false) {
3354
- /**
3355
- * @type {?}
3356
- * @private
3357
- */
3358
- PlaceRouteGuard.prototype.router;
3359
- /**
3360
- * @type {?}
3361
- * @private
3362
- */
3363
- PlaceRouteGuard.prototype.injector;
3364
- }
3365
-
3366
- /**
3367
- * @fileoverview added by tsickle
3368
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3369
- */
3370
- /**
3371
- * @record
3372
- */
3373
- function JsonArray() { }
3374
- /**
3375
- * @record
3376
- */
3377
- function JsonMap() { }
3378
-
3379
- /**
3380
- * @fileoverview added by tsickle
3381
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3382
- */
3383
- /**
3384
- * @record
3385
- * @template T
3386
- */
3387
- function ParameterOptions() { }
3388
- if (false) {
3389
- /** @type {?|undefined} */
3390
- ParameterOptions.prototype.as;
3391
- /** @type {?|undefined} */
3392
- ParameterOptions.prototype.sanitiser;
3393
- }
3394
- /**
3395
- * @record
3396
- * @template T
3397
- */
3398
- function ListParameterOptions() { }
3399
- if (false) {
3400
- /** @type {?|undefined} */
3401
- ListParameterOptions.prototype.as;
3402
- /** @type {?|undefined} */
3403
- ListParameterOptions.prototype.listSanitiser;
3404
- }
3405
- /**
3406
- * @template T
3407
- * @param {?} type
3408
- * @param {?=} options
3409
- * @return {?}
3410
- */
3411
- function RouteId(type, options) {
3412
- // assert.isTruthy(type.isValid());
3413
- return (/**
3414
- * @param {?} prototype
3415
- * @param {?} propertyKey
3416
- * @return {?}
3417
- */
3418
- function (prototype, propertyKey) {
3419
- /** @type {?} */
3420
- var param = createDefinition(propertyKey, type, options, true);
3421
- Klass.get(prototype).addToOwnMetadataList(RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY, param);
3422
- UseDelegate()(prototype, propertyKey);
3423
- });
3424
- }
3425
- /**
3426
- * @deprecated use RouteParameter instead.
3427
- * @template T
3428
- * @param {?} type
3429
- * @param {?=} options
3430
- * @return {?}
3431
- */
3432
- function QueryParameter(type, options) {
3433
- return (/**
3434
- * @param {?} prototype
3435
- * @param {?} propertyKey
3436
- * @return {?}
3437
- */
3438
- function (prototype, propertyKey) {
3439
- /** @type {?} */
3440
- var param = createDefinition(propertyKey, type, options, false);
3441
- Klass.get(prototype).addToOwnMetadataList(RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY, param);
3442
- UseDelegate()(prototype, propertyKey);
3443
- });
3444
- }
3445
- /**
3446
- * @template T
3447
- * @param {?} type
3448
- * @param {?=} options
3449
- * @return {?}
3450
- */
3451
- function RouteParameter(type, options) {
3452
- // assert.isTruthy(type.isValid());
3453
- return (/**
3454
- * @param {?} prototype
3455
- * @param {?} propertyKey
3456
- * @return {?}
3457
- */
3458
- function (prototype, propertyKey) {
3459
- /** @type {?} */
3460
- var param = createDefinition(propertyKey, type, options, false);
3461
- Klass.get(prototype).addToOwnMetadataList(RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY, param);
3462
- UseDelegate()(prototype, propertyKey);
3463
- });
3464
- }
3465
- /**
3466
- * @deprecated use RouteParameterList instead
3467
- * @template E
3468
- * @param {?} elementType
3469
- * @param {?=} options
3470
- * @return {?}
3471
- */
3472
- function QueryParameterList(elementType, options) {
3473
- // assert.isTruthy(type.isValid());
3474
- return (/**
3475
- * @param {?} prototype
3476
- * @param {?} propertyKey
3477
- * @return {?}
3478
- */
3479
- function (prototype, propertyKey) {
3480
- /** @type {?} */
3481
- var param = createArrayDefinition(propertyKey, elementType, options);
3482
- Klass.get(prototype).addToOwnMetadataList(RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY, param);
3483
- UseDelegate()(prototype, propertyKey);
3484
- });
3485
- }
3486
- /**
3487
- * @template E
3488
- * @param {?} elementType
3489
- * @param {?=} options
3490
- * @return {?}
3491
- */
3492
- function RouteParameterList(elementType, options) {
3493
- // assert.isTruthy(type.isValid());
3494
- return (/**
3495
- * @param {?} prototype
3496
- * @param {?} propertyKey
3497
- * @return {?}
3498
- */
3499
- function (prototype, propertyKey) {
3500
- /** @type {?} */
3501
- var param = createArrayDefinition(propertyKey, elementType, options);
3502
- Klass.get(prototype).addToOwnMetadataList(RouteParameterBindings.ROUTE_PARAMETER_LIST_KEY, param);
3503
- UseDelegate()(prototype, propertyKey);
3504
- });
3505
- }
3506
- /**
3507
- * @template T
3508
- * @param {?} propertyName
3509
- * @param {?} type
3510
- * @param {?} options
3511
- * @param {?} routeId
3512
- * @return {?}
3513
- */
3514
- function createDefinition(propertyName, type, options, routeId) {
3515
- /** @type {?} */
3516
- var opts = Opts.get(options);
3517
- /** @type {?} */
3518
- var propertyNameAsString = assert.notNil(propertyName).toString();
3519
- /** @type {?} */
3520
- var def = {
3521
- name: opts.getOptional('as', propertyNameAsString),
3522
- propertyName: propertyNameAsString,
3523
- type: assert.notNil(type),
3524
- sanitiser: opts.getOptional('sanitiser', null),
3525
- isRouteId: routeId,
3526
- isArray: false
3527
- };
3528
- return def;
3529
- }
3530
- /**
3531
- * @template T
3532
- * @param {?} propertyName
3533
- * @param {?} type
3534
- * @param {?} options
3535
- * @return {?}
3536
- */
3537
- function createArrayDefinition(propertyName, type, options) {
3538
- /** @type {?} */
3539
- var opts = Opts.get(options);
3540
- /** @type {?} */
3541
- var propertyNameAsString = assert.notNil(propertyName).toString();
3542
- /** @type {?} */
3543
- var def = {
3544
- name: opts.getOptional('as', propertyNameAsString),
3545
- propertyName: propertyNameAsString,
3546
- type: assert.notNil(type),
3547
- sanitiser: opts.getOptional('listSanitiser', null),
3548
- isRouteId: false,
3549
- isArray: true
3550
- };
3551
- return def;
3552
- }
3553
-
3554
- /**
3555
- * @fileoverview added by tsickle
3556
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3557
- */
3558
- /**
3559
- * @record
3560
- * @template E, S
3561
- */
3562
- function ParameterDefinition() { }
3563
- if (false) {
3564
- /** @type {?} */
3565
- ParameterDefinition.prototype.name;
3566
- /** @type {?} */
3567
- ParameterDefinition.prototype.propertyName;
3568
- /** @type {?} */
3569
- ParameterDefinition.prototype.type;
3570
- /** @type {?} */
3571
- ParameterDefinition.prototype.sanitiser;
3572
- /** @type {?} */
3573
- ParameterDefinition.prototype.isRouteId;
3574
- /** @type {?} */
3575
- ParameterDefinition.prototype.isArray;
3576
- }
3577
-
3578
- /**
3579
- * @fileoverview added by tsickle
3580
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3581
- */
3582
- /**
3583
- * @record
3584
- * @template T
3585
- */
3586
- function ParameterSanitiser() { }
3587
- if (false) {
3588
- /**
3589
- * @param {?} value
3590
- * @return {?}
3591
- */
3592
- ParameterSanitiser.prototype.sanitise = function (value) { };
3593
- }
3594
-
3595
- /**
3596
- * @fileoverview added by tsickle
3597
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3598
- */
3599
- // WARNING: interface has both a type and a value, skipping emit
3600
- var ParameterType;
3601
- (function (ParameterType) {
3602
- var StringType = /** @class */ (function () {
3603
- function StringType() {
3604
- }
3605
- /**
3606
- * @param {?} value
3607
- * @return {?}
3608
- */
3609
- StringType.prototype.format = /**
3610
- * @param {?} value
3611
- * @return {?}
3612
- */
3613
- function (value) {
3614
- return value;
3615
- };
3616
- /**
3617
- * @param {?} value
3618
- * @return {?}
3619
- */
3620
- StringType.prototype.parse = /**
3621
- * @param {?} value
3622
- * @return {?}
3623
- */
3624
- function (value) {
3625
- return value;
3626
- };
3627
- return StringType;
3628
- }());
3629
- var NumberType = /** @class */ (function () {
3630
- function NumberType() {
3631
- }
3632
- /**
3633
- * @param {?} value
3634
- * @return {?}
3635
- */
3636
- NumberType.prototype.format = /**
3637
- * @param {?} value
3638
- * @return {?}
3639
- */
3640
- function (value) {
3641
- return "" + value;
3642
- };
3643
- /**
3644
- * @param {?} value
3645
- * @return {?}
3646
- */
3647
- NumberType.prototype.parse = /**
3648
- * @param {?} value
3649
- * @return {?}
3650
- */
3651
- function (value) {
3652
- return +value;
3653
- };
3654
- return NumberType;
3655
- }());
3656
- ParameterType.STRING = new StringType();
3657
- ParameterType.NUMBER = new NumberType();
3658
- })(ParameterType || (ParameterType = {}));
3659
-
3660
- /**
3661
- * @fileoverview added by tsickle
3662
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3663
- */
3664
-
3665
- /**
3666
- * @fileoverview added by tsickle
3667
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3668
- */
3669
-
3670
- /**
3671
- * @fileoverview added by tsickle
3672
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3673
- */
3674
-
3675
- /**
3676
- * @fileoverview added by tsickle
3677
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3678
- */
3679
-
3680
- 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, NavComponent, NumberInputComponent, ParameterType, PasswordInputComponent, Place, PlaceModule, PlaceOutletComponent, PlaceRouteGuard, PlaceService, Point, QueryParameter, QueryParameterList, ResizeAwareComponent, RouteId, RouteParameter, RouteParameterBindings, RouteParameterList, RouteParameterSanitiser, Sanitiser, SelectInputComponent, StringInputComponent, 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, NavComponent 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 };
3681
- //# sourceMappingURL=coolon-angular-ui-powerups.js.map