@coolon/angular-ui-powerups 3.18.0 → 11.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/activities.scss +2 -1
- package/assets/styles.scss +1 -2
- 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 +207 -110
- 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/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 +18 -3
- 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 +187 -92
- 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/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/bootstrap-app/templates/styles/global-variables.scss.template +1 -0
- package/schematics/bootstrap-app/templates/styles.scss.template +10 -3
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/place-add/index.js +7 -10
- package/schematics/place-add/index.js.map +1 -1
- package/schematics/utils/build-context.d.ts +4 -5
- package/schematics/utils/template-utilities.js +1 -9
- package/schematics/utils/template-utilities.js.map +1 -1
- package/schematics/utils/workspace.d.ts +3 -4
- package/schematics/utils/workspace.js.map +1 -1
- package/CHANGELOG.md +0 -1369
- package/schematics/bootstrap-app/templates/styles/theme.scss.template +0 -37
|
@@ -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
|
];
|
|
@@ -866,7 +869,7 @@ ToolBarComponent.decorators = [
|
|
|
866
869
|
selector: 'aup-tool-bar',
|
|
867
870
|
template: '<div class="toolbar-content"><ng-content></ng-content></div>',
|
|
868
871
|
encapsulation: ViewEncapsulation.None,
|
|
869
|
-
styles: [":host{display:inline-block}.toolbar-content{
|
|
872
|
+
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
873
|
},] }
|
|
871
874
|
];
|
|
872
875
|
ToolBarComponent.ctorParameters = () => [];
|
|
@@ -1038,7 +1041,7 @@ EmptyStateComponent.decorators = [
|
|
|
1038
1041
|
<ng-content></ng-content>
|
|
1039
1042
|
</div>
|
|
1040
1043
|
`,
|
|
1041
|
-
styles: [":host{
|
|
1044
|
+
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
1045
|
},] }
|
|
1043
1046
|
];
|
|
1044
1047
|
EmptyStateComponent.ctorParameters = () => [];
|
|
@@ -1418,7 +1421,7 @@ CheckboxInputComponent.decorators = [
|
|
|
1418
1421
|
{ type: Component, args: [{
|
|
1419
1422
|
selector: 'aup-checkbox-input',
|
|
1420
1423
|
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
|
|
1424
|
+
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
1425
|
},] }
|
|
1423
1426
|
];
|
|
1424
1427
|
CheckboxInputComponent.ctorParameters = () => [];
|
|
@@ -1639,7 +1642,7 @@ IconComponent.decorators = [
|
|
|
1639
1642
|
{ type: Component, args: [{
|
|
1640
1643
|
selector: 'aup-icon',
|
|
1641
1644
|
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{
|
|
1645
|
+
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
1646
|
},] }
|
|
1644
1647
|
];
|
|
1645
1648
|
IconComponent.propDecorators = {
|
|
@@ -1675,7 +1678,7 @@ ScrollContainerComponent.decorators = [
|
|
|
1675
1678
|
{ type: Component, args: [{
|
|
1676
1679
|
selector: 'aup-scroll-container',
|
|
1677
1680
|
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
|
|
1681
|
+
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
1682
|
},] }
|
|
1680
1683
|
];
|
|
1681
1684
|
ScrollContainerComponent.ctorParameters = () => [];
|
|
@@ -1691,7 +1694,7 @@ SectionHeaderComponent.decorators = [
|
|
|
1691
1694
|
{ type: Component, args: [{
|
|
1692
1695
|
selector: 'aup-section-header',
|
|
1693
1696
|
template: "<ng-content></ng-content>\n",
|
|
1694
|
-
styles: [":host{--def-border-bottom-color:var(--border-bottom-color,rgba(0,0,0,0.07));
|
|
1697
|
+
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
1698
|
},] }
|
|
1696
1699
|
];
|
|
1697
1700
|
SectionHeaderComponent.ctorParameters = () => [];
|
|
@@ -1794,7 +1797,7 @@ SwitchCaseComponent.decorators = [
|
|
|
1794
1797
|
{ type: Component, args: [{
|
|
1795
1798
|
selector: 'aup-switch-case',
|
|
1796
1799
|
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{
|
|
1800
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch}mat-tab-group{flex:1}"]
|
|
1798
1801
|
},] }
|
|
1799
1802
|
];
|
|
1800
1803
|
SwitchCaseComponent.ctorParameters = () => [
|
|
@@ -2155,6 +2158,7 @@ class ColumnModel {
|
|
|
2155
2158
|
this._flex = false;
|
|
2156
2159
|
this._visibleModel = new DelegatingValueModel().withDefault(true);
|
|
2157
2160
|
this.installHeaderRenderer();
|
|
2161
|
+
this.dasherisedColumnId = Stringy.from(columnId).dasherize().toString();
|
|
2158
2162
|
}
|
|
2159
2163
|
installHeaderRenderer() {
|
|
2160
2164
|
this.cellHeaderRenderer(DefaultHeaderCellRendererComponent, (component, column) => {
|
|
@@ -2697,15 +2701,32 @@ AbstractTableModel = __decorate([
|
|
|
2697
2701
|
*
|
|
2698
2702
|
* Styling
|
|
2699
2703
|
* @example
|
|
2704
|
+
* // global settings
|
|
2705
|
+
* :root {
|
|
2706
|
+
* --aup-table-column-gap: 10px; // defaults to 24px
|
|
2707
|
+
* --aup-table-row-hover-background-color, rgba(0, 0, 0, 0.05)
|
|
2708
|
+
* --aup-table-row-selected-background-color: rebeccapurple; // defaults to transparent
|
|
2709
|
+
* --aup-table-first-column-padding-left: 18px // defaults to --column-gap
|
|
2710
|
+
* --aup-table-last-column-padding-right: 18px // defaults to --column-gap
|
|
2711
|
+
* }
|
|
2712
|
+
*
|
|
2713
|
+
* // per table settings.
|
|
2700
2714
|
* aup-table {
|
|
2701
2715
|
* --column-gap: 10px; // defaults to 24px
|
|
2702
2716
|
* --row-hover-background-color, rgba(0, 0, 0, 0.05)
|
|
2703
2717
|
* --row-selected-background-color: rebeccapurple; // defaults to transparent
|
|
2718
|
+
* --first-column-padding-left: 18px // defaults to --column-gap
|
|
2719
|
+
* --last-column-padding-right: 18px // defaults to --column-gap
|
|
2720
|
+
*
|
|
2721
|
+
* aup-table-header-cell-renderer,
|
|
2704
2722
|
* aup-table-cell-renderer {
|
|
2705
|
-
*
|
|
2723
|
+
* &.aup-col-my-dasherised-column-id {
|
|
2724
|
+
* // do stuff
|
|
2725
|
+
* }
|
|
2726
|
+
* &.first-visible-column {
|
|
2706
2727
|
* // do stuff
|
|
2707
2728
|
* }
|
|
2708
|
-
*
|
|
2729
|
+
* &.last-visible-column {
|
|
2709
2730
|
* // do stuff
|
|
2710
2731
|
* }
|
|
2711
2732
|
* }
|
|
@@ -2769,12 +2790,22 @@ class TableComponent extends ResizeAwareComponent {
|
|
|
2769
2790
|
var _a;
|
|
2770
2791
|
return ((_a = this.tableModel.lastVisibleColumn.query().value) === null || _a === void 0 ? void 0 : _a.columnId) === columnId;
|
|
2771
2792
|
}
|
|
2793
|
+
getColumnClasses(columnId) {
|
|
2794
|
+
const classes = [`aup-col-${this.columnsById.get(columnId).dasherisedColumnId}`];
|
|
2795
|
+
if (this.isFirstVisibleColumn(columnId)) {
|
|
2796
|
+
classes.push('first-visible-column');
|
|
2797
|
+
}
|
|
2798
|
+
if (this.isLastVisibleColumn(columnId)) {
|
|
2799
|
+
classes.push('last-visible-column');
|
|
2800
|
+
}
|
|
2801
|
+
return classes;
|
|
2802
|
+
}
|
|
2772
2803
|
}
|
|
2773
2804
|
TableComponent.decorators = [
|
|
2774
2805
|
{ type: Component, args: [{
|
|
2775
2806
|
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{
|
|
2807
|
+
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",
|
|
2808
|
+
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
2809
|
},] }
|
|
2779
2810
|
];
|
|
2780
2811
|
TableComponent.ctorParameters = () => [
|
|
@@ -2925,7 +2956,7 @@ TableHeaderCellRendererComponent.decorators = [
|
|
|
2925
2956
|
{ type: Component, args: [{
|
|
2926
2957
|
selector: 'aup-table-header-cell-renderer',
|
|
2927
2958
|
template: "<ng-container [cdkPortalOutlet]=\"getPortal()\" (attached)=\"initialiseHeader($event.instance)\"></ng-container>\n",
|
|
2928
|
-
styles: [":host{
|
|
2959
|
+
styles: [":host{display:flex;flex-direction:column;align-items:stretch;justify-content:center;height:100%}"]
|
|
2929
2960
|
},] }
|
|
2930
2961
|
];
|
|
2931
2962
|
TableHeaderCellRendererComponent.ctorParameters = () => [];
|
|
@@ -3026,7 +3057,7 @@ TreeInheritanceIconComponent.decorators = [
|
|
|
3026
3057
|
{ type: Component, args: [{
|
|
3027
3058
|
selector: 'aup-tree-inheritance-icon',
|
|
3028
3059
|
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
|
|
3060
|
+
styles: [":host{position:relative;color:inherit}svg{color:var(--line-color);display:block}"]
|
|
3030
3061
|
},] }
|
|
3031
3062
|
];
|
|
3032
3063
|
TreeInheritanceIconComponent.ctorParameters = () => [];
|
|
@@ -3095,26 +3126,26 @@ class DecoratedTreeNodeMixin {
|
|
|
3095
3126
|
this.node = node;
|
|
3096
3127
|
}
|
|
3097
3128
|
get decoratedSelf() {
|
|
3098
|
-
return this.memoize(
|
|
3129
|
+
return this.memoize('decoratedSelf', () => {
|
|
3099
3130
|
return this.parent ? this.parent.children.find(child => child.node === this.node) : DecoratedTreeNode.createRoot(this.node);
|
|
3100
3131
|
});
|
|
3101
3132
|
}
|
|
3102
3133
|
get children() {
|
|
3103
|
-
return this.memoize(
|
|
3134
|
+
return this.memoize('children', () => {
|
|
3104
3135
|
return this.node.children ? this.node.children.map(child => {
|
|
3105
3136
|
return Mixin.createProxy(child, new DecoratedTreeNodeMixin(this.decoratedSelf, child));
|
|
3106
3137
|
}) : [];
|
|
3107
3138
|
});
|
|
3108
3139
|
}
|
|
3109
3140
|
descendants() {
|
|
3110
|
-
return this.memoize(
|
|
3141
|
+
return this.memoize('descendants', () => {
|
|
3111
3142
|
const result = [];
|
|
3112
3143
|
this.visitDescendants(child => result.push(child));
|
|
3113
3144
|
return result;
|
|
3114
3145
|
});
|
|
3115
3146
|
}
|
|
3116
3147
|
selfAndDescendants() {
|
|
3117
|
-
return this.memoize(
|
|
3148
|
+
return this.memoize('selfAndDescendants', () => {
|
|
3118
3149
|
const result = [];
|
|
3119
3150
|
this.visitSelfAndDescendants(child => result.push(child));
|
|
3120
3151
|
return result;
|
|
@@ -3177,27 +3208,24 @@ class DecoratedTreeNodeMixin {
|
|
|
3177
3208
|
});
|
|
3178
3209
|
}
|
|
3179
3210
|
ancestorsAndSelf() {
|
|
3180
|
-
return this.memoize(
|
|
3211
|
+
return this.memoize('ancestorsAndSelf', () => {
|
|
3181
3212
|
return this.ancestors().concat([(this.decoratedSelf)]);
|
|
3182
3213
|
});
|
|
3183
3214
|
}
|
|
3184
3215
|
pathToParent(parent) {
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
});
|
|
3216
|
+
if (this.node === parent.node) {
|
|
3217
|
+
return [];
|
|
3218
|
+
}
|
|
3219
|
+
else if (this.parent) {
|
|
3220
|
+
const pathToParent = this.parent.pathToParent(parent);
|
|
3221
|
+
return pathToParent.concat([this.parent]);
|
|
3222
|
+
}
|
|
3223
|
+
else {
|
|
3224
|
+
throw new Error('parent is not an ancestor');
|
|
3225
|
+
}
|
|
3196
3226
|
}
|
|
3197
3227
|
pathToParentAndSelf(parent) {
|
|
3198
|
-
return this.
|
|
3199
|
-
return this.pathToParent(parent).concat([this.decoratedSelf]);
|
|
3200
|
-
});
|
|
3228
|
+
return this.pathToParent(parent).concat([this.decoratedSelf]);
|
|
3201
3229
|
}
|
|
3202
3230
|
isRoot() {
|
|
3203
3231
|
return !this.parent;
|
|
@@ -3209,18 +3237,18 @@ class DecoratedTreeNodeMixin {
|
|
|
3209
3237
|
return !this.isRoot() && this.node.children.length < 1;
|
|
3210
3238
|
}
|
|
3211
3239
|
hasChildren() {
|
|
3212
|
-
return this.node.children.length > 0;
|
|
3240
|
+
return this.node.children && this.node.children.length > 0;
|
|
3213
3241
|
}
|
|
3214
3242
|
depthFromParent(parent) {
|
|
3215
3243
|
return this.pathToParent(parent).length;
|
|
3216
3244
|
}
|
|
3217
3245
|
treeDepth() {
|
|
3218
|
-
return this.memoize(
|
|
3246
|
+
return this.memoize('treeDepth', () => {
|
|
3219
3247
|
return 1 + this.descendants().map(child => child.depthFromParent(this)).reduce((prev, current) => Math.max(prev, current));
|
|
3220
3248
|
});
|
|
3221
3249
|
}
|
|
3222
3250
|
flatten() {
|
|
3223
|
-
return this.memoize(
|
|
3251
|
+
return this.memoize('flatten', () => {
|
|
3224
3252
|
return this.flattenInto([]);
|
|
3225
3253
|
});
|
|
3226
3254
|
}
|
|
@@ -3376,7 +3404,7 @@ TreeLabelCellRendererComponent.decorators = [
|
|
|
3376
3404
|
{ type: Component, args: [{
|
|
3377
3405
|
selector: 'aup-tree-label-cell-renderer',
|
|
3378
3406
|
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;
|
|
3407
|
+
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
3408
|
},] }
|
|
3381
3409
|
];
|
|
3382
3410
|
TreeLabelCellRendererComponent.ctorParameters = () => [];
|
|
@@ -3554,25 +3582,42 @@ class FlattenStrategy extends SelfAndDescendantsVisitor {
|
|
|
3554
3582
|
class TreeTableComponent extends DisposableComponent {
|
|
3555
3583
|
constructor() {
|
|
3556
3584
|
super();
|
|
3585
|
+
/**
|
|
3586
|
+
* Set to true to enable scrolling. Once enabled the table will have 0 implicit height. You will either
|
|
3587
|
+
* need to set it explicitly e.g. height: 400px; or by using flex or grid layout to make it fill it's
|
|
3588
|
+
* containment area.
|
|
3589
|
+
*/
|
|
3590
|
+
this.enableScrolling = false;
|
|
3557
3591
|
}
|
|
3558
3592
|
}
|
|
3559
3593
|
TreeTableComponent.decorators = [
|
|
3560
3594
|
{ type: Component, args: [{
|
|
3561
3595
|
selector: "aup-tree-table",
|
|
3562
|
-
template: "<aup-table [tableModel]=\"treeTableModel\"></aup-table>\n",
|
|
3596
|
+
template: "<aup-table [tableModel]=\"treeTableModel\" [showHeaderModel]=\"showHeaderModel\" [enableScrolling]=\"enableScrolling\"></aup-table>\n",
|
|
3563
3597
|
encapsulation: ViewEncapsulation.None // allow us to target nested table styles
|
|
3564
3598
|
,
|
|
3565
|
-
styles: ["td.mat-cell{border-
|
|
3599
|
+
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
3600
|
},] }
|
|
3567
3601
|
];
|
|
3568
3602
|
TreeTableComponent.ctorParameters = () => [];
|
|
3569
3603
|
TreeTableComponent.propDecorators = {
|
|
3570
|
-
treeTableModel: [{ type: Input }]
|
|
3604
|
+
treeTableModel: [{ type: Input }],
|
|
3605
|
+
showHeaderModel: [{ type: Input }],
|
|
3606
|
+
showHeader: [{ type: Input }],
|
|
3607
|
+
enableScrolling: [{ type: Input }, { type: HostBinding, args: ['class.enable-scrolling',] }]
|
|
3571
3608
|
};
|
|
3572
3609
|
__decorate([
|
|
3573
3610
|
TrackExternal(),
|
|
3574
3611
|
__metadata("design:type", TreeTableModel)
|
|
3575
3612
|
], TreeTableComponent.prototype, "treeTableModel", void 0);
|
|
3613
|
+
__decorate([
|
|
3614
|
+
TrackExternal({ defaultValue: true }),
|
|
3615
|
+
__metadata("design:type", ValueModel)
|
|
3616
|
+
], TreeTableComponent.prototype, "showHeaderModel", void 0);
|
|
3617
|
+
__decorate([
|
|
3618
|
+
StoreInValueModel('showHeaderModel'),
|
|
3619
|
+
__metadata("design:type", Boolean)
|
|
3620
|
+
], TreeTableComponent.prototype, "showHeader", void 0);
|
|
3576
3621
|
|
|
3577
3622
|
class VerticalFocusContainerComponent extends FocusContainerComponent {
|
|
3578
3623
|
constructor(focusManager) {
|
|
@@ -3659,7 +3704,7 @@ PaginatorComponent.decorators = [
|
|
|
3659
3704
|
{ type: Component, args: [{
|
|
3660
3705
|
selector: 'aup-paginator',
|
|
3661
3706
|
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{
|
|
3707
|
+
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
3708
|
},] }
|
|
3664
3709
|
];
|
|
3665
3710
|
PaginatorComponent.ctorParameters = () => [];
|
|
@@ -3723,12 +3768,9 @@ ComponentsModule.decorators = [
|
|
|
3723
3768
|
TreeTableComponent,
|
|
3724
3769
|
TreeInheritanceIconComponent,
|
|
3725
3770
|
TreeLabelCellRendererComponent,
|
|
3726
|
-
IconComponent,
|
|
3727
3771
|
BusyOverlayComponent,
|
|
3728
3772
|
EmptyStateComponent,
|
|
3729
3773
|
PaginatorComponent,
|
|
3730
|
-
IconComponent,
|
|
3731
|
-
IconComponent
|
|
3732
3774
|
],
|
|
3733
3775
|
imports: [
|
|
3734
3776
|
CommonModule,
|
|
@@ -3858,7 +3900,7 @@ ActivityActionsComponent.decorators = [
|
|
|
3858
3900
|
{ type: Component, args: [{
|
|
3859
3901
|
selector: 'aup-activity-actions',
|
|
3860
3902
|
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{
|
|
3903
|
+
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
3904
|
},] }
|
|
3863
3905
|
];
|
|
3864
3906
|
ActivityActionsComponent.ctorParameters = () => [
|
|
@@ -3978,7 +4020,7 @@ AlertDialogComponent.decorators = [
|
|
|
3978
4020
|
{ type: Component, args: [{
|
|
3979
4021
|
selector: 'aup-alert-dialog',
|
|
3980
4022
|
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
|
|
4023
|
+
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
4024
|
},] }
|
|
3983
4025
|
];
|
|
3984
4026
|
AlertDialogComponent.ctorParameters = () => [
|
|
@@ -4023,7 +4065,7 @@ ConfirmThenDialogComponent.decorators = [
|
|
|
4023
4065
|
{ type: Component, args: [{
|
|
4024
4066
|
selector: 'aup-confirmation-dialog',
|
|
4025
4067
|
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
|
|
4068
|
+
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
4069
|
},] }
|
|
4028
4070
|
];
|
|
4029
4071
|
ConfirmThenDialogComponent.ctorParameters = () => [
|
|
@@ -4063,7 +4105,7 @@ ConfirmationDialogComponent.decorators = [
|
|
|
4063
4105
|
{ type: Component, args: [{
|
|
4064
4106
|
selector: 'aup-confirmation-dialog',
|
|
4065
4107
|
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
|
|
4108
|
+
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
4109
|
},] }
|
|
4068
4110
|
];
|
|
4069
4111
|
ConfirmationDialogComponent.ctorParameters = () => [
|
|
@@ -4742,7 +4784,7 @@ AddItemInteractionContextComponent.decorators = [
|
|
|
4742
4784
|
{ type: Component, args: [{
|
|
4743
4785
|
selector: 'aup-add-item-interaction-context',
|
|
4744
4786
|
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-
|
|
4787
|
+
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
4788
|
},] }
|
|
4747
4789
|
];
|
|
4748
4790
|
AddItemInteractionContextComponent.ctorParameters = () => [];
|
|
@@ -5050,6 +5092,15 @@ SelectInputActivity.decorators = [
|
|
|
5050
5092
|
* table.addCustomColumn("fullName", hero => `${hero.firstName} ${hero.lastName}`);
|
|
5051
5093
|
* });
|
|
5052
5094
|
*
|
|
5095
|
+
* Template columns
|
|
5096
|
+
* @example
|
|
5097
|
+
* const model = TableModel.fromList(heroList, table => {
|
|
5098
|
+
* table.addSelectionColumn(selectionModel); // <- can be single or multiple selection model
|
|
5099
|
+
* table.addTemplateColumn("myTemplate");
|
|
5100
|
+
* });
|
|
5101
|
+
*
|
|
5102
|
+
* <div *aupColumnTemplate="let hero; columnId: 'myTemplate'">{{hero.age}}</div>
|
|
5103
|
+
*
|
|
5053
5104
|
* I18n
|
|
5054
5105
|
* @example
|
|
5055
5106
|
* [table.yml]
|
|
@@ -5381,6 +5432,7 @@ class PlaceComponent extends DisposableComponent {
|
|
|
5381
5432
|
this._active = new MutableValueModel(false);
|
|
5382
5433
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
5383
5434
|
when(this._active).becomesTruthy(() => this.onPlaceReady());
|
|
5435
|
+
this.childPlaces = this.placeDefinition.children.map(d => d.component);
|
|
5384
5436
|
}
|
|
5385
5437
|
// @Trace()
|
|
5386
5438
|
initialiseVisit(visit, notifyVisitChanged) {
|
|
@@ -5423,9 +5475,6 @@ class PlaceComponent extends DisposableComponent {
|
|
|
5423
5475
|
get placeDefinition() {
|
|
5424
5476
|
return PlaceComponent.getDefinition(this.constructor);
|
|
5425
5477
|
}
|
|
5426
|
-
get childPlaces() {
|
|
5427
|
-
return this.placeDefinition.children.map(d => d.component);
|
|
5428
|
-
}
|
|
5429
5478
|
get active() {
|
|
5430
5479
|
return this._active.readonly;
|
|
5431
5480
|
}
|
|
@@ -5487,6 +5536,7 @@ class PlaceComponentDeactivationHandler {
|
|
|
5487
5536
|
this.component = component;
|
|
5488
5537
|
this.navigationSession = navigationSession;
|
|
5489
5538
|
this.isPrimaryComponent = isPrimaryComponent;
|
|
5539
|
+
assert.notNil(component);
|
|
5490
5540
|
}
|
|
5491
5541
|
get routerInteractionAdapter() {
|
|
5492
5542
|
return this.navigationSession.interactionServiceAdapter;
|
|
@@ -6582,7 +6632,7 @@ class PlaceRouter extends GarbageCollector {
|
|
|
6582
6632
|
.pluck('name')
|
|
6583
6633
|
.otherwise(idleStateName);
|
|
6584
6634
|
DebugContext.tag(this._activeVisits, 'PlaceRouter.activeVisits');
|
|
6585
|
-
this.
|
|
6635
|
+
this.state = chain(this._activeVisits).reduce(visits => new PlaceRouter.State(visits));
|
|
6586
6636
|
// TODO: make setup the callbacks in during module initiation to make this testable.
|
|
6587
6637
|
angularRouter.events.subscribe(event => {
|
|
6588
6638
|
// Routing event sequence
|
|
@@ -6641,9 +6691,6 @@ class PlaceRouter extends GarbageCollector {
|
|
|
6641
6691
|
getAuthenticationFailureRedirect(activatedRoute, state) {
|
|
6642
6692
|
return this.redirections.onAuthenticationFailure(activatedRoute, state);
|
|
6643
6693
|
}
|
|
6644
|
-
getAuthorisationFailureRedirect(activatedRoute, state) {
|
|
6645
|
-
return this.redirections.onAuthorisationFailure(activatedRoute, state);
|
|
6646
|
-
}
|
|
6647
6694
|
get navigationSession() {
|
|
6648
6695
|
return this.navigationSessionModel.value;
|
|
6649
6696
|
}
|
|
@@ -6853,6 +6900,20 @@ PlaceRouter.ctorParameters = () => [
|
|
|
6853
6900
|
{ type: UrlService },
|
|
6854
6901
|
{ type: PlaceHistory }
|
|
6855
6902
|
];
|
|
6903
|
+
(function (PlaceRouter) {
|
|
6904
|
+
class State {
|
|
6905
|
+
constructor(activeVisits) {
|
|
6906
|
+
this.activeVisits = activeVisits;
|
|
6907
|
+
}
|
|
6908
|
+
isPlaceActive(placeDefinition) {
|
|
6909
|
+
return !!this.getVisitFor(placeDefinition);
|
|
6910
|
+
}
|
|
6911
|
+
getVisitFor(placeDefinition) {
|
|
6912
|
+
return this.activeVisits.find(v => v.placeDefinition === placeDefinition);
|
|
6913
|
+
}
|
|
6914
|
+
}
|
|
6915
|
+
PlaceRouter.State = State;
|
|
6916
|
+
})(PlaceRouter || (PlaceRouter = {}));
|
|
6856
6917
|
|
|
6857
6918
|
class Visit {
|
|
6858
6919
|
constructor(placeDefinition, visitParameters = {}) {
|
|
@@ -6920,6 +6981,19 @@ class Visit {
|
|
|
6920
6981
|
|
|
6921
6982
|
const AUP_PLACE_CONFIG = new InjectionToken('AUP_PLACE_CONFIG');
|
|
6922
6983
|
|
|
6984
|
+
class NotAuthorisedNoticeComponent {
|
|
6985
|
+
constructor() {
|
|
6986
|
+
}
|
|
6987
|
+
}
|
|
6988
|
+
NotAuthorisedNoticeComponent.decorators = [
|
|
6989
|
+
{ type: Component, args: [{
|
|
6990
|
+
selector: 'aup-not-authorised-notice',
|
|
6991
|
+
template: "<p>You are not authorised to access this page</p>\n",
|
|
6992
|
+
styles: [":host{display:flex;flex-direction:column;align-items:center;justify-content:center}"]
|
|
6993
|
+
},] }
|
|
6994
|
+
];
|
|
6995
|
+
NotAuthorisedNoticeComponent.ctorParameters = () => [];
|
|
6996
|
+
|
|
6923
6997
|
// Freezes the state of the components at the start of the animation.
|
|
6924
6998
|
const animationStartStyle = style({ position: 'absolute', top: '0', left: '0', bottom: '0', right: '0' });
|
|
6925
6999
|
const left = [
|
|
@@ -6964,12 +7038,14 @@ function leftRightPlaceAnimation(duration) {
|
|
|
6964
7038
|
}
|
|
6965
7039
|
const LEFT_RIGHT_PLACE_ANIMATION = leftRightPlaceAnimation('0.3s');
|
|
6966
7040
|
|
|
7041
|
+
const AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT = new InjectionToken('AUP_UNAUTHORISED_PLACE_COMPONENT');
|
|
6967
7042
|
class PlaceOutletComponent extends DisposableComponent {
|
|
6968
|
-
constructor(router, placeRouter, placeConfig, parentOutlet) {
|
|
7043
|
+
constructor(router, placeRouter, placeConfig, unauthorisedPlaceNotice, parentOutlet, cdr) {
|
|
6969
7044
|
super();
|
|
6970
7045
|
this.router = router;
|
|
6971
7046
|
this.placeRouter = placeRouter;
|
|
6972
7047
|
this.placeConfig = placeConfig;
|
|
7048
|
+
this.cdr = cdr;
|
|
6973
7049
|
this.placeChanged = new EventEmitter();
|
|
6974
7050
|
this.outletActivated = new MutableValueModel(false);
|
|
6975
7051
|
this._activatedRouteModel = new MutableValueModel();
|
|
@@ -7002,7 +7078,7 @@ class PlaceOutletComponent extends DisposableComponent {
|
|
|
7002
7078
|
this.animationEnabled = valueOf.all(this.animateModel, this.animationSupported).areTruthy();
|
|
7003
7079
|
// Extract our visit model from the place router.
|
|
7004
7080
|
this._activePlaceDefinition = chain(this._activePlaceModel).pluck('placeDefinition');
|
|
7005
|
-
this.routerVisitModel =
|
|
7081
|
+
this.routerVisitModel = chain(placeRouter.state).map(state => state.getVisitFor(this._activePlaceDefinition.value), { dependsOn: this._activePlaceDefinition });
|
|
7006
7082
|
this.navigationInProgress = chain(this.placeRouter.navigationInProgress);
|
|
7007
7083
|
when(this.navigationInProgress).becomesFalsey(() => {
|
|
7008
7084
|
this.checkStateAndInitialise();
|
|
@@ -7013,13 +7089,11 @@ class PlaceOutletComponent extends DisposableComponent {
|
|
|
7013
7089
|
chain(this._activePlaceModel)
|
|
7014
7090
|
.postponeWhile(this.navigationInProgress)
|
|
7015
7091
|
.subscribe(place => this.placeChanged.emit(place));
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
}
|
|
7022
|
-
});
|
|
7092
|
+
this.authorised = chain(placeRouter.accessGuard).map(guard => guard.isAuthorised(this._activePlaceDefinition.value), {
|
|
7093
|
+
dependsOn: this._activePlaceDefinition,
|
|
7094
|
+
postponeWhile: chain(this._activePlaceDefinition).isNil()
|
|
7095
|
+
}).otherwise(true); // if we don't have a place def yet we need to show the outlet so we get one injected.
|
|
7096
|
+
this.notAuthorisedNoticePortal = new ComponentPortal(unauthorisedPlaceNotice !== null && unauthorisedPlaceNotice !== void 0 ? unauthorisedPlaceNotice : NotAuthorisedNoticeComponent);
|
|
7023
7097
|
}
|
|
7024
7098
|
// @Trace()
|
|
7025
7099
|
ngOnInit() {
|
|
@@ -7031,6 +7105,9 @@ class PlaceOutletComponent extends DisposableComponent {
|
|
|
7031
7105
|
get animationDuration() {
|
|
7032
7106
|
return this.placeConfig && this.placeConfig.animationDuration ? this.placeConfig.animationDuration : '500ms';
|
|
7033
7107
|
}
|
|
7108
|
+
get isAuthorised() {
|
|
7109
|
+
return this.authorised.value;
|
|
7110
|
+
}
|
|
7034
7111
|
// @Trace()
|
|
7035
7112
|
navigate(visit) {
|
|
7036
7113
|
// const place = this.placesInAnimationOrder.query().findMatching(p => visit.placeDefinition.component === p);
|
|
@@ -7085,6 +7162,7 @@ class PlaceOutletComponent extends DisposableComponent {
|
|
|
7085
7162
|
lang.illegalState('wrong visit!!!');
|
|
7086
7163
|
}
|
|
7087
7164
|
this.initialisePlace(routerVisit, activePlace);
|
|
7165
|
+
this.cdr.detectChanges();
|
|
7088
7166
|
}
|
|
7089
7167
|
}
|
|
7090
7168
|
initialisePlace(routerVisit, activePlace) {
|
|
@@ -7135,16 +7213,18 @@ class PlaceOutletComponent extends DisposableComponent {
|
|
|
7135
7213
|
PlaceOutletComponent.decorators = [
|
|
7136
7214
|
{ type: Component, args: [{
|
|
7137
7215
|
selector: 'aup-place-outlet',
|
|
7138
|
-
template: "<ng-container *ngIf=\"animationEnabled.value\">\n <div class=\"router-outlet-container\"
|
|
7216
|
+
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
7217
|
animations: [LEFT_RIGHT_PLACE_ANIMATION],
|
|
7140
|
-
styles: [":host{display:flex;flex-direction:column;min-height:0}.router-outlet-container{display:
|
|
7218
|
+
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
7219
|
},] }
|
|
7142
7220
|
];
|
|
7143
7221
|
PlaceOutletComponent.ctorParameters = () => [
|
|
7144
7222
|
{ type: Router },
|
|
7145
7223
|
{ type: PlaceRouter },
|
|
7146
7224
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [AUP_PLACE_CONFIG,] }] },
|
|
7147
|
-
{ type:
|
|
7225
|
+
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [AUP_UNAUTHORISED_PLACE_NOTICE_COMPONENT,] }] },
|
|
7226
|
+
{ type: PlaceOutletComponent, decorators: [{ type: SkipSelf }, { type: Optional }] },
|
|
7227
|
+
{ type: ChangeDetectorRef }
|
|
7148
7228
|
];
|
|
7149
7229
|
PlaceOutletComponent.propDecorators = {
|
|
7150
7230
|
animate: [{ type: Input }],
|
|
@@ -7152,7 +7232,8 @@ PlaceOutletComponent.propDecorators = {
|
|
|
7152
7232
|
customPlaceAnimationOrderModel: [{ type: Input, args: ['placeAnimationOrderModel',] }],
|
|
7153
7233
|
customPlaceAnimationOrder: [{ type: Input, args: ['placeAnimationOrder',] }],
|
|
7154
7234
|
placeChanged: [{ type: Output }],
|
|
7155
|
-
routerOut: [{ type: ViewChild, args: ['routeOutlet', { static: true },] }]
|
|
7235
|
+
routerOut: [{ type: ViewChild, args: ['routeOutlet', { static: true },] }],
|
|
7236
|
+
isAuthorised: [{ type: HostBinding, args: ["class.authorised",] }]
|
|
7156
7237
|
};
|
|
7157
7238
|
__decorate([
|
|
7158
7239
|
StoreInValueModel('animateModel'),
|
|
@@ -7176,13 +7257,15 @@ class AbstractPlaceNavigationComponent extends DisposableComponent {
|
|
|
7176
7257
|
super();
|
|
7177
7258
|
this.placeRouter = placeRouter;
|
|
7178
7259
|
this._activePlaceComponent = new DelegatingValueModel();
|
|
7260
|
+
this.trackByPlaceDef = (data) => data.place;
|
|
7179
7261
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
7180
7262
|
this.placeDefinitions = chain(this.placesModel)
|
|
7181
7263
|
.map(c => PlaceComponent.getDefinition(c))
|
|
7182
7264
|
.select(d => {
|
|
7183
7265
|
const guard = placeRouter.accessGuard.value;
|
|
7184
|
-
|
|
7185
|
-
|
|
7266
|
+
const state = placeRouter.state.value;
|
|
7267
|
+
return guard.isAuthorised(d) || state.isPlaceActive(d);
|
|
7268
|
+
}, { dependsOn: [placeRouter.accessGuard, placeRouter.state] });
|
|
7186
7269
|
this.commandFactory = Command.createFactory((placeDefinition) => {
|
|
7187
7270
|
this.placeOutlet.navigate(new Visit(placeDefinition));
|
|
7188
7271
|
});
|
|
@@ -7193,6 +7276,19 @@ class AbstractPlaceNavigationComponent extends DisposableComponent {
|
|
|
7193
7276
|
setTimeout(() => this._activePlaceComponent.setDelegate(outlet ? outlet.activePlaceModel : null));
|
|
7194
7277
|
});
|
|
7195
7278
|
this.activePlaceDefinition = chain(this._activePlaceComponent).pluck('placeDefinition');
|
|
7279
|
+
this.menuItems = chain(this.placeDefinitions).map(d => {
|
|
7280
|
+
return {
|
|
7281
|
+
place: d,
|
|
7282
|
+
active: this.activePlaceDefinition.value === d
|
|
7283
|
+
};
|
|
7284
|
+
}, {
|
|
7285
|
+
dependsOn: this.activePlaceDefinition
|
|
7286
|
+
});
|
|
7287
|
+
// const txo = new TransactionObserver({ verbose: true }).onEvent(e => console.log(e.name, e.payload));
|
|
7288
|
+
// txo.observe('this.placesModel', this.placesModel);
|
|
7289
|
+
// txo.observe('this.placeDefinitions', this.placeDefinitions);
|
|
7290
|
+
// txo.observe('this.activePlaceDefinition', this.activePlaceDefinition);
|
|
7291
|
+
// txo.observe('this.menuItems', this.menuItems);
|
|
7196
7292
|
}
|
|
7197
7293
|
getNavigationFace(placeDef) {
|
|
7198
7294
|
const navItem = placeDef.getPlaceData('nav');
|
|
@@ -7203,7 +7299,7 @@ class AbstractPlaceNavigationComponent extends DisposableComponent {
|
|
|
7203
7299
|
};
|
|
7204
7300
|
}
|
|
7205
7301
|
isActive(place) {
|
|
7206
|
-
return
|
|
7302
|
+
return;
|
|
7207
7303
|
}
|
|
7208
7304
|
ngOnInit() {
|
|
7209
7305
|
}
|
|
@@ -7253,8 +7349,8 @@ class ListPlaceNavComponent extends AbstractPlaceNavigationComponent {
|
|
|
7253
7349
|
ListPlaceNavComponent.decorators = [
|
|
7254
7350
|
{ type: Component, args: [{
|
|
7255
7351
|
selector: 'aup-list-place-nav',
|
|
7256
|
-
template: "<mat-nav-list fxFlex>\n <a mat-list-item *ngFor=\"let
|
|
7257
|
-
styles: [":host{
|
|
7352
|
+
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",
|
|
7353
|
+
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
7354
|
},] }
|
|
7259
7355
|
];
|
|
7260
7356
|
ListPlaceNavComponent.ctorParameters = () => [
|
|
@@ -7321,8 +7417,8 @@ class SidePlaceNavigationComponent extends AbstractPlaceNavigationComponent {
|
|
|
7321
7417
|
SidePlaceNavigationComponent.decorators = [
|
|
7322
7418
|
{ type: Component, args: [{
|
|
7323
7419
|
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{
|
|
7420
|
+
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",
|
|
7421
|
+
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
7422
|
},] }
|
|
7327
7423
|
];
|
|
7328
7424
|
SidePlaceNavigationComponent.ctorParameters = () => [
|
|
@@ -7341,7 +7437,7 @@ class TabbedPlaceNavigationComponent extends AbstractPlaceNavigationComponent {
|
|
|
7341
7437
|
TabbedPlaceNavigationComponent.decorators = [
|
|
7342
7438
|
{ type: Component, args: [{
|
|
7343
7439
|
selector: 'aup-tabbed-place-navigation',
|
|
7344
|
-
template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let
|
|
7440
|
+
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
7441
|
styles: [""]
|
|
7346
7442
|
},] }
|
|
7347
7443
|
];
|
|
@@ -7364,14 +7460,16 @@ PlaceModule.decorators = [
|
|
|
7364
7460
|
MatIconModule,
|
|
7365
7461
|
DirectivesModule,
|
|
7366
7462
|
FlexModule,
|
|
7367
|
-
ComponentsModule
|
|
7463
|
+
ComponentsModule,
|
|
7464
|
+
PortalModule
|
|
7368
7465
|
],
|
|
7369
7466
|
declarations: [
|
|
7370
7467
|
PlaceOutletComponent,
|
|
7371
7468
|
TabbedPlaceNavigationComponent,
|
|
7372
7469
|
ListPlaceNavComponent,
|
|
7373
7470
|
SidePlaceNavigationComponent,
|
|
7374
|
-
AbstractPlaceNavigationComponent
|
|
7471
|
+
AbstractPlaceNavigationComponent,
|
|
7472
|
+
NotAuthorisedNoticeComponent
|
|
7375
7473
|
],
|
|
7376
7474
|
entryComponents: [],
|
|
7377
7475
|
exports: [
|
|
@@ -7674,14 +7772,6 @@ class PlaceGuard {
|
|
|
7674
7772
|
}
|
|
7675
7773
|
return this.createUrlTree(redirectLocation);
|
|
7676
7774
|
}
|
|
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
7775
|
}
|
|
7686
7776
|
const result = yield this.cleanInteractionState(activatedRoute, state, () => __awaiter(this, void 0, void 0, function* () {
|
|
7687
7777
|
// Parse our route params.
|
|
@@ -7713,6 +7803,11 @@ class PlaceGuard {
|
|
|
7713
7803
|
// @Trace()
|
|
7714
7804
|
canDeactivate(component, currentRoute, currentState, nextState) {
|
|
7715
7805
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7806
|
+
if (!component) {
|
|
7807
|
+
// this happens when the place wasn't authorised and the associated
|
|
7808
|
+
// router outlet was removed from the dom.
|
|
7809
|
+
return true;
|
|
7810
|
+
}
|
|
7716
7811
|
const currentUrl = this.urlService.parseUrl(currentState.url);
|
|
7717
7812
|
const nextUrl = this.urlService.parseUrl(nextState.url);
|
|
7718
7813
|
const result = yield this.placeRouter.navigationSession.canDeactivatePlace(component, currentUrl, nextUrl);
|
|
@@ -7877,5 +7972,5 @@ function VisitParameterList(options) {
|
|
|
7877
7972
|
* Generated bundle index. Do not edit.
|
|
7878
7973
|
*/
|
|
7879
7974
|
|
|
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 };
|
|
7975
|
+
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
7976
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|