@coolon/angular-ui-powerups 11.0.0-alpha.16 → 11.0.0-alpha.2

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 (121) hide show
  1. package/assets/table.scss +6 -13
  2. package/bundles/coolon-angular-ui-powerups.umd.js +97 -193
  3. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
  5. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  6. package/coolon-angular-ui-powerups.metadata.json +1 -1
  7. package/esm2015/lib/components/card-container/card-container.component.js +1 -1
  8. package/esm2015/lib/components/card-container/card-container.component.metadata.json +1 -1
  9. package/esm2015/lib/components/commands/command/command.component.js +1 -5
  10. package/esm2015/lib/components/commands/command/command.component.js.map +1 -1
  11. package/esm2015/lib/components/commands/command/command.component.metadata.json +1 -1
  12. package/esm2015/lib/components/components.module.js +3 -0
  13. package/esm2015/lib/components/components.module.js.map +1 -1
  14. package/esm2015/lib/components/components.module.metadata.json +1 -1
  15. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  16. package/esm2015/lib/components/table/column-model.js +1 -2
  17. package/esm2015/lib/components/table/column-model.js.map +1 -1
  18. package/esm2015/lib/components/table/column-model.metadata.json +1 -1
  19. package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
  20. package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.metadata.json +1 -1
  21. package/esm2015/lib/components/table/table-model.js +0 -9
  22. package/esm2015/lib/components/table/table-model.js.map +1 -1
  23. package/esm2015/lib/components/table/table-model.metadata.json +1 -1
  24. package/esm2015/lib/components/table/table.component.js +3 -30
  25. package/esm2015/lib/components/table/table.component.js.map +1 -1
  26. package/esm2015/lib/components/table/table.component.metadata.json +1 -1
  27. package/esm2015/lib/components/track-by.js +1 -5
  28. package/esm2015/lib/components/track-by.js.map +1 -1
  29. package/esm2015/lib/components/tree-table/decorated-tree-node.js +22 -19
  30. package/esm2015/lib/components/tree-table/decorated-tree-node.js.map +1 -1
  31. package/esm2015/lib/components/tree-table/tree-table-component.js +4 -21
  32. package/esm2015/lib/components/tree-table/tree-table-component.js.map +1 -1
  33. package/esm2015/lib/components/tree-table/tree-table-component.metadata.json +1 -1
  34. package/esm2015/lib/place/components/abstract-place-navigation.component.js +11 -21
  35. package/esm2015/lib/place/components/abstract-place-navigation.component.js.map +1 -1
  36. package/esm2015/lib/place/components/abstract-place-navigation.component.metadata.json +1 -1
  37. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +1 -1
  38. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
  39. package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.metadata.json +1 -1
  40. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +14 -23
  41. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
  42. package/esm2015/lib/place/components/place-outlet/place-outlet.component.metadata.json +1 -1
  43. package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js +1 -1
  44. package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js.map +1 -1
  45. package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.metadata.json +1 -1
  46. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +1 -1
  47. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
  48. package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.metadata.json +1 -1
  49. package/esm2015/lib/place/exports.js +0 -1
  50. package/esm2015/lib/place/exports.js.map +1 -1
  51. package/esm2015/lib/place/exports.metadata.json +1 -1
  52. package/esm2015/lib/place/guards/place.guard.js +8 -5
  53. package/esm2015/lib/place/guards/place.guard.js.map +1 -1
  54. package/esm2015/lib/place/navigation/place-component-deactivation-handler.js +0 -2
  55. package/esm2015/lib/place/navigation/place-component-deactivation-handler.js.map +1 -1
  56. package/esm2015/lib/place/place-component.js +3 -1
  57. package/esm2015/lib/place/place-component.js.map +1 -1
  58. package/esm2015/lib/place/place-component.metadata.json +1 -1
  59. package/esm2015/lib/place/place-router.js +4 -15
  60. package/esm2015/lib/place/place-router.js.map +1 -1
  61. package/esm2015/lib/place/place-router.metadata.json +1 -1
  62. package/esm2015/lib/place/place.module.js +2 -6
  63. package/esm2015/lib/place/place.module.js.map +1 -1
  64. package/esm2015/lib/place/place.module.metadata.json +1 -1
  65. package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
  66. package/fesm2015/coolon-angular-ui-powerups.js +79 -173
  67. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  68. package/lib/components/commands/command/command.component.d.ts +1 -2
  69. package/lib/components/table/column-model.d.ts +0 -1
  70. package/lib/components/table/table-model.d.ts +0 -9
  71. package/lib/components/table/table.component.d.ts +6 -24
  72. package/lib/components/track-by.d.ts +1 -3
  73. package/lib/components/tree-table/tree-table-component.d.ts +0 -9
  74. package/lib/place/components/abstract-place-navigation.component.d.ts +2 -9
  75. package/lib/place/components/place-outlet/place-outlet.component.d.ts +3 -10
  76. package/lib/place/exports.d.ts +0 -1
  77. package/lib/place/place-component.d.ts +1 -1
  78. package/lib/place/place-router.d.ts +6 -10
  79. package/package.json +1 -1
  80. package/schematics/aup-i18n/index.js +28 -8
  81. package/schematics/aup-i18n/index.js.map +1 -1
  82. package/schematics/aup-i18n/templates/i18n/aup/components.yml.template +69 -0
  83. package/schematics/bootstrap-app/index.js +4 -5
  84. package/schematics/bootstrap-app/index.js.map +1 -1
  85. package/schematics/bootstrap-app/templates/{i18n.config.json.template → i18n/config.json.template} +0 -2
  86. package/schematics/bootstrap-app/templates/i18n/notifications.yml.template +19 -0
  87. package/schematics/ng-add/index.js +2 -2
  88. package/schematics/ng-add/index.js.map +1 -1
  89. package/schematics/place-add/index.js +5 -4
  90. package/schematics/place-add/index.js.map +1 -1
  91. package/schematics/place-add/templates/component/__name@dasherize__.component.ts.template +1 -3
  92. package/schematics/place-add/templates/files/i18n/places/__name@dasherize__.yml.template +7 -0
  93. package/schematics/utils/build-context.d.ts +5 -4
  94. package/schematics/utils/workspace.d.ts +4 -3
  95. package/schematics/utils/workspace.js.map +1 -1
  96. package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.js +0 -14
  97. package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.js.map +0 -1
  98. package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.metadata.json +0 -1
  99. package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.ngfactory.js.map +0 -1
  100. package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.scss.shim.ngstyle.js.map +0 -1
  101. package/lib/place/components/not-authorised-notice/not-authorised-notice.component.d.ts +0 -3
  102. package/schematics/aup-i18n/templates/app/aup.i18n.yml.template +0 -80
  103. package/schematics/place-add/templates/component/__name@dasherize__.i18n.yml.template +0 -5
  104. /package/schematics/bootstrap-app/templates/{src/app → app}/app-routing.module.ts.template +0 -0
  105. /package/schematics/bootstrap-app/templates/{src/app → app}/app.component.html.template +0 -0
  106. /package/schematics/bootstrap-app/templates/{src/app → app}/app.component.scss.template +0 -0
  107. /package/schematics/bootstrap-app/templates/{src/app → app}/app.component.ts.template +0 -0
  108. /package/schematics/bootstrap-app/templates/{src/app → app}/app.module.ts.template +0 -0
  109. /package/schematics/bootstrap-app/templates/{src/app → app}/i18n.ts.template +0 -0
  110. /package/schematics/bootstrap-app/templates/{src/assets → assets}/fonts/material-design-icons/MaterialIcons-Regular.eot +0 -0
  111. /package/schematics/bootstrap-app/templates/{src/assets → assets}/fonts/material-design-icons/MaterialIcons-Regular.ijmap +0 -0
  112. /package/schematics/bootstrap-app/templates/{src/assets → assets}/fonts/material-design-icons/MaterialIcons-Regular.svg +0 -0
  113. /package/schematics/bootstrap-app/templates/{src/assets → assets}/fonts/material-design-icons/MaterialIcons-Regular.ttf +0 -0
  114. /package/schematics/bootstrap-app/templates/{src/assets → assets}/fonts/material-design-icons/MaterialIcons-Regular.woff +0 -0
  115. /package/schematics/bootstrap-app/templates/{src/assets → assets}/fonts/material-design-icons/MaterialIcons-Regular.woff2 +0 -0
  116. /package/schematics/bootstrap-app/templates/{src/assets → assets}/fonts/material-design-icons/README.md +0 -0
  117. /package/schematics/bootstrap-app/templates/{src/assets → assets}/fonts/material-design-icons/codepoints +0 -0
  118. /package/schematics/bootstrap-app/templates/{src/assets → assets}/fonts/material-design-icons/material-icons.css +0 -0
  119. /package/schematics/bootstrap-app/templates/{src/index.html.template → index.html.template} +0 -0
  120. /package/schematics/bootstrap-app/templates/{src/styles → styles}/global-variables.scss.template +0 -0
  121. /package/schematics/bootstrap-app/templates/{src/styles.scss.template → styles.scss.template} +0 -0
@@ -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-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}"]
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-template-rows:repeat(auto-fit,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 []; };
@@ -1009,9 +1009,6 @@
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());
1015
1012
  return _this;
1016
1013
  }
1017
1014
  CommandComponent.prototype.isActive = function (face) {
@@ -1030,7 +1027,7 @@
1030
1027
  CommandComponent.decorators = [
1031
1028
  { type: i0.Component, args: [{
1032
1029
  selector: 'aup-command',
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",
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",
1034
1031
  styles: [":host{display:inline-flex;flex-direction:row;justify-content:stretch}button{flex:1}"]
1035
1032
  },] }
1036
1033
  ];
@@ -1207,11 +1204,7 @@
1207
1204
  ], MoreMenuComponent.prototype, "tooltip", void 0);
1208
1205
 
1209
1206
  (function (TrackBy) {
1210
- TrackBy.byIndex = function (index, item) { return index; };
1211
- function trackByProperty(property) {
1212
- return function (index, item) { return item[property]; };
1213
- }
1214
- TrackBy.trackByProperty = trackByProperty;
1207
+ TrackBy.byIndex = function (data, index) { return index; };
1215
1208
  })(exports.TrackBy || (exports.TrackBy = {}));
1216
1209
 
1217
1210
  exports.CommandContainer = /** @class */ (function (_super) {
@@ -2714,7 +2707,6 @@
2714
2707
  this._flex = false;
2715
2708
  this._visibleModel = new pectin.DelegatingValueModel().withDefault(true);
2716
2709
  this.installHeaderRenderer();
2717
- this.dasherisedColumnId = typescriptUtilities.Stringy.from(columnId).dasherize().toString();
2718
2710
  }
2719
2711
  ColumnModel.prototype.installHeaderRenderer = function () {
2720
2712
  this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, function (component, column) {
@@ -3340,32 +3332,15 @@
3340
3332
  *
3341
3333
  * Styling
3342
3334
  * @example
3343
- * // global settings
3344
- * :root {
3345
- * --aup-table-column-gap: 10px; // defaults to 24px
3346
- * --aup-table-row-hover-background-color, rgba(0, 0, 0, 0.05)
3347
- * --aup-table-row-selected-background-color: rebeccapurple; // defaults to transparent
3348
- * --aup-table-first-column-padding-left: 18px // defaults to --column-gap
3349
- * --aup-table-last-column-padding-right: 18px // defaults to --column-gap
3350
- * }
3351
- *
3352
- * // per table settings.
3353
3335
  * aup-table {
3354
3336
  * --column-gap: 10px; // defaults to 24px
3355
3337
  * --row-hover-background-color, rgba(0, 0, 0, 0.05)
3356
3338
  * --row-selected-background-color: rebeccapurple; // defaults to transparent
3357
- * --first-column-padding-left: 18px // defaults to --column-gap
3358
- * --last-column-padding-right: 18px // defaults to --column-gap
3359
- *
3360
- * aup-table-header-cell-renderer,
3361
3339
  * aup-table-cell-renderer {
3362
- * &.aup-col-my-dasherised-column-id {
3363
- * // do stuff
3364
- * }
3365
- * &.first-visible-column {
3340
+ * &:first-column {
3366
3341
  * // do stuff
3367
3342
  * }
3368
- * &.last-visible-column {
3343
+ * &:last-column {
3369
3344
  * // do stuff
3370
3345
  * }
3371
3346
  * }
@@ -3435,22 +3410,12 @@
3435
3410
  var _a;
3436
3411
  return ((_a = this.tableModel.lastVisibleColumn.query().value) === null || _a === void 0 ? void 0 : _a.columnId) === columnId;
3437
3412
  };
3438
- TableComponent.prototype.getColumnClasses = function (columnId) {
3439
- var classes = ["aup-col-" + this.columnsById.get(columnId).dasherisedColumnId];
3440
- if (this.isFirstVisibleColumn(columnId)) {
3441
- classes.push('first-visible-column');
3442
- }
3443
- if (this.isLastVisibleColumn(columnId)) {
3444
- classes.push('last-visible-column');
3445
- }
3446
- return classes;
3447
- };
3448
3413
  return TableComponent;
3449
3414
  }(ResizeAwareComponent));
3450
3415
  TableComponent.decorators = [
3451
3416
  { type: i0.Component, args: [{
3452
3417
  selector: 'aup-table',
3453
- 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",
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",
3454
3419
  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}"]
3455
3420
  },] }
3456
3421
  ];
@@ -3949,7 +3914,7 @@
3949
3914
  Object.defineProperty(DecoratedTreeNodeMixin.prototype, "decoratedSelf", {
3950
3915
  get: function () {
3951
3916
  var _this = this;
3952
- return this.memoize('decoratedSelf', function () {
3917
+ return this.memoize("decoratedSelf", function () {
3953
3918
  return _this.parent ? _this.parent.children.find(function (child) { return child.node === _this.node; }) : exports.DecoratedTreeNode.createRoot(_this.node);
3954
3919
  });
3955
3920
  },
@@ -3959,7 +3924,7 @@
3959
3924
  Object.defineProperty(DecoratedTreeNodeMixin.prototype, "children", {
3960
3925
  get: function () {
3961
3926
  var _this = this;
3962
- return this.memoize('children', function () {
3927
+ return this.memoize("children", function () {
3963
3928
  return _this.node.children ? _this.node.children.map(function (child) {
3964
3929
  return typescriptUtilities.Mixin.createProxy(child, new DecoratedTreeNodeMixin(_this.decoratedSelf, child));
3965
3930
  }) : [];
@@ -3970,7 +3935,7 @@
3970
3935
  });
3971
3936
  DecoratedTreeNodeMixin.prototype.descendants = function () {
3972
3937
  var _this = this;
3973
- return this.memoize('descendants', function () {
3938
+ return this.memoize("descendants", function () {
3974
3939
  var result = [];
3975
3940
  _this.visitDescendants(function (child) { return result.push(child); });
3976
3941
  return result;
@@ -3978,7 +3943,7 @@
3978
3943
  };
3979
3944
  DecoratedTreeNodeMixin.prototype.selfAndDescendants = function () {
3980
3945
  var _this = this;
3981
- return this.memoize('selfAndDescendants', function () {
3946
+ return this.memoize("selfAndDescendants", function () {
3982
3947
  var result = [];
3983
3948
  _this.visitSelfAndDescendants(function (child) { return result.push(child); });
3984
3949
  return result;
@@ -4049,24 +4014,29 @@
4049
4014
  };
4050
4015
  DecoratedTreeNodeMixin.prototype.ancestorsAndSelf = function () {
4051
4016
  var _this = this;
4052
- return this.memoize('ancestorsAndSelf', function () {
4017
+ return this.memoize("ancestorsAndSelf", function () {
4053
4018
  return _this.ancestors().concat([(_this.decoratedSelf)]);
4054
4019
  });
4055
4020
  };
4056
4021
  DecoratedTreeNodeMixin.prototype.pathToParent = function (parent) {
4057
- if (this.node === parent.node) {
4058
- return [];
4059
- }
4060
- else if (this.parent) {
4061
- var pathToParent = this.parent.pathToParent(parent);
4062
- return pathToParent.concat([this.parent]);
4063
- }
4064
- else {
4065
- throw new Error('parent is not an ancestor');
4066
- }
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
+ });
4067
4034
  };
4068
4035
  DecoratedTreeNodeMixin.prototype.pathToParentAndSelf = function (parent) {
4069
- return this.pathToParent(parent).concat([this.decoratedSelf]);
4036
+ var _this = this;
4037
+ return this.memoize("pathToParentAndSelf", function () {
4038
+ return _this.pathToParent(parent).concat([_this.decoratedSelf]);
4039
+ });
4070
4040
  };
4071
4041
  DecoratedTreeNodeMixin.prototype.isRoot = function () {
4072
4042
  return !this.parent;
@@ -4082,20 +4052,20 @@
4082
4052
  return !this.isRoot() && this.node.children.length < 1;
4083
4053
  };
4084
4054
  DecoratedTreeNodeMixin.prototype.hasChildren = function () {
4085
- return this.node.children && this.node.children.length > 0;
4055
+ return this.node.children.length > 0;
4086
4056
  };
4087
4057
  DecoratedTreeNodeMixin.prototype.depthFromParent = function (parent) {
4088
4058
  return this.pathToParent(parent).length;
4089
4059
  };
4090
4060
  DecoratedTreeNodeMixin.prototype.treeDepth = function () {
4091
4061
  var _this = this;
4092
- return this.memoize('treeDepth', function () {
4062
+ return this.memoize("treeDepth", function () {
4093
4063
  return 1 + _this.descendants().map(function (child) { return child.depthFromParent(_this); }).reduce(function (prev, current) { return Math.max(prev, current); });
4094
4064
  });
4095
4065
  };
4096
4066
  DecoratedTreeNodeMixin.prototype.flatten = function () {
4097
4067
  var _this = this;
4098
- return this.memoize('flatten', function () {
4068
+ return this.memoize("flatten", function () {
4099
4069
  return _this.flattenInto([]);
4100
4070
  });
4101
4071
  };
@@ -4305,21 +4275,14 @@
4305
4275
  var TreeTableComponent = /** @class */ (function (_super) {
4306
4276
  __extends(TreeTableComponent, _super);
4307
4277
  function TreeTableComponent() {
4308
- var _this = _super.call(this) || this;
4309
- /**
4310
- * Set to true to enable scrolling. Once enabled the table will have 0 implicit height. You will either
4311
- * need to set it explicitly e.g. height: 400px; or by using flex or grid layout to make it fill it's
4312
- * containment area.
4313
- */
4314
- _this.enableScrolling = false;
4315
- return _this;
4278
+ return _super.call(this) || this;
4316
4279
  }
4317
4280
  return TreeTableComponent;
4318
4281
  }(DisposableComponent));
4319
4282
  TreeTableComponent.decorators = [
4320
4283
  { type: i0.Component, args: [{
4321
4284
  selector: "aup-tree-table",
4322
- template: "<aup-table [tableModel]=\"treeTableModel\" [showHeaderModel]=\"showHeaderModel\" [enableScrolling]=\"enableScrolling\"></aup-table>\n",
4285
+ template: "<aup-table [tableModel]=\"treeTableModel\"></aup-table>\n",
4323
4286
  encapsulation: i0.ViewEncapsulation.None // allow us to target nested table styles
4324
4287
  ,
4325
4288
  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}"]
@@ -4327,23 +4290,12 @@
4327
4290
  ];
4328
4291
  TreeTableComponent.ctorParameters = function () { return []; };
4329
4292
  TreeTableComponent.propDecorators = {
4330
- treeTableModel: [{ type: i0.Input }],
4331
- showHeaderModel: [{ type: i0.Input }],
4332
- showHeader: [{ type: i0.Input }],
4333
- enableScrolling: [{ type: i0.Input }, { type: i0.HostBinding, args: ['class.enable-scrolling',] }]
4293
+ treeTableModel: [{ type: i0.Input }]
4334
4294
  };
4335
4295
  __decorate([
4336
4296
  pectin.TrackExternal(),
4337
4297
  __metadata("design:type", TreeTableModel)
4338
4298
  ], TreeTableComponent.prototype, "treeTableModel", void 0);
4339
- __decorate([
4340
- pectin.TrackExternal({ defaultValue: true }),
4341
- __metadata("design:type", pectin.ValueModel)
4342
- ], TreeTableComponent.prototype, "showHeaderModel", void 0);
4343
- __decorate([
4344
- pectin.StoreInValueModel('showHeaderModel'),
4345
- __metadata("design:type", Boolean)
4346
- ], TreeTableComponent.prototype, "showHeader", void 0);
4347
4299
 
4348
4300
  var VerticalFocusContainerComponent = /** @class */ (function (_super) {
4349
4301
  __extends(VerticalFocusContainerComponent, _super);
@@ -4516,9 +4468,12 @@
4516
4468
  TreeTableComponent,
4517
4469
  exports.TreeInheritanceIconComponent,
4518
4470
  TreeLabelCellRendererComponent,
4471
+ exports.IconComponent,
4519
4472
  BusyOverlayComponent,
4520
4473
  EmptyStateComponent,
4521
4474
  PaginatorComponent,
4475
+ exports.IconComponent,
4476
+ exports.IconComponent
4522
4477
  ],
4523
4478
  imports: [
4524
4479
  i2.CommonModule,
@@ -6007,15 +5962,6 @@
6007
5962
  * table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
6008
5963
  * });
6009
5964
  *
6010
- * Template columns
6011
- * @example
6012
- * const model = TableModel.fromList(heroList, table => {
6013
- * table.addSelectionColumn(selectionModel); // <- can be single or multiple selection model
6014
- * table.addTemplateColumn("myTemplate");
6015
- * });
6016
- *
6017
- * <div *aupColumnTemplate="let hero; columnId: 'myTemplate'">{{hero.age}}</div>
6018
- *
6019
5965
  * I18n
6020
5966
  * @example
6021
5967
  * [table.yml]
@@ -6382,7 +6328,6 @@
6382
6328
  _this._active = new pectin.MutableValueModel(false);
6383
6329
  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;
6384
6330
  when(_this._active).becomesTruthy(function () { return _this.onPlaceReady(); });
6385
- _this.childPlaces = _this.placeDefinition.children.map(function (d) { return d.component; });
6386
6331
  return _this;
6387
6332
  }
6388
6333
  // @Trace()
@@ -6432,6 +6377,13 @@
6432
6377
  enumerable: false,
6433
6378
  configurable: true
6434
6379
  });
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
+ });
6435
6387
  Object.defineProperty(PlaceComponent.prototype, "active", {
6436
6388
  get: function () {
6437
6389
  return this._active.readonly;
@@ -6498,7 +6450,6 @@
6498
6450
  this.component = component;
6499
6451
  this.navigationSession = navigationSession;
6500
6452
  this.isPrimaryComponent = isPrimaryComponent;
6501
- pectin.assert.notNil(component);
6502
6453
  }
6503
6454
  Object.defineProperty(PlaceComponentDeactivationHandler.prototype, "routerInteractionAdapter", {
6504
6455
  get: function () {
@@ -7666,7 +7617,7 @@
7666
7617
  { type: i1$1.UrlSerializer }
7667
7618
  ]; };
7668
7619
 
7669
- exports.PlaceRouter = /** @class */ (function (_super) {
7620
+ var PlaceRouter = /** @class */ (function (_super) {
7670
7621
  __extends(PlaceRouter, _super);
7671
7622
  function PlaceRouter(angularRouter, angularLocation, interactionService, urlService, placeHistory) {
7672
7623
  var _this = _super.call(this) || this;
@@ -7702,7 +7653,7 @@
7702
7653
  .pluck('name')
7703
7654
  .otherwise(idleStateName);
7704
7655
  pectin.DebugContext.tag(_this._activeVisits, 'PlaceRouter.activeVisits');
7705
- _this.state = chain(_this._activeVisits).reduce(function (visits) { return new PlaceRouter.State(visits); });
7656
+ _this.activeVisitsByPlaceDefinition = chain(_this._activeVisits).indexBy('placeDefinition');
7706
7657
  // TODO: make setup the callbacks in during module initiation to make this testable.
7707
7658
  angularRouter.events.subscribe(function (event) {
7708
7659
  // Routing event sequence
@@ -7766,6 +7717,9 @@
7766
7717
  PlaceRouter.prototype.getAuthenticationFailureRedirect = function (activatedRoute, state) {
7767
7718
  return this.redirections.onAuthenticationFailure(activatedRoute, state);
7768
7719
  };
7720
+ PlaceRouter.prototype.getAuthorisationFailureRedirect = function (activatedRoute, state) {
7721
+ return this.redirections.onAuthorisationFailure(activatedRoute, state);
7722
+ };
7769
7723
  Object.defineProperty(PlaceRouter.prototype, "navigationSession", {
7770
7724
  get: function () {
7771
7725
  return this.navigationSessionModel.value;
@@ -8001,34 +7955,19 @@
8001
7955
  };
8002
7956
  return PlaceRouter;
8003
7957
  }(pectin.GarbageCollector));
8004
- 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" });
8005
- exports.PlaceRouter.decorators = [
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 = [
8006
7960
  { type: i0.Injectable, args: [{
8007
7961
  providedIn: 'root'
8008
7962
  },] }
8009
7963
  ];
8010
- exports.PlaceRouter.ctorParameters = function () { return [
7964
+ PlaceRouter.ctorParameters = function () { return [
8011
7965
  { type: i1$1.Router },
8012
7966
  { type: i2.Location },
8013
7967
  { type: exports.InteractionService },
8014
7968
  { type: UrlService },
8015
7969
  { type: exports.PlaceHistory }
8016
7970
  ]; };
8017
- (function (PlaceRouter) {
8018
- var State = /** @class */ (function () {
8019
- function State(activeVisits) {
8020
- this.activeVisits = activeVisits;
8021
- }
8022
- State.prototype.isPlaceActive = function (placeDefinition) {
8023
- return !!this.getVisitFor(placeDefinition);
8024
- };
8025
- State.prototype.getVisitFor = function (placeDefinition) {
8026
- return this.activeVisits.find(function (v) { return v.placeDefinition === placeDefinition; });
8027
- };
8028
- return State;
8029
- }());
8030
- PlaceRouter.State = State;
8031
- })(exports.PlaceRouter || (exports.PlaceRouter = {}));
8032
7971
 
8033
7972
  var Visit = /** @class */ (function () {
8034
7973
  function Visit(placeDefinition, visitParameters) {
@@ -8101,20 +8040,6 @@
8101
8040
 
8102
8041
  var AUP_PLACE_CONFIG = new i0.InjectionToken('AUP_PLACE_CONFIG');
8103
8042
 
8104
- var NotAuthorisedNoticeComponent = /** @class */ (function () {
8105
- function NotAuthorisedNoticeComponent() {
8106
- }
8107
- return NotAuthorisedNoticeComponent;
8108
- }());
8109
- NotAuthorisedNoticeComponent.decorators = [
8110
- { type: i0.Component, args: [{
8111
- selector: 'aup-not-authorised-notice',
8112
- template: "<p>You are not authorised to access this page</p>\n",
8113
- styles: [":host{display:flex;flex-direction:column;align-items:center;justify-content:center}"]
8114
- },] }
8115
- ];
8116
- NotAuthorisedNoticeComponent.ctorParameters = function () { return []; };
8117
-
8118
8043
  // Freezes the state of the components at the start of the animation.
8119
8044
  var animationStartStyle = animations$1.style({ position: 'absolute', top: '0', left: '0', bottom: '0', right: '0' });
8120
8045
  var left = [
@@ -8159,15 +8084,13 @@
8159
8084
  }
8160
8085
  var LEFT_RIGHT_PLACE_ANIMATION = leftRightPlaceAnimation('0.3s');
8161
8086
 
8162
- var AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT = new i0.InjectionToken('AUP_UNAUTHORISED_PLACE_COMPONENT');
8163
8087
  var PlaceOutletComponent = /** @class */ (function (_super) {
8164
8088
  __extends(PlaceOutletComponent, _super);
8165
- function PlaceOutletComponent(router, placeRouter, placeConfig, unauthorisedPlaceNotice, parentOutlet, cdr) {
8089
+ function PlaceOutletComponent(router, placeRouter, placeConfig, parentOutlet) {
8166
8090
  var _this = _super.call(this) || this;
8167
8091
  _this.router = router;
8168
8092
  _this.placeRouter = placeRouter;
8169
8093
  _this.placeConfig = placeConfig;
8170
- _this.cdr = cdr;
8171
8094
  _this.placeChanged = new i0.EventEmitter();
8172
8095
  _this.outletActivated = new pectin.MutableValueModel(false);
8173
8096
  _this._activatedRouteModel = new pectin.MutableValueModel();
@@ -8200,7 +8123,7 @@
8200
8123
  _this.animationEnabled = valueOf.all(_this.animateModel, _this.animationSupported).areTruthy();
8201
8124
  // Extract our visit model from the place router.
8202
8125
  _this._activePlaceDefinition = chain(_this._activePlaceModel).pluck('placeDefinition');
8203
- _this.routerVisitModel = chain(placeRouter.state).map(function (state) { return state.getVisitFor(_this._activePlaceDefinition.value); }, { dependsOn: _this._activePlaceDefinition });
8126
+ _this.routerVisitModel = _this._activePlaceDefinition.findIn(chain(placeRouter.activeVisitsByPlaceDefinition));
8204
8127
  _this.navigationInProgress = chain(_this.placeRouter.navigationInProgress);
8205
8128
  when(_this.navigationInProgress).becomesFalsey(function () {
8206
8129
  _this.checkStateAndInitialise();
@@ -8211,11 +8134,13 @@
8211
8134
  chain(_this._activePlaceModel)
8212
8135
  .postponeWhile(_this.navigationInProgress)
8213
8136
  .subscribe(function (place) { return _this.placeChanged.emit(place); });
8214
- _this.authorised = chain(placeRouter.accessGuard).map(function (guard) { return guard.isAuthorised(_this._activePlaceDefinition.value); }, {
8215
- dependsOn: _this._activePlaceDefinition,
8216
- postponeWhile: chain(_this._activePlaceDefinition).isNil()
8217
- }).otherwise(true); // if we don't have a place def yet we need to show the outlet so we get one injected.
8218
- _this.notAuthorisedNoticePortal = new portal.ComponentPortal(unauthorisedPlaceNotice !== null && unauthorisedPlaceNotice !== void 0 ? unauthorisedPlaceNotice : NotAuthorisedNoticeComponent);
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
+ });
8219
8144
  return _this;
8220
8145
  }
8221
8146
  // @Trace()
@@ -8232,13 +8157,6 @@
8232
8157
  enumerable: false,
8233
8158
  configurable: true
8234
8159
  });
8235
- Object.defineProperty(PlaceOutletComponent.prototype, "isAuthorised", {
8236
- get: function () {
8237
- return this.authorised.value;
8238
- },
8239
- enumerable: false,
8240
- configurable: true
8241
- });
8242
8160
  // @Trace()
8243
8161
  PlaceOutletComponent.prototype.navigate = function (visit) {
8244
8162
  // const place = this.placesInAnimationOrder.query().findMatching(p => visit.placeDefinition.component === p);
@@ -8305,7 +8223,6 @@
8305
8223
  pectin.lang.illegalState('wrong visit!!!');
8306
8224
  }
8307
8225
  this.initialisePlace(routerVisit, activePlace);
8308
- this.cdr.detectChanges();
8309
8226
  }
8310
8227
  };
8311
8228
  PlaceOutletComponent.prototype.initialisePlace = function (routerVisit, activePlace) {
@@ -8359,18 +8276,16 @@
8359
8276
  PlaceOutletComponent.decorators = [
8360
8277
  { type: i0.Component, args: [{
8361
8278
  selector: 'aup-place-outlet',
8362
- 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",
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",
8363
8280
  animations: [LEFT_RIGHT_PLACE_ANIMATION],
8364
- 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}"]
8281
+ styles: [":host{display:flex;flex-direction:column;min-height:0}.router-outlet-container{flex:1;display:block;position:relative;min-height:0;overflow-x:hidden;overflow-y:scroll}router-outlet{display:none}"]
8365
8282
  },] }
8366
8283
  ];
8367
8284
  PlaceOutletComponent.ctorParameters = function () { return [
8368
8285
  { type: i1$1.Router },
8369
- { type: exports.PlaceRouter },
8286
+ { type: PlaceRouter },
8370
8287
  { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [AUP_PLACE_CONFIG,] }] },
8371
- { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT,] }] },
8372
- { type: PlaceOutletComponent, decorators: [{ type: i0.SkipSelf }, { type: i0.Optional }] },
8373
- { type: i0.ChangeDetectorRef }
8288
+ { type: PlaceOutletComponent, decorators: [{ type: i0.SkipSelf }, { type: i0.Optional }] }
8374
8289
  ]; };
8375
8290
  PlaceOutletComponent.propDecorators = {
8376
8291
  animate: [{ type: i0.Input }],
@@ -8378,8 +8293,7 @@
8378
8293
  customPlaceAnimationOrderModel: [{ type: i0.Input, args: ['placeAnimationOrderModel',] }],
8379
8294
  customPlaceAnimationOrder: [{ type: i0.Input, args: ['placeAnimationOrder',] }],
8380
8295
  placeChanged: [{ type: i0.Output }],
8381
- routerOut: [{ type: i0.ViewChild, args: ['routeOutlet', { static: true },] }],
8382
- isAuthorised: [{ type: i0.HostBinding, args: ["class.authorised",] }]
8296
+ routerOut: [{ type: i0.ViewChild, args: ['routeOutlet', { static: true },] }]
8383
8297
  };
8384
8298
  __decorate([
8385
8299
  pectin.StoreInValueModel('animateModel'),
@@ -8404,38 +8318,25 @@
8404
8318
  var _this = _super.call(this) || this;
8405
8319
  _this.placeRouter = placeRouter;
8406
8320
  _this._activePlaceComponent = new pectin.DelegatingValueModel();
8407
- _this.trackByPlaceDef = function (data) { return data.place; };
8408
8321
  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;
8409
8322
  _this.placeDefinitions = chain(_this.placesModel)
8410
8323
  .map(function (c) { return exports.PlaceComponent.getDefinition(c); })
8411
8324
  .select(function (d) {
8412
8325
  var guard = placeRouter.accessGuard.value;
8413
- var state = placeRouter.state.value;
8414
- return guard.isAuthorised(d) || state.isPlaceActive(d);
8415
- }, { dependsOn: [placeRouter.accessGuard, placeRouter.state] });
8326
+ return guard.isAuthorised(d);
8327
+ }, { dependsOn: placeRouter.accessGuard });
8416
8328
  _this.commandFactory = pectin.Command.createFactory(function (placeDefinition) {
8417
8329
  _this.placeOutlet.navigate(new Visit(placeDefinition));
8418
8330
  });
8419
- when(_this.placeOutletModel).changes(function (outlet) { return _this.handlePlaceOutLetChanged(outlet); }, { initialValue: "triggerChange" });
8420
- _this.activePlaceDefinition = chain(_this._activePlaceComponent).pluck('placeDefinition');
8421
- _this.menuItems = chain(_this.placeDefinitions).map(function (d) {
8422
- return {
8423
- place: d,
8424
- active: _this.activePlaceDefinition.value === d
8425
- };
8426
- }, {
8427
- dependsOn: _this.activePlaceDefinition
8331
+ when(_this.placeOutletModel).changes(function (outlet) {
8332
+ // NOTE: this updates during a change cycle and causes our isActiveMethod to return 2 different
8333
+ // values in the one change detection cycle. So instead we delay the update to a different
8334
+ // tick.
8335
+ setTimeout(function () { return _this._activePlaceComponent.setDelegate(outlet ? outlet.activePlaceModel : null); });
8428
8336
  });
8337
+ _this.activePlaceDefinition = chain(_this._activePlaceComponent).pluck('placeDefinition');
8429
8338
  return _this;
8430
- // const txo = new TransactionObserver({ verbose: true }).onEvent(e => console.log(e.name, e.payload));
8431
- // txo.observe('this.placesModel', this.placesModel);
8432
- // txo.observe('this.placeDefinitions', this.placeDefinitions);
8433
- // txo.observe('this.activePlaceDefinition', this.activePlaceDefinition);
8434
- // txo.observe('this.menuItems', this.menuItems);
8435
8339
  }
8436
- AbstractPlaceNavigationComponent.prototype.handlePlaceOutLetChanged = function (outlet) {
8437
- this._activePlaceComponent.setDelegate(outlet ? outlet.activePlaceModel : null);
8438
- };
8439
8340
  AbstractPlaceNavigationComponent.prototype.getNavigationFace = function (placeDef) {
8440
8341
  var navItem = placeDef.getPlaceData('nav');
8441
8342
  return {
@@ -8444,6 +8345,9 @@
8444
8345
  icon: function () { return navItem && navItem.icon ? navItem.icon() : placeDef.getPlaceData('navIcon', null); }
8445
8346
  };
8446
8347
  };
8348
+ AbstractPlaceNavigationComponent.prototype.isActive = function (place) {
8349
+ return this.activePlaceDefinition.query().equals(place);
8350
+ };
8447
8351
  AbstractPlaceNavigationComponent.prototype.ngOnInit = function () {
8448
8352
  };
8449
8353
  return AbstractPlaceNavigationComponent;
@@ -8454,7 +8358,7 @@
8454
8358
  },] }
8455
8359
  ];
8456
8360
  AbstractPlaceNavigationComponent.ctorParameters = function () { return [
8457
- { type: exports.PlaceRouter }
8361
+ { type: PlaceRouter }
8458
8362
  ]; };
8459
8363
  AbstractPlaceNavigationComponent.propDecorators = {
8460
8364
  places: [{ type: i0.Input }],
@@ -8495,12 +8399,12 @@
8495
8399
  ListPlaceNavComponent.decorators = [
8496
8400
  { type: i0.Component, args: [{
8497
8401
  selector: 'aup-list-place-nav',
8498
- 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",
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",
8499
8403
  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)}"]
8500
8404
  },] }
8501
8405
  ];
8502
8406
  ListPlaceNavComponent.ctorParameters = function () { return [
8503
- { type: exports.PlaceRouter }
8407
+ { type: PlaceRouter }
8504
8408
  ]; };
8505
8409
 
8506
8410
  /**
@@ -8566,12 +8470,12 @@
8566
8470
  SidePlaceNavigationComponent.decorators = [
8567
8471
  { type: i0.Component, args: [{
8568
8472
  selector: 'aup-side-place-navigation',
8569
- 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",
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",
8570
8474
  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)}"]
8571
8475
  },] }
8572
8476
  ];
8573
8477
  SidePlaceNavigationComponent.ctorParameters = function () { return [
8574
- { type: exports.PlaceRouter }
8478
+ { type: PlaceRouter }
8575
8479
  ]; };
8576
8480
  SidePlaceNavigationComponent.propDecorators = {
8577
8481
  expanded: [{ type: i0.HostBinding, args: ['class.expanded',] }],
@@ -8588,12 +8492,12 @@
8588
8492
  TabbedPlaceNavigationComponent.decorators = [
8589
8493
  { type: i0.Component, args: [{
8590
8494
  selector: 'aup-tabbed-place-navigation',
8591
- 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",
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
8496
  styles: [""]
8593
8497
  },] }
8594
8498
  ];
8595
8499
  TabbedPlaceNavigationComponent.ctorParameters = function () { return [
8596
- { type: exports.PlaceRouter }
8500
+ { type: PlaceRouter }
8597
8501
  ]; };
8598
8502
 
8599
8503
  var PlaceModule = /** @class */ (function () {
@@ -8614,16 +8518,14 @@
8614
8518
  icon.MatIconModule,
8615
8519
  DirectivesModule,
8616
8520
  flexLayout.FlexModule,
8617
- ComponentsModule,
8618
- portal.PortalModule
8521
+ ComponentsModule
8619
8522
  ],
8620
8523
  declarations: [
8621
8524
  PlaceOutletComponent,
8622
8525
  TabbedPlaceNavigationComponent,
8623
8526
  ListPlaceNavComponent,
8624
8527
  SidePlaceNavigationComponent,
8625
- AbstractPlaceNavigationComponent,
8626
- NotAuthorisedNoticeComponent
8528
+ AbstractPlaceNavigationComponent
8627
8529
  ],
8628
8530
  entryComponents: [],
8629
8531
  exports: [
@@ -8955,7 +8857,7 @@
8955
8857
  // @Trace()
8956
8858
  PlaceGuard.prototype.canActivate = function (activatedRoute, state) {
8957
8859
  return __awaiter(this, void 0, void 0, function () {
8958
- var placeDefinition_1, redirectLocation, nextPlaceDef, result;
8860
+ var placeDefinition_1, redirectLocation, nextPlaceDef, redirectLocation, nextPlaceDef, result;
8959
8861
  var _this = this;
8960
8862
  return __generator(this, function (_a) {
8961
8863
  switch (_a.label) {
@@ -8973,6 +8875,14 @@
8973
8875
  }
8974
8876
  return [2 /*return*/, this.createUrlTree(redirectLocation)];
8975
8877
  }
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
+ }
8976
8886
  _a.label = 2;
8977
8887
  case 2: return [4 /*yield*/, this.cleanInteractionState(activatedRoute, state, function () { return __awaiter(_this, void 0, void 0, function () {
8978
8888
  var params, parsedParams, navigationSession, initialVisit, sanitiser, sanitisedVisit, urlSnapshot;
@@ -9016,11 +8926,6 @@
9016
8926
  return __generator(this, function (_a) {
9017
8927
  switch (_a.label) {
9018
8928
  case 0:
9019
- if (!component) {
9020
- // this happens when the place wasn't authorised and the associated
9021
- // router outlet was removed from the dom.
9022
- return [2 /*return*/, true];
9023
- }
9024
8929
  currentUrl = this.urlService.parseUrl(currentState.url);
9025
8930
  nextUrl = this.urlService.parseUrl(nextState.url);
9026
8931
  return [4 /*yield*/, this.placeRouter.navigationSession.canDeactivatePlace(component, currentUrl, nextUrl)];
@@ -9081,14 +8986,14 @@
9081
8986
  };
9082
8987
  return PlaceGuard;
9083
8988
  }());
9084
- 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" });
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
8990
  PlaceGuard.decorators = [
9086
8991
  { type: i0.Injectable, args: [{ providedIn: 'root' },] }
9087
8992
  ];
9088
8993
  PlaceGuard.ctorParameters = function () { return [
9089
8994
  { type: i1$1.Router },
9090
8995
  { type: UrlService },
9091
- { type: exports.PlaceRouter },
8996
+ { type: PlaceRouter },
9092
8997
  { type: exports.PlaceHistory },
9093
8998
  { type: exports.InteractionService },
9094
8999
  { type: i0.Injector }
@@ -9204,7 +9109,6 @@
9204
9109
 
9205
9110
  exports.ACTIVITY_DATA = ACTIVITY_DATA;
9206
9111
  exports.AUP_PLACE_CONFIG = AUP_PLACE_CONFIG;
9207
- exports.AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT = AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT;
9208
9112
  exports.AbstractInputActivity = AbstractInputActivity;
9209
9113
  exports.AbstractInputComponent = AbstractInputComponent;
9210
9114
  exports.AbstractInteractionContext = AbstractInteractionContext;
@@ -9282,7 +9186,6 @@
9282
9186
  exports.NavigationSession = NavigationSession;
9283
9187
  exports.NoopAuthGuard = NoopAuthGuard;
9284
9188
  exports.NoopComponent = NoopComponent;
9285
- exports.NotAuthorisedNoticeComponent = NotAuthorisedNoticeComponent;
9286
9189
  exports.NumberInputComponent = NumberInputComponent;
9287
9190
  exports.POPUP_CONTAINER = POPUP_CONTAINER;
9288
9191
  exports.PORTAL_EDITOR_COMPONENT = PORTAL_EDITOR_COMPONENT;
@@ -9295,6 +9198,7 @@
9295
9198
  exports.PlaceGuard = PlaceGuard;
9296
9199
  exports.PlaceModule = PlaceModule;
9297
9200
  exports.PlaceOutletComponent = PlaceOutletComponent;
9201
+ exports.PlaceRouter = PlaceRouter;
9298
9202
  exports.Point = Point;
9299
9203
  exports.PopStateDuringInteractionNavigation = PopStateDuringInteractionNavigation;
9300
9204
  exports.PopStateNavigation = PopStateNavigation;