@coolon/angular-ui-powerups 0.0.71 → 0.0.74

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 (102) hide show
  1. package/bundles/coolon-angular-ui-powerups.umd.js +1514 -1260
  2. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  3. package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  5. package/coolon-angular-ui-powerups.d.ts +34 -32
  6. package/coolon-angular-ui-powerups.metadata.json +1 -1
  7. package/esm2015/coolon-angular-ui-powerups.js +34 -32
  8. package/esm2015/index.js +2 -2
  9. package/esm2015/lib/angular-ui-powerups.module.js +8 -22
  10. package/esm2015/lib/components/components.module.js +47 -0
  11. package/esm2015/lib/components/forms/number-input/number-input.component.js +2 -2
  12. package/esm2015/lib/components/forms/password-input/password-input.component.js +2 -2
  13. package/esm2015/lib/components/forms/select-input/select-input.component.js +2 -2
  14. package/esm2015/lib/components/forms/string-input/string-input.component.js +2 -2
  15. package/esm2015/lib/components/index.js +2 -1
  16. package/esm2015/lib/components/noop/noop.component.js +2 -2
  17. package/esm2015/lib/directives/directives.module.js +36 -0
  18. package/esm2015/lib/directives/index.js +2 -1
  19. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +3 -3
  20. package/esm2015/lib/interaction/components/activity-outlet/activity-outlet.component.js +2 -2
  21. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js +3 -3
  22. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +3 -3
  23. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +3 -3
  24. package/esm2015/lib/interaction/components/interaction-outlet/interaction-outlet.component.js +2 -2
  25. package/esm2015/lib/interaction/services/dialog-interaction.service.js +3 -1
  26. package/esm2015/lib/place/components/abstract-place-navigation.component.js +38 -3
  27. package/esm2015/lib/place/components/busy-overlay/busy-overlay.component.js +2 -2
  28. package/esm2015/lib/place/components/empty-state/empty-state.component.js +3 -3
  29. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +3 -3
  30. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +64 -29
  31. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +3 -3
  32. package/esm2015/lib/place/index.js +2 -2
  33. package/esm2015/lib/place/place-definition.js +2 -6
  34. package/esm2015/lib/place/place-router.js +7 -9
  35. package/esm2015/lib/place/place.decorator.js +4 -4
  36. package/esm2015/lib/place/place.module.js +4 -2
  37. package/esm2015/lib/place/route/guards/enter-place-guard.service.js +283 -0
  38. package/esm2015/lib/place/route/guards/leave-place.guard.js +70 -50
  39. package/esm2015/lib/place/visit.js +10 -1
  40. package/esm2015/public_api.js +4 -4
  41. package/esm5/coolon-angular-ui-powerups.js +34 -32
  42. package/esm5/index.js +2 -2
  43. package/esm5/lib/angular-ui-powerups.module.js +8 -22
  44. package/esm5/lib/components/components.module.js +51 -0
  45. package/esm5/lib/components/forms/number-input/number-input.component.js +2 -2
  46. package/esm5/lib/components/forms/password-input/password-input.component.js +2 -2
  47. package/esm5/lib/components/forms/select-input/select-input.component.js +2 -2
  48. package/esm5/lib/components/forms/string-input/string-input.component.js +2 -2
  49. package/esm5/lib/components/index.js +2 -1
  50. package/esm5/lib/components/noop/noop.component.js +2 -2
  51. package/esm5/lib/directives/directives.module.js +40 -0
  52. package/esm5/lib/directives/index.js +2 -1
  53. package/esm5/lib/interaction/components/activity-container/activity-container.component.js +3 -3
  54. package/esm5/lib/interaction/components/activity-outlet/activity-outlet.component.js +2 -2
  55. package/esm5/lib/interaction/components/alert-dialog/alert-dialog.component.js +3 -3
  56. package/esm5/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +3 -3
  57. package/esm5/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +3 -3
  58. package/esm5/lib/interaction/components/interaction-outlet/interaction-outlet.component.js +2 -2
  59. package/esm5/lib/interaction/services/dialog-interaction.service.js +3 -1
  60. package/esm5/lib/place/components/abstract-place-navigation.component.js +38 -3
  61. package/esm5/lib/place/components/busy-overlay/busy-overlay.component.js +2 -2
  62. package/esm5/lib/place/components/empty-state/empty-state.component.js +3 -3
  63. package/esm5/lib/place/components/list-place-nav/list-place-nav.component.js +3 -3
  64. package/esm5/lib/place/components/place-outlet/place-outlet.component.js +72 -34
  65. package/esm5/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +3 -3
  66. package/esm5/lib/place/index.js +2 -2
  67. package/esm5/lib/place/place-definition.js +2 -5
  68. package/esm5/lib/place/place-router.js +11 -10
  69. package/esm5/lib/place/place.decorator.js +4 -4
  70. package/esm5/lib/place/place.module.js +4 -2
  71. package/esm5/lib/place/route/guards/enter-place-guard.service.js +319 -0
  72. package/esm5/lib/place/route/guards/leave-place.guard.js +72 -8
  73. package/esm5/lib/place/visit.js +13 -1
  74. package/esm5/public_api.js +4 -4
  75. package/fesm2015/coolon-angular-ui-powerups.js +1176 -992
  76. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  77. package/fesm5/coolon-angular-ui-powerups.js +1444 -1194
  78. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  79. package/lib/components/components.module.d.ts +2 -0
  80. package/lib/components/index.d.ts +1 -0
  81. package/lib/directives/directives.module.d.ts +2 -0
  82. package/lib/directives/index.d.ts +1 -0
  83. package/lib/place/components/abstract-place-navigation.component.d.ts +7 -1
  84. package/lib/place/components/place-outlet/place-outlet.component.d.ts +7 -5
  85. package/lib/place/index.d.ts +1 -1
  86. package/lib/place/place-definition.d.ts +1 -2
  87. package/lib/place/place.decorator.d.ts +1 -1
  88. package/lib/place/route/guards/{place-route.guard.d.ts → enter-place-guard.service.d.ts} +6 -4
  89. package/lib/place/visit.d.ts +2 -0
  90. package/package.json +1 -1
  91. package/schematics/place-routes/place-builder.js +0 -1
  92. package/schematics/place-routes/place-builder.js.map +1 -1
  93. package/schematics/place-routes/place-class-scanner.d.ts +1 -0
  94. package/schematics/place-routes/place-class-scanner.js +7 -2
  95. package/schematics/place-routes/place-class-scanner.js.map +1 -1
  96. package/schematics/place-routes/place-def.d.ts +4 -3
  97. package/schematics/place-routes/place-def.js +40 -25
  98. package/schematics/place-routes/place-def.js.map +1 -1
  99. package/schematics/place-routes/templates/place-routes.ts.template +1 -1
  100. package/styles/styles.scss +1 -1
  101. package/esm2015/lib/place/route/guards/place-route.guard.js +0 -243
  102. package/esm5/lib/place/route/guards/place-route.guard.js +0 -273
@@ -204,70 +204,35 @@
204
204
  return (mod && mod.__esModule) ? mod : { default: mod };
205
205
  }
206
206
 
207
- /**
208
- * @fileoverview added by tsickle
209
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
210
- */
211
- var DisposableComponent = /** @class */ (function (_super) {
212
- __extends(DisposableComponent, _super);
213
- function DisposableComponent() {
214
- return _super !== null && _super.apply(this, arguments) || this;
215
- }
216
- /**
217
- * @return {?}
218
- */
219
- DisposableComponent.prototype.ngOnDestroy = /**
220
- * @return {?}
221
- */
222
- function () {
223
- this.dispose();
224
- };
225
- return DisposableComponent;
226
- }(pectin.GarbageCollector));
227
-
228
207
  /**
229
208
  * @fileoverview added by tsickle
230
209
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
231
210
  */
232
211
  /**
233
- * @abstract
234
- * @template T
212
+ * @template P
235
213
  */
236
- var AbstractInputComponent = /** @class */ (function (_super) {
237
- __extends(AbstractInputComponent, _super);
238
- function AbstractInputComponent() {
214
+ var CommandDirective = /** @class */ (function (_super) {
215
+ __extends(CommandDirective, _super);
216
+ function CommandDirective(elementRef) {
239
217
  var _this = _super.call(this) || this;
240
- _this.valueModel = new pectin.DelegatingFormValueModel();
241
- // TODO: fix this.
242
- // tslint:disable-next-line:no-output-native
243
- _this.focus = new core.EventEmitter();
244
- // tslint:disable-next-line:no-output-native
245
- _this.blur = new core.EventEmitter();
246
- // tslint:disable-next-line:no-output-native
247
- _this.enterKey = new core.EventEmitter();
248
- // tslint:disable-next-line:no-output-native
249
- _this.escapeKey = new core.EventEmitter();
250
- /** @type {?} */
251
- var self = _this;
252
- _this.errorStateMatcher = {
253
- isErrorState: /**
254
- * @param {?} control
255
- * @param {?} form
256
- * @return {?}
257
- */
258
- function (control, form) {
259
- return self.hasErrors();
260
- }
261
- };
218
+ _this.elementRef = elementRef;
219
+ _this._commandParameterProvided = false;
262
220
  return _this;
263
221
  }
264
- Object.defineProperty(AbstractInputComponent.prototype, "userValueModel", {
222
+ Object.defineProperty(CommandDirective.prototype, "commandParameter", {
223
+ get: /**
224
+ * @return {?}
225
+ */
226
+ function () {
227
+ return this._commandParameter;
228
+ },
265
229
  set: /**
266
- * @param {?} model
230
+ * @param {?} value
267
231
  * @return {?}
268
232
  */
269
- function (model) {
270
- this.valueModel.setDelegate(model);
233
+ function (value) {
234
+ this._commandParameterProvided = true;
235
+ this._commandParameter = value;
271
236
  },
272
237
  enumerable: true,
273
238
  configurable: true
@@ -275,348 +240,396 @@
275
240
  /**
276
241
  * @return {?}
277
242
  */
278
- AbstractInputComponent.prototype.notifyClick = /**
243
+ CommandDirective.prototype.ngOnInit = /**
279
244
  * @return {?}
280
245
  */
281
246
  function () {
282
- this.safelyInvoke(this.clickCommand);
247
+ pectin.assert.notNil(this.pectinCommand);
248
+ if (this.pectinCommand instanceof pectin.UnaryCommand) {
249
+ if (!this._commandParameterProvided) {
250
+ pectin.lang.illegalState('UnaryCommands required the command parameter to be specified.');
251
+ }
252
+ }
253
+ else {
254
+ if (this._commandParameterProvided) {
255
+ pectin.lang.illegalState('command parameters are only supported by UnaryCommands');
256
+ }
257
+ }
283
258
  };
284
259
  /**
285
260
  * @return {?}
286
261
  */
287
- AbstractInputComponent.prototype.notifyFocusIn = /**
262
+ CommandDirective.prototype.ngAfterViewInit = /**
288
263
  * @return {?}
289
264
  */
290
265
  function () {
291
- this.safelyInvoke(this.focusCommand);
292
- this.focus.emit();
266
+ var _this = this;
267
+ // for some reason mat-buttons kills the disabled host binding. It works on a regular button but for now
268
+ // we need to do this.
269
+ var chain = pectin.Dsl.disposeWith(this).chain;
270
+ chain(this.pectinCommand.enabled).subscribe((/**
271
+ * @param {?} enabled
272
+ * @return {?}
273
+ */
274
+ function (enabled) {
275
+ if (enabled) {
276
+ _this.elementRef.nativeElement.removeAttribute('disabled');
277
+ if (_this.elementRef.nativeElement.tagName === 'A') {
278
+ _this.elementRef.nativeElement.setAttribute('href', 'javascript:void');
279
+ }
280
+ }
281
+ else {
282
+ _this.elementRef.nativeElement.setAttribute('disabled', 'disabled');
283
+ if (_this.elementRef.nativeElement.tagName === 'A') {
284
+ _this.elementRef.nativeElement.removeAttribute('href');
285
+ }
286
+ }
287
+ }));
293
288
  };
294
289
  /**
295
290
  * @return {?}
296
291
  */
297
- AbstractInputComponent.prototype.notifyFocusOut = /**
292
+ CommandDirective.prototype.ngOnDestroy = /**
298
293
  * @return {?}
299
294
  */
300
295
  function () {
301
- this.safelyInvoke(this.blurCommand);
302
- this.blur.emit();
296
+ this.dispose();
303
297
  };
304
298
  /**
299
+ * @param {?} $event
305
300
  * @return {?}
306
301
  */
307
- AbstractInputComponent.prototype.notifyEnterKey = /**
302
+ CommandDirective.prototype.notifyClick = /**
303
+ * @param {?} $event
308
304
  * @return {?}
309
305
  */
310
- function () {
311
- this.safelyInvoke(this.enterCommand);
312
- this.enterKey.emit();
306
+ function ($event) {
307
+ $event.preventDefault();
308
+ $event.stopPropagation();
309
+ if (this.pectinCommand.enabled.value) {
310
+ if (this.pectinCommand instanceof pectin.UnaryCommand) {
311
+ this.pectinCommand.withContext({ event: $event }).execute(this.commandParameter);
312
+ }
313
+ else {
314
+ this.pectinCommand.withContext({ event: $event }).execute();
315
+ }
316
+ }
317
+ else {
318
+ console.warn('disabled command clicked, ignoring.');
319
+ }
320
+ };
321
+ CommandDirective.decorators = [
322
+ { type: core.Directive, args: [{
323
+ // tslint:disable-next-line:directive-selector
324
+ selector: '[pectinCommand]'
325
+ },] }
326
+ ];
327
+ /** @nocollapse */
328
+ CommandDirective.ctorParameters = function () { return [
329
+ { type: core.ElementRef, decorators: [{ type: core.Inject, args: [core.ElementRef,] }] }
330
+ ]; };
331
+ CommandDirective.propDecorators = {
332
+ pectinCommand: [{ type: core.Input }],
333
+ commandParameter: [{ type: core.Input }],
334
+ notifyClick: [{ type: core.HostListener, args: ['click', ['$event'],] }]
313
335
  };
336
+ return CommandDirective;
337
+ }(pectin.GarbageCollector));
338
+ if (false) {
339
+ /** @type {?} */
340
+ CommandDirective.prototype.pectinCommand;
341
+ /**
342
+ * @type {?}
343
+ * @private
344
+ */
345
+ CommandDirective.prototype._commandParameter;
346
+ /**
347
+ * @type {?}
348
+ * @private
349
+ */
350
+ CommandDirective.prototype._commandParameterProvided;
351
+ /**
352
+ * @type {?}
353
+ * @private
354
+ */
355
+ CommandDirective.prototype.elementRef;
356
+ }
357
+
358
+ /**
359
+ * @fileoverview added by tsickle
360
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
361
+ */
362
+ var DisposableComponent = /** @class */ (function (_super) {
363
+ __extends(DisposableComponent, _super);
364
+ function DisposableComponent() {
365
+ return _super !== null && _super.apply(this, arguments) || this;
366
+ }
314
367
  /**
315
368
  * @return {?}
316
369
  */
317
- AbstractInputComponent.prototype.notifyEscapeKey = /**
370
+ DisposableComponent.prototype.ngOnDestroy = /**
318
371
  * @return {?}
319
372
  */
320
373
  function () {
321
- this.safelyInvoke(this.escapeCommand);
322
- this.escapeKey.emit();
374
+ this.dispose();
323
375
  };
376
+ return DisposableComponent;
377
+ }(pectin.GarbageCollector));
378
+
379
+ /**
380
+ * @fileoverview added by tsickle
381
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
382
+ */
383
+ var FocusBindingDirective = /** @class */ (function (_super) {
384
+ __extends(FocusBindingDirective, _super);
385
+ function FocusBindingDirective(el, ngZone, document) {
386
+ var _this = _super.call(this) || this;
387
+ _this.el = el;
388
+ _this.ngZone = ngZone;
389
+ // @see https://stackoverflow.com/questions/49513359/could-not-resolve-type-document-in-angular5/53715642#53715642
390
+ _this.document = (/** @type {?} */ (document));
391
+ return _this;
392
+ }
324
393
  /**
325
- * @protected
326
- * @param {?} command
327
394
  * @return {?}
328
395
  */
329
- AbstractInputComponent.prototype.safelyInvoke = /**
330
- * @protected
331
- * @param {?} command
396
+ FocusBindingDirective.prototype.onFocusIn = /**
332
397
  * @return {?}
333
398
  */
334
- function (command) {
335
- if (command && command.enabled.value) {
336
- command.execute();
399
+ function () {
400
+ if (this.hasBinding()) {
401
+ this.pectinFocusBinding.focusContext.notifyFocusIn();
337
402
  }
338
403
  };
339
404
  /**
340
405
  * @return {?}
341
406
  */
342
- AbstractInputComponent.prototype.ngOnInit = /**
407
+ FocusBindingDirective.prototype.onFocusOut = /**
343
408
  * @return {?}
344
409
  */
345
410
  function () {
411
+ if (this.hasBinding()) {
412
+ this.pectinFocusBinding.focusContext.notifyFocusOut();
413
+ }
346
414
  };
347
415
  /**
348
416
  * @return {?}
349
417
  */
350
- AbstractInputComponent.prototype.isEnabled = /**
418
+ FocusBindingDirective.prototype.ngOnInit = /**
351
419
  * @return {?}
352
420
  */
353
421
  function () {
354
- return this.enabled.value;
355
422
  };
356
- Object.defineProperty(AbstractInputComponent.prototype, "enabled", {
357
- get: /**
358
- * @return {?}
359
- */
360
- function () {
361
- return this.valueModel.enabled;
362
- },
363
- enumerable: true,
364
- configurable: true
365
- });
366
423
  /**
367
424
  * @return {?}
368
425
  */
369
- AbstractInputComponent.prototype.hasErrors = /**
426
+ FocusBindingDirective.prototype.ngAfterViewInit = /**
370
427
  * @return {?}
371
428
  */
372
429
  function () {
373
- return !this.errorList.query().isEmpty();
430
+ var _this = this;
431
+ // TODO: Make this also track the current enabled/disabled state.
432
+ if (this.hasBinding()) {
433
+ var chain = pectin.Dsl.disposeWith(this).chain;
434
+ chain(this.pectinFocusBinding.focusContext.focused).subscribe((/**
435
+ * @param {?} focused
436
+ * @return {?}
437
+ */
438
+ function (focused) {
439
+ if (focused && !_this.alreadyHasFocus()) {
440
+ _this.tryAndFocus();
441
+ }
442
+ }));
443
+ }
444
+ else {
445
+ pectin.Logger.get(this).warn('pectinFocusBinding was nil');
446
+ }
374
447
  };
375
- Object.defineProperty(AbstractInputComponent.prototype, "errorList", {
376
- get: /**
377
- * @return {?}
378
- */
379
- function () {
380
- return this.valueModel.errorList;
381
- },
382
- enumerable: true,
383
- configurable: true
384
- });
385
- Object.defineProperty(AbstractInputComponent.prototype, "firstError", {
386
- get: /**
387
- * @return {?}
388
- */
389
- function () {
390
- return this.hasErrors() ? this.errorList.value[0] : null;
391
- },
392
- enumerable: true,
393
- configurable: true
394
- });
395
- AbstractInputComponent.propDecorators = {
396
- userValueModel: [{ type: core.Input, args: ['valueModel',] }],
397
- label: [{ type: core.Input }],
398
- floatLabel: [{ type: core.Input }],
399
- hint: [{ type: core.Input }],
400
- placeholder: [{ type: core.Input }],
401
- focusCommand: [{ type: core.Input, args: ['command.focus',] }],
402
- blurCommand: [{ type: core.Input, args: ['command.blur',] }],
403
- enterCommand: [{ type: core.Input, args: ['command.enter',] }],
404
- escapeCommand: [{ type: core.Input, args: ['command.escape',] }],
405
- clickCommand: [{ type: core.Input, args: ['command.click',] }],
406
- focus: [{ type: core.Output }],
407
- blur: [{ type: core.Output }],
408
- enterKey: [{ type: core.Output }],
409
- escapeKey: [{ type: core.Output }],
410
- notifyClick: [{ type: core.HostListener, args: ['click',] }],
411
- notifyFocusIn: [{ type: core.HostListener, args: ['focusin',] }],
412
- notifyFocusOut: [{ type: core.HostListener, args: ['focusout',] }]
413
- };
414
- __decorate([
415
- pectin.UseDelegate(),
416
- __metadata("design:type", pectin.ValueModel),
417
- __metadata("design:paramtypes", [pectin.ValueModel])
418
- ], AbstractInputComponent.prototype, "userValueModel", null);
419
- return AbstractInputComponent;
420
- }(DisposableComponent));
421
- if (false) {
422
- /** @type {?} */
423
- AbstractInputComponent.prototype.valueModel;
424
- /** @type {?} */
425
- AbstractInputComponent.prototype.label;
426
- /** @type {?} */
427
- AbstractInputComponent.prototype.floatLabel;
428
- /** @type {?} */
429
- AbstractInputComponent.prototype.hint;
430
- /** @type {?} */
431
- AbstractInputComponent.prototype.placeholder;
432
- /** @type {?} */
433
- AbstractInputComponent.prototype.focusCommand;
434
- /** @type {?} */
435
- AbstractInputComponent.prototype.blurCommand;
436
- /** @type {?} */
437
- AbstractInputComponent.prototype.enterCommand;
438
- /** @type {?} */
439
- AbstractInputComponent.prototype.escapeCommand;
440
- /** @type {?} */
441
- AbstractInputComponent.prototype.clickCommand;
442
- /** @type {?} */
443
- AbstractInputComponent.prototype.focus;
444
- /** @type {?} */
445
- AbstractInputComponent.prototype.blur;
446
- /** @type {?} */
447
- AbstractInputComponent.prototype.enterKey;
448
- /** @type {?} */
449
- AbstractInputComponent.prototype.escapeKey;
450
- /** @type {?} */
451
- AbstractInputComponent.prototype.errorStateMatcher;
452
- }
453
-
454
- /**
455
- * @fileoverview added by tsickle
456
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
457
- */
458
- var NumberInputComponent = /** @class */ (function (_super) {
459
- __extends(NumberInputComponent, _super);
460
- function NumberInputComponent() {
461
- return _super.call(this) || this;
462
- }
463
448
  /**
449
+ * @private
464
450
  * @return {?}
465
451
  */
466
- NumberInputComponent.prototype.ngOnInit = /**
452
+ FocusBindingDirective.prototype.hasBinding = /**
453
+ * @private
467
454
  * @return {?}
468
455
  */
469
456
  function () {
457
+ return !!this.pectinFocusBinding && !!this.pectinFocusBinding.focusContext;
470
458
  };
471
- NumberInputComponent.decorators = [
472
- { type: core.Component, args: [{
473
- selector: 'angular-ui-powerups-number-input',
474
- 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",
475
- styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]
476
- }] }
477
- ];
478
- /** @nocollapse */
479
- NumberInputComponent.ctorParameters = function () { return []; };
480
- return NumberInputComponent;
481
- }(AbstractInputComponent));
482
-
483
- /**
484
- * @fileoverview added by tsickle
485
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
486
- */
487
- var PasswordInputComponent = /** @class */ (function (_super) {
488
- __extends(PasswordInputComponent, _super);
489
- function PasswordInputComponent() {
490
- return _super.call(this) || this;
491
- }
459
+ // Hook method for debugging via tracing.
460
+ // Hook method for debugging via tracing.
492
461
  /**
493
462
  * @return {?}
494
463
  */
495
- PasswordInputComponent.prototype.ngOnInit = /**
464
+ FocusBindingDirective.prototype.alreadyHasFocus =
465
+ // Hook method for debugging via tracing.
466
+ /**
496
467
  * @return {?}
497
468
  */
498
469
  function () {
470
+ return this.isFocused(this.focusTarget);
499
471
  };
500
- PasswordInputComponent.decorators = [
501
- { type: core.Component, args: [{
502
- selector: 'angular-ui-powerups-password-input',
503
- 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",
504
- styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]
505
- }] }
506
- ];
507
- /** @nocollapse */
508
- PasswordInputComponent.ctorParameters = function () { return []; };
509
- return PasswordInputComponent;
510
- }(AbstractInputComponent));
511
-
512
- /**
513
- * @fileoverview added by tsickle
514
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
515
- */
516
- /**
517
- * @template T
518
- */
519
- var SelectInputComponent = /** @class */ (function (_super) {
520
- __extends(SelectInputComponent, _super);
521
- function SelectInputComponent() {
522
- var _this = _super.call(this) || this;
523
- _this.optionLabelFormat = (/**
524
- * @param {?} option
472
+ // Hook method for debugging via tracing.
473
+ // Hook method for debugging via tracing.
474
+ /**
475
+ * @param {?} element
476
+ * @return {?}
477
+ */
478
+ FocusBindingDirective.prototype.isFocused =
479
+ // Hook method for debugging via tracing.
480
+ /**
481
+ * @param {?} element
482
+ * @return {?}
483
+ */
484
+ function (element) {
485
+ return this.document.activeElement === element;
486
+ };
487
+ /**
488
+ * @param {?=} retries
489
+ * @return {?}
490
+ */
491
+ FocusBindingDirective.prototype.tryAndFocus = /**
492
+ * @param {?=} retries
493
+ * @return {?}
494
+ */
495
+ function (retries) {
496
+ var _this = this;
497
+ if (retries === void 0) { retries = 5; }
498
+ if (this.modelShouldStillHaveFocus() && this.canFocus()) {
499
+ if (!this.alreadyHasFocus()) {
500
+ this.focusTarget.focus();
501
+ }
502
+ // if we didn't get the focus we try again later.
503
+ if (!this.alreadyHasFocus()) {
504
+ pectin.Logger.get(this).log("focus failed, trying " + retries + " more times");
505
+ if (retries > 0) {
506
+ // try again on the next paint
507
+ // TODO: is there an angular way of doing this without calling a window function.
508
+ requestAnimationFrame((/**
509
+ * @return {?}
510
+ */
511
+ function () {
512
+ _this.tryAndFocus(retries - 1);
513
+ }));
514
+ }
515
+ else {
516
+ pectin.Logger.get(this).warn("Tried to focus but gave up as the component wasn't enabled or visible.");
517
+ }
518
+ }
519
+ }
520
+ };
521
+ Object.defineProperty(FocusBindingDirective.prototype, "focusTarget", {
522
+ get: /**
525
523
  * @return {?}
526
524
  */
527
- function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; });
528
- return _this;
529
- }
525
+ function () {
526
+ return this.focusBindingTarget || this.el.nativeElement;
527
+ },
528
+ enumerable: true,
529
+ configurable: true
530
+ });
531
+ // Hook method for debugging via tracing.
532
+ // Hook method for debugging via tracing.
530
533
  /**
531
534
  * @return {?}
532
535
  */
533
- SelectInputComponent.prototype.ngOnInit = /**
536
+ FocusBindingDirective.prototype.modelShouldStillHaveFocus =
537
+ // Hook method for debugging via tracing.
538
+ /**
534
539
  * @return {?}
535
540
  */
536
541
  function () {
542
+ return this.hasBinding() && this.pectinFocusBinding.focusContext.focused.value;
537
543
  };
538
- SelectInputComponent.decorators = [
539
- { type: core.Component, args: [{
540
- selector: 'angular-ui-powerups-select-input',
541
- 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",
542
- styles: [":host{display:inline-block}mat-form-field{width:100%}"]
543
- }] }
544
- ];
545
- /** @nocollapse */
546
- SelectInputComponent.ctorParameters = function () { return []; };
547
- SelectInputComponent.propDecorators = {
548
- optionsModel: [{ type: core.Input }],
549
- options: [{ type: core.Input }],
550
- optionLabel: [{ type: core.Input }],
551
- optionLabelFormat: [{ type: core.Input }]
552
- };
553
- __decorate([
554
- pectin.UseDelegate(),
555
- __metadata("design:type", pectin.ListModel)
556
- ], SelectInputComponent.prototype, "optionsModel", void 0);
557
- __decorate([
558
- pectin.StoreInListModel('optionsModel'),
559
- __metadata("design:type", Array)
560
- ], SelectInputComponent.prototype, "options", void 0);
561
- return SelectInputComponent;
562
- }(AbstractInputComponent));
563
- if (false) {
564
- /** @type {?} */
565
- SelectInputComponent.prototype.optionsModel;
566
- /** @type {?} */
567
- SelectInputComponent.prototype.options;
568
- /** @type {?} */
569
- SelectInputComponent.prototype.optionLabel;
570
- /** @type {?} */
571
- SelectInputComponent.prototype.optionLabelFormat;
572
- }
573
-
574
- /**
575
- * @fileoverview added by tsickle
576
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
577
- */
578
- var StringInputComponent = /** @class */ (function (_super) {
579
- __extends(StringInputComponent, _super);
580
- function StringInputComponent() {
581
- return _super.call(this) || this;
582
- }
544
+ // Hook method for debugging via tracing.
545
+ // Hook method for debugging via tracing.
583
546
  /**
584
547
  * @return {?}
585
548
  */
586
- StringInputComponent.prototype.ngOnInit = /**
549
+ FocusBindingDirective.prototype.canFocus =
550
+ // Hook method for debugging via tracing.
551
+ /**
587
552
  * @return {?}
588
553
  */
589
554
  function () {
555
+ /** @type {?} */
556
+ var dimension = this.focusTarget.getBoundingClientRect();
557
+ /** @type {?} */
558
+ var hasSize = dimension.height >= 0 && dimension.height >= 0;
559
+ // tslint:disable-next-line:no-string-literal
560
+ return hasSize && !this.focusTarget['disabled'];
590
561
  };
591
- StringInputComponent.decorators = [
592
- { type: core.Component, args: [{
593
- selector: 'angular-ui-powerups-string-input',
594
- 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",
595
- styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]
596
- }] }
562
+ FocusBindingDirective.decorators = [
563
+ { type: core.Directive, args: [{
564
+ // tslint:disable-next-line:directive-selector
565
+ selector: '[pectinFocusBinding]'
566
+ },] }
597
567
  ];
598
568
  /** @nocollapse */
599
- StringInputComponent.ctorParameters = function () { return []; };
600
- return StringInputComponent;
601
- }(AbstractInputComponent));
569
+ FocusBindingDirective.ctorParameters = function () { return [
570
+ { type: core.ElementRef, decorators: [{ type: core.Inject, args: [core.ElementRef,] }] },
571
+ { type: core.NgZone, decorators: [{ type: core.Inject, args: [core.NgZone,] }] },
572
+ { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] }
573
+ ]; };
574
+ FocusBindingDirective.propDecorators = {
575
+ pectinFocusBinding: [{ type: core.Input }],
576
+ focusBindingTarget: [{ type: core.Input }],
577
+ onFocusIn: [{ type: core.HostListener, args: ['focusin',] }],
578
+ onFocusOut: [{ type: core.HostListener, args: ['focusout',] }]
579
+ };
580
+ return FocusBindingDirective;
581
+ }(DisposableComponent));
582
+ if (false) {
583
+ /**
584
+ * @type {?}
585
+ * @private
586
+ */
587
+ FocusBindingDirective.prototype.document;
588
+ /** @type {?} */
589
+ FocusBindingDirective.prototype.pectinFocusBinding;
590
+ /** @type {?} */
591
+ FocusBindingDirective.prototype.focusBindingTarget;
592
+ /**
593
+ * @type {?}
594
+ * @private
595
+ */
596
+ FocusBindingDirective.prototype.el;
597
+ /**
598
+ * @type {?}
599
+ * @private
600
+ */
601
+ FocusBindingDirective.prototype.ngZone;
602
+ }
602
603
 
603
604
  /**
604
605
  * @fileoverview added by tsickle
605
606
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
606
607
  */
607
- var NoopComponent = /** @class */ (function () {
608
- function NoopComponent() {
608
+ var DirectivesModule = /** @class */ (function () {
609
+ function DirectivesModule() {
609
610
  }
610
- NoopComponent.decorators = [
611
- { type: core.Component, args: [{
612
- selector: 'angular-ui-powerups-noop',
613
- template: "",
614
- styles: [":host{display:block}"]
615
- }] }
611
+ DirectivesModule.decorators = [
612
+ { type: core.NgModule, args: [{
613
+ declarations: [
614
+ CommandDirective,
615
+ FocusBindingDirective
616
+ ],
617
+ imports: [
618
+ common.CommonModule,
619
+ animations.BrowserAnimationsModule,
620
+ forms.FormsModule,
621
+ material.MatInputModule,
622
+ material.MatFormFieldModule,
623
+ material.MatSelectModule,
624
+ tabs.MatTabsModule
625
+ ],
626
+ exports: [
627
+ CommandDirective,
628
+ FocusBindingDirective
629
+ ]
630
+ },] }
616
631
  ];
617
- /** @nocollapse */
618
- NoopComponent.ctorParameters = function () { return []; };
619
- return NoopComponent;
632
+ return DirectivesModule;
620
633
  }());
621
634
 
622
635
  /**
@@ -624,30 +637,44 @@
624
637
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
625
638
  */
626
639
  /**
627
- * @template P
628
- */
629
- var CommandDirective = /** @class */ (function (_super) {
630
- __extends(CommandDirective, _super);
631
- function CommandDirective(elementRef) {
640
+ * @abstract
641
+ * @template T
642
+ */
643
+ var AbstractInputComponent = /** @class */ (function (_super) {
644
+ __extends(AbstractInputComponent, _super);
645
+ function AbstractInputComponent() {
632
646
  var _this = _super.call(this) || this;
633
- _this.elementRef = elementRef;
634
- _this._commandParameterProvided = false;
647
+ _this.valueModel = new pectin.DelegatingFormValueModel();
648
+ // TODO: fix this.
649
+ // tslint:disable-next-line:no-output-native
650
+ _this.focus = new core.EventEmitter();
651
+ // tslint:disable-next-line:no-output-native
652
+ _this.blur = new core.EventEmitter();
653
+ // tslint:disable-next-line:no-output-native
654
+ _this.enterKey = new core.EventEmitter();
655
+ // tslint:disable-next-line:no-output-native
656
+ _this.escapeKey = new core.EventEmitter();
657
+ /** @type {?} */
658
+ var self = _this;
659
+ _this.errorStateMatcher = {
660
+ isErrorState: /**
661
+ * @param {?} control
662
+ * @param {?} form
663
+ * @return {?}
664
+ */
665
+ function (control, form) {
666
+ return self.hasErrors();
667
+ }
668
+ };
635
669
  return _this;
636
670
  }
637
- Object.defineProperty(CommandDirective.prototype, "commandParameter", {
638
- get: /**
639
- * @return {?}
640
- */
641
- function () {
642
- return this._commandParameter;
643
- },
671
+ Object.defineProperty(AbstractInputComponent.prototype, "userValueModel", {
644
672
  set: /**
645
- * @param {?} value
673
+ * @param {?} model
646
674
  * @return {?}
647
675
  */
648
- function (value) {
649
- this._commandParameterProvided = true;
650
- this._commandParameter = value;
676
+ function (model) {
677
+ this.valueModel.setDelegate(model);
651
678
  },
652
679
  enumerable: true,
653
680
  configurable: true
@@ -655,161 +682,71 @@
655
682
  /**
656
683
  * @return {?}
657
684
  */
658
- CommandDirective.prototype.ngOnInit = /**
685
+ AbstractInputComponent.prototype.notifyClick = /**
659
686
  * @return {?}
660
687
  */
661
688
  function () {
662
- pectin.assert.notNil(this.pectinCommand);
663
- if (this.pectinCommand instanceof pectin.UnaryCommand) {
664
- if (!this._commandParameterProvided) {
665
- pectin.lang.illegalState('UnaryCommands required the command parameter to be specified.');
666
- }
667
- }
668
- else {
669
- if (this._commandParameterProvided) {
670
- pectin.lang.illegalState('command parameters are only supported by UnaryCommands');
671
- }
672
- }
689
+ this.safelyInvoke(this.clickCommand);
673
690
  };
674
691
  /**
675
692
  * @return {?}
676
693
  */
677
- CommandDirective.prototype.ngAfterViewInit = /**
694
+ AbstractInputComponent.prototype.notifyFocusIn = /**
678
695
  * @return {?}
679
696
  */
680
697
  function () {
681
- var _this = this;
682
- // for some reason mat-buttons kills the disabled host binding. It works on a regular button but for now
683
- // we need to do this.
684
- var chain = pectin.Dsl.disposeWith(this).chain;
685
- chain(this.pectinCommand.enabled).subscribe((/**
686
- * @param {?} enabled
687
- * @return {?}
688
- */
689
- function (enabled) {
690
- if (enabled) {
691
- _this.elementRef.nativeElement.removeAttribute('disabled');
692
- if (_this.elementRef.nativeElement.tagName === 'A') {
693
- _this.elementRef.nativeElement.setAttribute('href', 'javascript:void');
694
- }
695
- }
696
- else {
697
- _this.elementRef.nativeElement.setAttribute('disabled', 'disabled');
698
- if (_this.elementRef.nativeElement.tagName === 'A') {
699
- _this.elementRef.nativeElement.removeAttribute('href');
700
- }
701
- }
702
- }));
698
+ this.safelyInvoke(this.focusCommand);
699
+ this.focus.emit();
703
700
  };
704
701
  /**
705
702
  * @return {?}
706
703
  */
707
- CommandDirective.prototype.ngOnDestroy = /**
704
+ AbstractInputComponent.prototype.notifyFocusOut = /**
708
705
  * @return {?}
709
706
  */
710
707
  function () {
711
- this.dispose();
708
+ this.safelyInvoke(this.blurCommand);
709
+ this.blur.emit();
712
710
  };
713
711
  /**
714
- * @param {?} $event
715
712
  * @return {?}
716
713
  */
717
- CommandDirective.prototype.notifyClick = /**
718
- * @param {?} $event
714
+ AbstractInputComponent.prototype.notifyEnterKey = /**
719
715
  * @return {?}
720
716
  */
721
- function ($event) {
722
- $event.preventDefault();
723
- $event.stopPropagation();
724
- if (this.pectinCommand.enabled.value) {
725
- if (this.pectinCommand instanceof pectin.UnaryCommand) {
726
- this.pectinCommand.withContext({ event: $event }).execute(this.commandParameter);
727
- }
728
- else {
729
- this.pectinCommand.withContext({ event: $event }).execute();
730
- }
731
- }
732
- else {
733
- console.warn('disabled command clicked, ignoring.');
734
- }
735
- };
736
- CommandDirective.decorators = [
737
- { type: core.Directive, args: [{
738
- // tslint:disable-next-line:directive-selector
739
- selector: '[pectinCommand]'
740
- },] }
741
- ];
742
- /** @nocollapse */
743
- CommandDirective.ctorParameters = function () { return [
744
- { type: core.ElementRef, decorators: [{ type: core.Inject, args: [core.ElementRef,] }] }
745
- ]; };
746
- CommandDirective.propDecorators = {
747
- pectinCommand: [{ type: core.Input }],
748
- commandParameter: [{ type: core.Input }],
749
- notifyClick: [{ type: core.HostListener, args: ['click', ['$event'],] }]
717
+ function () {
718
+ this.safelyInvoke(this.enterCommand);
719
+ this.enterKey.emit();
750
720
  };
751
- return CommandDirective;
752
- }(pectin.GarbageCollector));
753
- if (false) {
754
- /** @type {?} */
755
- CommandDirective.prototype.pectinCommand;
756
- /**
757
- * @type {?}
758
- * @private
759
- */
760
- CommandDirective.prototype._commandParameter;
761
- /**
762
- * @type {?}
763
- * @private
764
- */
765
- CommandDirective.prototype._commandParameterProvided;
766
- /**
767
- * @type {?}
768
- * @private
769
- */
770
- CommandDirective.prototype.elementRef;
771
- }
772
-
773
- /**
774
- * @fileoverview added by tsickle
775
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
776
- */
777
- var FocusBindingDirective = /** @class */ (function (_super) {
778
- __extends(FocusBindingDirective, _super);
779
- function FocusBindingDirective(el, ngZone, document) {
780
- var _this = _super.call(this) || this;
781
- _this.el = el;
782
- _this.ngZone = ngZone;
783
- // @see https://stackoverflow.com/questions/49513359/could-not-resolve-type-document-in-angular5/53715642#53715642
784
- _this.document = (/** @type {?} */ (document));
785
- return _this;
786
- }
787
721
  /**
788
722
  * @return {?}
789
723
  */
790
- FocusBindingDirective.prototype.onFocusIn = /**
724
+ AbstractInputComponent.prototype.notifyEscapeKey = /**
791
725
  * @return {?}
792
726
  */
793
727
  function () {
794
- if (this.hasBinding()) {
795
- this.pectinFocusBinding.focusContext.notifyFocusIn();
796
- }
728
+ this.safelyInvoke(this.escapeCommand);
729
+ this.escapeKey.emit();
797
730
  };
798
731
  /**
732
+ * @protected
733
+ * @param {?} command
799
734
  * @return {?}
800
735
  */
801
- FocusBindingDirective.prototype.onFocusOut = /**
736
+ AbstractInputComponent.prototype.safelyInvoke = /**
737
+ * @protected
738
+ * @param {?} command
802
739
  * @return {?}
803
740
  */
804
- function () {
805
- if (this.hasBinding()) {
806
- this.pectinFocusBinding.focusContext.notifyFocusOut();
741
+ function (command) {
742
+ if (command && command.enabled.value) {
743
+ command.execute();
807
744
  }
808
745
  };
809
746
  /**
810
747
  * @return {?}
811
748
  */
812
- FocusBindingDirective.prototype.ngOnInit = /**
749
+ AbstractInputComponent.prototype.ngOnInit = /**
813
750
  * @return {?}
814
751
  */
815
752
  function () {
@@ -817,183 +754,315 @@
817
754
  /**
818
755
  * @return {?}
819
756
  */
820
- FocusBindingDirective.prototype.ngAfterViewInit = /**
757
+ AbstractInputComponent.prototype.isEnabled = /**
821
758
  * @return {?}
822
759
  */
823
760
  function () {
824
- var _this = this;
825
- // TODO: Make this also track the current enabled/disabled state.
826
- if (this.hasBinding()) {
827
- var chain = pectin.Dsl.disposeWith(this).chain;
828
- chain(this.pectinFocusBinding.focusContext.focused).subscribe((/**
829
- * @param {?} focused
830
- * @return {?}
831
- */
832
- function (focused) {
833
- if (focused && !_this.alreadyHasFocus()) {
834
- _this.tryAndFocus();
835
- }
836
- }));
837
- }
838
- else {
839
- pectin.Logger.get(this).warn('pectinFocusBinding was nil');
840
- }
761
+ return this.enabled.value;
841
762
  };
763
+ Object.defineProperty(AbstractInputComponent.prototype, "enabled", {
764
+ get: /**
765
+ * @return {?}
766
+ */
767
+ function () {
768
+ return this.valueModel.enabled;
769
+ },
770
+ enumerable: true,
771
+ configurable: true
772
+ });
842
773
  /**
843
- * @private
844
774
  * @return {?}
845
775
  */
846
- FocusBindingDirective.prototype.hasBinding = /**
847
- * @private
776
+ AbstractInputComponent.prototype.hasErrors = /**
848
777
  * @return {?}
849
778
  */
850
779
  function () {
851
- return !!this.pectinFocusBinding && !!this.pectinFocusBinding.focusContext;
780
+ return !this.errorList.query().isEmpty();
781
+ };
782
+ Object.defineProperty(AbstractInputComponent.prototype, "errorList", {
783
+ get: /**
784
+ * @return {?}
785
+ */
786
+ function () {
787
+ return this.valueModel.errorList;
788
+ },
789
+ enumerable: true,
790
+ configurable: true
791
+ });
792
+ Object.defineProperty(AbstractInputComponent.prototype, "firstError", {
793
+ get: /**
794
+ * @return {?}
795
+ */
796
+ function () {
797
+ return this.hasErrors() ? this.errorList.value[0] : null;
798
+ },
799
+ enumerable: true,
800
+ configurable: true
801
+ });
802
+ AbstractInputComponent.propDecorators = {
803
+ userValueModel: [{ type: core.Input, args: ['valueModel',] }],
804
+ label: [{ type: core.Input }],
805
+ floatLabel: [{ type: core.Input }],
806
+ hint: [{ type: core.Input }],
807
+ placeholder: [{ type: core.Input }],
808
+ focusCommand: [{ type: core.Input, args: ['command.focus',] }],
809
+ blurCommand: [{ type: core.Input, args: ['command.blur',] }],
810
+ enterCommand: [{ type: core.Input, args: ['command.enter',] }],
811
+ escapeCommand: [{ type: core.Input, args: ['command.escape',] }],
812
+ clickCommand: [{ type: core.Input, args: ['command.click',] }],
813
+ focus: [{ type: core.Output }],
814
+ blur: [{ type: core.Output }],
815
+ enterKey: [{ type: core.Output }],
816
+ escapeKey: [{ type: core.Output }],
817
+ notifyClick: [{ type: core.HostListener, args: ['click',] }],
818
+ notifyFocusIn: [{ type: core.HostListener, args: ['focusin',] }],
819
+ notifyFocusOut: [{ type: core.HostListener, args: ['focusout',] }]
852
820
  };
853
- // Hook method for debugging via tracing.
854
- // Hook method for debugging via tracing.
821
+ __decorate([
822
+ pectin.UseDelegate(),
823
+ __metadata("design:type", pectin.ValueModel),
824
+ __metadata("design:paramtypes", [pectin.ValueModel])
825
+ ], AbstractInputComponent.prototype, "userValueModel", null);
826
+ return AbstractInputComponent;
827
+ }(DisposableComponent));
828
+ if (false) {
829
+ /** @type {?} */
830
+ AbstractInputComponent.prototype.valueModel;
831
+ /** @type {?} */
832
+ AbstractInputComponent.prototype.label;
833
+ /** @type {?} */
834
+ AbstractInputComponent.prototype.floatLabel;
835
+ /** @type {?} */
836
+ AbstractInputComponent.prototype.hint;
837
+ /** @type {?} */
838
+ AbstractInputComponent.prototype.placeholder;
839
+ /** @type {?} */
840
+ AbstractInputComponent.prototype.focusCommand;
841
+ /** @type {?} */
842
+ AbstractInputComponent.prototype.blurCommand;
843
+ /** @type {?} */
844
+ AbstractInputComponent.prototype.enterCommand;
845
+ /** @type {?} */
846
+ AbstractInputComponent.prototype.escapeCommand;
847
+ /** @type {?} */
848
+ AbstractInputComponent.prototype.clickCommand;
849
+ /** @type {?} */
850
+ AbstractInputComponent.prototype.focus;
851
+ /** @type {?} */
852
+ AbstractInputComponent.prototype.blur;
853
+ /** @type {?} */
854
+ AbstractInputComponent.prototype.enterKey;
855
+ /** @type {?} */
856
+ AbstractInputComponent.prototype.escapeKey;
857
+ /** @type {?} */
858
+ AbstractInputComponent.prototype.errorStateMatcher;
859
+ }
860
+
861
+ /**
862
+ * @fileoverview added by tsickle
863
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
864
+ */
865
+ var NumberInputComponent = /** @class */ (function (_super) {
866
+ __extends(NumberInputComponent, _super);
867
+ function NumberInputComponent() {
868
+ return _super.call(this) || this;
869
+ }
855
870
  /**
856
871
  * @return {?}
857
872
  */
858
- FocusBindingDirective.prototype.alreadyHasFocus =
859
- // Hook method for debugging via tracing.
860
- /**
873
+ NumberInputComponent.prototype.ngOnInit = /**
861
874
  * @return {?}
862
875
  */
863
876
  function () {
864
- return this.isFocused(this.focusTarget);
865
- };
866
- // Hook method for debugging via tracing.
867
- // Hook method for debugging via tracing.
868
- /**
869
- * @param {?} element
870
- * @return {?}
871
- */
872
- FocusBindingDirective.prototype.isFocused =
873
- // Hook method for debugging via tracing.
874
- /**
875
- * @param {?} element
876
- * @return {?}
877
- */
878
- function (element) {
879
- return this.document.activeElement === element;
880
877
  };
878
+ NumberInputComponent.decorators = [
879
+ { type: core.Component, args: [{
880
+ selector: 'aup-number-input',
881
+ 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",
882
+ styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]
883
+ }] }
884
+ ];
885
+ /** @nocollapse */
886
+ NumberInputComponent.ctorParameters = function () { return []; };
887
+ return NumberInputComponent;
888
+ }(AbstractInputComponent));
889
+
890
+ /**
891
+ * @fileoverview added by tsickle
892
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
893
+ */
894
+ var PasswordInputComponent = /** @class */ (function (_super) {
895
+ __extends(PasswordInputComponent, _super);
896
+ function PasswordInputComponent() {
897
+ return _super.call(this) || this;
898
+ }
881
899
  /**
882
- * @param {?=} retries
883
900
  * @return {?}
884
901
  */
885
- FocusBindingDirective.prototype.tryAndFocus = /**
886
- * @param {?=} retries
902
+ PasswordInputComponent.prototype.ngOnInit = /**
887
903
  * @return {?}
888
904
  */
889
- function (retries) {
890
- var _this = this;
891
- if (retries === void 0) { retries = 5; }
892
- if (this.modelShouldStillHaveFocus() && this.canFocus()) {
893
- if (!this.alreadyHasFocus()) {
894
- this.focusTarget.focus();
895
- }
896
- // if we didn't get the focus we try again later.
897
- if (!this.alreadyHasFocus()) {
898
- pectin.Logger.get(this).log("focus failed, trying " + retries + " more times");
899
- if (retries > 0) {
900
- // try again on the next paint
901
- // TODO: is there an angular way of doing this without calling a window function.
902
- requestAnimationFrame((/**
903
- * @return {?}
904
- */
905
- function () {
906
- _this.tryAndFocus(retries - 1);
907
- }));
908
- }
909
- else {
910
- pectin.Logger.get(this).warn("Tried to focus but gave up as the component wasn't enabled or visible.");
911
- }
912
- }
913
- }
905
+ function () {
914
906
  };
915
- Object.defineProperty(FocusBindingDirective.prototype, "focusTarget", {
916
- get: /**
907
+ PasswordInputComponent.decorators = [
908
+ { type: core.Component, args: [{
909
+ selector: 'aup-password-input',
910
+ 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",
911
+ styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]
912
+ }] }
913
+ ];
914
+ /** @nocollapse */
915
+ PasswordInputComponent.ctorParameters = function () { return []; };
916
+ return PasswordInputComponent;
917
+ }(AbstractInputComponent));
918
+
919
+ /**
920
+ * @fileoverview added by tsickle
921
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
922
+ */
923
+ /**
924
+ * @template T
925
+ */
926
+ var SelectInputComponent = /** @class */ (function (_super) {
927
+ __extends(SelectInputComponent, _super);
928
+ function SelectInputComponent() {
929
+ var _this = _super.call(this) || this;
930
+ _this.optionLabelFormat = (/**
931
+ * @param {?} option
917
932
  * @return {?}
918
933
  */
919
- function () {
920
- return this.focusBindingTarget || this.el.nativeElement;
921
- },
922
- enumerable: true,
923
- configurable: true
924
- });
925
- // Hook method for debugging via tracing.
926
- // Hook method for debugging via tracing.
934
+ function (option) { return (option && _this.optionLabel) ? option[_this.optionLabel] : option; });
935
+ return _this;
936
+ }
927
937
  /**
928
938
  * @return {?}
929
939
  */
930
- FocusBindingDirective.prototype.modelShouldStillHaveFocus =
931
- // Hook method for debugging via tracing.
932
- /**
940
+ SelectInputComponent.prototype.ngOnInit = /**
933
941
  * @return {?}
934
942
  */
935
943
  function () {
936
- return this.hasBinding() && this.pectinFocusBinding.focusContext.focused.value;
937
944
  };
938
- // Hook method for debugging via tracing.
939
- // Hook method for debugging via tracing.
945
+ SelectInputComponent.decorators = [
946
+ { type: core.Component, args: [{
947
+ selector: 'aup-select-input',
948
+ 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",
949
+ styles: [":host{display:inline-block}mat-form-field{width:100%}"]
950
+ }] }
951
+ ];
952
+ /** @nocollapse */
953
+ SelectInputComponent.ctorParameters = function () { return []; };
954
+ SelectInputComponent.propDecorators = {
955
+ optionsModel: [{ type: core.Input }],
956
+ options: [{ type: core.Input }],
957
+ optionLabel: [{ type: core.Input }],
958
+ optionLabelFormat: [{ type: core.Input }]
959
+ };
960
+ __decorate([
961
+ pectin.UseDelegate(),
962
+ __metadata("design:type", pectin.ListModel)
963
+ ], SelectInputComponent.prototype, "optionsModel", void 0);
964
+ __decorate([
965
+ pectin.StoreInListModel('optionsModel'),
966
+ __metadata("design:type", Array)
967
+ ], SelectInputComponent.prototype, "options", void 0);
968
+ return SelectInputComponent;
969
+ }(AbstractInputComponent));
970
+ if (false) {
971
+ /** @type {?} */
972
+ SelectInputComponent.prototype.optionsModel;
973
+ /** @type {?} */
974
+ SelectInputComponent.prototype.options;
975
+ /** @type {?} */
976
+ SelectInputComponent.prototype.optionLabel;
977
+ /** @type {?} */
978
+ SelectInputComponent.prototype.optionLabelFormat;
979
+ }
980
+
981
+ /**
982
+ * @fileoverview added by tsickle
983
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
984
+ */
985
+ var StringInputComponent = /** @class */ (function (_super) {
986
+ __extends(StringInputComponent, _super);
987
+ function StringInputComponent() {
988
+ return _super.call(this) || this;
989
+ }
940
990
  /**
941
991
  * @return {?}
942
992
  */
943
- FocusBindingDirective.prototype.canFocus =
944
- // Hook method for debugging via tracing.
945
- /**
993
+ StringInputComponent.prototype.ngOnInit = /**
946
994
  * @return {?}
947
995
  */
948
996
  function () {
949
- /** @type {?} */
950
- var dimension = this.focusTarget.getBoundingClientRect();
951
- /** @type {?} */
952
- var hasSize = dimension.height >= 0 && dimension.height >= 0;
953
- // tslint:disable-next-line:no-string-literal
954
- return hasSize && !this.focusTarget['disabled'];
955
997
  };
956
- FocusBindingDirective.decorators = [
957
- { type: core.Directive, args: [{
958
- // tslint:disable-next-line:directive-selector
959
- selector: '[pectinFocusBinding]'
998
+ StringInputComponent.decorators = [
999
+ { type: core.Component, args: [{
1000
+ selector: 'aup-string-input',
1001
+ 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",
1002
+ styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]
1003
+ }] }
1004
+ ];
1005
+ /** @nocollapse */
1006
+ StringInputComponent.ctorParameters = function () { return []; };
1007
+ return StringInputComponent;
1008
+ }(AbstractInputComponent));
1009
+
1010
+ /**
1011
+ * @fileoverview added by tsickle
1012
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1013
+ */
1014
+ var NoopComponent = /** @class */ (function () {
1015
+ function NoopComponent() {
1016
+ }
1017
+ NoopComponent.decorators = [
1018
+ { type: core.Component, args: [{
1019
+ selector: 'aup-noop',
1020
+ template: "",
1021
+ styles: [":host{display:block}"]
1022
+ }] }
1023
+ ];
1024
+ /** @nocollapse */
1025
+ NoopComponent.ctorParameters = function () { return []; };
1026
+ return NoopComponent;
1027
+ }());
1028
+
1029
+ /**
1030
+ * @fileoverview added by tsickle
1031
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1032
+ */
1033
+ var ComponentsModule = /** @class */ (function () {
1034
+ function ComponentsModule() {
1035
+ }
1036
+ ComponentsModule.decorators = [
1037
+ { type: core.NgModule, args: [{
1038
+ declarations: [
1039
+ NumberInputComponent,
1040
+ StringInputComponent,
1041
+ PasswordInputComponent,
1042
+ SelectInputComponent,
1043
+ NoopComponent
1044
+ ],
1045
+ imports: [
1046
+ common.CommonModule,
1047
+ animations.BrowserAnimationsModule,
1048
+ forms.FormsModule,
1049
+ material.MatInputModule,
1050
+ material.MatFormFieldModule,
1051
+ material.MatSelectModule,
1052
+ tabs.MatTabsModule,
1053
+ DirectivesModule
1054
+ ],
1055
+ exports: [
1056
+ NumberInputComponent,
1057
+ StringInputComponent,
1058
+ PasswordInputComponent,
1059
+ SelectInputComponent,
1060
+ NoopComponent
1061
+ ]
960
1062
  },] }
961
1063
  ];
962
- /** @nocollapse */
963
- FocusBindingDirective.ctorParameters = function () { return [
964
- { type: core.ElementRef, decorators: [{ type: core.Inject, args: [core.ElementRef,] }] },
965
- { type: core.NgZone, decorators: [{ type: core.Inject, args: [core.NgZone,] }] },
966
- { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] }
967
- ]; };
968
- FocusBindingDirective.propDecorators = {
969
- pectinFocusBinding: [{ type: core.Input }],
970
- focusBindingTarget: [{ type: core.Input }],
971
- onFocusIn: [{ type: core.HostListener, args: ['focusin',] }],
972
- onFocusOut: [{ type: core.HostListener, args: ['focusout',] }]
973
- };
974
- return FocusBindingDirective;
975
- }(DisposableComponent));
976
- if (false) {
977
- /**
978
- * @type {?}
979
- * @private
980
- */
981
- FocusBindingDirective.prototype.document;
982
- /** @type {?} */
983
- FocusBindingDirective.prototype.pectinFocusBinding;
984
- /** @type {?} */
985
- FocusBindingDirective.prototype.focusBindingTarget;
986
- /**
987
- * @type {?}
988
- * @private
989
- */
990
- FocusBindingDirective.prototype.el;
991
- /**
992
- * @type {?}
993
- * @private
994
- */
995
- FocusBindingDirective.prototype.ngZone;
996
- }
1064
+ return ComponentsModule;
1065
+ }());
997
1066
 
998
1067
  /**
999
1068
  * @fileoverview added by tsickle
@@ -1087,7 +1156,7 @@
1087
1156
  * @abstract
1088
1157
  * @template D, R, E
1089
1158
  */
1090
- exports.ɵbb = /** @class */ (function (_super) {
1159
+ exports.ɵbd = /** @class */ (function (_super) {
1091
1160
  __extends(Activity, _super);
1092
1161
  function Activity() {
1093
1162
  var _this = _super !== null && _super.apply(this, arguments) || this;
@@ -1177,12 +1246,12 @@
1177
1246
  * @type {?}
1178
1247
  * @private
1179
1248
  */
1180
- exports.ɵbb.prototype._busyModel;
1249
+ exports.ɵbd.prototype._busyModel;
1181
1250
  /**
1182
1251
  * @type {?}
1183
1252
  * @private
1184
1253
  */
1185
- exports.ɵbb.prototype._activityContext;
1254
+ exports.ɵbd.prototype._activityContext;
1186
1255
  }
1187
1256
  (function (Activity) {
1188
1257
  /**
@@ -1197,7 +1266,7 @@
1197
1266
  /** @type {?} */
1198
1267
  Callbacks.prototype.onCancel;
1199
1268
  }
1200
- })(exports.ɵbb || (exports.ɵbb = {}));
1269
+ })(exports.ɵbd || (exports.ɵbd = {}));
1201
1270
 
1202
1271
  /**
1203
1272
  * @fileoverview added by tsickle
@@ -1286,7 +1355,7 @@
1286
1355
  });
1287
1356
  ActivityOutletComponent.decorators = [
1288
1357
  { type: core.Component, args: [{
1289
- selector: 'angular-ui-powerups-activity-outlet',
1358
+ selector: 'aup-activity-outlet',
1290
1359
  template: '',
1291
1360
  styles: [":host{display:block}"]
1292
1361
  }] }
@@ -1354,7 +1423,7 @@
1354
1423
  return _super !== null && _super.apply(this, arguments) || this;
1355
1424
  }
1356
1425
  return AbstractActivity;
1357
- }(exports.ɵbb));
1426
+ }(exports.ɵbd));
1358
1427
 
1359
1428
  /**
1360
1429
  * @fileoverview added by tsickle
@@ -1377,9 +1446,9 @@
1377
1446
  };
1378
1447
  AlertDialogComponent.decorators = [
1379
1448
  { type: core.Component, args: [{
1380
- selector: 'angular-ui-powerups-alert-dialog',
1449
+ selector: 'aup-alert-dialog',
1381
1450
  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()\" data-cy=\"close-button\">{{alert.ok()}}</button>\n</p>\n",
1382
- styles: [":host{display:block;padding:var(--angular-ui-powerups-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]
1451
+ styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]
1383
1452
  }] }
1384
1453
  ];
1385
1454
  /** @nocollapse */
@@ -1400,7 +1469,7 @@
1400
1469
  /**
1401
1470
  * @template D, R, E
1402
1471
  */
1403
- exports.ɵbd = /** @class */ (function (_super) {
1472
+ exports.ɵbf = /** @class */ (function (_super) {
1404
1473
  __extends(ConfirmThenDialogComponent, _super);
1405
1474
  function ConfirmThenDialogComponent(config, interactionContext) {
1406
1475
  var _this = _super.call(this) || this;
@@ -1458,9 +1527,9 @@
1458
1527
  };
1459
1528
  ConfirmThenDialogComponent.decorators = [
1460
1529
  { type: core.Component, args: [{
1461
- selector: 'angular-ui-powerups-confirmation-dialog',
1530
+ selector: 'aup-confirmation-dialog',
1462
1531
  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()\" data-cy=\"cancel-button\">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]=\"isDestructive() ? 'warn' : 'primary'\"\n (click)=\"onConfirm()\" data-cy=\"confirm-button\">{{confirm.ok()}}</button>\n</p>\n\n",
1463
- styles: [":host{display:block;padding:var(--angular-ui-powerups-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]
1532
+ styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]
1464
1533
  }] }
1465
1534
  ];
1466
1535
  /** @nocollapse */
@@ -1472,9 +1541,9 @@
1472
1541
  }(AbstractActivity));
1473
1542
  if (false) {
1474
1543
  /** @type {?} */
1475
- exports.ɵbd.prototype.config;
1544
+ exports.ɵbf.prototype.config;
1476
1545
  /** @type {?} */
1477
- exports.ɵbd.prototype.interactionContext;
1546
+ exports.ɵbf.prototype.interactionContext;
1478
1547
  }
1479
1548
  (function (ConfirmThenDialogComponent) {
1480
1549
  /**
@@ -1491,7 +1560,7 @@
1491
1560
  /** @type {?} */
1492
1561
  Data.prototype.data;
1493
1562
  }
1494
- })(exports.ɵbd || (exports.ɵbd = {}));
1563
+ })(exports.ɵbf || (exports.ɵbf = {}));
1495
1564
 
1496
1565
  /**
1497
1566
  * @fileoverview added by tsickle
@@ -1524,9 +1593,9 @@
1524
1593
  };
1525
1594
  ConfirmationDialogComponent.decorators = [
1526
1595
  { type: core.Component, args: [{
1527
- selector: 'angular-ui-powerups-confirmation-dialog',
1596
+ selector: 'aup-confirmation-dialog',
1528
1597
  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()\" data-cy=\"cancel-button\">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]=\"isDestructive() ? 'warn' : 'primary'\"\n (click)=\"done()\" data-cy=\"confirm-button\">{{confirm.ok()}}</button>\n</p>\n\n",
1529
- styles: [":host{display:block;padding:var(--angular-ui-powerups-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]
1598
+ styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-actions{justify-content:flex-end}"]
1530
1599
  }] }
1531
1600
  ];
1532
1601
  /** @nocollapse */
@@ -1843,7 +1912,7 @@
1843
1912
  * @return {?}
1844
1913
  */
1845
1914
  function (confirm, activityType, data) {
1846
- return this.startActivity(exports.ɵbd, {
1915
+ return this.startActivity(exports.ɵbf, {
1847
1916
  confirm: confirm,
1848
1917
  activityType: activityType,
1849
1918
  data: data
@@ -1972,8 +2041,8 @@
1972
2041
  };
1973
2042
  ActivityContainerComponent.decorators = [
1974
2043
  { type: core.Component, args: [{
1975
- selector: 'angular-ui-powerups-activity-container',
1976
- template: "<mat-tab-group #tabs no-tab-header [dynamicHeight]=\"true\">\n <mat-tab *ngFor=\"let tab of activityTabs.value\">\n <angular-ui-powerups-activity-outlet [interactionContext]=\"this\"\n [activityContext]=\"tab\"></angular-ui-powerups-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n",
2044
+ selector: 'aup-activity-container',
2045
+ template: "<mat-tab-group #tabs no-tab-header [dynamicHeight]=\"true\">\n <mat-tab *ngFor=\"let tab of activityTabs.value\">\n <aup-activity-outlet [interactionContext]=\"this\"\n [activityContext]=\"tab\"></aup-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n",
1977
2046
  styles: [":host{display:block}"]
1978
2047
  }] }
1979
2048
  ];
@@ -2022,7 +2091,7 @@
2022
2091
  }
2023
2092
  InteractionOutletComponent.decorators = [
2024
2093
  { type: core.Component, args: [{
2025
- selector: 'angular-ui-powerups-interaction-outlet',
2094
+ selector: 'aup-interaction-outlet',
2026
2095
  template: "<router-outlet name=\"interaction-context\"></router-outlet>\n",
2027
2096
  styles: [":host{display:block}"]
2028
2097
  }] }
@@ -2177,6 +2246,7 @@
2177
2246
  * @return {?}
2178
2247
  */
2179
2248
  function () {
2249
+ console.log("###### STARTING");
2180
2250
  _this.currentActivityId = uuid.v1();
2181
2251
  // this.location.go(this.router.routerState.snapshot.url, "aup");
2182
2252
  /** @type {?} */
@@ -2233,6 +2303,7 @@
2233
2303
  * @return {?}
2234
2304
  */
2235
2305
  function () {
2306
+ console.log("###### FINISHED");
2236
2307
  _this.currentActivityId = null;
2237
2308
  self.safelyUpdateActivityListDelegate(null);
2238
2309
  }));
@@ -2297,7 +2368,7 @@
2297
2368
  * @return {?}
2298
2369
  */
2299
2370
  function (confirm, activityType, data) {
2300
- return this._startActivity(exports.ɵbd, {
2371
+ return this._startActivity(exports.ɵbf, {
2301
2372
  confirm: confirm,
2302
2373
  activityType: activityType,
2303
2374
  data: data
@@ -2370,7 +2441,7 @@
2370
2441
  declarations: [
2371
2442
  ActivityContainerComponent,
2372
2443
  ConfirmationDialogComponent,
2373
- exports.ɵbd,
2444
+ exports.ɵbf,
2374
2445
  AlertDialogComponent,
2375
2446
  ActivityOutletComponent,
2376
2447
  InteractionOutletComponent
@@ -2383,7 +2454,7 @@
2383
2454
  entryComponents: [
2384
2455
  ActivityContainerComponent,
2385
2456
  ConfirmationDialogComponent,
2386
- exports.ɵbd,
2457
+ exports.ɵbf,
2387
2458
  AlertDialogComponent
2388
2459
  ],
2389
2460
  providers: [
@@ -2411,7 +2482,7 @@
2411
2482
  };
2412
2483
  BusyOverlayComponent.decorators = [
2413
2484
  { type: core.Component, args: [{
2414
- selector: 'angular-ui-powerups-busy-overlay',
2485
+ selector: 'aup-busy-overlay',
2415
2486
  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",
2416
2487
  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}"]
2417
2488
  }] }
@@ -2456,9 +2527,9 @@
2456
2527
  };
2457
2528
  EmptyStateComponent.decorators = [
2458
2529
  { type: core.Component, args: [{
2459
- selector: 'angular-ui-powerups-empty-state',
2530
+ selector: 'aup-empty-state',
2460
2531
  template: "\n <div class=\"container\">\n <ng-content></ng-content>\n </div>\n ",
2461
- styles: [":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{padding:var(--angular-ui-powerups-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]
2532
+ styles: [":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{padding:var(--aup-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]
2462
2533
  }] }
2463
2534
  ];
2464
2535
  /** @nocollapse */
@@ -2773,11 +2844,10 @@
2773
2844
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2774
2845
  */
2775
2846
  exports.PlaceDefinition = /** @class */ (function () {
2776
- function PlaceDefinition(component, path, authenticate, order, data, routeParameters, children) {
2847
+ function PlaceDefinition(component, path, authenticate, data, routeParameters, children) {
2777
2848
  this.component = component;
2778
2849
  this.path = path;
2779
2850
  this.authenticate = authenticate;
2780
- this.order = order;
2781
2851
  this.data = data;
2782
2852
  this.routeParameters = routeParameters;
2783
2853
  this.children = children;
@@ -3083,8 +3153,6 @@
3083
3153
  /** @type {?} */
3084
3154
  exports.PlaceDefinition.prototype.authenticate;
3085
3155
  /** @type {?} */
3086
- exports.PlaceDefinition.prototype.order;
3087
- /** @type {?} */
3088
3156
  exports.PlaceDefinition.prototype.data;
3089
3157
  /** @type {?} */
3090
3158
  exports.PlaceDefinition.prototype.routeParameters;
@@ -3275,136 +3343,182 @@
3275
3343
  * @fileoverview added by tsickle
3276
3344
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3277
3345
  */
3278
- var AbstractPlaceNavigationComponent = /** @class */ (function (_super) {
3279
- __extends(AbstractPlaceNavigationComponent, _super);
3280
- function AbstractPlaceNavigationComponent() {
3281
- var _this = _super.call(this) || this;
3282
- var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
3283
- _this.placeDefinitions = chain(_this.placesModel).map((/**
3284
- * @param {?} c
3285
- * @return {?}
3286
- */
3287
- function (c) { return exports.PlaceComponent.getDefinition(c); }));
3288
- return _this;
3346
+ /**
3347
+ * @record
3348
+ */
3349
+ function Params() { }
3350
+ var Visit = /** @class */ (function () {
3351
+ function Visit(placeDefinition, visitParameters) {
3352
+ if (visitParameters === void 0) { visitParameters = {}; }
3353
+ this.placeDefinition = placeDefinition;
3354
+ this.visitParameters = visitParameters;
3289
3355
  }
3356
+ // @Trace()
3357
+ // @Trace()
3290
3358
  /**
3291
- * @param {?} placeDef
3292
3359
  * @return {?}
3293
3360
  */
3294
- AbstractPlaceNavigationComponent.prototype.getNav = /**
3295
- * @param {?} placeDef
3361
+ Visit.prototype.getRouteId =
3362
+ // @Trace()
3363
+ /**
3296
3364
  * @return {?}
3297
3365
  */
3298
- function (placeDef) {
3299
- /** @type {?} */
3300
- var navItem = (/** @type {?} */ (placeDef.getPlaceData('nav')));
3301
- return {
3302
- title: (/**
3303
- * @return {?}
3304
- */
3305
- function () { return navItem ? navItem.title() : placeDef.searchPlaceData(['navTitle', 'title']); }),
3306
- tooltip: (/**
3307
- * @return {?}
3308
- */
3309
- function () { return navItem && navItem.tooltip ? navItem.tooltip() : placeDef.getPlaceData('navTooltip', null); }),
3310
- icon: (/**
3311
- * @return {?}
3312
- */
3313
- function () { return navItem && navItem.icon ? navItem.icon() : placeDef.getPlaceData('navIcon', null); })
3314
- };
3366
+ function () {
3367
+ return this.placeDefinition.getRouteIdFrom(this);
3315
3368
  };
3369
+ // @Trace()
3370
+ // @Trace()
3316
3371
  /**
3317
3372
  * @return {?}
3318
3373
  */
3319
- AbstractPlaceNavigationComponent.prototype.ngOnInit = /**
3374
+ Visit.prototype.hasRouteId =
3375
+ // @Trace()
3376
+ /**
3320
3377
  * @return {?}
3321
3378
  */
3322
3379
  function () {
3380
+ return !___default.isNil(this.getRouteId());
3323
3381
  };
3324
- AbstractPlaceNavigationComponent.propDecorators = {
3325
- places: [{ type: core.Input }],
3326
- placesModel: [{ type: core.Input }]
3382
+ /**
3383
+ * Returns the value of the place parameter with the specified name. The parameter
3384
+ * name is taken from the `as` option, e.g. {as: 'aCustomName'} otherwise it is the
3385
+ * same as the the ValueModel property name.
3386
+ * @param parameterName the field name of the property model or the `as` option if specified.
3387
+ */
3388
+ /**
3389
+ * Returns the value of the place parameter with the specified name. The parameter
3390
+ * name is taken from the `as` option, e.g. {as: 'aCustomName'} otherwise it is the
3391
+ * same as the the ValueModel property name.
3392
+ * @param {?} parameterName the field name of the property model or the `as` option if specified.
3393
+ * @return {?}
3394
+ */
3395
+ Visit.prototype.getParameter = /**
3396
+ * Returns the value of the place parameter with the specified name. The parameter
3397
+ * name is taken from the `as` option, e.g. {as: 'aCustomName'} otherwise it is the
3398
+ * same as the the ValueModel property name.
3399
+ * @param {?} parameterName the field name of the property model or the `as` option if specified.
3400
+ * @return {?}
3401
+ */
3402
+ function (parameterName) {
3403
+ return this.visitParameters[parameterName];
3327
3404
  };
3328
- __decorate([
3329
- pectin.StoreInListModel('placesModel'),
3330
- __metadata("design:type", Array)
3331
- ], AbstractPlaceNavigationComponent.prototype, "places", void 0);
3332
- __decorate([
3333
- pectin.UseDelegate(),
3334
- __metadata("design:type", pectin.ListModel)
3335
- ], AbstractPlaceNavigationComponent.prototype, "placesModel", void 0);
3336
- __decorate([
3337
- src.Memoize(),
3338
- __metadata("design:type", Function),
3339
- __metadata("design:paramtypes", [exports.PlaceDefinition]),
3340
- __metadata("design:returntype", Object)
3341
- ], AbstractPlaceNavigationComponent.prototype, "getNav", null);
3342
- return AbstractPlaceNavigationComponent;
3343
- }(DisposableComponent));
3344
- if (false) {
3345
- /** @type {?} */
3346
- AbstractPlaceNavigationComponent.prototype.places;
3347
- /** @type {?} */
3348
- AbstractPlaceNavigationComponent.prototype.placesModel;
3349
- /** @type {?} */
3350
- AbstractPlaceNavigationComponent.prototype.placeDefinitions;
3351
- }
3352
-
3353
- /**
3354
- * @fileoverview added by tsickle
3355
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3356
- */
3357
- var ListPlaceNavComponent = /** @class */ (function (_super) {
3358
- __extends(ListPlaceNavComponent, _super);
3359
- function ListPlaceNavComponent() {
3360
- var _this = _super.call(this) || this;
3361
- _this.expanded = true;
3362
- return _this;
3363
- }
3405
+ // @Trace()
3406
+ // @Trace()
3364
3407
  /**
3408
+ * @param {?} parameterName
3365
3409
  * @return {?}
3366
3410
  */
3367
- ListPlaceNavComponent.prototype.expandMenu = /**
3411
+ Visit.prototype.hasParameter =
3412
+ // @Trace()
3413
+ /**
3414
+ * @param {?} parameterName
3368
3415
  * @return {?}
3369
3416
  */
3370
- function () {
3371
- this.expanded = true;
3417
+ function (parameterName) {
3418
+ return Object.keys(this.visitParameters).includes(parameterName);
3419
+ };
3420
+ /**
3421
+ * @template S
3422
+ * @param {?} parameter
3423
+ * @param {?} value
3424
+ * @return {?}
3425
+ */
3426
+ Visit.prototype.replace = /**
3427
+ * @template S
3428
+ * @param {?} parameter
3429
+ * @param {?} value
3430
+ * @return {?}
3431
+ */
3432
+ function (parameter, value) {
3433
+ var _a;
3434
+ return new Visit(this.placeDefinition, __assign({}, this.visitParameters, (_a = {}, _a[parameter.name] = value, _a)));
3435
+ };
3436
+ /**
3437
+ * @template S
3438
+ * @param {?} routeParams
3439
+ * @return {?}
3440
+ */
3441
+ Visit.prototype.mergeRouteParameters = /**
3442
+ * @template S
3443
+ * @param {?} routeParams
3444
+ * @return {?}
3445
+ */
3446
+ function (routeParams) {
3447
+ var _this = this;
3448
+ // todo: whitelist parameters.
3449
+ /** @type {?} */
3450
+ var routeParameterKeys = Object.keys(routeParams);
3451
+ /** @type {?} */
3452
+ var params = {};
3453
+ this.placeDefinition.getVisitParameterDefs().forEach((/**
3454
+ * @param {?} def
3455
+ * @return {?}
3456
+ */
3457
+ function (def) {
3458
+ if (def.isRouteId || def.isRouteParameter) {
3459
+ if (routeParameterKeys.includes(def.name)) {
3460
+ params[def.name] = routeParams[def.name];
3461
+ }
3462
+ }
3463
+ else {
3464
+ // copy non route params as is, but only if they already exist otherwise we'll inject nil values and break the
3465
+ // defaults and remember sanitisation process.
3466
+ if (_this.hasParameter(def.name)) {
3467
+ params[def.name] = _this.getParameter(def.name);
3468
+ }
3469
+ }
3470
+ }));
3471
+ return new Visit(this.placeDefinition, params);
3472
+ };
3473
+ /**
3474
+ * @param {?} other
3475
+ * @return {?}
3476
+ */
3477
+ Visit.prototype.hasRoutingChangedFrom = /**
3478
+ * @param {?} other
3479
+ * @return {?}
3480
+ */
3481
+ function (other) {
3482
+ /** @type {?} */
3483
+ var samePlace = other.placeDefinition === this.placeDefinition;
3484
+ /** @type {?} */
3485
+ var sameRouteParameters = ___default.isEqual(this.placeDefinition.getFormattedRouteParameters(this, true), this.placeDefinition.getFormattedRouteParameters(other, true));
3486
+ return !samePlace || !sameRouteParameters;
3372
3487
  };
3373
3488
  /**
3489
+ * @param {?} other
3374
3490
  * @return {?}
3375
3491
  */
3376
- ListPlaceNavComponent.prototype.collapseMenu = /**
3492
+ Visit.prototype.hasChangedFrom = /**
3493
+ * @param {?} other
3377
3494
  * @return {?}
3378
3495
  */
3379
- function () {
3380
- this.expanded = false;
3496
+ function (other) {
3497
+ /** @type {?} */
3498
+ var sameNonRouteParameters = ___default.isEqual(this.placeDefinition.getNonRouteParameters(this), this.placeDefinition.getNonRouteParameters(other));
3499
+ return !sameNonRouteParameters || this.hasRoutingChangedFrom(other);
3381
3500
  };
3382
3501
  /**
3383
3502
  * @return {?}
3384
3503
  */
3385
- ListPlaceNavComponent.prototype.toggleMenu = /**
3504
+ Visit.prototype.getUrlSegments = /**
3386
3505
  * @return {?}
3387
3506
  */
3388
3507
  function () {
3389
- this.expanded = !this.expanded;
3390
- };
3391
- ListPlaceNavComponent.decorators = [
3392
- { type: core.Component, args: [{
3393
- selector: 'angular-ui-powerups-list-place-nav',
3394
- template: "<mat-nav-list class=\"app-menu\">\n <a mat-list-item *ngFor=\"let place of placeDefinitions.value\"\n [routerLink]='place.path'\n [replaceUrl]=\"true\"\n routerLinkActive #rla=\"routerLinkActive\"\n [matTooltip]=\"getNav(place).tooltip()\">\n <mat-icon *ngIf=\"getNav(place).icon()\">{{getNav(place).icon()}}</mat-icon>\n <span class=\"expanded-only\">{{getNav(place).title()}}</span>\n </a>\n</mat-nav-list>\n",
3395
- styles: [":host{display:flex;flex-direction:column;--expanded-width:235px;--nav-item-width:var(--nav-bar-height);width:var(--nav-item-width);transition:width 125ms linear}:host.expanded{width:var(--expanded-width);max-width:var(--expanded-width)}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}.header{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;height:var(--nav-bar-height);border-bottom:var(--pinstripe-border);cursor:pointer}.header .menu{flex:1}.header button{color:inherit;width:var(--nav-item-width);height:var(--nav-bar-height)}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--nav-item-width);height:var(--nav-bar-height);color:inherit}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item mat-icon{margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}a[ng-reflect-router-link=manage-instruments] mat-icon{transform:rotate(90deg)}.app-menu{padding-top:0}"]
3396
- }] }
3397
- ];
3398
- /** @nocollapse */
3399
- ListPlaceNavComponent.ctorParameters = function () { return []; };
3400
- ListPlaceNavComponent.propDecorators = {
3401
- expanded: [{ type: core.HostBinding, args: ['class.expanded',] }]
3508
+ return this.placeDefinition.hasRouteId() ?
3509
+ [new router.UrlSegment(this.placeDefinition.path, {}), new router.UrlSegment(this.placeDefinition.getFormattedRouteId(this), this.placeDefinition.getFormattedRouteParameters(this))] :
3510
+ [new router.UrlSegment(this.placeDefinition.path, this.placeDefinition.getFormattedRouteParameters(this))];
3402
3511
  };
3403
- return ListPlaceNavComponent;
3404
- }(AbstractPlaceNavigationComponent));
3512
+ return Visit;
3513
+ }());
3405
3514
  if (false) {
3406
3515
  /** @type {?} */
3407
- ListPlaceNavComponent.prototype.expanded;
3516
+ Visit.prototype.placeDefinition;
3517
+ /**
3518
+ * @type {?}
3519
+ * @private
3520
+ */
3521
+ Visit.prototype.visitParameters;
3408
3522
  }
3409
3523
 
3410
3524
  /**
@@ -3596,262 +3710,91 @@
3596
3710
  })(exports.NavigationSession || (exports.NavigationSession = {}));
3597
3711
 
3598
3712
  /**
3599
- * @fileoverview added by tsickle
3600
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3601
- */
3602
- var PlaceHistory = /** @class */ (function () {
3603
- function PlaceHistory(router) {
3604
- this.router = router;
3605
- this._history = new Map();
3606
- }
3607
- // @Trace()
3608
- // @Trace()
3609
- /**
3610
- * @param {?} state
3611
- * @return {?}
3612
- */
3613
- PlaceHistory.prototype.add =
3614
- // @Trace()
3615
- /**
3616
- * @param {?} state
3617
- * @return {?}
3618
- */
3619
- function (state) {
3620
- /** @type {?} */
3621
- var history = this.getHistory(state.placeDefinition);
3622
- /** @type {?} */
3623
- var previousState = ___default__default.last(history);
3624
- if (!previousState || state.hasChangedFrom(previousState)) {
3625
- history.unshift(state); // LIFO
3626
- this.setHistory(state.placeDefinition, history.slice(0, 3)); // limit our history to 4 visits
3627
- }
3628
- };
3629
- /**
3630
- * @param {?} placeDef
3631
- * @return {?}
3632
- */
3633
- PlaceHistory.prototype.getHistory = /**
3634
- * @param {?} placeDef
3635
- * @return {?}
3636
- */
3637
- function (placeDef) {
3638
- /** @type {?} */
3639
- var history = this._history.get(placeDef);
3640
- if (!history) {
3641
- history = [];
3642
- this.setHistory(placeDef, history);
3643
- }
3644
- return history;
3645
- };
3646
- /**
3647
- * @private
3648
- * @param {?} placeDef
3649
- * @param {?} history
3650
- * @return {?}
3651
- */
3652
- PlaceHistory.prototype.setHistory = /**
3653
- * @private
3654
- * @param {?} placeDef
3655
- * @param {?} history
3656
- * @return {?}
3657
- */
3658
- function (placeDef, history) {
3659
- this._history.set(placeDef, history);
3660
- };
3661
- PlaceHistory.decorators = [
3662
- { type: core.Injectable, args: [{
3663
- providedIn: 'root'
3664
- },] }
3665
- ];
3666
- /** @nocollapse */
3667
- PlaceHistory.ctorParameters = function () { return [
3668
- { type: router.Router }
3669
- ]; };
3670
- /** @nocollapse */ PlaceHistory.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function PlaceHistory_Factory() { return new PlaceHistory(core.ɵɵinject(router.Router)); }, token: PlaceHistory, providedIn: "root" });
3671
- return PlaceHistory;
3672
- }());
3673
- if (false) {
3674
- /**
3675
- * @type {?}
3676
- * @private
3677
- */
3678
- PlaceHistory.prototype._history;
3679
- /**
3680
- * @type {?}
3681
- * @private
3682
- */
3683
- PlaceHistory.prototype.router;
3684
- }
3685
-
3686
- /**
3687
- * @fileoverview added by tsickle
3688
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3689
- */
3690
- /**
3691
- * @record
3692
- */
3693
- function Params() { }
3694
- var Visit = /** @class */ (function () {
3695
- function Visit(placeDefinition, visitParameters) {
3696
- if (visitParameters === void 0) { visitParameters = {}; }
3697
- this.placeDefinition = placeDefinition;
3698
- this.visitParameters = visitParameters;
3699
- }
3700
- // @Trace()
3701
- // @Trace()
3702
- /**
3703
- * @return {?}
3704
- */
3705
- Visit.prototype.getRouteId =
3706
- // @Trace()
3707
- /**
3708
- * @return {?}
3709
- */
3710
- function () {
3711
- return this.placeDefinition.getRouteIdFrom(this);
3712
- };
3713
- // @Trace()
3714
- // @Trace()
3715
- /**
3716
- * @return {?}
3717
- */
3718
- Visit.prototype.hasRouteId =
3719
- // @Trace()
3720
- /**
3721
- * @return {?}
3722
- */
3723
- function () {
3724
- return !___default.isNil(this.getRouteId());
3725
- };
3726
- /**
3727
- * Returns the value of the place parameter with the specified name. The parameter
3728
- * name is taken from the `as` option, e.g. {as: 'aCustomName'} otherwise it is the
3729
- * same as the the ValueModel property name.
3730
- * @param parameterName the field name of the property model or the `as` option if specified.
3731
- */
3732
- /**
3733
- * Returns the value of the place parameter with the specified name. The parameter
3734
- * name is taken from the `as` option, e.g. {as: 'aCustomName'} otherwise it is the
3735
- * same as the the ValueModel property name.
3736
- * @param {?} parameterName the field name of the property model or the `as` option if specified.
3737
- * @return {?}
3738
- */
3739
- Visit.prototype.getParameter = /**
3740
- * Returns the value of the place parameter with the specified name. The parameter
3741
- * name is taken from the `as` option, e.g. {as: 'aCustomName'} otherwise it is the
3742
- * same as the the ValueModel property name.
3743
- * @param {?} parameterName the field name of the property model or the `as` option if specified.
3744
- * @return {?}
3745
- */
3746
- function (parameterName) {
3747
- return this.visitParameters[parameterName];
3748
- };
3749
- // @Trace()
3750
- // @Trace()
3751
- /**
3752
- * @param {?} parameterName
3753
- * @return {?}
3754
- */
3755
- Visit.prototype.hasParameter =
3756
- // @Trace()
3757
- /**
3758
- * @param {?} parameterName
3759
- * @return {?}
3760
- */
3761
- function (parameterName) {
3762
- return Object.keys(this.visitParameters).includes(parameterName);
3763
- };
3764
- /**
3765
- * @template S
3766
- * @param {?} parameter
3767
- * @param {?} value
3768
- * @return {?}
3769
- */
3770
- Visit.prototype.replace = /**
3771
- * @template S
3772
- * @param {?} parameter
3773
- * @param {?} value
3774
- * @return {?}
3775
- */
3776
- function (parameter, value) {
3777
- var _a;
3778
- return new Visit(this.placeDefinition, __assign({}, this.visitParameters, (_a = {}, _a[parameter.name] = value, _a)));
3779
- };
3780
- /**
3781
- * @template S
3782
- * @param {?} routeParams
3783
- * @return {?}
3784
- */
3785
- Visit.prototype.mergeRouteParameters = /**
3786
- * @template S
3787
- * @param {?} routeParams
3788
- * @return {?}
3789
- */
3790
- function (routeParams) {
3791
- var _this = this;
3792
- // todo: whitelist parameters.
3793
- /** @type {?} */
3794
- var routeParameterKeys = Object.keys(routeParams);
3795
- /** @type {?} */
3796
- var params = {};
3797
- this.placeDefinition.getVisitParameterDefs().forEach((/**
3798
- * @param {?} def
3799
- * @return {?}
3800
- */
3801
- function (def) {
3802
- if (def.isRouteId || def.isRouteParameter) {
3803
- if (routeParameterKeys.includes(def.name)) {
3804
- params[def.name] = routeParams[def.name];
3805
- }
3806
- }
3807
- else {
3808
- // copy non route params as is, but only if they already exist otherwise we'll inject nil values and break the
3809
- // defaults and remember sanitisation process.
3810
- if (_this.hasParameter(def.name)) {
3811
- params[def.name] = _this.getParameter(def.name);
3812
- }
3813
- }
3814
- }));
3815
- return new Visit(this.placeDefinition, params);
3816
- };
3713
+ * @fileoverview added by tsickle
3714
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3715
+ */
3716
+ var PlaceHistory = /** @class */ (function () {
3717
+ function PlaceHistory(router) {
3718
+ this.router = router;
3719
+ this._history = new Map();
3720
+ }
3721
+ // @Trace()
3722
+ // @Trace()
3817
3723
  /**
3818
- * @param {?} other
3724
+ * @param {?} state
3819
3725
  * @return {?}
3820
3726
  */
3821
- Visit.prototype.hasRoutingChangedFrom = /**
3822
- * @param {?} other
3727
+ PlaceHistory.prototype.add =
3728
+ // @Trace()
3729
+ /**
3730
+ * @param {?} state
3823
3731
  * @return {?}
3824
3732
  */
3825
- function (other) {
3733
+ function (state) {
3826
3734
  /** @type {?} */
3827
- var samePlace = other.placeDefinition === this.placeDefinition;
3735
+ var history = this.getHistory(state.placeDefinition);
3828
3736
  /** @type {?} */
3829
- var sameRouteParameters = ___default.isEqual(this.placeDefinition.getFormattedRouteParameters(this, true), this.placeDefinition.getFormattedRouteParameters(other, true));
3830
- return !samePlace || !sameRouteParameters;
3737
+ var previousState = ___default__default.last(history);
3738
+ if (!previousState || state.hasChangedFrom(previousState)) {
3739
+ history.unshift(state); // LIFO
3740
+ this.setHistory(state.placeDefinition, history.slice(0, 3)); // limit our history to 4 visits
3741
+ }
3831
3742
  };
3832
3743
  /**
3833
- * @param {?} other
3744
+ * @param {?} placeDef
3834
3745
  * @return {?}
3835
3746
  */
3836
- Visit.prototype.hasChangedFrom = /**
3837
- * @param {?} other
3747
+ PlaceHistory.prototype.getHistory = /**
3748
+ * @param {?} placeDef
3838
3749
  * @return {?}
3839
3750
  */
3840
- function (other) {
3751
+ function (placeDef) {
3841
3752
  /** @type {?} */
3842
- var sameNonRouteParameters = ___default.isEqual(this.placeDefinition.getNonRouteParameters(this), this.placeDefinition.getNonRouteParameters(other));
3843
- return !sameNonRouteParameters || this.hasRoutingChangedFrom(other);
3753
+ var history = this._history.get(placeDef);
3754
+ if (!history) {
3755
+ history = [];
3756
+ this.setHistory(placeDef, history);
3757
+ }
3758
+ return history;
3844
3759
  };
3845
- return Visit;
3760
+ /**
3761
+ * @private
3762
+ * @param {?} placeDef
3763
+ * @param {?} history
3764
+ * @return {?}
3765
+ */
3766
+ PlaceHistory.prototype.setHistory = /**
3767
+ * @private
3768
+ * @param {?} placeDef
3769
+ * @param {?} history
3770
+ * @return {?}
3771
+ */
3772
+ function (placeDef, history) {
3773
+ this._history.set(placeDef, history);
3774
+ };
3775
+ PlaceHistory.decorators = [
3776
+ { type: core.Injectable, args: [{
3777
+ providedIn: 'root'
3778
+ },] }
3779
+ ];
3780
+ /** @nocollapse */
3781
+ PlaceHistory.ctorParameters = function () { return [
3782
+ { type: router.Router }
3783
+ ]; };
3784
+ /** @nocollapse */ PlaceHistory.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function PlaceHistory_Factory() { return new PlaceHistory(core.ɵɵinject(router.Router)); }, token: PlaceHistory, providedIn: "root" });
3785
+ return PlaceHistory;
3846
3786
  }());
3847
3787
  if (false) {
3848
- /** @type {?} */
3849
- Visit.prototype.placeDefinition;
3850
3788
  /**
3851
3789
  * @type {?}
3852
3790
  * @private
3853
3791
  */
3854
- Visit.prototype.visitParameters;
3792
+ PlaceHistory.prototype._history;
3793
+ /**
3794
+ * @type {?}
3795
+ * @private
3796
+ */
3797
+ PlaceHistory.prototype.router;
3855
3798
  }
3856
3799
 
3857
3800
  /**
@@ -3983,13 +3926,17 @@
3983
3926
  });
3984
3927
  });
3985
3928
  };
3929
+ // @Trace()
3930
+ // @Trace()
3986
3931
  /**
3987
3932
  * @param {?} activatedRoute
3988
3933
  * @param {?} previous
3989
3934
  * @param {?} next
3990
3935
  * @return {?}
3991
3936
  */
3992
- PlaceRouter.prototype.pushVisitChangesToRoute = /**
3937
+ PlaceRouter.prototype.pushVisitChangesToRoute =
3938
+ // @Trace()
3939
+ /**
3993
3940
  * @param {?} activatedRoute
3994
3941
  * @param {?} previous
3995
3942
  * @param {?} next
@@ -4009,13 +3956,16 @@
4009
3956
  * @return {?}
4010
3957
  */
4011
3958
  function (router) {
3959
+ // we have to to use the definition for route id as our redirection always includes
3960
+ // the id in the url segements (but leaves it blank when there's no id). I.e. in the
3961
+ // no id case we're doing the following redirect [<placePath>, ""] -> ["..", <id>]
4012
3962
  /** @type {?} */
4013
3963
  var relativePath = !!previous.placeDefinition.hasRouteId() ? '..' : '.';
4014
3964
  /** @type {?} */
4015
3965
  var commands = __spread([
4016
3966
  relativePath
4017
3967
  ], _this.createRouteParameters(next), _this.extractChildPath(activatedRoute.snapshot));
4018
- console.log('### Redirect', commands);
3968
+ console.log('### Push Changes to route Redirect', { commands: commands, relativeTo: activatedRoute.snapshot.url });
4019
3969
  return router.navigate(commands, {
4020
3970
  relativeTo: activatedRoute
4021
3971
  });
@@ -4164,12 +4114,6 @@
4164
4114
  __metadata("design:paramtypes", [Visit, Object]),
4165
4115
  __metadata("design:returntype", Promise)
4166
4116
  ], PlaceRouter.prototype, "navigate", null);
4167
- __decorate([
4168
- pectin.Trace(),
4169
- __metadata("design:type", Function),
4170
- __metadata("design:paramtypes", [router.ActivatedRoute, Visit, Visit]),
4171
- __metadata("design:returntype", Promise)
4172
- ], PlaceRouter.prototype, "pushVisitChangesToRoute", null);
4173
4117
  return PlaceRouter;
4174
4118
  }(pectin.GarbageCollector));
4175
4119
  if (false) {
@@ -4283,29 +4227,51 @@
4283
4227
  var _this = _super.call(this) || this;
4284
4228
  _this.router = router;
4285
4229
  _this.placeRouter = placeRouter;
4286
- _this.parentOutlet = parentOutlet;
4287
4230
  _this.animate = true;
4288
4231
  _this.placeChanged = new core.EventEmitter();
4289
4232
  _this._activePlace = new pectin.MutableValueModel();
4233
+ _this._placeVisit = new pectin.MutableValueModel();
4290
4234
  _this._inOutletUpdate = new pectin.Guard();
4291
4235
  _this._activatedRouteModel = new pectin.MutableValueModel();
4292
4236
  _this._placeDefinition = new pectin.MutableValueModel();
4293
- /**
4294
- * TODO: This is now really a visit
4295
- */
4296
- _this._placeVisit = new pectin.MutableValueModel();
4297
4237
  var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
4298
- // Handle incoming route changes.
4238
+ _this.parentOutletModel = new pectin.MutableValueModel(parentOutlet);
4299
4239
  /** @type {?} */
4300
- var inRouteVisitUpdate = new pectin.Guard();
4240
+ var defaultPlaceAnimationOrder = chain(_this.parentOutletModel)
4241
+ .pullValueModel((/**
4242
+ * @param {?} o
4243
+ * @return {?}
4244
+ */
4245
+ function (o) { return o.activePlaceModel; }))
4246
+ .pluck("placeDefinition")
4247
+ .pluckList("children")
4248
+ .pluck("component");
4249
+ /** @type {?} */
4250
+ var activatePlaceType = chain(_this.activePlaceModel).map((/**
4251
+ * @param {?} p
4252
+ * @return {?}
4253
+ */
4254
+ function (p) { return (/** @type {?} */ (p.constructor)); }));
4255
+ _this.placeAnimationOrder = chain(_this.customPlaceAnimationOrderModel)
4256
+ .otherwise(defaultPlaceAnimationOrder)
4257
+ .indexOf(activatePlaceType)
4258
+ .map((/**
4259
+ * @param {?} order
4260
+ * @return {?}
4261
+ */
4262
+ function (order) { return Math.max(order, 0); })); // we get -1 on the first load which triggers an animation to the first page, so alway pin it to 0.
4263
+ // we get -1 on the first load which triggers an animation to the first page, so alway pin it to 0.
4264
+ // Push incoming changes into the component
4301
4265
  /** @type {?} */
4302
4266
  var routeVisit = chain(_this._activePlace).pluck('placeDefinition').findIn(placeRouter.activeVisitIndex);
4267
+ /** @type {?} */
4268
+ var inRouteVisitUpdate = new pectin.Guard();
4303
4269
  when.valueOf(routeVisit).changes((/**
4304
4270
  * @param {?} visit
4305
4271
  * @return {?}
4306
4272
  */
4307
4273
  function (visit) {
4308
- if (visit) {
4274
+ if (visit) { // can be null while the place and index sync up
4309
4275
  inRouteVisitUpdate.whileTrue((/**
4310
4276
  * @return {?}
4311
4277
  */
@@ -4358,6 +4324,16 @@
4358
4324
  relativeTo: this.parentOutlet ? this.parentOutlet.activatedRouteModel.value : null
4359
4325
  });
4360
4326
  };
4327
+ Object.defineProperty(PlaceOutletComponent.prototype, "parentOutlet", {
4328
+ get: /**
4329
+ * @return {?}
4330
+ */
4331
+ function () {
4332
+ return this.parentOutletModel.value;
4333
+ },
4334
+ enumerable: true,
4335
+ configurable: true
4336
+ });
4361
4337
  /**
4362
4338
  * @param {?} next
4363
4339
  * @param {?} previous
@@ -4424,12 +4400,16 @@
4424
4400
  this.animationDone();
4425
4401
  }
4426
4402
  };
4403
+ // @Trace()
4404
+ // @Trace()
4427
4405
  /**
4428
4406
  * @param {?} routerOutlet
4429
4407
  * @param {?} $event
4430
4408
  * @return {?}
4431
4409
  */
4432
- PlaceOutletComponent.prototype.onOutletDeactivated = /**
4410
+ PlaceOutletComponent.prototype.onOutletDeactivated =
4411
+ // @Trace()
4412
+ /**
4433
4413
  * @param {?} routerOutlet
4434
4414
  * @param {?} $event
4435
4415
  * @return {?}
@@ -4446,110 +4426,281 @@
4446
4426
  }));
4447
4427
  };
4448
4428
  /**
4449
- * @param {?} outlet
4450
4429
  * @return {?}
4451
4430
  */
4452
- PlaceOutletComponent.prototype.getPlaceOrder = /**
4453
- * @param {?} outlet
4431
+ PlaceOutletComponent.prototype.animationDone = /**
4432
+ * @return {?}
4433
+ */
4434
+ function () {
4435
+ if (this._activePlace.value) {
4436
+ this._activePlace.value.onPlaceReady();
4437
+ }
4438
+ };
4439
+ PlaceOutletComponent.decorators = [
4440
+ { type: core.Component, args: [{
4441
+ selector: 'aup-place-outlet',
4442
+ template: "<div class=\"router-outlet-container\"\n [@routeAnimations]=\"placeAnimationOrder.value\"\n (@routeAnimations.done)=\"animationDone()\"\n>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated(routerOutlet, $event)\">\n </router-outlet>\n</div>\n\n",
4443
+ animations: [LEFT_RIGHT_PLACE_ANIMATION],
4444
+ styles: [":host{display:flex;flex-direction:column;min-height:0}.router-outlet-container{flex:1;display:block;position:relative;min-height:0}router-outlet{display:none}"]
4445
+ }] }
4446
+ ];
4447
+ /** @nocollapse */
4448
+ PlaceOutletComponent.ctorParameters = function () { return [
4449
+ { type: router.Router },
4450
+ { type: PlaceRouter },
4451
+ { type: PlaceOutletComponent, decorators: [{ type: core.SkipSelf }, { type: core.Optional }] }
4452
+ ]; };
4453
+ PlaceOutletComponent.propDecorators = {
4454
+ animate: [{ type: core.Input }],
4455
+ customPlaceAnimationOrderModel: [{ type: core.Input, args: ['placeAnimationOrderModel',] }],
4456
+ customPlaceAnimationOrder: [{ type: core.Input, args: ['placeAnimationOrder',] }],
4457
+ placeChanged: [{ type: core.Output }],
4458
+ routerOut: [{ type: core.ViewChild, args: ['routeOutlet', { static: true },] }]
4459
+ };
4460
+ __decorate([
4461
+ pectin.UseDelegate(),
4462
+ __metadata("design:type", pectin.ListModel)
4463
+ ], PlaceOutletComponent.prototype, "customPlaceAnimationOrderModel", void 0);
4464
+ __decorate([
4465
+ pectin.StoreInListModel("customPlaceAnimationOrderModel"),
4466
+ __metadata("design:type", Array)
4467
+ ], PlaceOutletComponent.prototype, "customPlaceAnimationOrder", void 0);
4468
+ __decorate([
4469
+ pectin.Trace(),
4470
+ __metadata("design:type", Function),
4471
+ __metadata("design:paramtypes", [Visit]),
4472
+ __metadata("design:returntype", void 0)
4473
+ ], PlaceOutletComponent.prototype, "navigate", null);
4474
+ __decorate([
4475
+ pectin.Trace(),
4476
+ __metadata("design:type", Function),
4477
+ __metadata("design:paramtypes", [router.RouterOutlet, exports.PlaceComponent]),
4478
+ __metadata("design:returntype", void 0)
4479
+ ], PlaceOutletComponent.prototype, "onOutletActivated", null);
4480
+ return PlaceOutletComponent;
4481
+ }(DisposableComponent));
4482
+ if (false) {
4483
+ /** @type {?} */
4484
+ PlaceOutletComponent.prototype.animate;
4485
+ /** @type {?} */
4486
+ PlaceOutletComponent.prototype.customPlaceAnimationOrderModel;
4487
+ /** @type {?} */
4488
+ PlaceOutletComponent.prototype.customPlaceAnimationOrder;
4489
+ /** @type {?} */
4490
+ PlaceOutletComponent.prototype.placeChanged;
4491
+ /** @type {?} */
4492
+ PlaceOutletComponent.prototype.routerOut;
4493
+ /**
4494
+ * @type {?}
4495
+ * @private
4496
+ */
4497
+ PlaceOutletComponent.prototype._activePlace;
4498
+ /**
4499
+ * @type {?}
4500
+ * @private
4501
+ */
4502
+ PlaceOutletComponent.prototype._placeVisit;
4503
+ /**
4504
+ * @type {?}
4505
+ * @private
4506
+ */
4507
+ PlaceOutletComponent.prototype._inOutletUpdate;
4508
+ /**
4509
+ * @type {?}
4510
+ * @private
4511
+ */
4512
+ PlaceOutletComponent.prototype._activatedRouteModel;
4513
+ /**
4514
+ * @type {?}
4515
+ * @private
4516
+ */
4517
+ PlaceOutletComponent.prototype._placeDefinition;
4518
+ /**
4519
+ * @type {?}
4520
+ * @private
4521
+ */
4522
+ PlaceOutletComponent.prototype.parentOutletModel;
4523
+ /** @type {?} */
4524
+ PlaceOutletComponent.prototype.placeAnimationOrder;
4525
+ /**
4526
+ * @type {?}
4527
+ * @private
4528
+ */
4529
+ PlaceOutletComponent.prototype.router;
4530
+ /**
4531
+ * @type {?}
4532
+ * @private
4533
+ */
4534
+ PlaceOutletComponent.prototype.placeRouter;
4535
+ }
4536
+
4537
+ /**
4538
+ * @fileoverview added by tsickle
4539
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4540
+ */
4541
+ var AbstractPlaceNavigationComponent = /** @class */ (function (_super) {
4542
+ __extends(AbstractPlaceNavigationComponent, _super);
4543
+ function AbstractPlaceNavigationComponent() {
4544
+ var _this = _super.call(this) || this;
4545
+ var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
4546
+ _this.placeDefinitions = chain(_this.placesModel).map((/**
4547
+ * @param {?} c
4548
+ * @return {?}
4549
+ */
4550
+ function (c) { return exports.PlaceComponent.getDefinition(c); }));
4551
+ _this.relativeToModel = chain(_this.placeOutletModel).pullValueModel((/**
4552
+ * @param {?} o
4553
+ * @return {?}
4554
+ */
4555
+ function (o) { return o.activatedRouteModel; }));
4556
+ _this.commandFactory = pectin.Command.createFactory((/**
4557
+ * @param {?} placeDefinition
4558
+ * @return {?}
4559
+ */
4560
+ function (placeDefinition) {
4561
+ _this.placeOutlet.navigate(new Visit(placeDefinition));
4562
+ }));
4563
+ return _this;
4564
+ }
4565
+ /**
4566
+ * @param {?} placeDef
4567
+ * @return {?}
4568
+ */
4569
+ AbstractPlaceNavigationComponent.prototype.getNav = /**
4570
+ * @param {?} placeDef
4454
4571
  * @return {?}
4455
4572
  */
4456
- function (outlet) {
4457
- return this.animate && outlet && outlet.activatedRouteData && outlet.activatedRouteData['placeOrder'];
4573
+ function (placeDef) {
4574
+ /** @type {?} */
4575
+ var navItem = (/** @type {?} */ (placeDef.getPlaceData('nav')));
4576
+ return {
4577
+ title: (/**
4578
+ * @return {?}
4579
+ */
4580
+ function () { return navItem ? navItem.title() : placeDef.searchPlaceData(['navTitle', 'title']); }),
4581
+ tooltip: (/**
4582
+ * @return {?}
4583
+ */
4584
+ function () { return navItem && navItem.tooltip ? navItem.tooltip() : placeDef.getPlaceData('navTooltip', null); }),
4585
+ icon: (/**
4586
+ * @return {?}
4587
+ */
4588
+ function () { return navItem && navItem.icon ? navItem.icon() : placeDef.getPlaceData('navIcon', null); })
4589
+ };
4458
4590
  };
4459
4591
  /**
4460
4592
  * @return {?}
4461
4593
  */
4462
- PlaceOutletComponent.prototype.animationDone = /**
4594
+ AbstractPlaceNavigationComponent.prototype.ngOnInit = /**
4463
4595
  * @return {?}
4464
4596
  */
4465
4597
  function () {
4466
- if (this._activePlace.value) {
4467
- this._activePlace.value.onPlaceReady();
4468
- }
4469
4598
  };
4470
- PlaceOutletComponent.decorators = [
4471
- { type: core.Component, args: [{
4472
- selector: 'angular-ui-powerups-place-outlet',
4473
- template: "<div class=\"router-outlet-container\"\n [@routeAnimations]=\"getPlaceOrder(routerOutlet)\"\n (@routeAnimations.done)=\"animationDone()\"\n>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated(routerOutlet, $event)\">\n </router-outlet>\n</div>\n\n",
4474
- animations: [LEFT_RIGHT_PLACE_ANIMATION],
4475
- styles: [":host{display:flex;flex-direction:column;min-height:0}.router-outlet-container{flex:1;display:block;position:relative;min-height:0}router-outlet{display:none}"]
4476
- }] }
4477
- ];
4478
- /** @nocollapse */
4479
- PlaceOutletComponent.ctorParameters = function () { return [
4480
- { type: router.Router },
4481
- { type: PlaceRouter },
4482
- { type: PlaceOutletComponent, decorators: [{ type: core.SkipSelf }, { type: core.Optional }] }
4483
- ]; };
4484
- PlaceOutletComponent.propDecorators = {
4485
- animate: [{ type: core.Input }],
4486
- placeChanged: [{ type: core.Output }],
4487
- routerOut: [{ type: core.ViewChild, args: ['routeOutlet', { static: true },] }]
4599
+ AbstractPlaceNavigationComponent.propDecorators = {
4600
+ places: [{ type: core.Input }],
4601
+ placesModel: [{ type: core.Input }],
4602
+ placeOutlet: [{ type: core.Input }],
4603
+ placeOutletModel: [{ type: core.Input }]
4488
4604
  };
4489
4605
  __decorate([
4490
- pectin.Trace(),
4491
- __metadata("design:type", Function),
4492
- __metadata("design:paramtypes", [Visit]),
4493
- __metadata("design:returntype", void 0)
4494
- ], PlaceOutletComponent.prototype, "navigate", null);
4606
+ pectin.StoreInListModel('placesModel'),
4607
+ __metadata("design:type", Array)
4608
+ ], AbstractPlaceNavigationComponent.prototype, "places", void 0);
4495
4609
  __decorate([
4496
- pectin.Trace(),
4497
- __metadata("design:type", Function),
4498
- __metadata("design:paramtypes", [router.RouterOutlet, exports.PlaceComponent]),
4499
- __metadata("design:returntype", void 0)
4500
- ], PlaceOutletComponent.prototype, "onOutletActivated", null);
4610
+ pectin.UseDelegate(),
4611
+ __metadata("design:type", pectin.ListModel)
4612
+ ], AbstractPlaceNavigationComponent.prototype, "placesModel", void 0);
4501
4613
  __decorate([
4502
- pectin.Trace(),
4614
+ pectin.StoreInValueModel('placeOutletModel'),
4615
+ __metadata("design:type", PlaceOutletComponent)
4616
+ ], AbstractPlaceNavigationComponent.prototype, "placeOutlet", void 0);
4617
+ __decorate([
4618
+ pectin.UseDelegate(),
4619
+ __metadata("design:type", pectin.ValueModel)
4620
+ ], AbstractPlaceNavigationComponent.prototype, "placeOutletModel", void 0);
4621
+ __decorate([
4622
+ src.Memoize(),
4503
4623
  __metadata("design:type", Function),
4504
- __metadata("design:paramtypes", [router.RouterOutlet, Object]),
4505
- __metadata("design:returntype", void 0)
4506
- ], PlaceOutletComponent.prototype, "onOutletDeactivated", null);
4507
- return PlaceOutletComponent;
4624
+ __metadata("design:paramtypes", [exports.PlaceDefinition]),
4625
+ __metadata("design:returntype", Object)
4626
+ ], AbstractPlaceNavigationComponent.prototype, "getNav", null);
4627
+ return AbstractPlaceNavigationComponent;
4508
4628
  }(DisposableComponent));
4509
4629
  if (false) {
4510
4630
  /** @type {?} */
4511
- PlaceOutletComponent.prototype.animate;
4631
+ AbstractPlaceNavigationComponent.prototype.places;
4512
4632
  /** @type {?} */
4513
- PlaceOutletComponent.prototype.placeChanged;
4633
+ AbstractPlaceNavigationComponent.prototype.placesModel;
4514
4634
  /** @type {?} */
4515
- PlaceOutletComponent.prototype.routerOut;
4635
+ AbstractPlaceNavigationComponent.prototype.placeOutlet;
4636
+ /** @type {?} */
4637
+ AbstractPlaceNavigationComponent.prototype.placeOutletModel;
4638
+ /** @type {?} */
4639
+ AbstractPlaceNavigationComponent.prototype.placeDefinitions;
4516
4640
  /**
4517
4641
  * @type {?}
4518
- * @private
4642
+ * @protected
4519
4643
  */
4520
- PlaceOutletComponent.prototype._activePlace;
4644
+ AbstractPlaceNavigationComponent.prototype.relativeToModel;
4645
+ /** @type {?} */
4646
+ AbstractPlaceNavigationComponent.prototype.commandFactory;
4647
+ }
4648
+
4649
+ /**
4650
+ * @fileoverview added by tsickle
4651
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
4652
+ */
4653
+ var ListPlaceNavComponent = /** @class */ (function (_super) {
4654
+ __extends(ListPlaceNavComponent, _super);
4655
+ function ListPlaceNavComponent() {
4656
+ var _this = _super.call(this) || this;
4657
+ _this.expanded = true;
4658
+ return _this;
4659
+ }
4521
4660
  /**
4522
- * @type {?}
4523
- * @private
4661
+ * @return {?}
4524
4662
  */
4525
- PlaceOutletComponent.prototype._inOutletUpdate;
4526
- /**
4527
- * @type {?}
4528
- * @private
4663
+ ListPlaceNavComponent.prototype.expandMenu = /**
4664
+ * @return {?}
4529
4665
  */
4530
- PlaceOutletComponent.prototype._activatedRouteModel;
4666
+ function () {
4667
+ this.expanded = true;
4668
+ };
4531
4669
  /**
4532
- * @type {?}
4533
- * @private
4670
+ * @return {?}
4534
4671
  */
4535
- PlaceOutletComponent.prototype._placeDefinition;
4536
- /**
4537
- * TODO: This is now really a visit
4538
- * @type {?}
4672
+ ListPlaceNavComponent.prototype.collapseMenu = /**
4673
+ * @return {?}
4539
4674
  */
4540
- PlaceOutletComponent.prototype._placeVisit;
4675
+ function () {
4676
+ this.expanded = false;
4677
+ };
4541
4678
  /**
4542
- * @type {?}
4543
- * @private
4679
+ * @return {?}
4544
4680
  */
4545
- PlaceOutletComponent.prototype.router;
4546
- /**
4547
- * @type {?}
4548
- * @private
4681
+ ListPlaceNavComponent.prototype.toggleMenu = /**
4682
+ * @return {?}
4549
4683
  */
4550
- PlaceOutletComponent.prototype.placeRouter;
4684
+ function () {
4685
+ this.expanded = !this.expanded;
4686
+ };
4687
+ ListPlaceNavComponent.decorators = [
4688
+ { type: core.Component, args: [{
4689
+ selector: 'aup-list-place-nav',
4690
+ template: "<mat-nav-list class=\"app-menu\">\n <a mat-list-item *ngFor=\"let place of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(place)\"\n routerLinkActive #rla=\"routerLinkActive\"\n [matTooltip]=\"getNav(place).tooltip()\">\n <mat-icon *ngIf=\"getNav(place).icon()\">{{getNav(place).icon()}}</mat-icon>\n <span class=\"expanded-only\">{{getNav(place).title()}}</span>\n </a>\n</mat-nav-list>\n",
4691
+ styles: [":host{display:flex;flex-direction:column;--expanded-width:235px;--nav-item-width:var(--nav-bar-height);width:var(--nav-item-width);transition:width 125ms linear}:host.expanded{width:var(--expanded-width);max-width:var(--expanded-width)}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}.header{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;height:var(--nav-bar-height);border-bottom:var(--pinstripe-border);cursor:pointer}.header .menu{flex:1}.header button{color:inherit;width:var(--nav-item-width);height:var(--nav-bar-height)}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--nav-item-width);height:var(--nav-bar-height);color:inherit}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item mat-icon{margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}a[ng-reflect-router-link=manage-instruments] mat-icon{transform:rotate(90deg)}.app-menu{padding-top:0}"]
4692
+ }] }
4693
+ ];
4694
+ /** @nocollapse */
4695
+ ListPlaceNavComponent.ctorParameters = function () { return []; };
4696
+ ListPlaceNavComponent.propDecorators = {
4697
+ expanded: [{ type: core.HostBinding, args: ['class.expanded',] }]
4698
+ };
4699
+ return ListPlaceNavComponent;
4700
+ }(AbstractPlaceNavigationComponent));
4701
+ if (false) {
4551
4702
  /** @type {?} */
4552
- PlaceOutletComponent.prototype.parentOutlet;
4703
+ ListPlaceNavComponent.prototype.expanded;
4553
4704
  }
4554
4705
 
4555
4706
  /**
@@ -4563,8 +4714,8 @@
4563
4714
  }
4564
4715
  TabbedPlaceNavigationComponent.decorators = [
4565
4716
  { type: core.Component, args: [{
4566
- selector: 'angular-ui-powerups-tabbed-place-navigation',
4567
- template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let place of placeDefinitions.value\"\n [routerLink]='place.path'\n [replaceUrl]=\"true\"\n routerLinkActive #rla=\"routerLinkActive\"\n [active]=\"rla.isActive\"\n [matTooltip]=\"getNav(place).tooltip()\">\n <mat-icon *ngIf=\"getNav(place).icon()\">{{getNav(place).icon()}}</mat-icon>\n <span>{{getNav(place).title()}}</span>\n </a>\n</nav>\n",
4717
+ selector: 'aup-tabbed-place-navigation',
4718
+ template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let place of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(place)\"\n routerLinkActive #rla=\"routerLinkActive\"\n [active]=\"rla.isActive\"\n [matTooltip]=\"getNav(place).tooltip()\">\n <mat-icon *ngIf=\"getNav(place).icon()\">{{getNav(place).icon()}}</mat-icon>\n <span>{{getNav(place).title()}}</span>\n </a>\n</nav>\n",
4568
4719
  styles: [""]
4569
4720
  }] }
4570
4721
  ];
@@ -4590,7 +4741,8 @@
4590
4741
  tabs.MatTabsModule,
4591
4742
  list.MatListModule,
4592
4743
  tooltip.MatTooltipModule,
4593
- icon.MatIconModule
4744
+ icon.MatIconModule,
4745
+ DirectivesModule
4594
4746
  ],
4595
4747
  declarations: [
4596
4748
  EmptyStateComponent,
@@ -4622,15 +4774,7 @@
4622
4774
  }
4623
4775
  AngularUiPowerupsModule.decorators = [
4624
4776
  { type: core.NgModule, args: [{
4625
- declarations: [
4626
- CommandDirective,
4627
- FocusBindingDirective,
4628
- NumberInputComponent,
4629
- StringInputComponent,
4630
- PasswordInputComponent,
4631
- SelectInputComponent,
4632
- NoopComponent
4633
- ],
4777
+ declarations: [],
4634
4778
  imports: [
4635
4779
  common.CommonModule,
4636
4780
  animations.BrowserAnimationsModule,
@@ -4639,18 +4783,16 @@
4639
4783
  material.MatFormFieldModule,
4640
4784
  material.MatSelectModule,
4641
4785
  tabs.MatTabsModule,
4786
+ DirectivesModule,
4787
+ ComponentsModule,
4642
4788
  PlaceModule,
4643
4789
  InteractionModule
4644
4790
  ],
4645
4791
  exports: [
4646
- CommandDirective,
4647
- FocusBindingDirective,
4648
- NumberInputComponent,
4649
- StringInputComponent,
4650
- PasswordInputComponent,
4651
- SelectInputComponent,
4652
4792
  InteractionModule,
4653
4793
  PlaceModule,
4794
+ DirectivesModule,
4795
+ ComponentsModule,
4654
4796
  NoopComponent
4655
4797
  ]
4656
4798
  },] }
@@ -5146,7 +5288,7 @@
5146
5288
  */
5147
5289
  function (target) {
5148
5290
  if (exports.PlaceComponent.isPlaceComponentConstructor(target)) {
5149
- exports.PlaceComponent.injectDefinition(target, new exports.PlaceDefinition(target, options.path, ___default.isNil(options.authenticate) ? false : options.authenticate, options.order, options.data, exports.PlaceComponent.getRouteParameters(target), (options.children || []).map((/**
5291
+ exports.PlaceComponent.injectDefinition(target, new exports.PlaceDefinition(target, options.path, ___default.isNil(options.authenticate) ? false : options.authenticate, options.data, exports.PlaceComponent.getRouteParameters(target), (options.children || []).map((/**
5150
5292
  * @param {?} c
5151
5293
  * @return {?}
5152
5294
  */
@@ -5166,14 +5308,14 @@
5166
5308
  if (false) {
5167
5309
  /** @type {?} */
5168
5310
  Options.prototype.path;
5169
- /** @type {?} */
5170
- Options.prototype.order;
5171
5311
  /** @type {?|undefined} */
5172
5312
  Options.prototype.data;
5173
5313
  /** @type {?|undefined} */
5174
5314
  Options.prototype.authenticate;
5175
5315
  /** @type {?|undefined} */
5176
5316
  Options.prototype.children;
5317
+ /** @type {?|undefined} */
5318
+ Options.prototype.defaultChild;
5177
5319
  }
5178
5320
  })(Place || (Place = {}));
5179
5321
 
@@ -5469,218 +5611,79 @@
5469
5611
  placeDef = visit.placeDefinition;
5470
5612
  if (!placeDef.hasRouteId()) return [3 /*break*/, 2];
5471
5613
  routeIdDef = placeDef.getRouteIdParameterDef();
5472
- routeId = visit.getRouteId();
5473
- return [4 /*yield*/, routeIdDef.sanitise(routeId, visit, this.placeHistory, this.injector)];
5474
- case 1:
5475
- sanitisedValue = _a.sent();
5476
- console.log({ routeId: routeId, sanitisedValue: sanitisedValue });
5477
- // ###------- EARLY EXIT --------###
5478
- if (routeIdDef.hasChanged(routeId, sanitisedValue)) {
5479
- // if the route id has changed we redirect immediately as other
5480
- // parameter sanitisers might use it.
5481
- return [2 /*return*/, visit.replace(routeIdDef, sanitisedValue)];
5482
- }
5483
- _a.label = 2;
5484
- case 2:
5485
- // if we didn't replace the routeId we continue the url present parameters.
5486
- parameterDefs = placeDef.getVisitParameterDefs({
5487
- includeRouteParameters: true,
5488
- includeNonRouteParameters: true
5489
- });
5490
- sanitisedVisit = visit;
5491
- i = 0;
5492
- _a.label = 3;
5493
- case 3:
5494
- if (!(i < parameterDefs.length)) return [3 /*break*/, 6];
5495
- def = parameterDefs[i];
5496
- value = visit.getParameter(def.name);
5497
- return [4 /*yield*/, def.sanitise(value, sanitisedVisit, this.placeHistory, this.injector)];
5498
- case 4:
5499
- sanitisedValue = _a.sent();
5500
- if (def.hasChanged(value, sanitisedValue)) {
5501
- sanitisedVisit = sanitisedVisit.replace(def, sanitisedValue);
5502
- }
5503
- _a.label = 5;
5504
- case 5:
5505
- i++;
5506
- return [3 /*break*/, 3];
5507
- case 6: return [2 /*return*/, sanitisedVisit.hasChangedFrom(visit) ? sanitisedVisit : visit];
5508
- }
5509
- });
5510
- });
5511
- };
5512
- return VisitSanitiser;
5513
- }());
5514
- if (false) {
5515
- /**
5516
- * @type {?}
5517
- * @private
5518
- */
5519
- VisitSanitiser.prototype.activatedRoute;
5520
- /**
5521
- * @type {?}
5522
- * @private
5523
- */
5524
- VisitSanitiser.prototype.router;
5525
- /**
5526
- * @type {?}
5527
- * @private
5528
- */
5529
- VisitSanitiser.prototype.placeHistory;
5530
- /**
5531
- * @type {?}
5532
- * @private
5533
- */
5534
- VisitSanitiser.prototype.injector;
5535
- }
5536
-
5537
- /**
5538
- * @fileoverview added by tsickle
5539
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5540
- */
5541
- var LeavePlaceGuard = /** @class */ (function () {
5542
- function LeavePlaceGuard(router, injector, placeRouter, interactionContext, angularLocation) {
5543
- this.router = router;
5544
- this.injector = injector;
5545
- this.placeRouter = placeRouter;
5546
- this.interactionContext = interactionContext;
5547
- this.angularLocation = angularLocation;
5548
- }
5549
- /**
5550
- * @private
5551
- * @param {?} nextState
5552
- * @param {?} placeDefinitionPath
5553
- * @return {?}
5554
- */
5555
- LeavePlaceGuard.prototype.isLeavingTheCurrentPlace = /**
5556
- * @private
5557
- * @param {?} nextState
5558
- * @param {?} placeDefinitionPath
5559
- * @return {?}
5560
- */
5561
- function (nextState, placeDefinitionPath) {
5562
- // TODO: this will break with child routes... need to examine the router states properly.
5563
- return !nextState.url.startsWith(placeDefinitionPath);
5564
- };
5565
- /**
5566
- * @param {?} component
5567
- * @param {?} currentRoute
5568
- * @param {?} currentState
5569
- * @param {?=} nextState
5570
- * @return {?}
5571
- */
5572
- LeavePlaceGuard.prototype.canDeactivate = /**
5573
- * @param {?} component
5574
- * @param {?} currentRoute
5575
- * @param {?} currentState
5576
- * @param {?=} nextState
5577
- * @return {?}
5578
- */
5579
- function (component, currentRoute, currentState, nextState) {
5580
- return __awaiter(this, void 0, void 0, function () {
5581
- var placeDefinitionPath, self_1, canLeave;
5582
- return __generator(this, function (_a) {
5583
- switch (_a.label) {
5584
- case 0:
5585
- placeDefinitionPath = "/" + component.placeDefinition.path;
5586
- if (!this.placeRouter.navigationSession.alreadyAccepted(component)) return [3 /*break*/, 1];
5587
- // We'll get called multiple times if there's any parameter sanitisation so
5588
- // we always return true if we accepted on a previous cycle of the current
5589
- // navigation session.
5590
- return [2 /*return*/, true];
5614
+ routeId = visit.getRouteId();
5615
+ return [4 /*yield*/, routeIdDef.sanitise(routeId, visit, this.placeHistory, this.injector)];
5591
5616
  case 1:
5592
- self_1 = this;
5593
- canLeave = true;
5594
- if (!this.isLeavingTheCurrentPlace(nextState, placeDefinitionPath)) return [3 /*break*/, 4];
5595
- // we check the interaction first, so that components that don't need to check if they're in an
5596
- // interaction during the canDeactivate cycle.
5597
- // TODO: Add tests: show dialog -> hit back -> same route
5598
- if (this.interactionContext.isActive()) {
5599
- canLeave = false;
5600
- console.log('cancelling', { activity: this.interactionContext.currentActivity });
5601
- this.interactionContext.currentActivity.cancel(null);
5617
+ sanitisedValue = _a.sent();
5618
+ console.log({ routeId: routeId, sanitisedValue: sanitisedValue });
5619
+ // ###------- EARLY EXIT --------###
5620
+ if (routeIdDef.hasChanged(routeId, sanitisedValue)) {
5621
+ // if the route id has changed we redirect immediately as other
5622
+ // parameter sanitisers might use it.
5623
+ return [2 /*return*/, visit.replace(routeIdDef, sanitisedValue)];
5602
5624
  }
5603
- if (!canLeave) return [3 /*break*/, 3];
5604
- return [4 /*yield*/, component.canDeactivate()];
5625
+ _a.label = 2;
5605
5626
  case 2:
5606
- // TODO: Add tests: hit back -> confirm leave dialog -> hit back -> close dialog -> hit back -> confirm leave dialog.
5607
- canLeave = _a.sent();
5627
+ // if we didn't replace the routeId we continue the url present parameters.
5628
+ parameterDefs = placeDef.getVisitParameterDefs({
5629
+ includeRouteParameters: true,
5630
+ includeNonRouteParameters: true
5631
+ });
5632
+ sanitisedVisit = visit;
5633
+ i = 0;
5608
5634
  _a.label = 3;
5609
- case 3: return [3 /*break*/, 5];
5635
+ case 3:
5636
+ if (!(i < parameterDefs.length)) return [3 /*break*/, 6];
5637
+ def = parameterDefs[i];
5638
+ value = visit.getParameter(def.name);
5639
+ return [4 /*yield*/, def.sanitise(value, sanitisedVisit, this.placeHistory, this.injector)];
5610
5640
  case 4:
5611
- if (this.interactionContext.isActive()) {
5612
- console.log('cancelling', { activity: this.interactionContext.currentActivity });
5613
- this.interactionContext.currentActivity.cancel(null);
5614
- canLeave = false;
5615
- }
5616
- else {
5617
- canLeave = true;
5641
+ sanitisedValue = _a.sent();
5642
+ if (def.hasChanged(value, sanitisedValue)) {
5643
+ sanitisedVisit = sanitisedVisit.replace(def, sanitisedValue);
5618
5644
  }
5619
5645
  _a.label = 5;
5620
5646
  case 5:
5621
- if (canLeave) {
5622
- // We'll get called multiple times if there's any parameter sanitisation so
5623
- // we remember the acceptance for the duration of the current navigation session.
5624
- self_1.placeRouter.navigationSession.rememberAcceptanceOf(component);
5625
- }
5626
- else {
5627
- // Angular doesn't preserve the url when a guard cancels the back button.
5628
- // See https://github.com/angular/angular/issues/13586#issuecomment-432795720
5629
- if (this.placeRouter.navigationSession.isPopState) {
5630
- console.log('cancelled during popstate');
5631
- this.angularLocation.go(this.placeRouter.navigationSession.popStateReturnUrl);
5632
- }
5633
- }
5634
- return [2 /*return*/, canLeave];
5647
+ i++;
5648
+ return [3 /*break*/, 3];
5649
+ case 6: return [2 /*return*/, sanitisedVisit.hasChangedFrom(visit) ? sanitisedVisit : visit];
5635
5650
  }
5636
5651
  });
5637
5652
  });
5638
5653
  };
5639
- LeavePlaceGuard.decorators = [
5640
- { type: core.Injectable, args: [{
5641
- providedIn: 'root'
5642
- },] }
5643
- ];
5644
- /** @nocollapse */
5645
- LeavePlaceGuard.ctorParameters = function () { return [
5646
- { type: router.Router },
5647
- { type: core.Injector },
5648
- { type: PlaceRouter },
5649
- { type: InteractionContext },
5650
- { type: common.Location }
5651
- ]; };
5652
- /** @nocollapse */ LeavePlaceGuard.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function LeavePlaceGuard_Factory() { return new LeavePlaceGuard(core.ɵɵinject(router.Router), core.ɵɵinject(core.INJECTOR), core.ɵɵinject(PlaceRouter), core.ɵɵinject(InteractionContext), core.ɵɵinject(common.Location)); }, token: LeavePlaceGuard, providedIn: "root" });
5653
- return LeavePlaceGuard;
5654
+ return VisitSanitiser;
5654
5655
  }());
5655
5656
  if (false) {
5656
5657
  /**
5657
5658
  * @type {?}
5658
5659
  * @private
5659
5660
  */
5660
- LeavePlaceGuard.prototype.router;
5661
+ VisitSanitiser.prototype.activatedRoute;
5661
5662
  /**
5662
5663
  * @type {?}
5663
5664
  * @private
5664
5665
  */
5665
- LeavePlaceGuard.prototype.injector;
5666
+ VisitSanitiser.prototype.router;
5666
5667
  /**
5667
5668
  * @type {?}
5668
5669
  * @private
5669
5670
  */
5670
- LeavePlaceGuard.prototype.placeRouter;
5671
- /** @type {?} */
5672
- LeavePlaceGuard.prototype.interactionContext;
5673
- /** @type {?} */
5674
- LeavePlaceGuard.prototype.angularLocation;
5671
+ VisitSanitiser.prototype.placeHistory;
5672
+ /**
5673
+ * @type {?}
5674
+ * @private
5675
+ */
5676
+ VisitSanitiser.prototype.injector;
5675
5677
  }
5676
5678
 
5677
5679
  /**
5678
5680
  * @fileoverview added by tsickle
5679
5681
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5680
5682
  */
5681
- exports.PlaceRouteGuard = /** @class */ (function () {
5682
- function PlaceRouteGuard(router, placeRouter, placeHistory, injector) {
5683
+ exports.EnterPlaceGuard = /** @class */ (function () {
5684
+ function EnterPlaceGuard(router, urlSerializer, placeRouter, placeHistory, injector) {
5683
5685
  this.router = router;
5686
+ this.urlSerializer = urlSerializer;
5684
5687
  this.placeRouter = placeRouter;
5685
5688
  this.placeHistory = placeHistory;
5686
5689
  this.injector = injector;
@@ -5692,7 +5695,7 @@
5692
5695
  * @param {?} state
5693
5696
  * @return {?}
5694
5697
  */
5695
- PlaceRouteGuard.prototype.canActivate =
5698
+ EnterPlaceGuard.prototype.canActivate =
5696
5699
  // @Trace()
5697
5700
  /**
5698
5701
  * @param {?} activatedRoute
@@ -5701,14 +5704,14 @@
5701
5704
  */
5702
5705
  function (activatedRoute, state) {
5703
5706
  return __awaiter(this, void 0, void 0, function () {
5704
- var placeDefinition, params, parsedParams, initialVisit, sanitiser, sanitisedVisit, parameterCommands, commands;
5707
+ var placeDefinition, params, parsedParams, initialVisit, sanitiser, sanitisedVisit, routerStateUrlTree, commands;
5705
5708
  return __generator(this, function (_a) {
5706
5709
  switch (_a.label) {
5707
5710
  case 0:
5708
5711
  if (!exports.PlaceComponent.isPlaceComponentConstructor(activatedRoute.component)) return [3 /*break*/, 2];
5709
5712
  placeDefinition = exports.PlaceComponent.getDefinition(activatedRoute.component);
5710
5713
  // Parse our route params.
5711
- params = new PlaceRouteGuard.ConsolidatedParameterMap(activatedRoute.paramMap, activatedRoute.url);
5714
+ params = new EnterPlaceGuard.ConsolidatedParameterMap(activatedRoute.paramMap, activatedRoute.url);
5712
5715
  parsedParams = placeDefinition.parseRouteParams(params);
5713
5716
  initialVisit = this.placeRouter.navigationSession.getVisitFor(placeDefinition) || new Visit(placeDefinition, parsedParams);
5714
5717
  sanitiser = new VisitSanitiser(activatedRoute, this.router, this.placeHistory, this.injector);
@@ -5718,11 +5721,10 @@
5718
5721
  // Save the visit with any updated parameters. We need to save it so we remember any non route parameters
5719
5722
  this.placeRouter.navigationSession.storeVisit(sanitisedVisit);
5720
5723
  if (initialVisit.hasRoutingChangedFrom(sanitisedVisit)) {
5721
- parameterCommands = sanitisedVisit.hasRouteId() ?
5722
- [placeDefinition.getFormattedRouteId(sanitisedVisit), placeDefinition.getFormattedRouteParameters(sanitisedVisit)] :
5723
- [placeDefinition.getFormattedRouteParameters(sanitisedVisit)];
5724
- commands = [(activatedRoute.url[0].path)].concat(parameterCommands, this.placeRouter.extractChildPath(activatedRoute));
5725
- console.log('##### Redirect', commands);
5724
+ routerStateUrlTree = this.urlSerializer.parse(state.url);
5725
+ // Regenerate the url
5726
+ commands = this.createRedirectCommands(sanitisedVisit, __spread(routerStateUrlTree.root.children.primary.segments)).commands;
5727
+ console.log('##### Place Guard Redirect', commands);
5726
5728
  return [2 /*return*/, this.router.createUrlTree(commands, {
5727
5729
  replaceUrl: true,
5728
5730
  skipLocationChange: false
@@ -5738,44 +5740,90 @@
5738
5740
  });
5739
5741
  });
5740
5742
  };
5741
- PlaceRouteGuard.decorators = [
5743
+ /**
5744
+ * @private
5745
+ * @param {?} sanitisedVisit
5746
+ * @param {?} path
5747
+ * @return {?}
5748
+ */
5749
+ EnterPlaceGuard.prototype.createRedirectCommands = /**
5750
+ * @private
5751
+ * @param {?} sanitisedVisit
5752
+ * @param {?} path
5753
+ * @return {?}
5754
+ */
5755
+ function (sanitisedVisit, path) {
5756
+ // Ugly, but it works for now.
5757
+ /** @type {?} */
5758
+ var newSegments = sanitisedVisit.getUrlSegments();
5759
+ /** @type {?} */
5760
+ var replaceAt = path.findIndex((/**
5761
+ * @param {?} segment
5762
+ * @return {?}
5763
+ */
5764
+ function (segment) { return segment.path === newSegments[0].path; }));
5765
+ /** @type {?} */
5766
+ var newPath = __spread(path);
5767
+ newPath.splice.apply(newPath, __spread([replaceAt, newSegments.length], newSegments)); // do not use the return value, it's the items that were removed!
5768
+ // do not use the return value, it's the items that were removed!
5769
+ /** @type {?} */
5770
+ var commands = [];
5771
+ newPath.forEach((/**
5772
+ * @param {?} s
5773
+ * @return {?}
5774
+ */
5775
+ function (s) {
5776
+ commands.push(s.path);
5777
+ if (s.parameterMap.keys.length > 0) {
5778
+ commands.push(s.parameters);
5779
+ }
5780
+ }));
5781
+ return { newPath: newPath, commands: commands };
5782
+ };
5783
+ EnterPlaceGuard.decorators = [
5742
5784
  { type: core.Injectable, args: [{
5743
5785
  providedIn: 'root'
5744
5786
  },] }
5745
5787
  ];
5746
5788
  /** @nocollapse */
5747
- PlaceRouteGuard.ctorParameters = function () { return [
5789
+ EnterPlaceGuard.ctorParameters = function () { return [
5748
5790
  { type: router.Router },
5791
+ { type: router.UrlSerializer },
5749
5792
  { type: PlaceRouter },
5750
5793
  { type: PlaceHistory },
5751
5794
  { type: core.Injector }
5752
5795
  ]; };
5753
- /** @nocollapse */ PlaceRouteGuard.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function PlaceRouteGuard_Factory() { return new PlaceRouteGuard(core.ɵɵinject(router.Router), core.ɵɵinject(PlaceRouter), core.ɵɵinject(PlaceHistory), core.ɵɵinject(core.INJECTOR)); }, token: PlaceRouteGuard, providedIn: "root" });
5754
- return PlaceRouteGuard;
5796
+ /** @nocollapse */ EnterPlaceGuard.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function EnterPlaceGuard_Factory() { return new EnterPlaceGuard(core.ɵɵinject(router.Router), core.ɵɵinject(router.UrlSerializer), core.ɵɵinject(PlaceRouter), core.ɵɵinject(PlaceHistory), core.ɵɵinject(core.INJECTOR)); }, token: EnterPlaceGuard, providedIn: "root" });
5797
+ return EnterPlaceGuard;
5755
5798
  }());
5756
5799
  if (false) {
5757
5800
  /**
5758
5801
  * @type {?}
5759
5802
  * @private
5760
5803
  */
5761
- exports.PlaceRouteGuard.prototype.router;
5804
+ exports.EnterPlaceGuard.prototype.router;
5762
5805
  /**
5763
5806
  * @type {?}
5764
5807
  * @private
5765
5808
  */
5766
- exports.PlaceRouteGuard.prototype.placeRouter;
5809
+ exports.EnterPlaceGuard.prototype.urlSerializer;
5767
5810
  /**
5768
5811
  * @type {?}
5769
5812
  * @private
5770
5813
  */
5771
- exports.PlaceRouteGuard.prototype.placeHistory;
5814
+ exports.EnterPlaceGuard.prototype.placeRouter;
5772
5815
  /**
5773
5816
  * @type {?}
5774
5817
  * @private
5775
5818
  */
5776
- exports.PlaceRouteGuard.prototype.injector;
5819
+ exports.EnterPlaceGuard.prototype.placeHistory;
5820
+ /**
5821
+ * @type {?}
5822
+ * @private
5823
+ */
5824
+ exports.EnterPlaceGuard.prototype.injector;
5777
5825
  }
5778
- (function (PlaceRouteGuard) {
5826
+ (function (EnterPlaceGuard) {
5779
5827
  /**
5780
5828
  * This a work around for the fact that an activated route with multiple segments doesn't
5781
5829
  * include the segment params in the paramMap as well as each segment returns an empty
@@ -5864,7 +5912,7 @@
5864
5912
  ], ConsolidatedParameterMap.prototype, "keys", null);
5865
5913
  return ConsolidatedParameterMap;
5866
5914
  }());
5867
- PlaceRouteGuard.ConsolidatedParameterMap = ConsolidatedParameterMap;
5915
+ EnterPlaceGuard.ConsolidatedParameterMap = ConsolidatedParameterMap;
5868
5916
  if (false) {
5869
5917
  /**
5870
5918
  * @type {?}
@@ -5930,25 +5978,229 @@
5930
5978
  */
5931
5979
  ParamMapAdapter.prototype.params;
5932
5980
  }
5933
- })(exports.PlaceRouteGuard || (exports.PlaceRouteGuard = {}));
5981
+ })(exports.EnterPlaceGuard || (exports.EnterPlaceGuard = {}));
5982
+
5983
+ /**
5984
+ * @fileoverview added by tsickle
5985
+ * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
5986
+ */
5987
+ var LeavePlaceGuard = /** @class */ (function () {
5988
+ function LeavePlaceGuard(router, injector, placeRouter, interactionContext, angularLocation) {
5989
+ this.router = router;
5990
+ this.injector = injector;
5991
+ this.placeRouter = placeRouter;
5992
+ this.interactionContext = interactionContext;
5993
+ this.angularLocation = angularLocation;
5994
+ }
5995
+ /**
5996
+ * @private
5997
+ * @param {?} nextState
5998
+ * @param {?} placeDefinition
5999
+ * @return {?}
6000
+ */
6001
+ LeavePlaceGuard.prototype.isLeavingTheCurrentPlace = /**
6002
+ * @private
6003
+ * @param {?} nextState
6004
+ * @param {?} placeDefinition
6005
+ * @return {?}
6006
+ */
6007
+ function (nextState, placeDefinition) {
6008
+ // TODO: this will break with child routes... need to examine the router states properly.
6009
+ // console.log('canDeactivate', {
6010
+ // staticPath: placeDefinitionPath,
6011
+ // currentStateUrl: currentState.url,
6012
+ // nextStateUrl: nextState.url
6013
+ // // alreadyDeclined: this._alreadyAccepted
6014
+ // });
6015
+ // Example of the above when navigating to a different child route.
6016
+ // canDeactivate {staticPath: "/hero-details",
6017
+ // currentStateUrl: "/route-parameters/-1;dv=A;dl=a,b,c;rdv=A;rdl=a,b,c/hero-details",
6018
+ // nextStateUrl: "/route-parameters/-1;dv=A;dl=a,b,c;rdv=A;rdl=a,b,c/hero-stats"
6019
+ // }
6020
+ // TODO: this will break with child routes... need to examine the router states properly.
6021
+ // console.log('canDeactivate', {
6022
+ // staticPath: placeDefinitionPath,
6023
+ // currentStateUrl: currentState.url,
6024
+ // nextStateUrl: nextState.url
6025
+ // // alreadyDeclined: this._alreadyAccepted
6026
+ // });
6027
+ // Example of the above when navigating to a different child route.
6028
+ // canDeactivate {staticPath: "/hero-details",
6029
+ // currentStateUrl: "/route-parameters/-1;dv=A;dl=a,b,c;rdv=A;rdl=a,b,c/hero-details",
6030
+ // nextStateUrl: "/route-parameters/-1;dv=A;dl=a,b,c;rdv=A;rdl=a,b,c/hero-stats"
6031
+ // }
6032
+ // Example clicking on router tab of the parent component (de-activates the parent due to route param changes)
6033
+ // canDeactivate {
6034
+ // staticPath: "/hero-stats",
6035
+ // currentStateUrl: "/route-parameters/-1;dv=A;dl=a,b,c;rdv=A;rdl=a,b,c/hero-stats",
6036
+ // nextStateUrl: "/route-parameters/"
6037
+ // }
6038
+ // canDeactivate {
6039
+ // staticPath: "/route-parameters",
6040
+ // currentStateUrl: "/route-parameters/-1;dv=A;dl=a,b,c;rdv=A;rdl=a,b,c/hero-stats",
6041
+ // nextStateUrl: "/route-parameters/"
6042
+ // }
6043
+ // logger.class.js:54 ParameterSnapshot.sanitise -> {idModel: -1, pv: undefined, pl: Array(0), dv: undefined, dl: Array(0), …}
6044
+ // parameter-snapshot.ts:20 {name: "idModel", mine: -1, theirs: null}
6045
+ // place-router.ts:28 redirect path (3) ["route-parameters", "-1", {…}]
6046
+ // canDeactivate {
6047
+ // staticPath: "/hero-stats",
6048
+ // currentStateUrl: "/route-parameters/-1;dv=A;dl=a,b,c;rdv=A;rdl=a,b,c/hero-stats",
6049
+ // nextStateUrl: "/route-parameters/-1"
6050
+ // }
6051
+ // canDeactivate {
6052
+ // staticPath: "/route-parameters",
6053
+ // currentStateUrl: "/route-parameters/-1;dv=A;dl=a,b,c;rdv=A;rdl=a,b,c/hero-stats",
6054
+ // nextStateUrl: "/route-parameters/-1"
6055
+ // }
6056
+ // logger.class.js:54 ParameterSnapshot.sanitise -> {idModel: -1, pv: undefined, pl: Array(0), dv: "A", dl: Array(3), …}
6057
+ // parameter-snapshot.ts:20 {name: "dv", mine: "A", theirs: undefined}
6058
+ // place-router.ts:28 redirect path (3) ["route-parameters", "-1", {…}]
6059
+ // canDeactivate {
6060
+ // staticPath: "/hero-stats",
6061
+ // currentStateUrl: "/route-parameters/-1;dv=A;dl=a,b,c;rdv=A;rdl=a,b,c/hero-stats",
6062
+ // nextStateUrl: "/route-parameters/-1;dv=A;dl=a,b,c;rdv=A;rdl=a,b,c"
6063
+ // }
6064
+ /** @type {?} */
6065
+ var placeDefinitionPath = "/" + placeDefinition.path;
6066
+ return !nextState.url.startsWith(placeDefinitionPath);
6067
+ };
6068
+ /**
6069
+ * @param {?} component
6070
+ * @param {?} currentRoute
6071
+ * @param {?} currentState
6072
+ * @param {?=} nextState
6073
+ * @return {?}
6074
+ */
6075
+ LeavePlaceGuard.prototype.canDeactivate = /**
6076
+ * @param {?} component
6077
+ * @param {?} currentRoute
6078
+ * @param {?} currentState
6079
+ * @param {?=} nextState
6080
+ * @return {?}
6081
+ */
6082
+ function (component, currentRoute, currentState, nextState) {
6083
+ return __awaiter(this, void 0, void 0, function () {
6084
+ var self_1, canLeave;
6085
+ return __generator(this, function (_a) {
6086
+ switch (_a.label) {
6087
+ case 0:
6088
+ if (!this.placeRouter.navigationSession.alreadyAccepted(component)) return [3 /*break*/, 1];
6089
+ // We'll get called multiple times if there's any parameter sanitisation so
6090
+ // we always return true if we accepted on a previous cycle of the current
6091
+ // navigation session.
6092
+ return [2 /*return*/, true];
6093
+ case 1:
6094
+ self_1 = this;
6095
+ canLeave = true;
6096
+ if (!this.isLeavingTheCurrentPlace(nextState, component.placeDefinition)) return [3 /*break*/, 4];
6097
+ // we check the interaction first, so that components that don't need to check if they're in an
6098
+ // interaction during the canDeactivate cycle.
6099
+ // TODO: Add tests: show dialog -> hit back -> same route
6100
+ if (this.interactionContext.isActive()) {
6101
+ canLeave = false;
6102
+ console.log('cancelling', { activity: this.interactionContext.currentActivity });
6103
+ this.interactionContext.currentActivity.cancel(null);
6104
+ }
6105
+ if (!canLeave) return [3 /*break*/, 3];
6106
+ return [4 /*yield*/, component.canDeactivate()];
6107
+ case 2:
6108
+ // TODO: Add tests: hit back -> confirm leave dialog -> hit back -> close dialog -> hit back -> confirm leave dialog.
6109
+ canLeave = _a.sent();
6110
+ _a.label = 3;
6111
+ case 3: return [3 /*break*/, 5];
6112
+ case 4:
6113
+ if (this.interactionContext.isActive()) {
6114
+ console.log('cancelling', { activity: this.interactionContext.currentActivity });
6115
+ this.interactionContext.currentActivity.cancel(null);
6116
+ canLeave = false;
6117
+ }
6118
+ else {
6119
+ canLeave = true;
6120
+ }
6121
+ _a.label = 5;
6122
+ case 5:
6123
+ if (canLeave) {
6124
+ // We'll get called multiple times if there's any parameter sanitisation so
6125
+ // we remember the acceptance for the duration of the current navigation session.
6126
+ self_1.placeRouter.navigationSession.rememberAcceptanceOf(component);
6127
+ }
6128
+ else {
6129
+ // Angular doesn't preserve the url when a guard cancels the back button.
6130
+ // See https://github.com/angular/angular/issues/13586#issuecomment-432795720
6131
+ if (this.placeRouter.navigationSession.isPopState) {
6132
+ console.log('cancelled during popstate');
6133
+ this.angularLocation.go(this.placeRouter.navigationSession.popStateReturnUrl);
6134
+ }
6135
+ }
6136
+ return [2 /*return*/, canLeave];
6137
+ }
6138
+ });
6139
+ });
6140
+ };
6141
+ LeavePlaceGuard.decorators = [
6142
+ { type: core.Injectable, args: [{
6143
+ providedIn: 'root'
6144
+ },] }
6145
+ ];
6146
+ /** @nocollapse */
6147
+ LeavePlaceGuard.ctorParameters = function () { return [
6148
+ { type: router.Router },
6149
+ { type: core.Injector },
6150
+ { type: PlaceRouter },
6151
+ { type: InteractionContext },
6152
+ { type: common.Location }
6153
+ ]; };
6154
+ /** @nocollapse */ LeavePlaceGuard.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function LeavePlaceGuard_Factory() { return new LeavePlaceGuard(core.ɵɵinject(router.Router), core.ɵɵinject(core.INJECTOR), core.ɵɵinject(PlaceRouter), core.ɵɵinject(InteractionContext), core.ɵɵinject(common.Location)); }, token: LeavePlaceGuard, providedIn: "root" });
6155
+ __decorate([
6156
+ pectin.Trace(),
6157
+ __metadata("design:type", Function),
6158
+ __metadata("design:paramtypes", [router.RouterStateSnapshot, exports.PlaceDefinition]),
6159
+ __metadata("design:returntype", void 0)
6160
+ ], LeavePlaceGuard.prototype, "isLeavingTheCurrentPlace", null);
6161
+ return LeavePlaceGuard;
6162
+ }());
6163
+ if (false) {
6164
+ /**
6165
+ * @type {?}
6166
+ * @private
6167
+ */
6168
+ LeavePlaceGuard.prototype.router;
6169
+ /**
6170
+ * @type {?}
6171
+ * @private
6172
+ */
6173
+ LeavePlaceGuard.prototype.injector;
6174
+ /**
6175
+ * @type {?}
6176
+ * @private
6177
+ */
6178
+ LeavePlaceGuard.prototype.placeRouter;
6179
+ /** @type {?} */
6180
+ LeavePlaceGuard.prototype.interactionContext;
6181
+ /** @type {?} */
6182
+ LeavePlaceGuard.prototype.angularLocation;
6183
+ }
5934
6184
 
5935
6185
  exports.ACTIVITY_DATA = ACTIVITY_DATA;
5936
6186
  exports.AbstractActivity = AbstractActivity;
5937
6187
  exports.AbstractInputComponent = AbstractInputComponent;
5938
6188
  exports.AbstractPlaceNavigationComponent = AbstractPlaceNavigationComponent;
5939
- exports.Activity = exports.ɵbb;
6189
+ exports.Activity = exports.ɵbd;
5940
6190
  exports.ActivityContainerComponent = ActivityContainerComponent;
5941
6191
  exports.ActivityOutletComponent = ActivityOutletComponent;
5942
6192
  exports.AlertDialogComponent = AlertDialogComponent;
5943
6193
  exports.AngularUiPowerupsModule = AngularUiPowerupsModule;
5944
6194
  exports.BusyOverlayComponent = BusyOverlayComponent;
5945
6195
  exports.CommandDirective = CommandDirective;
5946
- exports.ConfirmThenDialogComponent = exports.ɵbd;
6196
+ exports.ComponentsModule = ComponentsModule;
6197
+ exports.ConfirmThenDialogComponent = exports.ɵbf;
5947
6198
  exports.ConfirmationDialogComponent = ConfirmationDialogComponent;
5948
6199
  exports.DEFINITION_META_DATA_KEY = DEFINITION_META_DATA_KEY;
5949
6200
  exports.DIALOG_INTERACTION_SERVICE_DEFAULTS = DIALOG_INTERACTION_SERVICE_DEFAULTS;
5950
6201
  exports.DialogInteractionService = DialogInteractionService;
5951
6202
  exports.Dimension = Dimension;
6203
+ exports.DirectivesModule = DirectivesModule;
5952
6204
  exports.DisposableComponent = DisposableComponent;
5953
6205
  exports.EmptyStateComponent = EmptyStateComponent;
5954
6206
  exports.FocusBindingDirective = FocusBindingDirective;
@@ -5980,37 +6232,39 @@
5980
6232
  exports.VisitSanitiser = VisitSanitiser;
5981
6233
  exports.leftRightPlaceAnimation = leftRightPlaceAnimation;
5982
6234
  exports.slideDownAndUpAnimation = slideDownAndUpAnimation;
5983
- exports.ɵa = CommandDirective;
5984
- exports.ɵb = FocusBindingDirective;
5985
- exports.ɵba = ACTIVITY_DATA;
5986
- exports.ɵbe = AlertDialogComponent;
5987
- exports.ɵbg = InteractionOutletComponent;
5988
- exports.ɵbh = DIALOG_INTERACTION_SERVICE_DEFAULTS;
5989
- exports.ɵbi = DialogInteractionService;
5990
- exports.ɵc = DisposableComponent;
5991
- exports.ɵd = NumberInputComponent;
5992
- exports.ɵe = AbstractInputComponent;
5993
- exports.ɵf = StringInputComponent;
5994
- exports.ɵg = PasswordInputComponent;
5995
- exports.ɵh = SelectInputComponent;
5996
- exports.ɵi = NoopComponent;
5997
- exports.ɵj = PlaceModule;
5998
- exports.ɵk = EmptyStateComponent;
5999
- exports.ɵl = BusyOverlayComponent;
6000
- exports.ɵm = PlaceOutletComponent;
6001
- exports.ɵn = leftRightPlaceAnimation;
6002
- exports.ɵo = LEFT_RIGHT_PLACE_ANIMATION;
6003
- exports.ɵp = PlaceRouter;
6004
- exports.ɵq = PlaceHistory;
6005
- exports.ɵr = TabbedPlaceNavigationComponent;
6006
- exports.ɵs = AbstractPlaceNavigationComponent;
6007
- exports.ɵt = ListPlaceNavComponent;
6008
- exports.ɵu = InteractionModule;
6009
- exports.ɵv = ActivityContainerComponent;
6010
- exports.ɵw = InteractionContext;
6011
- exports.ɵx = ActivityOutletComponent;
6012
- exports.ɵy = ConfirmationDialogComponent;
6013
- exports.ɵz = AbstractActivity;
6235
+ exports.ɵa = DirectivesModule;
6236
+ exports.ɵb = CommandDirective;
6237
+ exports.ɵba = ConfirmationDialogComponent;
6238
+ exports.ɵbb = AbstractActivity;
6239
+ exports.ɵbc = ACTIVITY_DATA;
6240
+ exports.ɵbg = AlertDialogComponent;
6241
+ exports.ɵbi = InteractionOutletComponent;
6242
+ exports.ɵbj = DIALOG_INTERACTION_SERVICE_DEFAULTS;
6243
+ exports.ɵbk = DialogInteractionService;
6244
+ exports.ɵc = FocusBindingDirective;
6245
+ exports.ɵd = DisposableComponent;
6246
+ exports.ɵe = ComponentsModule;
6247
+ exports.ɵf = NumberInputComponent;
6248
+ exports.ɵg = AbstractInputComponent;
6249
+ exports.ɵh = StringInputComponent;
6250
+ exports.ɵi = PasswordInputComponent;
6251
+ exports.ɵj = SelectInputComponent;
6252
+ exports.ɵk = NoopComponent;
6253
+ exports.ɵl = PlaceModule;
6254
+ exports.ɵm = EmptyStateComponent;
6255
+ exports.ɵn = BusyOverlayComponent;
6256
+ exports.ɵo = PlaceOutletComponent;
6257
+ exports.ɵp = leftRightPlaceAnimation;
6258
+ exports.ɵq = LEFT_RIGHT_PLACE_ANIMATION;
6259
+ exports.ɵr = PlaceRouter;
6260
+ exports.ɵs = PlaceHistory;
6261
+ exports.ɵt = TabbedPlaceNavigationComponent;
6262
+ exports.ɵu = AbstractPlaceNavigationComponent;
6263
+ exports.ɵv = ListPlaceNavComponent;
6264
+ exports.ɵw = InteractionModule;
6265
+ exports.ɵx = ActivityContainerComponent;
6266
+ exports.ɵy = InteractionContext;
6267
+ exports.ɵz = ActivityOutletComponent;
6014
6268
 
6015
6269
  Object.defineProperty(exports, '__esModule', { value: true });
6016
6270