@coolon/angular-ui-powerups 1.3.4 → 1.3.6

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 (78) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/bundles/coolon-angular-ui-powerups.umd.js +130 -184
  3. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
  5. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  6. package/coolon-angular-ui-powerups.d.ts +13 -13
  7. package/coolon-angular-ui-powerups.metadata.json +1 -1
  8. package/esm2015/coolon-angular-ui-powerups.js +13 -13
  9. package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
  10. package/esm2015/coolon-angular-ui-powerups.metadata.json +1 -1
  11. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  12. package/esm2015/lib/components/focus-container/focus-container.component.js +4 -2
  13. package/esm2015/lib/components/focus-container/focus-container.component.js.map +1 -1
  14. package/esm2015/lib/components/focus-container/focus-container.component.metadata.json +1 -1
  15. package/esm2015/lib/components/focusable.component.js +1 -1
  16. package/esm2015/lib/components/focusable.component.js.map +1 -1
  17. package/esm2015/lib/components/forms/abstract-input.component.js.map +1 -1
  18. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js +1 -1
  19. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
  20. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.metadata.json +1 -1
  21. package/esm2015/lib/components/forms/number-input/number-input.component.js +1 -1
  22. package/esm2015/lib/components/forms/number-input/number-input.component.js.map +1 -1
  23. package/esm2015/lib/components/forms/number-input/number-input.component.metadata.json +1 -1
  24. package/esm2015/lib/components/forms/password-input/password-input.component.js +1 -1
  25. package/esm2015/lib/components/forms/password-input/password-input.component.js.map +1 -1
  26. package/esm2015/lib/components/forms/password-input/password-input.component.metadata.json +1 -1
  27. package/esm2015/lib/components/forms/select-input/select-input.component.js +1 -1
  28. package/esm2015/lib/components/forms/select-input/select-input.component.js.map +1 -1
  29. package/esm2015/lib/components/forms/select-input/select-input.component.metadata.json +1 -1
  30. package/esm2015/lib/components/forms/string-input/string-input.component.js +1 -1
  31. package/esm2015/lib/components/forms/string-input/string-input.component.js.map +1 -1
  32. package/esm2015/lib/components/forms/string-input/string-input.component.metadata.json +1 -1
  33. package/esm2015/lib/directives/focus-binding-factory.js +2 -1
  34. package/esm2015/lib/directives/focus-binding-factory.js.map +1 -1
  35. package/esm2015/lib/directives/focus-binding.directive.js +11 -62
  36. package/esm2015/lib/directives/focus-binding.directive.js.map +1 -1
  37. package/esm2015/lib/directives/focus-binding.directive.metadata.json +1 -1
  38. package/esm2015/lib/directives/focus-binding.js +1 -0
  39. package/esm2015/lib/directives/focus-binding.js.map +1 -1
  40. package/esm2015/lib/directives/focus-binding.metadata.json +1 -1
  41. package/esm2015/lib/place/route/visit-sanitiser.js +2 -9
  42. package/esm2015/lib/place/route/visit-sanitiser.js.map +1 -1
  43. package/esm2015/lib/place/route/visit-sanitiser.metadata.json +1 -1
  44. package/esm5/coolon-angular-ui-powerups.js +13 -13
  45. package/esm5/coolon-angular-ui-powerups.js.map +1 -1
  46. package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
  47. package/esm5/lib/components/focus-container/focus-container.component.js +10 -6
  48. package/esm5/lib/components/focus-container/focus-container.component.js.map +1 -1
  49. package/esm5/lib/components/focusable.component.js +1 -1
  50. package/esm5/lib/components/focusable.component.js.map +1 -1
  51. package/esm5/lib/components/forms/abstract-input.component.js.map +1 -1
  52. package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js +1 -1
  53. package/esm5/lib/components/forms/checkbox-input/checkbox-input.component.js.map +1 -1
  54. package/esm5/lib/components/forms/number-input/number-input.component.js +1 -1
  55. package/esm5/lib/components/forms/number-input/number-input.component.js.map +1 -1
  56. package/esm5/lib/components/forms/password-input/password-input.component.js +1 -1
  57. package/esm5/lib/components/forms/password-input/password-input.component.js.map +1 -1
  58. package/esm5/lib/components/forms/select-input/select-input.component.js +1 -1
  59. package/esm5/lib/components/forms/select-input/select-input.component.js.map +1 -1
  60. package/esm5/lib/components/forms/string-input/string-input.component.js +1 -1
  61. package/esm5/lib/components/forms/string-input/string-input.component.js.map +1 -1
  62. package/esm5/lib/directives/focus-binding-factory.js +2 -1
  63. package/esm5/lib/directives/focus-binding-factory.js.map +1 -1
  64. package/esm5/lib/directives/focus-binding.directive.js +11 -65
  65. package/esm5/lib/directives/focus-binding.directive.js.map +1 -1
  66. package/esm5/lib/directives/focus-binding.js +1 -0
  67. package/esm5/lib/directives/focus-binding.js.map +1 -1
  68. package/esm5/lib/place/route/visit-sanitiser.js +2 -9
  69. package/esm5/lib/place/route/visit-sanitiser.js.map +1 -1
  70. package/fesm2015/coolon-angular-ui-powerups.js +96 -149
  71. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  72. package/fesm5/coolon-angular-ui-powerups.js +116 -170
  73. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  74. package/lib/components/focus-container/focus-container.component.d.ts +2 -1
  75. package/lib/components/forms/abstract-input.component.d.ts +1 -1
  76. package/lib/directives/focus-binding-factory.d.ts +2 -2
  77. package/lib/directives/focus-binding.directive.d.ts +6 -11
  78. package/package.json +10 -2
package/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.3.6](https://bitbucket.org/coolon/angular-ui-powerups/compare/v1.3.5...v1.3.6) (2020-05-20)
6
+
7
+ ### [1.3.5](https://bitbucket.org/coolon/angular-ui-powerups/compare/v1.3.4...v1.3.5) (2020-05-20)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * updated FocusContainerComponent to extend DisposableComponent ([3a41a0c](https://bitbucket.org/coolon/angular-ui-powerups/commit/3a41a0cdd76b117417b977eeb3d6f418f0901c95))
13
+
5
14
  ### [1.3.4](https://bitbucket.org/coolon/angular-ui-powerups/compare/v1.3.3...v1.3.4) (2020-05-20)
6
15
 
7
16
 
@@ -330,55 +330,40 @@
330
330
  return DisposableComponent;
331
331
  }(pectin.GarbageCollector));
332
332
 
333
- var FocusBindingDirective = /** @class */ (function (_super) {
334
- __extends(FocusBindingDirective, _super);
335
- function FocusBindingDirective(el, ngZone, document) {
333
+ var FocusBinding = /** @class */ (function (_super) {
334
+ __extends(FocusBinding, _super);
335
+ // TODO: update to support alternate focus mechanisms so we can interoperate with mat-checkbox
336
+ function FocusBinding(focusTargetElement, ngZone, document, focusContext) {
336
337
  var _this = _super.call(this) || this;
337
- _this.el = el;
338
+ _this.focusTargetElement = focusTargetElement;
338
339
  _this.ngZone = ngZone;
340
+ _this.focusContext = focusContext;
339
341
  // @see https://stackoverflow.com/questions/49513359/could-not-resolve-type-document-in-angular5/53715642#53715642
340
342
  _this.document = document;
343
+ // TODO: Make this also track the current enabled/disabled state.
344
+ var when = pectin.Dsl.disposeWith(_this).when;
345
+ when.valueOf(_this.focusContext.focused).changes(function (focused) {
346
+ if (focused && !_this.alreadyHasFocus()) {
347
+ _this.tryAndFocus();
348
+ }
349
+ }, { initialValue: 'triggerChangeUnlessNil' });
341
350
  return _this;
342
351
  }
343
- FocusBindingDirective.prototype.onFocusIn = function () {
344
- if (this.hasBinding()) {
345
- this.pectinFocusBinding.focusContext.notifyFocusIn();
346
- }
347
- };
348
- FocusBindingDirective.prototype.onFocusOut = function () {
349
- if (this.hasBinding()) {
350
- this.pectinFocusBinding.focusContext.notifyFocusOut();
351
- }
352
- };
353
- FocusBindingDirective.prototype.ngOnInit = function () {
354
- };
355
- FocusBindingDirective.prototype.ngAfterViewInit = function () {
356
- var _this = this;
357
- // TODO: Make this also track the current enabled/disabled state.
358
- if (this.hasBinding()) {
359
- var when = pectin.Dsl.disposeWith(this).when;
360
- when.valueOf(this.pectinFocusBinding.focusContext.focused).changes(function (focused) {
361
- if (focused && !_this.alreadyHasFocus()) {
362
- _this.tryAndFocus();
363
- }
364
- }, { initialValue: 'triggerChange' });
365
- }
366
- else {
367
- pectin.Logger.get(this).warn('pectinFocusBinding was nil');
368
- }
352
+ FocusBinding.prototype.onFocusIn = function () {
353
+ this.focusContext.notifyFocusIn();
369
354
  };
370
- FocusBindingDirective.prototype.hasBinding = function () {
371
- return !!this.pectinFocusBinding && !!this.pectinFocusBinding.focusContext;
355
+ FocusBinding.prototype.onFocusOut = function () {
356
+ this.focusContext.notifyFocusOut();
372
357
  };
373
358
  // Hook method for debugging via tracing.
374
- FocusBindingDirective.prototype.alreadyHasFocus = function () {
375
- return this.isFocused(this.focusTarget);
359
+ FocusBinding.prototype.alreadyHasFocus = function () {
360
+ return this.isElementFocused(this.focusTarget);
376
361
  };
377
362
  // Hook method for debugging via tracing.
378
- FocusBindingDirective.prototype.isFocused = function (element) {
363
+ FocusBinding.prototype.isElementFocused = function (element) {
379
364
  return this.document.activeElement === element;
380
365
  };
381
- FocusBindingDirective.prototype.tryAndFocus = function (retries) {
366
+ FocusBinding.prototype.tryAndFocus = function (retries) {
382
367
  var _this = this;
383
368
  if (retries === void 0) { retries = 5; }
384
369
  if (this.modelShouldStillHaveFocus() && this.canFocus()) {
@@ -401,29 +386,100 @@
401
386
  }
402
387
  }
403
388
  };
404
- Object.defineProperty(FocusBindingDirective.prototype, "focusTarget", {
389
+ Object.defineProperty(FocusBinding.prototype, "focusTarget", {
405
390
  get: function () {
406
- return this.focusBindingTarget || this.el.nativeElement;
391
+ return this.focusTargetElement;
407
392
  },
408
393
  enumerable: true,
409
394
  configurable: true
410
395
  });
411
396
  // Hook method for debugging via tracing.
412
- FocusBindingDirective.prototype.modelShouldStillHaveFocus = function () {
413
- return this.hasBinding() && this.pectinFocusBinding.focusContext.focused.value;
397
+ FocusBinding.prototype.modelShouldStillHaveFocus = function () {
398
+ return this.focusContext.focused.value;
414
399
  };
415
400
  // Hook method for debugging via tracing.
416
- FocusBindingDirective.prototype.canFocus = function () {
401
+ FocusBinding.prototype.canFocus = function () {
417
402
  var dimension = this.focusTarget.getBoundingClientRect();
418
403
  var hasSize = dimension.height >= 0 && dimension.height >= 0;
419
404
  // tslint:disable-next-line:no-string-literal
420
405
  return hasSize && !this.focusTarget['disabled'];
421
406
  };
422
- FocusBindingDirective.ctorParameters = function () { return [
423
- { type: core.ElementRef, decorators: [{ type: core.Inject, args: [core.ElementRef,] }] },
407
+ FocusBinding = __decorate([
408
+ __param(1, core.Inject(core.NgZone)),
409
+ __param(2, core.Inject(common.DOCUMENT)),
410
+ __metadata("design:paramtypes", [HTMLElement,
411
+ core.NgZone, Object, Object])
412
+ ], FocusBinding);
413
+ return FocusBinding;
414
+ }(pectin.GarbageCollector));
415
+
416
+ var FocusBindingFactory = /** @class */ (function () {
417
+ function FocusBindingFactory(ngZone, document) {
418
+ this.ngZone = ngZone;
419
+ // @see https://stackoverflow.com/questions/49513359/could-not-resolve-type-document-in-angular5/53715642#53715642
420
+ this.document = document;
421
+ }
422
+ // @Trace()
423
+ FocusBindingFactory.prototype.createBinding = function (el, focusContext) {
424
+ return new FocusBinding(el, this.ngZone, this.document, focusContext);
425
+ };
426
+ FocusBindingFactory.ctorParameters = function () { return [
424
427
  { type: core.NgZone, decorators: [{ type: core.Inject, args: [core.NgZone,] }] },
425
428
  { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] }
426
429
  ]; };
430
+ FocusBindingFactory.ɵprov = core.ɵɵdefineInjectable({ factory: function FocusBindingFactory_Factory() { return new FocusBindingFactory(core.ɵɵinject(core.NgZone), core.ɵɵinject(common.DOCUMENT)); }, token: FocusBindingFactory, providedIn: "root" });
431
+ FocusBindingFactory = __decorate([
432
+ core.Injectable({
433
+ providedIn: 'root'
434
+ }),
435
+ __param(0, core.Inject(core.NgZone)), __param(1, core.Inject(common.DOCUMENT)),
436
+ __metadata("design:paramtypes", [core.NgZone, Object])
437
+ ], FocusBindingFactory);
438
+ return FocusBindingFactory;
439
+ }());
440
+
441
+ var FocusBindingDirective = /** @class */ (function (_super) {
442
+ __extends(FocusBindingDirective, _super);
443
+ function FocusBindingDirective(el, focusBindingFactory) {
444
+ var _this = _super.call(this) || this;
445
+ _this.el = el;
446
+ _this.focusBindingFactory = focusBindingFactory;
447
+ return _this;
448
+ }
449
+ FocusBindingDirective.prototype.onFocusIn = function () {
450
+ if (this.hasBinding()) {
451
+ this.pectinFocusBinding.notifyFocusIn();
452
+ }
453
+ };
454
+ FocusBindingDirective.prototype.onFocusOut = function () {
455
+ if (this.hasBinding()) {
456
+ this.pectinFocusBinding.notifyFocusOut();
457
+ }
458
+ };
459
+ FocusBindingDirective.prototype.ngOnInit = function () {
460
+ };
461
+ FocusBindingDirective.prototype.ngAfterViewInit = function () {
462
+ if (this.hasBinding()) {
463
+ this.registerDisposable(this.focusBindingFactory.createBinding(this.focusTarget, this.pectinFocusBinding));
464
+ }
465
+ else {
466
+ pectin.Logger.get(this).warn('pectinFocusBinding was nil');
467
+ }
468
+ };
469
+ FocusBindingDirective.prototype.hasBinding = function () {
470
+ return !!this.pectinFocusBinding && !!this.pectinFocusBinding;
471
+ };
472
+ Object.defineProperty(FocusBindingDirective.prototype, "focusTarget", {
473
+ get: function () {
474
+ return this.focusBindingTarget || this.el.nativeElement;
475
+ },
476
+ enumerable: true,
477
+ configurable: true
478
+ });
479
+ FocusBindingDirective.ctorParameters = function () { return [
480
+ { type: core.ElementRef, decorators: [{ type: core.Inject, args: [core.ElementRef,] }] },
481
+ { type: FocusBindingFactory }
482
+ ]; };
427
483
  __decorate([
428
484
  core.Input(),
429
485
  __metadata("design:type", Object)
@@ -450,10 +506,8 @@
450
506
  selector: '[pectinFocusBinding]'
451
507
  }),
452
508
  __param(0, core.Inject(core.ElementRef)),
453
- __param(1, core.Inject(core.NgZone)),
454
- __param(2, core.Inject(common.DOCUMENT)),
455
509
  __metadata("design:paramtypes", [core.ElementRef,
456
- core.NgZone, Object])
510
+ FocusBindingFactory])
457
511
  ], FocusBindingDirective);
458
512
  return FocusBindingDirective;
459
513
  }(DisposableComponent));
@@ -485,117 +539,14 @@
485
539
  return DirectivesModule;
486
540
  }());
487
541
 
488
- var FocusBinding = /** @class */ (function (_super) {
489
- __extends(FocusBinding, _super);
490
- function FocusBinding(focusTargetElement, ngZone, document, focusContext) {
542
+ var FocusContainerComponent = /** @class */ (function (_super) {
543
+ __extends(FocusContainerComponent, _super);
544
+ function FocusContainerComponent(focusManager) {
491
545
  var _this = _super.call(this) || this;
492
- _this.focusTargetElement = focusTargetElement;
493
- _this.ngZone = ngZone;
494
- _this.focusContext = focusContext;
495
- // @see https://stackoverflow.com/questions/49513359/could-not-resolve-type-document-in-angular5/53715642#53715642
496
- _this.document = document;
497
- // TODO: Make this also track the current enabled/disabled state.
498
- var when = pectin.Dsl.disposeWith(_this).when;
499
- when.valueOf(_this.focusContext.focused).changes(function (focused) {
500
- if (focused && !_this.alreadyHasFocus()) {
501
- _this.tryAndFocus();
502
- }
503
- }, { initialValue: 'triggerChangeUnlessNil' });
546
+ _this.focusManager = focusManager;
547
+ _this.tabIndex = -1;
504
548
  return _this;
505
549
  }
506
- FocusBinding.prototype.onFocusIn = function () {
507
- this.focusContext.notifyFocusIn();
508
- };
509
- FocusBinding.prototype.onFocusOut = function () {
510
- this.focusContext.notifyFocusOut();
511
- };
512
- // Hook method for debugging via tracing.
513
- FocusBinding.prototype.alreadyHasFocus = function () {
514
- return this.isElementFocused(this.focusTarget);
515
- };
516
- // Hook method for debugging via tracing.
517
- FocusBinding.prototype.isElementFocused = function (element) {
518
- return this.document.activeElement === element;
519
- };
520
- FocusBinding.prototype.tryAndFocus = function (retries) {
521
- var _this = this;
522
- if (retries === void 0) { retries = 5; }
523
- if (this.modelShouldStillHaveFocus() && this.canFocus()) {
524
- if (!this.alreadyHasFocus()) {
525
- this.focusTarget.focus();
526
- }
527
- // if we didn't get the focus we try again later.
528
- if (!this.alreadyHasFocus()) {
529
- pectin.Logger.get(this).log("focus failed, trying " + retries + " more times");
530
- if (retries > 0) {
531
- // try again on the next paint
532
- // TODO: is there an angular way of doing this without calling a window function.
533
- requestAnimationFrame(function () {
534
- _this.tryAndFocus(retries - 1);
535
- });
536
- }
537
- else {
538
- pectin.Logger.get(this).warn("Tried to focus but gave up as the component wasn't enabled or visible.");
539
- }
540
- }
541
- }
542
- };
543
- Object.defineProperty(FocusBinding.prototype, "focusTarget", {
544
- get: function () {
545
- return this.focusTargetElement;
546
- },
547
- enumerable: true,
548
- configurable: true
549
- });
550
- // Hook method for debugging via tracing.
551
- FocusBinding.prototype.modelShouldStillHaveFocus = function () {
552
- return this.focusContext.focused.value;
553
- };
554
- // Hook method for debugging via tracing.
555
- FocusBinding.prototype.canFocus = function () {
556
- var dimension = this.focusTarget.getBoundingClientRect();
557
- var hasSize = dimension.height >= 0 && dimension.height >= 0;
558
- // tslint:disable-next-line:no-string-literal
559
- return hasSize && !this.focusTarget['disabled'];
560
- };
561
- FocusBinding = __decorate([
562
- __param(1, core.Inject(core.NgZone)),
563
- __param(2, core.Inject(common.DOCUMENT)),
564
- __metadata("design:paramtypes", [HTMLElement,
565
- core.NgZone, Object, Object])
566
- ], FocusBinding);
567
- return FocusBinding;
568
- }(pectin.GarbageCollector));
569
-
570
- var FocusBindingFactory = /** @class */ (function () {
571
- function FocusBindingFactory(ngZone, document) {
572
- this.ngZone = ngZone;
573
- // @see https://stackoverflow.com/questions/49513359/could-not-resolve-type-document-in-angular5/53715642#53715642
574
- this.document = document;
575
- }
576
- FocusBindingFactory.prototype.createBinding = function (el, focusContext) {
577
- return new FocusBinding(el.nativeElement, this.ngZone, this.document, focusContext);
578
- };
579
- FocusBindingFactory.ctorParameters = function () { return [
580
- { type: core.NgZone, decorators: [{ type: core.Inject, args: [core.NgZone,] }] },
581
- { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] }
582
- ]; };
583
- FocusBindingFactory.ɵprov = core.ɵɵdefineInjectable({ factory: function FocusBindingFactory_Factory() { return new FocusBindingFactory(core.ɵɵinject(core.NgZone), core.ɵɵinject(common.DOCUMENT)); }, token: FocusBindingFactory, providedIn: "root" });
584
- FocusBindingFactory = __decorate([
585
- core.Injectable({
586
- providedIn: 'root'
587
- }),
588
- __param(0, core.Inject(core.NgZone)), __param(1, core.Inject(common.DOCUMENT)),
589
- __metadata("design:paramtypes", [core.NgZone, Object])
590
- ], FocusBindingFactory);
591
- return FocusBindingFactory;
592
- }());
593
-
594
- var FocusContainerComponent = /** @class */ (function () {
595
- function FocusContainerComponent(focusManager) {
596
- this.focusManager = focusManager;
597
- this.tabIndex = -1;
598
- }
599
550
  FocusContainerComponent.prototype.ngOnInit = function () {
600
551
  };
601
552
  FocusContainerComponent.prototype.restoreFocus = function () {
@@ -605,7 +556,7 @@
605
556
  { type: pectin.FocusManager, decorators: [{ type: core.Host }] }
606
557
  ]; };
607
558
  __decorate([
608
- core.HostBinding("attr.tabindex"),
559
+ core.HostBinding('attr.tabindex'),
609
560
  __metadata("design:type", Object)
610
561
  ], FocusContainerComponent.prototype, "tabIndex", void 0);
611
562
  __decorate([
@@ -627,7 +578,7 @@
627
578
  __metadata("design:paramtypes", [pectin.FocusManager])
628
579
  ], FocusContainerComponent);
629
580
  return FocusContainerComponent;
630
- }());
581
+ }(DisposableComponent));
631
582
 
632
583
  var FocusableComponent = /** @class */ (function (_super) {
633
584
  __extends(FocusableComponent, _super);
@@ -638,7 +589,7 @@
638
589
  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;
639
590
  if (_this.focusManager) {
640
591
  _this._focusContext = _this.focusManager.registerFocusable(_this);
641
- _this.registerDisposable(focusBindingFactory.createBinding(el, _this.focusContext));
592
+ _this.registerDisposable(focusBindingFactory.createBinding(el.nativeElement, _this.focusContext));
642
593
  }
643
594
  return _this;
644
595
  }
@@ -881,7 +832,7 @@
881
832
  CheckboxInputComponent = __decorate([
882
833
  core.Component({
883
834
  selector: 'aup-checkbox-input',
884
- template: "<mat-checkbox\n [(ngModel)]=\"valueModel.value\"\n [color]=\"color\"\n [labelPosition]=\"labelPosition\"\n [disabled]=\"!isEnabled()\"\n>{{label}}</mat-checkbox>\n<mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n<mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n",
835
+ template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"valueModel.value\"\n [color]=\"color\"\n [labelPosition]=\"labelPosition\"\n [disabled]=\"!isEnabled()\"\n>{{label}}</mat-checkbox>\n<mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n<mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n",
885
836
  styles: [":host{display:inline-flex;flex-direction:column;margin-top:24px;margin-bottom:16px}mat-error,mat-hint{margin-top:4px;margin-left:24px;font-size:12px;font-weight:400;line-height:13.5px}"]
886
837
  }),
887
838
  __metadata("design:paramtypes", [])
@@ -903,7 +854,7 @@
903
854
  NumberInputComponent = __decorate([
904
855
  core.Component({
905
856
  selector: 'aup-number-input',
906
- 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",
857
+ 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]=\"delegatingFormValueModel?.focusContext\"\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",
907
858
  styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]
908
859
  }),
909
860
  __metadata("design:paramtypes", [])
@@ -925,7 +876,7 @@
925
876
  PasswordInputComponent = __decorate([
926
877
  core.Component({
927
878
  selector: 'aup-password-input',
928
- 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",
879
+ 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]=\"delegatingFormValueModel.focusContext\"\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",
929
880
  styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]
930
881
  }),
931
882
  __metadata("design:paramtypes", [])
@@ -977,7 +928,7 @@
977
928
  SelectInputComponent = __decorate([
978
929
  core.Component({
979
930
  selector: 'aup-select-input',
980
- 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 *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\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",
931
+ 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]=\"delegatingFormValueModel.focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-option *ngIf=\"allowNil\">{{placeholder}}</mat-option>\n <mat-option *ngFor=\"let option of optionsModel.value; let i = index\" [value]=\"option\">\n <ng-container *ngIf=\"!optionTemplateRef\">{{optionLabelFormat(option)}}</ng-container>\n <ng-container *ngIf=\"optionTemplateRef\"\n [ngTemplateOutlet]=\"optionTemplateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: option, index: i }\"\n >\n </ng-container>\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",
981
932
  styles: [":host{display:inline-block}mat-form-field{width:100%}"]
982
933
  }),
983
934
  __metadata("design:paramtypes", [])
@@ -1013,7 +964,7 @@
1013
964
  StringInputComponent = __decorate([
1014
965
  core.Component({
1015
966
  selector: 'aup-string-input',
1016
- 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 <button mat-button mat-icon-button matSuffix *ngIf=\"enableClear\" [pectinCommand]=\"clearCommand\">\n <mat-icon>close</mat-icon>\n </button>\n</mat-form-field>\n\n",
967
+ 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]=\"delegatingFormValueModel.focusContext\"\n [errorStateMatcher]=\"errorStateMatcher\"\n >\n <mat-hint *ngIf=\"hint\">{{hint}}</mat-hint>\n <mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n <button mat-button mat-icon-button matSuffix *ngIf=\"enableClear\" [pectinCommand]=\"clearCommand\">\n <mat-icon>close</mat-icon>\n </button>\n</mat-form-field>\n\n",
1017
968
  styles: [":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}button[disabled]{visibility:hidden}"]
1018
969
  }),
1019
970
  __metadata("design:paramtypes", [])
@@ -4644,6 +4595,7 @@
4644
4595
  this.placeHistory = placeHistory;
4645
4596
  this.injector = injector;
4646
4597
  }
4598
+ // @Trace()
4647
4599
  VisitSanitiser.prototype.sanitise = function (visit) {
4648
4600
  return __awaiter(this, void 0, void 0, function () {
4649
4601
  var placeDef, routeIdDef, routeId, sanitisedValue, parameterDefs, sanitisedVisit, i, def, value, sanitisedValue;
@@ -4692,12 +4644,6 @@
4692
4644
  });
4693
4645
  });
4694
4646
  };
4695
- __decorate([
4696
- pectin.Trace(),
4697
- __metadata("design:type", Function),
4698
- __metadata("design:paramtypes", [Visit]),
4699
- __metadata("design:returntype", Promise)
4700
- ], VisitSanitiser.prototype, "sanitise", null);
4701
4647
  return VisitSanitiser;
4702
4648
  }());
4703
4649
 
@@ -5054,22 +5000,22 @@
5054
5000
  exports.ɵbv = InPlaceInteractionContextComponent;
5055
5001
  exports.ɵc = FocusBindingDirective;
5056
5002
  exports.ɵd = DisposableComponent;
5057
- exports.ɵe = ComponentsModule;
5058
- exports.ɵf = NumberInputComponent;
5059
- exports.ɵg = AbstractInputComponent;
5060
- exports.ɵh = StringInputComponent;
5061
- exports.ɵi = PasswordInputComponent;
5062
- exports.ɵj = SelectInputComponent;
5063
- exports.ɵk = CheckboxInputComponent;
5064
- exports.ɵl = ScrollContainerComponent;
5065
- exports.ɵm = NoopComponent;
5066
- exports.ɵn = SwitchCaseOption;
5067
- exports.ɵo = SwitchCaseWhenDirective;
5068
- exports.ɵp = SwitchCaseDefaultDirective;
5069
- exports.ɵq = SwitchCaseComponent;
5070
- exports.ɵr = FocusContainerComponent;
5071
- exports.ɵs = FocusableComponent;
5072
- exports.ɵt = FocusBindingFactory;
5003
+ exports.ɵe = FocusBindingFactory;
5004
+ exports.ɵf = ComponentsModule;
5005
+ exports.ɵg = NumberInputComponent;
5006
+ exports.ɵh = AbstractInputComponent;
5007
+ exports.ɵi = StringInputComponent;
5008
+ exports.ɵj = PasswordInputComponent;
5009
+ exports.ɵk = SelectInputComponent;
5010
+ exports.ɵl = CheckboxInputComponent;
5011
+ exports.ɵm = ScrollContainerComponent;
5012
+ exports.ɵn = NoopComponent;
5013
+ exports.ɵo = SwitchCaseOption;
5014
+ exports.ɵp = SwitchCaseWhenDirective;
5015
+ exports.ɵq = SwitchCaseDefaultDirective;
5016
+ exports.ɵr = SwitchCaseComponent;
5017
+ exports.ɵs = FocusContainerComponent;
5018
+ exports.ɵt = FocusableComponent;
5073
5019
  exports.ɵu = PlaceModule;
5074
5020
  exports.ɵv = EmptyStateComponent;
5075
5021
  exports.ɵw = BusyOverlayComponent;