@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,6 +1,6 @@
1
1
  import { __extends, __decorate, __metadata, __param, __awaiter, __generator, __assign, __spread } from 'tslib';
2
2
  import { DOCUMENT, CommonModule, Location } from '@angular/common';
3
- import { ElementRef, Inject, Input, HostListener, Directive, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule, HostBinding, Component, ContentChild, TemplateRef, Self, InjectionToken, Injector, ComponentFactoryResolver, ViewContainerRef, ViewChild, ViewChildren, QueryList, Optional, EventEmitter, Output, ChangeDetectorRef, ContentChildren, SkipSelf } from '@angular/core';
3
+ import { ElementRef, Inject, Input, HostListener, Directive, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule, HostBinding, Component, InjectionToken, Injector, ComponentFactoryResolver, ViewContainerRef, ViewChild, ViewChildren, QueryList, Optional, EventEmitter, Output, ContentChild, TemplateRef, Self, ChangeDetectorRef, ContentChildren, SkipSelf } from '@angular/core';
4
4
  import { FormsModule } from '@angular/forms';
5
5
  import { MatFormFieldModule } from '@angular/material/form-field';
6
6
  import { MatInputModule } from '@angular/material/input';
@@ -12,12 +12,11 @@ import { MatButtonModule } from '@angular/material/button';
12
12
  import { MatCheckboxModule } from '@angular/material/checkbox';
13
13
  import { MatIconModule } from '@angular/material/icon';
14
14
  import { MatTableModule } from '@angular/material/table';
15
- import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, FocusManager, MutableValueModel, TrackExternal, Command, Deferred, Trace, MutableListModel, Form, DelegatingFormValueModel, ListModel, StoreInListModel, ValueModel, StoreInValueModel, MultipleSelectionModel, Guard, DebugContext, Binding, Functions } from '@coolon/pectin';
15
+ import { DelegatingValueModel, assert, UnaryCommand, lang, Dsl, GarbageCollector, Logger, TrackExternal, Command, Deferred, Trace, MutableListModel, FocusManager, Form, DelegatingFormValueModel, ListModel, StoreInListModel, ValueModel, StoreInValueModel, MutableValueModel, MultipleSelectionModel, Guard, DebugContext, Binding, Functions } from '@coolon/pectin';
16
16
  import { FlexModule, GridModule } from '@angular/flex-layout';
17
- import { MatDialog, MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS, MatDialogModule } from '@angular/material/dialog';
17
+ import { MatDialogModule, MatDialog, MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
18
18
  import { RouterModule, UrlSegment, Router, UrlSerializer, NavigationStart, NavigationEnd, NavigationError, NavigationCancel, RouterOutlet } from '@angular/router';
19
19
  import ___default, { isEqual, isNil } from 'lodash';
20
- import ResizeObserver from 'resize-observer-polyfill';
21
20
  import { assert as assert$1, lang as lang$1, Opts, Klass } from '@coolon/typescript-utilities';
22
21
  import { Overlay } from '@angular/cdk/overlay';
23
22
  import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
@@ -28,6 +27,7 @@ import { MatTooltipModule } from '@angular/material/tooltip';
28
27
  import { Memoize as Memoize$1 } from '@typescript-plus/fast-memoize-decorator';
29
28
  import 'reflect-metadata';
30
29
  import { style, query, group, animate, trigger, transition } from '@angular/animations';
30
+ import ResizeObserver from 'resize-observer-polyfill';
31
31
  import { Observable } from 'rxjs';
32
32
 
33
33
  var CommandDirective = /** @class */ (function (_super) {
@@ -365,360 +365,155 @@ var DirectivesModule = /** @class */ (function () {
365
365
  return DirectivesModule;
366
366
  }());
367
367
 
368
- var FocusableComponent = /** @class */ (function (_super) {
369
- __extends(FocusableComponent, _super);
370
- function FocusableComponent(el, focusManager, focusBindingFactory) {
371
- var _this = _super.call(this) || this;
372
- _this.el = el;
373
- _this.focusManager = focusManager;
374
- var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
375
- if (_this.focusManager) {
376
- _this._focusContext = _this.focusManager.registerFocusable(_this);
377
- _this.registerDisposable(_this._focusContext);
378
- _this.registerDisposable(focusBindingFactory.createBinding(el.nativeElement, _this.focusContext));
379
- }
368
+ var ActivityActionsComponent = /** @class */ (function (_super) {
369
+ __extends(ActivityActionsComponent, _super);
370
+ function ActivityActionsComponent() {
371
+ var _this = _super !== null && _super.apply(this, arguments) || this;
372
+ _this.align = 'start';
380
373
  return _this;
381
374
  }
382
- Object.defineProperty(FocusableComponent.prototype, "focusable", {
375
+ Object.defineProperty(ActivityActionsComponent.prototype, "alignEnd", {
383
376
  get: function () {
384
- return !!this.focusContext ? 0 : undefined;
377
+ return this.align === 'end';
385
378
  },
386
379
  enumerable: true,
387
380
  configurable: true
388
381
  });
389
- FocusableComponent.prototype.onFocus = function () {
390
- var _a;
391
- (_a = this.focusContext) === null || _a === void 0 ? void 0 : _a.notifyFocusIn();
382
+ ActivityActionsComponent.prototype.ngOnInit = function () {
392
383
  };
393
- FocusableComponent.prototype.onBlur = function () {
394
- var _a;
395
- (_a = this.focusContext) === null || _a === void 0 ? void 0 : _a.notifyFocusOut();
384
+ ActivityActionsComponent.prototype.hasConfirmText = function () {
385
+ return !___default.isEmpty(this.confirmText);
396
386
  };
397
- Object.defineProperty(FocusableComponent.prototype, "focusContext", {
398
- get: function () {
399
- return this._focusContext;
400
- },
401
- enumerable: true,
402
- configurable: true
403
- });
404
- FocusableComponent.ctorParameters = function () { return [
405
- { type: ElementRef },
406
- { type: FocusManager },
407
- { type: FocusBindingFactory }
408
- ]; };
409
387
  __decorate([
410
- HostBinding('attr.tabindex'),
411
- __metadata("design:type", Object),
412
- __metadata("design:paramtypes", [])
413
- ], FocusableComponent.prototype, "focusable", null);
388
+ Input(),
389
+ TrackExternal(),
390
+ __metadata("design:type", Command)
391
+ ], ActivityActionsComponent.prototype, "confirmCommand", void 0);
414
392
  __decorate([
415
- HostListener('focus'),
416
- __metadata("design:type", Function),
417
- __metadata("design:paramtypes", []),
418
- __metadata("design:returntype", void 0)
419
- ], FocusableComponent.prototype, "onFocus", null);
393
+ Input(),
394
+ __metadata("design:type", String)
395
+ ], ActivityActionsComponent.prototype, "confirmText", void 0);
420
396
  __decorate([
421
- HostListener('blur'),
422
- __metadata("design:type", Function),
423
- __metadata("design:paramtypes", []),
424
- __metadata("design:returntype", void 0)
425
- ], FocusableComponent.prototype, "onBlur", null);
426
- FocusableComponent = __decorate([
427
- Component({ template: '' }),
428
- __metadata("design:paramtypes", [ElementRef, FocusManager, FocusBindingFactory])
429
- ], FocusableComponent);
430
- return FocusableComponent;
397
+ Input(),
398
+ TrackExternal(),
399
+ __metadata("design:type", Command)
400
+ ], ActivityActionsComponent.prototype, "cancelCommand", void 0);
401
+ __decorate([
402
+ Input(),
403
+ __metadata("design:type", String)
404
+ ], ActivityActionsComponent.prototype, "align", void 0);
405
+ __decorate([
406
+ HostBinding('class.align-end'),
407
+ __metadata("design:type", Boolean),
408
+ __metadata("design:paramtypes", [])
409
+ ], ActivityActionsComponent.prototype, "alignEnd", null);
410
+ ActivityActionsComponent = __decorate([
411
+ Component({
412
+ selector: 'aup-activity-actions',
413
+ 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",
414
+ 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}"]
415
+ })
416
+ ], ActivityActionsComponent);
417
+ return ActivityActionsComponent;
431
418
  }(DisposableComponent));
432
419
 
433
- var Dimension = /** @class */ (function () {
434
- function Dimension(width, height) {
435
- this.width = width;
436
- this.height = height;
437
- }
438
- return Dimension;
439
- }());
440
-
441
- var Point = /** @class */ (function () {
442
- function Point(x, y) {
443
- this.x = x;
444
- this.y = y;
445
- }
446
- Point.from = function (data) {
447
- return new Point(data.x, data.y);
448
- };
449
- Point.prototype.translate = function (x, y) {
450
- return new Point(this.x + x, this.y + y);
451
- };
452
- return Point;
453
- }());
454
-
455
- var Bounds = /** @class */ (function (_super) {
456
- __extends(Bounds, _super);
457
- function Bounds(top, left, width, height) {
458
- var _this = _super.call(this, width, height) || this;
459
- _this.top = top;
460
- _this.left = left;
461
- _this.width = width;
462
- _this.height = height;
463
- return _this;
464
- }
465
- Bounds.prototype.relativePositionOf = function (point) {
466
- if (point instanceof MouseEvent) {
467
- return new Point(point.clientX - this.left, point.clientY - this.top);
468
- }
469
- else {
470
- return new Point(point.x - this.left, point.y - this.top);
471
- }
472
- };
473
- return Bounds;
474
- }(Dimension));
475
- (function (Bounds) {
476
- function ofElement(element) {
477
- var rect = element.getBoundingClientRect();
478
- return new Bounds(rect.top, rect.left, rect.width, rect.height);
479
- }
480
- Bounds.ofElement = ofElement;
481
- })(Bounds || (Bounds = {}));
482
-
483
- var ResizeAwareComponent = /** @class */ (function (_super) {
484
- __extends(ResizeAwareComponent, _super);
485
- function ResizeAwareComponent(elementRef, ngZone) {
486
- var _this = _super.call(this) || this;
487
- _this.elementRef = elementRef;
488
- _this.ngZone = ngZone;
489
- _this._boundsModel = new MutableValueModel(new Bounds(0, 0, 0, 0));
420
+ var ACTIVITY_DATA = new InjectionToken('InteractionActivityData');
421
+ var Activity = /** @class */ (function (_super) {
422
+ __extends(Activity, _super);
423
+ function Activity() {
424
+ var _this = _super !== null && _super.apply(this, arguments) || this;
425
+ _this._busyModel = new DelegatingValueModel().withDefault(false);
426
+ _this.class = 'aup-activity';
490
427
  return _this;
491
428
  }
492
- ResizeAwareComponent.prototype.ngAfterViewInit = function () {
493
- var _this = this;
494
- this.updateBounds();
495
- var element = this.elementRef.nativeElement;
496
- var ro = new ResizeObserver(function (entries, observer) {
497
- _this.ngZone.run(function () { return _this.updateBounds(); });
498
- });
499
- ro.observe(element);
500
- this.onDispose(function () { return ro.disconnect(); });
429
+ Activity.prototype.initialise = function (nestedInteractionContext, activityContext) {
430
+ assert$1.isNil(this._activityContext);
431
+ this._activityContext = activityContext;
432
+ this._interactionContext = nestedInteractionContext;
501
433
  };
502
- Object.defineProperty(ResizeAwareComponent.prototype, "boundsModel", {
434
+ Object.defineProperty(Activity.prototype, "interactionContext", {
503
435
  get: function () {
504
- return this._boundsModel.readonly;
436
+ assert$1.isTruthy(this.isInitialised());
437
+ return this._interactionContext;
505
438
  },
506
439
  enumerable: true,
507
440
  configurable: true
508
441
  });
509
- Object.defineProperty(ResizeAwareComponent.prototype, "nativeElement", {
442
+ Activity.prototype.done = function (result) {
443
+ return this._activityContext.onDone(result);
444
+ };
445
+ Activity.prototype.cancel = function (error) {
446
+ this._activityContext.onCancel(error);
447
+ };
448
+ // @Trace()
449
+ Activity.prototype.onActivityReady = function () {
450
+ };
451
+ Object.defineProperty(Activity.prototype, "busy", {
510
452
  get: function () {
511
- return this.elementRef.nativeElement;
453
+ return this._busyModel.readonly;
512
454
  },
513
455
  enumerable: true,
514
456
  configurable: true
515
457
  });
516
- // TODO: Make this handle body scroll
517
- ResizeAwareComponent.prototype.relativePositionOf = function (point) {
518
- return this.bounds.relativePositionOf(point);
458
+ Activity.prototype.busyWhile = function (busyModel) {
459
+ this._busyModel.setDelegate(busyModel);
519
460
  };
520
- Object.defineProperty(ResizeAwareComponent.prototype, "bounds", {
461
+ Activity.prototype.isBusy = function () {
462
+ return this._busyModel.value;
463
+ };
464
+ Activity.prototype.isInitialised = function () {
465
+ return !!this._activityContext;
466
+ };
467
+ __decorate([
468
+ HostBinding('class'),
469
+ __metadata("design:type", Object)
470
+ ], Activity.prototype, "class", void 0);
471
+ return Activity;
472
+ }(DisposableComponent));
473
+
474
+ var AlertDialogComponent = /** @class */ (function (_super) {
475
+ __extends(AlertDialogComponent, _super);
476
+ function AlertDialogComponent(alert) {
477
+ var _this = _super.call(this) || this;
478
+ _this.alert = alert;
479
+ return _this;
480
+ }
481
+ AlertDialogComponent.prototype.ngOnInit = function () {
482
+ };
483
+ AlertDialogComponent.ctorParameters = function () { return [
484
+ { type: undefined, decorators: [{ type: Inject, args: [ACTIVITY_DATA,] }] }
485
+ ]; };
486
+ AlertDialogComponent = __decorate([
487
+ Component({
488
+ selector: 'aup-alert-dialog',
489
+ 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",
490
+ 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}"]
491
+ }),
492
+ __param(0, Inject(ACTIVITY_DATA)),
493
+ __metadata("design:paramtypes", [Object])
494
+ ], AlertDialogComponent);
495
+ return AlertDialogComponent;
496
+ }(Activity));
497
+
498
+ var ConfirmThenDialogComponent = /** @class */ (function (_super) {
499
+ __extends(ConfirmThenDialogComponent, _super);
500
+ function ConfirmThenDialogComponent(config) {
501
+ var _this = _super.call(this) || this;
502
+ _this.config = config;
503
+ assert.notNil(config);
504
+ return _this;
505
+ }
506
+ ConfirmThenDialogComponent.prototype.ngOnInit = function () {
507
+ };
508
+ Object.defineProperty(ConfirmThenDialogComponent.prototype, "confirm", {
521
509
  get: function () {
522
- return this._boundsModel.value;
510
+ return this.config.confirm;
523
511
  },
524
512
  enumerable: true,
525
513
  configurable: true
526
514
  });
527
- ResizeAwareComponent.prototype.updateBounds = function () {
528
- this._boundsModel.value = Bounds.ofElement(this.nativeElement);
529
- };
530
- ResizeAwareComponent.ctorParameters = function () { return [
531
- { type: ElementRef },
532
- { type: NgZone }
533
- ]; };
534
- ResizeAwareComponent = __decorate([
535
- Directive(),
536
- __metadata("design:paramtypes", [ElementRef, NgZone])
537
- ], ResizeAwareComponent);
538
- return ResizeAwareComponent;
539
- }(DisposableComponent));
540
-
541
- /**
542
- * @example
543
- * // CSS Vars
544
- * aup-card-container {
545
- * --card-gap: var(--card-gap, 16px);
546
- * --card-width: var(--card-width, 300px);
547
- * --card-height: var(--card-height, auto);
548
- * --card-min-height: var(--card-min-height, auto);
549
- * --card-background: var(--card-background, #fcfcfb);
550
- * }
551
- *
552
- * // Content Templates:
553
- * #addCardTemplate
554
- * <ng-template #addCardTemplate>
555
- * This is a new card template, it will the the size of the other cards.
556
- * </nav-template>
557
- *
558
- */
559
- var CardContainerComponent = /** @class */ (function (_super) {
560
- __extends(CardContainerComponent, _super);
561
- function CardContainerComponent() {
562
- return _super.call(this) || this;
563
- }
564
- CardContainerComponent.prototype.ngOnInit = function () {
565
- };
566
- __decorate([
567
- Input(),
568
- TrackExternal(),
569
- __metadata("design:type", Command)
570
- ], CardContainerComponent.prototype, "addCardCommand", void 0);
571
- __decorate([
572
- ContentChild("addCardTemplate"),
573
- __metadata("design:type", TemplateRef)
574
- ], CardContainerComponent.prototype, "addCardTemplate", void 0);
575
- CardContainerComponent = __decorate([
576
- Component({
577
- selector: 'aup-card-container',
578
- 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",
579
- 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}"]
580
- }),
581
- __metadata("design:paramtypes", [])
582
- ], CardContainerComponent);
583
- return CardContainerComponent;
584
- }(DisposableComponent));
585
-
586
- var FocusContainerComponent = /** @class */ (function (_super) {
587
- __extends(FocusContainerComponent, _super);
588
- function FocusContainerComponent(focusManager) {
589
- var _this = _super.call(this) || this;
590
- _this.focusManager = focusManager;
591
- _this.restoreFocusCommand = Command.create(function () {
592
- _this.restoreFocus();
593
- });
594
- _this.tabIndex = -1;
595
- return _this;
596
- }
597
- FocusContainerComponent.prototype.ngOnInit = function () {
598
- };
599
- // @Trace()
600
- FocusContainerComponent.prototype.restoreFocus = function () {
601
- this.focusManager.restoreFocus();
602
- };
603
- FocusContainerComponent.ctorParameters = function () { return [
604
- { type: FocusManager, decorators: [{ type: Self }] }
605
- ]; };
606
- __decorate([
607
- HostBinding('attr.tabindex'),
608
- __metadata("design:type", Object)
609
- ], FocusContainerComponent.prototype, "tabIndex", void 0);
610
- FocusContainerComponent = __decorate([
611
- Component({
612
- selector: 'aup-focus-container',
613
- template: "<ng-content></ng-content>\n",
614
- providers: [
615
- { provide: FocusManager }
616
- ],
617
- styles: [":host{display:block}"]
618
- }),
619
- __param(0, Self()),
620
- __metadata("design:paramtypes", [FocusManager])
621
- ], FocusContainerComponent);
622
- return FocusContainerComponent;
623
- }(DisposableComponent));
624
-
625
- var ACTIVITY_DATA = new InjectionToken('InteractionActivityData');
626
- var Activity = /** @class */ (function (_super) {
627
- __extends(Activity, _super);
628
- function Activity() {
629
- var _this = _super !== null && _super.apply(this, arguments) || this;
630
- _this._busyModel = new DelegatingValueModel().withDefault(false);
631
- _this.class = 'aup-activity';
632
- return _this;
633
- }
634
- Activity.prototype.initialise = function (nestedInteractionContext, activityContext) {
635
- assert$1.isNil(this._activityContext);
636
- this._activityContext = activityContext;
637
- this._interactionContext = nestedInteractionContext;
638
- };
639
- Object.defineProperty(Activity.prototype, "interactionContext", {
640
- get: function () {
641
- assert$1.isTruthy(this.isInitialised());
642
- return this._interactionContext;
643
- },
644
- enumerable: true,
645
- configurable: true
646
- });
647
- Activity.prototype.done = function (result) {
648
- return this._activityContext.onDone(result);
649
- };
650
- Activity.prototype.cancel = function (error) {
651
- this._activityContext.onCancel(error);
652
- };
653
- // @Trace()
654
- Activity.prototype.onActivityReady = function () {
655
- };
656
- Object.defineProperty(Activity.prototype, "busy", {
657
- get: function () {
658
- return this._busyModel.readonly;
659
- },
660
- enumerable: true,
661
- configurable: true
662
- });
663
- Activity.prototype.busyWhile = function (busyModel) {
664
- this._busyModel.setDelegate(busyModel);
665
- };
666
- Activity.prototype.isBusy = function () {
667
- return this._busyModel.value;
668
- };
669
- Activity.prototype.isInitialised = function () {
670
- return !!this._activityContext;
671
- };
672
- __decorate([
673
- HostBinding('class'),
674
- __metadata("design:type", Object)
675
- ], Activity.prototype, "class", void 0);
676
- return Activity;
677
- }(DisposableComponent));
678
-
679
- var AlertDialogComponent = /** @class */ (function (_super) {
680
- __extends(AlertDialogComponent, _super);
681
- function AlertDialogComponent(alert) {
682
- var _this = _super.call(this) || this;
683
- _this.alert = alert;
684
- return _this;
685
- }
686
- AlertDialogComponent.prototype.ngOnInit = function () {
687
- };
688
- AlertDialogComponent.ctorParameters = function () { return [
689
- { type: undefined, decorators: [{ type: Inject, args: [ACTIVITY_DATA,] }] }
690
- ]; };
691
- AlertDialogComponent = __decorate([
692
- Component({
693
- selector: 'aup-alert-dialog',
694
- 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",
695
- 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}"]
696
- }),
697
- __param(0, Inject(ACTIVITY_DATA)),
698
- __metadata("design:paramtypes", [Object])
699
- ], AlertDialogComponent);
700
- return AlertDialogComponent;
701
- }(Activity));
702
-
703
- var ConfirmThenDialogComponent = /** @class */ (function (_super) {
704
- __extends(ConfirmThenDialogComponent, _super);
705
- function ConfirmThenDialogComponent(config) {
706
- var _this = _super.call(this) || this;
707
- _this.config = config;
708
- assert.notNil(config);
709
- return _this;
710
- }
711
- ConfirmThenDialogComponent.prototype.ngOnInit = function () {
712
- };
713
- Object.defineProperty(ConfirmThenDialogComponent.prototype, "confirm", {
714
- get: function () {
715
- return this.config.confirm;
716
- },
717
- enumerable: true,
718
- configurable: true
719
- });
720
- ConfirmThenDialogComponent.prototype.isDestructive = function () {
721
- return this.confirm.destructive && this.confirm.destructive();
515
+ ConfirmThenDialogComponent.prototype.isDestructive = function () {
516
+ return this.confirm.destructive && this.confirm.destructive();
722
517
  };
723
518
  ConfirmThenDialogComponent.prototype.onConfirm = function () {
724
519
  var _this = this;
@@ -1647,78 +1442,282 @@ var InteractionContextTriggerFor = /** @class */ (function (_super) {
1647
1442
  return InteractionContextTriggerFor;
1648
1443
  }(GarbageCollector));
1649
1444
 
1650
- var DialogInteractionContext = /** @class */ (function (_super) {
1651
- __extends(DialogInteractionContext, _super);
1652
- function DialogInteractionContext(identifier, api, dialogService, config) {
1653
- var _this = _super.call(this) || this;
1654
- _this.identifier = identifier;
1655
- _this.api = api;
1656
- _this.dialogService = dialogService;
1657
- _this.config = config;
1658
- _this.garbage = new GarbageCollector();
1659
- assert$1.notNil(dialogService);
1660
- return _this;
1661
- }
1662
- DialogInteractionContext.prototype.cancelActiveActivity = function () {
1663
- return this.activityContainer.cancelActiveActivity();
1664
- };
1665
- DialogInteractionContext.prototype.dispose = function () {
1666
- if (this.isActive()) {
1667
- lang.illegalState('Dispose called while active.');
1668
- }
1669
- this.garbage.dispose();
1670
- };
1671
- DialogInteractionContext.prototype.registerDisposable = function (disposable) {
1672
- return this.garbage.registerDisposable(disposable);
1673
- };
1674
- DialogInteractionContext.prototype.isActive = function () {
1675
- return !!this.activityContainer && this.activityContainer.isActive();
1676
- };
1677
- DialogInteractionContext.prototype.createAndLaunchActivity = function (activityType, data, disableClose) {
1678
- var _this = this;
1679
- assert$1.isNil(this._currentActivityRef);
1680
- var config = __assign(__assign({}, this.config), {
1681
- disableClose: disableClose,
1682
- panelClass: 'dialog-interaction-context'
1683
- });
1684
- var self = this;
1685
- var matDialogRef = this.dialogService.open(ActivityContainerComponent, config);
1686
- var activityContainer = this.activityContainer = matDialogRef.componentInstance;
1687
- this.activityContainer.initialise(this.identifier, this.api);
1688
- var activityResult = this.activityContainer.startActivity(activityType, data);
1689
- activityResult.finally(function () { return matDialogRef.close(); });
1690
- // we need to check if our onDone/onCancel methods above we called or if we were
1691
- // closed by the user clicking the backdrop. If the later then we need to cancel our
1692
- // activity.
1693
- matDialogRef.afterClosed().subscribe(function (promiseAlreadyFinished) {
1694
- if (activityContainer.isActive()) {
1695
- activityContainer.cancelActiveActivity();
1696
- }
1697
- _this.activityContainer = null;
1698
- });
1699
- matDialogRef.updateSize();
1700
- matDialogRef.afterOpened().subscribe(function (promiseAlreadyFinished) {
1701
- matDialogRef.updateSize();
1702
- });
1703
- return activityResult;
1704
- };
1705
- return DialogInteractionContext;
1706
- }(AbstractInteractionContext));
1707
-
1708
- var DIALOG_INTERACTION_SERVICE_DEFAULTS = new InjectionToken('DIALOG_INTERACTION_SERVICE_DEFAULTS');
1709
- var DialogInteractionContextFactory = /** @class */ (function (_super) {
1710
- __extends(DialogInteractionContextFactory, _super);
1711
- function DialogInteractionContextFactory(dialogService, dialogServiceDefaults, matDialogDefaultConfig) {
1712
- var _this = _super.call(this) || this;
1713
- _this.dialogService = dialogService;
1714
- _this.dialogServiceDefaults = dialogServiceDefaults;
1715
- _this.matDialogDefaultConfig = matDialogDefaultConfig;
1716
- assert$1.notNil(dialogService);
1717
- return _this;
1445
+ var InteractionModule = /** @class */ (function () {
1446
+ function InteractionModule() {
1718
1447
  }
1719
- DialogInteractionContextFactory.prototype.createInteractionContext = function (identifier, api) {
1720
- var config = __assign(__assign({ autoFocus: false, hasBackdrop: true, closeOnNavigation: false }, this.matDialogDefaultConfig), this.dialogServiceDefaults);
1721
- return new DialogInteractionContext(identifier, api, this.dialogService, config);
1448
+ InteractionModule = __decorate([
1449
+ NgModule({
1450
+ imports: [
1451
+ CommonModule,
1452
+ MatButtonModule,
1453
+ MatDialogModule,
1454
+ MatTabsModule,
1455
+ PortalModule,
1456
+ RouterModule,
1457
+ MatIconModule,
1458
+ DirectivesModule,
1459
+ FlexModule,
1460
+ GridModule
1461
+ ],
1462
+ declarations: [
1463
+ ActivityContainerComponent,
1464
+ ConfirmationDialogComponent,
1465
+ ConfirmThenDialogComponent,
1466
+ AlertDialogComponent,
1467
+ ActivityOutletComponent,
1468
+ InPlaceInteractionContextComponent,
1469
+ AddItemInteractionContextComponent,
1470
+ ActivityActionsComponent,
1471
+ PopupInteractionContextComponent,
1472
+ InteractionContextTriggerFor
1473
+ ],
1474
+ exports: [
1475
+ ActivityContainerComponent,
1476
+ ActivityOutletComponent,
1477
+ InPlaceInteractionContextComponent,
1478
+ AddItemInteractionContextComponent,
1479
+ ActivityActionsComponent,
1480
+ PopupInteractionContextComponent,
1481
+ InteractionContextTriggerFor
1482
+ ],
1483
+ entryComponents: [
1484
+ ActivityContainerComponent,
1485
+ ConfirmationDialogComponent,
1486
+ ConfirmThenDialogComponent,
1487
+ AlertDialogComponent
1488
+ ],
1489
+ providers: [
1490
+ InteractionService
1491
+ // {
1492
+ // provide: MAT_TABS_CONFIG, useValue: { animationDuration: "2s" }
1493
+ // }
1494
+ ]
1495
+ })
1496
+ ], InteractionModule);
1497
+ return InteractionModule;
1498
+ }());
1499
+
1500
+ /**
1501
+ * @example
1502
+ * // CSS Vars
1503
+ * aup-card-container {
1504
+ * --card-gap: var(--card-gap, 16px);
1505
+ * --card-width: var(--card-width, 300px);
1506
+ * --card-height: var(--card-height, auto);
1507
+ * --card-min-height: var(--card-min-height, auto);
1508
+ * --card-background: var(--card-background, #fcfcfb);
1509
+ * }
1510
+ *
1511
+ * // Content Templates:
1512
+ * #addCardTemplate
1513
+ * <ng-template #addCardTemplate>
1514
+ * This is a new card template, it will the the size of the other cards.
1515
+ * </nav-template>
1516
+ *
1517
+ */
1518
+ var CardContainerComponent = /** @class */ (function (_super) {
1519
+ __extends(CardContainerComponent, _super);
1520
+ function CardContainerComponent() {
1521
+ return _super.call(this) || this;
1522
+ }
1523
+ CardContainerComponent.prototype.ngOnInit = function () {
1524
+ };
1525
+ __decorate([
1526
+ Input(),
1527
+ TrackExternal(),
1528
+ __metadata("design:type", Command)
1529
+ ], CardContainerComponent.prototype, "addCardCommand", void 0);
1530
+ __decorate([
1531
+ ContentChild("addCardTemplate"),
1532
+ __metadata("design:type", TemplateRef)
1533
+ ], CardContainerComponent.prototype, "addCardTemplate", void 0);
1534
+ CardContainerComponent = __decorate([
1535
+ Component({
1536
+ selector: 'aup-card-container',
1537
+ 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",
1538
+ 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}"]
1539
+ }),
1540
+ __metadata("design:paramtypes", [])
1541
+ ], CardContainerComponent);
1542
+ return CardContainerComponent;
1543
+ }(DisposableComponent));
1544
+
1545
+ var FocusContainerComponent = /** @class */ (function (_super) {
1546
+ __extends(FocusContainerComponent, _super);
1547
+ function FocusContainerComponent(focusManager) {
1548
+ var _this = _super.call(this) || this;
1549
+ _this.focusManager = focusManager;
1550
+ _this.restoreFocusCommand = Command.create(function () {
1551
+ _this.restoreFocus();
1552
+ });
1553
+ _this.tabIndex = -1;
1554
+ return _this;
1555
+ }
1556
+ FocusContainerComponent.prototype.ngOnInit = function () {
1557
+ };
1558
+ // @Trace()
1559
+ FocusContainerComponent.prototype.restoreFocus = function () {
1560
+ this.focusManager.restoreFocus();
1561
+ };
1562
+ FocusContainerComponent.ctorParameters = function () { return [
1563
+ { type: FocusManager, decorators: [{ type: Self }] }
1564
+ ]; };
1565
+ __decorate([
1566
+ HostBinding('attr.tabindex'),
1567
+ __metadata("design:type", Object)
1568
+ ], FocusContainerComponent.prototype, "tabIndex", void 0);
1569
+ FocusContainerComponent = __decorate([
1570
+ Component({
1571
+ selector: 'aup-focus-container',
1572
+ template: "<ng-content></ng-content>\n",
1573
+ providers: [
1574
+ { provide: FocusManager }
1575
+ ],
1576
+ styles: [":host{display:block}"]
1577
+ }),
1578
+ __param(0, Self()),
1579
+ __metadata("design:paramtypes", [FocusManager])
1580
+ ], FocusContainerComponent);
1581
+ return FocusContainerComponent;
1582
+ }(DisposableComponent));
1583
+
1584
+ var FocusableComponent = /** @class */ (function (_super) {
1585
+ __extends(FocusableComponent, _super);
1586
+ function FocusableComponent(el, focusManager, focusBindingFactory) {
1587
+ var _this = _super.call(this) || this;
1588
+ _this.el = el;
1589
+ _this.focusManager = focusManager;
1590
+ var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
1591
+ if (_this.focusManager) {
1592
+ _this._focusContext = _this.focusManager.registerFocusable(_this);
1593
+ _this.registerDisposable(_this._focusContext);
1594
+ _this.registerDisposable(focusBindingFactory.createBinding(el.nativeElement, _this.focusContext));
1595
+ }
1596
+ return _this;
1597
+ }
1598
+ Object.defineProperty(FocusableComponent.prototype, "focusable", {
1599
+ get: function () {
1600
+ return !!this.focusContext ? 0 : undefined;
1601
+ },
1602
+ enumerable: true,
1603
+ configurable: true
1604
+ });
1605
+ FocusableComponent.prototype.onFocus = function () {
1606
+ var _a;
1607
+ (_a = this.focusContext) === null || _a === void 0 ? void 0 : _a.notifyFocusIn();
1608
+ };
1609
+ FocusableComponent.prototype.onBlur = function () {
1610
+ var _a;
1611
+ (_a = this.focusContext) === null || _a === void 0 ? void 0 : _a.notifyFocusOut();
1612
+ };
1613
+ Object.defineProperty(FocusableComponent.prototype, "focusContext", {
1614
+ get: function () {
1615
+ return this._focusContext;
1616
+ },
1617
+ enumerable: true,
1618
+ configurable: true
1619
+ });
1620
+ FocusableComponent.ctorParameters = function () { return [
1621
+ { type: ElementRef },
1622
+ { type: FocusManager },
1623
+ { type: FocusBindingFactory }
1624
+ ]; };
1625
+ __decorate([
1626
+ HostBinding('attr.tabindex'),
1627
+ __metadata("design:type", Object),
1628
+ __metadata("design:paramtypes", [])
1629
+ ], FocusableComponent.prototype, "focusable", null);
1630
+ __decorate([
1631
+ HostListener('focus'),
1632
+ __metadata("design:type", Function),
1633
+ __metadata("design:paramtypes", []),
1634
+ __metadata("design:returntype", void 0)
1635
+ ], FocusableComponent.prototype, "onFocus", null);
1636
+ __decorate([
1637
+ HostListener('blur'),
1638
+ __metadata("design:type", Function),
1639
+ __metadata("design:paramtypes", []),
1640
+ __metadata("design:returntype", void 0)
1641
+ ], FocusableComponent.prototype, "onBlur", null);
1642
+ FocusableComponent = __decorate([
1643
+ Component({ template: '' }),
1644
+ __metadata("design:paramtypes", [ElementRef, FocusManager, FocusBindingFactory])
1645
+ ], FocusableComponent);
1646
+ return FocusableComponent;
1647
+ }(DisposableComponent));
1648
+
1649
+ var DialogInteractionContext = /** @class */ (function (_super) {
1650
+ __extends(DialogInteractionContext, _super);
1651
+ function DialogInteractionContext(identifier, api, dialogService, config) {
1652
+ var _this = _super.call(this) || this;
1653
+ _this.identifier = identifier;
1654
+ _this.api = api;
1655
+ _this.dialogService = dialogService;
1656
+ _this.config = config;
1657
+ _this.garbage = new GarbageCollector();
1658
+ assert$1.notNil(dialogService);
1659
+ return _this;
1660
+ }
1661
+ DialogInteractionContext.prototype.cancelActiveActivity = function () {
1662
+ return this.activityContainer.cancelActiveActivity();
1663
+ };
1664
+ DialogInteractionContext.prototype.dispose = function () {
1665
+ if (this.isActive()) {
1666
+ lang.illegalState('Dispose called while active.');
1667
+ }
1668
+ this.garbage.dispose();
1669
+ };
1670
+ DialogInteractionContext.prototype.registerDisposable = function (disposable) {
1671
+ return this.garbage.registerDisposable(disposable);
1672
+ };
1673
+ DialogInteractionContext.prototype.isActive = function () {
1674
+ return !!this.activityContainer && this.activityContainer.isActive();
1675
+ };
1676
+ DialogInteractionContext.prototype.createAndLaunchActivity = function (activityType, data, disableClose) {
1677
+ var _this = this;
1678
+ assert$1.isNil(this._currentActivityRef);
1679
+ var config = __assign(__assign({}, this.config), {
1680
+ disableClose: disableClose,
1681
+ panelClass: 'dialog-interaction-context'
1682
+ });
1683
+ var self = this;
1684
+ var matDialogRef = this.dialogService.open(ActivityContainerComponent, config);
1685
+ var activityContainer = this.activityContainer = matDialogRef.componentInstance;
1686
+ this.activityContainer.initialise(this.identifier, this.api);
1687
+ var activityResult = this.activityContainer.startActivity(activityType, data);
1688
+ activityResult.finally(function () { return matDialogRef.close(); });
1689
+ // we need to check if our onDone/onCancel methods above we called or if we were
1690
+ // closed by the user clicking the backdrop. If the later then we need to cancel our
1691
+ // activity.
1692
+ matDialogRef.afterClosed().subscribe(function (promiseAlreadyFinished) {
1693
+ if (activityContainer.isActive()) {
1694
+ activityContainer.cancelActiveActivity();
1695
+ }
1696
+ _this.activityContainer = null;
1697
+ });
1698
+ matDialogRef.updateSize();
1699
+ matDialogRef.afterOpened().subscribe(function (promiseAlreadyFinished) {
1700
+ matDialogRef.updateSize();
1701
+ });
1702
+ return activityResult;
1703
+ };
1704
+ return DialogInteractionContext;
1705
+ }(AbstractInteractionContext));
1706
+
1707
+ var DIALOG_INTERACTION_SERVICE_DEFAULTS = new InjectionToken('DIALOG_INTERACTION_SERVICE_DEFAULTS');
1708
+ var DialogInteractionContextFactory = /** @class */ (function (_super) {
1709
+ __extends(DialogInteractionContextFactory, _super);
1710
+ function DialogInteractionContextFactory(dialogService, dialogServiceDefaults, matDialogDefaultConfig) {
1711
+ var _this = _super.call(this) || this;
1712
+ _this.dialogService = dialogService;
1713
+ _this.dialogServiceDefaults = dialogServiceDefaults;
1714
+ _this.matDialogDefaultConfig = matDialogDefaultConfig;
1715
+ assert$1.notNil(dialogService);
1716
+ return _this;
1717
+ }
1718
+ DialogInteractionContextFactory.prototype.createInteractionContext = function (identifier, api) {
1719
+ var config = __assign(__assign({ autoFocus: false, hasBackdrop: true, closeOnNavigation: false }, this.matDialogDefaultConfig), this.dialogServiceDefaults);
1720
+ return new DialogInteractionContext(identifier, api, this.dialogService, config);
1722
1721
  };
1723
1722
  DialogInteractionContextFactory.ctorParameters = function () { return [
1724
1723
  { type: MatDialog },
@@ -2322,283 +2321,96 @@ var SwitchCaseComponent = /** @class */ (function (_super) {
2322
2321
  SwitchCaseComponent.ctorParameters = function () { return [
2323
2322
  { type: ChangeDetectorRef }
2324
2323
  ]; };
2325
- __decorate([
2326
- Input(), TrackExternal(),
2327
- __metadata("design:type", ValueModel)
2328
- ], SwitchCaseComponent.prototype, "switchModel", void 0);
2329
- __decorate([
2330
- Input(), StoreInValueModel('switchModel'),
2331
- __metadata("design:type", Object)
2332
- ], SwitchCaseComponent.prototype, "switch", void 0);
2333
- __decorate([
2334
- ContentChildren(SwitchCaseOption),
2335
- __metadata("design:type", QueryList)
2336
- ], SwitchCaseComponent.prototype, "switchCaseOptions", void 0);
2337
- SwitchCaseComponent = __decorate([
2338
- Component({
2339
- selector: 'aup-switch-case',
2340
- 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",
2341
- styles: [":host{display:flex;flex-direction:column;align-items:stretch}mat-tab-group{flex:1}"]
2342
- }),
2343
- __metadata("design:paramtypes", [ChangeDetectorRef])
2344
- ], SwitchCaseComponent);
2345
- return SwitchCaseComponent;
2346
- }(DisposableComponent));
2347
-
2348
- var DefaultCellRendererComponent = /** @class */ (function () {
2349
- function DefaultCellRendererComponent() {
2350
- }
2351
- Object.defineProperty(DefaultCellRendererComponent.prototype, "value", {
2352
- get: function () {
2353
- return this._value;
2354
- },
2355
- set: function (value) {
2356
- this._value = value;
2357
- },
2358
- enumerable: true,
2359
- configurable: true
2360
- });
2361
- __decorate([
2362
- Input(),
2363
- __metadata("design:type", Object),
2364
- __metadata("design:paramtypes", [Object])
2365
- ], DefaultCellRendererComponent.prototype, "value", null);
2366
- DefaultCellRendererComponent = __decorate([
2367
- Component({
2368
- selector: 'aup-default-cell-renderer',
2369
- template: "{{value}}\n",
2370
- styles: [""]
2371
- }),
2372
- __metadata("design:paramtypes", [])
2373
- ], DefaultCellRendererComponent);
2374
- return DefaultCellRendererComponent;
2375
- }());
2376
-
2377
- var DefaultHeaderCellRendererComponent = /** @class */ (function () {
2378
- function DefaultHeaderCellRendererComponent() {
2379
- }
2380
- __decorate([
2381
- Input(),
2382
- __metadata("design:type", ColumnModel)
2383
- ], DefaultHeaderCellRendererComponent.prototype, "columnModel", void 0);
2384
- DefaultHeaderCellRendererComponent = __decorate([
2385
- Component({
2386
- selector: 'aup-default-header-renderer',
2387
- template: "{{columnModel.getHeaderText()}}\n",
2388
- styles: [""]
2389
- }),
2390
- __metadata("design:paramtypes", [])
2391
- ], DefaultHeaderCellRendererComponent);
2392
- return DefaultHeaderCellRendererComponent;
2393
- }());
2394
-
2395
- // export type StringPropertiesOf<T> = { [K in keyof T]: T[K] extends string ? K : never }[keyof T];
2396
- // export type NumberPropertiesOf<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];
2397
- /**
2398
- * Example:
2399
- * @example
2400
- * const model = TableModel.fromList(heroList, table => {
2401
- * table.pluck("firstName");
2402
- * table.pluck("lastName");
2403
- * table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
2404
- * });
2405
- *
2406
- * Editable tables
2407
- * @example
2408
- * const saveCommand = UnaryCommand.create((form: Form<Hero>) => {
2409
- * if (form.validate()) {
2410
- * // normal form save stuff
2411
- * return true; // finish editing
2412
- * }
2413
- * return false; // continue editiing
2414
- * }
2415
- * const colorsNames: ListModel<string> = ...;
2416
- * const model = TableModel.fromList(heroList, table => {
2417
- * table.pluck("firstName").cellEditor(StringInputComponent); <-- interface CellEditor { valueModel: FormValueModel<string> | ValueModel<string>; }
2418
- * table.pluck("lastName").cellEditor(StringInputComponent, {
2419
- * validators: [Validator.present("We need a last name")]
2420
- * });
2421
- * table.pluck("age").cellEditor(NumberInputComponent);
2422
- * table.pluck("favoriteColor").cellEditor(SelectInputComponent, {
2423
- * initialiseComponent(component: SelectInputComponent) {
2424
- * selectInput.optionsModel = colorsNames; // <- initialise our component
2425
- * }
2426
- * });
2427
- * table.addEditControls(saveCommand); // <- required to enable editing
2428
- * });
2429
- *
2430
- * Selection models
2431
- * @example
2432
- * const model = TableModel.fromList(heroList, table => {
2433
- * table.addSelectionColumn(selectionModel); // <- can be single or multiple selection model
2434
- * table.pluck("firstName");
2435
- * table.pluck("lastName");
2436
- * });
2437
- *
2438
- * Custom cell renderers and editors
2439
- * @example
2440
- * const model = TableModel.fromList(heroList, table => {
2441
- * table.pluck("favoriteColor")
2442
- * .cellHeaderRenderer(CellHeaderRendererComponent, (component, column) => {
2443
- * // configure your component with what ever you need.
2444
- * });
2445
- * .cellRenderer(CellRendererComponent) // <-- interface CellEditor { value: string; }
2446
- * .cellEditor(CellEditorComponent.); // <-- interface CellEditor { valueModel: FormValueModel<string> | ValueModel<string>; }
2447
- * table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
2448
- * });
2449
- *
2450
- * I18n
2451
- * @example
2452
- * [table.yml]
2453
- * table:
2454
- * columns(ColumnTextProperties[]):
2455
- * firstName:
2456
- * headerText: "First Name"
2457
- * fullName:
2458
- * headerText: "Full Name"
2459
- *
2460
- * const model = TableModel.fromList(heroList, table => {
2461
- * table.pluck("favoriteColor").cellRenderer(...).cellEditor(...);
2462
- * table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
2463
- *
2464
- * table.columnTextProperties(I18n.table.columns); // <- configures all columns
2465
- * });
2466
- */
2467
- var TableModel = /** @class */ (function () {
2468
- function TableModel(sourceOfTruth) {
2469
- this.sourceOfTruth = sourceOfTruth;
2470
- this._garbage = new GarbageCollector();
2471
- this._columns = new MutableListModel();
2472
- this._editorSessions = new MutableListModel();
2473
- this.identityOf = sourceOfTruth.identityOf;
2474
- var _a = 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;
2475
- this._columnsById = chain(this._columns).indexBy('columnId');
2476
- this._rowsBeingEdited = new MutableListModel([], {
2477
- identifiedWith: this.identityOf
2478
- });
2479
- this._editorSessionByRowId = chain(this._editorSessions).indexBy('rowId');
2480
- this.editing = chain(this._editorSessions).count().isGreaterThan(0);
2481
- this.dataSource = chain(this.sourceOfTruth).replaceAll(this.rowsBeingEdited);
2482
- }
2483
- TableModel_1 = TableModel;
2484
- TableModel.fromList = function (sourceOfTruth, builder) {
2485
- var model = new TableModel_1(sourceOfTruth);
2486
- builder(model);
2487
- return model;
2488
- };
2489
- Object.defineProperty(TableModel.prototype, "rowsBeingEdited", {
2490
- get: function () {
2491
- return this._rowsBeingEdited.readonly;
2492
- },
2493
- enumerable: true,
2494
- configurable: true
2495
- });
2496
- TableModel.prototype.getTrackByFunction = function () {
2497
- var _this = this;
2498
- return function (index, item) {
2499
- return _this.identityOf ? _this.identityOf(item) : index;
2500
- };
2501
- };
2502
- Object.defineProperty(TableModel.prototype, "columns", {
2503
- get: function () {
2504
- return this._columns.readonly;
2505
- },
2506
- enumerable: true,
2507
- configurable: true
2508
- });
2509
- TableModel.prototype.pluck = function (property) {
2510
- return this.addColumn(new PropertyColumnModel(property, this));
2511
- };
2512
- TableModel.prototype.addSelectionColumn = function (selectionModel) {
2513
- return this.addColumn(new SelectionColumnModel('selection', this, selectionModel));
2514
- };
2515
- TableModel.prototype.addEditControls = function (saveCommand) {
2516
- this.saveCommand = saveCommand;
2517
- return this.addColumn(new EditorControlColumnModel('editControls', saveCommand, this));
2518
- };
2519
- TableModel.prototype.addCustomColumn = function (columnId, dataAccessor) {
2520
- return this.addColumn(new CustomValueColumnModel(columnId, this, dataAccessor));
2521
- };
2522
- TableModel.prototype.addColumn = function (column) {
2523
- if (this._columnsById.get(column.columnId)) {
2524
- lang.illegalState("Column with id=" + column.columnId + " already exists");
2525
- }
2526
- else {
2527
- this._columns.push(column);
2528
- }
2529
- return column;
2530
- };
2531
- TableModel.prototype.columnTextProperties = function (columnTextProperties) {
2532
- this._columnTextPropertiesLookup = columnTextProperties;
2533
- };
2534
- TableModel.prototype.getColumnTextProperties = function (column) {
2535
- var factory = this._columnTextPropertiesLookup[column.columnId];
2536
- return factory ? factory() : undefined;
2537
- };
2538
- TableModel.prototype.startEditSession = function (row) {
2539
- var _this = this;
2540
- var rowId = this.identityOf(row);
2541
- if (this._rowsBeingEdited.query().indexOf(row) > -1) {
2542
- return lang.illegalState("Row with id=" + rowId + " already being edited");
2543
- }
2544
- else {
2545
- var editSession_1 = new TableModel_1.EditSession(rowId, row, this.saveCommand);
2546
- var when = Dsl.disposeWith(editSession_1).when;
2547
- when.valueOf(editSession_1.rowValueModel).changes(function (editedValue) {
2548
- _this._rowsBeingEdited.replaceOrPush(editedValue);
2549
- }, { initialValue: 'triggerChangeUnlessNil' });
2550
- this._editorSessions.push(editSession_1);
2551
- editSession_1.onDispose(function () {
2552
- _this._rowsBeingEdited.remove(editSession_1.rowValueModel.value);
2553
- _this._editorSessions.remove(editSession_1);
2554
- });
2555
- return editSession_1;
2556
- }
2557
- };
2558
- TableModel.prototype.getEditSessionFor = function (row) {
2559
- return this._editorSessionByRowId.get(this.identityOf(row));
2560
- };
2561
- TableModel.prototype.cancelAllEditorSessions = function () {
2562
- var _this = this;
2563
- this._editorSessions.runInTransaction(function (draft) {
2564
- _this._rowsBeingEdited.runInTransaction(function () {
2565
- draft.value.forEach(function (session) { return session.dispose(); });
2566
- });
2567
- });
2568
- };
2569
- var TableModel_1;
2570
- TableModel.ctorParameters = function () { return [
2571
- { type: ListModel }
2572
- ]; };
2573
- TableModel = TableModel_1 = __decorate([
2574
- TrackExternal.Strategy(new TrackExternal.OneTimeBinding()),
2575
- __metadata("design:paramtypes", [ListModel])
2576
- ], TableModel);
2577
- return TableModel;
2324
+ __decorate([
2325
+ Input(), TrackExternal(),
2326
+ __metadata("design:type", ValueModel)
2327
+ ], SwitchCaseComponent.prototype, "switchModel", void 0);
2328
+ __decorate([
2329
+ Input(), StoreInValueModel('switchModel'),
2330
+ __metadata("design:type", Object)
2331
+ ], SwitchCaseComponent.prototype, "switch", void 0);
2332
+ __decorate([
2333
+ ContentChildren(SwitchCaseOption),
2334
+ __metadata("design:type", QueryList)
2335
+ ], SwitchCaseComponent.prototype, "switchCaseOptions", void 0);
2336
+ SwitchCaseComponent = __decorate([
2337
+ Component({
2338
+ selector: 'aup-switch-case',
2339
+ 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",
2340
+ styles: [":host{display:flex;flex-direction:column;align-items:stretch}mat-tab-group{flex:1}"]
2341
+ }),
2342
+ __metadata("design:paramtypes", [ChangeDetectorRef])
2343
+ ], SwitchCaseComponent);
2344
+ return SwitchCaseComponent;
2345
+ }(DisposableComponent));
2346
+
2347
+ var DefaultCellRendererComponent = /** @class */ (function () {
2348
+ function DefaultCellRendererComponent() {
2349
+ }
2350
+ Object.defineProperty(DefaultCellRendererComponent.prototype, "value", {
2351
+ get: function () {
2352
+ return this._value;
2353
+ },
2354
+ set: function (value) {
2355
+ this._value = value;
2356
+ },
2357
+ enumerable: true,
2358
+ configurable: true
2359
+ });
2360
+ __decorate([
2361
+ Input(),
2362
+ __metadata("design:type", Object),
2363
+ __metadata("design:paramtypes", [Object])
2364
+ ], DefaultCellRendererComponent.prototype, "value", null);
2365
+ DefaultCellRendererComponent = __decorate([
2366
+ Component({
2367
+ selector: 'aup-default-cell-renderer',
2368
+ template: "{{value}}\n",
2369
+ styles: [""]
2370
+ }),
2371
+ __metadata("design:paramtypes", [])
2372
+ ], DefaultCellRendererComponent);
2373
+ return DefaultCellRendererComponent;
2578
2374
  }());
2579
- (function (TableModel) {
2580
- var EditSession = /** @class */ (function (_super) {
2581
- __extends(EditSession, _super);
2582
- function EditSession(rowId, row, saveCommand) {
2583
- var _this = _super.call(this) || this;
2584
- _this.rowId = rowId;
2585
- _this.saveCommand = saveCommand;
2586
- _this._editorValue = new MutableValueModel();
2587
- _this.rowValueModel = _this._editorValue.readonly;
2588
- _this.form = new Form();
2589
- _this.form.load(row);
2590
- _this._editorValue.value = row;
2591
- _this.form.onEdit(function () {
2592
- _this._editorValue.value = produce(_this._editorValue.value, function (draft) {
2593
- _this.form.writeDirtyStateTo(draft);
2594
- });
2375
+
2376
+ var DefaultHeaderCellRendererComponent = /** @class */ (function () {
2377
+ function DefaultHeaderCellRendererComponent() {
2378
+ }
2379
+ __decorate([
2380
+ Input(),
2381
+ __metadata("design:type", String)
2382
+ ], DefaultHeaderCellRendererComponent.prototype, "headerText", void 0);
2383
+ DefaultHeaderCellRendererComponent = __decorate([
2384
+ Component({
2385
+ selector: 'aup-default-header-renderer',
2386
+ template: "{{headerText}}\n",
2387
+ styles: [""]
2388
+ }),
2389
+ __metadata("design:paramtypes", [])
2390
+ ], DefaultHeaderCellRendererComponent);
2391
+ return DefaultHeaderCellRendererComponent;
2392
+ }());
2393
+
2394
+ var EditSession = /** @class */ (function (_super) {
2395
+ __extends(EditSession, _super);
2396
+ function EditSession(rowId, row, saveCommand) {
2397
+ var _this = _super.call(this) || this;
2398
+ _this.rowId = rowId;
2399
+ _this.saveCommand = saveCommand;
2400
+ _this._editorValue = new MutableValueModel();
2401
+ _this.rowValueModel = _this._editorValue.readonly;
2402
+ _this.form = new Form();
2403
+ _this.form.load(row);
2404
+ _this._editorValue.value = row;
2405
+ _this.form.onEdit(function () {
2406
+ _this._editorValue.value = produce(_this._editorValue.value, function (draft) {
2407
+ _this.form.writeDirtyStateTo(draft);
2595
2408
  });
2596
- return _this;
2597
- }
2598
- return EditSession;
2599
- }(GarbageCollector));
2600
- TableModel.EditSession = EditSession;
2601
- })(TableModel || (TableModel = {}));
2409
+ });
2410
+ return _this;
2411
+ }
2412
+ return EditSession;
2413
+ }(GarbageCollector));
2602
2414
 
2603
2415
  var EditRowControls = /** @class */ (function (_super) {
2604
2416
  __extends(EditRowControls, _super);
@@ -2638,7 +2450,7 @@ var EditRowControls = /** @class */ (function (_super) {
2638
2450
  ], EditRowControls.prototype, "editRowCommand", void 0);
2639
2451
  __decorate([
2640
2452
  Input(),
2641
- __metadata("design:type", TableModel.EditSession)
2453
+ __metadata("design:type", EditSession)
2642
2454
  ], EditRowControls.prototype, "editSession", void 0);
2643
2455
  EditRowControls = __decorate([
2644
2456
  Component({
@@ -2728,7 +2540,7 @@ var ColumnModel = /** @class */ (function () {
2728
2540
  this.columnId = columnId;
2729
2541
  this.defaults = defaults;
2730
2542
  this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, function (component, column) {
2731
- component.columnModel = column;
2543
+ component.headerText = column.getHeaderText();
2732
2544
  });
2733
2545
  }
2734
2546
  ColumnModel.prototype.getHeaderText = function () {
@@ -2756,6 +2568,7 @@ var ColumnModel = /** @class */ (function () {
2756
2568
  portal: new ComponentPortal(cellRenderer),
2757
2569
  initialiseComponent: initialiser
2758
2570
  };
2571
+ return this;
2759
2572
  };
2760
2573
  ColumnModel.prototype.setCellEditor = function (cellEditor) {
2761
2574
  this._cellEditorConfig = cellEditor;
@@ -2813,14 +2626,16 @@ var PropertyColumnModel = /** @class */ (function (_super) {
2813
2626
  function PropertyColumnModel(property, defaults) {
2814
2627
  var _this = _super.call(this, property.toString(), defaults) || this;
2815
2628
  _this.property = property;
2629
+ _this._format = function (value) { return value; };
2816
2630
  _this.cellRenderer(DefaultCellRendererComponent);
2817
2631
  return _this;
2818
2632
  }
2819
2633
  PropertyColumnModel.prototype.cellRenderer = function (componentType) {
2820
2634
  var _this = this;
2821
2635
  this.setCellRenderer(componentType, function (component, row) {
2822
- component.value = row[_this.property];
2636
+ component.value = _this._format(row[_this.property]);
2823
2637
  });
2638
+ return this;
2824
2639
  };
2825
2640
  PropertyColumnModel.prototype.cellEditor = function (editor, options) {
2826
2641
  var _this = this;
@@ -2839,6 +2654,11 @@ var PropertyColumnModel = /** @class */ (function (_super) {
2839
2654
  });
2840
2655
  return this;
2841
2656
  };
2657
+ PropertyColumnModel.prototype.format = function (formatter) {
2658
+ assert$1.isFunction(formatter);
2659
+ this._format = formatter;
2660
+ return this;
2661
+ };
2842
2662
  return PropertyColumnModel;
2843
2663
  }(ColumnModel));
2844
2664
  var CustomValueColumnModel = /** @class */ (function (_super) {
@@ -2854,6 +2674,7 @@ var CustomValueColumnModel = /** @class */ (function (_super) {
2854
2674
  this.setCellRenderer(componentType, function (component, row) {
2855
2675
  component.value = _this.getValue(row);
2856
2676
  });
2677
+ return this;
2857
2678
  };
2858
2679
  return CustomValueColumnModel;
2859
2680
  }(ColumnModel));
@@ -2870,6 +2691,7 @@ var EditorControlColumnModel = /** @class */ (function (_super) {
2870
2691
  component.editSession = editSession;
2871
2692
  component.editRowCommand = editRowCommand;
2872
2693
  });
2694
+ return this;
2873
2695
  };
2874
2696
  EditorControlColumnModel.prototype.getDefaultHeaderText = function () {
2875
2697
  return '';
@@ -2892,17 +2714,202 @@ var SelectionColumnModel = /** @class */ (function (_super) {
2892
2714
  component.selectionModel = selectionModel;
2893
2715
  });
2894
2716
  }
2895
- _this.setCellRenderer(SelectCellRendererComponent, function (component, row, editRowCommand, editSession) {
2896
- component.row = row;
2897
- component.selectionModel = selectionModel;
2717
+ _this.setCellRenderer(SelectCellRendererComponent, function (component, row, editRowCommand, editSession) {
2718
+ component.row = row;
2719
+ component.selectionModel = selectionModel;
2720
+ });
2721
+ return _this;
2722
+ }
2723
+ SelectionColumnModel.prototype.getDefaultHeaderText = function () {
2724
+ return '';
2725
+ };
2726
+ return SelectionColumnModel;
2727
+ }(ColumnModel));
2728
+
2729
+ // export type StringPropertiesOf<T> = { [K in keyof T]: T[K] extends string ? K : never }[keyof T];
2730
+ // export type NumberPropertiesOf<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];
2731
+ /**
2732
+ * Example:
2733
+ * @example
2734
+ * const model = TableModel.fromList(heroList, table => {
2735
+ * table.pluck("firstName");
2736
+ * table.pluck("lastName");
2737
+ * table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
2738
+ * });
2739
+ *
2740
+ * Editable tables
2741
+ * @example
2742
+ * const saveCommand = UnaryCommand.create((form: Form<Hero>) => {
2743
+ * if (form.validate()) {
2744
+ * // normal form save stuff
2745
+ * return true; // finish editing
2746
+ * }
2747
+ * return false; // continue editiing
2748
+ * }
2749
+ * const colorsNames: ListModel<string> = ...;
2750
+ * const model = TableModel.fromList(heroList, table => {
2751
+ * table.pluck("firstName").cellEditor(StringInputComponent); <-- interface CellEditor { valueModel: FormValueModel<string> | ValueModel<string>; }
2752
+ * table.pluck("lastName").cellEditor(StringInputComponent, {
2753
+ * validators: [Validator.present("We need a last name")]
2754
+ * });
2755
+ * table.pluck("age").cellEditor(NumberInputComponent);
2756
+ * table.pluck("favoriteColor").cellEditor(SelectInputComponent, {
2757
+ * initialiseComponent(component: SelectInputComponent) {
2758
+ * selectInput.optionsModel = colorsNames; // <- initialise our component
2759
+ * }
2760
+ * });
2761
+ * table.addEditControls(saveCommand); // <- required to enable editing
2762
+ * });
2763
+ *
2764
+ * Selection models
2765
+ * @example
2766
+ * const model = TableModel.fromList(heroList, table => {
2767
+ * table.addSelectionColumn(selectionModel); // <- can be single or multiple selection model
2768
+ * table.pluck("firstName");
2769
+ * table.pluck("lastName");
2770
+ * });
2771
+ *
2772
+ * Custom cell renderers and editors
2773
+ * @example
2774
+ * const model = TableModel.fromList(heroList, table => {
2775
+ * table.pluck("favoriteColor")
2776
+ * .cellHeaderRenderer(CellHeaderRendererComponent, (component, column) => {
2777
+ * // configure your component with what ever you need.
2778
+ * });
2779
+ * .cellRenderer(CellRendererComponent) // <-- interface CellEditor { value: string; }
2780
+ * .cellEditor(CellEditorComponent.); // <-- interface CellEditor { valueModel: FormValueModel<string> | ValueModel<string>; }
2781
+ * table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
2782
+ * });
2783
+ *
2784
+ * I18n
2785
+ * @example
2786
+ * [table.yml]
2787
+ * table:
2788
+ * columns(ColumnTextProperties[]):
2789
+ * firstName:
2790
+ * headerText: "First Name"
2791
+ * fullName:
2792
+ * headerText: "Full Name"
2793
+ *
2794
+ * const model = TableModel.fromList(heroList, table => {
2795
+ * table.pluck("favoriteColor").cellRenderer(...).cellEditor(...);
2796
+ * table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
2797
+ *
2798
+ * table.columnTextProperties(I18n.table.columns); // <- configures all columns
2799
+ * });
2800
+ */
2801
+ var TableModel = /** @class */ (function () {
2802
+ function TableModel(sourceOfTruth) {
2803
+ this.sourceOfTruth = sourceOfTruth;
2804
+ this._garbage = new GarbageCollector();
2805
+ this._columns = new MutableListModel();
2806
+ this._editorSessions = new MutableListModel();
2807
+ this.identityOf = sourceOfTruth.identityOf;
2808
+ var _a = 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;
2809
+ this._columnsById = chain(this._columns).indexBy('columnId');
2810
+ this._rowsBeingEdited = new MutableListModel([], {
2811
+ identifiedWith: this.identityOf
2812
+ });
2813
+ this._editorSessionByRowId = chain(this._editorSessions).indexBy('rowId');
2814
+ this.editing = chain(this._editorSessions).count().isGreaterThan(0);
2815
+ this.dataSource = chain(this.sourceOfTruth).replaceAll(this.rowsBeingEdited);
2816
+ }
2817
+ TableModel_1 = TableModel;
2818
+ TableModel.fromList = function (sourceOfTruth, builder) {
2819
+ var model = new TableModel_1(sourceOfTruth);
2820
+ builder(model);
2821
+ return model;
2822
+ };
2823
+ Object.defineProperty(TableModel.prototype, "rowsBeingEdited", {
2824
+ get: function () {
2825
+ return this._rowsBeingEdited.readonly;
2826
+ },
2827
+ enumerable: true,
2828
+ configurable: true
2829
+ });
2830
+ TableModel.prototype.getTrackByFunction = function () {
2831
+ var _this = this;
2832
+ return function (index, item) {
2833
+ return _this.identityOf ? _this.identityOf(item) : index;
2834
+ };
2835
+ };
2836
+ Object.defineProperty(TableModel.prototype, "columns", {
2837
+ get: function () {
2838
+ return this._columns.readonly;
2839
+ },
2840
+ enumerable: true,
2841
+ configurable: true
2842
+ });
2843
+ TableModel.prototype.pluck = function (property) {
2844
+ return this.addColumn(new PropertyColumnModel(property, this));
2845
+ };
2846
+ TableModel.prototype.addSelectionColumn = function (selectionModel) {
2847
+ return this.addColumn(new SelectionColumnModel('selection', this, selectionModel));
2848
+ };
2849
+ TableModel.prototype.addEditControls = function (saveCommand) {
2850
+ this.saveCommand = saveCommand;
2851
+ return this.addColumn(new EditorControlColumnModel('editControls', saveCommand, this));
2852
+ };
2853
+ TableModel.prototype.addCustomColumn = function (columnId, dataAccessor) {
2854
+ return this.addColumn(new CustomValueColumnModel(columnId, this, dataAccessor));
2855
+ };
2856
+ TableModel.prototype.addColumn = function (column) {
2857
+ if (this._columnsById.get(column.columnId)) {
2858
+ lang.illegalState("Column with id=" + column.columnId + " already exists");
2859
+ }
2860
+ else {
2861
+ this._columns.push(column);
2862
+ }
2863
+ return column;
2864
+ };
2865
+ TableModel.prototype.columnTextProperties = function (columnTextProperties) {
2866
+ this._columnTextPropertiesLookup = columnTextProperties;
2867
+ };
2868
+ TableModel.prototype.getColumnTextProperties = function (column) {
2869
+ var factory = this._columnTextPropertiesLookup ? this._columnTextPropertiesLookup[column.columnId] : undefined;
2870
+ return factory ? factory() : undefined;
2871
+ };
2872
+ TableModel.prototype.startEditSession = function (row) {
2873
+ var _this = this;
2874
+ var rowId = this.identityOf(row);
2875
+ if (this._rowsBeingEdited.query().indexOf(row) > -1) {
2876
+ return lang.illegalState("Row with id=" + rowId + " already being edited");
2877
+ }
2878
+ else {
2879
+ var editSession_1 = new EditSession(rowId, row, this.saveCommand);
2880
+ var when = Dsl.disposeWith(editSession_1).when;
2881
+ when.valueOf(editSession_1.rowValueModel).changes(function (editedValue) {
2882
+ _this._rowsBeingEdited.replaceOrPush(editedValue);
2883
+ }, { initialValue: 'triggerChangeUnlessNil' });
2884
+ this._editorSessions.push(editSession_1);
2885
+ editSession_1.onDispose(function () {
2886
+ _this._rowsBeingEdited.remove(editSession_1.rowValueModel.value);
2887
+ _this._editorSessions.remove(editSession_1);
2888
+ });
2889
+ return editSession_1;
2890
+ }
2891
+ };
2892
+ TableModel.prototype.getEditSessionFor = function (row) {
2893
+ return this._editorSessionByRowId.get(this.identityOf(row));
2894
+ };
2895
+ TableModel.prototype.cancelAllEditorSessions = function () {
2896
+ var _this = this;
2897
+ this._editorSessions.runInTransaction(function (draft) {
2898
+ _this._rowsBeingEdited.runInTransaction(function () {
2899
+ draft.value.forEach(function (session) { return session.dispose(); });
2900
+ });
2898
2901
  });
2899
- return _this;
2900
- }
2901
- SelectionColumnModel.prototype.getDefaultHeaderText = function () {
2902
- return '';
2903
2902
  };
2904
- return SelectionColumnModel;
2905
- }(ColumnModel));
2903
+ var TableModel_1;
2904
+ TableModel.ctorParameters = function () { return [
2905
+ { type: ListModel }
2906
+ ]; };
2907
+ TableModel = TableModel_1 = __decorate([
2908
+ TrackExternal.Strategy(new TrackExternal.OneTimeBinding()),
2909
+ __metadata("design:paramtypes", [ListModel])
2910
+ ], TableModel);
2911
+ return TableModel;
2912
+ }());
2906
2913
 
2907
2914
  /**
2908
2915
  * Create your model:
@@ -3020,7 +3027,7 @@ var TableCellRendererComponent = /** @class */ (function () {
3020
3027
  ], TableCellRendererComponent.prototype, "column", void 0);
3021
3028
  __decorate([
3022
3029
  Input(),
3023
- __metadata("design:type", TableModel.EditSession)
3030
+ __metadata("design:type", EditSession)
3024
3031
  ], TableCellRendererComponent.prototype, "editSession", void 0);
3025
3032
  __decorate([
3026
3033
  Input(),
@@ -3155,117 +3162,6 @@ var VerticalFocusContainerComponent = /** @class */ (function (_super) {
3155
3162
  return VerticalFocusContainerComponent;
3156
3163
  }(FocusContainerComponent));
3157
3164
 
3158
- /**
3159
- * @file Automatically generated by barrelsby.
3160
- */
3161
-
3162
- var ActivityActionsComponent = /** @class */ (function (_super) {
3163
- __extends(ActivityActionsComponent, _super);
3164
- function ActivityActionsComponent() {
3165
- var _this = _super !== null && _super.apply(this, arguments) || this;
3166
- _this.align = 'start';
3167
- return _this;
3168
- }
3169
- Object.defineProperty(ActivityActionsComponent.prototype, "alignEnd", {
3170
- get: function () {
3171
- return this.align === 'end';
3172
- },
3173
- enumerable: true,
3174
- configurable: true
3175
- });
3176
- ActivityActionsComponent.prototype.ngOnInit = function () {
3177
- };
3178
- ActivityActionsComponent.prototype.hasConfirmText = function () {
3179
- return !___default.isEmpty(this.confirmText);
3180
- };
3181
- __decorate([
3182
- Input(),
3183
- TrackExternal(),
3184
- __metadata("design:type", Command)
3185
- ], ActivityActionsComponent.prototype, "confirmCommand", void 0);
3186
- __decorate([
3187
- Input(),
3188
- __metadata("design:type", String)
3189
- ], ActivityActionsComponent.prototype, "confirmText", void 0);
3190
- __decorate([
3191
- Input(),
3192
- TrackExternal(),
3193
- __metadata("design:type", Command)
3194
- ], ActivityActionsComponent.prototype, "cancelCommand", void 0);
3195
- __decorate([
3196
- Input(),
3197
- __metadata("design:type", String)
3198
- ], ActivityActionsComponent.prototype, "align", void 0);
3199
- __decorate([
3200
- HostBinding('class.align-end'),
3201
- __metadata("design:type", Boolean),
3202
- __metadata("design:paramtypes", [])
3203
- ], ActivityActionsComponent.prototype, "alignEnd", null);
3204
- ActivityActionsComponent = __decorate([
3205
- Component({
3206
- selector: 'aup-activity-actions',
3207
- 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",
3208
- 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}"]
3209
- })
3210
- ], ActivityActionsComponent);
3211
- return ActivityActionsComponent;
3212
- }(DisposableComponent));
3213
-
3214
- var InteractionModule = /** @class */ (function () {
3215
- function InteractionModule() {
3216
- }
3217
- InteractionModule = __decorate([
3218
- NgModule({
3219
- imports: [
3220
- CommonModule,
3221
- MatButtonModule,
3222
- MatDialogModule,
3223
- MatTabsModule,
3224
- PortalModule,
3225
- RouterModule,
3226
- MatIconModule,
3227
- DirectivesModule,
3228
- FlexModule,
3229
- GridModule
3230
- ],
3231
- declarations: [
3232
- ActivityContainerComponent,
3233
- ConfirmationDialogComponent,
3234
- ConfirmThenDialogComponent,
3235
- AlertDialogComponent,
3236
- ActivityOutletComponent,
3237
- InPlaceInteractionContextComponent,
3238
- AddItemInteractionContextComponent,
3239
- ActivityActionsComponent,
3240
- PopupInteractionContextComponent,
3241
- InteractionContextTriggerFor
3242
- ],
3243
- exports: [
3244
- ActivityContainerComponent,
3245
- ActivityOutletComponent,
3246
- InPlaceInteractionContextComponent,
3247
- AddItemInteractionContextComponent,
3248
- ActivityActionsComponent,
3249
- PopupInteractionContextComponent,
3250
- InteractionContextTriggerFor
3251
- ],
3252
- entryComponents: [
3253
- ActivityContainerComponent,
3254
- ConfirmationDialogComponent,
3255
- ConfirmThenDialogComponent,
3256
- AlertDialogComponent
3257
- ],
3258
- providers: [
3259
- InteractionService
3260
- // {
3261
- // provide: MAT_TABS_CONFIG, useValue: { animationDuration: "2s" }
3262
- // }
3263
- ]
3264
- })
3265
- ], InteractionModule);
3266
- return InteractionModule;
3267
- }());
3268
-
3269
3165
  var ComponentsModule = /** @class */ (function () {
3270
3166
  function ComponentsModule() {
3271
3167
  }
@@ -5705,6 +5601,118 @@ var slideRightOnEnterAnimation = trigger('slideRightOnEnter', [
5705
5601
  transition(':leave', [animate('{{duration}}', slideLeftOnEnterDef)], { params: { duration: '100ms' } })
5706
5602
  ]);
5707
5603
 
5604
+ /**
5605
+ * @file Automatically generated by barrelsby.
5606
+ */
5607
+
5608
+ var Dimension = /** @class */ (function () {
5609
+ function Dimension(width, height) {
5610
+ this.width = width;
5611
+ this.height = height;
5612
+ }
5613
+ return Dimension;
5614
+ }());
5615
+
5616
+ var Point = /** @class */ (function () {
5617
+ function Point(x, y) {
5618
+ this.x = x;
5619
+ this.y = y;
5620
+ }
5621
+ Point.from = function (data) {
5622
+ return new Point(data.x, data.y);
5623
+ };
5624
+ Point.prototype.translate = function (x, y) {
5625
+ return new Point(this.x + x, this.y + y);
5626
+ };
5627
+ return Point;
5628
+ }());
5629
+
5630
+ var Bounds = /** @class */ (function (_super) {
5631
+ __extends(Bounds, _super);
5632
+ function Bounds(top, left, width, height) {
5633
+ var _this = _super.call(this, width, height) || this;
5634
+ _this.top = top;
5635
+ _this.left = left;
5636
+ _this.width = width;
5637
+ _this.height = height;
5638
+ return _this;
5639
+ }
5640
+ Bounds.prototype.relativePositionOf = function (point) {
5641
+ if (point instanceof MouseEvent) {
5642
+ return new Point(point.clientX - this.left, point.clientY - this.top);
5643
+ }
5644
+ else {
5645
+ return new Point(point.x - this.left, point.y - this.top);
5646
+ }
5647
+ };
5648
+ return Bounds;
5649
+ }(Dimension));
5650
+ (function (Bounds) {
5651
+ function ofElement(element) {
5652
+ var rect = element.getBoundingClientRect();
5653
+ return new Bounds(rect.top, rect.left, rect.width, rect.height);
5654
+ }
5655
+ Bounds.ofElement = ofElement;
5656
+ })(Bounds || (Bounds = {}));
5657
+
5658
+ var ResizeAwareComponent = /** @class */ (function (_super) {
5659
+ __extends(ResizeAwareComponent, _super);
5660
+ function ResizeAwareComponent(elementRef, ngZone) {
5661
+ var _this = _super.call(this) || this;
5662
+ _this.elementRef = elementRef;
5663
+ _this.ngZone = ngZone;
5664
+ _this._boundsModel = new MutableValueModel(new Bounds(0, 0, 0, 0));
5665
+ return _this;
5666
+ }
5667
+ ResizeAwareComponent.prototype.ngAfterViewInit = function () {
5668
+ var _this = this;
5669
+ this.updateBounds();
5670
+ var element = this.elementRef.nativeElement;
5671
+ var ro = new ResizeObserver(function (entries, observer) {
5672
+ _this.ngZone.run(function () { return _this.updateBounds(); });
5673
+ });
5674
+ ro.observe(element);
5675
+ this.onDispose(function () { return ro.disconnect(); });
5676
+ };
5677
+ Object.defineProperty(ResizeAwareComponent.prototype, "boundsModel", {
5678
+ get: function () {
5679
+ return this._boundsModel.readonly;
5680
+ },
5681
+ enumerable: true,
5682
+ configurable: true
5683
+ });
5684
+ Object.defineProperty(ResizeAwareComponent.prototype, "nativeElement", {
5685
+ get: function () {
5686
+ return this.elementRef.nativeElement;
5687
+ },
5688
+ enumerable: true,
5689
+ configurable: true
5690
+ });
5691
+ // TODO: Make this handle body scroll
5692
+ ResizeAwareComponent.prototype.relativePositionOf = function (point) {
5693
+ return this.bounds.relativePositionOf(point);
5694
+ };
5695
+ Object.defineProperty(ResizeAwareComponent.prototype, "bounds", {
5696
+ get: function () {
5697
+ return this._boundsModel.value;
5698
+ },
5699
+ enumerable: true,
5700
+ configurable: true
5701
+ });
5702
+ ResizeAwareComponent.prototype.updateBounds = function () {
5703
+ this._boundsModel.value = Bounds.ofElement(this.nativeElement);
5704
+ };
5705
+ ResizeAwareComponent.ctorParameters = function () { return [
5706
+ { type: ElementRef },
5707
+ { type: NgZone }
5708
+ ]; };
5709
+ ResizeAwareComponent = __decorate([
5710
+ Directive(),
5711
+ __metadata("design:paramtypes", [ElementRef, NgZone])
5712
+ ], ResizeAwareComponent);
5713
+ return ResizeAwareComponent;
5714
+ }(DisposableComponent));
5715
+
5708
5716
  /**
5709
5717
  * @file Automatically generated by barrelsby.
5710
5718
  */
@@ -6120,5 +6128,5 @@ function VisitParameterList(options) {
6120
6128
  * Generated bundle index. Do not edit.
6121
6129
  */
6122
6130
 
6123
- export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, Activity, ActivityActionsComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CardContainerComponent, CheckboxInputComponent, ColumnModel, ColumnTemplateDirective, CommandDirective, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, InPlaceInteractionContextComponent, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ModalInteractionContextFactory, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NumberInputComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupInteractionContextComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputComponent, SelectionColumnModel, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TextInputComponent, UrlService, UrlSnapshot, VerticalFocusContainerComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, DirectivesModule as ɵa, CommandDirective as ɵb, CardContainerComponent as ɵba, TableComponent as ɵbb, EditRowControls as ɵbc, ColumnTemplateDirective as ɵbd, DefaultCellRendererComponent as ɵbe, TableCellRendererComponent as ɵbf, SelectCellRendererComponent as ɵbg, SelectHeaderCellRendererComponent as ɵbh, DefaultHeaderCellRendererComponent as ɵbi, TableHeaderCellRendererComponent as ɵbj, InteractionModule as ɵbk, ActivityContainerComponent as ɵbl, AbstractInteractionContext as ɵbm, ActivityOutletComponent as ɵbn, ConfirmationDialogComponent as ɵbo, ACTIVITY_DATA as ɵbp, Activity as ɵbq, ConfirmThenDialogComponent as ɵbs, AlertDialogComponent as ɵbt, InPlaceInteractionContextComponent as ɵbv, InteractionService as ɵbw, ModalInteractionContextFactory as ɵbx, AddItemInteractionContextComponent as ɵby, ActivityActionsComponent as ɵbz, FocusBindingDirective as ɵc, DisposableComponent as ɵca, PopupInteractionContextComponent as ɵcb, InteractionContextTriggerFor as ɵcc, PlaceModule as ɵcd, EmptyStateComponent as ɵce, BusyOverlayComponent as ɵcf, PlaceOutletComponent as ɵcg, leftRightPlaceAnimation as ɵch, LEFT_RIGHT_PLACE_ANIMATION as ɵci, AUP_PLACE_CONFIG as ɵcj, PlaceRouter as ɵcl, UrlService as ɵcm, PlaceHistory as ɵcn, TabbedPlaceNavigationComponent as ɵco, AbstractPlaceNavigationComponent as ɵcp, ListPlaceNavComponent as ɵcq, SidePlaceNavigationComponent as ɵcr, DisposableComponent as ɵd, FocusBindingFactory as ɵe, ComponentsModule as ɵf, AbstractInputComponent as ɵg, AbstractInputActivity as ɵh, Activity as ɵi, ACTIVITY_DATA as ɵj, NumberInputComponent as ɵk, StringInputComponent as ɵl, StringInputActivity as ɵm, TextInputComponent as ɵn, PasswordInputComponent as ɵo, SelectInputComponent as ɵp, CheckboxInputComponent as ɵq, ScrollContainerComponent as ɵr, NoopComponent as ɵs, SwitchCaseOption as ɵt, SwitchCaseWhenDirective as ɵu, SwitchCaseDefaultDirective as ɵv, SwitchCaseComponent as ɵw, FocusContainerComponent as ɵx, VerticalFocusContainerComponent as ɵy, FocusableComponent as ɵz };
6131
+ export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, Activity, ActivityActionsComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, Bounds, BusyOverlayComponent, CardContainerComponent, CheckboxInputComponent, ColumnModel, ColumnTemplateDirective, CommandDirective, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, InPlaceInteractionContextComponent, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ModalInteractionContextFactory, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NumberInputComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupInteractionContextComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputComponent, SelectionColumnModel, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TextInputComponent, UrlService, UrlSnapshot, VerticalFocusContainerComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationEventsFinish, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, DirectivesModule as ɵa, CommandDirective as ɵb, CardContainerComponent as ɵba, TableComponent as ɵbb, EditRowControls as ɵbc, ColumnTemplateDirective as ɵbd, DefaultCellRendererComponent as ɵbe, TableCellRendererComponent as ɵbf, SelectCellRendererComponent as ɵbg, SelectHeaderCellRendererComponent as ɵbh, DefaultHeaderCellRendererComponent as ɵbi, TableHeaderCellRendererComponent as ɵbj, InteractionModule as ɵbk, ActivityContainerComponent as ɵbl, AbstractInteractionContext as ɵbm, ActivityOutletComponent as ɵbn, ConfirmationDialogComponent as ɵbo, ACTIVITY_DATA as ɵbp, Activity as ɵbq, ConfirmThenDialogComponent as ɵbs, AlertDialogComponent as ɵbt, InPlaceInteractionContextComponent as ɵbv, InteractionService as ɵbw, ModalInteractionContextFactory as ɵbx, AddItemInteractionContextComponent as ɵby, ActivityActionsComponent as ɵbz, FocusBindingDirective as ɵc, PopupInteractionContextComponent as ɵca, InteractionContextTriggerFor as ɵcb, PlaceModule as ɵcc, EmptyStateComponent as ɵcd, BusyOverlayComponent as ɵce, PlaceOutletComponent as ɵcf, leftRightPlaceAnimation as ɵcg, LEFT_RIGHT_PLACE_ANIMATION as ɵch, AUP_PLACE_CONFIG as ɵci, PlaceRouter as ɵck, UrlService as ɵcl, PlaceHistory as ɵcm, TabbedPlaceNavigationComponent as ɵcn, AbstractPlaceNavigationComponent as ɵco, ListPlaceNavComponent as ɵcp, SidePlaceNavigationComponent as ɵcq, DisposableComponent as ɵd, FocusBindingFactory as ɵe, ComponentsModule as ɵf, AbstractInputComponent as ɵg, AbstractInputActivity as ɵh, Activity as ɵi, ACTIVITY_DATA as ɵj, NumberInputComponent as ɵk, StringInputComponent as ɵl, StringInputActivity as ɵm, TextInputComponent as ɵn, PasswordInputComponent as ɵo, SelectInputComponent as ɵp, CheckboxInputComponent as ɵq, ScrollContainerComponent as ɵr, NoopComponent as ɵs, SwitchCaseOption as ɵt, SwitchCaseWhenDirective as ɵu, SwitchCaseDefaultDirective as ɵv, SwitchCaseComponent as ɵw, FocusContainerComponent as ɵx, VerticalFocusContainerComponent as ɵy, FocusableComponent as ɵz };
6124
6132
  //# sourceMappingURL=coolon-angular-ui-powerups.js.map