@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
|
@@ -25,7 +25,7 @@ import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
|
25
25
|
import _, { find, filter, each, isNil, isEqual } from 'lodash';
|
|
26
26
|
import { Enum } from 'typescript-string-enums';
|
|
27
27
|
import ResizeObserver from 'resize-observer-polyfill';
|
|
28
|
-
import { assert as assert$1, Mixin, Opts, lang as lang$1, Klass } from '@coolon/typescript-utilities';
|
|
28
|
+
import { assert as assert$1, Stringy, Mixin, Opts, lang as lang$1, Klass } from '@coolon/typescript-utilities';
|
|
29
29
|
import produce from 'immer';
|
|
30
30
|
import { FlexModule, GridModule } from '@angular/flex-layout';
|
|
31
31
|
import { MatDialogModule, MatDialog, MAT_DIALOG_DEFAULT_OPTIONS, MatDialogConfig } from '@angular/material/dialog';
|
|
@@ -330,7 +330,7 @@ BusyOverlayComponent.decorators = [
|
|
|
330
330
|
{ type: Component, args: [{
|
|
331
331
|
selector: 'aup-busy-overlay',
|
|
332
332
|
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",
|
|
333
|
-
styles: [":host{position:relative}div.busy-overlay-backdrop{
|
|
333
|
+
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}"]
|
|
334
334
|
},] }
|
|
335
335
|
];
|
|
336
336
|
BusyOverlayComponent.ctorParameters = () => [];
|
|
@@ -520,7 +520,7 @@ CardContainerComponent.decorators = [
|
|
|
520
520
|
{ type: Component, args: [{
|
|
521
521
|
selector: 'aup-card-container',
|
|
522
522
|
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",
|
|
523
|
-
styles: [":host{--resolved-card-
|
|
523
|
+
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}"]
|
|
524
524
|
},] }
|
|
525
525
|
];
|
|
526
526
|
CardContainerComponent.ctorParameters = () => [];
|
|
@@ -580,7 +580,7 @@ CommandFaceComponent.decorators = [
|
|
|
580
580
|
selector: 'aup-command-face',
|
|
581
581
|
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",
|
|
582
582
|
encapsulation: ViewEncapsulation.None,
|
|
583
|
-
styles: ["aup-command-face{--icon-gap:var(--aup-command-face-icon-gap);display
|
|
583
|
+
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}"]
|
|
584
584
|
},] }
|
|
585
585
|
];
|
|
586
586
|
CommandFaceComponent.ctorParameters = () => [];
|
|
@@ -641,6 +641,9 @@ class CommandComponent extends PopupAwareComponent {
|
|
|
641
641
|
this.activeFace = this.faces.first();
|
|
642
642
|
this.buttonStyle = chain(this.activeFace).map(f => CommandFace.getStyleOf(f));
|
|
643
643
|
this.colorModel = chain(this.activeFace).map(f => CommandFace.getColorOf(f));
|
|
644
|
+
this.iconOnly = this.faces.select(face => {
|
|
645
|
+
return _.isEmpty(CommandFace.getTextOf(face)) && !_.isEmpty(CommandFace.getIconOf(face));
|
|
646
|
+
}).count().equals(this.faces.count());
|
|
644
647
|
}
|
|
645
648
|
isActive(face) {
|
|
646
649
|
return this.activeFace.query().equals(face);
|
|
@@ -657,7 +660,7 @@ class CommandComponent extends PopupAwareComponent {
|
|
|
657
660
|
CommandComponent.decorators = [
|
|
658
661
|
{ type: Component, args: [{
|
|
659
662
|
selector: 'aup-command',
|
|
660
|
-
template: "<ng-container [ngSwitch]=\"buttonStyle.value\">\n
|
|
663
|
+
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",
|
|
661
664
|
styles: [":host{display:inline-flex;flex-direction:row;justify-content:stretch}button{flex:1}"]
|
|
662
665
|
},] }
|
|
663
666
|
];
|
|
@@ -818,7 +821,11 @@ __decorate([
|
|
|
818
821
|
|
|
819
822
|
var TrackBy;
|
|
820
823
|
(function (TrackBy) {
|
|
821
|
-
TrackBy.byIndex = (
|
|
824
|
+
TrackBy.byIndex = (index, item) => index;
|
|
825
|
+
function trackByProperty(property) {
|
|
826
|
+
return (index, item) => item[property];
|
|
827
|
+
}
|
|
828
|
+
TrackBy.trackByProperty = trackByProperty;
|
|
822
829
|
})(TrackBy || (TrackBy = {}));
|
|
823
830
|
|
|
824
831
|
class CommandContainer extends GarbageCollector {
|
|
@@ -866,7 +873,7 @@ ToolBarComponent.decorators = [
|
|
|
866
873
|
selector: 'aup-tool-bar',
|
|
867
874
|
template: '<div class="toolbar-content"><ng-content></ng-content></div>',
|
|
868
875
|
encapsulation: ViewEncapsulation.None,
|
|
869
|
-
styles: [":host{display:inline-block}.toolbar-content{
|
|
876
|
+
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}"]
|
|
870
877
|
},] }
|
|
871
878
|
];
|
|
872
879
|
ToolBarComponent.ctorParameters = () => [];
|
|
@@ -1038,7 +1045,7 @@ EmptyStateComponent.decorators = [
|
|
|
1038
1045
|
<ng-content></ng-content>
|
|
1039
1046
|
</div>
|
|
1040
1047
|
`,
|
|
1041
|
-
styles: [":host{
|
|
1048
|
+
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}"]
|
|
1042
1049
|
},] }
|
|
1043
1050
|
];
|
|
1044
1051
|
EmptyStateComponent.ctorParameters = () => [];
|
|
@@ -1418,7 +1425,7 @@ CheckboxInputComponent.decorators = [
|
|
|
1418
1425
|
{ type: Component, args: [{
|
|
1419
1426
|
selector: 'aup-checkbox-input',
|
|
1420
1427
|
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",
|
|
1421
|
-
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
|
|
1428
|
+
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}"]
|
|
1422
1429
|
},] }
|
|
1423
1430
|
];
|
|
1424
1431
|
CheckboxInputComponent.ctorParameters = () => [];
|
|
@@ -1639,7 +1646,7 @@ IconComponent.decorators = [
|
|
|
1639
1646
|
{ type: Component, args: [{
|
|
1640
1647
|
selector: 'aup-icon',
|
|
1641
1648
|
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",
|
|
1642
|
-
styles: [":host{display:inline-flex;width:24px}fa-icon{vertical-align:middle}.faIconWrapper{text-align:center}.faIconWrapper,.svgIcon{
|
|
1649
|
+
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}"]
|
|
1643
1650
|
},] }
|
|
1644
1651
|
];
|
|
1645
1652
|
IconComponent.propDecorators = {
|
|
@@ -1675,7 +1682,7 @@ ScrollContainerComponent.decorators = [
|
|
|
1675
1682
|
{ type: Component, args: [{
|
|
1676
1683
|
selector: 'aup-scroll-container',
|
|
1677
1684
|
template: "<div class=\"container\" cdkScrollable>\n <ng-content></ng-content>\n</div>\n",
|
|
1678
|
-
styles: [":host{flex-direction:column;min-height:0}.container,:host{align-items:stretch
|
|
1685
|
+
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}"]
|
|
1679
1686
|
},] }
|
|
1680
1687
|
];
|
|
1681
1688
|
ScrollContainerComponent.ctorParameters = () => [];
|
|
@@ -1691,7 +1698,7 @@ SectionHeaderComponent.decorators = [
|
|
|
1691
1698
|
{ type: Component, args: [{
|
|
1692
1699
|
selector: 'aup-section-header',
|
|
1693
1700
|
template: "<ng-content></ng-content>\n",
|
|
1694
|
-
styles: [":host{--def-border-bottom-color:var(--border-bottom-color,rgba(0,0,0,0.07));
|
|
1701
|
+
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)}"]
|
|
1695
1702
|
},] }
|
|
1696
1703
|
];
|
|
1697
1704
|
SectionHeaderComponent.ctorParameters = () => [];
|
|
@@ -1794,7 +1801,7 @@ SwitchCaseComponent.decorators = [
|
|
|
1794
1801
|
{ type: Component, args: [{
|
|
1795
1802
|
selector: 'aup-switch-case',
|
|
1796
1803
|
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",
|
|
1797
|
-
styles: [":host{
|
|
1804
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch}mat-tab-group{flex:1}"]
|
|
1798
1805
|
},] }
|
|
1799
1806
|
];
|
|
1800
1807
|
SwitchCaseComponent.ctorParameters = () => [
|
|
@@ -2155,6 +2162,7 @@ class ColumnModel {
|
|
|
2155
2162
|
this._flex = false;
|
|
2156
2163
|
this._visibleModel = new DelegatingValueModel().withDefault(true);
|
|
2157
2164
|
this.installHeaderRenderer();
|
|
2165
|
+
this.dasherisedColumnId = Stringy.from(columnId).dasherize().toString();
|
|
2158
2166
|
}
|
|
2159
2167
|
installHeaderRenderer() {
|
|
2160
2168
|
this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, (component, column) => {
|
|
@@ -2697,15 +2705,32 @@ AbstractTableModel = __decorate([
|
|
|
2697
2705
|
*
|
|
2698
2706
|
* Styling
|
|
2699
2707
|
* @example
|
|
2708
|
+
* // global settings
|
|
2709
|
+
* :root {
|
|
2710
|
+
* --aup-table-column-gap: 10px; // defaults to 24px
|
|
2711
|
+
* --aup-table-row-hover-background-color, rgba(0, 0, 0, 0.05)
|
|
2712
|
+
* --aup-table-row-selected-background-color: rebeccapurple; // defaults to transparent
|
|
2713
|
+
* --aup-table-first-column-padding-left: 18px // defaults to --column-gap
|
|
2714
|
+
* --aup-table-last-column-padding-right: 18px // defaults to --column-gap
|
|
2715
|
+
* }
|
|
2716
|
+
*
|
|
2717
|
+
* // per table settings.
|
|
2700
2718
|
* aup-table {
|
|
2701
2719
|
* --column-gap: 10px; // defaults to 24px
|
|
2702
2720
|
* --row-hover-background-color, rgba(0, 0, 0, 0.05)
|
|
2703
2721
|
* --row-selected-background-color: rebeccapurple; // defaults to transparent
|
|
2722
|
+
* --first-column-padding-left: 18px // defaults to --column-gap
|
|
2723
|
+
* --last-column-padding-right: 18px // defaults to --column-gap
|
|
2724
|
+
*
|
|
2725
|
+
* aup-table-header-cell-renderer,
|
|
2704
2726
|
* aup-table-cell-renderer {
|
|
2705
|
-
*
|
|
2727
|
+
* &.aup-col-my-dasherised-column-id {
|
|
2728
|
+
* // do stuff
|
|
2729
|
+
* }
|
|
2730
|
+
* &.first-visible-column {
|
|
2706
2731
|
* // do stuff
|
|
2707
2732
|
* }
|
|
2708
|
-
*
|
|
2733
|
+
* &.last-visible-column {
|
|
2709
2734
|
* // do stuff
|
|
2710
2735
|
* }
|
|
2711
2736
|
* }
|
|
@@ -2769,12 +2794,22 @@ class TableComponent extends ResizeAwareComponent {
|
|
|
2769
2794
|
var _a;
|
|
2770
2795
|
return ((_a = this.tableModel.lastVisibleColumn.query().value) === null || _a === void 0 ? void 0 : _a.columnId) === columnId;
|
|
2771
2796
|
}
|
|
2797
|
+
getColumnClasses(columnId) {
|
|
2798
|
+
const classes = [`aup-col-${this.columnsById.get(columnId).dasherisedColumnId}`];
|
|
2799
|
+
if (this.isFirstVisibleColumn(columnId)) {
|
|
2800
|
+
classes.push('first-visible-column');
|
|
2801
|
+
}
|
|
2802
|
+
if (this.isLastVisibleColumn(columnId)) {
|
|
2803
|
+
classes.push('last-visible-column');
|
|
2804
|
+
}
|
|
2805
|
+
return classes;
|
|
2806
|
+
}
|
|
2772
2807
|
}
|
|
2773
2808
|
TableComponent.decorators = [
|
|
2774
2809
|
{ type: Component, args: [{
|
|
2775
2810
|
selector: 'aup-table',
|
|
2776
|
-
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
|
|
2777
|
-
styles: [":host{
|
|
2811
|
+
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",
|
|
2812
|
+
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}"]
|
|
2778
2813
|
},] }
|
|
2779
2814
|
];
|
|
2780
2815
|
TableComponent.ctorParameters = () => [
|
|
@@ -2925,7 +2960,7 @@ TableHeaderCellRendererComponent.decorators = [
|
|
|
2925
2960
|
{ type: Component, args: [{
|
|
2926
2961
|
selector: 'aup-table-header-cell-renderer',
|
|
2927
2962
|
template: "<ng-container [cdkPortalOutlet]=\"getPortal()\" (attached)=\"initialiseHeader($event.instance)\"></ng-container>\n",
|
|
2928
|
-
styles: [":host{
|
|
2963
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%}"]
|
|
2929
2964
|
},] }
|
|
2930
2965
|
];
|
|
2931
2966
|
TableHeaderCellRendererComponent.ctorParameters = () => [];
|
|
@@ -3026,7 +3061,7 @@ TreeInheritanceIconComponent.decorators = [
|
|
|
3026
3061
|
{ type: Component, args: [{
|
|
3027
3062
|
selector: 'aup-tree-inheritance-icon',
|
|
3028
3063
|
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",
|
|
3029
|
-
styles: [":host{color:inherit
|
|
3064
|
+
styles: [":host{position:relative;color:inherit}svg{color:var(--line-color);display:block}"]
|
|
3030
3065
|
},] }
|
|
3031
3066
|
];
|
|
3032
3067
|
TreeInheritanceIconComponent.ctorParameters = () => [];
|
|
@@ -3095,26 +3130,26 @@ class DecoratedTreeNodeMixin {
|
|
|
3095
3130
|
this.node = node;
|
|
3096
3131
|
}
|
|
3097
3132
|
get decoratedSelf() {
|
|
3098
|
-
return this.memoize(
|
|
3133
|
+
return this.memoize('decoratedSelf', () => {
|
|
3099
3134
|
return this.parent ? this.parent.children.find(child => child.node === this.node) : DecoratedTreeNode.createRoot(this.node);
|
|
3100
3135
|
});
|
|
3101
3136
|
}
|
|
3102
3137
|
get children() {
|
|
3103
|
-
return this.memoize(
|
|
3138
|
+
return this.memoize('children', () => {
|
|
3104
3139
|
return this.node.children ? this.node.children.map(child => {
|
|
3105
3140
|
return Mixin.createProxy(child, new DecoratedTreeNodeMixin(this.decoratedSelf, child));
|
|
3106
3141
|
}) : [];
|
|
3107
3142
|
});
|
|
3108
3143
|
}
|
|
3109
3144
|
descendants() {
|
|
3110
|
-
return this.memoize(
|
|
3145
|
+
return this.memoize('descendants', () => {
|
|
3111
3146
|
const result = [];
|
|
3112
3147
|
this.visitDescendants(child => result.push(child));
|
|
3113
3148
|
return result;
|
|
3114
3149
|
});
|
|
3115
3150
|
}
|
|
3116
3151
|
selfAndDescendants() {
|
|
3117
|
-
return this.memoize(
|
|
3152
|
+
return this.memoize('selfAndDescendants', () => {
|
|
3118
3153
|
const result = [];
|
|
3119
3154
|
this.visitSelfAndDescendants(child => result.push(child));
|
|
3120
3155
|
return result;
|
|
@@ -3177,27 +3212,24 @@ class DecoratedTreeNodeMixin {
|
|
|
3177
3212
|
});
|
|
3178
3213
|
}
|
|
3179
3214
|
ancestorsAndSelf() {
|
|
3180
|
-
return this.memoize(
|
|
3215
|
+
return this.memoize('ancestorsAndSelf', () => {
|
|
3181
3216
|
return this.ancestors().concat([(this.decoratedSelf)]);
|
|
3182
3217
|
});
|
|
3183
3218
|
}
|
|
3184
3219
|
pathToParent(parent) {
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
});
|
|
3220
|
+
if (this.node === parent.node) {
|
|
3221
|
+
return [];
|
|
3222
|
+
}
|
|
3223
|
+
else if (this.parent) {
|
|
3224
|
+
const pathToParent = this.parent.pathToParent(parent);
|
|
3225
|
+
return pathToParent.concat([this.parent]);
|
|
3226
|
+
}
|
|
3227
|
+
else {
|
|
3228
|
+
throw new Error('parent is not an ancestor');
|
|
3229
|
+
}
|
|
3196
3230
|
}
|
|
3197
3231
|
pathToParentAndSelf(parent) {
|
|
3198
|
-
return this.
|
|
3199
|
-
return this.pathToParent(parent).concat([this.decoratedSelf]);
|
|
3200
|
-
});
|
|
3232
|
+
return this.pathToParent(parent).concat([this.decoratedSelf]);
|
|
3201
3233
|
}
|
|
3202
3234
|
isRoot() {
|
|
3203
3235
|
return !this.parent;
|
|
@@ -3209,18 +3241,18 @@ class DecoratedTreeNodeMixin {
|
|
|
3209
3241
|
return !this.isRoot() && this.node.children.length < 1;
|
|
3210
3242
|
}
|
|
3211
3243
|
hasChildren() {
|
|
3212
|
-
return this.node.children.length > 0;
|
|
3244
|
+
return this.node.children && this.node.children.length > 0;
|
|
3213
3245
|
}
|
|
3214
3246
|
depthFromParent(parent) {
|
|
3215
3247
|
return this.pathToParent(parent).length;
|
|
3216
3248
|
}
|
|
3217
3249
|
treeDepth() {
|
|
3218
|
-
return this.memoize(
|
|
3250
|
+
return this.memoize('treeDepth', () => {
|
|
3219
3251
|
return 1 + this.descendants().map(child => child.depthFromParent(this)).reduce((prev, current) => Math.max(prev, current));
|
|
3220
3252
|
});
|
|
3221
3253
|
}
|
|
3222
3254
|
flatten() {
|
|
3223
|
-
return this.memoize(
|
|
3255
|
+
return this.memoize('flatten', () => {
|
|
3224
3256
|
return this.flattenInto([]);
|
|
3225
3257
|
});
|
|
3226
3258
|
}
|
|
@@ -3376,7 +3408,7 @@ TreeLabelCellRendererComponent.decorators = [
|
|
|
3376
3408
|
{ type: Component, args: [{
|
|
3377
3409
|
selector: 'aup-tree-label-cell-renderer',
|
|
3378
3410
|
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",
|
|
3379
|
-
styles: [":host{--line-color:#ddd;--node-color:#999;
|
|
3411
|
+
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}"]
|
|
3380
3412
|
},] }
|
|
3381
3413
|
];
|
|
3382
3414
|
TreeLabelCellRendererComponent.ctorParameters = () => [];
|
|
@@ -3554,25 +3586,42 @@ class FlattenStrategy extends SelfAndDescendantsVisitor {
|
|
|
3554
3586
|
class TreeTableComponent extends DisposableComponent {
|
|
3555
3587
|
constructor() {
|
|
3556
3588
|
super();
|
|
3589
|
+
/**
|
|
3590
|
+
* Set to true to enable scrolling. Once enabled the table will have 0 implicit height. You will either
|
|
3591
|
+
* need to set it explicitly e.g. height: 400px; or by using flex or grid layout to make it fill it's
|
|
3592
|
+
* containment area.
|
|
3593
|
+
*/
|
|
3594
|
+
this.enableScrolling = false;
|
|
3557
3595
|
}
|
|
3558
3596
|
}
|
|
3559
3597
|
TreeTableComponent.decorators = [
|
|
3560
3598
|
{ type: Component, args: [{
|
|
3561
3599
|
selector: "aup-tree-table",
|
|
3562
|
-
template: "<aup-table [tableModel]=\"treeTableModel\"></aup-table>\n",
|
|
3600
|
+
template: "<aup-table [tableModel]=\"treeTableModel\" [showHeaderModel]=\"showHeaderModel\" [enableScrolling]=\"enableScrolling\"></aup-table>\n",
|
|
3563
3601
|
encapsulation: ViewEncapsulation.None // allow us to target nested table styles
|
|
3564
3602
|
,
|
|
3565
|
-
styles: ["td.mat-cell{border-
|
|
3603
|
+
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}"]
|
|
3566
3604
|
},] }
|
|
3567
3605
|
];
|
|
3568
3606
|
TreeTableComponent.ctorParameters = () => [];
|
|
3569
3607
|
TreeTableComponent.propDecorators = {
|
|
3570
|
-
treeTableModel: [{ type: Input }]
|
|
3608
|
+
treeTableModel: [{ type: Input }],
|
|
3609
|
+
showHeaderModel: [{ type: Input }],
|
|
3610
|
+
showHeader: [{ type: Input }],
|
|
3611
|
+
enableScrolling: [{ type: Input }, { type: HostBinding, args: ['class.enable-scrolling',] }]
|
|
3571
3612
|
};
|
|
3572
3613
|
__decorate([
|
|
3573
3614
|
TrackExternal(),
|
|
3574
3615
|
__metadata("design:type", TreeTableModel)
|
|
3575
3616
|
], TreeTableComponent.prototype, "treeTableModel", void 0);
|
|
3617
|
+
__decorate([
|
|
3618
|
+
TrackExternal({ defaultValue: true }),
|
|
3619
|
+
__metadata("design:type", ValueModel)
|
|
3620
|
+
], TreeTableComponent.prototype, "showHeaderModel", void 0);
|
|
3621
|
+
__decorate([
|
|
3622
|
+
StoreInValueModel('showHeaderModel'),
|
|
3623
|
+
__metadata("design:type", Boolean)
|
|
3624
|
+
], TreeTableComponent.prototype, "showHeader", void 0);
|
|
3576
3625
|
|
|
3577
3626
|
class VerticalFocusContainerComponent extends FocusContainerComponent {
|
|
3578
3627
|
constructor(focusManager) {
|
|
@@ -3659,7 +3708,7 @@ PaginatorComponent.decorators = [
|
|
|
3659
3708
|
{ type: Component, args: [{
|
|
3660
3709
|
selector: 'aup-paginator',
|
|
3661
3710
|
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",
|
|
3662
|
-
styles: [":host{
|
|
3711
|
+
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}"]
|
|
3663
3712
|
},] }
|
|
3664
3713
|
];
|
|
3665
3714
|
PaginatorComponent.ctorParameters = () => [];
|
|
@@ -3723,12 +3772,9 @@ ComponentsModule.decorators = [
|
|
|
3723
3772
|
TreeTableComponent,
|
|
3724
3773
|
TreeInheritanceIconComponent,
|
|
3725
3774
|
TreeLabelCellRendererComponent,
|
|
3726
|
-
IconComponent,
|
|
3727
3775
|
BusyOverlayComponent,
|
|
3728
3776
|
EmptyStateComponent,
|
|
3729
3777
|
PaginatorComponent,
|
|
3730
|
-
IconComponent,
|
|
3731
|
-
IconComponent
|
|
3732
3778
|
],
|
|
3733
3779
|
imports: [
|
|
3734
3780
|
CommonModule,
|
|
@@ -3858,7 +3904,7 @@ ActivityActionsComponent.decorators = [
|
|
|
3858
3904
|
{ type: Component, args: [{
|
|
3859
3905
|
selector: 'aup-activity-actions',
|
|
3860
3906
|
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",
|
|
3861
|
-
styles: [":host{
|
|
3907
|
+
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}"]
|
|
3862
3908
|
},] }
|
|
3863
3909
|
];
|
|
3864
3910
|
ActivityActionsComponent.ctorParameters = () => [
|
|
@@ -3978,7 +4024,7 @@ AlertDialogComponent.decorators = [
|
|
|
3978
4024
|
{ type: Component, args: [{
|
|
3979
4025
|
selector: 'aup-alert-dialog',
|
|
3980
4026
|
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",
|
|
3981
|
-
styles: [":host{display:block}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{align-items:flex-end;justify-content:flex-end
|
|
4027
|
+
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}"]
|
|
3982
4028
|
},] }
|
|
3983
4029
|
];
|
|
3984
4030
|
AlertDialogComponent.ctorParameters = () => [
|
|
@@ -4023,7 +4069,7 @@ ConfirmThenDialogComponent.decorators = [
|
|
|
4023
4069
|
{ type: Component, args: [{
|
|
4024
4070
|
selector: 'aup-confirmation-dialog',
|
|
4025
4071
|
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",
|
|
4026
|
-
styles: [":host{display:block}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{align-items:flex-end;justify-content:flex-end
|
|
4072
|
+
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}"]
|
|
4027
4073
|
},] }
|
|
4028
4074
|
];
|
|
4029
4075
|
ConfirmThenDialogComponent.ctorParameters = () => [
|
|
@@ -4063,7 +4109,7 @@ ConfirmationDialogComponent.decorators = [
|
|
|
4063
4109
|
{ type: Component, args: [{
|
|
4064
4110
|
selector: 'aup-confirmation-dialog',
|
|
4065
4111
|
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",
|
|
4066
|
-
styles: [":host{display:block}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{align-items:flex-end;justify-content:flex-end
|
|
4112
|
+
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}"]
|
|
4067
4113
|
},] }
|
|
4068
4114
|
];
|
|
4069
4115
|
ConfirmationDialogComponent.ctorParameters = () => [
|
|
@@ -4742,7 +4788,7 @@ AddItemInteractionContextComponent.decorators = [
|
|
|
4742
4788
|
{ type: Component, args: [{
|
|
4743
4789
|
selector: 'aup-add-item-interaction-context',
|
|
4744
4790
|
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",
|
|
4745
|
-
styles: [":host{--def-link-
|
|
4791
|
+
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}"]
|
|
4746
4792
|
},] }
|
|
4747
4793
|
];
|
|
4748
4794
|
AddItemInteractionContextComponent.ctorParameters = () => [];
|
|
@@ -5050,6 +5096,15 @@ SelectInputActivity.decorators = [
|
|
|
5050
5096
|
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
5051
5097
|
* });
|
|
5052
5098
|
*
|
|
5099
|
+
* Template columns
|
|
5100
|
+
* @example
|
|
5101
|
+
* const model = TableModel.fromList(heroList, table => {
|
|
5102
|
+
* table.addSelectionColumn(selectionModel); // <- can be single or multiple selection model
|
|
5103
|
+
* table.addTemplateColumn("myTemplate");
|
|
5104
|
+
* });
|
|
5105
|
+
*
|
|
5106
|
+
* <div *aupColumnTemplate="let hero; columnId: 'myTemplate'">{{hero.age}}</div>
|
|
5107
|
+
*
|
|
5053
5108
|
* I18n
|
|
5054
5109
|
* @example
|
|
5055
5110
|
* [table.yml]
|
|
@@ -5381,6 +5436,7 @@ class PlaceComponent extends DisposableComponent {
|
|
|
5381
5436
|
this._active = new MutableValueModel(false);
|
|
5382
5437
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
5383
5438
|
when(this._active).becomesTruthy(() => this.onPlaceReady());
|
|
5439
|
+
this.childPlaces = this.placeDefinition.children.map(d => d.component);
|
|
5384
5440
|
}
|
|
5385
5441
|
// @Trace()
|
|
5386
5442
|
initialiseVisit(visit, notifyVisitChanged) {
|
|
@@ -5423,9 +5479,6 @@ class PlaceComponent extends DisposableComponent {
|
|
|
5423
5479
|
get placeDefinition() {
|
|
5424
5480
|
return PlaceComponent.getDefinition(this.constructor);
|
|
5425
5481
|
}
|
|
5426
|
-
get childPlaces() {
|
|
5427
|
-
return this.placeDefinition.children.map(d => d.component);
|
|
5428
|
-
}
|
|
5429
5482
|
get active() {
|
|
5430
5483
|
return this._active.readonly;
|
|
5431
5484
|
}
|
|
@@ -5487,6 +5540,7 @@ class PlaceComponentDeactivationHandler {
|
|
|
5487
5540
|
this.component = component;
|
|
5488
5541
|
this.navigationSession = navigationSession;
|
|
5489
5542
|
this.isPrimaryComponent = isPrimaryComponent;
|
|
5543
|
+
assert.notNil(component);
|
|
5490
5544
|
}
|
|
5491
5545
|
get routerInteractionAdapter() {
|
|
5492
5546
|
return this.navigationSession.interactionServiceAdapter;
|
|
@@ -6582,7 +6636,7 @@ class PlaceRouter extends GarbageCollector {
|
|
|
6582
6636
|
.pluck('name')
|
|
6583
6637
|
.otherwise(idleStateName);
|
|
6584
6638
|
DebugContext.tag(this._activeVisits, 'PlaceRouter.activeVisits');
|
|
6585
|
-
this.
|
|
6639
|
+
this.state = chain(this._activeVisits).reduce(visits => new PlaceRouter.State(visits));
|
|
6586
6640
|
// TODO: make setup the callbacks in during module initiation to make this testable.
|
|
6587
6641
|
angularRouter.events.subscribe(event => {
|
|
6588
6642
|
// Routing event sequence
|
|
@@ -6641,9 +6695,6 @@ class PlaceRouter extends GarbageCollector {
|
|
|
6641
6695
|
getAuthenticationFailureRedirect(activatedRoute, state) {
|
|
6642
6696
|
return this.redirections.onAuthenticationFailure(activatedRoute, state);
|
|
6643
6697
|
}
|
|
6644
|
-
getAuthorisationFailureRedirect(activatedRoute, state) {
|
|
6645
|
-
return this.redirections.onAuthorisationFailure(activatedRoute, state);
|
|
6646
|
-
}
|
|
6647
6698
|
get navigationSession() {
|
|
6648
6699
|
return this.navigationSessionModel.value;
|
|
6649
6700
|
}
|
|
@@ -6853,6 +6904,20 @@ PlaceRouter.ctorParameters = () => [
|
|
|
6853
6904
|
{ type: UrlService },
|
|
6854
6905
|
{ type: PlaceHistory }
|
|
6855
6906
|
];
|
|
6907
|
+
(function (PlaceRouter) {
|
|
6908
|
+
class State {
|
|
6909
|
+
constructor(activeVisits) {
|
|
6910
|
+
this.activeVisits = activeVisits;
|
|
6911
|
+
}
|
|
6912
|
+
isPlaceActive(placeDefinition) {
|
|
6913
|
+
return !!this.getVisitFor(placeDefinition);
|
|
6914
|
+
}
|
|
6915
|
+
getVisitFor(placeDefinition) {
|
|
6916
|
+
return this.activeVisits.find(v => v.placeDefinition === placeDefinition);
|
|
6917
|
+
}
|
|
6918
|
+
}
|
|
6919
|
+
PlaceRouter.State = State;
|
|
6920
|
+
})(PlaceRouter || (PlaceRouter = {}));
|
|
6856
6921
|
|
|
6857
6922
|
class Visit {
|
|
6858
6923
|
constructor(placeDefinition, visitParameters = {}) {
|
|
@@ -6920,6 +6985,19 @@ class Visit {
|
|
|
6920
6985
|
|
|
6921
6986
|
const AUP_PLACE_CONFIG = new InjectionToken('AUP_PLACE_CONFIG');
|
|
6922
6987
|
|
|
6988
|
+
class NotAuthorisedNoticeComponent {
|
|
6989
|
+
constructor() {
|
|
6990
|
+
}
|
|
6991
|
+
}
|
|
6992
|
+
NotAuthorisedNoticeComponent.decorators = [
|
|
6993
|
+
{ type: Component, args: [{
|
|
6994
|
+
selector: 'aup-not-authorised-notice',
|
|
6995
|
+
template: "<p>You are not authorised to access this page</p>\n",
|
|
6996
|
+
styles: [":host{display:flex;flex-direction:column;align-items:center;justify-content:center}"]
|
|
6997
|
+
},] }
|
|
6998
|
+
];
|
|
6999
|
+
NotAuthorisedNoticeComponent.ctorParameters = () => [];
|
|
7000
|
+
|
|
6923
7001
|
// Freezes the state of the components at the start of the animation.
|
|
6924
7002
|
const animationStartStyle = style({ position: 'absolute', top: '0', left: '0', bottom: '0', right: '0' });
|
|
6925
7003
|
const left = [
|
|
@@ -6964,12 +7042,14 @@ function leftRightPlaceAnimation(duration) {
|
|
|
6964
7042
|
}
|
|
6965
7043
|
const LEFT_RIGHT_PLACE_ANIMATION = leftRightPlaceAnimation('0.3s');
|
|
6966
7044
|
|
|
7045
|
+
const AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT = new InjectionToken('AUP_UNAUTHORISED_PLACE_COMPONENT');
|
|
6967
7046
|
class PlaceOutletComponent extends DisposableComponent {
|
|
6968
|
-
constructor(router, placeRouter, placeConfig, parentOutlet) {
|
|
7047
|
+
constructor(router, placeRouter, placeConfig, unauthorisedPlaceNotice, parentOutlet, cdr) {
|
|
6969
7048
|
super();
|
|
6970
7049
|
this.router = router;
|
|
6971
7050
|
this.placeRouter = placeRouter;
|
|
6972
7051
|
this.placeConfig = placeConfig;
|
|
7052
|
+
this.cdr = cdr;
|
|
6973
7053
|
this.placeChanged = new EventEmitter();
|
|
6974
7054
|
this.outletActivated = new MutableValueModel(false);
|
|
6975
7055
|
this._activatedRouteModel = new MutableValueModel();
|
|
@@ -7002,7 +7082,7 @@ class PlaceOutletComponent extends DisposableComponent {
|
|
|
7002
7082
|
this.animationEnabled = valueOf.all(this.animateModel, this.animationSupported).areTruthy();
|
|
7003
7083
|
// Extract our visit model from the place router.
|
|
7004
7084
|
this._activePlaceDefinition = chain(this._activePlaceModel).pluck('placeDefinition');
|
|
7005
|
-
this.routerVisitModel =
|
|
7085
|
+
this.routerVisitModel = chain(placeRouter.state).map(state => state.getVisitFor(this._activePlaceDefinition.value), { dependsOn: this._activePlaceDefinition });
|
|
7006
7086
|
this.navigationInProgress = chain(this.placeRouter.navigationInProgress);
|
|
7007
7087
|
when(this.navigationInProgress).becomesFalsey(() => {
|
|
7008
7088
|
this.checkStateAndInitialise();
|
|
@@ -7013,13 +7093,11 @@ class PlaceOutletComponent extends DisposableComponent {
|
|
|
7013
7093
|
chain(this._activePlaceModel)
|
|
7014
7094
|
.postponeWhile(this.navigationInProgress)
|
|
7015
7095
|
.subscribe(place => this.placeChanged.emit(place));
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
}
|
|
7022
|
-
});
|
|
7096
|
+
this.authorised = chain(placeRouter.accessGuard).map(guard => guard.isAuthorised(this._activePlaceDefinition.value), {
|
|
7097
|
+
dependsOn: this._activePlaceDefinition,
|
|
7098
|
+
postponeWhile: chain(this._activePlaceDefinition).isNil()
|
|
7099
|
+
}).otherwise(true); // if we don't have a place def yet we need to show the outlet so we get one injected.
|
|
7100
|
+
this.notAuthorisedNoticePortal = new ComponentPortal(unauthorisedPlaceNotice !== null && unauthorisedPlaceNotice !== void 0 ? unauthorisedPlaceNotice : NotAuthorisedNoticeComponent);
|
|
7023
7101
|
}
|
|
7024
7102
|
// @Trace()
|
|
7025
7103
|
ngOnInit() {
|
|
@@ -7031,6 +7109,9 @@ class PlaceOutletComponent extends DisposableComponent {
|
|
|
7031
7109
|
get animationDuration() {
|
|
7032
7110
|
return this.placeConfig && this.placeConfig.animationDuration ? this.placeConfig.animationDuration : '500ms';
|
|
7033
7111
|
}
|
|
7112
|
+
get isAuthorised() {
|
|
7113
|
+
return this.authorised.value;
|
|
7114
|
+
}
|
|
7034
7115
|
// @Trace()
|
|
7035
7116
|
navigate(visit) {
|
|
7036
7117
|
// const place = this.placesInAnimationOrder.query().findMatching(p => visit.placeDefinition.component === p);
|
|
@@ -7085,6 +7166,7 @@ class PlaceOutletComponent extends DisposableComponent {
|
|
|
7085
7166
|
lang.illegalState('wrong visit!!!');
|
|
7086
7167
|
}
|
|
7087
7168
|
this.initialisePlace(routerVisit, activePlace);
|
|
7169
|
+
this.cdr.detectChanges();
|
|
7088
7170
|
}
|
|
7089
7171
|
}
|
|
7090
7172
|
initialisePlace(routerVisit, activePlace) {
|
|
@@ -7135,16 +7217,18 @@ class PlaceOutletComponent extends DisposableComponent {
|
|
|
7135
7217
|
PlaceOutletComponent.decorators = [
|
|
7136
7218
|
{ type: Component, args: [{
|
|
7137
7219
|
selector: 'aup-place-outlet',
|
|
7138
|
-
template: "<ng-container *ngIf=\"animationEnabled.value\">\n <div class=\"router-outlet-container\"
|
|
7220
|
+
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",
|
|
7139
7221
|
animations: [LEFT_RIGHT_PLACE_ANIMATION],
|
|
7140
|
-
styles: [":host{display:flex;flex-direction:column;min-height:0}.router-outlet-container{display:
|
|
7222
|
+
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}"]
|
|
7141
7223
|
},] }
|
|
7142
7224
|
];
|
|
7143
7225
|
PlaceOutletComponent.ctorParameters = () => [
|
|
7144
7226
|
{ type: Router },
|
|
7145
7227
|
{ type: PlaceRouter },
|
|
7146
7228
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [AUP_PLACE_CONFIG,] }] },
|
|
7147
|
-
{ type:
|
|
7229
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT,] }] },
|
|
7230
|
+
{ type: PlaceOutletComponent, decorators: [{ type: SkipSelf }, { type: Optional }] },
|
|
7231
|
+
{ type: ChangeDetectorRef }
|
|
7148
7232
|
];
|
|
7149
7233
|
PlaceOutletComponent.propDecorators = {
|
|
7150
7234
|
animate: [{ type: Input }],
|
|
@@ -7152,7 +7236,8 @@ PlaceOutletComponent.propDecorators = {
|
|
|
7152
7236
|
customPlaceAnimationOrderModel: [{ type: Input, args: ['placeAnimationOrderModel',] }],
|
|
7153
7237
|
customPlaceAnimationOrder: [{ type: Input, args: ['placeAnimationOrder',] }],
|
|
7154
7238
|
placeChanged: [{ type: Output }],
|
|
7155
|
-
routerOut: [{ type: ViewChild, args: ['routeOutlet', { static: true },] }]
|
|
7239
|
+
routerOut: [{ type: ViewChild, args: ['routeOutlet', { static: true },] }],
|
|
7240
|
+
isAuthorised: [{ type: HostBinding, args: ["class.authorised",] }]
|
|
7156
7241
|
};
|
|
7157
7242
|
__decorate([
|
|
7158
7243
|
StoreInValueModel('animateModel'),
|
|
@@ -7176,13 +7261,15 @@ class AbstractPlaceNavigationComponent extends DisposableComponent {
|
|
|
7176
7261
|
super();
|
|
7177
7262
|
this.placeRouter = placeRouter;
|
|
7178
7263
|
this._activePlaceComponent = new DelegatingValueModel();
|
|
7264
|
+
this.trackByPlaceDef = (data) => data.place;
|
|
7179
7265
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
7180
7266
|
this.placeDefinitions = chain(this.placesModel)
|
|
7181
7267
|
.map(c => PlaceComponent.getDefinition(c))
|
|
7182
7268
|
.select(d => {
|
|
7183
7269
|
const guard = placeRouter.accessGuard.value;
|
|
7184
|
-
|
|
7185
|
-
|
|
7270
|
+
const state = placeRouter.state.value;
|
|
7271
|
+
return guard.isAuthorised(d) || state.isPlaceActive(d);
|
|
7272
|
+
}, { dependsOn: [placeRouter.accessGuard, placeRouter.state] });
|
|
7186
7273
|
this.commandFactory = Command.createFactory((placeDefinition) => {
|
|
7187
7274
|
this.placeOutlet.navigate(new Visit(placeDefinition));
|
|
7188
7275
|
});
|
|
@@ -7191,8 +7278,21 @@ class AbstractPlaceNavigationComponent extends DisposableComponent {
|
|
|
7191
7278
|
// values in the one change detection cycle. So instead we delay the update to a different
|
|
7192
7279
|
// tick.
|
|
7193
7280
|
setTimeout(() => this._activePlaceComponent.setDelegate(outlet ? outlet.activePlaceModel : null));
|
|
7194
|
-
});
|
|
7281
|
+
}, { initialValue: "triggerChange" });
|
|
7195
7282
|
this.activePlaceDefinition = chain(this._activePlaceComponent).pluck('placeDefinition');
|
|
7283
|
+
this.menuItems = chain(this.placeDefinitions).map(d => {
|
|
7284
|
+
return {
|
|
7285
|
+
place: d,
|
|
7286
|
+
active: this.activePlaceDefinition.value === d
|
|
7287
|
+
};
|
|
7288
|
+
}, {
|
|
7289
|
+
dependsOn: this.activePlaceDefinition
|
|
7290
|
+
});
|
|
7291
|
+
// const txo = new TransactionObserver({ verbose: true }).onEvent(e => console.log(e.name, e.payload));
|
|
7292
|
+
// txo.observe('this.placesModel', this.placesModel);
|
|
7293
|
+
// txo.observe('this.placeDefinitions', this.placeDefinitions);
|
|
7294
|
+
// txo.observe('this.activePlaceDefinition', this.activePlaceDefinition);
|
|
7295
|
+
// txo.observe('this.menuItems', this.menuItems);
|
|
7196
7296
|
}
|
|
7197
7297
|
getNavigationFace(placeDef) {
|
|
7198
7298
|
const navItem = placeDef.getPlaceData('nav');
|
|
@@ -7203,7 +7303,7 @@ class AbstractPlaceNavigationComponent extends DisposableComponent {
|
|
|
7203
7303
|
};
|
|
7204
7304
|
}
|
|
7205
7305
|
isActive(place) {
|
|
7206
|
-
return
|
|
7306
|
+
return;
|
|
7207
7307
|
}
|
|
7208
7308
|
ngOnInit() {
|
|
7209
7309
|
}
|
|
@@ -7253,8 +7353,8 @@ class ListPlaceNavComponent extends AbstractPlaceNavigationComponent {
|
|
|
7253
7353
|
ListPlaceNavComponent.decorators = [
|
|
7254
7354
|
{ type: Component, args: [{
|
|
7255
7355
|
selector: 'aup-list-place-nav',
|
|
7256
|
-
template: "<mat-nav-list fxFlex>\n <a mat-list-item *ngFor=\"let
|
|
7257
|
-
styles: [":host{
|
|
7356
|
+
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",
|
|
7357
|
+
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)}"]
|
|
7258
7358
|
},] }
|
|
7259
7359
|
];
|
|
7260
7360
|
ListPlaceNavComponent.ctorParameters = () => [
|
|
@@ -7321,8 +7421,8 @@ class SidePlaceNavigationComponent extends AbstractPlaceNavigationComponent {
|
|
|
7321
7421
|
SidePlaceNavigationComponent.decorators = [
|
|
7322
7422
|
{ type: Component, args: [{
|
|
7323
7423
|
selector: 'aup-side-place-navigation',
|
|
7324
|
-
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
|
|
7325
|
-
styles: [":host{
|
|
7424
|
+
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",
|
|
7425
|
+
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)}"]
|
|
7326
7426
|
},] }
|
|
7327
7427
|
];
|
|
7328
7428
|
SidePlaceNavigationComponent.ctorParameters = () => [
|
|
@@ -7341,7 +7441,7 @@ class TabbedPlaceNavigationComponent extends AbstractPlaceNavigationComponent {
|
|
|
7341
7441
|
TabbedPlaceNavigationComponent.decorators = [
|
|
7342
7442
|
{ type: Component, args: [{
|
|
7343
7443
|
selector: 'aup-tabbed-place-navigation',
|
|
7344
|
-
template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let
|
|
7444
|
+
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",
|
|
7345
7445
|
styles: [""]
|
|
7346
7446
|
},] }
|
|
7347
7447
|
];
|
|
@@ -7364,14 +7464,16 @@ PlaceModule.decorators = [
|
|
|
7364
7464
|
MatIconModule,
|
|
7365
7465
|
DirectivesModule,
|
|
7366
7466
|
FlexModule,
|
|
7367
|
-
ComponentsModule
|
|
7467
|
+
ComponentsModule,
|
|
7468
|
+
PortalModule
|
|
7368
7469
|
],
|
|
7369
7470
|
declarations: [
|
|
7370
7471
|
PlaceOutletComponent,
|
|
7371
7472
|
TabbedPlaceNavigationComponent,
|
|
7372
7473
|
ListPlaceNavComponent,
|
|
7373
7474
|
SidePlaceNavigationComponent,
|
|
7374
|
-
AbstractPlaceNavigationComponent
|
|
7475
|
+
AbstractPlaceNavigationComponent,
|
|
7476
|
+
NotAuthorisedNoticeComponent
|
|
7375
7477
|
],
|
|
7376
7478
|
entryComponents: [],
|
|
7377
7479
|
exports: [
|
|
@@ -7674,14 +7776,6 @@ class PlaceGuard {
|
|
|
7674
7776
|
}
|
|
7675
7777
|
return this.createUrlTree(redirectLocation);
|
|
7676
7778
|
}
|
|
7677
|
-
if (!(this.placeRouter.accessGuard.value ? this.placeRouter.accessGuard.value.isAuthorised(placeDefinition) : true)) {
|
|
7678
|
-
const redirectLocation = this.placeRouter.getAuthorisationFailureRedirect(activatedRoute, state);
|
|
7679
|
-
const nextPlaceDef = this.getPlaceDefinition(redirectLocation);
|
|
7680
|
-
if (!(this.placeRouter.accessGuard.value ? this.placeRouter.accessGuard.value.isAuthorised(nextPlaceDef) : true)) {
|
|
7681
|
-
lang.illegalState(`handleNotAuthorised hook returned place ${nextPlaceDef.component.name} that is not authorised for the current user.`);
|
|
7682
|
-
}
|
|
7683
|
-
return this.createUrlTree(redirectLocation);
|
|
7684
|
-
}
|
|
7685
7779
|
}
|
|
7686
7780
|
const result = yield this.cleanInteractionState(activatedRoute, state, () => __awaiter(this, void 0, void 0, function* () {
|
|
7687
7781
|
// Parse our route params.
|
|
@@ -7713,6 +7807,11 @@ class PlaceGuard {
|
|
|
7713
7807
|
// @Trace()
|
|
7714
7808
|
canDeactivate(component, currentRoute, currentState, nextState) {
|
|
7715
7809
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7810
|
+
if (!component) {
|
|
7811
|
+
// this happens when the place wasn't authorised and the associated
|
|
7812
|
+
// router outlet was removed from the dom.
|
|
7813
|
+
return true;
|
|
7814
|
+
}
|
|
7716
7815
|
const currentUrl = this.urlService.parseUrl(currentState.url);
|
|
7717
7816
|
const nextUrl = this.urlService.parseUrl(nextState.url);
|
|
7718
7817
|
const result = yield this.placeRouter.navigationSession.canDeactivatePlace(component, currentUrl, nextUrl);
|
|
@@ -7877,5 +7976,5 @@ function VisitParameterList(options) {
|
|
|
7877
7976
|
* Generated bundle index. Do not edit.
|
|
7878
7977
|
*/
|
|
7879
7978
|
|
|
7880
|
-
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnModel, ColumnTemplateDirective, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DecoratedTreeNode, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, FlattenStrategy, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, IconComponent, InPlaceInteractionContextComponent, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ListPropertyColumnModel, ModalInteractionContextFactory, MoreMenuComponent, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NumberInputComponent, POPUP_CONTAINER, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, PaginatorComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceAccessGuard, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupAwareComponent, PopupInteractionContextComponent, PopupMenuComponent, PopupMenuRendererComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SectionHeaderComponent, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputActivity, SelectInputComponent, SelectionColumnModel, SelfAndDescendantsVisitor, SeparatorComponent, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, ToolBarComponent, TrackBy, TreeExpansionModel, TreeInheritanceIconComponent, TreeLabelCellRendererComponent, TreeLabelColumnModel, TreeTableComponent, TreeTableModel, TreeToListModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, ɵ0 };
|
|
7979
|
+
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractTableModel, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityBodyComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, ActivityTitleComponent, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnModel, ColumnTemplateDirective, CommandComponent, CommandContainer, CommandDirective, CommandFace, CommandFaceComponent, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DecoratedTreeNode, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, FlattenStrategy, FlexComponent, FocusBinding, FocusBindingDirective, FocusBindingFactory, FocusContainerComponent, FocusableComponent, Formatter, HEADER_CELL_RENDERER_PORTAL, IconComponent, InPlaceInteractionContextComponent, InteractionContextTriggerFor, InteractionModule, InteractionService, InteractionServiceRoutingAdapter, LEFT_RIGHT_PLACE_ANIMATION, ListPlaceNavComponent, ListPropertyColumnModel, ModalInteractionContextFactory, MoreMenuComponent, MultipleSelectInputComponent, Navigating, NavigatingDuringInteraction, NavigationContext, NavigationSession, NoopAuthGuard, NoopComponent, NotAuthorisedNoticeComponent, NumberInputComponent, POPUP_CONTAINER, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, PaginatorComponent, ParameterDefinition, PasswordInputComponent, Place, PlaceAccessGuard, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupAwareComponent, PopupInteractionContextComponent, PopupMenuComponent, PopupMenuRendererComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SectionHeaderComponent, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputActivity, SelectInputComponent, SelectionColumnModel, SelfAndDescendantsVisitor, SeparatorComponent, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, ToolBarComponent, TrackBy, TreeExpansionModel, TreeInheritanceIconComponent, TreeLabelCellRendererComponent, TreeLabelColumnModel, TreeTableComponent, TreeTableModel, TreeToListModel, UrlService, UrlSnapshot, VerticalFocusContainerComponent, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, ɵ0 };
|
|
7881
7980
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|