@coolon/angular-ui-powerups 3.18.1 → 11.0.0-alpha.11
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.
- package/assets/table.scss +13 -6
- package/bundles/coolon-angular-ui-powerups-cypress.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.js +213 -112
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/cypress/package.json +1 -1
- package/esm2015/lib/components/busy-overlay/busy-overlay.component.js +1 -1
- package/esm2015/lib/components/busy-overlay/busy-overlay.component.metadata.json +1 -1
- package/esm2015/lib/components/card-container/card-container.component.js +1 -1
- package/esm2015/lib/components/card-container/card-container.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/command/command.component.js +5 -1
- package/esm2015/lib/components/commands/command/command.component.js.map +1 -1
- package/esm2015/lib/components/commands/command/command.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/command-face/command-face.component.js +1 -1
- package/esm2015/lib/components/commands/command-face/command-face.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.js +1 -1
- package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.metadata.json +1 -1
- package/esm2015/lib/components/components.module.js +0 -3
- package/esm2015/lib/components/components.module.js.map +1 -1
- package/esm2015/lib/components/components.module.metadata.json +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/empty-state/empty-state.component.js +1 -1
- package/esm2015/lib/components/empty-state/empty-state.component.metadata.json +1 -1
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.js +1 -1
- package/esm2015/lib/components/forms/checkbox-input/checkbox-input.component.metadata.json +1 -1
- package/esm2015/lib/components/icon/icon.component.js +1 -1
- package/esm2015/lib/components/icon/icon.component.metadata.json +1 -1
- package/esm2015/lib/components/scroll-container/scroll-container.component.js +1 -1
- package/esm2015/lib/components/scroll-container/scroll-container.component.metadata.json +1 -1
- package/esm2015/lib/components/section-header/section-header.component.js +1 -1
- package/esm2015/lib/components/section-header/section-header.component.metadata.json +1 -1
- package/esm2015/lib/components/switch-case/switch-case.component.js +1 -1
- package/esm2015/lib/components/switch-case/switch-case.component.metadata.json +1 -1
- package/esm2015/lib/components/table/column-model.js +2 -1
- package/esm2015/lib/components/table/column-model.js.map +1 -1
- package/esm2015/lib/components/table/column-model.metadata.json +1 -1
- package/esm2015/lib/components/table/paginator/paginator.component.js +1 -1
- package/esm2015/lib/components/table/paginator/paginator.component.metadata.json +1 -1
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.js.map +1 -1
- package/esm2015/lib/components/table/table-cell-renderer/table-cell-renderer.component.metadata.json +1 -1
- package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.js +1 -1
- package/esm2015/lib/components/table/table-header-cell-renderer/table-header-cell-renderer.component.metadata.json +1 -1
- package/esm2015/lib/components/table/table-model.js +9 -0
- package/esm2015/lib/components/table/table-model.js.map +1 -1
- package/esm2015/lib/components/table/table-model.metadata.json +1 -1
- package/esm2015/lib/components/table/table.component.js +31 -4
- package/esm2015/lib/components/table/table.component.js.map +1 -1
- package/esm2015/lib/components/table/table.component.metadata.json +1 -1
- package/esm2015/lib/components/track-by.js +5 -1
- package/esm2015/lib/components/track-by.js.map +1 -1
- package/esm2015/lib/components/tree-table/decorated-tree-node.js +19 -22
- package/esm2015/lib/components/tree-table/decorated-tree-node.js.map +1 -1
- package/esm2015/lib/components/tree-table/tree-inheritance-icon/tree-inheritance-icon.component.js +1 -1
- package/esm2015/lib/components/tree-table/tree-inheritance-icon/tree-inheritance-icon.component.metadata.json +1 -1
- package/esm2015/lib/components/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.js +1 -1
- package/esm2015/lib/components/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.metadata.json +1 -1
- package/esm2015/lib/components/tree-table/tree-table-component.js +22 -5
- package/esm2015/lib/components/tree-table/tree-table-component.js.map +1 -1
- package/esm2015/lib/components/tree-table/tree-table-component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.js +1 -1
- package/esm2015/lib/interaction/components/activity-actions/activity-actions.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.js +1 -1
- package/esm2015/lib/interaction/components/add-item-interaction-context/add-item-interaction-context.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js +1 -1
- package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +1 -1
- package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +1 -1
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.metadata.json +1 -1
- package/esm2015/lib/place/components/abstract-place-navigation.component.js +19 -4
- package/esm2015/lib/place/components/abstract-place-navigation.component.js.map +1 -1
- package/esm2015/lib/place/components/abstract-place-navigation.component.metadata.json +1 -1
- package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +2 -2
- package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js.map +1 -1
- package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.metadata.json +1 -1
- package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.js +14 -0
- package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.js.map +1 -0
- package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.metadata.json +1 -0
- package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.ngfactory.js.map +1 -0
- package/esm2015/lib/place/components/not-authorised-notice/not-authorised-notice.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +23 -14
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.js.map +1 -1
- package/esm2015/lib/place/components/place-outlet/place-outlet.component.metadata.json +1 -1
- package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js +2 -2
- package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.js.map +1 -1
- package/esm2015/lib/place/components/side-place-navigation/side-place-navigation.component.metadata.json +1 -1
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js +1 -1
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.js.map +1 -1
- package/esm2015/lib/place/components/tabbed-place-navigation/tabbed-place-navigation.component.metadata.json +1 -1
- package/esm2015/lib/place/exports.js +1 -0
- package/esm2015/lib/place/exports.js.map +1 -1
- package/esm2015/lib/place/exports.metadata.json +1 -1
- package/esm2015/lib/place/guards/place.guard.js +5 -8
- package/esm2015/lib/place/guards/place.guard.js.map +1 -1
- package/esm2015/lib/place/navigation/place-component-deactivation-handler.js +2 -0
- package/esm2015/lib/place/navigation/place-component-deactivation-handler.js.map +1 -1
- package/esm2015/lib/place/place-component.js +1 -3
- package/esm2015/lib/place/place-component.js.map +1 -1
- package/esm2015/lib/place/place-component.metadata.json +1 -1
- package/esm2015/lib/place/place-router.js +15 -4
- package/esm2015/lib/place/place-router.js.map +1 -1
- package/esm2015/lib/place/place-router.metadata.json +1 -1
- package/esm2015/lib/place/place.module.js +6 -2
- package/esm2015/lib/place/place.module.js.map +1 -1
- package/esm2015/lib/place/place.module.metadata.json +1 -1
- package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +193 -94
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/commands/command/command.component.d.ts +2 -1
- package/lib/components/table/column-model.d.ts +1 -0
- package/lib/components/table/table-model.d.ts +9 -0
- package/lib/components/table/table.component.d.ts +24 -6
- package/lib/components/track-by.d.ts +3 -1
- package/lib/components/tree-table/tree-table-component.d.ts +9 -0
- package/lib/place/components/abstract-place-navigation.component.d.ts +8 -1
- package/lib/place/components/not-authorised-notice/not-authorised-notice.component.d.ts +3 -0
- package/lib/place/components/place-outlet/place-outlet.component.d.ts +10 -3
- package/lib/place/exports.d.ts +1 -0
- package/lib/place/place-component.d.ts +1 -1
- package/lib/place/place-router.d.ts +10 -6
- package/package.json +22 -20
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/utils/build-context.d.ts +4 -5
- package/schematics/utils/workspace.d.ts +3 -4
- package/schematics/utils/workspace.js.map +1 -1
- package/CHANGELOG.md +0 -1377
|
@@ -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{
|
|
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-
|
|
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
|
|
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
|
|
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
|
];
|
|
@@ -1204,7 +1207,11 @@
|
|
|
1204
1207
|
], MoreMenuComponent.prototype, "tooltip", void 0);
|
|
1205
1208
|
|
|
1206
1209
|
(function (TrackBy) {
|
|
1207
|
-
TrackBy.byIndex = function (
|
|
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;
|
|
1208
1215
|
})(exports.TrackBy || (exports.TrackBy = {}));
|
|
1209
1216
|
|
|
1210
1217
|
exports.CommandContainer = /** @class */ (function (_super) {
|
|
@@ -1269,7 +1276,7 @@
|
|
|
1269
1276
|
selector: 'aup-tool-bar',
|
|
1270
1277
|
template: '<div class="toolbar-content"><ng-content></ng-content></div>',
|
|
1271
1278
|
encapsulation: i0.ViewEncapsulation.None,
|
|
1272
|
-
styles: [":host{display:inline-block}.toolbar-content{
|
|
1279
|
+
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
1280
|
},] }
|
|
1274
1281
|
];
|
|
1275
1282
|
ToolBarComponent.ctorParameters = function () { return []; };
|
|
@@ -1450,7 +1457,7 @@
|
|
|
1450
1457
|
{ type: i0.Component, args: [{
|
|
1451
1458
|
selector: 'aup-empty-state',
|
|
1452
1459
|
template: "\n <div class=\"container\">\n <ng-content></ng-content>\n </div>\n ",
|
|
1453
|
-
styles: [":host{
|
|
1460
|
+
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
1461
|
},] }
|
|
1455
1462
|
];
|
|
1456
1463
|
EmptyStateComponent.ctorParameters = function () { return []; };
|
|
@@ -1892,7 +1899,7 @@
|
|
|
1892
1899
|
{ type: i0.Component, args: [{
|
|
1893
1900
|
selector: 'aup-checkbox-input',
|
|
1894
1901
|
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
|
|
1902
|
+
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
1903
|
},] }
|
|
1897
1904
|
];
|
|
1898
1905
|
CheckboxInputComponent.ctorParameters = function () { return []; };
|
|
@@ -2135,7 +2142,7 @@
|
|
|
2135
2142
|
{ type: i0.Component, args: [{
|
|
2136
2143
|
selector: 'aup-icon',
|
|
2137
2144
|
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{
|
|
2145
|
+
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
2146
|
},] }
|
|
2140
2147
|
];
|
|
2141
2148
|
exports.IconComponent.propDecorators = {
|
|
@@ -2174,7 +2181,7 @@
|
|
|
2174
2181
|
{ type: i0.Component, args: [{
|
|
2175
2182
|
selector: 'aup-scroll-container',
|
|
2176
2183
|
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
|
|
2184
|
+
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
2185
|
},] }
|
|
2179
2186
|
];
|
|
2180
2187
|
ScrollContainerComponent.ctorParameters = function () { return []; };
|
|
@@ -2191,7 +2198,7 @@
|
|
|
2191
2198
|
{ type: i0.Component, args: [{
|
|
2192
2199
|
selector: 'aup-section-header',
|
|
2193
2200
|
template: "<ng-content></ng-content>\n",
|
|
2194
|
-
styles: [":host{--def-border-bottom-color:var(--border-bottom-color,rgba(0,0,0,0.07));
|
|
2201
|
+
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
2202
|
},] }
|
|
2196
2203
|
];
|
|
2197
2204
|
SectionHeaderComponent.ctorParameters = function () { return []; };
|
|
@@ -2310,7 +2317,7 @@
|
|
|
2310
2317
|
{ type: i0.Component, args: [{
|
|
2311
2318
|
selector: 'aup-switch-case',
|
|
2312
2319
|
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{
|
|
2320
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch}mat-tab-group{flex:1}"]
|
|
2314
2321
|
},] }
|
|
2315
2322
|
];
|
|
2316
2323
|
SwitchCaseComponent.ctorParameters = function () { return [
|
|
@@ -2707,6 +2714,7 @@
|
|
|
2707
2714
|
this._flex = false;
|
|
2708
2715
|
this._visibleModel = new pectin.DelegatingValueModel().withDefault(true);
|
|
2709
2716
|
this.installHeaderRenderer();
|
|
2717
|
+
this.dasherisedColumnId = typescriptUtilities.Stringy.from(columnId).dasherize().toString();
|
|
2710
2718
|
}
|
|
2711
2719
|
ColumnModel.prototype.installHeaderRenderer = function () {
|
|
2712
2720
|
this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, function (component, column) {
|
|
@@ -3332,15 +3340,32 @@
|
|
|
3332
3340
|
*
|
|
3333
3341
|
* Styling
|
|
3334
3342
|
* @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.
|
|
3335
3353
|
* aup-table {
|
|
3336
3354
|
* --column-gap: 10px; // defaults to 24px
|
|
3337
3355
|
* --row-hover-background-color, rgba(0, 0, 0, 0.05)
|
|
3338
3356
|
* --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,
|
|
3339
3361
|
* aup-table-cell-renderer {
|
|
3340
|
-
*
|
|
3362
|
+
* &.aup-col-my-dasherised-column-id {
|
|
3363
|
+
* // do stuff
|
|
3364
|
+
* }
|
|
3365
|
+
* &.first-visible-column {
|
|
3341
3366
|
* // do stuff
|
|
3342
3367
|
* }
|
|
3343
|
-
*
|
|
3368
|
+
* &.last-visible-column {
|
|
3344
3369
|
* // do stuff
|
|
3345
3370
|
* }
|
|
3346
3371
|
* }
|
|
@@ -3410,13 +3435,23 @@
|
|
|
3410
3435
|
var _a;
|
|
3411
3436
|
return ((_a = this.tableModel.lastVisibleColumn.query().value) === null || _a === void 0 ? void 0 : _a.columnId) === columnId;
|
|
3412
3437
|
};
|
|
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
|
+
};
|
|
3413
3448
|
return TableComponent;
|
|
3414
3449
|
}(ResizeAwareComponent));
|
|
3415
3450
|
TableComponent.decorators = [
|
|
3416
3451
|
{ type: i0.Component, args: [{
|
|
3417
3452
|
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
|
|
3419
|
-
styles: [":host{
|
|
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",
|
|
3454
|
+
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
3455
|
},] }
|
|
3421
3456
|
];
|
|
3422
3457
|
TableComponent.ctorParameters = function () { return [
|
|
@@ -3573,7 +3608,7 @@
|
|
|
3573
3608
|
{ type: i0.Component, args: [{
|
|
3574
3609
|
selector: 'aup-table-header-cell-renderer',
|
|
3575
3610
|
template: "<ng-container [cdkPortalOutlet]=\"getPortal()\" (attached)=\"initialiseHeader($event.instance)\"></ng-container>\n",
|
|
3576
|
-
styles: [":host{
|
|
3611
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%}"]
|
|
3577
3612
|
},] }
|
|
3578
3613
|
];
|
|
3579
3614
|
TableHeaderCellRendererComponent.ctorParameters = function () { return []; };
|
|
@@ -3673,7 +3708,7 @@
|
|
|
3673
3708
|
{ type: i0.Component, args: [{
|
|
3674
3709
|
selector: 'aup-tree-inheritance-icon',
|
|
3675
3710
|
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
|
|
3711
|
+
styles: [":host{position:relative;color:inherit}svg{color:var(--line-color);display:block}"]
|
|
3677
3712
|
},] }
|
|
3678
3713
|
];
|
|
3679
3714
|
exports.TreeInheritanceIconComponent.ctorParameters = function () { return []; };
|
|
@@ -3772,7 +3807,7 @@
|
|
|
3772
3807
|
{ type: i0.Component, args: [{
|
|
3773
3808
|
selector: 'aup-tree-label-cell-renderer',
|
|
3774
3809
|
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;
|
|
3810
|
+
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
3811
|
},] }
|
|
3777
3812
|
];
|
|
3778
3813
|
TreeLabelCellRendererComponent.ctorParameters = function () { return []; };
|
|
@@ -3914,7 +3949,7 @@
|
|
|
3914
3949
|
Object.defineProperty(DecoratedTreeNodeMixin.prototype, "decoratedSelf", {
|
|
3915
3950
|
get: function () {
|
|
3916
3951
|
var _this = this;
|
|
3917
|
-
return this.memoize(
|
|
3952
|
+
return this.memoize('decoratedSelf', function () {
|
|
3918
3953
|
return _this.parent ? _this.parent.children.find(function (child) { return child.node === _this.node; }) : exports.DecoratedTreeNode.createRoot(_this.node);
|
|
3919
3954
|
});
|
|
3920
3955
|
},
|
|
@@ -3924,7 +3959,7 @@
|
|
|
3924
3959
|
Object.defineProperty(DecoratedTreeNodeMixin.prototype, "children", {
|
|
3925
3960
|
get: function () {
|
|
3926
3961
|
var _this = this;
|
|
3927
|
-
return this.memoize(
|
|
3962
|
+
return this.memoize('children', function () {
|
|
3928
3963
|
return _this.node.children ? _this.node.children.map(function (child) {
|
|
3929
3964
|
return typescriptUtilities.Mixin.createProxy(child, new DecoratedTreeNodeMixin(_this.decoratedSelf, child));
|
|
3930
3965
|
}) : [];
|
|
@@ -3935,7 +3970,7 @@
|
|
|
3935
3970
|
});
|
|
3936
3971
|
DecoratedTreeNodeMixin.prototype.descendants = function () {
|
|
3937
3972
|
var _this = this;
|
|
3938
|
-
return this.memoize(
|
|
3973
|
+
return this.memoize('descendants', function () {
|
|
3939
3974
|
var result = [];
|
|
3940
3975
|
_this.visitDescendants(function (child) { return result.push(child); });
|
|
3941
3976
|
return result;
|
|
@@ -3943,7 +3978,7 @@
|
|
|
3943
3978
|
};
|
|
3944
3979
|
DecoratedTreeNodeMixin.prototype.selfAndDescendants = function () {
|
|
3945
3980
|
var _this = this;
|
|
3946
|
-
return this.memoize(
|
|
3981
|
+
return this.memoize('selfAndDescendants', function () {
|
|
3947
3982
|
var result = [];
|
|
3948
3983
|
_this.visitSelfAndDescendants(function (child) { return result.push(child); });
|
|
3949
3984
|
return result;
|
|
@@ -4014,29 +4049,24 @@
|
|
|
4014
4049
|
};
|
|
4015
4050
|
DecoratedTreeNodeMixin.prototype.ancestorsAndSelf = function () {
|
|
4016
4051
|
var _this = this;
|
|
4017
|
-
return this.memoize(
|
|
4052
|
+
return this.memoize('ancestorsAndSelf', function () {
|
|
4018
4053
|
return _this.ancestors().concat([(_this.decoratedSelf)]);
|
|
4019
4054
|
});
|
|
4020
4055
|
};
|
|
4021
4056
|
DecoratedTreeNodeMixin.prototype.pathToParent = function (parent) {
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4029
|
-
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
}
|
|
4033
|
-
});
|
|
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
|
+
}
|
|
4034
4067
|
};
|
|
4035
4068
|
DecoratedTreeNodeMixin.prototype.pathToParentAndSelf = function (parent) {
|
|
4036
|
-
|
|
4037
|
-
return this.memoize("pathToParentAndSelf", function () {
|
|
4038
|
-
return _this.pathToParent(parent).concat([_this.decoratedSelf]);
|
|
4039
|
-
});
|
|
4069
|
+
return this.pathToParent(parent).concat([this.decoratedSelf]);
|
|
4040
4070
|
};
|
|
4041
4071
|
DecoratedTreeNodeMixin.prototype.isRoot = function () {
|
|
4042
4072
|
return !this.parent;
|
|
@@ -4052,20 +4082,20 @@
|
|
|
4052
4082
|
return !this.isRoot() && this.node.children.length < 1;
|
|
4053
4083
|
};
|
|
4054
4084
|
DecoratedTreeNodeMixin.prototype.hasChildren = function () {
|
|
4055
|
-
return this.node.children.length > 0;
|
|
4085
|
+
return this.node.children && this.node.children.length > 0;
|
|
4056
4086
|
};
|
|
4057
4087
|
DecoratedTreeNodeMixin.prototype.depthFromParent = function (parent) {
|
|
4058
4088
|
return this.pathToParent(parent).length;
|
|
4059
4089
|
};
|
|
4060
4090
|
DecoratedTreeNodeMixin.prototype.treeDepth = function () {
|
|
4061
4091
|
var _this = this;
|
|
4062
|
-
return this.memoize(
|
|
4092
|
+
return this.memoize('treeDepth', function () {
|
|
4063
4093
|
return 1 + _this.descendants().map(function (child) { return child.depthFromParent(_this); }).reduce(function (prev, current) { return Math.max(prev, current); });
|
|
4064
4094
|
});
|
|
4065
4095
|
};
|
|
4066
4096
|
DecoratedTreeNodeMixin.prototype.flatten = function () {
|
|
4067
4097
|
var _this = this;
|
|
4068
|
-
return this.memoize(
|
|
4098
|
+
return this.memoize('flatten', function () {
|
|
4069
4099
|
return _this.flattenInto([]);
|
|
4070
4100
|
});
|
|
4071
4101
|
};
|
|
@@ -4275,27 +4305,45 @@
|
|
|
4275
4305
|
var TreeTableComponent = /** @class */ (function (_super) {
|
|
4276
4306
|
__extends(TreeTableComponent, _super);
|
|
4277
4307
|
function TreeTableComponent() {
|
|
4278
|
-
|
|
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;
|
|
4279
4316
|
}
|
|
4280
4317
|
return TreeTableComponent;
|
|
4281
4318
|
}(DisposableComponent));
|
|
4282
4319
|
TreeTableComponent.decorators = [
|
|
4283
4320
|
{ type: i0.Component, args: [{
|
|
4284
4321
|
selector: "aup-tree-table",
|
|
4285
|
-
template: "<aup-table [tableModel]=\"treeTableModel\"></aup-table>\n",
|
|
4322
|
+
template: "<aup-table [tableModel]=\"treeTableModel\" [showHeaderModel]=\"showHeaderModel\" [enableScrolling]=\"enableScrolling\"></aup-table>\n",
|
|
4286
4323
|
encapsulation: i0.ViewEncapsulation.None // allow us to target nested table styles
|
|
4287
4324
|
,
|
|
4288
|
-
styles: ["td.mat-cell{border-
|
|
4325
|
+
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
4326
|
},] }
|
|
4290
4327
|
];
|
|
4291
4328
|
TreeTableComponent.ctorParameters = function () { return []; };
|
|
4292
4329
|
TreeTableComponent.propDecorators = {
|
|
4293
|
-
treeTableModel: [{ type: i0.Input }]
|
|
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',] }]
|
|
4294
4334
|
};
|
|
4295
4335
|
__decorate([
|
|
4296
4336
|
pectin.TrackExternal(),
|
|
4297
4337
|
__metadata("design:type", TreeTableModel)
|
|
4298
4338
|
], 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);
|
|
4299
4347
|
|
|
4300
4348
|
var VerticalFocusContainerComponent = /** @class */ (function (_super) {
|
|
4301
4349
|
__extends(VerticalFocusContainerComponent, _super);
|
|
@@ -4403,7 +4451,7 @@
|
|
|
4403
4451
|
{ type: i0.Component, args: [{
|
|
4404
4452
|
selector: 'aup-paginator',
|
|
4405
4453
|
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{
|
|
4454
|
+
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
4455
|
},] }
|
|
4408
4456
|
];
|
|
4409
4457
|
PaginatorComponent.ctorParameters = function () { return []; };
|
|
@@ -4468,12 +4516,9 @@
|
|
|
4468
4516
|
TreeTableComponent,
|
|
4469
4517
|
exports.TreeInheritanceIconComponent,
|
|
4470
4518
|
TreeLabelCellRendererComponent,
|
|
4471
|
-
exports.IconComponent,
|
|
4472
4519
|
BusyOverlayComponent,
|
|
4473
4520
|
EmptyStateComponent,
|
|
4474
4521
|
PaginatorComponent,
|
|
4475
|
-
exports.IconComponent,
|
|
4476
|
-
exports.IconComponent
|
|
4477
4522
|
],
|
|
4478
4523
|
imports: [
|
|
4479
4524
|
i2.CommonModule,
|
|
@@ -4622,7 +4667,7 @@
|
|
|
4622
4667
|
{ type: i0.Component, args: [{
|
|
4623
4668
|
selector: 'aup-activity-actions',
|
|
4624
4669
|
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{
|
|
4670
|
+
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
4671
|
},] }
|
|
4627
4672
|
];
|
|
4628
4673
|
ActivityActionsComponent.ctorParameters = function () { return [
|
|
@@ -4765,7 +4810,7 @@
|
|
|
4765
4810
|
{ type: i0.Component, args: [{
|
|
4766
4811
|
selector: 'aup-alert-dialog',
|
|
4767
4812
|
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
|
|
4813
|
+
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
4814
|
},] }
|
|
4770
4815
|
];
|
|
4771
4816
|
AlertDialogComponent.ctorParameters = function () { return [
|
|
@@ -4821,7 +4866,7 @@
|
|
|
4821
4866
|
{ type: i0.Component, args: [{
|
|
4822
4867
|
selector: 'aup-confirmation-dialog',
|
|
4823
4868
|
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
|
|
4869
|
+
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
4870
|
},] }
|
|
4826
4871
|
];
|
|
4827
4872
|
ConfirmThenDialogComponent.ctorParameters = function () { return [
|
|
@@ -4868,7 +4913,7 @@
|
|
|
4868
4913
|
{ type: i0.Component, args: [{
|
|
4869
4914
|
selector: 'aup-confirmation-dialog',
|
|
4870
4915
|
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
|
|
4916
|
+
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
4917
|
},] }
|
|
4873
4918
|
];
|
|
4874
4919
|
ConfirmationDialogComponent.ctorParameters = function () { return [
|
|
@@ -5642,7 +5687,7 @@
|
|
|
5642
5687
|
{ type: i0.Component, args: [{
|
|
5643
5688
|
selector: 'aup-add-item-interaction-context',
|
|
5644
5689
|
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-
|
|
5690
|
+
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
5691
|
},] }
|
|
5647
5692
|
];
|
|
5648
5693
|
AddItemInteractionContextComponent.ctorParameters = function () { return []; };
|
|
@@ -5962,6 +6007,15 @@
|
|
|
5962
6007
|
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
5963
6008
|
* });
|
|
5964
6009
|
*
|
|
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
|
+
*
|
|
5965
6019
|
* I18n
|
|
5966
6020
|
* @example
|
|
5967
6021
|
* [table.yml]
|
|
@@ -6328,6 +6382,7 @@
|
|
|
6328
6382
|
_this._active = new pectin.MutableValueModel(false);
|
|
6329
6383
|
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
6384
|
when(_this._active).becomesTruthy(function () { return _this.onPlaceReady(); });
|
|
6385
|
+
_this.childPlaces = _this.placeDefinition.children.map(function (d) { return d.component; });
|
|
6331
6386
|
return _this;
|
|
6332
6387
|
}
|
|
6333
6388
|
// @Trace()
|
|
@@ -6377,13 +6432,6 @@
|
|
|
6377
6432
|
enumerable: false,
|
|
6378
6433
|
configurable: true
|
|
6379
6434
|
});
|
|
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
6435
|
Object.defineProperty(PlaceComponent.prototype, "active", {
|
|
6388
6436
|
get: function () {
|
|
6389
6437
|
return this._active.readonly;
|
|
@@ -6450,6 +6498,7 @@
|
|
|
6450
6498
|
this.component = component;
|
|
6451
6499
|
this.navigationSession = navigationSession;
|
|
6452
6500
|
this.isPrimaryComponent = isPrimaryComponent;
|
|
6501
|
+
pectin.assert.notNil(component);
|
|
6453
6502
|
}
|
|
6454
6503
|
Object.defineProperty(PlaceComponentDeactivationHandler.prototype, "routerInteractionAdapter", {
|
|
6455
6504
|
get: function () {
|
|
@@ -7617,7 +7666,7 @@
|
|
|
7617
7666
|
{ type: i1$1.UrlSerializer }
|
|
7618
7667
|
]; };
|
|
7619
7668
|
|
|
7620
|
-
|
|
7669
|
+
exports.PlaceRouter = /** @class */ (function (_super) {
|
|
7621
7670
|
__extends(PlaceRouter, _super);
|
|
7622
7671
|
function PlaceRouter(angularRouter, angularLocation, interactionService, urlService, placeHistory) {
|
|
7623
7672
|
var _this = _super.call(this) || this;
|
|
@@ -7653,7 +7702,7 @@
|
|
|
7653
7702
|
.pluck('name')
|
|
7654
7703
|
.otherwise(idleStateName);
|
|
7655
7704
|
pectin.DebugContext.tag(_this._activeVisits, 'PlaceRouter.activeVisits');
|
|
7656
|
-
_this.
|
|
7705
|
+
_this.state = chain(_this._activeVisits).reduce(function (visits) { return new PlaceRouter.State(visits); });
|
|
7657
7706
|
// TODO: make setup the callbacks in during module initiation to make this testable.
|
|
7658
7707
|
angularRouter.events.subscribe(function (event) {
|
|
7659
7708
|
// Routing event sequence
|
|
@@ -7717,9 +7766,6 @@
|
|
|
7717
7766
|
PlaceRouter.prototype.getAuthenticationFailureRedirect = function (activatedRoute, state) {
|
|
7718
7767
|
return this.redirections.onAuthenticationFailure(activatedRoute, state);
|
|
7719
7768
|
};
|
|
7720
|
-
PlaceRouter.prototype.getAuthorisationFailureRedirect = function (activatedRoute, state) {
|
|
7721
|
-
return this.redirections.onAuthorisationFailure(activatedRoute, state);
|
|
7722
|
-
};
|
|
7723
7769
|
Object.defineProperty(PlaceRouter.prototype, "navigationSession", {
|
|
7724
7770
|
get: function () {
|
|
7725
7771
|
return this.navigationSessionModel.value;
|
|
@@ -7955,19 +8001,34 @@
|
|
|
7955
8001
|
};
|
|
7956
8002
|
return PlaceRouter;
|
|
7957
8003
|
}(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 = [
|
|
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 = [
|
|
7960
8006
|
{ type: i0.Injectable, args: [{
|
|
7961
8007
|
providedIn: 'root'
|
|
7962
8008
|
},] }
|
|
7963
8009
|
];
|
|
7964
|
-
PlaceRouter.ctorParameters = function () { return [
|
|
8010
|
+
exports.PlaceRouter.ctorParameters = function () { return [
|
|
7965
8011
|
{ type: i1$1.Router },
|
|
7966
8012
|
{ type: i2.Location },
|
|
7967
8013
|
{ type: exports.InteractionService },
|
|
7968
8014
|
{ type: UrlService },
|
|
7969
8015
|
{ type: exports.PlaceHistory }
|
|
7970
8016
|
]; };
|
|
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 = {}));
|
|
7971
8032
|
|
|
7972
8033
|
var Visit = /** @class */ (function () {
|
|
7973
8034
|
function Visit(placeDefinition, visitParameters) {
|
|
@@ -8040,6 +8101,20 @@
|
|
|
8040
8101
|
|
|
8041
8102
|
var AUP_PLACE_CONFIG = new i0.InjectionToken('AUP_PLACE_CONFIG');
|
|
8042
8103
|
|
|
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
|
+
|
|
8043
8118
|
// Freezes the state of the components at the start of the animation.
|
|
8044
8119
|
var animationStartStyle = animations$1.style({ position: 'absolute', top: '0', left: '0', bottom: '0', right: '0' });
|
|
8045
8120
|
var left = [
|
|
@@ -8084,13 +8159,15 @@
|
|
|
8084
8159
|
}
|
|
8085
8160
|
var LEFT_RIGHT_PLACE_ANIMATION = leftRightPlaceAnimation('0.3s');
|
|
8086
8161
|
|
|
8162
|
+
var AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT = new i0.InjectionToken('AUP_UNAUTHORISED_PLACE_COMPONENT');
|
|
8087
8163
|
var PlaceOutletComponent = /** @class */ (function (_super) {
|
|
8088
8164
|
__extends(PlaceOutletComponent, _super);
|
|
8089
|
-
function PlaceOutletComponent(router, placeRouter, placeConfig, parentOutlet) {
|
|
8165
|
+
function PlaceOutletComponent(router, placeRouter, placeConfig, unauthorisedPlaceNotice, parentOutlet, cdr) {
|
|
8090
8166
|
var _this = _super.call(this) || this;
|
|
8091
8167
|
_this.router = router;
|
|
8092
8168
|
_this.placeRouter = placeRouter;
|
|
8093
8169
|
_this.placeConfig = placeConfig;
|
|
8170
|
+
_this.cdr = cdr;
|
|
8094
8171
|
_this.placeChanged = new i0.EventEmitter();
|
|
8095
8172
|
_this.outletActivated = new pectin.MutableValueModel(false);
|
|
8096
8173
|
_this._activatedRouteModel = new pectin.MutableValueModel();
|
|
@@ -8123,7 +8200,7 @@
|
|
|
8123
8200
|
_this.animationEnabled = valueOf.all(_this.animateModel, _this.animationSupported).areTruthy();
|
|
8124
8201
|
// Extract our visit model from the place router.
|
|
8125
8202
|
_this._activePlaceDefinition = chain(_this._activePlaceModel).pluck('placeDefinition');
|
|
8126
|
-
_this.routerVisitModel =
|
|
8203
|
+
_this.routerVisitModel = chain(placeRouter.state).map(function (state) { return state.getVisitFor(_this._activePlaceDefinition.value); }, { dependsOn: _this._activePlaceDefinition });
|
|
8127
8204
|
_this.navigationInProgress = chain(_this.placeRouter.navigationInProgress);
|
|
8128
8205
|
when(_this.navigationInProgress).becomesFalsey(function () {
|
|
8129
8206
|
_this.checkStateAndInitialise();
|
|
@@ -8134,13 +8211,11 @@
|
|
|
8134
8211
|
chain(_this._activePlaceModel)
|
|
8135
8212
|
.postponeWhile(_this.navigationInProgress)
|
|
8136
8213
|
.subscribe(function (place) { return _this.placeChanged.emit(place); });
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
|
|
8142
|
-
}
|
|
8143
|
-
});
|
|
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);
|
|
8144
8219
|
return _this;
|
|
8145
8220
|
}
|
|
8146
8221
|
// @Trace()
|
|
@@ -8157,6 +8232,13 @@
|
|
|
8157
8232
|
enumerable: false,
|
|
8158
8233
|
configurable: true
|
|
8159
8234
|
});
|
|
8235
|
+
Object.defineProperty(PlaceOutletComponent.prototype, "isAuthorised", {
|
|
8236
|
+
get: function () {
|
|
8237
|
+
return this.authorised.value;
|
|
8238
|
+
},
|
|
8239
|
+
enumerable: false,
|
|
8240
|
+
configurable: true
|
|
8241
|
+
});
|
|
8160
8242
|
// @Trace()
|
|
8161
8243
|
PlaceOutletComponent.prototype.navigate = function (visit) {
|
|
8162
8244
|
// const place = this.placesInAnimationOrder.query().findMatching(p => visit.placeDefinition.component === p);
|
|
@@ -8223,6 +8305,7 @@
|
|
|
8223
8305
|
pectin.lang.illegalState('wrong visit!!!');
|
|
8224
8306
|
}
|
|
8225
8307
|
this.initialisePlace(routerVisit, activePlace);
|
|
8308
|
+
this.cdr.detectChanges();
|
|
8226
8309
|
}
|
|
8227
8310
|
};
|
|
8228
8311
|
PlaceOutletComponent.prototype.initialisePlace = function (routerVisit, activePlace) {
|
|
@@ -8276,16 +8359,18 @@
|
|
|
8276
8359
|
PlaceOutletComponent.decorators = [
|
|
8277
8360
|
{ type: i0.Component, args: [{
|
|
8278
8361
|
selector: 'aup-place-outlet',
|
|
8279
|
-
template: "<ng-container *ngIf=\"animationEnabled.value\">\n <div class=\"router-outlet-container\"
|
|
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",
|
|
8280
8363
|
animations: [LEFT_RIGHT_PLACE_ANIMATION],
|
|
8281
|
-
styles: [":host{display:flex;flex-direction:column;min-height:0}.router-outlet-container{display:
|
|
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}"]
|
|
8282
8365
|
},] }
|
|
8283
8366
|
];
|
|
8284
8367
|
PlaceOutletComponent.ctorParameters = function () { return [
|
|
8285
8368
|
{ type: i1$1.Router },
|
|
8286
|
-
{ type: PlaceRouter },
|
|
8369
|
+
{ type: exports.PlaceRouter },
|
|
8287
8370
|
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [AUP_PLACE_CONFIG,] }] },
|
|
8288
|
-
{ type:
|
|
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 }
|
|
8289
8374
|
]; };
|
|
8290
8375
|
PlaceOutletComponent.propDecorators = {
|
|
8291
8376
|
animate: [{ type: i0.Input }],
|
|
@@ -8293,7 +8378,8 @@
|
|
|
8293
8378
|
customPlaceAnimationOrderModel: [{ type: i0.Input, args: ['placeAnimationOrderModel',] }],
|
|
8294
8379
|
customPlaceAnimationOrder: [{ type: i0.Input, args: ['placeAnimationOrder',] }],
|
|
8295
8380
|
placeChanged: [{ type: i0.Output }],
|
|
8296
|
-
routerOut: [{ type: i0.ViewChild, args: ['routeOutlet', { static: true },] }]
|
|
8381
|
+
routerOut: [{ type: i0.ViewChild, args: ['routeOutlet', { static: true },] }],
|
|
8382
|
+
isAuthorised: [{ type: i0.HostBinding, args: ["class.authorised",] }]
|
|
8297
8383
|
};
|
|
8298
8384
|
__decorate([
|
|
8299
8385
|
pectin.StoreInValueModel('animateModel'),
|
|
@@ -8318,13 +8404,15 @@
|
|
|
8318
8404
|
var _this = _super.call(this) || this;
|
|
8319
8405
|
_this.placeRouter = placeRouter;
|
|
8320
8406
|
_this._activePlaceComponent = new pectin.DelegatingValueModel();
|
|
8407
|
+
_this.trackByPlaceDef = function (data) { return data.place; };
|
|
8321
8408
|
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
8409
|
_this.placeDefinitions = chain(_this.placesModel)
|
|
8323
8410
|
.map(function (c) { return exports.PlaceComponent.getDefinition(c); })
|
|
8324
8411
|
.select(function (d) {
|
|
8325
8412
|
var guard = placeRouter.accessGuard.value;
|
|
8326
|
-
|
|
8327
|
-
|
|
8413
|
+
var state = placeRouter.state.value;
|
|
8414
|
+
return guard.isAuthorised(d) || state.isPlaceActive(d);
|
|
8415
|
+
}, { dependsOn: [placeRouter.accessGuard, placeRouter.state] });
|
|
8328
8416
|
_this.commandFactory = pectin.Command.createFactory(function (placeDefinition) {
|
|
8329
8417
|
_this.placeOutlet.navigate(new Visit(placeDefinition));
|
|
8330
8418
|
});
|
|
@@ -8333,9 +8421,22 @@
|
|
|
8333
8421
|
// values in the one change detection cycle. So instead we delay the update to a different
|
|
8334
8422
|
// tick.
|
|
8335
8423
|
setTimeout(function () { return _this._activePlaceComponent.setDelegate(outlet ? outlet.activePlaceModel : null); });
|
|
8336
|
-
});
|
|
8424
|
+
}, { initialValue: "triggerChange" });
|
|
8337
8425
|
_this.activePlaceDefinition = chain(_this._activePlaceComponent).pluck('placeDefinition');
|
|
8426
|
+
_this.menuItems = chain(_this.placeDefinitions).map(function (d) {
|
|
8427
|
+
return {
|
|
8428
|
+
place: d,
|
|
8429
|
+
active: _this.activePlaceDefinition.value === d
|
|
8430
|
+
};
|
|
8431
|
+
}, {
|
|
8432
|
+
dependsOn: _this.activePlaceDefinition
|
|
8433
|
+
});
|
|
8338
8434
|
return _this;
|
|
8435
|
+
// const txo = new TransactionObserver({ verbose: true }).onEvent(e => console.log(e.name, e.payload));
|
|
8436
|
+
// txo.observe('this.placesModel', this.placesModel);
|
|
8437
|
+
// txo.observe('this.placeDefinitions', this.placeDefinitions);
|
|
8438
|
+
// txo.observe('this.activePlaceDefinition', this.activePlaceDefinition);
|
|
8439
|
+
// txo.observe('this.menuItems', this.menuItems);
|
|
8339
8440
|
}
|
|
8340
8441
|
AbstractPlaceNavigationComponent.prototype.getNavigationFace = function (placeDef) {
|
|
8341
8442
|
var navItem = placeDef.getPlaceData('nav');
|
|
@@ -8346,7 +8447,7 @@
|
|
|
8346
8447
|
};
|
|
8347
8448
|
};
|
|
8348
8449
|
AbstractPlaceNavigationComponent.prototype.isActive = function (place) {
|
|
8349
|
-
return
|
|
8450
|
+
return;
|
|
8350
8451
|
};
|
|
8351
8452
|
AbstractPlaceNavigationComponent.prototype.ngOnInit = function () {
|
|
8352
8453
|
};
|
|
@@ -8358,7 +8459,7 @@
|
|
|
8358
8459
|
},] }
|
|
8359
8460
|
];
|
|
8360
8461
|
AbstractPlaceNavigationComponent.ctorParameters = function () { return [
|
|
8361
|
-
{ type: PlaceRouter }
|
|
8462
|
+
{ type: exports.PlaceRouter }
|
|
8362
8463
|
]; };
|
|
8363
8464
|
AbstractPlaceNavigationComponent.propDecorators = {
|
|
8364
8465
|
places: [{ type: i0.Input }],
|
|
@@ -8399,12 +8500,12 @@
|
|
|
8399
8500
|
ListPlaceNavComponent.decorators = [
|
|
8400
8501
|
{ type: i0.Component, args: [{
|
|
8401
8502
|
selector: 'aup-list-place-nav',
|
|
8402
|
-
template: "<mat-nav-list fxFlex>\n <a mat-list-item *ngFor=\"let
|
|
8403
|
-
styles: [":host{
|
|
8503
|
+
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",
|
|
8504
|
+
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
8505
|
},] }
|
|
8405
8506
|
];
|
|
8406
8507
|
ListPlaceNavComponent.ctorParameters = function () { return [
|
|
8407
|
-
{ type: PlaceRouter }
|
|
8508
|
+
{ type: exports.PlaceRouter }
|
|
8408
8509
|
]; };
|
|
8409
8510
|
|
|
8410
8511
|
/**
|
|
@@ -8470,12 +8571,12 @@
|
|
|
8470
8571
|
SidePlaceNavigationComponent.decorators = [
|
|
8471
8572
|
{ type: i0.Component, args: [{
|
|
8472
8573
|
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
|
|
8474
|
-
styles: [":host{
|
|
8574
|
+
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",
|
|
8575
|
+
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
8576
|
},] }
|
|
8476
8577
|
];
|
|
8477
8578
|
SidePlaceNavigationComponent.ctorParameters = function () { return [
|
|
8478
|
-
{ type: PlaceRouter }
|
|
8579
|
+
{ type: exports.PlaceRouter }
|
|
8479
8580
|
]; };
|
|
8480
8581
|
SidePlaceNavigationComponent.propDecorators = {
|
|
8481
8582
|
expanded: [{ type: i0.HostBinding, args: ['class.expanded',] }],
|
|
@@ -8492,12 +8593,12 @@
|
|
|
8492
8593
|
TabbedPlaceNavigationComponent.decorators = [
|
|
8493
8594
|
{ type: i0.Component, args: [{
|
|
8494
8595
|
selector: 'aup-tabbed-place-navigation',
|
|
8495
|
-
template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let
|
|
8596
|
+
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
8597
|
styles: [""]
|
|
8497
8598
|
},] }
|
|
8498
8599
|
];
|
|
8499
8600
|
TabbedPlaceNavigationComponent.ctorParameters = function () { return [
|
|
8500
|
-
{ type: PlaceRouter }
|
|
8601
|
+
{ type: exports.PlaceRouter }
|
|
8501
8602
|
]; };
|
|
8502
8603
|
|
|
8503
8604
|
var PlaceModule = /** @class */ (function () {
|
|
@@ -8518,14 +8619,16 @@
|
|
|
8518
8619
|
icon.MatIconModule,
|
|
8519
8620
|
DirectivesModule,
|
|
8520
8621
|
flexLayout.FlexModule,
|
|
8521
|
-
ComponentsModule
|
|
8622
|
+
ComponentsModule,
|
|
8623
|
+
portal.PortalModule
|
|
8522
8624
|
],
|
|
8523
8625
|
declarations: [
|
|
8524
8626
|
PlaceOutletComponent,
|
|
8525
8627
|
TabbedPlaceNavigationComponent,
|
|
8526
8628
|
ListPlaceNavComponent,
|
|
8527
8629
|
SidePlaceNavigationComponent,
|
|
8528
|
-
AbstractPlaceNavigationComponent
|
|
8630
|
+
AbstractPlaceNavigationComponent,
|
|
8631
|
+
NotAuthorisedNoticeComponent
|
|
8529
8632
|
],
|
|
8530
8633
|
entryComponents: [],
|
|
8531
8634
|
exports: [
|
|
@@ -8857,7 +8960,7 @@
|
|
|
8857
8960
|
// @Trace()
|
|
8858
8961
|
PlaceGuard.prototype.canActivate = function (activatedRoute, state) {
|
|
8859
8962
|
return __awaiter(this, void 0, void 0, function () {
|
|
8860
|
-
var placeDefinition_1, redirectLocation, nextPlaceDef,
|
|
8963
|
+
var placeDefinition_1, redirectLocation, nextPlaceDef, result;
|
|
8861
8964
|
var _this = this;
|
|
8862
8965
|
return __generator(this, function (_a) {
|
|
8863
8966
|
switch (_a.label) {
|
|
@@ -8875,14 +8978,6 @@
|
|
|
8875
8978
|
}
|
|
8876
8979
|
return [2 /*return*/, this.createUrlTree(redirectLocation)];
|
|
8877
8980
|
}
|
|
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
8981
|
_a.label = 2;
|
|
8887
8982
|
case 2: return [4 /*yield*/, this.cleanInteractionState(activatedRoute, state, function () { return __awaiter(_this, void 0, void 0, function () {
|
|
8888
8983
|
var params, parsedParams, navigationSession, initialVisit, sanitiser, sanitisedVisit, urlSnapshot;
|
|
@@ -8926,6 +9021,11 @@
|
|
|
8926
9021
|
return __generator(this, function (_a) {
|
|
8927
9022
|
switch (_a.label) {
|
|
8928
9023
|
case 0:
|
|
9024
|
+
if (!component) {
|
|
9025
|
+
// this happens when the place wasn't authorised and the associated
|
|
9026
|
+
// router outlet was removed from the dom.
|
|
9027
|
+
return [2 /*return*/, true];
|
|
9028
|
+
}
|
|
8929
9029
|
currentUrl = this.urlService.parseUrl(currentState.url);
|
|
8930
9030
|
nextUrl = this.urlService.parseUrl(nextState.url);
|
|
8931
9031
|
return [4 /*yield*/, this.placeRouter.navigationSession.canDeactivatePlace(component, currentUrl, nextUrl)];
|
|
@@ -8986,14 +9086,14 @@
|
|
|
8986
9086
|
};
|
|
8987
9087
|
return PlaceGuard;
|
|
8988
9088
|
}());
|
|
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" });
|
|
9089
|
+
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
9090
|
PlaceGuard.decorators = [
|
|
8991
9091
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
8992
9092
|
];
|
|
8993
9093
|
PlaceGuard.ctorParameters = function () { return [
|
|
8994
9094
|
{ type: i1$1.Router },
|
|
8995
9095
|
{ type: UrlService },
|
|
8996
|
-
{ type: PlaceRouter },
|
|
9096
|
+
{ type: exports.PlaceRouter },
|
|
8997
9097
|
{ type: exports.PlaceHistory },
|
|
8998
9098
|
{ type: exports.InteractionService },
|
|
8999
9099
|
{ type: i0.Injector }
|
|
@@ -9109,6 +9209,7 @@
|
|
|
9109
9209
|
|
|
9110
9210
|
exports.ACTIVITY_DATA = ACTIVITY_DATA;
|
|
9111
9211
|
exports.AUP_PLACE_CONFIG = AUP_PLACE_CONFIG;
|
|
9212
|
+
exports.AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT = AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT;
|
|
9112
9213
|
exports.AbstractInputActivity = AbstractInputActivity;
|
|
9113
9214
|
exports.AbstractInputComponent = AbstractInputComponent;
|
|
9114
9215
|
exports.AbstractInteractionContext = AbstractInteractionContext;
|
|
@@ -9186,6 +9287,7 @@
|
|
|
9186
9287
|
exports.NavigationSession = NavigationSession;
|
|
9187
9288
|
exports.NoopAuthGuard = NoopAuthGuard;
|
|
9188
9289
|
exports.NoopComponent = NoopComponent;
|
|
9290
|
+
exports.NotAuthorisedNoticeComponent = NotAuthorisedNoticeComponent;
|
|
9189
9291
|
exports.NumberInputComponent = NumberInputComponent;
|
|
9190
9292
|
exports.POPUP_CONTAINER = POPUP_CONTAINER;
|
|
9191
9293
|
exports.PORTAL_EDITOR_COMPONENT = PORTAL_EDITOR_COMPONENT;
|
|
@@ -9198,7 +9300,6 @@
|
|
|
9198
9300
|
exports.PlaceGuard = PlaceGuard;
|
|
9199
9301
|
exports.PlaceModule = PlaceModule;
|
|
9200
9302
|
exports.PlaceOutletComponent = PlaceOutletComponent;
|
|
9201
|
-
exports.PlaceRouter = PlaceRouter;
|
|
9202
9303
|
exports.Point = Point;
|
|
9203
9304
|
exports.PopStateDuringInteractionNavigation = PopStateDuringInteractionNavigation;
|
|
9204
9305
|
exports.PopStateNavigation = PopStateNavigation;
|