@coolon/angular-ui-powerups 1.11.3 → 1.12.0

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 (73) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/bundles/coolon-angular-ui-powerups.umd.js +830 -821
  3. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js +2 -2
  5. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  6. package/coolon-angular-ui-powerups.d.ts +15 -16
  7. package/coolon-angular-ui-powerups.metadata.json +1 -1
  8. package/esm2015/coolon-angular-ui-powerups.js +15 -16
  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/index.js +1 -0
  13. package/esm2015/lib/components/index.js.map +1 -1
  14. package/esm2015/lib/components/index.metadata.json +1 -1
  15. package/esm2015/lib/components/table/column-model.js +13 -2
  16. package/esm2015/lib/components/table/column-model.js.map +1 -1
  17. package/esm2015/lib/components/table/column-model.metadata.json +1 -1
  18. package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js +3 -4
  19. package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js.map +1 -1
  20. package/esm2015/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.metadata.json +1 -1
  21. package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.js +2 -2
  22. package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.js.map +1 -1
  23. package/esm2015/lib/components/table/edit-row-controls/edit-row-controls.component.metadata.json +1 -1
  24. package/esm2015/lib/components/table/edit-session.js +20 -0
  25. package/esm2015/lib/components/table/edit-session.js.map +1 -0
  26. package/esm2015/lib/components/table/edit-session.metadata.json +1 -0
  27. package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +2 -1
  28. package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
  29. package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.metadata.json +1 -1
  30. package/esm2015/lib/components/table/table-model.js +4 -24
  31. package/esm2015/lib/components/table/table-model.js.map +1 -1
  32. package/esm2015/lib/components/table/table-model.metadata.json +1 -1
  33. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js +1 -1
  34. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js.map +1 -1
  35. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.metadata.json +1 -1
  36. package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js +2 -2
  37. package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js.map +1 -1
  38. package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.metadata.json +1 -1
  39. package/esm5/coolon-angular-ui-powerups.js +15 -16
  40. package/esm5/coolon-angular-ui-powerups.js.map +1 -1
  41. package/esm5/lib/components/components.module.ngfactory.js.map +1 -1
  42. package/esm5/lib/components/index.js +1 -0
  43. package/esm5/lib/components/index.js.map +1 -1
  44. package/esm5/lib/components/table/column-model.js +13 -2
  45. package/esm5/lib/components/table/column-model.js.map +1 -1
  46. package/esm5/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js +3 -4
  47. package/esm5/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.js.map +1 -1
  48. package/esm5/lib/components/table/edit-row-controls/edit-row-controls.component.js +2 -2
  49. package/esm5/lib/components/table/edit-row-controls/edit-row-controls.component.js.map +1 -1
  50. package/esm5/lib/components/table/edit-session.js +25 -0
  51. package/esm5/lib/components/table/edit-session.js.map +1 -0
  52. package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js +2 -1
  53. package/esm5/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
  54. package/esm5/lib/components/table/table-model.js +5 -28
  55. package/esm5/lib/components/table/table-model.js.map +1 -1
  56. package/esm5/lib/interaction/components/activity-actions/activity-actions.component.js +1 -1
  57. package/esm5/lib/interaction/components/activity-actions/activity-actions.component.js.map +1 -1
  58. package/esm5/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js +2 -2
  59. package/esm5/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js.map +1 -1
  60. package/fesm2015/coolon-angular-ui-powerups.js +552 -544
  61. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  62. package/fesm5/coolon-angular-ui-powerups.js +804 -796
  63. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  64. package/lib/components/index.d.ts +1 -0
  65. package/lib/components/table/column-model.d.ts +16 -12
  66. package/lib/components/table/default-header-cell-renderer/default-header-cell-renderer.component.d.ts +1 -2
  67. package/lib/components/table/edit-row-controls/edit-row-controls.component.d.ts +2 -2
  68. package/lib/components/table/edit-session.d.ts +9 -0
  69. package/lib/components/table/table-cell-renderer/table-cell-renderer.component.d.ts +2 -1
  70. package/lib/components/table/table-model.d.ts +4 -13
  71. package/lib/interaction/components/activity-actions/activity-actions.component.d.ts +1 -1
  72. package/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.d.ts +3 -2
  73. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/tabs'), require('@angular/platform-browser/animations'), require('@angular/cdk/portal'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/icon'), require('@angular/material/table'), require('@coolon/pectin'), require('@angular/flex-layout'), require('@angular/material/dialog'), require('@angular/router'), require('lodash'), require('resize-observer-polyfill'), require('@coolon/typescript-utilities'), require('@angular/cdk/overlay'), require('@typescript-plus/fast-memoize-decorator/dist/src'), require('immer'), require('@angular/material/progress-spinner'), require('@angular/material/list'), require('@angular/material/tooltip'), require('@typescript-plus/fast-memoize-decorator'), require('reflect-metadata'), require('@angular/animations'), require('rxjs')) :
3
- typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material/form-field', '@angular/material/input', '@angular/material/select', '@angular/material/tabs', '@angular/platform-browser/animations', '@angular/cdk/portal', '@angular/material/button', '@angular/material/checkbox', '@angular/material/icon', '@angular/material/table', '@coolon/pectin', '@angular/flex-layout', '@angular/material/dialog', '@angular/router', 'lodash', 'resize-observer-polyfill', '@coolon/typescript-utilities', '@angular/cdk/overlay', '@typescript-plus/fast-memoize-decorator/dist/src', 'immer', '@angular/material/progress-spinner', '@angular/material/list', '@angular/material/tooltip', '@typescript-plus/fast-memoize-decorator', 'reflect-metadata', '@angular/animations', 'rxjs'], factory) :
4
- (global = global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material.formField, global.ng.material.input, global.ng.material.select, global.ng.material.tabs, global.ng.platformBrowser.animations, global.ng.cdk.portal, global.ng.material.button, global.ng.material.checkbox, global.ng.material.icon, global.ng.material.table, global.pectin, global.ng.flexLayout, global.ng.material.dialog, global.ng.router, global.___default, global.ResizeObserver, global.typescriptUtilities, global.ng.cdk.overlay, global.src, global.produce, global.ng.material.progressSpinner, global.ng.material.list, global.ng.material.tooltip, global.fastMemoizeDecorator, null, global.ng.animations, global.rxjs));
5
- }(this, (function (exports, common, core, forms, formField, input, select, tabs, animations, portal, button, checkbox, icon, table, pectin, flexLayout, dialog, router, ___default, ResizeObserver, typescriptUtilities, overlay, src, produce, progressSpinner, list, tooltip, fastMemoizeDecorator, reflectMetadata, animations$1, rxjs) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/tabs'), require('@angular/platform-browser/animations'), require('@angular/cdk/portal'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/icon'), require('@angular/material/table'), require('@coolon/pectin'), require('@angular/flex-layout'), require('@angular/material/dialog'), require('@angular/router'), require('lodash'), require('@coolon/typescript-utilities'), require('@angular/cdk/overlay'), require('@typescript-plus/fast-memoize-decorator/dist/src'), require('immer'), require('@angular/material/progress-spinner'), require('@angular/material/list'), require('@angular/material/tooltip'), require('@typescript-plus/fast-memoize-decorator'), require('reflect-metadata'), require('@angular/animations'), require('resize-observer-polyfill'), require('rxjs')) :
3
+ typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material/form-field', '@angular/material/input', '@angular/material/select', '@angular/material/tabs', '@angular/platform-browser/animations', '@angular/cdk/portal', '@angular/material/button', '@angular/material/checkbox', '@angular/material/icon', '@angular/material/table', '@coolon/pectin', '@angular/flex-layout', '@angular/material/dialog', '@angular/router', 'lodash', '@coolon/typescript-utilities', '@angular/cdk/overlay', '@typescript-plus/fast-memoize-decorator/dist/src', 'immer', '@angular/material/progress-spinner', '@angular/material/list', '@angular/material/tooltip', '@typescript-plus/fast-memoize-decorator', 'reflect-metadata', '@angular/animations', 'resize-observer-polyfill', 'rxjs'], factory) :
4
+ (global = global || self, factory((global.coolon = global.coolon || {}, global.coolon['angular-ui-powerups'] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material.formField, global.ng.material.input, global.ng.material.select, global.ng.material.tabs, global.ng.platformBrowser.animations, global.ng.cdk.portal, global.ng.material.button, global.ng.material.checkbox, global.ng.material.icon, global.ng.material.table, global.pectin, global.ng.flexLayout, global.ng.material.dialog, global.ng.router, global.___default, global.typescriptUtilities, global.ng.cdk.overlay, global.src, global.produce, global.ng.material.progressSpinner, global.ng.material.list, global.ng.material.tooltip, global.fastMemoizeDecorator, null, global.ng.animations, global.ResizeObserver, global.rxjs));
5
+ }(this, (function (exports, common, core, forms, formField, input, select, tabs, animations, portal, button, checkbox, icon, table, pectin, flexLayout, dialog, router, ___default, typescriptUtilities, overlay, src, produce, progressSpinner, list, tooltip, fastMemoizeDecorator, reflectMetadata, animations$1, ResizeObserver, rxjs) { 'use strict';
6
6
 
7
7
  var ___default__default = 'default' in ___default ? ___default['default'] : ___default;
8
- ResizeObserver = ResizeObserver && Object.prototype.hasOwnProperty.call(ResizeObserver, 'default') ? ResizeObserver['default'] : ResizeObserver;
9
8
  produce = produce && Object.prototype.hasOwnProperty.call(produce, 'default') ? produce['default'] : produce;
9
+ ResizeObserver = ResizeObserver && Object.prototype.hasOwnProperty.call(ResizeObserver, 'default') ? ResizeObserver['default'] : ResizeObserver;
10
10
 
11
11
  /*! *****************************************************************************
12
12
  Copyright (c) Microsoft Corporation. All rights reserved.
@@ -540,360 +540,155 @@
540
540
  return DirectivesModule;
541
541
  }());
542
542
 
543
- var FocusableComponent = /** @class */ (function (_super) {
544
- __extends(FocusableComponent, _super);
545
- function FocusableComponent(el, focusManager, focusBindingFactory) {
546
- var _this = _super.call(this) || this;
547
- _this.el = el;
548
- _this.focusManager = focusManager;
549
- 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;
550
- if (_this.focusManager) {
551
- _this._focusContext = _this.focusManager.registerFocusable(_this);
552
- _this.registerDisposable(_this._focusContext);
553
- _this.registerDisposable(focusBindingFactory.createBinding(el.nativeElement, _this.focusContext));
554
- }
543
+ var ActivityActionsComponent = /** @class */ (function (_super) {
544
+ __extends(ActivityActionsComponent, _super);
545
+ function ActivityActionsComponent() {
546
+ var _this = _super !== null && _super.apply(this, arguments) || this;
547
+ _this.align = 'start';
555
548
  return _this;
556
549
  }
557
- Object.defineProperty(FocusableComponent.prototype, "focusable", {
550
+ Object.defineProperty(ActivityActionsComponent.prototype, "alignEnd", {
558
551
  get: function () {
559
- return !!this.focusContext ? 0 : undefined;
552
+ return this.align === 'end';
560
553
  },
561
554
  enumerable: true,
562
555
  configurable: true
563
556
  });
564
- FocusableComponent.prototype.onFocus = function () {
565
- var _a;
566
- (_a = this.focusContext) === null || _a === void 0 ? void 0 : _a.notifyFocusIn();
557
+ ActivityActionsComponent.prototype.ngOnInit = function () {
567
558
  };
568
- FocusableComponent.prototype.onBlur = function () {
569
- var _a;
570
- (_a = this.focusContext) === null || _a === void 0 ? void 0 : _a.notifyFocusOut();
559
+ ActivityActionsComponent.prototype.hasConfirmText = function () {
560
+ return !___default__default.isEmpty(this.confirmText);
571
561
  };
572
- Object.defineProperty(FocusableComponent.prototype, "focusContext", {
573
- get: function () {
574
- return this._focusContext;
575
- },
576
- enumerable: true,
577
- configurable: true
578
- });
579
- FocusableComponent.ctorParameters = function () { return [
580
- { type: core.ElementRef },
581
- { type: pectin.FocusManager },
582
- { type: FocusBindingFactory }
583
- ]; };
584
562
  __decorate([
585
- core.HostBinding('attr.tabindex'),
586
- __metadata("design:type", Object),
587
- __metadata("design:paramtypes", [])
588
- ], FocusableComponent.prototype, "focusable", null);
563
+ core.Input(),
564
+ pectin.TrackExternal(),
565
+ __metadata("design:type", pectin.Command)
566
+ ], ActivityActionsComponent.prototype, "confirmCommand", void 0);
589
567
  __decorate([
590
- core.HostListener('focus'),
591
- __metadata("design:type", Function),
592
- __metadata("design:paramtypes", []),
593
- __metadata("design:returntype", void 0)
594
- ], FocusableComponent.prototype, "onFocus", null);
568
+ core.Input(),
569
+ __metadata("design:type", String)
570
+ ], ActivityActionsComponent.prototype, "confirmText", void 0);
595
571
  __decorate([
596
- core.HostListener('blur'),
597
- __metadata("design:type", Function),
598
- __metadata("design:paramtypes", []),
599
- __metadata("design:returntype", void 0)
600
- ], FocusableComponent.prototype, "onBlur", null);
601
- FocusableComponent = __decorate([
602
- core.Component({ template: '' }),
603
- __metadata("design:paramtypes", [core.ElementRef, pectin.FocusManager, FocusBindingFactory])
604
- ], FocusableComponent);
605
- return FocusableComponent;
572
+ core.Input(),
573
+ pectin.TrackExternal(),
574
+ __metadata("design:type", pectin.Command)
575
+ ], ActivityActionsComponent.prototype, "cancelCommand", void 0);
576
+ __decorate([
577
+ core.Input(),
578
+ __metadata("design:type", String)
579
+ ], ActivityActionsComponent.prototype, "align", void 0);
580
+ __decorate([
581
+ core.HostBinding('class.align-end'),
582
+ __metadata("design:type", Boolean),
583
+ __metadata("design:paramtypes", [])
584
+ ], ActivityActionsComponent.prototype, "alignEnd", null);
585
+ ActivityActionsComponent = __decorate([
586
+ core.Component({
587
+ selector: 'aup-activity-actions',
588
+ template: "<button class=\"cancel\" mat-icon-button [pectinCommand]=\"cancelCommand\">\n <mat-icon>clear</mat-icon>\n</button>\n<button class=\"confirm\" *ngIf=\"!hasConfirmText()\" mat-icon-button [pectinCommand]=\"confirmCommand\">\n <mat-icon>done</mat-icon>\n</button>\n<button class=\"confirm\" *ngIf=\"hasConfirmText()\" mat-button [pectinCommand]=\"confirmCommand\">{{confirmText}}</button>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>\n",
589
+ styles: [":host{display:-ms-grid;display:grid;grid-template-areas:\"cancel confirm content\";-ms-grid-columns:auto auto 1fr;grid-template-columns:auto auto 1fr;-ms-grid-rows:auto;grid-template-rows:auto;align-items:center;justify-content:end}:host.align-end{grid-template-areas:\"content cancel confirm\";-ms-grid-columns:1fr auto auto;grid-template-columns:1fr auto auto}.cancel{-ms-grid-row:1;-ms-grid-column:1;grid-area:cancel}:host.align-end>.cancel{-ms-grid-row:1;-ms-grid-column:2}.confirm{-ms-grid-row:1;-ms-grid-column:2;grid-area:confirm}:host.align-end>.confirm{-ms-grid-row:1;-ms-grid-column:3}.content{-ms-grid-row:1;-ms-grid-column:3;grid-area:content;text-align:left}:host.align-end>.content{-ms-grid-row:1;-ms-grid-column:1}"]
590
+ })
591
+ ], ActivityActionsComponent);
592
+ return ActivityActionsComponent;
606
593
  }(DisposableComponent));
607
594
 
608
- var Dimension = /** @class */ (function () {
609
- function Dimension(width, height) {
610
- this.width = width;
611
- this.height = height;
612
- }
613
- return Dimension;
614
- }());
615
-
616
- var Point = /** @class */ (function () {
617
- function Point(x, y) {
618
- this.x = x;
619
- this.y = y;
620
- }
621
- Point.from = function (data) {
622
- return new Point(data.x, data.y);
623
- };
624
- Point.prototype.translate = function (x, y) {
625
- return new Point(this.x + x, this.y + y);
626
- };
627
- return Point;
628
- }());
629
-
630
- exports.Bounds = /** @class */ (function (_super) {
631
- __extends(Bounds, _super);
632
- function Bounds(top, left, width, height) {
633
- var _this = _super.call(this, width, height) || this;
634
- _this.top = top;
635
- _this.left = left;
636
- _this.width = width;
637
- _this.height = height;
638
- return _this;
639
- }
640
- Bounds.prototype.relativePositionOf = function (point) {
641
- if (point instanceof MouseEvent) {
642
- return new Point(point.clientX - this.left, point.clientY - this.top);
643
- }
644
- else {
645
- return new Point(point.x - this.left, point.y - this.top);
646
- }
647
- };
648
- return Bounds;
649
- }(Dimension));
650
- (function (Bounds) {
651
- function ofElement(element) {
652
- var rect = element.getBoundingClientRect();
653
- return new Bounds(rect.top, rect.left, rect.width, rect.height);
654
- }
655
- Bounds.ofElement = ofElement;
656
- })(exports.Bounds || (exports.Bounds = {}));
657
-
658
- var ResizeAwareComponent = /** @class */ (function (_super) {
659
- __extends(ResizeAwareComponent, _super);
660
- function ResizeAwareComponent(elementRef, ngZone) {
661
- var _this = _super.call(this) || this;
662
- _this.elementRef = elementRef;
663
- _this.ngZone = ngZone;
664
- _this._boundsModel = new pectin.MutableValueModel(new exports.Bounds(0, 0, 0, 0));
595
+ var ACTIVITY_DATA = new core.InjectionToken('InteractionActivityData');
596
+ var Activity = /** @class */ (function (_super) {
597
+ __extends(Activity, _super);
598
+ function Activity() {
599
+ var _this = _super !== null && _super.apply(this, arguments) || this;
600
+ _this._busyModel = new pectin.DelegatingValueModel().withDefault(false);
601
+ _this.class = 'aup-activity';
665
602
  return _this;
666
603
  }
667
- ResizeAwareComponent.prototype.ngAfterViewInit = function () {
668
- var _this = this;
669
- this.updateBounds();
670
- var element = this.elementRef.nativeElement;
671
- var ro = new ResizeObserver(function (entries, observer) {
672
- _this.ngZone.run(function () { return _this.updateBounds(); });
673
- });
674
- ro.observe(element);
675
- this.onDispose(function () { return ro.disconnect(); });
604
+ Activity.prototype.initialise = function (nestedInteractionContext, activityContext) {
605
+ typescriptUtilities.assert.isNil(this._activityContext);
606
+ this._activityContext = activityContext;
607
+ this._interactionContext = nestedInteractionContext;
676
608
  };
677
- Object.defineProperty(ResizeAwareComponent.prototype, "boundsModel", {
609
+ Object.defineProperty(Activity.prototype, "interactionContext", {
678
610
  get: function () {
679
- return this._boundsModel.readonly;
611
+ typescriptUtilities.assert.isTruthy(this.isInitialised());
612
+ return this._interactionContext;
680
613
  },
681
614
  enumerable: true,
682
615
  configurable: true
683
616
  });
684
- Object.defineProperty(ResizeAwareComponent.prototype, "nativeElement", {
617
+ Activity.prototype.done = function (result) {
618
+ return this._activityContext.onDone(result);
619
+ };
620
+ Activity.prototype.cancel = function (error) {
621
+ this._activityContext.onCancel(error);
622
+ };
623
+ // @Trace()
624
+ Activity.prototype.onActivityReady = function () {
625
+ };
626
+ Object.defineProperty(Activity.prototype, "busy", {
685
627
  get: function () {
686
- return this.elementRef.nativeElement;
628
+ return this._busyModel.readonly;
687
629
  },
688
630
  enumerable: true,
689
631
  configurable: true
690
632
  });
691
- // TODO: Make this handle body scroll
692
- ResizeAwareComponent.prototype.relativePositionOf = function (point) {
693
- return this.bounds.relativePositionOf(point);
633
+ Activity.prototype.busyWhile = function (busyModel) {
634
+ this._busyModel.setDelegate(busyModel);
694
635
  };
695
- Object.defineProperty(ResizeAwareComponent.prototype, "bounds", {
636
+ Activity.prototype.isBusy = function () {
637
+ return this._busyModel.value;
638
+ };
639
+ Activity.prototype.isInitialised = function () {
640
+ return !!this._activityContext;
641
+ };
642
+ __decorate([
643
+ core.HostBinding('class'),
644
+ __metadata("design:type", Object)
645
+ ], Activity.prototype, "class", void 0);
646
+ return Activity;
647
+ }(DisposableComponent));
648
+
649
+ var AlertDialogComponent = /** @class */ (function (_super) {
650
+ __extends(AlertDialogComponent, _super);
651
+ function AlertDialogComponent(alert) {
652
+ var _this = _super.call(this) || this;
653
+ _this.alert = alert;
654
+ return _this;
655
+ }
656
+ AlertDialogComponent.prototype.ngOnInit = function () {
657
+ };
658
+ AlertDialogComponent.ctorParameters = function () { return [
659
+ { type: undefined, decorators: [{ type: core.Inject, args: [ACTIVITY_DATA,] }] }
660
+ ]; };
661
+ AlertDialogComponent = __decorate([
662
+ core.Component({
663
+ selector: 'aup-alert-dialog',
664
+ 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<div matDialogActions>\n <button mat-raised-button color=\"primary\" (click)=\"done()\" data-cy=\"close-button\">{{alert.ok()}}</button>\n</div>\n",
665
+ styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]
666
+ }),
667
+ __param(0, core.Inject(ACTIVITY_DATA)),
668
+ __metadata("design:paramtypes", [Object])
669
+ ], AlertDialogComponent);
670
+ return AlertDialogComponent;
671
+ }(Activity));
672
+
673
+ var ConfirmThenDialogComponent = /** @class */ (function (_super) {
674
+ __extends(ConfirmThenDialogComponent, _super);
675
+ function ConfirmThenDialogComponent(config) {
676
+ var _this = _super.call(this) || this;
677
+ _this.config = config;
678
+ pectin.assert.notNil(config);
679
+ return _this;
680
+ }
681
+ ConfirmThenDialogComponent.prototype.ngOnInit = function () {
682
+ };
683
+ Object.defineProperty(ConfirmThenDialogComponent.prototype, "confirm", {
696
684
  get: function () {
697
- return this._boundsModel.value;
685
+ return this.config.confirm;
698
686
  },
699
687
  enumerable: true,
700
688
  configurable: true
701
689
  });
702
- ResizeAwareComponent.prototype.updateBounds = function () {
703
- this._boundsModel.value = exports.Bounds.ofElement(this.nativeElement);
704
- };
705
- ResizeAwareComponent.ctorParameters = function () { return [
706
- { type: core.ElementRef },
707
- { type: core.NgZone }
708
- ]; };
709
- ResizeAwareComponent = __decorate([
710
- core.Directive(),
711
- __metadata("design:paramtypes", [core.ElementRef, core.NgZone])
712
- ], ResizeAwareComponent);
713
- return ResizeAwareComponent;
714
- }(DisposableComponent));
715
-
716
- /**
717
- * @example
718
- * // CSS Vars
719
- * aup-card-container {
720
- * --card-gap: var(--card-gap, 16px);
721
- * --card-width: var(--card-width, 300px);
722
- * --card-height: var(--card-height, auto);
723
- * --card-min-height: var(--card-min-height, auto);
724
- * --card-background: var(--card-background, #fcfcfb);
725
- * }
726
- *
727
- * // Content Templates:
728
- * #addCardTemplate
729
- * <ng-template #addCardTemplate>
730
- * This is a new card template, it will the the size of the other cards.
731
- * </nav-template>
732
- *
733
- */
734
- var CardContainerComponent = /** @class */ (function (_super) {
735
- __extends(CardContainerComponent, _super);
736
- function CardContainerComponent() {
737
- return _super.call(this) || this;
738
- }
739
- CardContainerComponent.prototype.ngOnInit = function () {
740
- };
741
- __decorate([
742
- core.Input(),
743
- pectin.TrackExternal(),
744
- __metadata("design:type", pectin.Command)
745
- ], CardContainerComponent.prototype, "addCardCommand", void 0);
746
- __decorate([
747
- core.ContentChild("addCardTemplate"),
748
- __metadata("design:type", core.TemplateRef)
749
- ], CardContainerComponent.prototype, "addCardTemplate", void 0);
750
- CardContainerComponent = __decorate([
751
- core.Component({
752
- selector: 'aup-card-container',
753
- template: "<div class=\"card-container\">\n <ng-content></ng-content>\n\n <div class=\"add-card-container\" *ngIf=\"addCardCommand.enabled.value\" [pectinCommand]=\"addCardCommand\">\n <mat-icon>add</mat-icon>\n </div>\n\n <div class=\"add-card-template\" *ngIf=\"addCardTemplate\">\n <ng-container [ngTemplateOutlet]=\"addCardTemplate\"></ng-container>\n </div>\n\n</div>\n",
754
- styles: [":root{--aup-default-padding:var(--default-padding, 18px);--aup-default-background:white}.router-outlet-container>*{position:absolute;top:0;left:0;bottom:0;right:0}[no-tab-header]>mat-tab-header{display:none}[full-height-tabs] .mat-tab-body-wrapper,mat-tab-group.full-height-tabs .mat-tab-body-wrapper{flex:1}[full-height-tabs] .mat-tab-body-wrapper .mat-tab-body-content,[full-height-tabs] .mat-tab-body-wrapper mat-tab-body,mat-tab-group.full-height-tabs .mat-tab-body-wrapper .mat-tab-body-content,mat-tab-group.full-height-tabs .mat-tab-body-wrapper mat-tab-body{display:flex;flex-direction:column;justify-content:stretch}.dialog-interaction-context{max-width:95vw!important;max-height:95vh!important}.dialog-interaction-context mat-dialog-container{max-width:95vw!important;max-height:95vh!important;padding:0}.aup-popup-interaction-panel{background:var(--aup-default-background,#fff);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(.4,0,.2,1)}.aup-input-activity{padding:calc(var(--aup-default-padding)/2)}.aup-input-component{display:block}.aup-input-component input,.aup-input-component mat-form-field{width:100%}.aup-input-component input mat-hint.faux-error,.aup-input-component mat-form-field mat-hint.faux-error{color:#f44336}aup-table-cell-renderer>.aup-input-component .mat-form-field-flex{padding-top:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-infix{width:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-label-wrapper{display:none}aup-table{--default-column-gap:var(--column-gap, 24px)}aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}:host{--resolved-card-gap:var(--card-gap, 16px);--resolved-card-width:var(--card-width, 300px);--resolved-card-height:var(--card-height, auto);--resolved-card-min-height:var(--card-min-height, auto);--resolved-card-background:var(--card-background, #fcfcfb);flex:1;display:block;background:var(--resolved-card-background)}.card-container{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(0,var(--resolved-card-height)));grid-gap:var(--resolved-card-gap);box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap));max-width:100%}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:rgba(255,255,255,.8);transition:280ms cubic-bezier(.4,0,.2,1)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{transition:280ms cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}.add-card-container:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.add-card-template-container{width:var(--resolved-card-width);height:var(--resolved-card-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}"]
755
- }),
756
- __metadata("design:paramtypes", [])
757
- ], CardContainerComponent);
758
- return CardContainerComponent;
759
- }(DisposableComponent));
760
-
761
- var FocusContainerComponent = /** @class */ (function (_super) {
762
- __extends(FocusContainerComponent, _super);
763
- function FocusContainerComponent(focusManager) {
764
- var _this = _super.call(this) || this;
765
- _this.focusManager = focusManager;
766
- _this.restoreFocusCommand = pectin.Command.create(function () {
767
- _this.restoreFocus();
768
- });
769
- _this.tabIndex = -1;
770
- return _this;
771
- }
772
- FocusContainerComponent.prototype.ngOnInit = function () {
773
- };
774
- // @Trace()
775
- FocusContainerComponent.prototype.restoreFocus = function () {
776
- this.focusManager.restoreFocus();
777
- };
778
- FocusContainerComponent.ctorParameters = function () { return [
779
- { type: pectin.FocusManager, decorators: [{ type: core.Self }] }
780
- ]; };
781
- __decorate([
782
- core.HostBinding('attr.tabindex'),
783
- __metadata("design:type", Object)
784
- ], FocusContainerComponent.prototype, "tabIndex", void 0);
785
- FocusContainerComponent = __decorate([
786
- core.Component({
787
- selector: 'aup-focus-container',
788
- template: "<ng-content></ng-content>\n",
789
- providers: [
790
- { provide: pectin.FocusManager }
791
- ],
792
- styles: [":host{display:block}"]
793
- }),
794
- __param(0, core.Self()),
795
- __metadata("design:paramtypes", [pectin.FocusManager])
796
- ], FocusContainerComponent);
797
- return FocusContainerComponent;
798
- }(DisposableComponent));
799
-
800
- var ACTIVITY_DATA = new core.InjectionToken('InteractionActivityData');
801
- var Activity = /** @class */ (function (_super) {
802
- __extends(Activity, _super);
803
- function Activity() {
804
- var _this = _super !== null && _super.apply(this, arguments) || this;
805
- _this._busyModel = new pectin.DelegatingValueModel().withDefault(false);
806
- _this.class = 'aup-activity';
807
- return _this;
808
- }
809
- Activity.prototype.initialise = function (nestedInteractionContext, activityContext) {
810
- typescriptUtilities.assert.isNil(this._activityContext);
811
- this._activityContext = activityContext;
812
- this._interactionContext = nestedInteractionContext;
813
- };
814
- Object.defineProperty(Activity.prototype, "interactionContext", {
815
- get: function () {
816
- typescriptUtilities.assert.isTruthy(this.isInitialised());
817
- return this._interactionContext;
818
- },
819
- enumerable: true,
820
- configurable: true
821
- });
822
- Activity.prototype.done = function (result) {
823
- return this._activityContext.onDone(result);
824
- };
825
- Activity.prototype.cancel = function (error) {
826
- this._activityContext.onCancel(error);
827
- };
828
- // @Trace()
829
- Activity.prototype.onActivityReady = function () {
830
- };
831
- Object.defineProperty(Activity.prototype, "busy", {
832
- get: function () {
833
- return this._busyModel.readonly;
834
- },
835
- enumerable: true,
836
- configurable: true
837
- });
838
- Activity.prototype.busyWhile = function (busyModel) {
839
- this._busyModel.setDelegate(busyModel);
840
- };
841
- Activity.prototype.isBusy = function () {
842
- return this._busyModel.value;
843
- };
844
- Activity.prototype.isInitialised = function () {
845
- return !!this._activityContext;
846
- };
847
- __decorate([
848
- core.HostBinding('class'),
849
- __metadata("design:type", Object)
850
- ], Activity.prototype, "class", void 0);
851
- return Activity;
852
- }(DisposableComponent));
853
-
854
- var AlertDialogComponent = /** @class */ (function (_super) {
855
- __extends(AlertDialogComponent, _super);
856
- function AlertDialogComponent(alert) {
857
- var _this = _super.call(this) || this;
858
- _this.alert = alert;
859
- return _this;
860
- }
861
- AlertDialogComponent.prototype.ngOnInit = function () {
862
- };
863
- AlertDialogComponent.ctorParameters = function () { return [
864
- { type: undefined, decorators: [{ type: core.Inject, args: [ACTIVITY_DATA,] }] }
865
- ]; };
866
- AlertDialogComponent = __decorate([
867
- core.Component({
868
- selector: 'aup-alert-dialog',
869
- 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<div matDialogActions>\n <button mat-raised-button color=\"primary\" (click)=\"done()\" data-cy=\"close-button\">{{alert.ok()}}</button>\n</div>\n",
870
- styles: [":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]
871
- }),
872
- __param(0, core.Inject(ACTIVITY_DATA)),
873
- __metadata("design:paramtypes", [Object])
874
- ], AlertDialogComponent);
875
- return AlertDialogComponent;
876
- }(Activity));
877
-
878
- var ConfirmThenDialogComponent = /** @class */ (function (_super) {
879
- __extends(ConfirmThenDialogComponent, _super);
880
- function ConfirmThenDialogComponent(config) {
881
- var _this = _super.call(this) || this;
882
- _this.config = config;
883
- pectin.assert.notNil(config);
884
- return _this;
885
- }
886
- ConfirmThenDialogComponent.prototype.ngOnInit = function () {
887
- };
888
- Object.defineProperty(ConfirmThenDialogComponent.prototype, "confirm", {
889
- get: function () {
890
- return this.config.confirm;
891
- },
892
- enumerable: true,
893
- configurable: true
894
- });
895
- ConfirmThenDialogComponent.prototype.isDestructive = function () {
896
- return this.confirm.destructive && this.confirm.destructive();
690
+ ConfirmThenDialogComponent.prototype.isDestructive = function () {
691
+ return this.confirm.destructive && this.confirm.destructive();
897
692
  };
898
693
  ConfirmThenDialogComponent.prototype.onConfirm = function () {
899
694
  var _this = this;
@@ -1822,78 +1617,282 @@
1822
1617
  return InteractionContextTriggerFor;
1823
1618
  }(pectin.GarbageCollector));
1824
1619
 
1825
- var DialogInteractionContext = /** @class */ (function (_super) {
1826
- __extends(DialogInteractionContext, _super);
1827
- function DialogInteractionContext(identifier, api, dialogService, config) {
1828
- var _this = _super.call(this) || this;
1829
- _this.identifier = identifier;
1830
- _this.api = api;
1831
- _this.dialogService = dialogService;
1832
- _this.config = config;
1833
- _this.garbage = new pectin.GarbageCollector();
1834
- typescriptUtilities.assert.notNil(dialogService);
1835
- return _this;
1836
- }
1837
- DialogInteractionContext.prototype.cancelActiveActivity = function () {
1838
- return this.activityContainer.cancelActiveActivity();
1839
- };
1840
- DialogInteractionContext.prototype.dispose = function () {
1841
- if (this.isActive()) {
1842
- pectin.lang.illegalState('Dispose called while active.');
1843
- }
1844
- this.garbage.dispose();
1845
- };
1846
- DialogInteractionContext.prototype.registerDisposable = function (disposable) {
1847
- return this.garbage.registerDisposable(disposable);
1848
- };
1849
- DialogInteractionContext.prototype.isActive = function () {
1850
- return !!this.activityContainer && this.activityContainer.isActive();
1851
- };
1852
- DialogInteractionContext.prototype.createAndLaunchActivity = function (activityType, data, disableClose) {
1853
- var _this = this;
1854
- typescriptUtilities.assert.isNil(this._currentActivityRef);
1855
- var config = __assign(__assign({}, this.config), {
1856
- disableClose: disableClose,
1857
- panelClass: 'dialog-interaction-context'
1858
- });
1859
- var self = this;
1860
- var matDialogRef = this.dialogService.open(ActivityContainerComponent, config);
1861
- var activityContainer = this.activityContainer = matDialogRef.componentInstance;
1862
- this.activityContainer.initialise(this.identifier, this.api);
1863
- var activityResult = this.activityContainer.startActivity(activityType, data);
1864
- activityResult.finally(function () { return matDialogRef.close(); });
1865
- // we need to check if our onDone/onCancel methods above we called or if we were
1866
- // closed by the user clicking the backdrop. If the later then we need to cancel our
1867
- // activity.
1868
- matDialogRef.afterClosed().subscribe(function (promiseAlreadyFinished) {
1869
- if (activityContainer.isActive()) {
1870
- activityContainer.cancelActiveActivity();
1871
- }
1872
- _this.activityContainer = null;
1873
- });
1874
- matDialogRef.updateSize();
1875
- matDialogRef.afterOpened().subscribe(function (promiseAlreadyFinished) {
1876
- matDialogRef.updateSize();
1877
- });
1878
- return activityResult;
1879
- };
1880
- return DialogInteractionContext;
1881
- }(AbstractInteractionContext));
1882
-
1883
- var DIALOG_INTERACTION_SERVICE_DEFAULTS = new core.InjectionToken('DIALOG_INTERACTION_SERVICE_DEFAULTS');
1884
- var DialogInteractionContextFactory = /** @class */ (function (_super) {
1885
- __extends(DialogInteractionContextFactory, _super);
1886
- function DialogInteractionContextFactory(dialogService, dialogServiceDefaults, matDialogDefaultConfig) {
1887
- var _this = _super.call(this) || this;
1888
- _this.dialogService = dialogService;
1889
- _this.dialogServiceDefaults = dialogServiceDefaults;
1890
- _this.matDialogDefaultConfig = matDialogDefaultConfig;
1891
- typescriptUtilities.assert.notNil(dialogService);
1892
- return _this;
1620
+ var InteractionModule = /** @class */ (function () {
1621
+ function InteractionModule() {
1893
1622
  }
1894
- DialogInteractionContextFactory.prototype.createInteractionContext = function (identifier, api) {
1895
- var config = __assign(__assign({ autoFocus: false, hasBackdrop: true, closeOnNavigation: false }, this.matDialogDefaultConfig), this.dialogServiceDefaults);
1896
- return new DialogInteractionContext(identifier, api, this.dialogService, config);
1623
+ InteractionModule = __decorate([
1624
+ core.NgModule({
1625
+ imports: [
1626
+ common.CommonModule,
1627
+ button.MatButtonModule,
1628
+ dialog.MatDialogModule,
1629
+ tabs.MatTabsModule,
1630
+ portal.PortalModule,
1631
+ router.RouterModule,
1632
+ icon.MatIconModule,
1633
+ DirectivesModule,
1634
+ flexLayout.FlexModule,
1635
+ flexLayout.GridModule
1636
+ ],
1637
+ declarations: [
1638
+ ActivityContainerComponent,
1639
+ ConfirmationDialogComponent,
1640
+ ConfirmThenDialogComponent,
1641
+ AlertDialogComponent,
1642
+ ActivityOutletComponent,
1643
+ InPlaceInteractionContextComponent,
1644
+ AddItemInteractionContextComponent,
1645
+ ActivityActionsComponent,
1646
+ PopupInteractionContextComponent,
1647
+ InteractionContextTriggerFor
1648
+ ],
1649
+ exports: [
1650
+ ActivityContainerComponent,
1651
+ ActivityOutletComponent,
1652
+ InPlaceInteractionContextComponent,
1653
+ AddItemInteractionContextComponent,
1654
+ ActivityActionsComponent,
1655
+ PopupInteractionContextComponent,
1656
+ InteractionContextTriggerFor
1657
+ ],
1658
+ entryComponents: [
1659
+ ActivityContainerComponent,
1660
+ ConfirmationDialogComponent,
1661
+ ConfirmThenDialogComponent,
1662
+ AlertDialogComponent
1663
+ ],
1664
+ providers: [
1665
+ exports.ɵbw
1666
+ // {
1667
+ // provide: MAT_TABS_CONFIG, useValue: { animationDuration: "2s" }
1668
+ // }
1669
+ ]
1670
+ })
1671
+ ], InteractionModule);
1672
+ return InteractionModule;
1673
+ }());
1674
+
1675
+ /**
1676
+ * @example
1677
+ * // CSS Vars
1678
+ * aup-card-container {
1679
+ * --card-gap: var(--card-gap, 16px);
1680
+ * --card-width: var(--card-width, 300px);
1681
+ * --card-height: var(--card-height, auto);
1682
+ * --card-min-height: var(--card-min-height, auto);
1683
+ * --card-background: var(--card-background, #fcfcfb);
1684
+ * }
1685
+ *
1686
+ * // Content Templates:
1687
+ * #addCardTemplate
1688
+ * <ng-template #addCardTemplate>
1689
+ * This is a new card template, it will the the size of the other cards.
1690
+ * </nav-template>
1691
+ *
1692
+ */
1693
+ var CardContainerComponent = /** @class */ (function (_super) {
1694
+ __extends(CardContainerComponent, _super);
1695
+ function CardContainerComponent() {
1696
+ return _super.call(this) || this;
1697
+ }
1698
+ CardContainerComponent.prototype.ngOnInit = function () {
1699
+ };
1700
+ __decorate([
1701
+ core.Input(),
1702
+ pectin.TrackExternal(),
1703
+ __metadata("design:type", pectin.Command)
1704
+ ], CardContainerComponent.prototype, "addCardCommand", void 0);
1705
+ __decorate([
1706
+ core.ContentChild("addCardTemplate"),
1707
+ __metadata("design:type", core.TemplateRef)
1708
+ ], CardContainerComponent.prototype, "addCardTemplate", void 0);
1709
+ CardContainerComponent = __decorate([
1710
+ core.Component({
1711
+ selector: 'aup-card-container',
1712
+ template: "<div class=\"card-container\">\n <ng-content></ng-content>\n\n <div class=\"add-card-container\" *ngIf=\"addCardCommand.enabled.value\" [pectinCommand]=\"addCardCommand\">\n <mat-icon>add</mat-icon>\n </div>\n\n <div class=\"add-card-template\" *ngIf=\"addCardTemplate\">\n <ng-container [ngTemplateOutlet]=\"addCardTemplate\"></ng-container>\n </div>\n\n</div>\n",
1713
+ styles: [":root{--aup-default-padding:var(--default-padding, 18px);--aup-default-background:white}.router-outlet-container>*{position:absolute;top:0;left:0;bottom:0;right:0}[no-tab-header]>mat-tab-header{display:none}[full-height-tabs] .mat-tab-body-wrapper,mat-tab-group.full-height-tabs .mat-tab-body-wrapper{flex:1}[full-height-tabs] .mat-tab-body-wrapper .mat-tab-body-content,[full-height-tabs] .mat-tab-body-wrapper mat-tab-body,mat-tab-group.full-height-tabs .mat-tab-body-wrapper .mat-tab-body-content,mat-tab-group.full-height-tabs .mat-tab-body-wrapper mat-tab-body{display:flex;flex-direction:column;justify-content:stretch}.dialog-interaction-context{max-width:95vw!important;max-height:95vh!important}.dialog-interaction-context mat-dialog-container{max-width:95vw!important;max-height:95vh!important;padding:0}.aup-popup-interaction-panel{background:var(--aup-default-background,#fff);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow 280ms cubic-bezier(.4,0,.2,1)}.aup-input-activity{padding:calc(var(--aup-default-padding)/2)}.aup-input-component{display:block}.aup-input-component input,.aup-input-component mat-form-field{width:100%}.aup-input-component input mat-hint.faux-error,.aup-input-component mat-form-field mat-hint.faux-error{color:#f44336}aup-table-cell-renderer>.aup-input-component .mat-form-field-flex{padding-top:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-infix{width:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-label-wrapper{display:none}aup-table{--default-column-gap:var(--column-gap, 24px)}aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}:host{--resolved-card-gap:var(--card-gap, 16px);--resolved-card-width:var(--card-width, 300px);--resolved-card-height:var(--card-height, auto);--resolved-card-min-height:var(--card-min-height, auto);--resolved-card-background:var(--card-background, #fcfcfb);flex:1;display:block;background:var(--resolved-card-background)}.card-container{display:-ms-grid;display:grid;grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(0,var(--resolved-card-height)));grid-gap:var(--resolved-card-gap);box-sizing:border-box;padding:var(--resolved-card-gap);min-height:calc(var(--resolved-card-height) + 2 * var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2 * var(--resolved-card-gap));width:calc((var(--resolved-card-width) + var(--resolved-card-gap)) * 2 + var(--grid-gap));max-width:100%}.add-card-container{width:var(--resolved-card-width);height:var(--resolved-card-height);min-height:var(--resolved-card-min-height);display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;border:2px dashed rgba(0,0,0,.1);border-radius:6px;font-weight:300;cursor:pointer;color:rgba(0,0,0,.54);background-color:rgba(255,255,255,.8);transition:280ms cubic-bezier(.4,0,.2,1)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{transition:280ms cubic-bezier(.4,0,.2,1);border-color:transparent;background-color:#fff;color:rgba(0,0,0,.54)}.add-card-container:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.add-card-template-container{width:var(--resolved-card-width);height:var(--resolved-card-height);display:flex;flex-direction:column;align-items:stretch;justify-content:stretch}"]
1714
+ }),
1715
+ __metadata("design:paramtypes", [])
1716
+ ], CardContainerComponent);
1717
+ return CardContainerComponent;
1718
+ }(DisposableComponent));
1719
+
1720
+ var FocusContainerComponent = /** @class */ (function (_super) {
1721
+ __extends(FocusContainerComponent, _super);
1722
+ function FocusContainerComponent(focusManager) {
1723
+ var _this = _super.call(this) || this;
1724
+ _this.focusManager = focusManager;
1725
+ _this.restoreFocusCommand = pectin.Command.create(function () {
1726
+ _this.restoreFocus();
1727
+ });
1728
+ _this.tabIndex = -1;
1729
+ return _this;
1730
+ }
1731
+ FocusContainerComponent.prototype.ngOnInit = function () {
1732
+ };
1733
+ // @Trace()
1734
+ FocusContainerComponent.prototype.restoreFocus = function () {
1735
+ this.focusManager.restoreFocus();
1736
+ };
1737
+ FocusContainerComponent.ctorParameters = function () { return [
1738
+ { type: pectin.FocusManager, decorators: [{ type: core.Self }] }
1739
+ ]; };
1740
+ __decorate([
1741
+ core.HostBinding('attr.tabindex'),
1742
+ __metadata("design:type", Object)
1743
+ ], FocusContainerComponent.prototype, "tabIndex", void 0);
1744
+ FocusContainerComponent = __decorate([
1745
+ core.Component({
1746
+ selector: 'aup-focus-container',
1747
+ template: "<ng-content></ng-content>\n",
1748
+ providers: [
1749
+ { provide: pectin.FocusManager }
1750
+ ],
1751
+ styles: [":host{display:block}"]
1752
+ }),
1753
+ __param(0, core.Self()),
1754
+ __metadata("design:paramtypes", [pectin.FocusManager])
1755
+ ], FocusContainerComponent);
1756
+ return FocusContainerComponent;
1757
+ }(DisposableComponent));
1758
+
1759
+ var FocusableComponent = /** @class */ (function (_super) {
1760
+ __extends(FocusableComponent, _super);
1761
+ function FocusableComponent(el, focusManager, focusBindingFactory) {
1762
+ var _this = _super.call(this) || this;
1763
+ _this.el = el;
1764
+ _this.focusManager = focusManager;
1765
+ 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;
1766
+ if (_this.focusManager) {
1767
+ _this._focusContext = _this.focusManager.registerFocusable(_this);
1768
+ _this.registerDisposable(_this._focusContext);
1769
+ _this.registerDisposable(focusBindingFactory.createBinding(el.nativeElement, _this.focusContext));
1770
+ }
1771
+ return _this;
1772
+ }
1773
+ Object.defineProperty(FocusableComponent.prototype, "focusable", {
1774
+ get: function () {
1775
+ return !!this.focusContext ? 0 : undefined;
1776
+ },
1777
+ enumerable: true,
1778
+ configurable: true
1779
+ });
1780
+ FocusableComponent.prototype.onFocus = function () {
1781
+ var _a;
1782
+ (_a = this.focusContext) === null || _a === void 0 ? void 0 : _a.notifyFocusIn();
1783
+ };
1784
+ FocusableComponent.prototype.onBlur = function () {
1785
+ var _a;
1786
+ (_a = this.focusContext) === null || _a === void 0 ? void 0 : _a.notifyFocusOut();
1787
+ };
1788
+ Object.defineProperty(FocusableComponent.prototype, "focusContext", {
1789
+ get: function () {
1790
+ return this._focusContext;
1791
+ },
1792
+ enumerable: true,
1793
+ configurable: true
1794
+ });
1795
+ FocusableComponent.ctorParameters = function () { return [
1796
+ { type: core.ElementRef },
1797
+ { type: pectin.FocusManager },
1798
+ { type: FocusBindingFactory }
1799
+ ]; };
1800
+ __decorate([
1801
+ core.HostBinding('attr.tabindex'),
1802
+ __metadata("design:type", Object),
1803
+ __metadata("design:paramtypes", [])
1804
+ ], FocusableComponent.prototype, "focusable", null);
1805
+ __decorate([
1806
+ core.HostListener('focus'),
1807
+ __metadata("design:type", Function),
1808
+ __metadata("design:paramtypes", []),
1809
+ __metadata("design:returntype", void 0)
1810
+ ], FocusableComponent.prototype, "onFocus", null);
1811
+ __decorate([
1812
+ core.HostListener('blur'),
1813
+ __metadata("design:type", Function),
1814
+ __metadata("design:paramtypes", []),
1815
+ __metadata("design:returntype", void 0)
1816
+ ], FocusableComponent.prototype, "onBlur", null);
1817
+ FocusableComponent = __decorate([
1818
+ core.Component({ template: '' }),
1819
+ __metadata("design:paramtypes", [core.ElementRef, pectin.FocusManager, FocusBindingFactory])
1820
+ ], FocusableComponent);
1821
+ return FocusableComponent;
1822
+ }(DisposableComponent));
1823
+
1824
+ var DialogInteractionContext = /** @class */ (function (_super) {
1825
+ __extends(DialogInteractionContext, _super);
1826
+ function DialogInteractionContext(identifier, api, dialogService, config) {
1827
+ var _this = _super.call(this) || this;
1828
+ _this.identifier = identifier;
1829
+ _this.api = api;
1830
+ _this.dialogService = dialogService;
1831
+ _this.config = config;
1832
+ _this.garbage = new pectin.GarbageCollector();
1833
+ typescriptUtilities.assert.notNil(dialogService);
1834
+ return _this;
1835
+ }
1836
+ DialogInteractionContext.prototype.cancelActiveActivity = function () {
1837
+ return this.activityContainer.cancelActiveActivity();
1838
+ };
1839
+ DialogInteractionContext.prototype.dispose = function () {
1840
+ if (this.isActive()) {
1841
+ pectin.lang.illegalState('Dispose called while active.');
1842
+ }
1843
+ this.garbage.dispose();
1844
+ };
1845
+ DialogInteractionContext.prototype.registerDisposable = function (disposable) {
1846
+ return this.garbage.registerDisposable(disposable);
1847
+ };
1848
+ DialogInteractionContext.prototype.isActive = function () {
1849
+ return !!this.activityContainer && this.activityContainer.isActive();
1850
+ };
1851
+ DialogInteractionContext.prototype.createAndLaunchActivity = function (activityType, data, disableClose) {
1852
+ var _this = this;
1853
+ typescriptUtilities.assert.isNil(this._currentActivityRef);
1854
+ var config = __assign(__assign({}, this.config), {
1855
+ disableClose: disableClose,
1856
+ panelClass: 'dialog-interaction-context'
1857
+ });
1858
+ var self = this;
1859
+ var matDialogRef = this.dialogService.open(ActivityContainerComponent, config);
1860
+ var activityContainer = this.activityContainer = matDialogRef.componentInstance;
1861
+ this.activityContainer.initialise(this.identifier, this.api);
1862
+ var activityResult = this.activityContainer.startActivity(activityType, data);
1863
+ activityResult.finally(function () { return matDialogRef.close(); });
1864
+ // we need to check if our onDone/onCancel methods above we called or if we were
1865
+ // closed by the user clicking the backdrop. If the later then we need to cancel our
1866
+ // activity.
1867
+ matDialogRef.afterClosed().subscribe(function (promiseAlreadyFinished) {
1868
+ if (activityContainer.isActive()) {
1869
+ activityContainer.cancelActiveActivity();
1870
+ }
1871
+ _this.activityContainer = null;
1872
+ });
1873
+ matDialogRef.updateSize();
1874
+ matDialogRef.afterOpened().subscribe(function (promiseAlreadyFinished) {
1875
+ matDialogRef.updateSize();
1876
+ });
1877
+ return activityResult;
1878
+ };
1879
+ return DialogInteractionContext;
1880
+ }(AbstractInteractionContext));
1881
+
1882
+ var DIALOG_INTERACTION_SERVICE_DEFAULTS = new core.InjectionToken('DIALOG_INTERACTION_SERVICE_DEFAULTS');
1883
+ var DialogInteractionContextFactory = /** @class */ (function (_super) {
1884
+ __extends(DialogInteractionContextFactory, _super);
1885
+ function DialogInteractionContextFactory(dialogService, dialogServiceDefaults, matDialogDefaultConfig) {
1886
+ var _this = _super.call(this) || this;
1887
+ _this.dialogService = dialogService;
1888
+ _this.dialogServiceDefaults = dialogServiceDefaults;
1889
+ _this.matDialogDefaultConfig = matDialogDefaultConfig;
1890
+ typescriptUtilities.assert.notNil(dialogService);
1891
+ return _this;
1892
+ }
1893
+ DialogInteractionContextFactory.prototype.createInteractionContext = function (identifier, api) {
1894
+ var config = __assign(__assign({ autoFocus: false, hasBackdrop: true, closeOnNavigation: false }, this.matDialogDefaultConfig), this.dialogServiceDefaults);
1895
+ return new DialogInteractionContext(identifier, api, this.dialogService, config);
1897
1896
  };
1898
1897
  DialogInteractionContextFactory.ctorParameters = function () { return [
1899
1898
  { type: dialog.MatDialog },
@@ -2495,285 +2494,98 @@
2495
2494
  }
2496
2495
  };
2497
2496
  SwitchCaseComponent.ctorParameters = function () { return [
2498
- { type: core.ChangeDetectorRef }
2499
- ]; };
2500
- __decorate([
2501
- core.Input(), pectin.TrackExternal(),
2502
- __metadata("design:type", pectin.ValueModel)
2503
- ], SwitchCaseComponent.prototype, "switchModel", void 0);
2504
- __decorate([
2505
- core.Input(), pectin.StoreInValueModel('switchModel'),
2506
- __metadata("design:type", Object)
2507
- ], SwitchCaseComponent.prototype, "switch", void 0);
2508
- __decorate([
2509
- core.ContentChildren(SwitchCaseOption),
2510
- __metadata("design:type", core.QueryList)
2511
- ], SwitchCaseComponent.prototype, "switchCaseOptions", void 0);
2512
- SwitchCaseComponent = __decorate([
2513
- core.Component({
2514
- selector: 'aup-switch-case',
2515
- template: "<mat-tab-group class=\"content-wrapper\" no-tab-header full-height-tabs [selectedIndex]=\"selectedIndex\">\n <mat-tab *ngFor=\"let option of switchCaseOptions\">\n <ng-template [ngTemplateOutlet]=\"option.templateRef\"></ng-template>\n </mat-tab>\n</mat-tab-group>\n\n\n",
2516
- styles: [":host{display:flex;flex-direction:column;align-items:stretch}mat-tab-group{flex:1}"]
2517
- }),
2518
- __metadata("design:paramtypes", [core.ChangeDetectorRef])
2519
- ], SwitchCaseComponent);
2520
- return SwitchCaseComponent;
2521
- }(DisposableComponent));
2522
-
2523
- var DefaultCellRendererComponent = /** @class */ (function () {
2524
- function DefaultCellRendererComponent() {
2525
- }
2526
- Object.defineProperty(DefaultCellRendererComponent.prototype, "value", {
2527
- get: function () {
2528
- return this._value;
2529
- },
2530
- set: function (value) {
2531
- this._value = value;
2532
- },
2533
- enumerable: true,
2534
- configurable: true
2535
- });
2536
- __decorate([
2537
- core.Input(),
2538
- __metadata("design:type", Object),
2539
- __metadata("design:paramtypes", [Object])
2540
- ], DefaultCellRendererComponent.prototype, "value", null);
2541
- DefaultCellRendererComponent = __decorate([
2542
- core.Component({
2543
- selector: 'aup-default-cell-renderer',
2544
- template: "{{value}}\n",
2545
- styles: [""]
2546
- }),
2547
- __metadata("design:paramtypes", [])
2548
- ], DefaultCellRendererComponent);
2549
- return DefaultCellRendererComponent;
2550
- }());
2551
-
2552
- var DefaultHeaderCellRendererComponent = /** @class */ (function () {
2553
- function DefaultHeaderCellRendererComponent() {
2554
- }
2555
- __decorate([
2556
- core.Input(),
2557
- __metadata("design:type", ColumnModel)
2558
- ], DefaultHeaderCellRendererComponent.prototype, "columnModel", void 0);
2559
- DefaultHeaderCellRendererComponent = __decorate([
2560
- core.Component({
2561
- selector: 'aup-default-header-renderer',
2562
- template: "{{columnModel.getHeaderText()}}\n",
2563
- styles: [""]
2564
- }),
2565
- __metadata("design:paramtypes", [])
2566
- ], DefaultHeaderCellRendererComponent);
2567
- return DefaultHeaderCellRendererComponent;
2568
- }());
2569
-
2570
- // export type StringPropertiesOf<T> = { [K in keyof T]: T[K] extends string ? K : never }[keyof T];
2571
- // export type NumberPropertiesOf<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];
2572
- /**
2573
- * Example:
2574
- * @example
2575
- * const model = TableModel.fromList(heroList, table => {
2576
- * table.pluck("firstName");
2577
- * table.pluck("lastName");
2578
- * table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
2579
- * });
2580
- *
2581
- * Editable tables
2582
- * @example
2583
- * const saveCommand = UnaryCommand.create((form: Form<Hero>) => {
2584
- * if (form.validate()) {
2585
- * // normal form save stuff
2586
- * return true; // finish editing
2587
- * }
2588
- * return false; // continue editiing
2589
- * }
2590
- * const colorsNames: ListModel<string> = ...;
2591
- * const model = TableModel.fromList(heroList, table => {
2592
- * table.pluck("firstName").cellEditor(StringInputComponent); <-- interface CellEditor { valueModel: FormValueModel<string> | ValueModel<string>; }
2593
- * table.pluck("lastName").cellEditor(StringInputComponent, {
2594
- * validators: [Validator.present("We need a last name")]
2595
- * });
2596
- * table.pluck("age").cellEditor(NumberInputComponent);
2597
- * table.pluck("favoriteColor").cellEditor(SelectInputComponent, {
2598
- * initialiseComponent(component: SelectInputComponent) {
2599
- * selectInput.optionsModel = colorsNames; // <- initialise our component
2600
- * }
2601
- * });
2602
- * table.addEditControls(saveCommand); // <- required to enable editing
2603
- * });
2604
- *
2605
- * Selection models
2606
- * @example
2607
- * const model = TableModel.fromList(heroList, table => {
2608
- * table.addSelectionColumn(selectionModel); // <- can be single or multiple selection model
2609
- * table.pluck("firstName");
2610
- * table.pluck("lastName");
2611
- * });
2612
- *
2613
- * Custom cell renderers and editors
2614
- * @example
2615
- * const model = TableModel.fromList(heroList, table => {
2616
- * table.pluck("favoriteColor")
2617
- * .cellHeaderRenderer(CellHeaderRendererComponent, (component, column) => {
2618
- * // configure your component with what ever you need.
2619
- * });
2620
- * .cellRenderer(CellRendererComponent) // <-- interface CellEditor { value: string; }
2621
- * .cellEditor(CellEditorComponent.); // <-- interface CellEditor { valueModel: FormValueModel<string> | ValueModel<string>; }
2622
- * table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
2623
- * });
2624
- *
2625
- * I18n
2626
- * @example
2627
- * [table.yml]
2628
- * table:
2629
- * columns(ColumnTextProperties[]):
2630
- * firstName:
2631
- * headerText: "First Name"
2632
- * fullName:
2633
- * headerText: "Full Name"
2634
- *
2635
- * const model = TableModel.fromList(heroList, table => {
2636
- * table.pluck("favoriteColor").cellRenderer(...).cellEditor(...);
2637
- * table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
2638
- *
2639
- * table.columnTextProperties(I18n.table.columns); // <- configures all columns
2640
- * });
2641
- */
2642
- exports.TableModel = /** @class */ (function () {
2643
- function TableModel(sourceOfTruth) {
2644
- this.sourceOfTruth = sourceOfTruth;
2645
- this._garbage = new pectin.GarbageCollector();
2646
- this._columns = new pectin.MutableListModel();
2647
- this._editorSessions = new pectin.MutableListModel();
2648
- this.identityOf = sourceOfTruth.identityOf;
2649
- var _a = pectin.Dsl.disposeWith(this._garbage), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
2650
- this._columnsById = chain(this._columns).indexBy('columnId');
2651
- this._rowsBeingEdited = new pectin.MutableListModel([], {
2652
- identifiedWith: this.identityOf
2653
- });
2654
- this._editorSessionByRowId = chain(this._editorSessions).indexBy('rowId');
2655
- this.editing = chain(this._editorSessions).count().isGreaterThan(0);
2656
- this.dataSource = chain(this.sourceOfTruth).replaceAll(this.rowsBeingEdited);
2657
- }
2658
- TableModel_1 = TableModel;
2659
- TableModel.fromList = function (sourceOfTruth, builder) {
2660
- var model = new TableModel_1(sourceOfTruth);
2661
- builder(model);
2662
- return model;
2663
- };
2664
- Object.defineProperty(TableModel.prototype, "rowsBeingEdited", {
2665
- get: function () {
2666
- return this._rowsBeingEdited.readonly;
2667
- },
2668
- enumerable: true,
2669
- configurable: true
2670
- });
2671
- TableModel.prototype.getTrackByFunction = function () {
2672
- var _this = this;
2673
- return function (index, item) {
2674
- return _this.identityOf ? _this.identityOf(item) : index;
2675
- };
2676
- };
2677
- Object.defineProperty(TableModel.prototype, "columns", {
2678
- get: function () {
2679
- return this._columns.readonly;
2680
- },
2681
- enumerable: true,
2682
- configurable: true
2683
- });
2684
- TableModel.prototype.pluck = function (property) {
2685
- return this.addColumn(new PropertyColumnModel(property, this));
2686
- };
2687
- TableModel.prototype.addSelectionColumn = function (selectionModel) {
2688
- return this.addColumn(new SelectionColumnModel('selection', this, selectionModel));
2689
- };
2690
- TableModel.prototype.addEditControls = function (saveCommand) {
2691
- this.saveCommand = saveCommand;
2692
- return this.addColumn(new EditorControlColumnModel('editControls', saveCommand, this));
2693
- };
2694
- TableModel.prototype.addCustomColumn = function (columnId, dataAccessor) {
2695
- return this.addColumn(new CustomValueColumnModel(columnId, this, dataAccessor));
2696
- };
2697
- TableModel.prototype.addColumn = function (column) {
2698
- if (this._columnsById.get(column.columnId)) {
2699
- pectin.lang.illegalState("Column with id=" + column.columnId + " already exists");
2700
- }
2701
- else {
2702
- this._columns.push(column);
2703
- }
2704
- return column;
2705
- };
2706
- TableModel.prototype.columnTextProperties = function (columnTextProperties) {
2707
- this._columnTextPropertiesLookup = columnTextProperties;
2708
- };
2709
- TableModel.prototype.getColumnTextProperties = function (column) {
2710
- var factory = this._columnTextPropertiesLookup[column.columnId];
2711
- return factory ? factory() : undefined;
2712
- };
2713
- TableModel.prototype.startEditSession = function (row) {
2714
- var _this = this;
2715
- var rowId = this.identityOf(row);
2716
- if (this._rowsBeingEdited.query().indexOf(row) > -1) {
2717
- return pectin.lang.illegalState("Row with id=" + rowId + " already being edited");
2718
- }
2719
- else {
2720
- var editSession_1 = new TableModel_1.EditSession(rowId, row, this.saveCommand);
2721
- var when = pectin.Dsl.disposeWith(editSession_1).when;
2722
- when.valueOf(editSession_1.rowValueModel).changes(function (editedValue) {
2723
- _this._rowsBeingEdited.replaceOrPush(editedValue);
2724
- }, { initialValue: 'triggerChangeUnlessNil' });
2725
- this._editorSessions.push(editSession_1);
2726
- editSession_1.onDispose(function () {
2727
- _this._rowsBeingEdited.remove(editSession_1.rowValueModel.value);
2728
- _this._editorSessions.remove(editSession_1);
2729
- });
2730
- return editSession_1;
2731
- }
2732
- };
2733
- TableModel.prototype.getEditSessionFor = function (row) {
2734
- return this._editorSessionByRowId.get(this.identityOf(row));
2735
- };
2736
- TableModel.prototype.cancelAllEditorSessions = function () {
2737
- var _this = this;
2738
- this._editorSessions.runInTransaction(function (draft) {
2739
- _this._rowsBeingEdited.runInTransaction(function () {
2740
- draft.value.forEach(function (session) { return session.dispose(); });
2741
- });
2742
- });
2743
- };
2744
- var TableModel_1;
2745
- TableModel.ctorParameters = function () { return [
2746
- { type: pectin.ListModel }
2497
+ { type: core.ChangeDetectorRef }
2747
2498
  ]; };
2748
- TableModel = TableModel_1 = __decorate([
2749
- pectin.TrackExternal.Strategy(new pectin.TrackExternal.OneTimeBinding()),
2750
- __metadata("design:paramtypes", [pectin.ListModel])
2751
- ], TableModel);
2752
- return TableModel;
2499
+ __decorate([
2500
+ core.Input(), pectin.TrackExternal(),
2501
+ __metadata("design:type", pectin.ValueModel)
2502
+ ], SwitchCaseComponent.prototype, "switchModel", void 0);
2503
+ __decorate([
2504
+ core.Input(), pectin.StoreInValueModel('switchModel'),
2505
+ __metadata("design:type", Object)
2506
+ ], SwitchCaseComponent.prototype, "switch", void 0);
2507
+ __decorate([
2508
+ core.ContentChildren(SwitchCaseOption),
2509
+ __metadata("design:type", core.QueryList)
2510
+ ], SwitchCaseComponent.prototype, "switchCaseOptions", void 0);
2511
+ SwitchCaseComponent = __decorate([
2512
+ core.Component({
2513
+ selector: 'aup-switch-case',
2514
+ template: "<mat-tab-group class=\"content-wrapper\" no-tab-header full-height-tabs [selectedIndex]=\"selectedIndex\">\n <mat-tab *ngFor=\"let option of switchCaseOptions\">\n <ng-template [ngTemplateOutlet]=\"option.templateRef\"></ng-template>\n </mat-tab>\n</mat-tab-group>\n\n\n",
2515
+ styles: [":host{display:flex;flex-direction:column;align-items:stretch}mat-tab-group{flex:1}"]
2516
+ }),
2517
+ __metadata("design:paramtypes", [core.ChangeDetectorRef])
2518
+ ], SwitchCaseComponent);
2519
+ return SwitchCaseComponent;
2520
+ }(DisposableComponent));
2521
+
2522
+ var DefaultCellRendererComponent = /** @class */ (function () {
2523
+ function DefaultCellRendererComponent() {
2524
+ }
2525
+ Object.defineProperty(DefaultCellRendererComponent.prototype, "value", {
2526
+ get: function () {
2527
+ return this._value;
2528
+ },
2529
+ set: function (value) {
2530
+ this._value = value;
2531
+ },
2532
+ enumerable: true,
2533
+ configurable: true
2534
+ });
2535
+ __decorate([
2536
+ core.Input(),
2537
+ __metadata("design:type", Object),
2538
+ __metadata("design:paramtypes", [Object])
2539
+ ], DefaultCellRendererComponent.prototype, "value", null);
2540
+ DefaultCellRendererComponent = __decorate([
2541
+ core.Component({
2542
+ selector: 'aup-default-cell-renderer',
2543
+ template: "{{value}}\n",
2544
+ styles: [""]
2545
+ }),
2546
+ __metadata("design:paramtypes", [])
2547
+ ], DefaultCellRendererComponent);
2548
+ return DefaultCellRendererComponent;
2753
2549
  }());
2754
- (function (TableModel) {
2755
- var EditSession = /** @class */ (function (_super) {
2756
- __extends(EditSession, _super);
2757
- function EditSession(rowId, row, saveCommand) {
2758
- var _this = _super.call(this) || this;
2759
- _this.rowId = rowId;
2760
- _this.saveCommand = saveCommand;
2761
- _this._editorValue = new pectin.MutableValueModel();
2762
- _this.rowValueModel = _this._editorValue.readonly;
2763
- _this.form = new pectin.Form();
2764
- _this.form.load(row);
2765
- _this._editorValue.value = row;
2766
- _this.form.onEdit(function () {
2767
- _this._editorValue.value = produce(_this._editorValue.value, function (draft) {
2768
- _this.form.writeDirtyStateTo(draft);
2769
- });
2550
+
2551
+ var DefaultHeaderCellRendererComponent = /** @class */ (function () {
2552
+ function DefaultHeaderCellRendererComponent() {
2553
+ }
2554
+ __decorate([
2555
+ core.Input(),
2556
+ __metadata("design:type", String)
2557
+ ], DefaultHeaderCellRendererComponent.prototype, "headerText", void 0);
2558
+ DefaultHeaderCellRendererComponent = __decorate([
2559
+ core.Component({
2560
+ selector: 'aup-default-header-renderer',
2561
+ template: "{{headerText}}\n",
2562
+ styles: [""]
2563
+ }),
2564
+ __metadata("design:paramtypes", [])
2565
+ ], DefaultHeaderCellRendererComponent);
2566
+ return DefaultHeaderCellRendererComponent;
2567
+ }());
2568
+
2569
+ var EditSession = /** @class */ (function (_super) {
2570
+ __extends(EditSession, _super);
2571
+ function EditSession(rowId, row, saveCommand) {
2572
+ var _this = _super.call(this) || this;
2573
+ _this.rowId = rowId;
2574
+ _this.saveCommand = saveCommand;
2575
+ _this._editorValue = new pectin.MutableValueModel();
2576
+ _this.rowValueModel = _this._editorValue.readonly;
2577
+ _this.form = new pectin.Form();
2578
+ _this.form.load(row);
2579
+ _this._editorValue.value = row;
2580
+ _this.form.onEdit(function () {
2581
+ _this._editorValue.value = produce(_this._editorValue.value, function (draft) {
2582
+ _this.form.writeDirtyStateTo(draft);
2770
2583
  });
2771
- return _this;
2772
- }
2773
- return EditSession;
2774
- }(pectin.GarbageCollector));
2775
- TableModel.EditSession = EditSession;
2776
- })(exports.TableModel || (exports.TableModel = {}));
2584
+ });
2585
+ return _this;
2586
+ }
2587
+ return EditSession;
2588
+ }(pectin.GarbageCollector));
2777
2589
 
2778
2590
  var EditRowControls = /** @class */ (function (_super) {
2779
2591
  __extends(EditRowControls, _super);
@@ -2813,7 +2625,7 @@
2813
2625
  ], EditRowControls.prototype, "editRowCommand", void 0);
2814
2626
  __decorate([
2815
2627
  core.Input(),
2816
- __metadata("design:type", exports.TableModel.EditSession)
2628
+ __metadata("design:type", EditSession)
2817
2629
  ], EditRowControls.prototype, "editSession", void 0);
2818
2630
  EditRowControls = __decorate([
2819
2631
  core.Component({
@@ -2903,7 +2715,7 @@
2903
2715
  this.columnId = columnId;
2904
2716
  this.defaults = defaults;
2905
2717
  this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, function (component, column) {
2906
- component.columnModel = column;
2718
+ component.headerText = column.getHeaderText();
2907
2719
  });
2908
2720
  }
2909
2721
  ColumnModel.prototype.getHeaderText = function () {
@@ -2931,6 +2743,7 @@
2931
2743
  portal: new portal.ComponentPortal(cellRenderer),
2932
2744
  initialiseComponent: initialiser
2933
2745
  };
2746
+ return this;
2934
2747
  };
2935
2748
  ColumnModel.prototype.setCellEditor = function (cellEditor) {
2936
2749
  this._cellEditorConfig = cellEditor;
@@ -2988,14 +2801,16 @@
2988
2801
  function PropertyColumnModel(property, defaults) {
2989
2802
  var _this = _super.call(this, property.toString(), defaults) || this;
2990
2803
  _this.property = property;
2804
+ _this._format = function (value) { return value; };
2991
2805
  _this.cellRenderer(DefaultCellRendererComponent);
2992
2806
  return _this;
2993
2807
  }
2994
2808
  PropertyColumnModel.prototype.cellRenderer = function (componentType) {
2995
2809
  var _this = this;
2996
2810
  this.setCellRenderer(componentType, function (component, row) {
2997
- component.value = row[_this.property];
2811
+ component.value = _this._format(row[_this.property]);
2998
2812
  });
2813
+ return this;
2999
2814
  };
3000
2815
  PropertyColumnModel.prototype.cellEditor = function (editor, options) {
3001
2816
  var _this = this;
@@ -3014,6 +2829,11 @@
3014
2829
  });
3015
2830
  return this;
3016
2831
  };
2832
+ PropertyColumnModel.prototype.format = function (formatter) {
2833
+ typescriptUtilities.assert.isFunction(formatter);
2834
+ this._format = formatter;
2835
+ return this;
2836
+ };
3017
2837
  return PropertyColumnModel;
3018
2838
  }(ColumnModel));
3019
2839
  var CustomValueColumnModel = /** @class */ (function (_super) {
@@ -3029,6 +2849,7 @@
3029
2849
  this.setCellRenderer(componentType, function (component, row) {
3030
2850
  component.value = _this.getValue(row);
3031
2851
  });
2852
+ return this;
3032
2853
  };
3033
2854
  return CustomValueColumnModel;
3034
2855
  }(ColumnModel));
@@ -3045,6 +2866,7 @@
3045
2866
  component.editSession = editSession;
3046
2867
  component.editRowCommand = editRowCommand;
3047
2868
  });
2869
+ return this;
3048
2870
  };
3049
2871
  EditorControlColumnModel.prototype.getDefaultHeaderText = function () {
3050
2872
  return '';
@@ -3067,17 +2889,202 @@
3067
2889
  component.selectionModel = selectionModel;
3068
2890
  });
3069
2891
  }
3070
- _this.setCellRenderer(SelectCellRendererComponent, function (component, row, editRowCommand, editSession) {
3071
- component.row = row;
3072
- component.selectionModel = selectionModel;
2892
+ _this.setCellRenderer(SelectCellRendererComponent, function (component, row, editRowCommand, editSession) {
2893
+ component.row = row;
2894
+ component.selectionModel = selectionModel;
2895
+ });
2896
+ return _this;
2897
+ }
2898
+ SelectionColumnModel.prototype.getDefaultHeaderText = function () {
2899
+ return '';
2900
+ };
2901
+ return SelectionColumnModel;
2902
+ }(ColumnModel));
2903
+
2904
+ // export type StringPropertiesOf<T> = { [K in keyof T]: T[K] extends string ? K : never }[keyof T];
2905
+ // export type NumberPropertiesOf<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];
2906
+ /**
2907
+ * Example:
2908
+ * @example
2909
+ * const model = TableModel.fromList(heroList, table => {
2910
+ * table.pluck("firstName");
2911
+ * table.pluck("lastName");
2912
+ * table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
2913
+ * });
2914
+ *
2915
+ * Editable tables
2916
+ * @example
2917
+ * const saveCommand = UnaryCommand.create((form: Form<Hero>) => {
2918
+ * if (form.validate()) {
2919
+ * // normal form save stuff
2920
+ * return true; // finish editing
2921
+ * }
2922
+ * return false; // continue editiing
2923
+ * }
2924
+ * const colorsNames: ListModel<string> = ...;
2925
+ * const model = TableModel.fromList(heroList, table => {
2926
+ * table.pluck("firstName").cellEditor(StringInputComponent); <-- interface CellEditor { valueModel: FormValueModel<string> | ValueModel<string>; }
2927
+ * table.pluck("lastName").cellEditor(StringInputComponent, {
2928
+ * validators: [Validator.present("We need a last name")]
2929
+ * });
2930
+ * table.pluck("age").cellEditor(NumberInputComponent);
2931
+ * table.pluck("favoriteColor").cellEditor(SelectInputComponent, {
2932
+ * initialiseComponent(component: SelectInputComponent) {
2933
+ * selectInput.optionsModel = colorsNames; // <- initialise our component
2934
+ * }
2935
+ * });
2936
+ * table.addEditControls(saveCommand); // <- required to enable editing
2937
+ * });
2938
+ *
2939
+ * Selection models
2940
+ * @example
2941
+ * const model = TableModel.fromList(heroList, table => {
2942
+ * table.addSelectionColumn(selectionModel); // <- can be single or multiple selection model
2943
+ * table.pluck("firstName");
2944
+ * table.pluck("lastName");
2945
+ * });
2946
+ *
2947
+ * Custom cell renderers and editors
2948
+ * @example
2949
+ * const model = TableModel.fromList(heroList, table => {
2950
+ * table.pluck("favoriteColor")
2951
+ * .cellHeaderRenderer(CellHeaderRendererComponent, (component, column) => {
2952
+ * // configure your component with what ever you need.
2953
+ * });
2954
+ * .cellRenderer(CellRendererComponent) // <-- interface CellEditor { value: string; }
2955
+ * .cellEditor(CellEditorComponent.); // <-- interface CellEditor { valueModel: FormValueModel<string> | ValueModel<string>; }
2956
+ * table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
2957
+ * });
2958
+ *
2959
+ * I18n
2960
+ * @example
2961
+ * [table.yml]
2962
+ * table:
2963
+ * columns(ColumnTextProperties[]):
2964
+ * firstName:
2965
+ * headerText: "First Name"
2966
+ * fullName:
2967
+ * headerText: "Full Name"
2968
+ *
2969
+ * const model = TableModel.fromList(heroList, table => {
2970
+ * table.pluck("favoriteColor").cellRenderer(...).cellEditor(...);
2971
+ * table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
2972
+ *
2973
+ * table.columnTextProperties(I18n.table.columns); // <- configures all columns
2974
+ * });
2975
+ */
2976
+ var TableModel = /** @class */ (function () {
2977
+ function TableModel(sourceOfTruth) {
2978
+ this.sourceOfTruth = sourceOfTruth;
2979
+ this._garbage = new pectin.GarbageCollector();
2980
+ this._columns = new pectin.MutableListModel();
2981
+ this._editorSessions = new pectin.MutableListModel();
2982
+ this.identityOf = sourceOfTruth.identityOf;
2983
+ var _a = pectin.Dsl.disposeWith(this._garbage), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
2984
+ this._columnsById = chain(this._columns).indexBy('columnId');
2985
+ this._rowsBeingEdited = new pectin.MutableListModel([], {
2986
+ identifiedWith: this.identityOf
2987
+ });
2988
+ this._editorSessionByRowId = chain(this._editorSessions).indexBy('rowId');
2989
+ this.editing = chain(this._editorSessions).count().isGreaterThan(0);
2990
+ this.dataSource = chain(this.sourceOfTruth).replaceAll(this.rowsBeingEdited);
2991
+ }
2992
+ TableModel_1 = TableModel;
2993
+ TableModel.fromList = function (sourceOfTruth, builder) {
2994
+ var model = new TableModel_1(sourceOfTruth);
2995
+ builder(model);
2996
+ return model;
2997
+ };
2998
+ Object.defineProperty(TableModel.prototype, "rowsBeingEdited", {
2999
+ get: function () {
3000
+ return this._rowsBeingEdited.readonly;
3001
+ },
3002
+ enumerable: true,
3003
+ configurable: true
3004
+ });
3005
+ TableModel.prototype.getTrackByFunction = function () {
3006
+ var _this = this;
3007
+ return function (index, item) {
3008
+ return _this.identityOf ? _this.identityOf(item) : index;
3009
+ };
3010
+ };
3011
+ Object.defineProperty(TableModel.prototype, "columns", {
3012
+ get: function () {
3013
+ return this._columns.readonly;
3014
+ },
3015
+ enumerable: true,
3016
+ configurable: true
3017
+ });
3018
+ TableModel.prototype.pluck = function (property) {
3019
+ return this.addColumn(new PropertyColumnModel(property, this));
3020
+ };
3021
+ TableModel.prototype.addSelectionColumn = function (selectionModel) {
3022
+ return this.addColumn(new SelectionColumnModel('selection', this, selectionModel));
3023
+ };
3024
+ TableModel.prototype.addEditControls = function (saveCommand) {
3025
+ this.saveCommand = saveCommand;
3026
+ return this.addColumn(new EditorControlColumnModel('editControls', saveCommand, this));
3027
+ };
3028
+ TableModel.prototype.addCustomColumn = function (columnId, dataAccessor) {
3029
+ return this.addColumn(new CustomValueColumnModel(columnId, this, dataAccessor));
3030
+ };
3031
+ TableModel.prototype.addColumn = function (column) {
3032
+ if (this._columnsById.get(column.columnId)) {
3033
+ pectin.lang.illegalState("Column with id=" + column.columnId + " already exists");
3034
+ }
3035
+ else {
3036
+ this._columns.push(column);
3037
+ }
3038
+ return column;
3039
+ };
3040
+ TableModel.prototype.columnTextProperties = function (columnTextProperties) {
3041
+ this._columnTextPropertiesLookup = columnTextProperties;
3042
+ };
3043
+ TableModel.prototype.getColumnTextProperties = function (column) {
3044
+ var factory = this._columnTextPropertiesLookup ? this._columnTextPropertiesLookup[column.columnId] : undefined;
3045
+ return factory ? factory() : undefined;
3046
+ };
3047
+ TableModel.prototype.startEditSession = function (row) {
3048
+ var _this = this;
3049
+ var rowId = this.identityOf(row);
3050
+ if (this._rowsBeingEdited.query().indexOf(row) > -1) {
3051
+ return pectin.lang.illegalState("Row with id=" + rowId + " already being edited");
3052
+ }
3053
+ else {
3054
+ var editSession_1 = new EditSession(rowId, row, this.saveCommand);
3055
+ var when = pectin.Dsl.disposeWith(editSession_1).when;
3056
+ when.valueOf(editSession_1.rowValueModel).changes(function (editedValue) {
3057
+ _this._rowsBeingEdited.replaceOrPush(editedValue);
3058
+ }, { initialValue: 'triggerChangeUnlessNil' });
3059
+ this._editorSessions.push(editSession_1);
3060
+ editSession_1.onDispose(function () {
3061
+ _this._rowsBeingEdited.remove(editSession_1.rowValueModel.value);
3062
+ _this._editorSessions.remove(editSession_1);
3063
+ });
3064
+ return editSession_1;
3065
+ }
3066
+ };
3067
+ TableModel.prototype.getEditSessionFor = function (row) {
3068
+ return this._editorSessionByRowId.get(this.identityOf(row));
3069
+ };
3070
+ TableModel.prototype.cancelAllEditorSessions = function () {
3071
+ var _this = this;
3072
+ this._editorSessions.runInTransaction(function (draft) {
3073
+ _this._rowsBeingEdited.runInTransaction(function () {
3074
+ draft.value.forEach(function (session) { return session.dispose(); });
3075
+ });
3073
3076
  });
3074
- return _this;
3075
- }
3076
- SelectionColumnModel.prototype.getDefaultHeaderText = function () {
3077
- return '';
3078
3077
  };
3079
- return SelectionColumnModel;
3080
- }(ColumnModel));
3078
+ var TableModel_1;
3079
+ TableModel.ctorParameters = function () { return [
3080
+ { type: pectin.ListModel }
3081
+ ]; };
3082
+ TableModel = TableModel_1 = __decorate([
3083
+ pectin.TrackExternal.Strategy(new pectin.TrackExternal.OneTimeBinding()),
3084
+ __metadata("design:paramtypes", [pectin.ListModel])
3085
+ ], TableModel);
3086
+ return TableModel;
3087
+ }());
3081
3088
 
3082
3089
  /**
3083
3090
  * Create your model:
@@ -3122,7 +3129,7 @@
3122
3129
  __decorate([
3123
3130
  core.Input(),
3124
3131
  pectin.TrackExternal(),
3125
- __metadata("design:type", exports.TableModel)
3132
+ __metadata("design:type", TableModel)
3126
3133
  ], TableComponent.prototype, "tableModel", void 0);
3127
3134
  TableComponent = __decorate([
3128
3135
  core.Component({
@@ -3195,11 +3202,11 @@
3195
3202
  ], TableCellRendererComponent.prototype, "column", void 0);
3196
3203
  __decorate([
3197
3204
  core.Input(),
3198
- __metadata("design:type", exports.TableModel.EditSession)
3205
+ __metadata("design:type", EditSession)
3199
3206
  ], TableCellRendererComponent.prototype, "editSession", void 0);
3200
3207
  __decorate([
3201
3208
  core.Input(),
3202
- __metadata("design:type", exports.TableModel)
3209
+ __metadata("design:type", TableModel)
3203
3210
  ], TableCellRendererComponent.prototype, "tableModel", void 0);
3204
3211
  __decorate([
3205
3212
  core.HostBinding('class'),
@@ -3330,117 +3337,6 @@
3330
3337
  return VerticalFocusContainerComponent;
3331
3338
  }(FocusContainerComponent));
3332
3339
 
3333
- /**
3334
- * @file Automatically generated by barrelsby.
3335
- */
3336
-
3337
- var ActivityActionsComponent = /** @class */ (function (_super) {
3338
- __extends(ActivityActionsComponent, _super);
3339
- function ActivityActionsComponent() {
3340
- var _this = _super !== null && _super.apply(this, arguments) || this;
3341
- _this.align = 'start';
3342
- return _this;
3343
- }
3344
- Object.defineProperty(ActivityActionsComponent.prototype, "alignEnd", {
3345
- get: function () {
3346
- return this.align === 'end';
3347
- },
3348
- enumerable: true,
3349
- configurable: true
3350
- });
3351
- ActivityActionsComponent.prototype.ngOnInit = function () {
3352
- };
3353
- ActivityActionsComponent.prototype.hasConfirmText = function () {
3354
- return !___default__default.isEmpty(this.confirmText);
3355
- };
3356
- __decorate([
3357
- core.Input(),
3358
- pectin.TrackExternal(),
3359
- __metadata("design:type", pectin.Command)
3360
- ], ActivityActionsComponent.prototype, "confirmCommand", void 0);
3361
- __decorate([
3362
- core.Input(),
3363
- __metadata("design:type", String)
3364
- ], ActivityActionsComponent.prototype, "confirmText", void 0);
3365
- __decorate([
3366
- core.Input(),
3367
- pectin.TrackExternal(),
3368
- __metadata("design:type", pectin.Command)
3369
- ], ActivityActionsComponent.prototype, "cancelCommand", void 0);
3370
- __decorate([
3371
- core.Input(),
3372
- __metadata("design:type", String)
3373
- ], ActivityActionsComponent.prototype, "align", void 0);
3374
- __decorate([
3375
- core.HostBinding('class.align-end'),
3376
- __metadata("design:type", Boolean),
3377
- __metadata("design:paramtypes", [])
3378
- ], ActivityActionsComponent.prototype, "alignEnd", null);
3379
- ActivityActionsComponent = __decorate([
3380
- core.Component({
3381
- selector: 'aup-activity-actions',
3382
- template: "<button class=\"cancel\" mat-icon-button [pectinCommand]=\"cancelCommand\">\n <mat-icon>clear</mat-icon>\n</button>\n<button class=\"confirm\" *ngIf=\"!hasConfirmText()\" mat-icon-button [pectinCommand]=\"confirmCommand\">\n <mat-icon>done</mat-icon>\n</button>\n<button class=\"confirm\" *ngIf=\"hasConfirmText()\" mat-button [pectinCommand]=\"confirmCommand\">{{confirmText}}</button>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>\n",
3383
- styles: [":host{display:-ms-grid;display:grid;grid-template-areas:\"cancel confirm content\";-ms-grid-columns:auto auto 1fr;grid-template-columns:auto auto 1fr;-ms-grid-rows:auto;grid-template-rows:auto;align-items:center;justify-content:end}:host.align-end{grid-template-areas:\"content cancel confirm\";-ms-grid-columns:1fr auto auto;grid-template-columns:1fr auto auto}.cancel{-ms-grid-row:1;-ms-grid-column:1;grid-area:cancel}:host.align-end>.cancel{-ms-grid-row:1;-ms-grid-column:2}.confirm{-ms-grid-row:1;-ms-grid-column:2;grid-area:confirm}:host.align-end>.confirm{-ms-grid-row:1;-ms-grid-column:3}.content{-ms-grid-row:1;-ms-grid-column:3;grid-area:content;text-align:left}:host.align-end>.content{-ms-grid-row:1;-ms-grid-column:1}"]
3384
- })
3385
- ], ActivityActionsComponent);
3386
- return ActivityActionsComponent;
3387
- }(DisposableComponent));
3388
-
3389
- var InteractionModule = /** @class */ (function () {
3390
- function InteractionModule() {
3391
- }
3392
- InteractionModule = __decorate([
3393
- core.NgModule({
3394
- imports: [
3395
- common.CommonModule,
3396
- button.MatButtonModule,
3397
- dialog.MatDialogModule,
3398
- tabs.MatTabsModule,
3399
- portal.PortalModule,
3400
- router.RouterModule,
3401
- icon.MatIconModule,
3402
- DirectivesModule,
3403
- flexLayout.FlexModule,
3404
- flexLayout.GridModule
3405
- ],
3406
- declarations: [
3407
- ActivityContainerComponent,
3408
- ConfirmationDialogComponent,
3409
- ConfirmThenDialogComponent,
3410
- AlertDialogComponent,
3411
- ActivityOutletComponent,
3412
- InPlaceInteractionContextComponent,
3413
- AddItemInteractionContextComponent,
3414
- ActivityActionsComponent,
3415
- PopupInteractionContextComponent,
3416
- InteractionContextTriggerFor
3417
- ],
3418
- exports: [
3419
- ActivityContainerComponent,
3420
- ActivityOutletComponent,
3421
- InPlaceInteractionContextComponent,
3422
- AddItemInteractionContextComponent,
3423
- ActivityActionsComponent,
3424
- PopupInteractionContextComponent,
3425
- InteractionContextTriggerFor
3426
- ],
3427
- entryComponents: [
3428
- ActivityContainerComponent,
3429
- ConfirmationDialogComponent,
3430
- ConfirmThenDialogComponent,
3431
- AlertDialogComponent
3432
- ],
3433
- providers: [
3434
- exports.ɵbw
3435
- // {
3436
- // provide: MAT_TABS_CONFIG, useValue: { animationDuration: "2s" }
3437
- // }
3438
- ]
3439
- })
3440
- ], InteractionModule);
3441
- return InteractionModule;
3442
- }());
3443
-
3444
3340
  var ComponentsModule = /** @class */ (function () {
3445
3341
  function ComponentsModule() {
3446
3342
  }
@@ -4631,7 +4527,7 @@
4631
4527
  return PopStateNavigation;
4632
4528
  }(AbstractPopStateNavigation));
4633
4529
 
4634
- exports.ɵcn = /** @class */ (function () {
4530
+ exports.ɵcm = /** @class */ (function () {
4635
4531
  function PlaceHistory() {
4636
4532
  this._archive = new Map();
4637
4533
  this.placeHistoryDepth = 4;
@@ -4768,7 +4664,7 @@
4768
4664
  // }
4769
4665
  //
4770
4666
  // }
4771
- })(exports.ɵcn || (exports.ɵcn = {}));
4667
+ })(exports.ɵcm || (exports.ɵcm = {}));
4772
4668
 
4773
4669
  exports.UrlSnapshot = /** @class */ (function () {
4774
4670
  // TODO: Update this accept a url Parser so it can be immutable and generate new trees on mutation using toString() are parseUrl.
@@ -5293,9 +5189,9 @@
5293
5189
  { type: common.Location },
5294
5190
  { type: exports.ɵbw },
5295
5191
  { type: UrlService },
5296
- { type: exports.ɵcn }
5192
+ { type: exports.ɵcm }
5297
5193
  ]; };
5298
- PlaceRouter.ɵprov = core.ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(core.ɵɵinject(router.Router), core.ɵɵinject(common.Location), core.ɵɵinject(exports.ɵbw), core.ɵɵinject(UrlService), core.ɵɵinject(exports.ɵcn)); }, token: PlaceRouter, providedIn: "root" });
5194
+ PlaceRouter.ɵprov = core.ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(core.ɵɵinject(router.Router), core.ɵɵinject(common.Location), core.ɵɵinject(exports.ɵbw), core.ɵɵinject(UrlService), core.ɵɵinject(exports.ɵcm)); }, token: PlaceRouter, providedIn: "root" });
5299
5195
  __decorate([
5300
5196
  pectin.Trace(),
5301
5197
  __metadata("design:type", Function),
@@ -5310,7 +5206,7 @@
5310
5206
  common.Location,
5311
5207
  exports.ɵbw,
5312
5208
  UrlService,
5313
- exports.ɵcn])
5209
+ exports.ɵcm])
5314
5210
  ], PlaceRouter);
5315
5211
  return PlaceRouter;
5316
5212
  }(pectin.GarbageCollector));
@@ -5880,6 +5776,118 @@
5880
5776
  animations$1.transition(':leave', [animations$1.animate('{{duration}}', slideLeftOnEnterDef)], { params: { duration: '100ms' } })
5881
5777
  ]);
5882
5778
 
5779
+ /**
5780
+ * @file Automatically generated by barrelsby.
5781
+ */
5782
+
5783
+ var Dimension = /** @class */ (function () {
5784
+ function Dimension(width, height) {
5785
+ this.width = width;
5786
+ this.height = height;
5787
+ }
5788
+ return Dimension;
5789
+ }());
5790
+
5791
+ var Point = /** @class */ (function () {
5792
+ function Point(x, y) {
5793
+ this.x = x;
5794
+ this.y = y;
5795
+ }
5796
+ Point.from = function (data) {
5797
+ return new Point(data.x, data.y);
5798
+ };
5799
+ Point.prototype.translate = function (x, y) {
5800
+ return new Point(this.x + x, this.y + y);
5801
+ };
5802
+ return Point;
5803
+ }());
5804
+
5805
+ exports.Bounds = /** @class */ (function (_super) {
5806
+ __extends(Bounds, _super);
5807
+ function Bounds(top, left, width, height) {
5808
+ var _this = _super.call(this, width, height) || this;
5809
+ _this.top = top;
5810
+ _this.left = left;
5811
+ _this.width = width;
5812
+ _this.height = height;
5813
+ return _this;
5814
+ }
5815
+ Bounds.prototype.relativePositionOf = function (point) {
5816
+ if (point instanceof MouseEvent) {
5817
+ return new Point(point.clientX - this.left, point.clientY - this.top);
5818
+ }
5819
+ else {
5820
+ return new Point(point.x - this.left, point.y - this.top);
5821
+ }
5822
+ };
5823
+ return Bounds;
5824
+ }(Dimension));
5825
+ (function (Bounds) {
5826
+ function ofElement(element) {
5827
+ var rect = element.getBoundingClientRect();
5828
+ return new Bounds(rect.top, rect.left, rect.width, rect.height);
5829
+ }
5830
+ Bounds.ofElement = ofElement;
5831
+ })(exports.Bounds || (exports.Bounds = {}));
5832
+
5833
+ var ResizeAwareComponent = /** @class */ (function (_super) {
5834
+ __extends(ResizeAwareComponent, _super);
5835
+ function ResizeAwareComponent(elementRef, ngZone) {
5836
+ var _this = _super.call(this) || this;
5837
+ _this.elementRef = elementRef;
5838
+ _this.ngZone = ngZone;
5839
+ _this._boundsModel = new pectin.MutableValueModel(new exports.Bounds(0, 0, 0, 0));
5840
+ return _this;
5841
+ }
5842
+ ResizeAwareComponent.prototype.ngAfterViewInit = function () {
5843
+ var _this = this;
5844
+ this.updateBounds();
5845
+ var element = this.elementRef.nativeElement;
5846
+ var ro = new ResizeObserver(function (entries, observer) {
5847
+ _this.ngZone.run(function () { return _this.updateBounds(); });
5848
+ });
5849
+ ro.observe(element);
5850
+ this.onDispose(function () { return ro.disconnect(); });
5851
+ };
5852
+ Object.defineProperty(ResizeAwareComponent.prototype, "boundsModel", {
5853
+ get: function () {
5854
+ return this._boundsModel.readonly;
5855
+ },
5856
+ enumerable: true,
5857
+ configurable: true
5858
+ });
5859
+ Object.defineProperty(ResizeAwareComponent.prototype, "nativeElement", {
5860
+ get: function () {
5861
+ return this.elementRef.nativeElement;
5862
+ },
5863
+ enumerable: true,
5864
+ configurable: true
5865
+ });
5866
+ // TODO: Make this handle body scroll
5867
+ ResizeAwareComponent.prototype.relativePositionOf = function (point) {
5868
+ return this.bounds.relativePositionOf(point);
5869
+ };
5870
+ Object.defineProperty(ResizeAwareComponent.prototype, "bounds", {
5871
+ get: function () {
5872
+ return this._boundsModel.value;
5873
+ },
5874
+ enumerable: true,
5875
+ configurable: true
5876
+ });
5877
+ ResizeAwareComponent.prototype.updateBounds = function () {
5878
+ this._boundsModel.value = exports.Bounds.ofElement(this.nativeElement);
5879
+ };
5880
+ ResizeAwareComponent.ctorParameters = function () { return [
5881
+ { type: core.ElementRef },
5882
+ { type: core.NgZone }
5883
+ ]; };
5884
+ ResizeAwareComponent = __decorate([
5885
+ core.Directive(),
5886
+ __metadata("design:paramtypes", [core.ElementRef, core.NgZone])
5887
+ ], ResizeAwareComponent);
5888
+ return ResizeAwareComponent;
5889
+ }(DisposableComponent));
5890
+
5883
5891
  /**
5884
5892
  * @file Automatically generated by barrelsby.
5885
5893
  */
@@ -6324,6 +6332,7 @@
6324
6332
  exports.DirectivesModule = DirectivesModule;
6325
6333
  exports.DisposableComponent = DisposableComponent;
6326
6334
  exports.EditRowControls = EditRowControls;
6335
+ exports.EditSession = EditSession;
6327
6336
  exports.EditorControlColumnModel = EditorControlColumnModel;
6328
6337
  exports.EmptyStateComponent = EmptyStateComponent;
6329
6338
  exports.EventCleanUpSession = EventCleanUpSession;
@@ -6351,7 +6360,7 @@
6351
6360
  exports.PlaceComponentDeactivationHandler = PlaceComponentDeactivationHandler;
6352
6361
  exports.PlaceDefinition = PlaceDefinition;
6353
6362
  exports.PlaceGuard = PlaceGuard;
6354
- exports.PlaceHistory = exports.ɵcn;
6363
+ exports.PlaceHistory = exports.ɵcm;
6355
6364
  exports.PlaceModule = PlaceModule;
6356
6365
  exports.PlaceOutletComponent = PlaceOutletComponent;
6357
6366
  exports.PlaceRouter = PlaceRouter;
@@ -6381,6 +6390,7 @@
6381
6390
  exports.TableCellRendererComponent = TableCellRendererComponent;
6382
6391
  exports.TableComponent = TableComponent;
6383
6392
  exports.TableHeaderCellRendererComponent = TableHeaderCellRendererComponent;
6393
+ exports.TableModel = TableModel;
6384
6394
  exports.TextInputComponent = TextInputComponent;
6385
6395
  exports.UrlService = UrlService;
6386
6396
  exports.VerticalFocusContainerComponent = VerticalFocusContainerComponent;
@@ -6420,22 +6430,21 @@
6420
6430
  exports.ɵby = AddItemInteractionContextComponent;
6421
6431
  exports.ɵbz = ActivityActionsComponent;
6422
6432
  exports.ɵc = FocusBindingDirective;
6423
- exports.ɵca = DisposableComponent;
6424
- exports.ɵcb = PopupInteractionContextComponent;
6425
- exports.ɵcc = InteractionContextTriggerFor;
6426
- exports.ɵcd = PlaceModule;
6427
- exports.ɵce = EmptyStateComponent;
6428
- exports.ɵcf = BusyOverlayComponent;
6429
- exports.ɵcg = PlaceOutletComponent;
6430
- exports.ɵch = leftRightPlaceAnimation;
6431
- exports.ɵci = LEFT_RIGHT_PLACE_ANIMATION;
6432
- exports.ɵcj = AUP_PLACE_CONFIG;
6433
- exports.ɵcl = PlaceRouter;
6434
- exports.ɵcm = UrlService;
6435
- exports.ɵco = TabbedPlaceNavigationComponent;
6436
- exports.ɵcp = AbstractPlaceNavigationComponent;
6437
- exports.ɵcq = ListPlaceNavComponent;
6438
- exports.ɵcr = SidePlaceNavigationComponent;
6433
+ exports.ɵca = PopupInteractionContextComponent;
6434
+ exports.ɵcb = InteractionContextTriggerFor;
6435
+ exports.ɵcc = PlaceModule;
6436
+ exports.ɵcd = EmptyStateComponent;
6437
+ exports.ɵce = BusyOverlayComponent;
6438
+ exports.ɵcf = PlaceOutletComponent;
6439
+ exports.ɵcg = leftRightPlaceAnimation;
6440
+ exports.ɵch = LEFT_RIGHT_PLACE_ANIMATION;
6441
+ exports.ɵci = AUP_PLACE_CONFIG;
6442
+ exports.ɵck = PlaceRouter;
6443
+ exports.ɵcl = UrlService;
6444
+ exports.ɵcn = TabbedPlaceNavigationComponent;
6445
+ exports.ɵco = AbstractPlaceNavigationComponent;
6446
+ exports.ɵcp = ListPlaceNavComponent;
6447
+ exports.ɵcq = SidePlaceNavigationComponent;
6439
6448
  exports.ɵd = DisposableComponent;
6440
6449
  exports.ɵe = FocusBindingFactory;
6441
6450
  exports.ɵf = ComponentsModule;