@coolon/angular-ui-powerups 12.0.0-alpha.2 → 12.0.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 (97) hide show
  1. package/bundles/coolon-angular-ui-powerups.umd.js +429 -292
  2. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  3. package/coolon-angular-ui-powerups.metadata.json +1 -1
  4. package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
  5. package/esm2015/lib/components/alignment.js +7 -0
  6. package/esm2015/lib/components/alignment.js.map +1 -0
  7. package/esm2015/lib/components/alignment.metadata.json +1 -0
  8. package/esm2015/lib/components/commands/command/command.component.js +7 -4
  9. package/esm2015/lib/components/commands/command/command.component.js.map +1 -1
  10. package/esm2015/lib/components/commands/command/command.component.metadata.json +1 -1
  11. package/esm2015/lib/components/commands/command-face/command-face.component.js +1 -1
  12. package/esm2015/lib/components/commands/command-face/command-face.component.metadata.json +1 -1
  13. package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.js.map +1 -1
  14. package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.metadata.json +1 -1
  15. package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.js +1 -1
  16. package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.js.map +1 -1
  17. package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.metadata.json +1 -1
  18. package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.js +1 -1
  19. package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.js.map +1 -1
  20. package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.metadata.json +1 -1
  21. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  22. package/esm2015/lib/components/exports.js +1 -0
  23. package/esm2015/lib/components/exports.js.map +1 -1
  24. package/esm2015/lib/components/exports.metadata.json +1 -1
  25. package/esm2015/lib/components/table/abstract-table-model.js +15 -10
  26. package/esm2015/lib/components/table/abstract-table-model.js.map +1 -1
  27. package/esm2015/lib/components/table/abstract-table-model.metadata.json +1 -1
  28. package/esm2015/lib/components/table/column-model.js +19 -31
  29. package/esm2015/lib/components/table/column-model.js.map +1 -1
  30. package/esm2015/lib/components/table/column-model.metadata.json +1 -1
  31. package/esm2015/lib/components/table/table-model.js +2 -2
  32. package/esm2015/lib/components/table/table-model.js.map +1 -1
  33. package/esm2015/lib/components/tree-table/tree-label-column-model.js +3 -3
  34. package/esm2015/lib/components/tree-table/tree-label-column-model.js.map +1 -1
  35. package/esm2015/lib/components/tree-table/tree-label-column-model.metadata.json +1 -1
  36. package/esm2015/lib/components/tree-table/tree-table-model.js +3 -0
  37. package/esm2015/lib/components/tree-table/tree-table-model.js.map +1 -1
  38. package/esm2015/lib/components/tree-table/tree-table-model.metadata.json +1 -1
  39. package/esm2015/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.js +74 -0
  40. package/esm2015/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.js.map +1 -0
  41. package/esm2015/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.metadata.json +1 -0
  42. package/esm2015/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.ngfactory.js.map +1 -0
  43. package/esm2015/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.js +20 -0
  44. package/esm2015/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.js.map +1 -0
  45. package/esm2015/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.metadata.json +1 -0
  46. package/esm2015/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.ngfactory.js.map +1 -0
  47. package/esm2015/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.scss.shim.ngstyle.js.map +1 -0
  48. package/esm2015/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.js +20 -0
  49. package/esm2015/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.js.map +1 -0
  50. package/esm2015/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.metadata.json +1 -0
  51. package/esm2015/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.ngfactory.js.map +1 -0
  52. package/esm2015/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.scss.shim.ngstyle.js.map +1 -0
  53. package/esm2015/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.js +24 -0
  54. package/esm2015/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.js.map +1 -0
  55. package/esm2015/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.metadata.json +1 -0
  56. package/esm2015/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.ngfactory.js.map +1 -0
  57. package/esm2015/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.scss.shim.ngstyle.js.map +1 -0
  58. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js +0 -1
  59. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.js.map +1 -1
  60. package/esm2015/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.metadata.json +1 -1
  61. package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js +11 -1
  62. package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.js.map +1 -1
  63. package/esm2015/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.metadata.json +1 -1
  64. package/esm2015/lib/interaction/exports.js +4 -0
  65. package/esm2015/lib/interaction/exports.js.map +1 -1
  66. package/esm2015/lib/interaction/exports.metadata.json +1 -1
  67. package/esm2015/lib/interaction/interaction.module.js +13 -2
  68. package/esm2015/lib/interaction/interaction.module.js.map +1 -1
  69. package/esm2015/lib/interaction/interaction.module.metadata.json +1 -1
  70. package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  71. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-navigation-interaction-cancelation-type-determined.js +3 -15
  72. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-navigation-interaction-cancelation-type-determined.js.map +1 -1
  73. package/esm2015/lib/place/navigation/session/event-cleanup/wait-until-link-triggered-navigation-interaction-cancelation-type-determined.metadata.json +1 -1
  74. package/esm2015/lib/place/place-component.js +5 -17
  75. package/esm2015/lib/place/place-component.js.map +1 -1
  76. package/esm2015/lib/place/place-component.metadata.json +1 -1
  77. package/esm2015/lib/place/route/parameter-definition.js +2 -11
  78. package/esm2015/lib/place/route/parameter-definition.js.map +1 -1
  79. package/esm2015/lib/place/route/parameter-definition.metadata.json +1 -1
  80. package/fesm2015/coolon-angular-ui-powerups.js +404 -287
  81. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  82. package/lib/components/alignment.d.ts +7 -0
  83. package/lib/components/commands/command/command.component.d.ts +2 -0
  84. package/lib/components/exports.d.ts +1 -0
  85. package/lib/components/table/abstract-table-model.d.ts +4 -4
  86. package/lib/components/table/column-model.d.ts +7 -10
  87. package/lib/components/table/table-model.d.ts +2 -2
  88. package/lib/components/tree-table/tree-label-column-model.d.ts +1 -1
  89. package/lib/components/tree-table/tree-table-model.d.ts +3 -1
  90. package/lib/interaction/components/activity-triggers/abstract-activity-trigger.component.d.ts +23 -0
  91. package/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.d.ts +6 -0
  92. package/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.d.ts +7 -0
  93. package/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.d.ts +8 -0
  94. package/lib/interaction/components/inplace-interaction-context/in-place-interaction-context.component.d.ts +0 -1
  95. package/lib/interaction/components/popup-interaction-context/popup-interaction-context.component.d.ts +10 -0
  96. package/lib/interaction/exports.d.ts +4 -0
  97. package/package.json +1 -1
@@ -21,7 +21,7 @@ import { MatTableModule } from '@angular/material/table';
21
21
  import { MatTooltipModule } from '@angular/material/tooltip';
22
22
  import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome';
23
23
  import { fas } from '@fortawesome/free-solid-svg-icons';
24
- import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, ValueModel, StoreInValueModel, Command, MutableListModel, StoreInListModel, Disposable, MutableValueModel, DelegatingListModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, ListModel, MultipleSelectionModel, DelegatingSelectionModel, AbstractComputedListModel, DirtyTrackingForm, ComputedListModel, PageController, Deferred, Trace, Functions } from '@coolon/pectin';
24
+ import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, ValueModel, StoreInValueModel, Command, MutableListModel, StoreInListModel, Disposable, MutableValueModel, DelegatingListModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, ListModel, MultipleSelectionModel, DelegatingSelectionModel, AbstractComputedListModel, DirtyTrackingForm, ComputedListModel, PageController, Deferred, Functions } from '@coolon/pectin';
25
25
  import { __decorate, __metadata, __awaiter } from 'tslib';
26
26
  import { DomSanitizer } from '@angular/platform-browser';
27
27
  import * as _ from 'lodash';
@@ -35,7 +35,7 @@ import { FlexModule, GridModule } from '@angular/flex-layout';
35
35
  import * as i1$1 from '@angular/material/dialog';
36
36
  import { MatDialogModule, MatDialog, MatDialogConfig, MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog';
37
37
  import * as i1 from '@angular/router';
38
- import { RouterModule, ActivatedRouteSnapshot, NavigationStart, NavigationCancel, UrlSegment, Router, UrlSerializer, NavigationEnd, NavigationError } from '@angular/router';
38
+ import { RouterModule, ActivatedRouteSnapshot, UrlSegment, Router, UrlSerializer, NavigationStart, NavigationEnd, NavigationError, NavigationCancel } from '@angular/router';
39
39
  import { Overlay, CdkScrollable } from '@angular/cdk/overlay';
40
40
  import { MatListModule } from '@angular/material/list';
41
41
  import { Memoize as Memoize$1 } from '@typescript-plus/fast-memoize-decorator';
@@ -651,7 +651,7 @@ CommandFaceComponent.decorators = [
651
651
  selector: 'aup-command-face',
652
652
  template: "<div class=\"face-container\" *ngFor=\"let face of faceAdapters.value\">\n <aup-icon *ngIf=\"hasIconStart(face)\" [icon]=\"face.icon\"></aup-icon>\n <span *ngIf=\"face.text\">{{face.text}}</span>\n <aup-icon *ngIf=\"hasIconEnd(face)\" [icon]=\"face.icon\"></aup-icon>\n</div>\n",
653
653
  encapsulation: ViewEncapsulation.None,
654
- styles: ["aup-command-face{--icon-gap:var(--aup-command-face-icon-gap);display:inline-grid}aup-command-face>.face-container{grid-column:1;grid-row:1;display:inline-flex;flex-direction:row;align-items:center}aup-command-face>.face-container:not(:first-child){visibility:hidden}aup-command-face>.face-container *+*{margin-left:var(--icon-gap)}aup-command-face.hide-icon aup-icon{visibility:hidden}aup-command-face.centered{justify-items:center}"]
654
+ styles: ["aup-command-face{--icon-gap:var(--aup-command-face-icon-gap);display:inline-grid}aup-command-face>.face-container{grid-column:1;grid-row:1;display:inline-flex;flex-direction:row;align-items:center}aup-command-face>.face-container:not(:first-child){visibility:hidden}aup-command-face>.face-container *+*{margin-left:var(--icon-gap)}aup-command-face.hide-icon aup-icon{visibility:hidden}aup-command-face.centered{justify-items:center}aup-command-face.start{justify-items:self-start}aup-command-face.end{justify-items:self-end}"]
655
655
  },] }
656
656
  ];
657
657
  CommandFaceComponent.ctorParameters = () => [];
@@ -668,6 +668,12 @@ __decorate([
668
668
  __metadata("design:type", Array)
669
669
  ], CommandFaceComponent.prototype, "_rawFaces", void 0);
670
670
 
671
+ const HorizontalAlignment = Enum({
672
+ START: 'start',
673
+ CENTER: 'center',
674
+ END: 'end'
675
+ });
676
+
671
677
  class PopupAwareComponent extends DisposableComponent {
672
678
  constructor(element, parent) {
673
679
  super();
@@ -702,6 +708,7 @@ class CommandComponent extends PopupAwareComponent {
702
708
  constructor(element, parent) {
703
709
  super(element, parent);
704
710
  this.CommandFace = CommandFace;
711
+ this.alignFace = HorizontalAlignment.CENTER;
705
712
  const { chain, switchOn } = Dsl.disposeWith(this);
706
713
  this.faces = chain(this.command.busy).mapToList(busy => {
707
714
  return busy ?
@@ -732,8 +739,8 @@ class CommandComponent extends PopupAwareComponent {
732
739
  CommandComponent.decorators = [
733
740
  { type: Component, args: [{
734
741
  selector: 'aup-command',
735
- template: "<ng-container *ngIf=\"iconOnly.value\">\n <button mat-icon-button [pectinCommand]=\"command\" [color]=\"colorModel.value\" [class.busy]=\"command.busy.value\" [matTooltip]=\"tooltipModel.value\">\n <aup-command-face class=\"centered\" [faces]=\"faces.value\"></aup-command-face>\n </button>\n</ng-container>\n<ng-container *ngIf=\"!iconOnly.value\">\n <ng-container [ngSwitch]=\"buttonStyle.value\">\n <ng-container *ngSwitchCase=\"CommandFace.Style.STROKED\">\n <button mat-stroked-button [pectinCommand]=\"command\" [color]=\"colorModel.value\" [class.busy]=\"command.busy.value\" [matTooltip]=\"tooltipModel.value\">\n <aup-command-face class=\"centered\" [faces]=\"faces.value\"></aup-command-face>\n </button>\n </ng-container>\n <ng-container *ngSwitchCase=\"CommandFace.Style.RAISED\">\n <button mat-raised-button [pectinCommand]=\"command\" [color]=\"colorModel.value\" [class.busy]=\"command.busy.value\" [matTooltip]=\"tooltipModel.value\">\n <aup-command-face class=\"centered\" [faces]=\"faces.value\"></aup-command-face>\n </button>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <button mat-button [pectinCommand]=\"command\" [color]=\"colorModel.value\" [class.busy]=\"command.busy.value\" [matTooltip]=\"tooltipModel.value\">\n <aup-command-face class=\"centered\" [faces]=\"faces.value\"></aup-command-face>\n </button>\n </ng-container>\n </ng-container>\n</ng-container>\n",
736
- styles: [":host{display:inline-flex;flex-direction:row;justify-content:stretch}button{flex:1}"]
742
+ template: "<ng-container *ngIf=\"iconOnly.value\">\n <button mat-icon-button [pectinCommand]=\"command\" [color]=\"colorModel.value\" [class.busy]=\"command.busy.value\"\n [matTooltip]=\"tooltipModel.value\">\n <aup-command-face [class]=\"alignFace\" [faces]=\"faces.value\"></aup-command-face>\n </button>\n</ng-container>\n<ng-container *ngIf=\"!iconOnly.value\">\n <ng-container [ngSwitch]=\"buttonStyle.value\">\n <ng-container *ngSwitchCase=\"CommandFace.Style.STROKED\">\n <button mat-stroked-button [pectinCommand]=\"command\" [color]=\"colorModel.value\" [class.busy]=\"command.busy.value\"\n [matTooltip]=\"tooltipModel.value\">\n <aup-command-face [class]=\"alignFace\" [faces]=\"faces.value\"></aup-command-face>\n </button>\n </ng-container>\n <ng-container *ngSwitchCase=\"CommandFace.Style.RAISED\">\n <button mat-raised-button [pectinCommand]=\"command\" [color]=\"colorModel.value\" [class.busy]=\"command.busy.value\"\n [matTooltip]=\"tooltipModel.value\">\n <aup-command-face [class]=\"alignFace\" [faces]=\"faces.value\"></aup-command-face>\n </button>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <button mat-button [pectinCommand]=\"command\" [color]=\"colorModel.value\" [class.busy]=\"command.busy.value\"\n [matTooltip]=\"tooltipModel.value\">\n <aup-command-face [class]=\"alignFace\" [faces]=\"faces.value\"></aup-command-face>\n </button>\n </ng-container>\n </ng-container>\n</ng-container>\n",
743
+ styles: [":host{display:inline-flex;flex-direction:row;justify-content:stretch}:host.centered button{text-align:center}:host.start button{text-align:start}:host.end button{text-align:end}button{flex:1}"]
737
744
  },] }
738
745
  ];
739
746
  CommandComponent.ctorParameters = () => [
@@ -745,7 +752,8 @@ CommandComponent.propDecorators = {
745
752
  faceModel: [{ type: Input }],
746
753
  face: [{ type: Input }],
747
754
  busyFaceModel: [{ type: Input }],
748
- busyFace: [{ type: Input }]
755
+ busyFace: [{ type: Input }],
756
+ alignFace: [{ type: Input }, { type: HostBinding, args: ["class",] }]
749
757
  };
750
758
  __decorate([
751
759
  TrackExternal(),
@@ -883,7 +891,7 @@ class MoreMenuComponent extends AbstractPopupMenuComponent {
883
891
  MoreMenuComponent.decorators = [
884
892
  { type: Component, args: [{
885
893
  selector: 'aup-more-menu',
886
- template: "<div class=\"content\" style=\"display: none\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"isRoot()\">\n <ng-container *ngIf=\"faceAdapter.text\" [ngSwitch]=\"faceAdapter.style\">\n <ng-container *ngSwitchCase=\"'stroked'\">\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n mat-stroked-button>\n <aup-command-face [faces]=\"[face]\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]=\"this\"\n (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'raised'\">\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n mat-raised-button>\n <aup-command-face [faces]=\"[face]\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]=\"this\"\n (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n mat-button>\n <aup-command-face [faces]=\"[face]\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu [parent]=\"this\" (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngIf=\"!faceAdapter.text\">\n <button matMenuTrigger\n mat-icon-button\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n >\n <aup-command-face [faces]=\"[face]\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]=\"this\"\n (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n</ng-container>\n",
894
+ template: "<div class=\"content\" style=\"display: none\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"isRoot()\">\n <ng-container *ngIf=\"faceAdapter.text\" [ngSwitch]=\"faceAdapter.style\">\n <ng-container *ngSwitchCase=\"'stroked'\">\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n (click) = \"$event.stopPropagation()\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n mat-stroked-button>\n <aup-command-face [faces]=\"[face]\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]=\"this\"\n (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'raised'\">\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n (click) = \"$event.stopPropagation()\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n mat-raised-button>\n <aup-command-face [faces]=\"[face]\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]=\"this\"\n (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n (click) = \"$event.stopPropagation()\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n mat-button>\n <aup-command-face [faces]=\"[face]\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu [parent]=\"this\" (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngIf=\"!faceAdapter.text\">\n <button matMenuTrigger\n mat-icon-button\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n (click) = \"$event.stopPropagation()\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n >\n <aup-command-face [faces]=\"[face]\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]=\"this\"\n (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n</ng-container>\n",
887
895
  providers: [
888
896
  { provide: POPUP_CONTAINER, useExisting: MoreMenuComponent }
889
897
  ]
@@ -1010,7 +1018,7 @@ class PopupMenuComponent extends AbstractPopupMenuComponent {
1010
1018
  PopupMenuComponent.decorators = [
1011
1019
  { type: Component, args: [{
1012
1020
  selector: 'aup-popup-menu',
1013
- template: "<div class=\"content\" style=\"display: none\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"isRoot()\">\n <ng-container *ngIf=\"faceAdapter.text\" [ngSwitch]=\"faceAdapter.style\">\n <ng-container *ngSwitchCase=\"'stroked'\">\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n mat-stroked-button>\n <aup-command-face [faces]=\"[face]\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]=\"this\"\n (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'raised'\">\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n mat-raised-button>\n <aup-command-face [faces]=\"[face]\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]=\"this\"\n (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n mat-button>\n <aup-command-face [faces]=\"[face]\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu [parent]=\"this\" (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngIf=\"!faceAdapter.text\">\n <button matMenuTrigger\n mat-icon-button\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n >\n <aup-command-face [faces]=\"[face]\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]=\"this\"\n (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n</ng-container>\n",
1021
+ template: "<div class=\"content\" style=\"display: none\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"isRoot()\">\n <ng-container *ngIf=\"faceAdapter.text\" [ngSwitch]=\"faceAdapter.style\">\n <ng-container *ngSwitchCase=\"'stroked'\">\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n (click) = \"$event.stopPropagation()\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n mat-stroked-button>\n <aup-command-face [faces]=\"[face]\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]=\"this\"\n (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'raised'\">\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n (click) = \"$event.stopPropagation()\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n mat-raised-button>\n <aup-command-face [faces]=\"[face]\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]=\"this\"\n (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n (click) = \"$event.stopPropagation()\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n mat-button>\n <aup-command-face [faces]=\"[face]\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu [parent]=\"this\" (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngIf=\"!faceAdapter.text\">\n <button matMenuTrigger\n mat-icon-button\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n (click) = \"$event.stopPropagation()\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n [disabled]=\"!enabled\"\n >\n <aup-command-face [faces]=\"[face]\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]=\"this\"\n (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n</ng-container>\n",
1014
1022
  providers: [
1015
1023
  { provide: POPUP_CONTAINER, useExisting: PopupMenuComponent }
1016
1024
  ]
@@ -2243,9 +2251,10 @@ class ColumnModel {
2243
2251
  constructor(columnId, textPropertiesProvider) {
2244
2252
  this.columnId = columnId;
2245
2253
  this.textPropertiesProvider = textPropertiesProvider;
2246
- this._selectRowOnClick = undefined;
2254
+ this._enableRowSelection = true;
2247
2255
  this._flex = false;
2248
- this._visibleModel = new DelegatingValueModel().withDefault(true);
2256
+ this._defaultVisibility = new DelegatingValueModel().withDefault(true);
2257
+ this._visible = new DelegatingValueModel().withDefault(this._defaultVisibility);
2249
2258
  this.installHeaderRenderer();
2250
2259
  this.dasherisedColumnId = Stringy.from(columnId).dasherize().toString();
2251
2260
  }
@@ -2262,12 +2271,15 @@ class ColumnModel {
2262
2271
  return this.visible.value;
2263
2272
  }
2264
2273
  get visible() {
2265
- return this._visibleModel.readonly;
2274
+ return this._visible.readonly;
2266
2275
  }
2267
2276
  visibleWhile(visible) {
2268
- this._visibleModel.setDelegate(visible);
2277
+ this._visible.setDelegate(visible);
2269
2278
  return this;
2270
2279
  }
2280
+ setDefaultVisibility(visible) {
2281
+ this._defaultVisibility.setDelegate(visible);
2282
+ }
2271
2283
  getDefaultHeaderText() {
2272
2284
  return this.columnId;
2273
2285
  }
@@ -2329,18 +2341,12 @@ class ColumnModel {
2329
2341
  updatePortalContent(host) {
2330
2342
  this._cellRendererPortalRef.pushState(host);
2331
2343
  }
2332
- selectRowOnClick(selectOnRowClick) {
2333
- this._selectRowOnClick = selectOnRowClick;
2344
+ _selectRowOnClick(selectRowOnClick) {
2345
+ this._enableRowSelection = selectRowOnClick;
2334
2346
  return this;
2335
2347
  }
2336
2348
  isRowSelectionEnabled() {
2337
- return this._selectRowOnClick;
2338
- }
2339
- isRowSelectionExplicitlyEnabled() {
2340
- return this._selectRowOnClick === true;
2341
- }
2342
- isRowSelectionExplicitlyDisabled() {
2343
- return this._selectRowOnClick === false;
2349
+ return this._enableRowSelection;
2344
2350
  }
2345
2351
  }
2346
2352
  __decorate([
@@ -2438,7 +2444,7 @@ class PropertyColumnModel extends ColumnModel {
2438
2444
  return this;
2439
2445
  }
2440
2446
  selectRowOnClick(selectOnRowClick) {
2441
- return super.selectRowOnClick(selectOnRowClick);
2447
+ return this._selectRowOnClick(selectOnRowClick);
2442
2448
  }
2443
2449
  }
2444
2450
  class ListPropertyColumnModel extends ColumnModel {
@@ -2474,8 +2480,8 @@ class ListPropertyColumnModel extends ColumnModel {
2474
2480
  this._format = formatter;
2475
2481
  return this;
2476
2482
  }
2477
- selectRowOnClick(selectOnRowClick) {
2478
- return super.selectRowOnClick(selectOnRowClick);
2483
+ selectRowOnClick(selectRowOnClick) {
2484
+ return this._selectRowOnClick(selectRowOnClick);
2479
2485
  }
2480
2486
  }
2481
2487
  class CustomValueColumnModel extends ColumnModel {
@@ -2504,7 +2510,7 @@ class CustomValueColumnModel extends ColumnModel {
2504
2510
  return this;
2505
2511
  }
2506
2512
  selectRowOnClick(selectOnRowClick) {
2507
- return super.selectRowOnClick(selectOnRowClick);
2513
+ return this._selectRowOnClick(selectOnRowClick);
2508
2514
  }
2509
2515
  }
2510
2516
  class EditorControlColumnModel extends ColumnModel {
@@ -2534,7 +2540,7 @@ class CustomTemplateColumnModel extends ColumnModel {
2534
2540
  this.config.registerPortal(templateRef, viewContainer, fillCell, padChild);
2535
2541
  }
2536
2542
  selectRowOnClick(selectOnRowClick) {
2537
- return super.selectRowOnClick(selectOnRowClick);
2543
+ return this._selectRowOnClick(selectOnRowClick);
2538
2544
  }
2539
2545
  }
2540
2546
  class SelectionColumnModel extends ColumnModel {
@@ -2542,8 +2548,7 @@ class SelectionColumnModel extends ColumnModel {
2542
2548
  super(columnId, defaults);
2543
2549
  this._enableHeaderControls = true;
2544
2550
  this.selectionModel = DelegatingSelectionModel.createDelegate();
2545
- this.hasSelectionModel = new MutableValueModel(false);
2546
- this.selectOnRowClick(false);
2551
+ this._selectRowOnClick(false);
2547
2552
  this.cellHeaderRenderer(SelectHeaderCellRendererComponent, (component) => {
2548
2553
  component.selectionModel = this.selectionModel;
2549
2554
  component.enableHeaderControls = this._enableHeaderControls;
@@ -2553,23 +2558,14 @@ class SelectionColumnModel extends ColumnModel {
2553
2558
  component.selectionModel = this.selectionModel;
2554
2559
  }));
2555
2560
  this.setSelectionModel(selectionModel);
2556
- this.visibleWhile(this.hasSelectionModel);
2557
2561
  }
2558
2562
  setSelectionModel(selectionModel) {
2559
2563
  this.selectionModel.setDelegate(selectionModel);
2560
- this.hasSelectionModel.value = !!selectionModel;
2564
+ this.setDefaultVisibility(selectionModel instanceof MultipleSelectionModel ? ValueModel.TRUE : ValueModel.FALSE);
2561
2565
  }
2562
2566
  getDefaultHeaderText() {
2563
2567
  return '';
2564
2568
  }
2565
- isRowSelectionEnabledByDefault() {
2566
- return this.isRowSelectionExplicitlyEnabled();
2567
- }
2568
- selectOnRowClick(selectOnRowClick) {
2569
- // note we're using different method name as the selection column treats this
2570
- // state as the default for all columns.
2571
- return super.selectRowOnClick(selectOnRowClick);
2572
- }
2573
2569
  enableHeaderControls(enable) {
2574
2570
  this._enableHeaderControls = enable;
2575
2571
  return this;
@@ -2628,9 +2624,9 @@ class AbstractTableModel extends GarbageCollector {
2628
2624
  this.editing = chain(this._editorSessions).count().isGreaterThan(0);
2629
2625
  this.dataSource = chain(this.sourceOfTruth).replaceAll(this.rowsBeingEdited);
2630
2626
  this.firstEditableColumn = chain(this.columns).select(c => c.hasEditorPortal()).first();
2631
- this.hasColumnsWithRowSelectionExplicitlyEnabled = chain(this._columns).findIndex(column => column.isRowSelectionExplicitlyEnabled()).isGreaterThanOrEqualTo(0);
2632
2627
  this.firstVisibleColumn = chain(this._visibleColumnTracker).first();
2633
2628
  this.lastVisibleColumn = chain(this._visibleColumnTracker).last();
2629
+ this.rowSelectionDisabledOnAllColumns = chain(this._visibleColumnTracker).select(column => column.isRowSelectionEnabled()).count().equals(0);
2634
2630
  }
2635
2631
  get rowsBeingEdited() {
2636
2632
  return this._rowsBeingEdited.readonly;
@@ -2649,12 +2645,16 @@ class AbstractTableModel extends GarbageCollector {
2649
2645
  const columnId = (options === null || options === void 0 ? void 0 : options.columnId) || property.toString();
2650
2646
  return this.addColumn(new ListPropertyColumnModel(columnId, property, () => this.getColumnTextProperties(columnId)));
2651
2647
  }
2652
- _addSelectionColumn(selectionModel) {
2648
+ _addSelectionColumn(selectionModel, visible) {
2653
2649
  assert.isNil(this.selectionColumnModel);
2654
2650
  const columnId = 'selection-column';
2655
2651
  this.selectionColumnModel = new SelectionColumnModel(columnId, () => this.getColumnTextProperties(columnId), selectionModel);
2656
2652
  this.addRowClass('aup-row-selected', row => this.selectionColumnModel.isSelected(row));
2657
- return this.addColumn(this.selectionColumnModel);
2653
+ const selectionColumnModel = this.addColumn(this.selectionColumnModel);
2654
+ if (!_.isNil(visible)) {
2655
+ selectionColumnModel.visibleWhile(visible instanceof ValueModel ? visible : ValueModel.constant(visible));
2656
+ }
2657
+ return selectionColumnModel;
2658
2658
  }
2659
2659
  addEditControls(saveCommand) {
2660
2660
  this.saveCommand = saveCommand;
@@ -2735,14 +2735,14 @@ class AbstractTableModel extends GarbageCollector {
2735
2735
  });
2736
2736
  }
2737
2737
  isRowSelectionEnabledFor(column) {
2738
- var _a;
2739
- return this.selectionColumnModel && ((_a = column.isRowSelectionEnabled()) !== null && _a !== void 0 ? _a : this.isRowSelectionEnabledByDefault());
2740
- }
2741
- isRowSelectionEnabledByDefault() {
2742
- return this.selectionColumnModel && this.selectionColumnModel.isRowSelectionEnabledByDefault();
2738
+ return this.isRowSelectionEnabled() && column.isRowSelectionEnabled();
2743
2739
  }
2744
2740
  isRowSelectionEnabled() {
2745
- return this.hasColumnsWithRowSelectionExplicitlyEnabled.value || this.isRowSelectionEnabledByDefault();
2741
+ return this.hasSelectionModel() && !this.rowSelectionDisabledOnAllColumns.value;
2742
+ }
2743
+ hasSelectionModel() {
2744
+ var _a;
2745
+ return !!((_a = this.selectionColumnModel) === null || _a === void 0 ? void 0 : _a.selectionModel.getDelegate());
2746
2746
  }
2747
2747
  isHoverEnabled() {
2748
2748
  return this.isRowSelectionEnabled() || this.rowClickListeners.listenerCount > 0;
@@ -3426,7 +3426,7 @@ class TreeLabelColumnModel extends ColumnModel {
3426
3426
  constructor(columnId, textPropertiesProvider, expansionModel) {
3427
3427
  super(columnId, textPropertiesProvider);
3428
3428
  this.expansionModel = expansionModel;
3429
- this.iconFactory = (node, expanded) => expanded ? 'mat:folder_open' : 'mat:folder';
3429
+ this.iconFactory = (node, expanded) => expanded ? 'mat:expand_more' : 'mat:chevron_right';
3430
3430
  this.cellRenderer(TreeLabelCellRendererComponent);
3431
3431
  }
3432
3432
  pluck(property) {
@@ -3446,8 +3446,8 @@ class TreeLabelColumnModel extends ColumnModel {
3446
3446
  }));
3447
3447
  return this;
3448
3448
  }
3449
- selectRowOnClick(selectOnRowClick) {
3450
- return super.selectRowOnClick(selectOnRowClick);
3449
+ _selectRowOnClick(selectOnRowClick) {
3450
+ return super._selectRowOnClick(selectOnRowClick);
3451
3451
  }
3452
3452
  }
3453
3453
 
@@ -3596,6 +3596,9 @@ class TreeTableModel extends AbstractTableModel {
3596
3596
  ensureAncestorsAndSelfVisible(node) {
3597
3597
  this.treeExpansionModel.ensureAncestorsAndSelfVisible(node);
3598
3598
  }
3599
+ addSelectionColumn(selectionModel, showSelectionColumn) {
3600
+ return this._addSelectionColumn(selectionModel, showSelectionColumn);
3601
+ }
3599
3602
  }
3600
3603
  class FlattenStrategy extends SelfAndDescendantsVisitor {
3601
3604
  constructor(collapsedIds) {
@@ -4598,6 +4601,74 @@ ActivityTitleComponent.propDecorators = {
4598
4601
  color: [{ type: Input }, { type: HostBinding, args: ['attr.color',] }]
4599
4602
  };
4600
4603
 
4604
+ class AbstractActivityTriggerComponent extends DisposableComponent {
4605
+ constructor() {
4606
+ super();
4607
+ this.alignFace = HorizontalAlignment.CENTER;
4608
+ this.confirmEvent = new EventEmitter();
4609
+ this.cancelEvent = new EventEmitter();
4610
+ this.startActivityCommand = Command.create(() => {
4611
+ assert.notNil(this.activityClass);
4612
+ assert.notNil(this.interactionContext);
4613
+ this.interactionContext.startActivity(this.activityClass, this.activityData)
4614
+ .then(result => {
4615
+ this.confirmEvent.emit(result);
4616
+ }).catch(error => {
4617
+ this.cancelEvent.emit(error);
4618
+ });
4619
+ });
4620
+ }
4621
+ ngOnInit() {
4622
+ }
4623
+ get isActive() {
4624
+ var _a;
4625
+ return (_a = this.interactionContext) === null || _a === void 0 ? void 0 : _a.isActive();
4626
+ }
4627
+ }
4628
+ AbstractActivityTriggerComponent.decorators = [
4629
+ { type: Component, args: [{
4630
+ selector: 'aup-abstract-activity-trigger',
4631
+ template: ''
4632
+ },] }
4633
+ ];
4634
+ AbstractActivityTriggerComponent.ctorParameters = () => [];
4635
+ AbstractActivityTriggerComponent.propDecorators = {
4636
+ activityClass: [{ type: Input }],
4637
+ activityClassModel: [{ type: Input }],
4638
+ activityData: [{ type: Input }],
4639
+ activityDataModel: [{ type: Input }],
4640
+ face: [{ type: Input }],
4641
+ faceModel: [{ type: Input }],
4642
+ alignFace: [{ type: Input }],
4643
+ confirmEvent: [{ type: Output }],
4644
+ cancelEvent: [{ type: Output }],
4645
+ isActive: [{ type: HostBinding, args: ['class.active',] }]
4646
+ };
4647
+ __decorate([
4648
+ StoreInValueModel('activityClassModel'),
4649
+ __metadata("design:type", Object)
4650
+ ], AbstractActivityTriggerComponent.prototype, "activityClass", void 0);
4651
+ __decorate([
4652
+ TrackExternal(),
4653
+ __metadata("design:type", ValueModel)
4654
+ ], AbstractActivityTriggerComponent.prototype, "activityClassModel", void 0);
4655
+ __decorate([
4656
+ StoreInValueModel('activityDataModel'),
4657
+ __metadata("design:type", Object)
4658
+ ], AbstractActivityTriggerComponent.prototype, "activityData", void 0);
4659
+ __decorate([
4660
+ TrackExternal(),
4661
+ __metadata("design:type", ValueModel)
4662
+ ], AbstractActivityTriggerComponent.prototype, "activityDataModel", void 0);
4663
+ __decorate([
4664
+ StoreInValueModel('faceModel'),
4665
+ __metadata("design:type", Object)
4666
+ ], AbstractActivityTriggerComponent.prototype, "face", void 0);
4667
+ __decorate([
4668
+ TrackExternal(),
4669
+ __metadata("design:type", ValueModel)
4670
+ ], AbstractActivityTriggerComponent.prototype, "faceModel", void 0);
4671
+
4601
4672
  class InteractionServiceRoutingAdapter {
4602
4673
  constructor(activeInteractionContextIds, activeModalContext, createExclusiveInteractionContext) {
4603
4674
  this.activeInteractionContextIds = activeInteractionContextIds;
@@ -4765,10 +4836,26 @@ InteractionService.ctorParameters = () => [
4765
4836
  InteractionService.ApiAdapter = ApiAdapter;
4766
4837
  })(InteractionService || (InteractionService = {}));
4767
4838
 
4839
+ class ModalActivityTriggerComponent extends AbstractActivityTriggerComponent {
4840
+ constructor(interactionService) {
4841
+ super();
4842
+ this.interactionContext = interactionService.createModalInteractionContextDisposedWith(this);
4843
+ }
4844
+ }
4845
+ ModalActivityTriggerComponent.decorators = [
4846
+ { type: Component, args: [{
4847
+ selector: 'aup-modal-activity-trigger',
4848
+ template: "<aup-command [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n",
4849
+ styles: [":host{display:inline-block}"]
4850
+ },] }
4851
+ ];
4852
+ ModalActivityTriggerComponent.ctorParameters = () => [
4853
+ { type: InteractionService }
4854
+ ];
4855
+
4768
4856
  /**
4769
4857
  * @example
4770
4858
  * <aup-in-place-interaction-context #inPlaceInteractionContext>
4771
- *
4772
4859
  * </aup-in-place-interaction-context>
4773
4860
  *
4774
4861
  * in your component
@@ -4896,6 +4983,33 @@ __decorate([
4896
4983
  __metadata("design:type", Command)
4897
4984
  ], AddItemInteractionContextComponent.prototype, "addCommand", void 0);
4898
4985
 
4986
+ class InlineActivityTriggerComponent extends AbstractActivityTriggerComponent {
4987
+ constructor() {
4988
+ super();
4989
+ }
4990
+ }
4991
+ InlineActivityTriggerComponent.decorators = [
4992
+ { type: Component, args: [{
4993
+ selector: 'aup-inline-activity-trigger',
4994
+ template: "<aup-in-place-interaction-context #interactionContext [animateFirstActivity]=\"false\">\n <aup-command [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n</aup-in-place-interaction-context>\n",
4995
+ styles: [":host{display:inline-block}"]
4996
+ },] }
4997
+ ];
4998
+ InlineActivityTriggerComponent.ctorParameters = () => [];
4999
+ InlineActivityTriggerComponent.propDecorators = {
5000
+ interactionContext: [{ type: ViewChild, args: [InPlaceInteractionContextComponent, { static: true },] }]
5001
+ };
5002
+
5003
+ /**
5004
+ * <aup-popup-interaction-context #ctx></aup-popup-interaction-context>
5005
+ *
5006
+ * in your component
5007
+ * @ViewChild('inPlaceInteractionContext', { static: true })
5008
+ * interactionContext: InteractionContext;
5009
+ * or
5010
+ * @ViewChild('ctx', { static: true })
5011
+ * interactionContext: InteractionContext;
5012
+ */
4899
5013
  class PopupInteractionContextComponent extends DisposableComponent {
4900
5014
  constructor(_element, _overlay, scrollable) {
4901
5015
  super();
@@ -4968,7 +5082,7 @@ PopupInteractionContextComponent.decorators = [
4968
5082
  { type: Component, args: [{
4969
5083
  selector: 'aup-popup-interaction-context',
4970
5084
  template: "<ng-content></ng-content>\n",
4971
- styles: [":host{display:inline}:host.interaction-active{background:rgba(0,0,0,.05)}"]
5085
+ styles: [":host{display:inline-block}:host.interaction-active{background:rgba(0,0,0,.05)}"]
4972
5086
  },] }
4973
5087
  ];
4974
5088
  PopupInteractionContextComponent.ctorParameters = () => [
@@ -5218,8 +5332,8 @@ class TableModel extends AbstractTableModel {
5218
5332
  builder(model);
5219
5333
  return model;
5220
5334
  }
5221
- addSelectionColumn(selectionModel) {
5222
- return this._addSelectionColumn(selectionModel);
5335
+ addSelectionColumn(selectionModel, showSelectionColumn) {
5336
+ return this._addSelectionColumn(selectionModel, showSelectionColumn);
5223
5337
  }
5224
5338
  }
5225
5339
 
@@ -5227,6 +5341,27 @@ class TableModel extends AbstractTableModel {
5227
5341
  * @file Automatically generated by barrelsby.
5228
5342
  */
5229
5343
 
5344
+ class PopupActivityTriggerComponent extends AbstractActivityTriggerComponent {
5345
+ constructor() {
5346
+ super();
5347
+ this.anchorX = 'start';
5348
+ this.anchorY = 'bottom';
5349
+ }
5350
+ }
5351
+ PopupActivityTriggerComponent.decorators = [
5352
+ { type: Component, args: [{
5353
+ selector: 'aup-popup-activity-trigger',
5354
+ template: "<aup-popup-interaction-context [anchorX]=\"anchorX\" [anchorY]=\"anchorY\">\n <aup-command [command]=\"startActivityCommand\" [faceModel]=\"faceModel\" [alignFace]=\"alignFace\"></aup-command>\n</aup-popup-interaction-context>\n",
5355
+ styles: [":host{display:inline-block}"]
5356
+ },] }
5357
+ ];
5358
+ PopupActivityTriggerComponent.ctorParameters = () => [];
5359
+ PopupActivityTriggerComponent.propDecorators = {
5360
+ anchorX: [{ type: Input }],
5361
+ anchorY: [{ type: Input }],
5362
+ interactionContext: [{ type: ViewChild, args: [PopupInteractionContextComponent, { static: true },] }]
5363
+ };
5364
+
5230
5365
  class InteractionModule {
5231
5366
  }
5232
5367
  InteractionModule.decorators = [
@@ -5261,7 +5396,11 @@ InteractionModule.decorators = [
5261
5396
  Activity,
5262
5397
  ActivityTitleComponent,
5263
5398
  ActivityBodyComponent,
5264
- ActivityActionsComponent
5399
+ ActivityActionsComponent,
5400
+ AbstractActivityTriggerComponent,
5401
+ PopupActivityTriggerComponent,
5402
+ InlineActivityTriggerComponent,
5403
+ ModalActivityTriggerComponent
5265
5404
  ],
5266
5405
  exports: [
5267
5406
  ActivityContainerComponent,
@@ -5274,7 +5413,10 @@ InteractionModule.decorators = [
5274
5413
  InteractionContextTriggerFor,
5275
5414
  StringInputActivity,
5276
5415
  SelectInputActivity,
5277
- ActivityBodyComponent
5416
+ ActivityBodyComponent,
5417
+ PopupActivityTriggerComponent,
5418
+ InlineActivityTriggerComponent,
5419
+ ModalActivityTriggerComponent
5278
5420
  ],
5279
5421
  entryComponents: [
5280
5422
  ActivityContainerComponent,
@@ -5291,204 +5433,6 @@ InteractionModule.decorators = [
5291
5433
  },] }
5292
5434
  ];
5293
5435
 
5294
- class PlaceHistory {
5295
- constructor() {
5296
- this._archive = new Map();
5297
- this.placeHistoryDepth = 4;
5298
- }
5299
- notifyNavigationStarted() {
5300
- if (this._activeVisits) {
5301
- this.archive(this._activeVisits.visits);
5302
- this._previousVisits = this._activeVisits;
5303
- }
5304
- }
5305
- notifyNavigationFinished(visits) {
5306
- this._activeVisits = new PlaceHistory.VisitRecord(visits);
5307
- }
5308
- updateVisit(visit) {
5309
- assert.isTruthy(this._activeVisits);
5310
- this._activeVisits.update(visit);
5311
- }
5312
- lastVisitIncluded(placeDef) {
5313
- var _a;
5314
- return !!((_a = this._previousVisits) === null || _a === void 0 ? void 0 : _a.getVisitFor(placeDef));
5315
- }
5316
- getMostRecentVisitFor(placeDef) {
5317
- return ___default.first(this.getHistory(placeDef));
5318
- }
5319
- getHistory(placeDef) {
5320
- let history = this._archive.get(placeDef);
5321
- if (!history) {
5322
- history = [];
5323
- this.setHistory(placeDef, history);
5324
- }
5325
- return history;
5326
- }
5327
- setHistory(placeDef, history) {
5328
- this._archive.set(placeDef, history);
5329
- }
5330
- archive(visits) {
5331
- visits.forEach(state => {
5332
- const history = this.getHistory(state.placeDefinition);
5333
- const previousState = ___default.first(history);
5334
- if (!previousState || state.hasChangedFrom(previousState)) {
5335
- history.unshift(state); // LIFO
5336
- this.setHistory(state.placeDefinition, history.slice(0, this.placeHistoryDepth));
5337
- }
5338
- });
5339
- }
5340
- }
5341
- PlaceHistory.ɵprov = i0.ɵɵdefineInjectable({ factory: function PlaceHistory_Factory() { return new PlaceHistory(); }, token: PlaceHistory, providedIn: "root" });
5342
- PlaceHistory.decorators = [
5343
- { type: Injectable, args: [{
5344
- providedIn: 'root'
5345
- },] }
5346
- ];
5347
- PlaceHistory.ctorParameters = () => [];
5348
- (function (PlaceHistory) {
5349
- class VisitRecord {
5350
- constructor(visits) {
5351
- this.visits = visits;
5352
- }
5353
- update(visit) {
5354
- this.visits = this.visits.filter(v => v.placeDefinition !== visit.placeDefinition).concat(visit);
5355
- }
5356
- getVisitFor(placeDef) {
5357
- return this.visits.find(v => v.placeDefinition === placeDef);
5358
- }
5359
- }
5360
- PlaceHistory.VisitRecord = VisitRecord;
5361
- // export class Query {
5362
- // private _history: Visit.State[];
5363
- // private _places: Place[];
5364
- // private _predicate: (visit: any) => boolean;
5365
- // private _limit: number;
5366
- //
5367
- // constructor(history, limit = history.length) {
5368
- // this._history = history;
5369
- // this._places = [];
5370
- // this._predicate = (visit => true);
5371
- // this._limit = limit;
5372
- // }
5373
- //
5374
- // to(...places:Place[]):this {
5375
- // this._places = places;
5376
- // return this;
5377
- // }
5378
- //
5379
- // with(parameters: { [parameter: string]: any }): this {
5380
- // this.matching(state => {
5381
- // return Object.keys(parameters).reduce((acc, key) => {
5382
- // const matchValue = parameters[key];
5383
- // const visitValue = state.get(key);
5384
- // const matched = matchValue === '*' ? !_.isNil(visitValue) : visitValue == matchValue;
5385
- // // Logger.get(this).info(`matched=${matched}`, parameters, visitValue);
5386
- // return acc && matched;
5387
- // }, true);
5388
- // });
5389
- // return this;
5390
- // }
5391
- //
5392
- // last(): Visit.State {
5393
- // return _.findLast(this._history, visit => this._matches(visit))
5394
- // }
5395
- //
5396
- // // @trace
5397
- // allThatMatch(): Visit.State[] {
5398
- // return _.filter(this._history, visit => this._matches(visit)).slice(-this._limit);
5399
- // }
5400
- //
5401
- // // @trace
5402
- // mostRecentValueOf<T=any>(param: string, defaultValue: T = null): T {
5403
- // const lastStateWithParam = _.findLast(this.allThatMatch(), state => !_.isNil(state.get(param)));
5404
- // return _.isNil(lastStateWithParam) ? defaultValue : lastStateWithParam.get(param);
5405
- // }
5406
- //
5407
- // limit(limit: number): this {
5408
- // this._limit = limit;
5409
- // return this;
5410
- // }
5411
- //
5412
- // matching(predicate: (visit: Visit.State) => boolean): this {
5413
- // this._predicate = predicate;
5414
- // return this;
5415
- // }
5416
- //
5417
- // _matches(visit: Visit.State) {
5418
- // return this._isPlaceMatch(visit) && this._predicate(visit);
5419
- // }
5420
- //
5421
- // _isPlaceMatch(visit: Visit.State) {
5422
- // return this._places.length < 1 || this._places.includes(visit.place)
5423
- // }
5424
- //
5425
- // }
5426
- })(PlaceHistory || (PlaceHistory = {}));
5427
-
5428
- class Visit {
5429
- constructor(placeDefinition, visitParameters = {}) {
5430
- this.placeDefinition = placeDefinition;
5431
- this.visitParameters = visitParameters;
5432
- }
5433
- // @Trace()
5434
- getRouteId() {
5435
- return this.placeDefinition.getRouteIdFrom(this);
5436
- }
5437
- // @Trace()
5438
- hasRouteId() {
5439
- return !_.isNil(this.getRouteId());
5440
- }
5441
- /**
5442
- * Returns the value of the place parameter with the specified name. The parameter
5443
- * name is taken from the `as` option, e.g. {as: 'aCustomName'} otherwise it is the
5444
- * same as the the ValueModel property name.
5445
- * @param parameterName the field name of the property model or the `as` option if specified.
5446
- */
5447
- getParameter(parameterName) {
5448
- return this.visitParameters[parameterName];
5449
- }
5450
- // @Trace()
5451
- hasParameter(parameterName) {
5452
- return Object.keys(this.visitParameters).includes(parameterName);
5453
- }
5454
- replace(parameter, value) {
5455
- return new Visit(this.placeDefinition, Object.assign(Object.assign({}, this.visitParameters), { [parameter.name]: value }));
5456
- }
5457
- mergeRouteParameters(routeParams) {
5458
- // todo: whitelist parameters.
5459
- const routeParameterKeys = Object.keys(routeParams);
5460
- const params = {};
5461
- this.placeDefinition.getVisitParameterDefs().forEach(def => {
5462
- if (def.isRouteId || def.isRouteParameter) {
5463
- if (routeParameterKeys.includes(def.name)) {
5464
- params[def.name] = routeParams[def.name];
5465
- }
5466
- }
5467
- else {
5468
- // copy non route params as is, but only if they already exist otherwise we'll inject nil values and break the
5469
- // defaults and remember sanitisation process.
5470
- const value = this.getParameter(def.name);
5471
- if (this.hasParameter(def.name)) {
5472
- params[def.name] = value;
5473
- }
5474
- }
5475
- });
5476
- return new Visit(this.placeDefinition, params);
5477
- }
5478
- hasRoutingChangedFrom(other) {
5479
- const samePlace = other.placeDefinition === this.placeDefinition;
5480
- const sameRouteParameters = _.isEqual(this.placeDefinition.getFormattedRouteParameters(this, true), this.placeDefinition.getFormattedRouteParameters(other, true));
5481
- return !samePlace || !sameRouteParameters;
5482
- }
5483
- hasChangedFrom(other) {
5484
- const sameNonRouteParameters = _.isEqual(this.placeDefinition.getNonRouteParameters(this), this.placeDefinition.getNonRouteParameters(other));
5485
- return !sameNonRouteParameters || this.hasRoutingChangedFrom(other);
5486
- }
5487
- toDebugString() {
5488
- return Object.keys(this.visitParameters).map(k => `${k}=${this.visitParameters[k]}`).join(',');
5489
- }
5490
- }
5491
-
5492
5436
  class ParameterDefinition {
5493
5437
  constructor(propertyName, options, urlFormat) {
5494
5438
  this.propertyName = propertyName;
@@ -5507,6 +5451,7 @@ class ParameterDefinition {
5507
5451
  getOptionValue(key) {
5508
5452
  return this.options.getOptional(key, null);
5509
5453
  }
5454
+ // @Trace()
5510
5455
  sanitise(value, visit, placeHistory, injector, isPopState) {
5511
5456
  return __awaiter(this, void 0, void 0, function* () {
5512
5457
  if (this.isMissingFrom(visit)) {
@@ -5527,12 +5472,6 @@ class ParameterDefinition {
5527
5472
  return !visit.hasParameter(this.name);
5528
5473
  }
5529
5474
  }
5530
- __decorate([
5531
- Trace(),
5532
- __metadata("design:type", Function),
5533
- __metadata("design:paramtypes", [Object, Visit, PlaceHistory, Injector, Boolean]),
5534
- __metadata("design:returntype", Promise)
5535
- ], ParameterDefinition.prototype, "sanitise", null);
5536
5475
  (function (ParameterDefinition) {
5537
5476
  class RouteId extends ParameterDefinition {
5538
5477
  constructor() {
@@ -5730,6 +5669,7 @@ class PlaceComponent extends DisposableComponent {
5730
5669
  when(this._active).becomesTruthy(() => this.onPlaceReady());
5731
5670
  this.childPlaces = this.placeDefinition.children.map(d => d.component);
5732
5671
  }
5672
+ // @Trace()
5733
5673
  initialiseVisit(visit, notifyVisitChanged) {
5734
5674
  assert.isNil(this.visitModel.value);
5735
5675
  const { when } = Dsl.disposeWith(this);
@@ -5750,17 +5690,18 @@ class PlaceComponent extends DisposableComponent {
5750
5690
  isInitialised() {
5751
5691
  return !!this.visitModel.value;
5752
5692
  }
5693
+ // @Trace()
5753
5694
  installBinding(parameterDef) {
5754
5695
  const model = this[parameterDef.propertyName];
5755
5696
  DebugContext.tag(model, `${this.placeDefinition.component.name}.${parameterDef.propertyName}`);
5756
5697
  const binding = this.registerDisposable(new Binding(this.visitModel, model, {
5757
5698
  toRight(visit) {
5758
5699
  const value = visit.getParameter(parameterDef.name);
5759
- console.log('push to component', { name: parameterDef.name, value, visit });
5700
+ // console.log('push to component', { name: parameterDef.name, value, visit });
5760
5701
  return value;
5761
5702
  },
5762
5703
  toLeft(value, currentVisit) {
5763
- console.log('push to route', { name: parameterDef.name, value, currentVisit });
5704
+ // console.log('push to route', { name: parameterDef.name, value, currentVisit });
5764
5705
  return currentVisit.replace(parameterDef, value);
5765
5706
  }
5766
5707
  }));
@@ -5785,18 +5726,6 @@ PlaceComponent.decorators = [
5785
5726
  { type: Directive }
5786
5727
  ];
5787
5728
  PlaceComponent.ctorParameters = () => [];
5788
- __decorate([
5789
- Trace(),
5790
- __metadata("design:type", Function),
5791
- __metadata("design:paramtypes", [Visit, Function]),
5792
- __metadata("design:returntype", void 0)
5793
- ], PlaceComponent.prototype, "initialiseVisit", null);
5794
- __decorate([
5795
- Trace(),
5796
- __metadata("design:type", Function),
5797
- __metadata("design:paramtypes", [ParameterDefinition]),
5798
- __metadata("design:returntype", void 0)
5799
- ], PlaceComponent.prototype, "installBinding", null);
5800
5729
  __decorate([
5801
5730
  Memoize$1(),
5802
5731
  __metadata("design:type", PlaceDefinition),
@@ -6340,9 +6269,11 @@ class WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined exte
6340
6269
  this.clickedLinkMatchedBackButtonUrl = false;
6341
6270
  this.debugPropertyKeys = ['idle', 'startingUrl', 'clickedLinkUrl', 'firstCancelEventUrl', 'clickedLinkMatchedBackButtonUrl', 'popStateEventUrl'];
6342
6271
  }
6272
+ // @Trace()
6343
6273
  onRouterStarted(event) {
6344
6274
  this.ignore(event);
6345
6275
  }
6276
+ // @Trace()
6346
6277
  onRouterCancelled(event) {
6347
6278
  if (event.url === this.clickedLinkUrl) {
6348
6279
  this.context.transitionTo(new WaitForLinkSameAsBackToPlayOut(this.context, this.startingUrl, this.clickedLinkUrl));
@@ -6357,18 +6288,6 @@ class WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined exte
6357
6288
  });
6358
6289
  }
6359
6290
  }
6360
- __decorate([
6361
- Trace(),
6362
- __metadata("design:type", Function),
6363
- __metadata("design:paramtypes", [NavigationStart]),
6364
- __metadata("design:returntype", void 0)
6365
- ], WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined.prototype, "onRouterStarted", null);
6366
- __decorate([
6367
- Trace(),
6368
- __metadata("design:type", Function),
6369
- __metadata("design:paramtypes", [NavigationCancel]),
6370
- __metadata("design:returntype", void 0)
6371
- ], WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined.prototype, "onRouterCancelled", null);
6372
6291
  class WaitForLinkSameAsBackToPlayOut extends EventCleanUpSession {
6373
6292
  constructor(context, startingUrl, clickedLinkUrl) {
6374
6293
  super(context, startingUrl);
@@ -6615,6 +6534,140 @@ var PlaceAccessGuard;
6615
6534
  PlaceAccessGuard.NoAuth = NoAuth;
6616
6535
  })(PlaceAccessGuard || (PlaceAccessGuard = {}));
6617
6536
 
6537
+ class PlaceHistory {
6538
+ constructor() {
6539
+ this._archive = new Map();
6540
+ this.placeHistoryDepth = 4;
6541
+ }
6542
+ notifyNavigationStarted() {
6543
+ if (this._activeVisits) {
6544
+ this.archive(this._activeVisits.visits);
6545
+ this._previousVisits = this._activeVisits;
6546
+ }
6547
+ }
6548
+ notifyNavigationFinished(visits) {
6549
+ this._activeVisits = new PlaceHistory.VisitRecord(visits);
6550
+ }
6551
+ updateVisit(visit) {
6552
+ assert.isTruthy(this._activeVisits);
6553
+ this._activeVisits.update(visit);
6554
+ }
6555
+ lastVisitIncluded(placeDef) {
6556
+ var _a;
6557
+ return !!((_a = this._previousVisits) === null || _a === void 0 ? void 0 : _a.getVisitFor(placeDef));
6558
+ }
6559
+ getMostRecentVisitFor(placeDef) {
6560
+ return ___default.first(this.getHistory(placeDef));
6561
+ }
6562
+ getHistory(placeDef) {
6563
+ let history = this._archive.get(placeDef);
6564
+ if (!history) {
6565
+ history = [];
6566
+ this.setHistory(placeDef, history);
6567
+ }
6568
+ return history;
6569
+ }
6570
+ setHistory(placeDef, history) {
6571
+ this._archive.set(placeDef, history);
6572
+ }
6573
+ archive(visits) {
6574
+ visits.forEach(state => {
6575
+ const history = this.getHistory(state.placeDefinition);
6576
+ const previousState = ___default.first(history);
6577
+ if (!previousState || state.hasChangedFrom(previousState)) {
6578
+ history.unshift(state); // LIFO
6579
+ this.setHistory(state.placeDefinition, history.slice(0, this.placeHistoryDepth));
6580
+ }
6581
+ });
6582
+ }
6583
+ }
6584
+ PlaceHistory.ɵprov = i0.ɵɵdefineInjectable({ factory: function PlaceHistory_Factory() { return new PlaceHistory(); }, token: PlaceHistory, providedIn: "root" });
6585
+ PlaceHistory.decorators = [
6586
+ { type: Injectable, args: [{
6587
+ providedIn: 'root'
6588
+ },] }
6589
+ ];
6590
+ PlaceHistory.ctorParameters = () => [];
6591
+ (function (PlaceHistory) {
6592
+ class VisitRecord {
6593
+ constructor(visits) {
6594
+ this.visits = visits;
6595
+ }
6596
+ update(visit) {
6597
+ this.visits = this.visits.filter(v => v.placeDefinition !== visit.placeDefinition).concat(visit);
6598
+ }
6599
+ getVisitFor(placeDef) {
6600
+ return this.visits.find(v => v.placeDefinition === placeDef);
6601
+ }
6602
+ }
6603
+ PlaceHistory.VisitRecord = VisitRecord;
6604
+ // export class Query {
6605
+ // private _history: Visit.State[];
6606
+ // private _places: Place[];
6607
+ // private _predicate: (visit: any) => boolean;
6608
+ // private _limit: number;
6609
+ //
6610
+ // constructor(history, limit = history.length) {
6611
+ // this._history = history;
6612
+ // this._places = [];
6613
+ // this._predicate = (visit => true);
6614
+ // this._limit = limit;
6615
+ // }
6616
+ //
6617
+ // to(...places:Place[]):this {
6618
+ // this._places = places;
6619
+ // return this;
6620
+ // }
6621
+ //
6622
+ // with(parameters: { [parameter: string]: any }): this {
6623
+ // this.matching(state => {
6624
+ // return Object.keys(parameters).reduce((acc, key) => {
6625
+ // const matchValue = parameters[key];
6626
+ // const visitValue = state.get(key);
6627
+ // const matched = matchValue === '*' ? !_.isNil(visitValue) : visitValue == matchValue;
6628
+ // // Logger.get(this).info(`matched=${matched}`, parameters, visitValue);
6629
+ // return acc && matched;
6630
+ // }, true);
6631
+ // });
6632
+ // return this;
6633
+ // }
6634
+ //
6635
+ // last(): Visit.State {
6636
+ // return _.findLast(this._history, visit => this._matches(visit))
6637
+ // }
6638
+ //
6639
+ // // @trace
6640
+ // allThatMatch(): Visit.State[] {
6641
+ // return _.filter(this._history, visit => this._matches(visit)).slice(-this._limit);
6642
+ // }
6643
+ //
6644
+ // // @trace
6645
+ // mostRecentValueOf<T=any>(param: string, defaultValue: T = null): T {
6646
+ // const lastStateWithParam = _.findLast(this.allThatMatch(), state => !_.isNil(state.get(param)));
6647
+ // return _.isNil(lastStateWithParam) ? defaultValue : lastStateWithParam.get(param);
6648
+ // }
6649
+ //
6650
+ // limit(limit: number): this {
6651
+ // this._limit = limit;
6652
+ // return this;
6653
+ // }
6654
+ //
6655
+ // matching(predicate: (visit: Visit.State) => boolean): this {
6656
+ // this._predicate = predicate;
6657
+ // return this;
6658
+ // }
6659
+ //
6660
+ // _matches(visit: Visit.State) {
6661
+ // return this._isPlaceMatch(visit) && this._predicate(visit);
6662
+ // }
6663
+ //
6664
+ // _isPlaceMatch(visit: Visit.State) {
6665
+ // return this._places.length < 1 || this._places.includes(visit.place)
6666
+ // }
6667
+ //
6668
+ // }
6669
+ })(PlaceHistory || (PlaceHistory = {}));
6670
+
6618
6671
  class UrlSnapshot {
6619
6672
  // TODO: Update this accept a url Parser so it can be immutable and generate new trees on mutation using toString() are parseUrl.
6620
6673
  constructor(urlSerializer, url) {
@@ -7087,6 +7140,70 @@ PlaceRouter.ctorParameters = () => [
7087
7140
  PlaceRouter.State = State;
7088
7141
  })(PlaceRouter || (PlaceRouter = {}));
7089
7142
 
7143
+ class Visit {
7144
+ constructor(placeDefinition, visitParameters = {}) {
7145
+ this.placeDefinition = placeDefinition;
7146
+ this.visitParameters = visitParameters;
7147
+ }
7148
+ // @Trace()
7149
+ getRouteId() {
7150
+ return this.placeDefinition.getRouteIdFrom(this);
7151
+ }
7152
+ // @Trace()
7153
+ hasRouteId() {
7154
+ return !_.isNil(this.getRouteId());
7155
+ }
7156
+ /**
7157
+ * Returns the value of the place parameter with the specified name. The parameter
7158
+ * name is taken from the `as` option, e.g. {as: 'aCustomName'} otherwise it is the
7159
+ * same as the the ValueModel property name.
7160
+ * @param parameterName the field name of the property model or the `as` option if specified.
7161
+ */
7162
+ getParameter(parameterName) {
7163
+ return this.visitParameters[parameterName];
7164
+ }
7165
+ // @Trace()
7166
+ hasParameter(parameterName) {
7167
+ return Object.keys(this.visitParameters).includes(parameterName);
7168
+ }
7169
+ replace(parameter, value) {
7170
+ return new Visit(this.placeDefinition, Object.assign(Object.assign({}, this.visitParameters), { [parameter.name]: value }));
7171
+ }
7172
+ mergeRouteParameters(routeParams) {
7173
+ // todo: whitelist parameters.
7174
+ const routeParameterKeys = Object.keys(routeParams);
7175
+ const params = {};
7176
+ this.placeDefinition.getVisitParameterDefs().forEach(def => {
7177
+ if (def.isRouteId || def.isRouteParameter) {
7178
+ if (routeParameterKeys.includes(def.name)) {
7179
+ params[def.name] = routeParams[def.name];
7180
+ }
7181
+ }
7182
+ else {
7183
+ // copy non route params as is, but only if they already exist otherwise we'll inject nil values and break the
7184
+ // defaults and remember sanitisation process.
7185
+ const value = this.getParameter(def.name);
7186
+ if (this.hasParameter(def.name)) {
7187
+ params[def.name] = value;
7188
+ }
7189
+ }
7190
+ });
7191
+ return new Visit(this.placeDefinition, params);
7192
+ }
7193
+ hasRoutingChangedFrom(other) {
7194
+ const samePlace = other.placeDefinition === this.placeDefinition;
7195
+ const sameRouteParameters = _.isEqual(this.placeDefinition.getFormattedRouteParameters(this, true), this.placeDefinition.getFormattedRouteParameters(other, true));
7196
+ return !samePlace || !sameRouteParameters;
7197
+ }
7198
+ hasChangedFrom(other) {
7199
+ const sameNonRouteParameters = _.isEqual(this.placeDefinition.getNonRouteParameters(this), this.placeDefinition.getNonRouteParameters(other));
7200
+ return !sameNonRouteParameters || this.hasRoutingChangedFrom(other);
7201
+ }
7202
+ toDebugString() {
7203
+ return Object.keys(this.visitParameters).map(k => `${k}=${this.visitParameters[k]}`).join(',');
7204
+ }
7205
+ }
7206
+
7090
7207
  const AUP_PLACE_CONFIG = new InjectionToken('AUP_PLACE_CONFIG');
7091
7208
 
7092
7209
  class NotAuthorisedNoticeComponent {
@@ -8158,5 +8275,5 @@ VisibilityService.ctorParameters = () => [
8158
8275
  * Generated bundle index. Do not edit.
8159
8276
  */
8160
8277
 
8161
- export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnModel, ColumnTemplateDirective, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DecoratedTreeNode, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, FlattenStrategy, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, HighlightPipe, HighlightTextModelDirective, IconComponent, InPlaceInteractionContextComponent, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ListPropertyColumnModel, ModalInteractionContextFactory, MoreMenuComponent, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NotAuthorisedNoticeComponent, NumberInputComponent, POPUP_CONTAINER, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, PaginatorComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceAccessGuard, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupAwareComponent, PopupInteractionContextComponent, PopupMenuComponent, PopupMenuRendererComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SectionHeaderComponent, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputActivity, SelectInputComponent, SelectionColumnModel, SelfAndDescendantsVisitor, SeparatorComponent, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, ToolBarComponent, TrackBy, TreeExpansionModel, TreeInheritanceIconComponent, TreeLabelCellRendererComponent, TreeLabelColumnModel, TreeTableComponent, TreeTableModel, TreeToListModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, VisibilityService, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, ɵ0 };
8278
+ export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractActivityTriggerComponent, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnModel, ColumnTemplateDirective, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DecoratedTreeNode, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, FlattenStrategy, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, HighlightPipe, HighlightTextModelDirective, HorizontalAlignment, IconComponent, InPlaceInteractionContextComponent, InlineActivityTriggerComponent, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ListPropertyColumnModel, ModalActivityTriggerComponent, ModalInteractionContextFactory, MoreMenuComponent, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NotAuthorisedNoticeComponent, NumberInputComponent, POPUP_CONTAINER, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, PaginatorComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceAccessGuard, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupActivityTriggerComponent, PopupAwareComponent, PopupInteractionContextComponent, PopupMenuComponent, PopupMenuRendererComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SectionHeaderComponent, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputActivity, SelectInputComponent, SelectionColumnModel, SelfAndDescendantsVisitor, SeparatorComponent, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, ToolBarComponent, TrackBy, TreeExpansionModel, TreeInheritanceIconComponent, TreeLabelCellRendererComponent, TreeLabelColumnModel, TreeTableComponent, TreeTableModel, TreeToListModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, VisibilityService, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, ɵ0 };
8162
8279
  //# sourceMappingURL=coolon-angular-ui-powerups.js.map