@coolon/angular-ui-powerups 3.7.0-alpha.3 → 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 (42) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/bundles/coolon-angular-ui-powerups.umd.js +206 -147
  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/esm2015/lib/place/guards/place.guard.js +15 -15
  33. package/esm2015/lib/place/guards/place.guard.js.map +1 -1
  34. package/fesm2015/coolon-angular-ui-powerups.js +172 -120
  35. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  36. package/lib/components/commands/group/abstract-popup-menu.component.d.ts +16 -0
  37. package/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.d.ts +5 -2
  38. package/lib/components/commands/group/command-group-renderer/command-group-renderer.component.d.ts +5 -0
  39. package/lib/components/commands/group/more-menu.component.d.ts +2 -6
  40. package/lib/components/commands/group/popup-menu.component.d.ts +2 -7
  41. package/lib/components/exports.d.ts +1 -0
  42. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
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
+
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)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * routing to not check authorisation for guest places ([f4a7024](https://bitbucket.org/coolon/angular-ui-powerups/commit/f4a70246ecc40a0103dfe1ff8893536bb6efa963))
18
+
5
19
  ## [3.7.0-alpha.3](https://bitbucket.org/coolon/angular-ui-powerups/compare/v3.7.0-alpha.2...v3.7.0-alpha.3) (2020-12-16)
6
20
 
7
21
 
@@ -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,
@@ -7966,23 +8029,17 @@
7966
8029
  // @Trace()
7967
8030
  PlaceGuard.prototype.canActivate = function (activatedRoute, state) {
7968
8031
  return __awaiter(this, void 0, void 0, function () {
7969
- var placeDefinition_1, needsAuth, proceed, _a, redirectLocation, nextPlaceDef, redirectLocation, nextPlaceDef, result;
8032
+ var placeDefinition_1, redirectLocation, nextPlaceDef, redirectLocation, nextPlaceDef, result;
7970
8033
  var _this = this;
7971
- return __generator(this, function (_b) {
7972
- switch (_b.label) {
8034
+ return __generator(this, function (_a) {
8035
+ switch (_a.label) {
7973
8036
  case 0:
7974
8037
  if (!exports.PlaceComponent.isPlaceComponentConstructor(activatedRoute.component)) return [3 /*break*/, 4];
7975
8038
  placeDefinition_1 = exports.PlaceComponent.getDefinition(activatedRoute.component);
7976
- needsAuth = placeDefinition_1.authenticate;
7977
- _a = !needsAuth;
7978
- if (_a) return [3 /*break*/, 2];
8039
+ if (!placeDefinition_1.authenticate) return [3 /*break*/, 2];
7979
8040
  return [4 /*yield*/, this.placeAuthService.isAuthenticated()];
7980
8041
  case 1:
7981
- _a = (_b.sent());
7982
- _b.label = 2;
7983
- case 2:
7984
- proceed = _a;
7985
- if (!proceed) {
8042
+ if (!(_a.sent())) {
7986
8043
  redirectLocation = this.placeAuthService.handleNotAuthenticated(activatedRoute, state);
7987
8044
  nextPlaceDef = this.getPlaceDefinition(redirectLocation);
7988
8045
  if (nextPlaceDef.authenticate) {
@@ -7998,35 +8055,36 @@
7998
8055
  }
7999
8056
  return [2 /*return*/, this.createUrlTree(redirectLocation)];
8000
8057
  }
8001
- return [4 /*yield*/, this.cleanInteractionState(activatedRoute, state, function () { return __awaiter(_this, void 0, void 0, function () {
8002
- var params, parsedParams, navigationSession, initialVisit, sanitiser, sanitisedVisit, urlSnapshot;
8003
- return __generator(this, function (_a) {
8004
- switch (_a.label) {
8005
- case 0:
8006
- params = new ConsolidatedParameterMap(activatedRoute.paramMap, activatedRoute.url);
8007
- parsedParams = placeDefinition_1.parseRouteParams(params);
8008
- navigationSession = this.placeRouter.navigationSession;
8009
- initialVisit = navigationSession.getVisitFor(placeDefinition_1) || new Visit(placeDefinition_1, parsedParams);
8010
- sanitiser = new VisitSanitiser(navigationSession, activatedRoute, this.router, this.placeHistory, this.injector);
8011
- return [4 /*yield*/, sanitiser.sanitise(initialVisit.mergeRouteParameters(parsedParams))];
8012
- case 1:
8013
- sanitisedVisit = _a.sent();
8014
- // Save the visit with any updated parameters. We need to save it so we remember any non route parameters
8015
- navigationSession.storeVisit(sanitisedVisit);
8016
- if (initialVisit.hasRoutingChangedFrom(sanitisedVisit)) {
8017
- urlSnapshot = this.urlService.parseUrl(state.url).updateVisitSegments(sanitisedVisit);
8018
- // console.log('##### Place Guard Redirect', urlSnapshot);
8019
- return [2 /*return*/, urlSnapshot];
8020
- }
8021
- else {
8022
- return [2 /*return*/, true];
8023
- }
8024
- return [2 /*return*/];
8025
- }
8026
- });
8027
- }); })];
8058
+ _a.label = 2;
8059
+ case 2: return [4 /*yield*/, this.cleanInteractionState(activatedRoute, state, function () { return __awaiter(_this, void 0, void 0, function () {
8060
+ var params, parsedParams, navigationSession, initialVisit, sanitiser, sanitisedVisit, urlSnapshot;
8061
+ return __generator(this, function (_a) {
8062
+ switch (_a.label) {
8063
+ case 0:
8064
+ params = new ConsolidatedParameterMap(activatedRoute.paramMap, activatedRoute.url);
8065
+ parsedParams = placeDefinition_1.parseRouteParams(params);
8066
+ navigationSession = this.placeRouter.navigationSession;
8067
+ initialVisit = navigationSession.getVisitFor(placeDefinition_1) || new Visit(placeDefinition_1, parsedParams);
8068
+ sanitiser = new VisitSanitiser(navigationSession, activatedRoute, this.router, this.placeHistory, this.injector);
8069
+ return [4 /*yield*/, sanitiser.sanitise(initialVisit.mergeRouteParameters(parsedParams))];
8070
+ case 1:
8071
+ sanitisedVisit = _a.sent();
8072
+ // Save the visit with any updated parameters. We need to save it so we remember any non route parameters
8073
+ navigationSession.storeVisit(sanitisedVisit);
8074
+ if (initialVisit.hasRoutingChangedFrom(sanitisedVisit)) {
8075
+ urlSnapshot = this.urlService.parseUrl(state.url).updateVisitSegments(sanitisedVisit);
8076
+ // console.log('##### Place Guard Redirect', urlSnapshot);
8077
+ return [2 /*return*/, urlSnapshot];
8078
+ }
8079
+ else {
8080
+ return [2 /*return*/, true];
8081
+ }
8082
+ return [2 /*return*/];
8083
+ }
8084
+ });
8085
+ }); })];
8028
8086
  case 3:
8029
- result = _b.sent();
8087
+ result = _a.sent();
8030
8088
  return [2 /*return*/, result instanceof exports.UrlSnapshot ? result.urlTree : result];
8031
8089
  case 4: return [2 /*return*/, pectin.lang.illegalState("expected component to be an instance of PlaceComponent, got " + activatedRoute.component)];
8032
8090
  }
@@ -8230,6 +8288,7 @@
8230
8288
  exports.AbstractListInputComponent = AbstractListInputComponent;
8231
8289
  exports.AbstractPlaceNavigationComponent = AbstractPlaceNavigationComponent;
8232
8290
  exports.AbstractPopStateNavigation = AbstractPopStateNavigation;
8291
+ exports.AbstractPopupMenuComponent = AbstractPopupMenuComponent;
8233
8292
  exports.AbstractValueInputComponent = AbstractValueInputComponent;
8234
8293
  exports.Activity = Activity;
8235
8294
  exports.ActivityActionsComponent = ActivityActionsComponent;