@coolon/angular-ui-powerups 0.0.1

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