@coolon/angular-ui-powerups 3.7.0-alpha.4 → 3.7.0-alpha.5
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 +7 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +172 -108
- 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/esm2015/lib/components/commands/group/abstract-popup-menu.component.js +50 -0
- package/esm2015/lib/components/commands/group/abstract-popup-menu.component.js.map +1 -0
- package/esm2015/lib/components/commands/group/abstract-popup-menu.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/group/abstract-popup-menu.component.ngfactory.js.map +1 -0
- 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 +17 -6
- 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 +16 -3
- 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/more-menu.component.js +4 -11
- package/esm2015/lib/components/commands/group/more-menu.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/more-menu.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/popup-menu.component.js +4 -15
- package/esm2015/lib/components/commands/group/popup-menu.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/popup-menu.component.metadata.json +1 -1
- package/esm2015/lib/components/components.module.js +3 -1
- 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/exports.js +1 -0
- package/esm2015/lib/components/exports.js.map +1 -1
- package/esm2015/lib/components/exports.metadata.json +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +157 -105
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/commands/group/abstract-popup-menu.component.d.ts +16 -0
- package/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.d.ts +5 -2
- package/lib/components/commands/group/command-group-renderer/command-group-renderer.component.d.ts +5 -0
- package/lib/components/commands/group/more-menu.component.d.ts +2 -6
- package/lib/components/commands/group/popup-menu.component.d.ts +2 -7
- package/lib/components/exports.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DOCUMENT, CommonModule, Location } from '@angular/common';
|
|
2
|
-
import { Directive, ElementRef, Inject, Host, Optional, Input, HostListener, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule, Component, ContentChild, EventEmitter, SkipSelf, ViewChild, Output,
|
|
2
|
+
import { Directive, ElementRef, Inject, Host, Optional, Input, HostListener, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule, Component, ContentChild, ViewChildren, EventEmitter, SkipSelf, ViewChild, Output, HostBinding, ViewEncapsulation, Self, TemplateRef, ChangeDetectorRef, ContentChildren, ViewContainerRef, InjectionToken, Injector, ComponentFactoryResolver, INJECTOR } from '@angular/core';
|
|
3
3
|
import { FormsModule } from '@angular/forms';
|
|
4
4
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
5
5
|
import { MatInputModule } from '@angular/material/input';
|
|
@@ -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,
|
|
21
|
+
import { GarbageCollector, DelegatingValueModel, assert, UnaryCommand, lang, Dsl, Logger, TrackExternal, Command, MutableValueModel, MutableListModel, ListModel, ValueModel, StoreInValueModel, 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 _, { isNil, isEqual } from 'lodash';
|
|
@@ -506,11 +506,6 @@ __decorate([
|
|
|
506
506
|
__metadata("design:type", Command)
|
|
507
507
|
], CardContainerComponent.prototype, "addCardCommand", void 0);
|
|
508
508
|
|
|
509
|
-
var TrackBy;
|
|
510
|
-
(function (TrackBy) {
|
|
511
|
-
TrackBy.byIndex = (data, index) => index;
|
|
512
|
-
})(TrackBy || (TrackBy = {}));
|
|
513
|
-
|
|
514
509
|
class ViewData {
|
|
515
510
|
}
|
|
516
511
|
(function (ViewData) {
|
|
@@ -620,78 +615,6 @@ class ViewData {
|
|
|
620
615
|
ViewData.isFlex = isFlex;
|
|
621
616
|
})(ViewData || (ViewData = {}));
|
|
622
617
|
|
|
623
|
-
class CommandGroupMenuRendererComponent extends DisposableComponent {
|
|
624
|
-
constructor(parent) {
|
|
625
|
-
super();
|
|
626
|
-
this.parent = parent;
|
|
627
|
-
this.groupViewDataModel = new MutableValueModel();
|
|
628
|
-
this.commandFired = new EventEmitter();
|
|
629
|
-
this.ViewData = ViewData;
|
|
630
|
-
this.TrackBy = TrackBy;
|
|
631
|
-
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
632
|
-
this.children = chain(this.groupViewDataModel).pluckList('children');
|
|
633
|
-
this.hasMixedIcons = chain(this.groupViewDataModel).pluck('hasMixedIcons');
|
|
634
|
-
}
|
|
635
|
-
getCommand(data) {
|
|
636
|
-
const command = ViewData.getCommand(data);
|
|
637
|
-
const { when } = Dsl.disposeWith(this);
|
|
638
|
-
when(command.busy).becomesFalsey(() => this.commandFired.emit());
|
|
639
|
-
return command;
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
CommandGroupMenuRendererComponent.decorators = [
|
|
643
|
-
{ type: Component, args: [{
|
|
644
|
-
selector: 'aup-command-group-menu',
|
|
645
|
-
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"
|
|
646
|
-
},] }
|
|
647
|
-
];
|
|
648
|
-
CommandGroupMenuRendererComponent.ctorParameters = () => [
|
|
649
|
-
{ type: CommandGroupMenuRendererComponent, decorators: [{ type: Optional }, { type: SkipSelf }] }
|
|
650
|
-
];
|
|
651
|
-
CommandGroupMenuRendererComponent.propDecorators = {
|
|
652
|
-
menuComponent: [{ type: ViewChild, args: ['menu', { static: true },] }],
|
|
653
|
-
groupViewData: [{ type: Input }],
|
|
654
|
-
commandFired: [{ type: Output }],
|
|
655
|
-
triggers: [{ type: ViewChildren, args: [MatMenuTrigger,] }]
|
|
656
|
-
};
|
|
657
|
-
__decorate([
|
|
658
|
-
StoreInValueModel('groupViewDataModel'),
|
|
659
|
-
__metadata("design:type", ViewData.GroupData)
|
|
660
|
-
], CommandGroupMenuRendererComponent.prototype, "groupViewData", void 0);
|
|
661
|
-
|
|
662
|
-
class CommandGroupRendererComponent extends DisposableComponent {
|
|
663
|
-
constructor() {
|
|
664
|
-
super();
|
|
665
|
-
this.renderRootNode = true;
|
|
666
|
-
this.ViewData = ViewData;
|
|
667
|
-
this.TrackBy = TrackBy;
|
|
668
|
-
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
669
|
-
this.childViewDataModels = chain(this.groupViewDataModel)
|
|
670
|
-
.pluckList('children');
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
CommandGroupRendererComponent.decorators = [
|
|
674
|
-
{ type: Component, args: [{
|
|
675
|
-
selector: 'aup-command-group-renderer',
|
|
676
|
-
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",
|
|
677
|
-
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}"]
|
|
678
|
-
},] }
|
|
679
|
-
];
|
|
680
|
-
CommandGroupRendererComponent.ctorParameters = () => [];
|
|
681
|
-
CommandGroupRendererComponent.propDecorators = {
|
|
682
|
-
groupViewDataModel: [{ type: Input }],
|
|
683
|
-
groupViewData: [{ type: Input }],
|
|
684
|
-
renderRootNode: [{ type: Input }, { type: HostBinding, args: ['class.render-root',] }]
|
|
685
|
-
};
|
|
686
|
-
__decorate([
|
|
687
|
-
TrackExternal(),
|
|
688
|
-
__metadata("design:type", ValueModel)
|
|
689
|
-
], CommandGroupRendererComponent.prototype, "groupViewDataModel", void 0);
|
|
690
|
-
__decorate([
|
|
691
|
-
StoreInValueModel('groupViewDataModel'),
|
|
692
|
-
__metadata("design:type", ViewData.GroupData)
|
|
693
|
-
], CommandGroupRendererComponent.prototype, "groupViewData", void 0);
|
|
694
|
-
|
|
695
618
|
class Registration extends GarbageCollector {
|
|
696
619
|
}
|
|
697
620
|
(function (Registration) {
|
|
@@ -847,6 +770,152 @@ class CommandGroup extends GarbageCollector {
|
|
|
847
770
|
CommandGroup.factory = factory;
|
|
848
771
|
})(CommandGroup || (CommandGroup = {}));
|
|
849
772
|
|
|
773
|
+
class AbstractPopupMenuComponent extends DisposableComponent {
|
|
774
|
+
constructor(group) {
|
|
775
|
+
super();
|
|
776
|
+
this.group = group;
|
|
777
|
+
}
|
|
778
|
+
get xPosition() {
|
|
779
|
+
return this.group.xPosition;
|
|
780
|
+
}
|
|
781
|
+
set xPosition(position) {
|
|
782
|
+
this.group.xPosition = position;
|
|
783
|
+
}
|
|
784
|
+
get yPosition() {
|
|
785
|
+
return this.group.yPosition;
|
|
786
|
+
}
|
|
787
|
+
set yPosition(position) {
|
|
788
|
+
this.group.yPosition = position;
|
|
789
|
+
}
|
|
790
|
+
ngAfterContentInit() {
|
|
791
|
+
this.group.initialise();
|
|
792
|
+
}
|
|
793
|
+
ngOnInit() {
|
|
794
|
+
}
|
|
795
|
+
// @Trace()
|
|
796
|
+
closeMenu() {
|
|
797
|
+
this.triggers.forEach(trigger => {
|
|
798
|
+
if (trigger.menuOpen) {
|
|
799
|
+
trigger.closeMenu();
|
|
800
|
+
}
|
|
801
|
+
});
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
AbstractPopupMenuComponent.decorators = [
|
|
805
|
+
{ type: Component, args: [{
|
|
806
|
+
selector: 'aup-abstract-popup-menu-component',
|
|
807
|
+
template: ''
|
|
808
|
+
},] }
|
|
809
|
+
];
|
|
810
|
+
AbstractPopupMenuComponent.ctorParameters = () => [
|
|
811
|
+
{ type: CommandGroup }
|
|
812
|
+
];
|
|
813
|
+
AbstractPopupMenuComponent.propDecorators = {
|
|
814
|
+
xPosition: [{ type: Input }],
|
|
815
|
+
yPosition: [{ type: Input }],
|
|
816
|
+
triggers: [{ type: ViewChildren, args: [MatMenuTrigger,] }]
|
|
817
|
+
};
|
|
818
|
+
|
|
819
|
+
var TrackBy;
|
|
820
|
+
(function (TrackBy) {
|
|
821
|
+
TrackBy.byIndex = (data, index) => index;
|
|
822
|
+
})(TrackBy || (TrackBy = {}));
|
|
823
|
+
|
|
824
|
+
class CommandGroupMenuRendererComponent extends DisposableComponent {
|
|
825
|
+
constructor(parent) {
|
|
826
|
+
super();
|
|
827
|
+
this.parent = parent;
|
|
828
|
+
this.groupViewDataModel = new MutableValueModel();
|
|
829
|
+
this.commandFired = new EventEmitter();
|
|
830
|
+
this.ViewData = ViewData;
|
|
831
|
+
this.TrackBy = TrackBy;
|
|
832
|
+
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
833
|
+
this.children = chain(this.groupViewDataModel).pluckList('children');
|
|
834
|
+
this.hasMixedIcons = chain(this.groupViewDataModel).pluck('hasMixedIcons');
|
|
835
|
+
}
|
|
836
|
+
executeCommand(data) {
|
|
837
|
+
ViewData.getCommand(data).execute().finally(() => {
|
|
838
|
+
this.commandFired.emit();
|
|
839
|
+
});
|
|
840
|
+
}
|
|
841
|
+
isEnabled(data) {
|
|
842
|
+
return ViewData.getCommand(data).enabled.value;
|
|
843
|
+
}
|
|
844
|
+
// @Trace()
|
|
845
|
+
onCommandFired() {
|
|
846
|
+
this.commandFired.emit();
|
|
847
|
+
this.triggers.forEach(trigger => {
|
|
848
|
+
if (trigger.menuOpen) {
|
|
849
|
+
trigger.closeMenu();
|
|
850
|
+
}
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
CommandGroupMenuRendererComponent.decorators = [
|
|
855
|
+
{ type: Component, args: [{
|
|
856
|
+
selector: 'aup-command-group-menu',
|
|
857
|
+
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 (click)=\"executeCommand(data)\"\n [disabled]=\"!isEnabled(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 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)=\"onCommandFired()\"></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"
|
|
858
|
+
},] }
|
|
859
|
+
];
|
|
860
|
+
CommandGroupMenuRendererComponent.ctorParameters = () => [
|
|
861
|
+
{ type: CommandGroupMenuRendererComponent, decorators: [{ type: Optional }, { type: SkipSelf }] }
|
|
862
|
+
];
|
|
863
|
+
CommandGroupMenuRendererComponent.propDecorators = {
|
|
864
|
+
menuComponent: [{ type: ViewChild, args: ['menu', { static: true },] }],
|
|
865
|
+
groupViewData: [{ type: Input }],
|
|
866
|
+
commandFired: [{ type: Output }],
|
|
867
|
+
triggers: [{ type: ViewChildren, args: [MatMenuTrigger,] }]
|
|
868
|
+
};
|
|
869
|
+
__decorate([
|
|
870
|
+
StoreInValueModel('groupViewDataModel'),
|
|
871
|
+
__metadata("design:type", ViewData.GroupData)
|
|
872
|
+
], CommandGroupMenuRendererComponent.prototype, "groupViewData", void 0);
|
|
873
|
+
|
|
874
|
+
class CommandGroupRendererComponent extends DisposableComponent {
|
|
875
|
+
constructor() {
|
|
876
|
+
super();
|
|
877
|
+
this.renderRootNode = true;
|
|
878
|
+
this.commandFired = new EventEmitter();
|
|
879
|
+
this.ViewData = ViewData;
|
|
880
|
+
this.TrackBy = TrackBy;
|
|
881
|
+
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
882
|
+
this.childViewDataModels = chain(this.groupViewDataModel)
|
|
883
|
+
.pluckList('children');
|
|
884
|
+
}
|
|
885
|
+
// @Trace()
|
|
886
|
+
onCommandFired() {
|
|
887
|
+
this.commandFired.emit();
|
|
888
|
+
this.triggers.forEach(trigger => {
|
|
889
|
+
if (trigger.menuOpen) {
|
|
890
|
+
trigger.closeMenu();
|
|
891
|
+
}
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
CommandGroupRendererComponent.decorators = [
|
|
896
|
+
{ type: Component, args: [{
|
|
897
|
+
selector: 'aup-command-group-renderer',
|
|
898
|
+
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 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\n [groupViewData]=\"group\"\n (commandFired)=\"onCommandFired()\"></aup-command-group-menu>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'raised'\">\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\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\n [groupViewData]=\"group\"\n (commandFired)=\"onCommandFired()\"></aup-command-group-menu>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <button 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\n [groupViewData]=\"group\"\n (commandFired)=\"onCommandFired()\"></aup-command-group-menu>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngIf=\"!ViewData.hasText(group)\">\n <button matMenuTrigger\n mat-icon-button\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\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\n [groupViewData]=\"group\"\n (commandFired)=\"onCommandFired()\"></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",
|
|
899
|
+
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}"]
|
|
900
|
+
},] }
|
|
901
|
+
];
|
|
902
|
+
CommandGroupRendererComponent.ctorParameters = () => [];
|
|
903
|
+
CommandGroupRendererComponent.propDecorators = {
|
|
904
|
+
groupViewDataModel: [{ type: Input }],
|
|
905
|
+
groupViewData: [{ type: Input }],
|
|
906
|
+
renderRootNode: [{ type: Input }, { type: HostBinding, args: ['class.render-root',] }],
|
|
907
|
+
commandFired: [{ type: Output }],
|
|
908
|
+
triggers: [{ type: ViewChildren, args: [MatMenuTrigger,] }]
|
|
909
|
+
};
|
|
910
|
+
__decorate([
|
|
911
|
+
TrackExternal(),
|
|
912
|
+
__metadata("design:type", ValueModel)
|
|
913
|
+
], CommandGroupRendererComponent.prototype, "groupViewDataModel", void 0);
|
|
914
|
+
__decorate([
|
|
915
|
+
StoreInValueModel('groupViewDataModel'),
|
|
916
|
+
__metadata("design:type", ViewData.GroupData)
|
|
917
|
+
], CommandGroupRendererComponent.prototype, "groupViewData", void 0);
|
|
918
|
+
|
|
850
919
|
class CommandGroupComponent extends CommandGroup {
|
|
851
920
|
constructor(parent) {
|
|
852
921
|
super(parent);
|
|
@@ -1042,10 +1111,9 @@ const ɵ0 = CommandGroup.factory;
|
|
|
1042
1111
|
/**
|
|
1043
1112
|
*
|
|
1044
1113
|
*/
|
|
1045
|
-
class MoreMenuComponent extends
|
|
1114
|
+
class MoreMenuComponent extends AbstractPopupMenuComponent {
|
|
1046
1115
|
constructor(group) {
|
|
1047
|
-
super();
|
|
1048
|
-
this.group = group;
|
|
1116
|
+
super(group);
|
|
1049
1117
|
this.tooltipModel = new MutableValueModel();
|
|
1050
1118
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
1051
1119
|
group.xPosition = 'before'; // this should be the default unless overridden by the user.
|
|
@@ -1060,17 +1128,11 @@ class MoreMenuComponent extends DisposableComponent {
|
|
|
1060
1128
|
];
|
|
1061
1129
|
}, { allowNil: true });
|
|
1062
1130
|
}
|
|
1063
|
-
ngOnInit() {
|
|
1064
|
-
}
|
|
1065
|
-
// @Trace()
|
|
1066
|
-
ngAfterContentInit() {
|
|
1067
|
-
this.group.initialise();
|
|
1068
|
-
}
|
|
1069
1131
|
}
|
|
1070
1132
|
MoreMenuComponent.decorators = [
|
|
1071
1133
|
{ type: Component, args: [{
|
|
1072
1134
|
selector: 'aup-more-menu',
|
|
1073
|
-
template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
|
|
1135
|
+
template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate" (commandFired)="closeMenu()"></aup-command-group-renderer>',
|
|
1074
1136
|
providers: [{ provide: CommandGroup, useFactory: ɵ0 }]
|
|
1075
1137
|
},] }
|
|
1076
1138
|
];
|
|
@@ -1089,28 +1151,17 @@ const ɵ0$1 = CommandGroup.factory;
|
|
|
1089
1151
|
/**
|
|
1090
1152
|
*
|
|
1091
1153
|
*/
|
|
1092
|
-
class PopupMenuComponent extends
|
|
1154
|
+
class PopupMenuComponent extends AbstractPopupMenuComponent {
|
|
1093
1155
|
constructor(group) {
|
|
1094
|
-
super();
|
|
1095
|
-
this.group = group;
|
|
1156
|
+
super(group);
|
|
1096
1157
|
const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
|
|
1097
1158
|
group.faceListModel = chain(this.faceModel).mapToList(face => [face]);
|
|
1098
1159
|
}
|
|
1099
|
-
// @Trace()
|
|
1100
|
-
ngOnInit() {
|
|
1101
|
-
}
|
|
1102
|
-
// @Trace()
|
|
1103
|
-
ngAfterContentInit() {
|
|
1104
|
-
this.group.initialise();
|
|
1105
|
-
}
|
|
1106
|
-
// @Trace()
|
|
1107
|
-
ngAfterViewInit() {
|
|
1108
|
-
}
|
|
1109
1160
|
}
|
|
1110
1161
|
PopupMenuComponent.decorators = [
|
|
1111
1162
|
{ type: Component, args: [{
|
|
1112
1163
|
selector: 'aup-popup-menu',
|
|
1113
|
-
template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
|
|
1164
|
+
template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate" (commandFired)="closeMenu()"></aup-command-group-renderer>',
|
|
1114
1165
|
providers: [{ provide: CommandGroup, useFactory: ɵ0$1 }]
|
|
1115
1166
|
},] }
|
|
1116
1167
|
];
|
|
@@ -3093,7 +3144,8 @@ ComponentsModule.decorators = [
|
|
|
3093
3144
|
SeparatorComponent,
|
|
3094
3145
|
FlexComponent,
|
|
3095
3146
|
CommandGroupMenuRendererComponent,
|
|
3096
|
-
CommandGroupRendererComponent
|
|
3147
|
+
CommandGroupRendererComponent,
|
|
3148
|
+
AbstractPopupMenuComponent
|
|
3097
3149
|
],
|
|
3098
3150
|
imports: [
|
|
3099
3151
|
CommonModule,
|
|
@@ -7130,5 +7182,5 @@ function VisitParameterList(options) {
|
|
|
7130
7182
|
* Generated bundle index. Do not edit.
|
|
7131
7183
|
*/
|
|
7132
7184
|
|
|
7133
|
-
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnModel, ColumnTemplateDirective, CommandComponent, CommandDirective, CommandFace, CommandFaceComponent, CommandGroup, CommandGroupComponent, CommandGroupMenuRendererComponent, CommandGroupRendererComponent, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, 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, PLACE_AUTH_SERVICE, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupInteractionContextComponent, PopupMenuComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, Registration, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SectionHeaderComponent, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputActivity, SelectInputComponent, SelectionColumnModel, SeparatorComponent, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, ToolBarComponent, TrackBy, UrlService, UrlSnapshot, VerticalFocusContainerComponent, ViewData, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, ɵ0 };
|
|
7185
|
+
export { ACTIVITY_DATA, AUP_PLACE_CONFIG, AbstractInputActivity, AbstractInputComponent, AbstractInteractionContext, AbstractListInputComponent, AbstractPlaceNavigationComponent, AbstractPopStateNavigation, AbstractPopupMenuComponent, AbstractValueInputComponent, Activity, ActivityActionsComponent, ActivityContainerComponent, ActivityOutletComponent, ActivityRef, AddItemInteractionContextComponent, AlertDialogComponent, AngularUiPowerupsModule, AutocompleteInputComponent, Bounds, BusyOverlayComponent, CELL_EDITOR_PORTAL, CELL_RENDERER_PORTAL, CardContainerComponent, CellEditorPortalRef, CellHeaderPortalRef, CellPortalRef, CellRendererPortalRef, CheckboxInputComponent, ColumnModel, ColumnTemplateDirective, CommandComponent, CommandDirective, CommandFace, CommandFaceComponent, CommandGroup, CommandGroupComponent, CommandGroupMenuRendererComponent, CommandGroupRendererComponent, ComponentCellRendererPortalRef, ComponentsModule, ConfirmThenDialogComponent, ConfirmationDialogComponent, ConsolidatedParameterMap, CustomTemplateColumnModel, CustomValueColumnModel, DEFINITION_META_DATA_KEY, DIALOG_INTERACTION_SERVICE_DEFAULTS, DefaultCellRendererComponent, DefaultHeaderCellRendererComponent, DialogInteractionContext, DialogInteractionContextFactory, Dimension, DirectivesModule, DisposableComponent, EditRowControls, EditSession, EditorControlColumnModel, EmptyStateComponent, EventCleanUpSession, 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, PLACE_AUTH_SERVICE, PORTAL_EDITOR_COMPONENT, PORTAL_RENDERER_COMPONENT, ParameterDefinition, PasswordInputComponent, Place, PlaceComponent, PlaceComponentDeactivationHandler, PlaceDefinition, PlaceGuard, PlaceHistory, PlaceModule, PlaceOutletComponent, PlaceRouter, Point, PopStateDuringInteractionNavigation, PopStateNavigation, PopupInteractionContextComponent, PopupMenuComponent, PropertyColumnModel, ROUTE_PARAMETER_LIST_KEY, Registration, RemoveLastInteractionFromUrlNavigationSession, ResizeAwareComponent, RouteId, ScrollContainerComponent, SectionHeaderComponent, SelectCellRendererComponent, SelectHeaderCellRendererComponent, SelectInputActivity, SelectInputComponent, SelectionColumnModel, SeparatorComponent, SidePlaceNavigationComponent, StringInputActivity, StringInputComponent, SwitchCaseComponent, SwitchCaseDefaultDirective, SwitchCaseOption, SwitchCaseWhenDirective, SynchroniseInteractionContextIdsWithRoute, TabbedPlaceNavigationComponent, TableCellRendererComponent, TableComponent, TableHeaderCellRendererComponent, TableModel, TableRowMenuComponent, TemplateCellRendererPortalRef, TextInputComponent, ToolBarComponent, TrackBy, UrlService, UrlSnapshot, VerticalFocusContainerComponent, ViewData, Visit, VisitParameter, VisitParameterList, VisitSanitiser, WaitUntilLeavingInteractionTransitionCancelled, WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined, WaitUntilPopStateDuringCanDeactivateInteractionFinishes, leftRightPlaceAnimation, slideDownOnEnterAnimation, slideRightOnEnterAnimation, ɵ0 };
|
|
7134
7186
|
//# sourceMappingURL=coolon-angular-ui-powerups.js.map
|