@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.
Files changed (40) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/bundles/coolon-angular-ui-powerups.umd.js +172 -108
  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.map +1 -1
  12. package/esm2015/lib/components/commands/group/command-group/command-group.component.metadata.json +1 -1
  13. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js +17 -6
  14. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js.map +1 -1
  15. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.metadata.json +1 -1
  16. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js +16 -3
  17. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js.map +1 -1
  18. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.metadata.json +1 -1
  19. package/esm2015/lib/components/commands/group/more-menu.component.js +4 -11
  20. package/esm2015/lib/components/commands/group/more-menu.component.js.map +1 -1
  21. package/esm2015/lib/components/commands/group/more-menu.component.metadata.json +1 -1
  22. package/esm2015/lib/components/commands/group/popup-menu.component.js +4 -15
  23. package/esm2015/lib/components/commands/group/popup-menu.component.js.map +1 -1
  24. package/esm2015/lib/components/commands/group/popup-menu.component.metadata.json +1 -1
  25. package/esm2015/lib/components/components.module.js +3 -1
  26. package/esm2015/lib/components/components.module.js.map +1 -1
  27. package/esm2015/lib/components/components.module.metadata.json +1 -1
  28. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  29. package/esm2015/lib/components/exports.js +1 -0
  30. package/esm2015/lib/components/exports.js.map +1 -1
  31. package/esm2015/lib/components/exports.metadata.json +1 -1
  32. package/fesm2015/coolon-angular-ui-powerups.js +157 -105
  33. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  34. package/lib/components/commands/group/abstract-popup-menu.component.d.ts +16 -0
  35. package/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.d.ts +5 -2
  36. package/lib/components/commands/group/command-group-renderer/command-group-renderer.component.d.ts +5 -0
  37. package/lib/components/commands/group/more-menu.component.d.ts +2 -6
  38. package/lib/components/commands/group/popup-menu.component.d.ts +2 -7
  39. package/lib/components/exports.d.ts +1 -0
  40. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [3.7.0-alpha.5](https://bitbucket.org/coolon/angular-ui-powerups/compare/v3.7.0-alpha.4...v3.7.0-alpha.5) (2020-12-28)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * nested popup menus no closing properly ([85230d0](https://bitbucket.org/coolon/angular-ui-powerups/commit/85230d06787f001d7b92471732ee7d8eb75b4f11))
11
+
5
12
  ## [3.7.0-alpha.4](https://bitbucket.org/coolon/angular-ui-powerups/compare/v3.7.0-alpha.3...v3.7.0-alpha.4) (2020-12-16)
6
13
 
7
14
 
@@ -713,10 +713,6 @@
713
713
  __metadata("design:type", pectin.Command)
714
714
  ], CardContainerComponent.prototype, "addCardCommand", void 0);
715
715
 
716
- (function (TrackBy) {
717
- TrackBy.byIndex = function (data, index) { return index; };
718
- })(exports.TrackBy || (exports.TrackBy = {}));
719
-
720
716
  (function (CommandFace) {
721
717
  var Position;
722
718
  (function (Position) {
@@ -996,85 +992,6 @@
996
992
  ViewData.isFlex = isFlex;
997
993
  })(exports.ViewData || (exports.ViewData = {}));
998
994
 
999
- var CommandGroupMenuRendererComponent = /** @class */ (function (_super) {
1000
- __extends(CommandGroupMenuRendererComponent, _super);
1001
- function CommandGroupMenuRendererComponent(parent) {
1002
- var _this = _super.call(this) || this;
1003
- _this.parent = parent;
1004
- _this.groupViewDataModel = new pectin.MutableValueModel();
1005
- _this.commandFired = new i0.EventEmitter();
1006
- _this.ViewData = exports.ViewData;
1007
- _this.TrackBy = exports.TrackBy;
1008
- var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
1009
- _this.children = chain(_this.groupViewDataModel).pluckList('children');
1010
- _this.hasMixedIcons = chain(_this.groupViewDataModel).pluck('hasMixedIcons');
1011
- return _this;
1012
- }
1013
- CommandGroupMenuRendererComponent.prototype.getCommand = function (data) {
1014
- var _this = this;
1015
- var command = exports.ViewData.getCommand(data);
1016
- var when = pectin.Dsl.disposeWith(this).when;
1017
- when(command.busy).becomesFalsey(function () { return _this.commandFired.emit(); });
1018
- return command;
1019
- };
1020
- return CommandGroupMenuRendererComponent;
1021
- }(DisposableComponent));
1022
- CommandGroupMenuRendererComponent.decorators = [
1023
- { type: i0.Component, args: [{
1024
- selector: 'aup-command-group-menu',
1025
- 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"
1026
- },] }
1027
- ];
1028
- CommandGroupMenuRendererComponent.ctorParameters = function () { return [
1029
- { type: CommandGroupMenuRendererComponent, decorators: [{ type: i0.Optional }, { type: i0.SkipSelf }] }
1030
- ]; };
1031
- CommandGroupMenuRendererComponent.propDecorators = {
1032
- menuComponent: [{ type: i0.ViewChild, args: ['menu', { static: true },] }],
1033
- groupViewData: [{ type: i0.Input }],
1034
- commandFired: [{ type: i0.Output }],
1035
- triggers: [{ type: i0.ViewChildren, args: [menu.MatMenuTrigger,] }]
1036
- };
1037
- __decorate([
1038
- pectin.StoreInValueModel('groupViewDataModel'),
1039
- __metadata("design:type", exports.ViewData.GroupData)
1040
- ], CommandGroupMenuRendererComponent.prototype, "groupViewData", void 0);
1041
-
1042
- var CommandGroupRendererComponent = /** @class */ (function (_super) {
1043
- __extends(CommandGroupRendererComponent, _super);
1044
- function CommandGroupRendererComponent() {
1045
- var _this = _super.call(this) || this;
1046
- _this.renderRootNode = true;
1047
- _this.ViewData = exports.ViewData;
1048
- _this.TrackBy = exports.TrackBy;
1049
- var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
1050
- _this.childViewDataModels = chain(_this.groupViewDataModel)
1051
- .pluckList('children');
1052
- return _this;
1053
- }
1054
- return CommandGroupRendererComponent;
1055
- }(DisposableComponent));
1056
- CommandGroupRendererComponent.decorators = [
1057
- { type: i0.Component, args: [{
1058
- selector: 'aup-command-group-renderer',
1059
- 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",
1060
- 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}"]
1061
- },] }
1062
- ];
1063
- CommandGroupRendererComponent.ctorParameters = function () { return []; };
1064
- CommandGroupRendererComponent.propDecorators = {
1065
- groupViewDataModel: [{ type: i0.Input }],
1066
- groupViewData: [{ type: i0.Input }],
1067
- renderRootNode: [{ type: i0.Input }, { type: i0.HostBinding, args: ['class.render-root',] }]
1068
- };
1069
- __decorate([
1070
- pectin.TrackExternal(),
1071
- __metadata("design:type", pectin.ValueModel)
1072
- ], CommandGroupRendererComponent.prototype, "groupViewDataModel", void 0);
1073
- __decorate([
1074
- pectin.StoreInValueModel('groupViewDataModel'),
1075
- __metadata("design:type", exports.ViewData.GroupData)
1076
- ], CommandGroupRendererComponent.prototype, "groupViewData", void 0);
1077
-
1078
995
  exports.Registration = /** @class */ (function (_super) {
1079
996
  __extends(Registration, _super);
1080
997
  function Registration() {
@@ -1268,6 +1185,169 @@
1268
1185
  CommandGroup.factory = factory;
1269
1186
  })(exports.CommandGroup || (exports.CommandGroup = {}));
1270
1187
 
1188
+ var AbstractPopupMenuComponent = /** @class */ (function (_super) {
1189
+ __extends(AbstractPopupMenuComponent, _super);
1190
+ function AbstractPopupMenuComponent(group) {
1191
+ var _this = _super.call(this) || this;
1192
+ _this.group = group;
1193
+ return _this;
1194
+ }
1195
+ Object.defineProperty(AbstractPopupMenuComponent.prototype, "xPosition", {
1196
+ get: function () {
1197
+ return this.group.xPosition;
1198
+ },
1199
+ set: function (position) {
1200
+ this.group.xPosition = position;
1201
+ },
1202
+ enumerable: false,
1203
+ configurable: true
1204
+ });
1205
+ Object.defineProperty(AbstractPopupMenuComponent.prototype, "yPosition", {
1206
+ get: function () {
1207
+ return this.group.yPosition;
1208
+ },
1209
+ set: function (position) {
1210
+ this.group.yPosition = position;
1211
+ },
1212
+ enumerable: false,
1213
+ configurable: true
1214
+ });
1215
+ AbstractPopupMenuComponent.prototype.ngAfterContentInit = function () {
1216
+ this.group.initialise();
1217
+ };
1218
+ AbstractPopupMenuComponent.prototype.ngOnInit = function () {
1219
+ };
1220
+ // @Trace()
1221
+ AbstractPopupMenuComponent.prototype.closeMenu = function () {
1222
+ this.triggers.forEach(function (trigger) {
1223
+ if (trigger.menuOpen) {
1224
+ trigger.closeMenu();
1225
+ }
1226
+ });
1227
+ };
1228
+ return AbstractPopupMenuComponent;
1229
+ }(DisposableComponent));
1230
+ AbstractPopupMenuComponent.decorators = [
1231
+ { type: i0.Component, args: [{
1232
+ selector: 'aup-abstract-popup-menu-component',
1233
+ template: ''
1234
+ },] }
1235
+ ];
1236
+ AbstractPopupMenuComponent.ctorParameters = function () { return [
1237
+ { type: exports.CommandGroup }
1238
+ ]; };
1239
+ AbstractPopupMenuComponent.propDecorators = {
1240
+ xPosition: [{ type: i0.Input }],
1241
+ yPosition: [{ type: i0.Input }],
1242
+ triggers: [{ type: i0.ViewChildren, args: [menu.MatMenuTrigger,] }]
1243
+ };
1244
+
1245
+ (function (TrackBy) {
1246
+ TrackBy.byIndex = function (data, index) { return index; };
1247
+ })(exports.TrackBy || (exports.TrackBy = {}));
1248
+
1249
+ var CommandGroupMenuRendererComponent = /** @class */ (function (_super) {
1250
+ __extends(CommandGroupMenuRendererComponent, _super);
1251
+ function CommandGroupMenuRendererComponent(parent) {
1252
+ var _this = _super.call(this) || this;
1253
+ _this.parent = parent;
1254
+ _this.groupViewDataModel = new pectin.MutableValueModel();
1255
+ _this.commandFired = new i0.EventEmitter();
1256
+ _this.ViewData = exports.ViewData;
1257
+ _this.TrackBy = exports.TrackBy;
1258
+ var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
1259
+ _this.children = chain(_this.groupViewDataModel).pluckList('children');
1260
+ _this.hasMixedIcons = chain(_this.groupViewDataModel).pluck('hasMixedIcons');
1261
+ return _this;
1262
+ }
1263
+ CommandGroupMenuRendererComponent.prototype.executeCommand = function (data) {
1264
+ var _this = this;
1265
+ exports.ViewData.getCommand(data).execute().finally(function () {
1266
+ _this.commandFired.emit();
1267
+ });
1268
+ };
1269
+ CommandGroupMenuRendererComponent.prototype.isEnabled = function (data) {
1270
+ return exports.ViewData.getCommand(data).enabled.value;
1271
+ };
1272
+ // @Trace()
1273
+ CommandGroupMenuRendererComponent.prototype.onCommandFired = function () {
1274
+ this.commandFired.emit();
1275
+ this.triggers.forEach(function (trigger) {
1276
+ if (trigger.menuOpen) {
1277
+ trigger.closeMenu();
1278
+ }
1279
+ });
1280
+ };
1281
+ return CommandGroupMenuRendererComponent;
1282
+ }(DisposableComponent));
1283
+ CommandGroupMenuRendererComponent.decorators = [
1284
+ { type: i0.Component, args: [{
1285
+ selector: 'aup-command-group-menu',
1286
+ 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"
1287
+ },] }
1288
+ ];
1289
+ CommandGroupMenuRendererComponent.ctorParameters = function () { return [
1290
+ { type: CommandGroupMenuRendererComponent, decorators: [{ type: i0.Optional }, { type: i0.SkipSelf }] }
1291
+ ]; };
1292
+ CommandGroupMenuRendererComponent.propDecorators = {
1293
+ menuComponent: [{ type: i0.ViewChild, args: ['menu', { static: true },] }],
1294
+ groupViewData: [{ type: i0.Input }],
1295
+ commandFired: [{ type: i0.Output }],
1296
+ triggers: [{ type: i0.ViewChildren, args: [menu.MatMenuTrigger,] }]
1297
+ };
1298
+ __decorate([
1299
+ pectin.StoreInValueModel('groupViewDataModel'),
1300
+ __metadata("design:type", exports.ViewData.GroupData)
1301
+ ], CommandGroupMenuRendererComponent.prototype, "groupViewData", void 0);
1302
+
1303
+ var CommandGroupRendererComponent = /** @class */ (function (_super) {
1304
+ __extends(CommandGroupRendererComponent, _super);
1305
+ function CommandGroupRendererComponent() {
1306
+ var _this = _super.call(this) || this;
1307
+ _this.renderRootNode = true;
1308
+ _this.commandFired = new i0.EventEmitter();
1309
+ _this.ViewData = exports.ViewData;
1310
+ _this.TrackBy = exports.TrackBy;
1311
+ var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
1312
+ _this.childViewDataModels = chain(_this.groupViewDataModel)
1313
+ .pluckList('children');
1314
+ return _this;
1315
+ }
1316
+ // @Trace()
1317
+ CommandGroupRendererComponent.prototype.onCommandFired = function () {
1318
+ this.commandFired.emit();
1319
+ this.triggers.forEach(function (trigger) {
1320
+ if (trigger.menuOpen) {
1321
+ trigger.closeMenu();
1322
+ }
1323
+ });
1324
+ };
1325
+ return CommandGroupRendererComponent;
1326
+ }(DisposableComponent));
1327
+ CommandGroupRendererComponent.decorators = [
1328
+ { type: i0.Component, args: [{
1329
+ selector: 'aup-command-group-renderer',
1330
+ 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",
1331
+ 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}"]
1332
+ },] }
1333
+ ];
1334
+ CommandGroupRendererComponent.ctorParameters = function () { return []; };
1335
+ CommandGroupRendererComponent.propDecorators = {
1336
+ groupViewDataModel: [{ type: i0.Input }],
1337
+ groupViewData: [{ type: i0.Input }],
1338
+ renderRootNode: [{ type: i0.Input }, { type: i0.HostBinding, args: ['class.render-root',] }],
1339
+ commandFired: [{ type: i0.Output }],
1340
+ triggers: [{ type: i0.ViewChildren, args: [menu.MatMenuTrigger,] }]
1341
+ };
1342
+ __decorate([
1343
+ pectin.TrackExternal(),
1344
+ __metadata("design:type", pectin.ValueModel)
1345
+ ], CommandGroupRendererComponent.prototype, "groupViewDataModel", void 0);
1346
+ __decorate([
1347
+ pectin.StoreInValueModel('groupViewDataModel'),
1348
+ __metadata("design:type", exports.ViewData.GroupData)
1349
+ ], CommandGroupRendererComponent.prototype, "groupViewData", void 0);
1350
+
1271
1351
  var CommandGroupComponent = /** @class */ (function (_super) {
1272
1352
  __extends(CommandGroupComponent, _super);
1273
1353
  function CommandGroupComponent(parent) {
@@ -1486,8 +1566,7 @@
1486
1566
  var MoreMenuComponent = /** @class */ (function (_super) {
1487
1567
  __extends(MoreMenuComponent, _super);
1488
1568
  function MoreMenuComponent(group) {
1489
- var _this = _super.call(this) || this;
1490
- _this.group = group;
1569
+ var _this = _super.call(this, group) || this;
1491
1570
  _this.tooltipModel = new pectin.MutableValueModel();
1492
1571
  var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
1493
1572
  group.xPosition = 'before'; // this should be the default unless overridden by the user.
@@ -1503,18 +1582,12 @@
1503
1582
  }, { allowNil: true });
1504
1583
  return _this;
1505
1584
  }
1506
- MoreMenuComponent.prototype.ngOnInit = function () {
1507
- };
1508
- // @Trace()
1509
- MoreMenuComponent.prototype.ngAfterContentInit = function () {
1510
- this.group.initialise();
1511
- };
1512
1585
  return MoreMenuComponent;
1513
- }(DisposableComponent));
1586
+ }(AbstractPopupMenuComponent));
1514
1587
  MoreMenuComponent.decorators = [
1515
1588
  { type: i0.Component, args: [{
1516
1589
  selector: 'aup-more-menu',
1517
- template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
1590
+ template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate" (commandFired)="closeMenu()"></aup-command-group-renderer>',
1518
1591
  providers: [{ provide: exports.CommandGroup, useFactory: ɵ0 }]
1519
1592
  },] }
1520
1593
  ];
@@ -1536,28 +1609,17 @@
1536
1609
  var PopupMenuComponent = /** @class */ (function (_super) {
1537
1610
  __extends(PopupMenuComponent, _super);
1538
1611
  function PopupMenuComponent(group) {
1539
- var _this = _super.call(this) || this;
1540
- _this.group = group;
1612
+ var _this = _super.call(this, group) || this;
1541
1613
  var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
1542
1614
  group.faceListModel = chain(_this.faceModel).mapToList(function (face) { return [face]; });
1543
1615
  return _this;
1544
1616
  }
1545
- // @Trace()
1546
- PopupMenuComponent.prototype.ngOnInit = function () {
1547
- };
1548
- // @Trace()
1549
- PopupMenuComponent.prototype.ngAfterContentInit = function () {
1550
- this.group.initialise();
1551
- };
1552
- // @Trace()
1553
- PopupMenuComponent.prototype.ngAfterViewInit = function () {
1554
- };
1555
1617
  return PopupMenuComponent;
1556
- }(DisposableComponent));
1618
+ }(AbstractPopupMenuComponent));
1557
1619
  PopupMenuComponent.decorators = [
1558
1620
  { type: i0.Component, args: [{
1559
1621
  selector: 'aup-popup-menu',
1560
- template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
1622
+ template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate" (commandFired)="closeMenu()"></aup-command-group-renderer>',
1561
1623
  providers: [{ provide: exports.CommandGroup, useFactory: ɵ0$1 }]
1562
1624
  },] }
1563
1625
  ];
@@ -3728,7 +3790,8 @@
3728
3790
  SeparatorComponent,
3729
3791
  FlexComponent,
3730
3792
  CommandGroupMenuRendererComponent,
3731
- CommandGroupRendererComponent
3793
+ CommandGroupRendererComponent,
3794
+ AbstractPopupMenuComponent
3732
3795
  ],
3733
3796
  imports: [
3734
3797
  i2.CommonModule,
@@ -8225,6 +8288,7 @@
8225
8288
  exports.AbstractListInputComponent = AbstractListInputComponent;
8226
8289
  exports.AbstractPlaceNavigationComponent = AbstractPlaceNavigationComponent;
8227
8290
  exports.AbstractPopStateNavigation = AbstractPopStateNavigation;
8291
+ exports.AbstractPopupMenuComponent = AbstractPopupMenuComponent;
8228
8292
  exports.AbstractValueInputComponent = AbstractValueInputComponent;
8229
8293
  exports.Activity = Activity;
8230
8294
  exports.ActivityActionsComponent = ActivityActionsComponent;