@coolon/angular-ui-powerups 3.7.0-alpha.4 → 3.7.0-alpha.6

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/bundles/coolon-angular-ui-powerups.umd.js +177 -109
  3. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
  5. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  6. package/coolon-angular-ui-powerups.metadata.json +1 -1
  7. package/esm2015/lib/components/commands/group/abstract-popup-menu.component.js +50 -0
  8. package/esm2015/lib/components/commands/group/abstract-popup-menu.component.js.map +1 -0
  9. package/esm2015/lib/components/commands/group/abstract-popup-menu.component.metadata.json +1 -0
  10. package/esm2015/lib/components/commands/group/abstract-popup-menu.component.ngfactory.js.map +1 -0
  11. package/esm2015/lib/components/commands/group/command-group/command-group.component.js +1 -0
  12. package/esm2015/lib/components/commands/group/command-group/command-group.component.js.map +1 -1
  13. package/esm2015/lib/components/commands/group/command-group/command-group.component.metadata.json +1 -1
  14. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js +17 -6
  15. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js.map +1 -1
  16. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.metadata.json +1 -1
  17. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js +16 -3
  18. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js.map +1 -1
  19. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.metadata.json +1 -1
  20. package/esm2015/lib/components/commands/group/command-group.js +2 -0
  21. package/esm2015/lib/components/commands/group/command-group.js.map +1 -1
  22. package/esm2015/lib/components/commands/group/more-menu.component.js +4 -11
  23. package/esm2015/lib/components/commands/group/more-menu.component.js.map +1 -1
  24. package/esm2015/lib/components/commands/group/more-menu.component.metadata.json +1 -1
  25. package/esm2015/lib/components/commands/group/popup-menu.component.js +4 -15
  26. package/esm2015/lib/components/commands/group/popup-menu.component.js.map +1 -1
  27. package/esm2015/lib/components/commands/group/popup-menu.component.metadata.json +1 -1
  28. package/esm2015/lib/components/components.module.js +3 -1
  29. package/esm2015/lib/components/components.module.js.map +1 -1
  30. package/esm2015/lib/components/components.module.metadata.json +1 -1
  31. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  32. package/esm2015/lib/components/exports.js +1 -0
  33. package/esm2015/lib/components/exports.js.map +1 -1
  34. package/esm2015/lib/components/exports.metadata.json +1 -1
  35. package/fesm2015/coolon-angular-ui-powerups.js +160 -105
  36. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  37. package/lib/components/commands/group/abstract-popup-menu.component.d.ts +16 -0
  38. package/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.d.ts +5 -2
  39. package/lib/components/commands/group/command-group-renderer/command-group-renderer.component.d.ts +5 -0
  40. package/lib/components/commands/group/more-menu.component.d.ts +2 -6
  41. package/lib/components/commands/group/popup-menu.component.d.ts +2 -7
  42. package/lib/components/exports.d.ts +1 -0
  43. 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, ViewChildren, HostBinding, ViewEncapsulation, Self, TemplateRef, ChangeDetectorRef, ContentChildren, ViewContainerRef, InjectionToken, Injector, ComponentFactoryResolver, INJECTOR } from '@angular/core';
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, StoreInValueModel, ValueModel, MutableListModel, ListModel, StoreInListModel, FocusManager, EventListenerList, Form, Guard, Binding, DebugContext, MultipleSelectionModel, DirtyTrackingForm, DelegatingCommand, Deferred, Trace, Functions } from '@coolon/pectin';
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) {
@@ -815,6 +738,8 @@ class CommandGroup extends GarbageCollector {
815
738
  class Root extends CommandGroup {
816
739
  constructor() {
817
740
  super();
741
+ const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
742
+ when(this.faceListModel).changes(() => this.notifyChanged());
818
743
  }
819
744
  isRoot() {
820
745
  return true;
@@ -847,6 +772,152 @@ class CommandGroup extends GarbageCollector {
847
772
  CommandGroup.factory = factory;
848
773
  })(CommandGroup || (CommandGroup = {}));
849
774
 
775
+ class AbstractPopupMenuComponent extends DisposableComponent {
776
+ constructor(group) {
777
+ super();
778
+ this.group = group;
779
+ }
780
+ get xPosition() {
781
+ return this.group.xPosition;
782
+ }
783
+ set xPosition(position) {
784
+ this.group.xPosition = position;
785
+ }
786
+ get yPosition() {
787
+ return this.group.yPosition;
788
+ }
789
+ set yPosition(position) {
790
+ this.group.yPosition = position;
791
+ }
792
+ ngAfterContentInit() {
793
+ this.group.initialise();
794
+ }
795
+ ngOnInit() {
796
+ }
797
+ // @Trace()
798
+ closeMenu() {
799
+ this.triggers.forEach(trigger => {
800
+ if (trigger.menuOpen) {
801
+ trigger.closeMenu();
802
+ }
803
+ });
804
+ }
805
+ }
806
+ AbstractPopupMenuComponent.decorators = [
807
+ { type: Component, args: [{
808
+ selector: 'aup-abstract-popup-menu-component',
809
+ template: ''
810
+ },] }
811
+ ];
812
+ AbstractPopupMenuComponent.ctorParameters = () => [
813
+ { type: CommandGroup }
814
+ ];
815
+ AbstractPopupMenuComponent.propDecorators = {
816
+ xPosition: [{ type: Input }],
817
+ yPosition: [{ type: Input }],
818
+ triggers: [{ type: ViewChildren, args: [MatMenuTrigger,] }]
819
+ };
820
+
821
+ var TrackBy;
822
+ (function (TrackBy) {
823
+ TrackBy.byIndex = (data, index) => index;
824
+ })(TrackBy || (TrackBy = {}));
825
+
826
+ class CommandGroupMenuRendererComponent extends DisposableComponent {
827
+ constructor(parent) {
828
+ super();
829
+ this.parent = parent;
830
+ this.groupViewDataModel = new MutableValueModel();
831
+ this.commandFired = new EventEmitter();
832
+ this.ViewData = ViewData;
833
+ this.TrackBy = TrackBy;
834
+ const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
835
+ this.children = chain(this.groupViewDataModel).pluckList('children');
836
+ this.hasMixedIcons = chain(this.groupViewDataModel).pluck('hasMixedIcons');
837
+ }
838
+ executeCommand(data) {
839
+ ViewData.getCommand(data).execute().finally(() => {
840
+ this.commandFired.emit();
841
+ });
842
+ }
843
+ isEnabled(data) {
844
+ return ViewData.getCommand(data).enabled.value;
845
+ }
846
+ // @Trace()
847
+ onCommandFired() {
848
+ this.commandFired.emit();
849
+ this.triggers.forEach(trigger => {
850
+ if (trigger.menuOpen) {
851
+ trigger.closeMenu();
852
+ }
853
+ });
854
+ }
855
+ }
856
+ CommandGroupMenuRendererComponent.decorators = [
857
+ { type: Component, args: [{
858
+ selector: 'aup-command-group-menu',
859
+ 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"
860
+ },] }
861
+ ];
862
+ CommandGroupMenuRendererComponent.ctorParameters = () => [
863
+ { type: CommandGroupMenuRendererComponent, decorators: [{ type: Optional }, { type: SkipSelf }] }
864
+ ];
865
+ CommandGroupMenuRendererComponent.propDecorators = {
866
+ menuComponent: [{ type: ViewChild, args: ['menu', { static: true },] }],
867
+ groupViewData: [{ type: Input }],
868
+ commandFired: [{ type: Output }],
869
+ triggers: [{ type: ViewChildren, args: [MatMenuTrigger,] }]
870
+ };
871
+ __decorate([
872
+ StoreInValueModel('groupViewDataModel'),
873
+ __metadata("design:type", ViewData.GroupData)
874
+ ], CommandGroupMenuRendererComponent.prototype, "groupViewData", void 0);
875
+
876
+ class CommandGroupRendererComponent extends DisposableComponent {
877
+ constructor() {
878
+ super();
879
+ this.renderRootNode = true;
880
+ this.commandFired = new EventEmitter();
881
+ this.ViewData = ViewData;
882
+ this.TrackBy = TrackBy;
883
+ const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
884
+ this.childViewDataModels = chain(this.groupViewDataModel)
885
+ .pluckList('children');
886
+ }
887
+ // @Trace()
888
+ onCommandFired() {
889
+ this.commandFired.emit();
890
+ this.triggers.forEach(trigger => {
891
+ if (trigger.menuOpen) {
892
+ trigger.closeMenu();
893
+ }
894
+ });
895
+ }
896
+ }
897
+ CommandGroupRendererComponent.decorators = [
898
+ { type: Component, args: [{
899
+ selector: 'aup-command-group-renderer',
900
+ 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",
901
+ 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}"]
902
+ },] }
903
+ ];
904
+ CommandGroupRendererComponent.ctorParameters = () => [];
905
+ CommandGroupRendererComponent.propDecorators = {
906
+ groupViewDataModel: [{ type: Input }],
907
+ groupViewData: [{ type: Input }],
908
+ renderRootNode: [{ type: Input }, { type: HostBinding, args: ['class.render-root',] }],
909
+ commandFired: [{ type: Output }],
910
+ triggers: [{ type: ViewChildren, args: [MatMenuTrigger,] }]
911
+ };
912
+ __decorate([
913
+ TrackExternal(),
914
+ __metadata("design:type", ValueModel)
915
+ ], CommandGroupRendererComponent.prototype, "groupViewDataModel", void 0);
916
+ __decorate([
917
+ StoreInValueModel('groupViewDataModel'),
918
+ __metadata("design:type", ViewData.GroupData)
919
+ ], CommandGroupRendererComponent.prototype, "groupViewData", void 0);
920
+
850
921
  class CommandGroupComponent extends CommandGroup {
851
922
  constructor(parent) {
852
923
  super(parent);
@@ -856,6 +927,7 @@ class CommandGroupComponent extends CommandGroup {
856
927
  const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
857
928
  this.faceListModel = chain(this.faceModel).mapToList(v => [v]);
858
929
  this.parent.registerGroup(this, this.faceListModel);
930
+ when(this.faceListModel).changes(() => this.notifyChanged());
859
931
  }
860
932
  }
861
933
  CommandGroupComponent.decorators = [
@@ -1042,10 +1114,9 @@ const ɵ0 = CommandGroup.factory;
1042
1114
  /**
1043
1115
  *
1044
1116
  */
1045
- class MoreMenuComponent extends DisposableComponent {
1117
+ class MoreMenuComponent extends AbstractPopupMenuComponent {
1046
1118
  constructor(group) {
1047
- super();
1048
- this.group = group;
1119
+ super(group);
1049
1120
  this.tooltipModel = new MutableValueModel();
1050
1121
  const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
1051
1122
  group.xPosition = 'before'; // this should be the default unless overridden by the user.
@@ -1060,17 +1131,11 @@ class MoreMenuComponent extends DisposableComponent {
1060
1131
  ];
1061
1132
  }, { allowNil: true });
1062
1133
  }
1063
- ngOnInit() {
1064
- }
1065
- // @Trace()
1066
- ngAfterContentInit() {
1067
- this.group.initialise();
1068
- }
1069
1134
  }
1070
1135
  MoreMenuComponent.decorators = [
1071
1136
  { type: Component, args: [{
1072
1137
  selector: 'aup-more-menu',
1073
- template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
1138
+ template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate" (commandFired)="closeMenu()"></aup-command-group-renderer>',
1074
1139
  providers: [{ provide: CommandGroup, useFactory: ɵ0 }]
1075
1140
  },] }
1076
1141
  ];
@@ -1089,28 +1154,17 @@ const ɵ0$1 = CommandGroup.factory;
1089
1154
  /**
1090
1155
  *
1091
1156
  */
1092
- class PopupMenuComponent extends DisposableComponent {
1157
+ class PopupMenuComponent extends AbstractPopupMenuComponent {
1093
1158
  constructor(group) {
1094
- super();
1095
- this.group = group;
1159
+ super(group);
1096
1160
  const { chain, valueOf, before, when, after, observe, switchOn } = Dsl.disposeWith(this);
1097
1161
  group.faceListModel = chain(this.faceModel).mapToList(face => [face]);
1098
1162
  }
1099
- // @Trace()
1100
- ngOnInit() {
1101
- }
1102
- // @Trace()
1103
- ngAfterContentInit() {
1104
- this.group.initialise();
1105
- }
1106
- // @Trace()
1107
- ngAfterViewInit() {
1108
- }
1109
1163
  }
1110
1164
  PopupMenuComponent.decorators = [
1111
1165
  { type: Component, args: [{
1112
1166
  selector: 'aup-popup-menu',
1113
- template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
1167
+ template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate" (commandFired)="closeMenu()"></aup-command-group-renderer>',
1114
1168
  providers: [{ provide: CommandGroup, useFactory: ɵ0$1 }]
1115
1169
  },] }
1116
1170
  ];
@@ -3093,7 +3147,8 @@ ComponentsModule.decorators = [
3093
3147
  SeparatorComponent,
3094
3148
  FlexComponent,
3095
3149
  CommandGroupMenuRendererComponent,
3096
- CommandGroupRendererComponent
3150
+ CommandGroupRendererComponent,
3151
+ AbstractPopupMenuComponent
3097
3152
  ],
3098
3153
  imports: [
3099
3154
  CommonModule,
@@ -7130,5 +7185,5 @@ function VisitParameterList(options) {
7130
7185
  * Generated bundle index. Do not edit.
7131
7186
  */
7132
7187
 
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 };
7188
+ 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
7189
  //# sourceMappingURL=coolon-angular-ui-powerups.js.map