@coolon/angular-ui-powerups 3.18.0 → 11.0.0-alpha.10

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 (135) hide show
  1. package/assets/activities.scss +2 -1
  2. package/assets/styles.scss +1 -2
  3. package/assets/table.scss +13 -6
  4. package/bundles/coolon-angular-ui-powerups-cypress.umd.js.map +1 -1
  5. package/bundles/coolon-angular-ui-powerups.umd.js +207 -110
  6. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  7. package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
  8. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  9. package/coolon-angular-ui-powerups.metadata.json +1 -1
  10. package/cypress/package.json +1 -1
  11. package/esm2015/lib/components/busy-overlay/busy-overlay.component.js +1 -1
  12. package/esm2015/lib/components/busy-overlay/busy-overlay.component.metadata.json +1 -1
  13. package/esm2015/lib/components/card-container/card-container.component.js +1 -1
  14. package/esm2015/lib/components/card-container/card-container.component.metadata.json +1 -1
  15. package/esm2015/lib/components/commands/command/command.component.js +5 -1
  16. package/esm2015/lib/components/commands/command/command.component.js.map +1 -1
  17. package/esm2015/lib/components/commands/command/command.component.metadata.json +1 -1
  18. package/esm2015/lib/components/commands/command-face/command-face.component.js +1 -1
  19. package/esm2015/lib/components/commands/command-face/command-face.component.metadata.json +1 -1
  20. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.js +1 -1
  21. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.metadata.json +1 -1
  22. package/esm2015/lib/components/components.module.js +0 -3
  23. package/esm2015/lib/components/components.module.js.map +1 -1
  24. package/esm2015/lib/components/components.module.metadata.json +1 -1
  25. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  26. package/esm2015/lib/components/empty-state/empty-state.component.js +1 -1
  27. package/esm2015/lib/components/empty-state/empty-state.component.metadata.json +1 -1
  28. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js +1 -1
  29. package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.metadata.json +1 -1
  30. package/esm2015/lib/components/icon/icon.component.js +1 -1
  31. package/esm2015/lib/components/icon/icon.component.metadata.json +1 -1
  32. package/esm2015/lib/components/scroll-container/scroll-container.component.js +1 -1
  33. package/esm2015/lib/components/scroll-container/scroll-container.component.metadata.json +1 -1
  34. package/esm2015/lib/components/section-header/section-header.component.js +1 -1
  35. package/esm2015/lib/components/section-header/section-header.component.metadata.json +1 -1
  36. package/esm2015/lib/components/switch-case/switch-case.component.js +1 -1
  37. package/esm2015/lib/components/switch-case/switch-case.component.metadata.json +1 -1
  38. package/esm2015/lib/components/table/column-model.js +2 -1
  39. package/esm2015/lib/components/table/column-model.js.map +1 -1
  40. package/esm2015/lib/components/table/column-model.metadata.json +1 -1
  41. package/esm2015/lib/components/table/paginator/paginator.component.js +1 -1
  42. package/esm2015/lib/components/table/paginator/paginator.component.metadata.json +1 -1
  43. package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
  44. package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.metadata.json +1 -1
  45. package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +1 -1
  46. package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.metadata.json +1 -1
  47. package/esm2015/lib/components/table/table-model.js +9 -0
  48. package/esm2015/lib/components/table/table-model.js.map +1 -1
  49. package/esm2015/lib/components/table/table-model.metadata.json +1 -1
  50. package/esm2015/lib/components/table/table.component.js +31 -4
  51. package/esm2015/lib/components/table/table.component.js.map +1 -1
  52. package/esm2015/lib/components/table/table.component.metadata.json +1 -1
  53. package/esm2015/lib/components/tree-table/decorated-tree-node.js +19 -22
  54. package/esm2015/lib/components/tree-table/decorated-tree-node.js.map +1 -1
  55. package/esm2015/lib/components/tree-table/tree-inheritance-icon/tree-inheritance-icon.component.js +1 -1
  56. package/esm2015/lib/components/tree-table/tree-inheritance-icon/tree-inheritance-icon.component.metadata.json +1 -1
  57. package/esm2015/lib/components/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.js +1 -1
  58. package/esm2015/lib/components/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.metadata.json +1 -1
  59. package/esm2015/lib/components/tree-table/tree-table-component.js +22 -5
  60. package/esm2015/lib/components/tree-table/tree-table-component.js.map +1 -1
  61. package/esm2015/lib/components/tree-table/tree-table-component.metadata.json +1 -1
  62. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js +1 -1
  63. package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.metadata.json +1 -1
  64. package/esm2015/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.js +1 -1
  65. package/esm2015/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.metadata.json +1 -1
  66. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js +1 -1
  67. package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.metadata.json +1 -1
  68. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +1 -1
  69. package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.metadata.json +1 -1
  70. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +1 -1
  71. package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.metadata.json +1 -1
  72. package/esm2015/lib/place/components/abstract-place-navigation.component.js +18 -3
  73. package/esm2015/lib/place/components/abstract-place-navigation.component.js.map +1 -1
  74. package/esm2015/lib/place/components/abstract-place-navigation.component.metadata.json +1 -1
  75. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +2 -2
  76. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
  77. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.metadata.json +1 -1
  78. package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.js +14 -0
  79. package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.js.map +1 -0
  80. package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.metadata.json +1 -0
  81. package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.ngfactory.js.map +1 -0
  82. package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.scss.shim.ngstyle.js.map +1 -0
  83. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +23 -14
  84. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
  85. package/esm2015/lib/place/components/place-outlet/place-outlet.component.metadata.json +1 -1
  86. package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js +2 -2
  87. package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js.map +1 -1
  88. package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.metadata.json +1 -1
  89. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +1 -1
  90. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
  91. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.metadata.json +1 -1
  92. package/esm2015/lib/place/exports.js +1 -0
  93. package/esm2015/lib/place/exports.js.map +1 -1
  94. package/esm2015/lib/place/exports.metadata.json +1 -1
  95. package/esm2015/lib/place/guards/place.guard.js +5 -8
  96. package/esm2015/lib/place/guards/place.guard.js.map +1 -1
  97. package/esm2015/lib/place/navigation/place-component-deactivation-handler.js +2 -0
  98. package/esm2015/lib/place/navigation/place-component-deactivation-handler.js.map +1 -1
  99. package/esm2015/lib/place/place-component.js +1 -3
  100. package/esm2015/lib/place/place-component.js.map +1 -1
  101. package/esm2015/lib/place/place-component.metadata.json +1 -1
  102. package/esm2015/lib/place/place-router.js +15 -4
  103. package/esm2015/lib/place/place-router.js.map +1 -1
  104. package/esm2015/lib/place/place-router.metadata.json +1 -1
  105. package/esm2015/lib/place/place.module.js +6 -2
  106. package/esm2015/lib/place/place.module.js.map +1 -1
  107. package/esm2015/lib/place/place.module.metadata.json +1 -1
  108. package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
  109. package/fesm2015/coolon-angular-ui-powerups.js +187 -92
  110. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  111. package/lib/components/commands/command/command.component.d.ts +2 -1
  112. package/lib/components/table/column-model.d.ts +1 -0
  113. package/lib/components/table/table-model.d.ts +9 -0
  114. package/lib/components/table/table.component.d.ts +24 -6
  115. package/lib/components/tree-table/tree-table-component.d.ts +9 -0
  116. package/lib/place/components/abstract-place-navigation.component.d.ts +8 -1
  117. package/lib/place/components/not-authorised-notice/not-authorised-notice.component.d.ts +3 -0
  118. package/lib/place/components/place-outlet/place-outlet.component.d.ts +10 -3
  119. package/lib/place/exports.d.ts +1 -0
  120. package/lib/place/place-component.d.ts +1 -1
  121. package/lib/place/place-router.d.ts +10 -6
  122. package/package.json +22 -20
  123. package/schematics/bootstrap-app/templates/styles/global-variables.scss.template +1 -0
  124. package/schematics/bootstrap-app/templates/styles.scss.template +10 -3
  125. package/schematics/ng-add/index.js +1 -1
  126. package/schematics/ng-add/index.js.map +1 -1
  127. package/schematics/place-add/index.js +7 -10
  128. package/schematics/place-add/index.js.map +1 -1
  129. package/schematics/utils/build-context.d.ts +4 -5
  130. package/schematics/utils/template-utilities.js +1 -9
  131. package/schematics/utils/template-utilities.js.map +1 -1
  132. package/schematics/utils/workspace.d.ts +3 -4
  133. package/schematics/utils/workspace.js.map +1 -1
  134. package/CHANGELOG.md +0 -1369
  135. package/schematics/bootstrap-app/templates/styles/theme.scss.template +0 -37
@@ -645,7 +645,7 @@
645
645
  { type: i0.Component, args: [{
646
646
  selector: 'aup-busy-overlay',
647
647
  template: "<ng-content></ng-content>\n<div class=\"busy-overlay-backdrop\" *ngIf=\"busyModel.value\">\n <mat-progress-spinner mode=\"indeterminate\" [diameter]=\"52\"></mat-progress-spinner>\n</div>\n",
648
- styles: [":host{position:relative}div.busy-overlay-backdrop{-ms-grid-columns:auto;-ms-grid-rows:auto;background-color:rgba(0,0,0,.2);bottom:0;display:-ms-grid;display:grid;grid-template-columns:auto;grid-template-rows:auto;left:0;place-content:center;position:absolute;right:0;top:0}"]
648
+ styles: [":host{position:relative}div.busy-overlay-backdrop{position:absolute;background-color:rgba(0,0,0,.2);top:0;left:0;bottom:0;right:0;display:grid;grid-template-columns:auto;grid-template-rows:auto;place-content:center}"]
649
649
  },] }
650
650
  ];
651
651
  BusyOverlayComponent.ctorParameters = function () { return []; };
@@ -729,7 +729,7 @@
729
729
  { type: i0.Component, args: [{
730
730
  selector: 'aup-card-container',
731
731
  template: "<div class=\"card-container\">\n <ng-content></ng-content>\n\n <div class=\"add-card-container\" *ngIf=\"addCardCommand.enabled.value\" [pectinCommand]=\"addCardCommand\">\n <aup-command-face *ngIf=\"addCardFace\" [faces]=\"[addCardFace]\"></aup-command-face>\n <aup-icon *ngIf=\"!addCardFace\" icon=\"mat:add\"></aup-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",
732
- styles: [":host{--resolved-card-background:var(--card-background,#fcfcfb);--resolved-card-gap:var(--card-gap,16px);--resolved-card-height:var(--card-height,auto);--resolved-card-min-height:var(--card-min-height,auto);--resolved-card-width:var(--card-width,300px);background:var(--resolved-card-background);display:block;flex:1}.card-container{box-sizing:border-box;display:-ms-grid;display:grid;grid-gap:var(--resolved-card-gap);grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(var(--resolved-card-min-height),var(--resolved-card-height)));max-width:100%;min-height:calc(var(--resolved-card-height) + 2*var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2*var(--resolved-card-gap));padding:var(--resolved-card-gap);width:calc((var(--resolved-card-width) + var(--resolved-card-gap))*2 + var(--grid-gap))}.add-card-container{align-items:center;background-color:hsla(0,0%,100%,.8);border:2px dashed rgba(0,0,0,.1);border-radius:6px;box-sizing:border-box;color:rgba(0,0,0,.54);cursor:pointer;display:flex;flex-direction:column;font-weight:300;height:var(--resolved-card-height);justify-content:center;min-height:var(--resolved-card-min-height);transition:all .28s cubic-bezier(.4,0,.2,1);width:var(--resolved-card-width)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{background-color:#fff;border-color:transparent;color:rgba(0,0,0,.54);transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:all .28s cubic-bezier(.4,0,.2,1)}.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{align-items:stretch;display:flex;flex-direction:column;height:var(--resolved-card-height);justify-content:stretch;width:var(--resolved-card-width)}"]
732
+ styles: [":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:grid;grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-auto-rows:minmax(var(--resolved-card-min-height),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:hsla(0,0%,100%,.8);transition:all .28s cubic-bezier(.4,0,.2,1)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:all .28s 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}"]
733
733
  },] }
734
734
  ];
735
735
  CardContainerComponent.ctorParameters = function () { return []; };
@@ -940,7 +940,7 @@
940
940
  selector: 'aup-command-face',
941
941
  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",
942
942
  encapsulation: i0.ViewEncapsulation.None,
943
- styles: ["aup-command-face{--icon-gap:var(--aup-command-face-icon-gap);display:-ms-inline-grid;display:inline-grid}aup-command-face>.face-container{-ms-grid-column:1;-ms-grid-row:1;align-items:center;display:inline-flex;flex-direction:row;grid-column:1;grid-row:1}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}"]
943
+ 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}"]
944
944
  },] }
945
945
  ];
946
946
  CommandFaceComponent.ctorParameters = function () { return []; };
@@ -1009,6 +1009,9 @@
1009
1009
  _this.activeFace = _this.faces.first();
1010
1010
  _this.buttonStyle = chain(_this.activeFace).map(function (f) { return exports.CommandFace.getStyleOf(f); });
1011
1011
  _this.colorModel = chain(_this.activeFace).map(function (f) { return exports.CommandFace.getColorOf(f); });
1012
+ _this.iconOnly = _this.faces.select(function (face) {
1013
+ return ___default['default'].isEmpty(exports.CommandFace.getTextOf(face)) && !___default['default'].isEmpty(exports.CommandFace.getIconOf(face));
1014
+ }).count().equals(_this.faces.count());
1012
1015
  return _this;
1013
1016
  }
1014
1017
  CommandComponent.prototype.isActive = function (face) {
@@ -1027,7 +1030,7 @@
1027
1030
  CommandComponent.decorators = [
1028
1031
  { type: i0.Component, args: [{
1029
1032
  selector: 'aup-command',
1030
- template: "<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 <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\">\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\">\n <aup-command-face class=\"centered\" [faces]=\"faces.value\"></aup-command-face>\n </button>\n </ng-container>\n</ng-container>\n",
1033
+ template: "<ng-container *ngIf=\"iconOnly.value\">\n <button mat-icon-button [pectinCommand]=\"command\" [color]=\"colorModel.value\" [class.busy]=\"command.busy.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\">\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\">\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\">\n <aup-command-face class=\"centered\" [faces]=\"faces.value\"></aup-command-face>\n </button>\n </ng-container>\n </ng-container>\n</ng-container>\n",
1031
1034
  styles: [":host{display:inline-flex;flex-direction:row;justify-content:stretch}button{flex:1}"]
1032
1035
  },] }
1033
1036
  ];
@@ -1269,7 +1272,7 @@
1269
1272
  selector: 'aup-tool-bar',
1270
1273
  template: '<div class="toolbar-content"><ng-content></ng-content></div>',
1271
1274
  encapsulation: i0.ViewEncapsulation.None,
1272
- styles: [":host{display:inline-block}.toolbar-content{align-items:center;display:inline-flex;flex-direction:row}.toolbar-content>aup-separator{-ms-grid-row-align:stretch;align-self:stretch;margin:4px 0 4px 8px}.toolbar-content>aup-flex{flex:1}.toolbar-content>*+*{margin-left:8px}"]
1275
+ styles: [":host{display:inline-block}.toolbar-content{display:inline-flex;flex-direction:row;align-items:center}.toolbar-content>aup-separator{align-self:stretch;margin:4px 0 4px 8px}.toolbar-content>aup-flex{flex:1}.toolbar-content>*+*{margin-left:8px}"]
1273
1276
  },] }
1274
1277
  ];
1275
1278
  ToolBarComponent.ctorParameters = function () { return []; };
@@ -1450,7 +1453,7 @@
1450
1453
  { type: i0.Component, args: [{
1451
1454
  selector: 'aup-empty-state',
1452
1455
  template: "\n <div class=\"container\">\n <ng-content></ng-content>\n </div>\n ",
1453
- styles: [":host{align-items:center;display:flex;flex-direction:column;justify-content:center}.container{border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300;padding:var(--aup-default-padding)}"]
1456
+ styles: [":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{padding:var(--aup-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]
1454
1457
  },] }
1455
1458
  ];
1456
1459
  EmptyStateComponent.ctorParameters = function () { return []; };
@@ -1892,7 +1895,7 @@
1892
1895
  { type: i0.Component, args: [{
1893
1896
  selector: 'aup-checkbox-input',
1894
1897
  template: "<!-- TODO: add focus binding -->\n<mat-checkbox\n [(ngModel)]=\"componentValueModel.value\"\n [color]=\"color\"\n [labelPosition]=\"labelPosition\"\n [disabled]=\"!isEnabled()\"\n>{{label}}</mat-checkbox>\n<mat-hint *ngIf=\"showHint\">{{hint}}</mat-hint>\n<mat-error *ngIf=\"hasErrors\">{{firstError}}</mat-error>\n",
1895
- styles: [":host{display:inline-flex;flex-direction:column;padding:24px 0 16px}:host.dense{padding:6px 0 2px}mat-error,mat-hint{font-size:12px;font-weight:400;line-height:13.5px;margin-left:24px;margin-top:4px}"]
1898
+ styles: [":host{display:inline-flex;flex-direction:column;padding:24px 0 16px}:host.dense{padding:6px 0 2px}mat-error,mat-hint{margin-top:4px;margin-left:24px;font-size:12px;font-weight:400;line-height:13.5px}"]
1896
1899
  },] }
1897
1900
  ];
1898
1901
  CheckboxInputComponent.ctorParameters = function () { return []; };
@@ -2135,7 +2138,7 @@
2135
2138
  { type: i0.Component, args: [{
2136
2139
  selector: 'aup-icon',
2137
2140
  template: "<ng-container [ngSwitch]=\"prefix\">\n\n <mat-icon *ngSwitchCase=\"iconPrefix.SVG\"\n [svgIcon]=\"suffix\"\n class=\"svgIcon\">\n </mat-icon>\n\n <mat-icon *ngSwitchCase=\"iconPrefix.MATERIAL\">\n {{suffix}}\n </mat-icon>\n\n <div *ngSwitchCase=\"iconPrefix.FONT_AWESOME\"\n class=\"faIconWrapper\">\n <fa-icon [icon]=\"suffix\">\n </fa-icon>\n </div>\n\n <mat-icon *ngSwitchDefault\n [matTooltip]=\"errorMessage\">\n bug_report\n </mat-icon>\n\n</ng-container>\n\n",
2138
- styles: [":host{display:inline-flex;width:24px}fa-icon{vertical-align:middle}.faIconWrapper{text-align:center}.faIconWrapper,.svgIcon{height:24px;width:24px}:host(.mat-chip-remove) mat-icon{font-size:18px}mat-icon{height:inherit;width:inherit}"]
2141
+ styles: [":host{display:inline-flex;width:24px}fa-icon{vertical-align:middle}.faIconWrapper{text-align:center}.faIconWrapper,.svgIcon{width:24px;height:24px}:host(.mat-chip-remove) mat-icon{font-size:18px}mat-icon{width:inherit;height:inherit}"]
2139
2142
  },] }
2140
2143
  ];
2141
2144
  exports.IconComponent.propDecorators = {
@@ -2174,7 +2177,7 @@
2174
2177
  { type: i0.Component, args: [{
2175
2178
  selector: 'aup-scroll-container',
2176
2179
  template: "<div class=\"container\" cdkScrollable>\n <ng-content></ng-content>\n</div>\n",
2177
- styles: [":host{flex-direction:column;min-height:0}.container,:host{align-items:stretch;display:flex}.container{flex:1;flex-basis:0;flex-direction:column;overflow-y:scroll}"]
2180
+ styles: [":host{flex-direction:column;min-height:0}.container,:host{display:flex;align-items:stretch}.container{flex-direction:column;flex:1;flex-basis:0;overflow-y:scroll}"]
2178
2181
  },] }
2179
2182
  ];
2180
2183
  ScrollContainerComponent.ctorParameters = function () { return []; };
@@ -2191,7 +2194,7 @@
2191
2194
  { type: i0.Component, args: [{
2192
2195
  selector: 'aup-section-header',
2193
2196
  template: "<ng-content></ng-content>\n",
2194
- styles: [":host{--def-border-bottom-color:var(--border-bottom-color,rgba(0,0,0,0.07));color:rgba(0,0,0,.5);display:block;font-size:12px;line-height:12px;padding:8px 16px}:host.underline{border-bottom:1px solid var(--def-border-bottom-color)}"]
2197
+ styles: [":host{--def-border-bottom-color:var(--border-bottom-color,rgba(0,0,0,0.07));display:block;padding:8px 16px;font-size:12px;line-height:12px;color:rgba(0,0,0,.5)}:host.underline{border-bottom:1px solid var(--def-border-bottom-color)}"]
2195
2198
  },] }
2196
2199
  ];
2197
2200
  SectionHeaderComponent.ctorParameters = function () { return []; };
@@ -2310,7 +2313,7 @@
2310
2313
  { type: i0.Component, args: [{
2311
2314
  selector: 'aup-switch-case',
2312
2315
  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",
2313
- styles: [":host{align-items:stretch;display:flex;flex-direction:column}mat-tab-group{flex:1}"]
2316
+ styles: [":host{display:flex;flex-direction:column;align-items:stretch}mat-tab-group{flex:1}"]
2314
2317
  },] }
2315
2318
  ];
2316
2319
  SwitchCaseComponent.ctorParameters = function () { return [
@@ -2707,6 +2710,7 @@
2707
2710
  this._flex = false;
2708
2711
  this._visibleModel = new pectin.DelegatingValueModel().withDefault(true);
2709
2712
  this.installHeaderRenderer();
2713
+ this.dasherisedColumnId = typescriptUtilities.Stringy.from(columnId).dasherize().toString();
2710
2714
  }
2711
2715
  ColumnModel.prototype.installHeaderRenderer = function () {
2712
2716
  this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, function (component, column) {
@@ -3332,15 +3336,32 @@
3332
3336
  *
3333
3337
  * Styling
3334
3338
  * @example
3339
+ * // global settings
3340
+ * :root {
3341
+ * --aup-table-column-gap: 10px; // defaults to 24px
3342
+ * --aup-table-row-hover-background-color, rgba(0, 0, 0, 0.05)
3343
+ * --aup-table-row-selected-background-color: rebeccapurple; // defaults to transparent
3344
+ * --aup-table-first-column-padding-left: 18px // defaults to --column-gap
3345
+ * --aup-table-last-column-padding-right: 18px // defaults to --column-gap
3346
+ * }
3347
+ *
3348
+ * // per table settings.
3335
3349
  * aup-table {
3336
3350
  * --column-gap: 10px; // defaults to 24px
3337
3351
  * --row-hover-background-color, rgba(0, 0, 0, 0.05)
3338
3352
  * --row-selected-background-color: rebeccapurple; // defaults to transparent
3353
+ * --first-column-padding-left: 18px // defaults to --column-gap
3354
+ * --last-column-padding-right: 18px // defaults to --column-gap
3355
+ *
3356
+ * aup-table-header-cell-renderer,
3339
3357
  * aup-table-cell-renderer {
3340
- * &:first-column {
3358
+ * &.aup-col-my-dasherised-column-id {
3341
3359
  * // do stuff
3342
3360
  * }
3343
- * &:last-column {
3361
+ * &.first-visible-column {
3362
+ * // do stuff
3363
+ * }
3364
+ * &.last-visible-column {
3344
3365
  * // do stuff
3345
3366
  * }
3346
3367
  * }
@@ -3410,13 +3431,23 @@
3410
3431
  var _a;
3411
3432
  return ((_a = this.tableModel.lastVisibleColumn.query().value) === null || _a === void 0 ? void 0 : _a.columnId) === columnId;
3412
3433
  };
3434
+ TableComponent.prototype.getColumnClasses = function (columnId) {
3435
+ var classes = ["aup-col-" + this.columnsById.get(columnId).dasherisedColumnId];
3436
+ if (this.isFirstVisibleColumn(columnId)) {
3437
+ classes.push('first-visible-column');
3438
+ }
3439
+ if (this.isLastVisibleColumn(columnId)) {
3440
+ classes.push('last-visible-column');
3441
+ }
3442
+ return classes;
3443
+ };
3413
3444
  return TableComponent;
3414
3445
  }(ResizeAwareComponent));
3415
3446
  TableComponent.decorators = [
3416
3447
  { type: i0.Component, args: [{
3417
3448
  selector: 'aup-table',
3418
- template: "<div class=\"scroll-container\">\n <table mat-table [dataSource]=\"tableModel.dataSource.value\" [trackBy]=\"tableModel.trackBy\">\n\n <ng-container *ngFor=\"let column of columns.value; index as index; first as first; last as last\"\n matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef [class.flex]=\"column.isFlex()\" [class.hide]=\"!column.isVisible()\">\n <aup-table-header-cell-renderer [column]=\"column\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class.first-visible-column]=\"isFirstVisibleColumn(column.columnId)\"\n [class.last-visible-column]=\"isLastVisibleColumn(column.columnId)\"\n ></aup-table-header-cell-renderer>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"notifyCellClicked(column, row)\"\n [class.enable-cursor]=\"tableModel.isCursorEnabled(column)\"\n [class.flex]=\"column.isFlex()\"\n [class.hide]=\"!column.isVisible()\"\n >\n <aup-table-cell-renderer [column]=\"column\"\n [row]=\"row\"\n [tableModel]=\"tableModel\"\n [editSession]=\"tableModel.getEditSessionFor(row)\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class.first-visible-column]=\"isFirstVisibleColumn(column.columnId)\"\n [class.last-visible-column]=\"isLastVisibleColumn(column.columnId)\"\n ></aup-table-cell-renderer>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds.value\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds.value; let i = index\"\n [ngClass]=\"tableModel.getRowClasses(row)\" [class.enable-hover]=\"tableModel.isHoverEnabled()\"\n [attr.trackBy]=\"tableModel.trackBy(i, row)\"\n ></tr>\n\n </table>\n</div>\n",
3419
- styles: [":host{align-items:stretch;display:flex;flex-direction:column}:host table{width:100%}:host.enable-scrolling{min-height:0}:host.enable-scrolling .scroll-container{align-items:stretch;display:flex;flex:1;flex-basis:0;flex-direction:column;overflow-y:scroll}"]
3449
+ template: "<div class=\"scroll-container\">\n <table mat-table [dataSource]=\"tableModel.dataSource.value\" [trackBy]=\"tableModel.trackBy\">\n\n <ng-container *ngFor=\"let column of columns.value; index as index; first as first; last as last\"\n matColumnDef=\"{{column.columnId}}\">\n <th mat-header-cell *matHeaderCellDef [class.flex]=\"column.isFlex()\" [class.hide]=\"!column.isVisible()\">\n <aup-table-header-cell-renderer [column]=\"column\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-header-cell-renderer>\n </th>\n <td mat-cell *matCellDef=\"let row\" (click)=\"notifyCellClicked(column, row)\"\n [class.enable-cursor]=\"tableModel.isCursorEnabled(column)\"\n [class.flex]=\"column.isFlex()\"\n [class.hide]=\"!column.isVisible()\"\n >\n <aup-table-cell-renderer [column]=\"column\"\n [row]=\"row\"\n [tableModel]=\"tableModel\"\n [editSession]=\"tableModel.getEditSessionFor(row)\"\n [attr.column-index]=\"index\"\n [attr.column-id]=\"column.columnId\"\n [class]=\"getColumnClasses(column.columnId)\"\n ></aup-table-cell-renderer>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"columnIds.value\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: columnIds.value; let i = index\"\n [ngClass]=\"tableModel.getRowClasses(row)\" [class.enable-hover]=\"tableModel.isHoverEnabled()\"\n [attr.trackBy]=\"tableModel.trackBy(i, row)\"\n ></tr>\n\n </table>\n</div>\n",
3450
+ styles: [":host{display:flex;flex-direction:column;align-items:stretch}:host table{width:100%}:host.enable-scrolling{min-height:0}:host.enable-scrolling .scroll-container{flex:1;flex-basis:0;overflow-y:scroll;display:flex;flex-direction:column;align-items:stretch}"]
3420
3451
  },] }
3421
3452
  ];
3422
3453
  TableComponent.ctorParameters = function () { return [
@@ -3573,7 +3604,7 @@
3573
3604
  { type: i0.Component, args: [{
3574
3605
  selector: 'aup-table-header-cell-renderer',
3575
3606
  template: "<ng-container [cdkPortalOutlet]=\"getPortal()\" (attached)=\"initialiseHeader($event.instance)\"></ng-container>\n",
3576
- styles: [":host{align-items:stretch;display:flex;flex-direction:column;height:100%;justify-content:center}"]
3607
+ styles: [":host{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%}"]
3577
3608
  },] }
3578
3609
  ];
3579
3610
  TableHeaderCellRendererComponent.ctorParameters = function () { return []; };
@@ -3673,7 +3704,7 @@
3673
3704
  { type: i0.Component, args: [{
3674
3705
  selector: 'aup-tree-inheritance-icon',
3675
3706
  template: "<svg xmlns=\"http://www.w3.org/2000/svg\" [attr.width]=\"pixelWidth\" [attr.height]=\"pixelHeight\" [attr.viewBox]=\"viewBox\">\n <g fill=\"none\" fill-rule=\"evenodd\">\n <rect *ngIf=\"hasHead()\" width=\"1\" height=\"32.5\" x=\"11.5\" fill=\"currentColor\"/>\n <rect *ngIf=\"hasTail()\" width=\"1\" height=\"32.5\" x=\"11.5\" y=\"31.5\" fill=\"currentColor\"/>\n\n <rect *ngIf=\"hasLeadIn()\" width=\"12\" height=\"1\" y=\"31.5\" fill=\"currentColor\"/>\n <rect *ngIf=\"hasTerminal()\" width=\"12\" height=\"1\" x=\"12\" y=\"31.5\" fill=\"currentColor\"/>\n </g>\n</svg>\n",
3676
- styles: [":host{color:inherit;position:relative}svg{color:var(--line-color);display:block}"]
3707
+ styles: [":host{position:relative;color:inherit}svg{color:var(--line-color);display:block}"]
3677
3708
  },] }
3678
3709
  ];
3679
3710
  exports.TreeInheritanceIconComponent.ctorParameters = function () { return []; };
@@ -3772,7 +3803,7 @@
3772
3803
  { type: i0.Component, args: [{
3773
3804
  selector: 'aup-tree-label-cell-renderer',
3774
3805
  template: "<div class=\"tree-icons\">\n <aup-tree-inheritance-icon *ngFor=\"let iconClass of iconList.value\" [type]=\"iconClass\"></aup-tree-inheritance-icon>\n <aup-icon *ngIf=\"iconModel.value\"\n [icon]=\"iconModel.value\"\n [class.clickable]=\"canExpand.value || canCollapse.value\"\n (click)=\"expandOrCollapse(node)\" ></aup-icon>\n</div>\n<div class=\"label\">{{label}}</div>\n",
3775
- styles: [":host{--line-color:#ddd;--node-color:#999;align-items:stretch;display:inline-flex;flex-direction:row}:host div.label{align-items:center;display:flex;flex-direction:row;padding-left:6px;white-space:nowrap}:host div.tree-icons{-ms-grid-rows:1fr;align-items:stretch;display:-ms-grid;display:grid;grid-auto-columns:auto;grid-auto-flow:column;grid-template-rows:1fr;justify-content:stretch}:host div.tree-icons aup-icon{-ms-grid-row-align:center;align-self:center;color:var(--node-color)}:host div.tree-icons aup-icon.clickable{cursor:pointer}:host div.tree-icons aup-icon,:host div.tree-icons aup-tree-inheritance-icon{margin-left:4px}"]
3806
+ styles: [":host{--line-color:#ddd;--node-color:#999;display:inline-flex;flex-direction:row;align-items:stretch}:host div.label{display:flex;flex-direction:row;align-items:center;white-space:nowrap;padding-left:6px}:host div.tree-icons{display:grid;grid-auto-flow:column;grid-auto-columns:auto;grid-template-rows:1fr;align-items:stretch;justify-content:stretch}:host div.tree-icons aup-icon{align-self:center;color:var(--node-color)}:host div.tree-icons aup-icon.clickable{cursor:pointer}:host div.tree-icons aup-icon,:host div.tree-icons aup-tree-inheritance-icon{margin-left:4px}"]
3776
3807
  },] }
3777
3808
  ];
3778
3809
  TreeLabelCellRendererComponent.ctorParameters = function () { return []; };
@@ -3914,7 +3945,7 @@
3914
3945
  Object.defineProperty(DecoratedTreeNodeMixin.prototype, "decoratedSelf", {
3915
3946
  get: function () {
3916
3947
  var _this = this;
3917
- return this.memoize("decoratedSelf", function () {
3948
+ return this.memoize('decoratedSelf', function () {
3918
3949
  return _this.parent ? _this.parent.children.find(function (child) { return child.node === _this.node; }) : exports.DecoratedTreeNode.createRoot(_this.node);
3919
3950
  });
3920
3951
  },
@@ -3924,7 +3955,7 @@
3924
3955
  Object.defineProperty(DecoratedTreeNodeMixin.prototype, "children", {
3925
3956
  get: function () {
3926
3957
  var _this = this;
3927
- return this.memoize("children", function () {
3958
+ return this.memoize('children', function () {
3928
3959
  return _this.node.children ? _this.node.children.map(function (child) {
3929
3960
  return typescriptUtilities.Mixin.createProxy(child, new DecoratedTreeNodeMixin(_this.decoratedSelf, child));
3930
3961
  }) : [];
@@ -3935,7 +3966,7 @@
3935
3966
  });
3936
3967
  DecoratedTreeNodeMixin.prototype.descendants = function () {
3937
3968
  var _this = this;
3938
- return this.memoize("descendants", function () {
3969
+ return this.memoize('descendants', function () {
3939
3970
  var result = [];
3940
3971
  _this.visitDescendants(function (child) { return result.push(child); });
3941
3972
  return result;
@@ -3943,7 +3974,7 @@
3943
3974
  };
3944
3975
  DecoratedTreeNodeMixin.prototype.selfAndDescendants = function () {
3945
3976
  var _this = this;
3946
- return this.memoize("selfAndDescendants", function () {
3977
+ return this.memoize('selfAndDescendants', function () {
3947
3978
  var result = [];
3948
3979
  _this.visitSelfAndDescendants(function (child) { return result.push(child); });
3949
3980
  return result;
@@ -4014,29 +4045,24 @@
4014
4045
  };
4015
4046
  DecoratedTreeNodeMixin.prototype.ancestorsAndSelf = function () {
4016
4047
  var _this = this;
4017
- return this.memoize("ancestorsAndSelf", function () {
4048
+ return this.memoize('ancestorsAndSelf', function () {
4018
4049
  return _this.ancestors().concat([(_this.decoratedSelf)]);
4019
4050
  });
4020
4051
  };
4021
4052
  DecoratedTreeNodeMixin.prototype.pathToParent = function (parent) {
4022
- var _this = this;
4023
- return this.memoize("pathToParent", function () {
4024
- if (_this.node === parent.node) {
4025
- return [];
4026
- }
4027
- else if (_this.parent) {
4028
- return _this.parent.pathToParent(parent).concat([_this.parent]);
4029
- }
4030
- else {
4031
- throw new Error('parent is not an ancestor');
4032
- }
4033
- });
4053
+ if (this.node === parent.node) {
4054
+ return [];
4055
+ }
4056
+ else if (this.parent) {
4057
+ var pathToParent = this.parent.pathToParent(parent);
4058
+ return pathToParent.concat([this.parent]);
4059
+ }
4060
+ else {
4061
+ throw new Error('parent is not an ancestor');
4062
+ }
4034
4063
  };
4035
4064
  DecoratedTreeNodeMixin.prototype.pathToParentAndSelf = function (parent) {
4036
- var _this = this;
4037
- return this.memoize("pathToParentAndSelf", function () {
4038
- return _this.pathToParent(parent).concat([_this.decoratedSelf]);
4039
- });
4065
+ return this.pathToParent(parent).concat([this.decoratedSelf]);
4040
4066
  };
4041
4067
  DecoratedTreeNodeMixin.prototype.isRoot = function () {
4042
4068
  return !this.parent;
@@ -4052,20 +4078,20 @@
4052
4078
  return !this.isRoot() && this.node.children.length < 1;
4053
4079
  };
4054
4080
  DecoratedTreeNodeMixin.prototype.hasChildren = function () {
4055
- return this.node.children.length > 0;
4081
+ return this.node.children && this.node.children.length > 0;
4056
4082
  };
4057
4083
  DecoratedTreeNodeMixin.prototype.depthFromParent = function (parent) {
4058
4084
  return this.pathToParent(parent).length;
4059
4085
  };
4060
4086
  DecoratedTreeNodeMixin.prototype.treeDepth = function () {
4061
4087
  var _this = this;
4062
- return this.memoize("treeDepth", function () {
4088
+ return this.memoize('treeDepth', function () {
4063
4089
  return 1 + _this.descendants().map(function (child) { return child.depthFromParent(_this); }).reduce(function (prev, current) { return Math.max(prev, current); });
4064
4090
  });
4065
4091
  };
4066
4092
  DecoratedTreeNodeMixin.prototype.flatten = function () {
4067
4093
  var _this = this;
4068
- return this.memoize("flatten", function () {
4094
+ return this.memoize('flatten', function () {
4069
4095
  return _this.flattenInto([]);
4070
4096
  });
4071
4097
  };
@@ -4275,27 +4301,45 @@
4275
4301
  var TreeTableComponent = /** @class */ (function (_super) {
4276
4302
  __extends(TreeTableComponent, _super);
4277
4303
  function TreeTableComponent() {
4278
- return _super.call(this) || this;
4304
+ var _this = _super.call(this) || this;
4305
+ /**
4306
+ * Set to true to enable scrolling. Once enabled the table will have 0 implicit height. You will either
4307
+ * need to set it explicitly e.g. height: 400px; or by using flex or grid layout to make it fill it's
4308
+ * containment area.
4309
+ */
4310
+ _this.enableScrolling = false;
4311
+ return _this;
4279
4312
  }
4280
4313
  return TreeTableComponent;
4281
4314
  }(DisposableComponent));
4282
4315
  TreeTableComponent.decorators = [
4283
4316
  { type: i0.Component, args: [{
4284
4317
  selector: "aup-tree-table",
4285
- template: "<aup-table [tableModel]=\"treeTableModel\"></aup-table>\n",
4318
+ template: "<aup-table [tableModel]=\"treeTableModel\" [showHeaderModel]=\"showHeaderModel\" [enableScrolling]=\"enableScrolling\"></aup-table>\n",
4286
4319
  encapsulation: i0.ViewEncapsulation.None // allow us to target nested table styles
4287
4320
  ,
4288
- styles: ["td.mat-cell{border-bottom-width:0!important;border-top-width:0!important}td.mat-column-tree-label{width:1px}aup-table-cell-renderer[column-id=tree-label]{padding-left:8px!important}aup-tree-label-cell-renderer{flex:1}"]
4321
+ styles: ["td.mat-cell{border-top-width:0!important;border-bottom-width:0!important}td.mat-column-tree-label{width:1px}aup-table-cell-renderer[column-id=tree-label]{padding-left:8px!important}aup-tree-label-cell-renderer{flex:1}"]
4289
4322
  },] }
4290
4323
  ];
4291
4324
  TreeTableComponent.ctorParameters = function () { return []; };
4292
4325
  TreeTableComponent.propDecorators = {
4293
- treeTableModel: [{ type: i0.Input }]
4326
+ treeTableModel: [{ type: i0.Input }],
4327
+ showHeaderModel: [{ type: i0.Input }],
4328
+ showHeader: [{ type: i0.Input }],
4329
+ enableScrolling: [{ type: i0.Input }, { type: i0.HostBinding, args: ['class.enable-scrolling',] }]
4294
4330
  };
4295
4331
  __decorate([
4296
4332
  pectin.TrackExternal(),
4297
4333
  __metadata("design:type", TreeTableModel)
4298
4334
  ], TreeTableComponent.prototype, "treeTableModel", void 0);
4335
+ __decorate([
4336
+ pectin.TrackExternal({ defaultValue: true }),
4337
+ __metadata("design:type", pectin.ValueModel)
4338
+ ], TreeTableComponent.prototype, "showHeaderModel", void 0);
4339
+ __decorate([
4340
+ pectin.StoreInValueModel('showHeaderModel'),
4341
+ __metadata("design:type", Boolean)
4342
+ ], TreeTableComponent.prototype, "showHeader", void 0);
4299
4343
 
4300
4344
  var VerticalFocusContainerComponent = /** @class */ (function (_super) {
4301
4345
  __extends(VerticalFocusContainerComponent, _super);
@@ -4403,7 +4447,7 @@
4403
4447
  { type: i0.Component, args: [{
4404
4448
  selector: 'aup-paginator',
4405
4449
  template: "<p>Page {{pageNumber}} of {{totalPages}}</p>\n<button mat-icon-button [pectinCommand]=\"previousCommand\"><aup-icon icon=\"mat:keyboard_arrow_left\"></aup-icon></button>\n<button mat-icon-button [pectinCommand]=\"nextCommand\"><aup-icon icon=\"mat:keyboard_arrow_right\"></aup-icon></button>\n\n",
4406
- styles: [":host{align-items:center;color:rgba(0,0,0,.6);display:flex;flex-direction:row;font-size:12px;justify-content:flex-end;padding:0 8px}:host p{color:inherit;margin-right:8px}:host button.md-button.md-icon-button{height:30px;margin:0;padding:0;width:30px}"]
4450
+ styles: [":host{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;font-size:12px;padding:0 8px;color:rgba(0,0,0,.6)}:host p{color:inherit;margin-right:8px}:host button.md-button.md-icon-button{padding:0;margin:0;width:30px;height:30px}"]
4407
4451
  },] }
4408
4452
  ];
4409
4453
  PaginatorComponent.ctorParameters = function () { return []; };
@@ -4468,12 +4512,9 @@
4468
4512
  TreeTableComponent,
4469
4513
  exports.TreeInheritanceIconComponent,
4470
4514
  TreeLabelCellRendererComponent,
4471
- exports.IconComponent,
4472
4515
  BusyOverlayComponent,
4473
4516
  EmptyStateComponent,
4474
4517
  PaginatorComponent,
4475
- exports.IconComponent,
4476
- exports.IconComponent
4477
4518
  ],
4478
4519
  imports: [
4479
4520
  i2.CommonModule,
@@ -4622,7 +4663,7 @@
4622
4663
  { type: i0.Component, args: [{
4623
4664
  selector: 'aup-activity-actions',
4624
4665
  template: "<div class=\"content\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"hasConfirmFace()\">\n <aup-command class=\"confirm\" [command]=\"confirmCommand\" [face]=\"confirmFace\" data-cy=\"confirm-command\"></aup-command>\n</ng-container>\n<ng-container *ngIf=\"hasCancelFace()\">\n <aup-command class=\"cancel\" [command]=\"cancelCommand\" [face]=\"cancelFace\" data-cy=\"cancel-command\"></aup-command>\n</ng-container>\n",
4625
- styles: [":host{-ms-grid-columns:auto auto 1fr;-ms-grid-rows:auto;align-items:center;display:-ms-grid;display:grid;grid-template-areas:\"cancel confirm content\";grid-template-columns:auto auto 1fr;grid-template-rows:auto;justify-content:end}:host.align-end{-ms-grid-columns:1fr auto auto;grid-template-areas:\"content cancel confirm\";grid-template-columns:1fr auto auto}:host.align-stretch{-ms-grid-columns:auto 1fr auto;grid-template-areas:\"cancel content confirm\";grid-template-columns:auto 1fr auto}.cancel{-ms-grid-column:1;-ms-grid-row:1;grid-area:cancel}:host.align-end>.cancel{-ms-grid-column:2;-ms-grid-row:1}:host.align-stretch>.cancel{-ms-grid-column:1;-ms-grid-row:1}.confirm{-ms-grid-column:2;-ms-grid-row:1;grid-area:confirm}.column,:host.align-end>.confirm,:host.align-stretch>.confirm{-ms-grid-column:3;-ms-grid-row:1}.column{grid-area:content;text-align:left}:host.align-end>.column{-ms-grid-column:1;-ms-grid-row:1}:host.align-stretch>.column{-ms-grid-column:2;-ms-grid-row:1}"]
4666
+ styles: [":host{display:grid;grid-template-areas:\"cancel confirm content\";grid-template-columns:auto auto 1fr;grid-template-rows:auto;align-items:center;justify-content:end}:host.align-end{grid-template-areas:\"content cancel confirm\";grid-template-columns:1fr auto auto}:host.align-stretch{grid-template-areas:\"cancel content confirm\";grid-template-columns:auto 1fr auto}.cancel{grid-area:cancel}.confirm{grid-area:confirm}.column{grid-area:content;text-align:left}"]
4626
4667
  },] }
4627
4668
  ];
4628
4669
  ActivityActionsComponent.ctorParameters = function () { return [
@@ -4765,7 +4806,7 @@
4765
4806
  { type: i0.Component, args: [{
4766
4807
  selector: 'aup-alert-dialog',
4767
4808
  template: "<aup-activity-title *ngIf=\"alert.title\">{{alert.title()}}</aup-activity-title>\n<aup-activity-body>\n <p *ngFor=\"let line of alert.content()\">{{line}}</p>\n</aup-activity-body>\n<aup-activity-actions [confirmFace]=\"confirmFace\"></aup-activity-actions>\n",
4768
- styles: [":host{display:block}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{align-items:flex-end;justify-content:flex-end;margin-bottom:0!important;padding:0}"]
4809
+ styles: [":host{display:block}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]
4769
4810
  },] }
4770
4811
  ];
4771
4812
  AlertDialogComponent.ctorParameters = function () { return [
@@ -4821,7 +4862,7 @@
4821
4862
  { type: i0.Component, args: [{
4822
4863
  selector: 'aup-confirmation-dialog',
4823
4864
  template: "<aup-activity-title *ngIf=\"confirm.title\" [color]=\"titleColor\">{{confirm.title()}}</aup-activity-title>\n<aup-activity-body>\n <p *ngFor=\"let line of confirm.content()\">{{line}}</p>\n</aup-activity-body>\n<aup-activity-actions [confirmFace]=\"confirmFace\" [cancelFace]=\"cancelFace\"></aup-activity-actions>\n",
4824
- styles: [":host{display:block}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{align-items:flex-end;justify-content:flex-end;margin-bottom:0!important;padding:0}"]
4865
+ styles: [":host{display:block}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]
4825
4866
  },] }
4826
4867
  ];
4827
4868
  ConfirmThenDialogComponent.ctorParameters = function () { return [
@@ -4868,7 +4909,7 @@
4868
4909
  { type: i0.Component, args: [{
4869
4910
  selector: 'aup-confirmation-dialog',
4870
4911
  template: "<aup-activity-title *ngIf=\"confirm.title\" [color]=\"titleColor\">{{confirm.title()}}</aup-activity-title>\n<aup-activity-body>\n <p *ngFor=\"let line of confirm.content()\">{{line}}</p>\n</aup-activity-body>\n<aup-activity-actions [confirmFace]=\"confirmFace\" [cancelFace]=\"cancelFace\"></aup-activity-actions>\n\n",
4871
- styles: [":host{display:block}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{align-items:flex-end;justify-content:flex-end;margin-bottom:0!important;padding:0}"]
4912
+ styles: [":host{display:block}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}"]
4872
4913
  },] }
4873
4914
  ];
4874
4915
  ConfirmationDialogComponent.ctorParameters = function () { return [
@@ -5642,7 +5683,7 @@
5642
5683
  { type: i0.Component, args: [{
5643
5684
  selector: 'aup-add-item-interaction-context',
5644
5685
  template: "<aup-in-place-interaction-context [animateFirstActivity]=\"false\">\n <a part=\"link\" class=\"link\" [pectinCommand]=\"clickCommand\"><aup-icon [icon]=\"icon\"></aup-icon> {{label}}</a>\n</aup-in-place-interaction-context>\n",
5645
- styles: [":host{--def-link-background:var(--link-background,transparent);--def-link-background-hover:var(--link-background-hover,rgba(0,0,0,0.05));--def-link-border-radius:var(--link-border-radius,4px);--def-link-color:var(--link-color,currentColor);--def-link-color-hover:var(--link-color-hover,currentColor);--def-link-padding:var(--link-padding,calc(var(--aup-default-padding)/2));border-radius:var(--def-link-border-radius);box-sizing:border-box;display:flex;flex-direction:column;outline:none}:host:hover a.link{background-color:var(--def-link-background-hover);color:var(--def-link-color-hover)}a.link,aup-in-place-interaction-context{border-radius:var(--def-link-border-radius)}a.link{align-items:center;background:var(--def-link-background);color:var(--def-link-color);cursor:pointer;display:flex;flex-direction:row;padding:var(--def-link-padding);text-decoration:none}a.link mat-icon{margin-right:8px}"]
5686
+ styles: [":host{--def-link-color:var(--link-color,currentColor);--def-link-color-hover:var(--link-color-hover,currentColor);--def-link-background:var(--link-background,transparent);--def-link-background-hover:var(--link-background-hover,rgba(0,0,0,0.05));--def-link-border-radius:var(--link-border-radius,4px);--def-link-padding:var(--link-padding,calc(var(--aup-default-padding) / 2));display:flex;flex-direction:column;border-radius:var(--def-link-border-radius);box-sizing:border-box;outline:none}:host:hover a.link{color:var(--def-link-color-hover);background-color:var(--def-link-background-hover)}a.link,aup-in-place-interaction-context{border-radius:var(--def-link-border-radius)}a.link{display:flex;flex-direction:row;align-items:center;color:var(--def-link-color);background:var(--def-link-background);padding:var(--def-link-padding);cursor:pointer;text-decoration:none}a.link mat-icon{margin-right:8px}"]
5646
5687
  },] }
5647
5688
  ];
5648
5689
  AddItemInteractionContextComponent.ctorParameters = function () { return []; };
@@ -5962,6 +6003,15 @@
5962
6003
  * table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
5963
6004
  * });
5964
6005
  *
6006
+ * Template columns
6007
+ * @example
6008
+ * const model = TableModel.fromList(heroList, table => {
6009
+ * table.addSelectionColumn(selectionModel); // <- can be single or multiple selection model
6010
+ * table.addTemplateColumn("myTemplate");
6011
+ * });
6012
+ *
6013
+ * <div *aupColumnTemplate="let hero; columnId: 'myTemplate'">{{hero.age}}</div>
6014
+ *
5965
6015
  * I18n
5966
6016
  * @example
5967
6017
  * [table.yml]
@@ -6328,6 +6378,7 @@
6328
6378
  _this._active = new pectin.MutableValueModel(false);
6329
6379
  var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
6330
6380
  when(_this._active).becomesTruthy(function () { return _this.onPlaceReady(); });
6381
+ _this.childPlaces = _this.placeDefinition.children.map(function (d) { return d.component; });
6331
6382
  return _this;
6332
6383
  }
6333
6384
  // @Trace()
@@ -6377,13 +6428,6 @@
6377
6428
  enumerable: false,
6378
6429
  configurable: true
6379
6430
  });
6380
- Object.defineProperty(PlaceComponent.prototype, "childPlaces", {
6381
- get: function () {
6382
- return this.placeDefinition.children.map(function (d) { return d.component; });
6383
- },
6384
- enumerable: false,
6385
- configurable: true
6386
- });
6387
6431
  Object.defineProperty(PlaceComponent.prototype, "active", {
6388
6432
  get: function () {
6389
6433
  return this._active.readonly;
@@ -6450,6 +6494,7 @@
6450
6494
  this.component = component;
6451
6495
  this.navigationSession = navigationSession;
6452
6496
  this.isPrimaryComponent = isPrimaryComponent;
6497
+ pectin.assert.notNil(component);
6453
6498
  }
6454
6499
  Object.defineProperty(PlaceComponentDeactivationHandler.prototype, "routerInteractionAdapter", {
6455
6500
  get: function () {
@@ -7617,7 +7662,7 @@
7617
7662
  { type: i1$1.UrlSerializer }
7618
7663
  ]; };
7619
7664
 
7620
- var PlaceRouter = /** @class */ (function (_super) {
7665
+ exports.PlaceRouter = /** @class */ (function (_super) {
7621
7666
  __extends(PlaceRouter, _super);
7622
7667
  function PlaceRouter(angularRouter, angularLocation, interactionService, urlService, placeHistory) {
7623
7668
  var _this = _super.call(this) || this;
@@ -7653,7 +7698,7 @@
7653
7698
  .pluck('name')
7654
7699
  .otherwise(idleStateName);
7655
7700
  pectin.DebugContext.tag(_this._activeVisits, 'PlaceRouter.activeVisits');
7656
- _this.activeVisitsByPlaceDefinition = chain(_this._activeVisits).indexBy('placeDefinition');
7701
+ _this.state = chain(_this._activeVisits).reduce(function (visits) { return new PlaceRouter.State(visits); });
7657
7702
  // TODO: make setup the callbacks in during module initiation to make this testable.
7658
7703
  angularRouter.events.subscribe(function (event) {
7659
7704
  // Routing event sequence
@@ -7717,9 +7762,6 @@
7717
7762
  PlaceRouter.prototype.getAuthenticationFailureRedirect = function (activatedRoute, state) {
7718
7763
  return this.redirections.onAuthenticationFailure(activatedRoute, state);
7719
7764
  };
7720
- PlaceRouter.prototype.getAuthorisationFailureRedirect = function (activatedRoute, state) {
7721
- return this.redirections.onAuthorisationFailure(activatedRoute, state);
7722
- };
7723
7765
  Object.defineProperty(PlaceRouter.prototype, "navigationSession", {
7724
7766
  get: function () {
7725
7767
  return this.navigationSessionModel.value;
@@ -7955,19 +7997,34 @@
7955
7997
  };
7956
7998
  return PlaceRouter;
7957
7999
  }(pectin.GarbageCollector));
7958
- PlaceRouter.ɵprov = i0.ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new PlaceRouter(i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(i2.Location), i0.ɵɵinject(exports.InteractionService), i0.ɵɵinject(UrlService), i0.ɵɵinject(exports.PlaceHistory)); }, token: PlaceRouter, providedIn: "root" });
7959
- PlaceRouter.decorators = [
8000
+ exports.PlaceRouter.ɵprov = i0.ɵɵdefineInjectable({ factory: function PlaceRouter_Factory() { return new exports.PlaceRouter(i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(i2.Location), i0.ɵɵinject(exports.InteractionService), i0.ɵɵinject(UrlService), i0.ɵɵinject(exports.PlaceHistory)); }, token: exports.PlaceRouter, providedIn: "root" });
8001
+ exports.PlaceRouter.decorators = [
7960
8002
  { type: i0.Injectable, args: [{
7961
8003
  providedIn: 'root'
7962
8004
  },] }
7963
8005
  ];
7964
- PlaceRouter.ctorParameters = function () { return [
8006
+ exports.PlaceRouter.ctorParameters = function () { return [
7965
8007
  { type: i1$1.Router },
7966
8008
  { type: i2.Location },
7967
8009
  { type: exports.InteractionService },
7968
8010
  { type: UrlService },
7969
8011
  { type: exports.PlaceHistory }
7970
8012
  ]; };
8013
+ (function (PlaceRouter) {
8014
+ var State = /** @class */ (function () {
8015
+ function State(activeVisits) {
8016
+ this.activeVisits = activeVisits;
8017
+ }
8018
+ State.prototype.isPlaceActive = function (placeDefinition) {
8019
+ return !!this.getVisitFor(placeDefinition);
8020
+ };
8021
+ State.prototype.getVisitFor = function (placeDefinition) {
8022
+ return this.activeVisits.find(function (v) { return v.placeDefinition === placeDefinition; });
8023
+ };
8024
+ return State;
8025
+ }());
8026
+ PlaceRouter.State = State;
8027
+ })(exports.PlaceRouter || (exports.PlaceRouter = {}));
7971
8028
 
7972
8029
  var Visit = /** @class */ (function () {
7973
8030
  function Visit(placeDefinition, visitParameters) {
@@ -8040,6 +8097,20 @@
8040
8097
 
8041
8098
  var AUP_PLACE_CONFIG = new i0.InjectionToken('AUP_PLACE_CONFIG');
8042
8099
 
8100
+ var NotAuthorisedNoticeComponent = /** @class */ (function () {
8101
+ function NotAuthorisedNoticeComponent() {
8102
+ }
8103
+ return NotAuthorisedNoticeComponent;
8104
+ }());
8105
+ NotAuthorisedNoticeComponent.decorators = [
8106
+ { type: i0.Component, args: [{
8107
+ selector: 'aup-not-authorised-notice',
8108
+ template: "<p>You are not authorised to access this page</p>\n",
8109
+ styles: [":host{display:flex;flex-direction:column;align-items:center;justify-content:center}"]
8110
+ },] }
8111
+ ];
8112
+ NotAuthorisedNoticeComponent.ctorParameters = function () { return []; };
8113
+
8043
8114
  // Freezes the state of the components at the start of the animation.
8044
8115
  var animationStartStyle = animations$1.style({ position: 'absolute', top: '0', left: '0', bottom: '0', right: '0' });
8045
8116
  var left = [
@@ -8084,13 +8155,15 @@
8084
8155
  }
8085
8156
  var LEFT_RIGHT_PLACE_ANIMATION = leftRightPlaceAnimation('0.3s');
8086
8157
 
8158
+ var AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT = new i0.InjectionToken('AUP_UNAUTHORISED_PLACE_COMPONENT');
8087
8159
  var PlaceOutletComponent = /** @class */ (function (_super) {
8088
8160
  __extends(PlaceOutletComponent, _super);
8089
- function PlaceOutletComponent(router, placeRouter, placeConfig, parentOutlet) {
8161
+ function PlaceOutletComponent(router, placeRouter, placeConfig, unauthorisedPlaceNotice, parentOutlet, cdr) {
8090
8162
  var _this = _super.call(this) || this;
8091
8163
  _this.router = router;
8092
8164
  _this.placeRouter = placeRouter;
8093
8165
  _this.placeConfig = placeConfig;
8166
+ _this.cdr = cdr;
8094
8167
  _this.placeChanged = new i0.EventEmitter();
8095
8168
  _this.outletActivated = new pectin.MutableValueModel(false);
8096
8169
  _this._activatedRouteModel = new pectin.MutableValueModel();
@@ -8123,7 +8196,7 @@
8123
8196
  _this.animationEnabled = valueOf.all(_this.animateModel, _this.animationSupported).areTruthy();
8124
8197
  // Extract our visit model from the place router.
8125
8198
  _this._activePlaceDefinition = chain(_this._activePlaceModel).pluck('placeDefinition');
8126
- _this.routerVisitModel = _this._activePlaceDefinition.findIn(chain(placeRouter.activeVisitsByPlaceDefinition));
8199
+ _this.routerVisitModel = chain(placeRouter.state).map(function (state) { return state.getVisitFor(_this._activePlaceDefinition.value); }, { dependsOn: _this._activePlaceDefinition });
8127
8200
  _this.navigationInProgress = chain(_this.placeRouter.navigationInProgress);
8128
8201
  when(_this.navigationInProgress).becomesFalsey(function () {
8129
8202
  _this.checkStateAndInitialise();
@@ -8134,13 +8207,11 @@
8134
8207
  chain(_this._activePlaceModel)
8135
8208
  .postponeWhile(_this.navigationInProgress)
8136
8209
  .subscribe(function (place) { return _this.placeChanged.emit(place); });
8137
- when(placeRouter.accessGuard).changes(function (guard) {
8138
- var activePlace = _this._activePlaceModel.value;
8139
- if (activePlace && !guard.isAuthorised(activePlace.placeDefinition)) {
8140
- var visit = placeRouter.getAuthorisationFailureRedirect(_this._activatedRouteModel.value.snapshot, _this.router.routerState.snapshot);
8141
- _this.placeRouter.navigate(visit);
8142
- }
8143
- });
8210
+ _this.authorised = chain(placeRouter.accessGuard).map(function (guard) { return guard.isAuthorised(_this._activePlaceDefinition.value); }, {
8211
+ dependsOn: _this._activePlaceDefinition,
8212
+ postponeWhile: chain(_this._activePlaceDefinition).isNil()
8213
+ }).otherwise(true); // if we don't have a place def yet we need to show the outlet so we get one injected.
8214
+ _this.notAuthorisedNoticePortal = new portal.ComponentPortal(unauthorisedPlaceNotice !== null && unauthorisedPlaceNotice !== void 0 ? unauthorisedPlaceNotice : NotAuthorisedNoticeComponent);
8144
8215
  return _this;
8145
8216
  }
8146
8217
  // @Trace()
@@ -8157,6 +8228,13 @@
8157
8228
  enumerable: false,
8158
8229
  configurable: true
8159
8230
  });
8231
+ Object.defineProperty(PlaceOutletComponent.prototype, "isAuthorised", {
8232
+ get: function () {
8233
+ return this.authorised.value;
8234
+ },
8235
+ enumerable: false,
8236
+ configurable: true
8237
+ });
8160
8238
  // @Trace()
8161
8239
  PlaceOutletComponent.prototype.navigate = function (visit) {
8162
8240
  // const place = this.placesInAnimationOrder.query().findMatching(p => visit.placeDefinition.component === p);
@@ -8223,6 +8301,7 @@
8223
8301
  pectin.lang.illegalState('wrong visit!!!');
8224
8302
  }
8225
8303
  this.initialisePlace(routerVisit, activePlace);
8304
+ this.cdr.detectChanges();
8226
8305
  }
8227
8306
  };
8228
8307
  PlaceOutletComponent.prototype.initialisePlace = function (routerVisit, activePlace) {
@@ -8276,16 +8355,18 @@
8276
8355
  PlaceOutletComponent.decorators = [
8277
8356
  { type: i0.Component, args: [{
8278
8357
  selector: 'aup-place-outlet',
8279
- template: "<ng-container *ngIf=\"animationEnabled.value\">\n <div class=\"router-outlet-container\" cdkScrollable\n [@routeAnimations]=\"{value: getAnimationOrder(), params:{duration: animationDuration}}\"\n (@routeAnimations.start)=\"animationStarted()\"\n (@routeAnimations.done)=\"animationDone()\"\n >\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated()\">\n </router-outlet>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"!animationEnabled.value\">\n <div class=\"router-outlet-container\" cdkScrollable>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated()\">\n </router-outlet>\n </div>\n</ng-container>\n\n",
8358
+ template: "<ng-container *ngIf=\"animationEnabled.value\">\n <div class=\"router-outlet-container\"\n cdkScrollable\n [@routeAnimations]=\"{value: getAnimationOrder(), params:{duration: animationDuration}}\"\n (@routeAnimations.start)=\"animationStarted()\"\n (@routeAnimations.done)=\"animationDone()\"\n >\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated()\">\n </router-outlet>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"!animationEnabled.value\">\n <div class=\"router-outlet-container\"\n cdkScrollable>\n <router-outlet #routerOutlet=\"outlet\"\n (activate)=\"onOutletActivated(routerOutlet, $event)\"\n (deactivate)=\"onOutletDeactivated()\">\n </router-outlet>\n </div>\n</ng-container>\n\n<div class=\"not-authorised-component-container\" *ngIf=\"!authorised.value\">\n <ng-template [cdkPortalOutlet]=\"notAuthorisedNoticePortal\"></ng-template>\n</div>\n",
8280
8359
  animations: [LEFT_RIGHT_PLACE_ANIMATION],
8281
- styles: [":host{display:flex;flex-direction:column;min-height:0}.router-outlet-container{display:block;flex:1;min-height:0;overflow-x:hidden;overflow-y:scroll;position:relative}router-outlet{display:none}"]
8360
+ styles: [":host{display:flex;flex-direction:column;min-height:0}:host:not(.authorised) .router-outlet-container{display:none}.router-outlet-container{flex:1;display:block;position:relative;min-height:0;overflow-x:hidden;overflow-y:scroll}router-outlet{display:none}.not-authorised-component-container{flex:1;display:grid;grid-template-columns:1fr;grid-template-rows:1fr}"]
8282
8361
  },] }
8283
8362
  ];
8284
8363
  PlaceOutletComponent.ctorParameters = function () { return [
8285
8364
  { type: i1$1.Router },
8286
- { type: PlaceRouter },
8365
+ { type: exports.PlaceRouter },
8287
8366
  { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [AUP_PLACE_CONFIG,] }] },
8288
- { type: PlaceOutletComponent, decorators: [{ type: i0.SkipSelf }, { type: i0.Optional }] }
8367
+ { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT,] }] },
8368
+ { type: PlaceOutletComponent, decorators: [{ type: i0.SkipSelf }, { type: i0.Optional }] },
8369
+ { type: i0.ChangeDetectorRef }
8289
8370
  ]; };
8290
8371
  PlaceOutletComponent.propDecorators = {
8291
8372
  animate: [{ type: i0.Input }],
@@ -8293,7 +8374,8 @@
8293
8374
  customPlaceAnimationOrderModel: [{ type: i0.Input, args: ['placeAnimationOrderModel',] }],
8294
8375
  customPlaceAnimationOrder: [{ type: i0.Input, args: ['placeAnimationOrder',] }],
8295
8376
  placeChanged: [{ type: i0.Output }],
8296
- routerOut: [{ type: i0.ViewChild, args: ['routeOutlet', { static: true },] }]
8377
+ routerOut: [{ type: i0.ViewChild, args: ['routeOutlet', { static: true },] }],
8378
+ isAuthorised: [{ type: i0.HostBinding, args: ["class.authorised",] }]
8297
8379
  };
8298
8380
  __decorate([
8299
8381
  pectin.StoreInValueModel('animateModel'),
@@ -8318,13 +8400,15 @@
8318
8400
  var _this = _super.call(this) || this;
8319
8401
  _this.placeRouter = placeRouter;
8320
8402
  _this._activePlaceComponent = new pectin.DelegatingValueModel();
8403
+ _this.trackByPlaceDef = function (data) { return data.place; };
8321
8404
  var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
8322
8405
  _this.placeDefinitions = chain(_this.placesModel)
8323
8406
  .map(function (c) { return exports.PlaceComponent.getDefinition(c); })
8324
8407
  .select(function (d) {
8325
8408
  var guard = placeRouter.accessGuard.value;
8326
- return guard.isAuthorised(d);
8327
- }, { dependsOn: placeRouter.accessGuard });
8409
+ var state = placeRouter.state.value;
8410
+ return guard.isAuthorised(d) || state.isPlaceActive(d);
8411
+ }, { dependsOn: [placeRouter.accessGuard, placeRouter.state] });
8328
8412
  _this.commandFactory = pectin.Command.createFactory(function (placeDefinition) {
8329
8413
  _this.placeOutlet.navigate(new Visit(placeDefinition));
8330
8414
  });
@@ -8335,7 +8419,20 @@
8335
8419
  setTimeout(function () { return _this._activePlaceComponent.setDelegate(outlet ? outlet.activePlaceModel : null); });
8336
8420
  });
8337
8421
  _this.activePlaceDefinition = chain(_this._activePlaceComponent).pluck('placeDefinition');
8422
+ _this.menuItems = chain(_this.placeDefinitions).map(function (d) {
8423
+ return {
8424
+ place: d,
8425
+ active: _this.activePlaceDefinition.value === d
8426
+ };
8427
+ }, {
8428
+ dependsOn: _this.activePlaceDefinition
8429
+ });
8338
8430
  return _this;
8431
+ // const txo = new TransactionObserver({ verbose: true }).onEvent(e => console.log(e.name, e.payload));
8432
+ // txo.observe('this.placesModel', this.placesModel);
8433
+ // txo.observe('this.placeDefinitions', this.placeDefinitions);
8434
+ // txo.observe('this.activePlaceDefinition', this.activePlaceDefinition);
8435
+ // txo.observe('this.menuItems', this.menuItems);
8339
8436
  }
8340
8437
  AbstractPlaceNavigationComponent.prototype.getNavigationFace = function (placeDef) {
8341
8438
  var navItem = placeDef.getPlaceData('nav');
@@ -8346,7 +8443,7 @@
8346
8443
  };
8347
8444
  };
8348
8445
  AbstractPlaceNavigationComponent.prototype.isActive = function (place) {
8349
- return this.activePlaceDefinition.query().equals(place);
8446
+ return;
8350
8447
  };
8351
8448
  AbstractPlaceNavigationComponent.prototype.ngOnInit = function () {
8352
8449
  };
@@ -8358,7 +8455,7 @@
8358
8455
  },] }
8359
8456
  ];
8360
8457
  AbstractPlaceNavigationComponent.ctorParameters = function () { return [
8361
- { type: PlaceRouter }
8458
+ { type: exports.PlaceRouter }
8362
8459
  ]; };
8363
8460
  AbstractPlaceNavigationComponent.propDecorators = {
8364
8461
  places: [{ type: i0.Input }],
@@ -8399,12 +8496,12 @@
8399
8496
  ListPlaceNavComponent.decorators = [
8400
8497
  { type: i0.Component, args: [{
8401
8498
  selector: 'aup-list-place-nav',
8402
- template: "<mat-nav-list fxFlex>\n <a mat-list-item *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [class.active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"getNavigationFace(placeDefinition).tooltip()\">\n <aup-command-face [faces]=\"[getNavigationFace(placeDefinition)]\"></aup-command-face>\n </a>\n</mat-nav-list>\n",
8403
- styles: [":host{--selected-background:#f1f1f1;--selected-border-color:#838383;--selected-color:inherit;display:flex;flex-direction:column}mat-nav-list{padding-top:0}a{border-right:2px solid transparent}a.active{background:var(--selected-background);border-right:2px solid var(--selected-border-color);color:var(--selected-color)}"]
8499
+ template: "<mat-nav-list fxFlex>\n <a mat-list-item *ngFor=\"let item of menuItems.value; trackBy: trackByPlaceDef\"\n [pectinCommand]=\"commandFactory.create(item.place)\"\n [class.active]=\"item.active\"\n [matTooltip]=\"getNavigationFace(item.place).tooltip()\">\n <aup-command-face [faces]=\"[getNavigationFace(item.place)]\"></aup-command-face>\n </a>\n</mat-nav-list>\n",
8500
+ styles: [":host{display:flex;flex-direction:column;--selected-border-color:#838383;--selected-color:inherit;--selected-background:#f1f1f1}mat-nav-list{padding-top:0}a{border-right:2px solid transparent}a.active{border-right:2px solid var(--selected-border-color);background:var(--selected-background);color:var(--selected-color)}"]
8404
8501
  },] }
8405
8502
  ];
8406
8503
  ListPlaceNavComponent.ctorParameters = function () { return [
8407
- { type: PlaceRouter }
8504
+ { type: exports.PlaceRouter }
8408
8505
  ]; };
8409
8506
 
8410
8507
  /**
@@ -8470,12 +8567,12 @@
8470
8567
  SidePlaceNavigationComponent.decorators = [
8471
8568
  { type: i0.Component, args: [{
8472
8569
  selector: 'aup-side-place-navigation',
8473
- template: "<mat-nav-list>\n <a mat-list-item (click)=\"toggleMenu()\" class=\"home\">\n <aup-icon class=\"collapsed-only\" icon=\"mat:menu\"></aup-icon>\n <aup-icon class=\"expanded-only\" icon=\"mat:arrow_back\"></aup-icon>\n <span class=\"expanded-only\">Menu</span>\n </a>\n <a mat-list-item *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [class.active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"getNavigationFace(placeDefinition).tooltip()\">\n <aup-icon *ngIf=\"getNavigationFace(placeDefinition).icon()\" [icon]=\"getNavigationFace(placeDefinition).icon()\"></aup-icon>\n <span class=\"expanded-only\">{{getNavigationFace(placeDefinition).text()}}</span>\n </a>\n <span [style.flex]=\"1\"></span>\n <ng-container *ngIf=\"navEndTemplate\" [ngTemplateOutlet]=\"navEndTemplate\"></ng-container>\n</mat-nav-list>\n",
8474
- styles: [":host{--resolved-background-color:var(--nav-background-color,#555);--resolved-color:var(--nav-color,hsla(0,0%,100%,0.9));--resolved-expanded-width:var(--nav-expanded-width,235px);--resolved-nav-item-height:var(--nav-item-height,var(--resolved-nav-item-width));--resolved-nav-item-width:var(--nav-width,56px);background-color:var(--resolved-background-color);color:var(--resolved-color);display:flex;flex-direction:column;transition:width 125ms linear;width:var(--resolved-nav-item-width)}:host.expanded{max-width:var(--resolved-expanded-width);width:var(--resolved-expanded-width)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item aup-icon:not(.collapsed-only){margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}mat-nav-list{display:flex;flex:1;flex-direction:column}.mat-list-item{color:inherit;height:var(--resolved-nav-item-height);width:var(--resolved-nav-item-width)}.mat-list-item.active{background-color:#444}.mat-list-item.home{text-align:left}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}"]
8570
+ template: "<mat-nav-list>\n <a mat-list-item (click)=\"toggleMenu()\" class=\"home\">\n <aup-icon class=\"collapsed-only\" icon=\"mat:menu\"></aup-icon>\n <aup-icon class=\"expanded-only\" icon=\"mat:arrow_back\"></aup-icon>\n <span class=\"expanded-only\">Menu</span>\n </a>\n <a mat-list-item *ngFor=\"let item of menuItems.value; trackBy: trackByPlaceDef\"\n [pectinCommand]=\"commandFactory.create(item.place)\"\n [class.active]=\"item.active\"\n [matTooltip]=\"getNavigationFace(item.place).tooltip()\">\n <aup-icon *ngIf=\"getNavigationFace(item.place).icon()\" [icon]=\"getNavigationFace(item.place).icon()\"></aup-icon>\n <span class=\"expanded-only\">{{getNavigationFace(item.place).text()}}</span>\n </a>\n <span [style.flex]=\"1\"></span>\n <ng-container *ngIf=\"navEndTemplate\" [ngTemplateOutlet]=\"navEndTemplate\"></ng-container>\n</mat-nav-list>\n",
8571
+ styles: [":host{display:flex;flex-direction:column;--resolved-nav-item-width:var(--nav-width,56px);--resolved-nav-item-height:var(--nav-item-height,var(--resolved-nav-item-width));--resolved-expanded-width:var(--nav-expanded-width,235px);--resolved-color:var(--nav-color,hsla(0,0%,100%,0.9));--resolved-background-color:var(--nav-background-color,#555);width:var(--resolved-nav-item-width);transition:width 125ms linear;background-color:var(--resolved-background-color);color:var(--resolved-color)}:host.expanded{width:var(--resolved-expanded-width);max-width:var(--resolved-expanded-width)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item aup-icon:not(.collapsed-only){margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--resolved-nav-item-width);height:var(--resolved-nav-item-height);color:inherit}.mat-list-item.active{background-color:#444}.mat-list-item.home{text-align:left}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}"]
8475
8572
  },] }
8476
8573
  ];
8477
8574
  SidePlaceNavigationComponent.ctorParameters = function () { return [
8478
- { type: PlaceRouter }
8575
+ { type: exports.PlaceRouter }
8479
8576
  ]; };
8480
8577
  SidePlaceNavigationComponent.propDecorators = {
8481
8578
  expanded: [{ type: i0.HostBinding, args: ['class.expanded',] }],
@@ -8492,12 +8589,12 @@
8492
8589
  TabbedPlaceNavigationComponent.decorators = [
8493
8590
  { type: i0.Component, args: [{
8494
8591
  selector: 'aup-tabbed-place-navigation',
8495
- template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"getNavigationFace(placeDefinition).tooltip()\">\n <aup-command-face [faces]=\"[getNavigationFace(placeDefinition)]\"></aup-command-face>\n </a>\n</nav>\n",
8592
+ template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let item of menuItems.value; trackBy: trackByPlaceDef\"\n [pectinCommand]=\"commandFactory.create(item.place)\"\n [active]=\"item.active\"\n [matTooltip]=\"getNavigationFace(item.place).tooltip()\">\n <aup-command-face [faces]=\"[getNavigationFace(item.place)]\"></aup-command-face>\n </a>\n</nav>\n",
8496
8593
  styles: [""]
8497
8594
  },] }
8498
8595
  ];
8499
8596
  TabbedPlaceNavigationComponent.ctorParameters = function () { return [
8500
- { type: PlaceRouter }
8597
+ { type: exports.PlaceRouter }
8501
8598
  ]; };
8502
8599
 
8503
8600
  var PlaceModule = /** @class */ (function () {
@@ -8518,14 +8615,16 @@
8518
8615
  icon.MatIconModule,
8519
8616
  DirectivesModule,
8520
8617
  flexLayout.FlexModule,
8521
- ComponentsModule
8618
+ ComponentsModule,
8619
+ portal.PortalModule
8522
8620
  ],
8523
8621
  declarations: [
8524
8622
  PlaceOutletComponent,
8525
8623
  TabbedPlaceNavigationComponent,
8526
8624
  ListPlaceNavComponent,
8527
8625
  SidePlaceNavigationComponent,
8528
- AbstractPlaceNavigationComponent
8626
+ AbstractPlaceNavigationComponent,
8627
+ NotAuthorisedNoticeComponent
8529
8628
  ],
8530
8629
  entryComponents: [],
8531
8630
  exports: [
@@ -8857,7 +8956,7 @@
8857
8956
  // @Trace()
8858
8957
  PlaceGuard.prototype.canActivate = function (activatedRoute, state) {
8859
8958
  return __awaiter(this, void 0, void 0, function () {
8860
- var placeDefinition_1, redirectLocation, nextPlaceDef, redirectLocation, nextPlaceDef, result;
8959
+ var placeDefinition_1, redirectLocation, nextPlaceDef, result;
8861
8960
  var _this = this;
8862
8961
  return __generator(this, function (_a) {
8863
8962
  switch (_a.label) {
@@ -8875,14 +8974,6 @@
8875
8974
  }
8876
8975
  return [2 /*return*/, this.createUrlTree(redirectLocation)];
8877
8976
  }
8878
- if (!(this.placeRouter.accessGuard.value ? this.placeRouter.accessGuard.value.isAuthorised(placeDefinition_1) : true)) {
8879
- redirectLocation = this.placeRouter.getAuthorisationFailureRedirect(activatedRoute, state);
8880
- nextPlaceDef = this.getPlaceDefinition(redirectLocation);
8881
- if (!(this.placeRouter.accessGuard.value ? this.placeRouter.accessGuard.value.isAuthorised(nextPlaceDef) : true)) {
8882
- pectin.lang.illegalState("handleNotAuthorised hook returned place " + nextPlaceDef.component.name + " that is not authorised for the current user.");
8883
- }
8884
- return [2 /*return*/, this.createUrlTree(redirectLocation)];
8885
- }
8886
8977
  _a.label = 2;
8887
8978
  case 2: return [4 /*yield*/, this.cleanInteractionState(activatedRoute, state, function () { return __awaiter(_this, void 0, void 0, function () {
8888
8979
  var params, parsedParams, navigationSession, initialVisit, sanitiser, sanitisedVisit, urlSnapshot;
@@ -8926,6 +9017,11 @@
8926
9017
  return __generator(this, function (_a) {
8927
9018
  switch (_a.label) {
8928
9019
  case 0:
9020
+ if (!component) {
9021
+ // this happens when the place wasn't authorised and the associated
9022
+ // router outlet was removed from the dom.
9023
+ return [2 /*return*/, true];
9024
+ }
8929
9025
  currentUrl = this.urlService.parseUrl(currentState.url);
8930
9026
  nextUrl = this.urlService.parseUrl(nextState.url);
8931
9027
  return [4 /*yield*/, this.placeRouter.navigationSession.canDeactivatePlace(component, currentUrl, nextUrl)];
@@ -8986,14 +9082,14 @@
8986
9082
  };
8987
9083
  return PlaceGuard;
8988
9084
  }());
8989
- PlaceGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function PlaceGuard_Factory() { return new PlaceGuard(i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(UrlService), i0.ɵɵinject(PlaceRouter), i0.ɵɵinject(exports.PlaceHistory), i0.ɵɵinject(exports.InteractionService), i0.ɵɵinject(i0.INJECTOR)); }, token: PlaceGuard, providedIn: "root" });
9085
+ PlaceGuard.ɵprov = i0.ɵɵdefineInjectable({ factory: function PlaceGuard_Factory() { return new PlaceGuard(i0.ɵɵinject(i1$1.Router), i0.ɵɵinject(UrlService), i0.ɵɵinject(exports.PlaceRouter), i0.ɵɵinject(exports.PlaceHistory), i0.ɵɵinject(exports.InteractionService), i0.ɵɵinject(i0.INJECTOR)); }, token: PlaceGuard, providedIn: "root" });
8990
9086
  PlaceGuard.decorators = [
8991
9087
  { type: i0.Injectable, args: [{ providedIn: 'root' },] }
8992
9088
  ];
8993
9089
  PlaceGuard.ctorParameters = function () { return [
8994
9090
  { type: i1$1.Router },
8995
9091
  { type: UrlService },
8996
- { type: PlaceRouter },
9092
+ { type: exports.PlaceRouter },
8997
9093
  { type: exports.PlaceHistory },
8998
9094
  { type: exports.InteractionService },
8999
9095
  { type: i0.Injector }
@@ -9109,6 +9205,7 @@
9109
9205
 
9110
9206
  exports.ACTIVITY_DATA = ACTIVITY_DATA;
9111
9207
  exports.AUP_PLACE_CONFIG = AUP_PLACE_CONFIG;
9208
+ exports.AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT = AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT;
9112
9209
  exports.AbstractInputActivity = AbstractInputActivity;
9113
9210
  exports.AbstractInputComponent = AbstractInputComponent;
9114
9211
  exports.AbstractInteractionContext = AbstractInteractionContext;
@@ -9186,6 +9283,7 @@
9186
9283
  exports.NavigationSession = NavigationSession;
9187
9284
  exports.NoopAuthGuard = NoopAuthGuard;
9188
9285
  exports.NoopComponent = NoopComponent;
9286
+ exports.NotAuthorisedNoticeComponent = NotAuthorisedNoticeComponent;
9189
9287
  exports.NumberInputComponent = NumberInputComponent;
9190
9288
  exports.POPUP_CONTAINER = POPUP_CONTAINER;
9191
9289
  exports.PORTAL_EDITOR_COMPONENT = PORTAL_EDITOR_COMPONENT;
@@ -9198,7 +9296,6 @@
9198
9296
  exports.PlaceGuard = PlaceGuard;
9199
9297
  exports.PlaceModule = PlaceModule;
9200
9298
  exports.PlaceOutletComponent = PlaceOutletComponent;
9201
- exports.PlaceRouter = PlaceRouter;
9202
9299
  exports.Point = Point;
9203
9300
  exports.PopStateDuringInteractionNavigation = PopStateDuringInteractionNavigation;
9204
9301
  exports.PopStateNavigation = PopStateNavigation;