@coolon/angular-ui-powerups 3.5.1 → 3.5.3
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/CHANGELOG.md +9 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +98 -103
- 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.d.ts +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/cypress/package.json +1 -1
- package/esm2015/coolon-angular-ui-powerups.js +1 -1
- package/esm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/esm2015/coolon-angular-ui-powerups.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.js.map +1 -1
- package/esm2015/lib/components/card-container/card-container.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/command/command.component.js +14 -8
- 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 +20 -29
- package/esm2015/lib/components/commands/command-face/command-face.component.js.map +1 -1
- package/esm2015/lib/components/commands/command-face/command-face.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/command-group/command-group.component.js +4 -2
- package/esm2015/lib/components/commands/group/command-group/command-group.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/command-group/command-group.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js +1 -1
- package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js +3 -2
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/command-group.js +10 -7
- package/esm2015/lib/components/commands/group/command-group.js.map +1 -1
- package/esm2015/lib/components/commands/group/more-menu.component.js +8 -6
- package/esm2015/lib/components/commands/group/more-menu.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/popup-menu.component.js +1 -1
- package/esm2015/lib/components/commands/group/popup-menu.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/registration.js +6 -6
- package/esm2015/lib/components/commands/group/registration.js.map +1 -1
- package/esm2015/lib/components/commands/group/view-data.js +24 -15
- package/esm2015/lib/components/commands/group/view-data.js.map +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/interaction/components/input-activities/input-activity-data.js.map +1 -1
- package/esm2015/lib/interaction/components/input-activities/select-input-activity.js +3 -1
- package/esm2015/lib/interaction/components/input-activities/select-input-activity.js.map +1 -1
- package/esm2015/lib/interaction/components/input-activities/select-input-activity.metadata.json +1 -1
- package/esm2015/lib/interaction/components/input-activities/string-input-activity.js +2 -1
- package/esm2015/lib/interaction/components/input-activities/string-input-activity.js.map +1 -1
- package/esm2015/lib/interaction/components/input-activities/string-input-activity.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm2015/lib/place/components/list-place-nav/list-place-nav.component.js +1 -1
- 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/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/place.module.ngfactory.js.map +1 -1
- package/esm2015/{public_api.js → public-api.js} +1 -1
- package/esm2015/{public_api.js.map → public-api.js.map} +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +96 -79
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/commands/command/command.component.d.ts +4 -2
- package/lib/components/commands/command-face/command-face.component.d.ts +9 -12
- package/lib/components/commands/group/command-group/command-group.component.d.ts +2 -1
- package/lib/components/commands/group/command-group.d.ts +5 -4
- package/lib/components/commands/group/registration.d.ts +5 -5
- package/lib/components/commands/group/view-data.d.ts +6 -5
- package/lib/interaction/components/input-activities/input-activity-data.d.ts +3 -1
- package/package.json +2 -2
- package/schematics/bootstrap-app/index.js +1 -1
- package/schematics/bootstrap-app/index.js.map +1 -1
- /package/esm2015/{public_api.metadata.json → public-api.metadata.json} +0 -0
- /package/{public_api.d.ts → public-api.d.ts} +0 -0
|
@@ -18,7 +18,7 @@ import { MatTableModule } from '@angular/material/table';
|
|
|
18
18
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
19
19
|
import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome';
|
|
20
20
|
import { fas } from '@fortawesome/free-solid-svg-icons';
|
|
21
|
-
import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, Command, MutableValueModel, StoreInValueModel, ValueModel, MutableListModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext,
|
|
21
|
+
import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, Command, MutableValueModel, StoreInValueModel, ValueModel, MutableListModel, ListModel, StoreInListModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, MultipleSelectionModel, DirtyTrackingForm, DelegatingCommand, Deferred, Trace, Functions } from '@coolon/pectin';
|
|
22
22
|
import { __decorate, __metadata, __awaiter } from 'tslib';
|
|
23
23
|
import { Memoize } from '@typescript-plus/fast-memoize-decorator/dist/src';
|
|
24
24
|
import _, { isEqual, isNil } from 'lodash';
|
|
@@ -492,7 +492,7 @@ class CardContainerComponent extends DisposableComponent {
|
|
|
492
492
|
CardContainerComponent.decorators = [
|
|
493
493
|
{ type: Component, args: [{
|
|
494
494
|
selector: 'aup-card-container',
|
|
495
|
-
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\" [
|
|
495
|
+
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",
|
|
496
496
|
styles: [":root{--aup-default-background:#fff;--aup-default-padding:var(--default-padding,18px)}.router-outlet-container>*{bottom:0;left:0;position:absolute;right:0;top:0}[no-tab-header]>mat-tab-header{display:none}[full-height-tabs] .mat-tab-body-wrapper,mat-tab-group.full-height-tabs .mat-tab-body-wrapper{flex:1}[full-height-tabs] .mat-tab-body-wrapper .mat-tab-body-content,[full-height-tabs] .mat-tab-body-wrapper mat-tab-body,mat-tab-group.full-height-tabs .mat-tab-body-wrapper .mat-tab-body-content,mat-tab-group.full-height-tabs .mat-tab-body-wrapper mat-tab-body{display:flex;flex-direction:column;justify-content:stretch}.dialog-interaction-context,.dialog-interaction-context mat-dialog-container{max-height:95vh!important;max-width:95vw!important}.dialog-interaction-context mat-dialog-container{padding:0}.activity-outlet-wrapper{align-items:stretch;display:flex;flex-direction:column}.aup-popup-interaction-panel{background:var(--aup-default-background,#fff);box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow .28s cubic-bezier(.4,0,.2,1)}.aup-input-activity{padding:calc(var(--aup-default-padding)/2)}.aup-input-component{display:block}.aup-input-component input,.aup-input-component mat-form-field{width:100%}.aup-input-component input mat-hint.faux-error,.aup-input-component mat-form-field mat-hint.faux-error{color:#f44336}.aup-input-component.dense mat-form-field .mat-form-field-infix{border-top:none}.aup-input-component.dense mat-form-field .mat-form-field-flex{padding-top:0}.aup-input-component.dense mat-form-field .mat-form-field-wrapper{border-bottom:0;padding-bottom:0}.aup-input-component.dense mat-form-field .mat-form-field-underline{bottom:0}.aup-input-component.dense mat-form-field.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label-wrapper{display:none}.aup-input-component.dense mat-form-field.mat-form-field-appearance-standard.mat-form-field-has-label .mat-select:not(.mat-select-empty) .mat-select-arrow-wrapper{transform:translateY(0)}aup-table-cell-renderer>.aup-input-component .mat-form-field-flex{padding-top:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-infix{width:0}aup-table-cell-renderer>.aup-input-component .mat-form-field-label-wrapper{display:none}aup-table{--default-column-gap:var(--column-gap,24px);--resolved-row-hover-background-color:var(--row-hover-background-color,rgba(0,0,0,0.05))}aup-table .mat-table td.mat-cell:first-of-type,aup-table .mat-table td.mat-footer-cell:first-of-type,aup-table .mat-table th.mat-header-cell:first-of-type{padding-left:0}aup-table .mat-table tr.enable-hover:hover{background-color:var(--resolved-row-hover-background-color)}aup-table .mat-table td.enable-cursor{cursor:pointer}aup-table aup-table-cell-renderer,aup-table aup-table-header-cell-renderer{align-items:stretch;display:flex;flex-direction:column;height:100%;justify-content:center;min-height:47px}aup-table aup-table-cell-renderer.first-column,aup-table aup-table-cell-renderer:not(.first-column),aup-table aup-table-header-cell-renderer.first-column,aup-table aup-table-header-cell-renderer:not(.first-column){padding-left:var(--default-column-gap)}aup-table aup-table-cell-renderer.fillCell{justify-content:stretch;padding-left:0!important}aup-table aup-table-cell-renderer.padChild>:first-child{flex:1;padding-left:var(--default-column-gap)}:root{--aup-command-face-icon-gap:8px;--aup-fa-icon-width:18px;--aup-icon-width:24px}aup-icon{--fa-icon-offset:calc((var(--aup-icon-width) - var(--aup-fa-icon-width))/2);position:relative}aup-icon fa-icon .svg-inline--fa{height:var(--aup-fa-icon-width)!important;left:var(--fa-icon-offset);position:absolute;top:var(--fa-icon-offset);width:var(--aup-fa-icon-width)!important}.mat-menu-panel aup-icon .svg-inline--fa{opacity:.54}:host{--resolved-card-background:var(--card-background,#fcfcfb);--resolved-card-gap:var(--card-gap,16px);--resolved-card-height:var(--card-height,auto);--resolved-card-min-height:var(--card-min-height,auto);--resolved-card-width:var(--card-width,300px);background:var(--resolved-card-background);display:block;flex:1}.card-container{box-sizing:border-box;display:-ms-grid;display:grid;grid-gap:var(--resolved-card-gap);grid-template-columns:repeat(auto-fill,var(--resolved-card-width));grid-template-rows:repeat(auto-fit,minmax(var(--resolved-card-min-height),var(--resolved-card-height)));max-width:100%;min-height:calc(var(--resolved-card-height) + 2*var(--resolved-card-gap));min-width:calc(var(--resolved-card-width) + 2*var(--resolved-card-gap));padding:var(--resolved-card-gap);width:calc((var(--resolved-card-width) + var(--resolved-card-gap))*2 + var(--grid-gap))}.add-card-container{align-items:center;background-color:hsla(0,0%,100%,.8);border:2px dashed rgba(0,0,0,.1);border-radius:6px;box-sizing:border-box;color:rgba(0,0,0,.54);cursor:pointer;display:flex;flex-direction:column;font-weight:300;height:var(--resolved-card-height);justify-content:center;min-height:var(--resolved-card-min-height);transition:all .28s cubic-bezier(.4,0,.2,1);width:var(--resolved-card-width)}.add-card-container mat-icon{font-size:200%}.add-card-container:hover{background-color:#fff;border-color:transparent;color:rgba(0,0,0,.54);transition:box-shadow .28s cubic-bezier(.4,0,.2,1);transition:all .28s cubic-bezier(.4,0,.2,1)}.add-card-container:hover:hover{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.add-card-template-container{align-items:stretch;display:flex;flex-direction:column;height:var(--resolved-card-height);justify-content:stretch;width:var(--resolved-card-width)}"]
|
|
497
497
|
},] }
|
|
498
498
|
];
|
|
@@ -516,22 +516,31 @@ class ViewData {
|
|
|
516
516
|
}
|
|
517
517
|
(function (ViewData) {
|
|
518
518
|
class FaceData extends ViewData {
|
|
519
|
-
constructor(
|
|
519
|
+
constructor(faces) {
|
|
520
520
|
super();
|
|
521
|
-
this.
|
|
521
|
+
this.faces = faces;
|
|
522
|
+
assert.notNil(faces);
|
|
523
|
+
}
|
|
524
|
+
get activeFaceAdapter() {
|
|
525
|
+
return new CommandFace.Adapter(this.faces.length > 0 ? this.faces[0] : undefined);
|
|
522
526
|
}
|
|
523
527
|
}
|
|
528
|
+
__decorate([
|
|
529
|
+
Memoize(),
|
|
530
|
+
__metadata("design:type", CommandFace.Adapter),
|
|
531
|
+
__metadata("design:paramtypes", [])
|
|
532
|
+
], FaceData.prototype, "activeFaceAdapter", null);
|
|
524
533
|
ViewData.FaceData = FaceData;
|
|
525
534
|
class GroupData extends FaceData {
|
|
526
|
-
constructor(
|
|
527
|
-
super(
|
|
535
|
+
constructor(faces, xPosition, yPosition, children) {
|
|
536
|
+
super(faces);
|
|
528
537
|
this.xPosition = xPosition;
|
|
529
538
|
this.yPosition = yPosition;
|
|
530
539
|
this.children = children;
|
|
531
540
|
}
|
|
532
541
|
get hasMixedIcons() {
|
|
533
542
|
const hasFaces = this.children.filter(c => ViewData.hasFace(c));
|
|
534
|
-
const iconCount = hasFaces.filter(c => !!c.
|
|
543
|
+
const iconCount = hasFaces.filter(c => !!c.activeFaceAdapter.icon).length;
|
|
535
544
|
return iconCount > 0 && hasFaces.length !== iconCount;
|
|
536
545
|
}
|
|
537
546
|
}
|
|
@@ -542,8 +551,8 @@ class ViewData {
|
|
|
542
551
|
], GroupData.prototype, "hasMixedIcons", null);
|
|
543
552
|
ViewData.GroupData = GroupData;
|
|
544
553
|
class CommandData extends FaceData {
|
|
545
|
-
constructor(
|
|
546
|
-
super(
|
|
554
|
+
constructor(command, faces) {
|
|
555
|
+
super(faces);
|
|
547
556
|
this.command = command;
|
|
548
557
|
}
|
|
549
558
|
}
|
|
@@ -563,25 +572,25 @@ class ViewData {
|
|
|
563
572
|
}
|
|
564
573
|
ViewData.getCommand = getCommand;
|
|
565
574
|
function getTooltip(data) {
|
|
566
|
-
return as(FaceData, data).
|
|
575
|
+
return as(FaceData, data).activeFaceAdapter.tooltip;
|
|
567
576
|
}
|
|
568
577
|
ViewData.getTooltip = getTooltip;
|
|
569
578
|
function getStyle(data) {
|
|
570
|
-
return as(FaceData, data).
|
|
579
|
+
return as(FaceData, data).activeFaceAdapter.style;
|
|
571
580
|
}
|
|
572
581
|
ViewData.getStyle = getStyle;
|
|
573
582
|
function getColor(data) {
|
|
574
|
-
return as(FaceData, data).
|
|
583
|
+
return as(FaceData, data).activeFaceAdapter.color;
|
|
575
584
|
}
|
|
576
585
|
ViewData.getColor = getColor;
|
|
577
586
|
function hasText(data) {
|
|
578
|
-
return !!as(FaceData, data).
|
|
587
|
+
return !!as(FaceData, data).activeFaceAdapter.text;
|
|
579
588
|
}
|
|
580
589
|
ViewData.hasText = hasText;
|
|
581
|
-
function
|
|
582
|
-
return as(FaceData, data).
|
|
590
|
+
function getFaces(data) {
|
|
591
|
+
return as(FaceData, data).faces;
|
|
583
592
|
}
|
|
584
|
-
ViewData.
|
|
593
|
+
ViewData.getFaces = getFaces;
|
|
585
594
|
function asGroup(viewData) {
|
|
586
595
|
return as(GroupData, viewData);
|
|
587
596
|
}
|
|
@@ -634,7 +643,7 @@ class CommandGroupMenuRendererComponent extends DisposableComponent {
|
|
|
634
643
|
CommandGroupMenuRendererComponent.decorators = [
|
|
635
644
|
{ type: Component, args: [{
|
|
636
645
|
selector: 'aup-command-group-menu',
|
|
637
|
-
template: "<mat-menu #menu [xPosition]=\"groupViewData.xPosition\" [yPosition]=\"groupViewData.yPosition\">\n <ng-container *ngFor=\"let data of children.value; trackBy: TrackBy.byIndex\" >\n <button *ngIf=\"ViewData.isCommand(data)\"\n [pectinCommand]=\"getCommand(data)\"\n [matTooltip]=\"ViewData.getTooltip(data)\"\n mat-menu-item>\n <aup-command-face [
|
|
646
|
+
template: "<mat-menu #menu [xPosition]=\"groupViewData.xPosition\" [yPosition]=\"groupViewData.yPosition\">\n <ng-container *ngFor=\"let data of children.value; trackBy: TrackBy.byIndex\" >\n <button *ngIf=\"ViewData.isCommand(data)\"\n [pectinCommand]=\"getCommand(data)\"\n [matTooltip]=\"ViewData.getTooltip(data)\"\n mat-menu-item>\n <aup-command-face [faces]=\"ViewData.getFaces(data)\"\n [includeMissingIconInLayout]=\"hasMixedIcons.value\"></aup-command-face>\n </button>\n\n <ng-container *ngIf=\"ViewData.isGroup(data)\">\n <button mat-menu-item\n #trigger=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"innerPanel.menuComponent\"\n >\n <aup-command-face [faces]=\"ViewData.getFaces(data)\"\n [includeMissingIconInLayout]=\"hasMixedIcons.value\"></aup-command-face>\n </button>\n <aup-command-group-menu #innerPanel\n [groupViewData]=\"ViewData.asGroup(data)\"\n (commandFired)=\"trigger.closeMenu()\"></aup-command-group-menu>\n </ng-container>\n\n <mat-divider *ngIf=\"ViewData.isSeparator(data)\"></mat-divider>\n\n </ng-container>\n</mat-menu>\n"
|
|
638
647
|
},] }
|
|
639
648
|
];
|
|
640
649
|
CommandGroupMenuRendererComponent.ctorParameters = () => [
|
|
@@ -658,13 +667,14 @@ class CommandGroupRendererComponent extends DisposableComponent {
|
|
|
658
667
|
this.ViewData = ViewData;
|
|
659
668
|
this.TrackBy = TrackBy;
|
|
660
669
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
661
|
-
this.childViewDataModels = chain(this.groupViewDataModel)
|
|
670
|
+
this.childViewDataModels = chain(this.groupViewDataModel)
|
|
671
|
+
.pluckList('children');
|
|
662
672
|
}
|
|
663
673
|
}
|
|
664
674
|
CommandGroupRendererComponent.decorators = [
|
|
665
675
|
{ type: Component, args: [{
|
|
666
676
|
selector: 'aup-command-group-renderer',
|
|
667
|
-
template: "<ng-template #groupTemplate let-group>\n\n <ng-container *ngIf=\"ViewData.hasText(group)\" [ngSwitch]=\"ViewData.getStyle(group)\">\n <ng-container *ngSwitchCase=\"'stroked'\">\n <button #trigger=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n [matTooltip]=\"ViewData.getTooltip(group)\"\n [color]=\"ViewData.getColor(group)\"\n mat-stroked-button>\n <aup-command-face [
|
|
677
|
+
template: "<ng-template #groupTemplate let-group>\n\n <ng-container *ngIf=\"ViewData.hasText(group)\" [ngSwitch]=\"ViewData.getStyle(group)\">\n <ng-container *ngSwitchCase=\"'stroked'\">\n <button #trigger=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n [matTooltip]=\"ViewData.getTooltip(group)\"\n [color]=\"ViewData.getColor(group)\"\n mat-stroked-button>\n <aup-command-face [faces]=\"ViewData.getFaces(group)\"></aup-command-face>\n </button>\n <aup-command-group-menu #subMenu [groupViewData]=\"group\" (commandFired)=\"trigger.closeMenu()\"></aup-command-group-menu>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'raised'\">\n <button #trigger=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n\n [matTooltip]=\"ViewData.getTooltip(group)\"\n [color]=\"ViewData.getColor(group)\"\n mat-raised-button>\n <aup-command-face [faces]=\"ViewData.getFaces(group)\"></aup-command-face>\n </button>\n <aup-command-group-menu #subMenu [groupViewData]=\"group\" (commandFired)=\"trigger.closeMenu()\"></aup-command-group-menu>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <button #trigger=\"matMenuTrigger\"\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n [matTooltip]=\"ViewData.getTooltip(group)\"\n [color]=\"ViewData.getColor(group)\"\n mat-button>\n <aup-command-face [faces]=\"ViewData.getFaces(group)\"></aup-command-face>\n </button>\n <aup-command-group-menu #subMenu [groupViewData]=\"group\" (commandFired)=\"trigger.closeMenu()\"></aup-command-group-menu>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngIf=\"!ViewData.hasText(group)\">\n <button #trigger=\"matMenuTrigger\"\n mat-icon-button\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n\n [matTooltip]=\"ViewData.getTooltip(group)\"\n [color]=\"ViewData.getColor(group)\"\n >\n <aup-command-face [faces]=\"ViewData.getFaces(group)\"></aup-command-face>\n </button>\n <aup-command-group-menu #subMenu [groupViewData]=\"group\" (commandFired)=\"trigger.closeMenu()\"></aup-command-group-menu>\n </ng-container>\n\n</ng-template>\n\n\n<ng-template #commandTemplate let-data>\n\n <ng-container *ngIf=\"ViewData.hasText(data)\" [ngSwitch]=\"ViewData.getStyle(data)\">\n <button *ngSwitchCase=\"'raised'\"\n [pectinCommand]=\"ViewData.getCommand(data)\"\n [matTooltip]=\"ViewData.getTooltip(data)\"\n [color]=\"ViewData.getColor(data)\"\n mat-raised-button>\n <aup-command-face [faces]=\"ViewData.getFaces(data)\"></aup-command-face>\n </button>\n <button *ngSwitchCase=\"'stroked'\"\n [pectinCommand]=\"ViewData.getCommand(data)\"\n [matTooltip]=\"ViewData.getTooltip(data)\"\n [color]=\"ViewData.getColor(data)\"\n mat-stroked-button>\n <aup-command-face [faces]=\"ViewData.getFaces(data)\"></aup-command-face>\n </button>\n <button *ngSwitchDefault\n [pectinCommand]=\"ViewData.getCommand(data)\"\n [matTooltip]=\"ViewData.getTooltip(data)\"\n [color]=\"ViewData.getColor(data)\"\n mat-button>\n <aup-command-face [faces]=\"ViewData.getFaces(data)\"></aup-command-face>\n </button>\n </ng-container>\n\n <button *ngIf=\"!ViewData.hasText(data)\"\n [pectinCommand]=\"ViewData.getCommand(data)\"\n [matTooltip]=\"ViewData.getTooltip(data)\"\n [color]=\"ViewData.getColor(data)\"\n mat-icon-button>\n <aup-command-face [faces]=\"ViewData.getFaces(data)\"></aup-command-face>\n </button>\n\n</ng-template>\n\n\n<ng-template *ngIf=\"renderRootNode\"\n [ngTemplateOutlet]=\"groupTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: groupViewDataModel.value }\">\n</ng-template>\n\n<ng-container *ngIf=\"!renderRootNode\">\n <ng-container *ngFor=\"let data of this.childViewDataModels.value; trackBy: TrackBy.byIndex\">\n <ng-template *ngIf=\"ViewData.isGroup(data)\"\n [ngTemplateOutlet]=\"groupTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: data }\">\n </ng-template>\n <ng-template *ngIf=\"ViewData.isCommand(data)\"\n [ngTemplateOutlet]=\"commandTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: data }\">\n </ng-template>\n\n <mat-divider *ngIf=\"ViewData.isSeparator(data)\" [vertical]=\"true\"></mat-divider>\n </ng-container>\n\n</ng-container>\n",
|
|
668
678
|
styles: [":host{align-items:center;display:inline-flex;flex-direction:row}:host:not(.render-root) mat-divider{-ms-grid-row-align:stretch;align-self:stretch;margin:4px 0}:host:not(.render-root)>*+*{margin-left:8px}:host span.flex{flex:1}"]
|
|
669
679
|
},] }
|
|
670
680
|
];
|
|
@@ -687,19 +697,19 @@ class Registration extends GarbageCollector {
|
|
|
687
697
|
}
|
|
688
698
|
(function (Registration) {
|
|
689
699
|
class FaceRegistration extends Registration {
|
|
690
|
-
constructor(
|
|
700
|
+
constructor(faceListModel) {
|
|
691
701
|
super();
|
|
692
|
-
this.
|
|
702
|
+
this.faceListModel = faceListModel;
|
|
693
703
|
}
|
|
694
704
|
}
|
|
695
705
|
Registration.FaceRegistration = FaceRegistration;
|
|
696
706
|
class CommandRegistration extends FaceRegistration {
|
|
697
|
-
constructor(
|
|
698
|
-
super(
|
|
707
|
+
constructor(command, faceListModel) {
|
|
708
|
+
super(faceListModel);
|
|
699
709
|
this.command = command;
|
|
700
710
|
}
|
|
701
711
|
toTemplate() {
|
|
702
|
-
return new ViewData.CommandData(this.
|
|
712
|
+
return new ViewData.CommandData(this.command, this.faceListModel.value);
|
|
703
713
|
}
|
|
704
714
|
}
|
|
705
715
|
Registration.CommandRegistration = CommandRegistration;
|
|
@@ -709,7 +719,7 @@ class Registration extends GarbageCollector {
|
|
|
709
719
|
this.group = group;
|
|
710
720
|
}
|
|
711
721
|
toTemplate() {
|
|
712
|
-
return new ViewData.GroupData(this.
|
|
722
|
+
return new ViewData.GroupData(this.faceListModel.value, this.group.xPosition, this.group.yPosition, this.group.registrations.value.map(r => r.toTemplate()));
|
|
713
723
|
}
|
|
714
724
|
}
|
|
715
725
|
Registration.GroupRegistration = GroupRegistration;
|
|
@@ -770,7 +780,7 @@ class CommandGroup extends GarbageCollector {
|
|
|
770
780
|
this.notifyChanged();
|
|
771
781
|
}
|
|
772
782
|
rebuildTemplates() {
|
|
773
|
-
this._rootTemplate.value = new ViewData.GroupData(this.
|
|
783
|
+
this._rootTemplate.value = new ViewData.GroupData(this.faceListModel.value, this.xPosition, this.yPosition, this.registrations.value.map(r => r.toTemplate()));
|
|
774
784
|
}
|
|
775
785
|
get depth() {
|
|
776
786
|
return this.isRoot() ? 0 : this.parent.depth + 1;
|
|
@@ -778,8 +788,8 @@ class CommandGroup extends GarbageCollector {
|
|
|
778
788
|
isRoot() {
|
|
779
789
|
return false;
|
|
780
790
|
}
|
|
781
|
-
registerCommand(command,
|
|
782
|
-
return this.register(new Registration.CommandRegistration(
|
|
791
|
+
registerCommand(command, faceListModel) {
|
|
792
|
+
return this.register(new Registration.CommandRegistration(command, faceListModel));
|
|
783
793
|
}
|
|
784
794
|
registerGroup(group, faceModel) {
|
|
785
795
|
return this.register(new Registration.GroupRegistration(faceModel, group));
|
|
@@ -794,7 +804,7 @@ class CommandGroup extends GarbageCollector {
|
|
|
794
804
|
this._registrations.push(registration);
|
|
795
805
|
if (registration instanceof Registration.FaceRegistration) {
|
|
796
806
|
const { when } = Dsl.disposeWith(registration);
|
|
797
|
-
when(registration.
|
|
807
|
+
when(registration.faceListModel).changes((is, was) => {
|
|
798
808
|
this.notifyChildFaceChanged(is, was);
|
|
799
809
|
}, { asLongAs: this.initialised });
|
|
800
810
|
}
|
|
@@ -804,14 +814,17 @@ class CommandGroup extends GarbageCollector {
|
|
|
804
814
|
}
|
|
805
815
|
(function (CommandGroup) {
|
|
806
816
|
class Root extends CommandGroup {
|
|
817
|
+
constructor() {
|
|
818
|
+
super();
|
|
819
|
+
}
|
|
807
820
|
isRoot() {
|
|
808
821
|
return true;
|
|
809
822
|
}
|
|
810
823
|
}
|
|
811
824
|
__decorate([
|
|
812
825
|
TrackExternal(),
|
|
813
|
-
__metadata("design:type",
|
|
814
|
-
], Root.prototype, "
|
|
826
|
+
__metadata("design:type", ListModel)
|
|
827
|
+
], Root.prototype, "faceListModel", void 0);
|
|
815
828
|
__decorate([
|
|
816
829
|
TrackExternal({ defaultValue: 'after' }),
|
|
817
830
|
__metadata("design:type", ValueModel)
|
|
@@ -841,7 +854,9 @@ class CommandGroupComponent extends CommandGroup {
|
|
|
841
854
|
this.parent = parent;
|
|
842
855
|
this.xPosition = 'after';
|
|
843
856
|
this.yPosition = 'below';
|
|
844
|
-
|
|
857
|
+
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
858
|
+
this.faceListModel = chain(this.faceModel).mapToList(v => [v]);
|
|
859
|
+
this.parent.registerGroup(this, this.faceListModel);
|
|
845
860
|
}
|
|
846
861
|
}
|
|
847
862
|
CommandGroupComponent.decorators = [
|
|
@@ -884,54 +899,45 @@ __decorate([
|
|
|
884
899
|
class CommandFaceComponent extends DisposableComponent {
|
|
885
900
|
constructor() {
|
|
886
901
|
super();
|
|
887
|
-
this.
|
|
902
|
+
this.facesModel = new MutableListModel();
|
|
888
903
|
this.ignoreIcon = false;
|
|
889
904
|
this.ignoreText = false;
|
|
890
905
|
this.includeMissingIconInLayout = false;
|
|
891
906
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
892
|
-
|
|
893
|
-
const
|
|
894
|
-
this.
|
|
895
|
-
this.
|
|
896
|
-
this.positionModel = faceAdapter.pluck('iconPosition');
|
|
897
|
-
this.colorModel = faceAdapter.pluck('color');
|
|
907
|
+
this.faceAdapters = chain(this.facesModel).map(face => new CommandFace.Adapter(face));
|
|
908
|
+
const activeFace = this.faceAdapters.first();
|
|
909
|
+
this.activeIcon = activeFace.pluck("icon");
|
|
910
|
+
this.activeColor = activeFace.pluck("color");
|
|
898
911
|
}
|
|
899
912
|
get requiresMissingIconInLayout() {
|
|
900
|
-
return this.includeMissingIconInLayout && !this.
|
|
913
|
+
return this.includeMissingIconInLayout && !this.activeIcon.value;
|
|
901
914
|
}
|
|
902
915
|
ngOnInit() {
|
|
903
916
|
}
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
return (_a = this.positionModel.value) !== null && _a !== void 0 ? _a : CommandFace.Position.START;
|
|
907
|
-
}
|
|
908
|
-
get shouldIncludeIcon() {
|
|
909
|
-
return (!this.ignoreIcon && this.iconModel.value) || this.includeMissingIconInLayout;
|
|
910
|
-
}
|
|
911
|
-
get iconStart() {
|
|
912
|
-
return this.shouldIncludeIcon && this.iconPosition === CommandFace.Position.START;
|
|
917
|
+
shouldIncludeIcon(face) {
|
|
918
|
+
return (!this.ignoreIcon && face.icon) || this.includeMissingIconInLayout;
|
|
913
919
|
}
|
|
914
|
-
|
|
915
|
-
return this.shouldIncludeIcon &&
|
|
920
|
+
hasIconStart(face) {
|
|
921
|
+
return this.shouldIncludeIcon(face) && (!face.iconPosition || face.iconPosition === CommandFace.Position.START);
|
|
916
922
|
}
|
|
917
|
-
|
|
918
|
-
return this.
|
|
923
|
+
hasIconEnd(face) {
|
|
924
|
+
return this.shouldIncludeIcon(face) && face.iconPosition === CommandFace.Position.END;
|
|
919
925
|
}
|
|
920
926
|
get color() {
|
|
921
|
-
return this.
|
|
927
|
+
return this.activeColor.value;
|
|
922
928
|
}
|
|
923
929
|
}
|
|
924
930
|
CommandFaceComponent.decorators = [
|
|
925
931
|
{ type: Component, args: [{
|
|
926
932
|
selector: 'aup-command-face',
|
|
927
|
-
template: "<aup-icon *ngIf=\"
|
|
933
|
+
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",
|
|
928
934
|
encapsulation: ViewEncapsulation.None,
|
|
929
|
-
styles: ["aup-command-face{--icon-gap:var(--aup-command-face-icon-gap);align-items:center;display:inline-flex;flex-direction:row}aup-command-face *+*{margin-left:var(--icon-gap)}aup-command-face.hide-icon aup-icon{visibility:hidden}"]
|
|
935
|
+
styles: ["aup-command-face{--icon-gap:var(--aup-command-face-icon-gap);display:-ms-inline-grid;display:inline-grid}aup-command-face>.face-container{-ms-grid-column:1;-ms-grid-row:1;align-items:center;display:inline-flex;flex-direction:row;grid-column:1;grid-row:1}aup-command-face>.face-container:not(:first-child){visibility:hidden}aup-command-face>.face-container *+*{margin-left:var(--icon-gap)}aup-command-face.hide-icon aup-icon{visibility:hidden}aup-command-face.centered{justify-items:center}"]
|
|
930
936
|
},] }
|
|
931
937
|
];
|
|
932
938
|
CommandFaceComponent.ctorParameters = () => [];
|
|
933
939
|
CommandFaceComponent.propDecorators = {
|
|
934
|
-
|
|
940
|
+
_rawFaces: [{ type: Input, args: ['faces',] }],
|
|
935
941
|
ignoreIcon: [{ type: Input }],
|
|
936
942
|
ignoreText: [{ type: Input }],
|
|
937
943
|
includeMissingIconInLayout: [{ type: Input }],
|
|
@@ -939,9 +945,9 @@ CommandFaceComponent.propDecorators = {
|
|
|
939
945
|
color: [{ type: HostBinding, args: ['attr.color',] }]
|
|
940
946
|
};
|
|
941
947
|
__decorate([
|
|
942
|
-
|
|
943
|
-
__metadata("design:type",
|
|
944
|
-
], CommandFaceComponent.prototype, "
|
|
948
|
+
StoreInListModel('facesModel'),
|
|
949
|
+
__metadata("design:type", Array)
|
|
950
|
+
], CommandFaceComponent.prototype, "_rawFaces", void 0);
|
|
945
951
|
|
|
946
952
|
/**
|
|
947
953
|
*
|
|
@@ -952,23 +958,29 @@ class CommandComponent extends DisposableComponent {
|
|
|
952
958
|
this.parent = parent;
|
|
953
959
|
this.CommandFace = CommandFace;
|
|
954
960
|
const { chain, switchOn } = Dsl.disposeWith(this);
|
|
955
|
-
this.
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
this.
|
|
960
|
-
|
|
961
|
+
this.faces = chain(this.command.busy).mapToList(busy => {
|
|
962
|
+
return busy ?
|
|
963
|
+
[this.busyFaceModel.value, this.faceModel.value] :
|
|
964
|
+
[this.faceModel.value, this.busyFaceModel.value];
|
|
965
|
+
}, { allowNil: true, dependsOn: [this.faceModel, this.busyFaceModel] })
|
|
966
|
+
.rejectNil();
|
|
967
|
+
this.activeFace = this.faces.first();
|
|
968
|
+
this.buttonStyle = chain(this.activeFace).map(f => CommandFace.getStyleOf(f));
|
|
969
|
+
this.colorModel = chain(this.activeFace).map(f => CommandFace.getColorOf(f));
|
|
961
970
|
if (parent) {
|
|
962
|
-
this.registerDisposable(this.parent.registerCommand(this.command, this.
|
|
971
|
+
this.registerDisposable(this.parent.registerCommand(this.command, this.faces));
|
|
963
972
|
}
|
|
964
973
|
}
|
|
974
|
+
isActive(face) {
|
|
975
|
+
return this.activeFace.query().equals(face);
|
|
976
|
+
}
|
|
965
977
|
ngOnInit() {
|
|
966
978
|
}
|
|
967
979
|
}
|
|
968
980
|
CommandComponent.decorators = [
|
|
969
981
|
{ type: Component, args: [{
|
|
970
982
|
selector: 'aup-command',
|
|
971
|
-
template: "<ng-container *ngIf=\"!parent\">\n <ng-container [ngSwitch]=\"buttonStyle.value\">\n <
|
|
983
|
+
template: "<ng-container *ngIf=\"!parent\">\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",
|
|
972
984
|
styles: [":host{display:inline-flex;flex-direction:row;justify-content:stretch}button{flex:1}"]
|
|
973
985
|
},] }
|
|
974
986
|
];
|
|
@@ -1038,13 +1050,15 @@ class MoreMenuComponent extends DisposableComponent {
|
|
|
1038
1050
|
this.tooltipModel = new MutableValueModel();
|
|
1039
1051
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
1040
1052
|
group.xPosition = 'before'; // this should be the default unless overridden by the user.
|
|
1041
|
-
group.
|
|
1042
|
-
return
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1053
|
+
group.faceListModel = chain(this.tooltipModel).mapToList(tooltip => {
|
|
1054
|
+
return [
|
|
1055
|
+
{
|
|
1056
|
+
icon: () => 'mat:more_vert',
|
|
1057
|
+
tooltip() {
|
|
1058
|
+
return tooltip;
|
|
1059
|
+
}
|
|
1046
1060
|
}
|
|
1047
|
-
|
|
1061
|
+
];
|
|
1048
1062
|
}, { allowNil: true });
|
|
1049
1063
|
}
|
|
1050
1064
|
ngOnInit() {
|
|
@@ -1081,7 +1095,7 @@ class PopupMenuComponent extends DisposableComponent {
|
|
|
1081
1095
|
super();
|
|
1082
1096
|
this.group = group;
|
|
1083
1097
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
1084
|
-
group.
|
|
1098
|
+
group.faceListModel = chain(this.faceModel).mapToList(face => [face]);
|
|
1085
1099
|
}
|
|
1086
1100
|
// @Trace()
|
|
1087
1101
|
ngOnInit() {
|
|
@@ -4170,7 +4184,8 @@ StringInputActivity.decorators = [
|
|
|
4170
4184
|
[command.escape]="cancelCommand"></aup-string-input>
|
|
4171
4185
|
<aup-activity-actions align="end"
|
|
4172
4186
|
[confirmCommand]="confirmCommand"
|
|
4173
|
-
[cancelCommand]="cancelCommand"
|
|
4187
|
+
[cancelCommand]="cancelCommand"
|
|
4188
|
+
[style]="data.buttonStyle"></aup-activity-actions>
|
|
4174
4189
|
`
|
|
4175
4190
|
},] }
|
|
4176
4191
|
];
|
|
@@ -4205,7 +4220,9 @@ SelectInputActivity.decorators = [
|
|
|
4205
4220
|
></aup-select-input>
|
|
4206
4221
|
<aup-activity-actions align="end"
|
|
4207
4222
|
[confirmCommand]="confirmCommand"
|
|
4208
|
-
[cancelCommand]="cancelCommand"
|
|
4223
|
+
[cancelCommand]="cancelCommand"
|
|
4224
|
+
[style]="data.buttonStyle"
|
|
4225
|
+
></aup-activity-actions>
|
|
4209
4226
|
`
|
|
4210
4227
|
},] }
|
|
4211
4228
|
];
|
|
@@ -6440,7 +6457,7 @@ class ListPlaceNavComponent extends AbstractPlaceNavigationComponent {
|
|
|
6440
6457
|
ListPlaceNavComponent.decorators = [
|
|
6441
6458
|
{ type: Component, args: [{
|
|
6442
6459
|
selector: 'aup-list-place-nav',
|
|
6443
|
-
template: "<mat-nav-list fxFlex>\n <a mat-list-item *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [class.active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"getNavigationFace(placeDefinition).tooltip()\">\n <aup-command-face [
|
|
6460
|
+
template: "<mat-nav-list fxFlex>\n <a mat-list-item *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [class.active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"getNavigationFace(placeDefinition).tooltip()\">\n <aup-command-face [faces]=\"[getNavigationFace(placeDefinition)]\"></aup-command-face>\n </a>\n</mat-nav-list>\n",
|
|
6444
6461
|
styles: [":host{--selected-background:#f1f1f1;--selected-border-color:#838383;--selected-color:inherit;display:flex;flex-direction:column}mat-nav-list{padding-top:0}a.active{background:var(--selected-background);border-right:2px solid var(--selected-border-color);color:var(--selected-color)}"]
|
|
6445
6462
|
},] }
|
|
6446
6463
|
];
|
|
@@ -6530,7 +6547,7 @@ class TabbedPlaceNavigationComponent extends AbstractPlaceNavigationComponent {
|
|
|
6530
6547
|
TabbedPlaceNavigationComponent.decorators = [
|
|
6531
6548
|
{ type: Component, args: [{
|
|
6532
6549
|
selector: 'aup-tabbed-place-navigation',
|
|
6533
|
-
template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"getNavigationFace(placeDefinition).tooltip()\">\n <aup-command-face [
|
|
6550
|
+
template: "<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor=\"let placeDefinition of placeDefinitions.value\"\n [pectinCommand]=\"commandFactory.create(placeDefinition)\"\n [active]=\"isActive(placeDefinition)\"\n [matTooltip]=\"getNavigationFace(placeDefinition).tooltip()\">\n <aup-command-face [faces]=\"[getNavigationFace(placeDefinition)]\"></aup-command-face>\n </a>\n</nav>\n",
|
|
6534
6551
|
styles: [""]
|
|
6535
6552
|
},] }
|
|
6536
6553
|
];
|