@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.
- package/CHANGELOG.md +14 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +177 -109
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/abstract-popup-menu.component.js +50 -0
- package/esm2015/lib/components/commands/group/abstract-popup-menu.component.js.map +1 -0
- package/esm2015/lib/components/commands/group/abstract-popup-menu.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/group/abstract-popup-menu.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/group/command-group/command-group.component.js +1 -0
- package/esm2015/lib/components/commands/group/command-group/command-group.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/command-group/command-group.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js +17 -6
- package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js +16 -3
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/command-group.js +2 -0
- package/esm2015/lib/components/commands/group/command-group.js.map +1 -1
- package/esm2015/lib/components/commands/group/more-menu.component.js +4 -11
- package/esm2015/lib/components/commands/group/more-menu.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/more-menu.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/popup-menu.component.js +4 -15
- package/esm2015/lib/components/commands/group/popup-menu.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/popup-menu.component.metadata.json +1 -1
- package/esm2015/lib/components/components.module.js +3 -1
- package/esm2015/lib/components/components.module.js.map +1 -1
- package/esm2015/lib/components/components.module.metadata.json +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/exports.js +1 -0
- package/esm2015/lib/components/exports.js.map +1 -1
- package/esm2015/lib/components/exports.metadata.json +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +160 -105
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/commands/group/abstract-popup-menu.component.d.ts +16 -0
- package/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.d.ts +5 -2
- package/lib/components/commands/group/command-group-renderer/command-group-renderer.component.d.ts +5 -0
- package/lib/components/commands/group/more-menu.component.d.ts +2 -6
- package/lib/components/commands/group/popup-menu.component.d.ts +2 -7
- package/lib/components/exports.d.ts +1 -0
- package/package.json +1 -1
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.6](https://bitbucket.org/coolon/angular-ui-powerups/compare/v3.7.0-alpha.5...v3.7.0-alpha.6) (2020-12-28)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* updated popup menus to track face changes ([5386721](https://bitbucket.org/coolon/angular-ui-powerups/commit/5386721431d5a45356ea4a3317b0a9037e20be72))
|
|
11
|
+
|
|
12
|
+
## [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)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* nested popup menus no closing properly ([85230d0](https://bitbucket.org/coolon/angular-ui-powerups/commit/85230d06787f001d7b92471732ee7d8eb75b4f11))
|
|
18
|
+
|
|
5
19
|
## [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
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() {
|
|
@@ -1234,7 +1151,10 @@
|
|
|
1234
1151
|
var Root = /** @class */ (function (_super) {
|
|
1235
1152
|
__extends(Root, _super);
|
|
1236
1153
|
function Root() {
|
|
1237
|
-
|
|
1154
|
+
var _this = _super.call(this) || this;
|
|
1155
|
+
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;
|
|
1156
|
+
when(_this.faceListModel).changes(function () { return _this.notifyChanged(); });
|
|
1157
|
+
return _this;
|
|
1238
1158
|
}
|
|
1239
1159
|
Root.prototype.isRoot = function () {
|
|
1240
1160
|
return true;
|
|
@@ -1268,6 +1188,169 @@
|
|
|
1268
1188
|
CommandGroup.factory = factory;
|
|
1269
1189
|
})(exports.CommandGroup || (exports.CommandGroup = {}));
|
|
1270
1190
|
|
|
1191
|
+
var AbstractPopupMenuComponent = /** @class */ (function (_super) {
|
|
1192
|
+
__extends(AbstractPopupMenuComponent, _super);
|
|
1193
|
+
function AbstractPopupMenuComponent(group) {
|
|
1194
|
+
var _this = _super.call(this) || this;
|
|
1195
|
+
_this.group = group;
|
|
1196
|
+
return _this;
|
|
1197
|
+
}
|
|
1198
|
+
Object.defineProperty(AbstractPopupMenuComponent.prototype, "xPosition", {
|
|
1199
|
+
get: function () {
|
|
1200
|
+
return this.group.xPosition;
|
|
1201
|
+
},
|
|
1202
|
+
set: function (position) {
|
|
1203
|
+
this.group.xPosition = position;
|
|
1204
|
+
},
|
|
1205
|
+
enumerable: false,
|
|
1206
|
+
configurable: true
|
|
1207
|
+
});
|
|
1208
|
+
Object.defineProperty(AbstractPopupMenuComponent.prototype, "yPosition", {
|
|
1209
|
+
get: function () {
|
|
1210
|
+
return this.group.yPosition;
|
|
1211
|
+
},
|
|
1212
|
+
set: function (position) {
|
|
1213
|
+
this.group.yPosition = position;
|
|
1214
|
+
},
|
|
1215
|
+
enumerable: false,
|
|
1216
|
+
configurable: true
|
|
1217
|
+
});
|
|
1218
|
+
AbstractPopupMenuComponent.prototype.ngAfterContentInit = function () {
|
|
1219
|
+
this.group.initialise();
|
|
1220
|
+
};
|
|
1221
|
+
AbstractPopupMenuComponent.prototype.ngOnInit = function () {
|
|
1222
|
+
};
|
|
1223
|
+
// @Trace()
|
|
1224
|
+
AbstractPopupMenuComponent.prototype.closeMenu = function () {
|
|
1225
|
+
this.triggers.forEach(function (trigger) {
|
|
1226
|
+
if (trigger.menuOpen) {
|
|
1227
|
+
trigger.closeMenu();
|
|
1228
|
+
}
|
|
1229
|
+
});
|
|
1230
|
+
};
|
|
1231
|
+
return AbstractPopupMenuComponent;
|
|
1232
|
+
}(DisposableComponent));
|
|
1233
|
+
AbstractPopupMenuComponent.decorators = [
|
|
1234
|
+
{ type: i0.Component, args: [{
|
|
1235
|
+
selector: 'aup-abstract-popup-menu-component',
|
|
1236
|
+
template: ''
|
|
1237
|
+
},] }
|
|
1238
|
+
];
|
|
1239
|
+
AbstractPopupMenuComponent.ctorParameters = function () { return [
|
|
1240
|
+
{ type: exports.CommandGroup }
|
|
1241
|
+
]; };
|
|
1242
|
+
AbstractPopupMenuComponent.propDecorators = {
|
|
1243
|
+
xPosition: [{ type: i0.Input }],
|
|
1244
|
+
yPosition: [{ type: i0.Input }],
|
|
1245
|
+
triggers: [{ type: i0.ViewChildren, args: [menu.MatMenuTrigger,] }]
|
|
1246
|
+
};
|
|
1247
|
+
|
|
1248
|
+
(function (TrackBy) {
|
|
1249
|
+
TrackBy.byIndex = function (data, index) { return index; };
|
|
1250
|
+
})(exports.TrackBy || (exports.TrackBy = {}));
|
|
1251
|
+
|
|
1252
|
+
var CommandGroupMenuRendererComponent = /** @class */ (function (_super) {
|
|
1253
|
+
__extends(CommandGroupMenuRendererComponent, _super);
|
|
1254
|
+
function CommandGroupMenuRendererComponent(parent) {
|
|
1255
|
+
var _this = _super.call(this) || this;
|
|
1256
|
+
_this.parent = parent;
|
|
1257
|
+
_this.groupViewDataModel = new pectin.MutableValueModel();
|
|
1258
|
+
_this.commandFired = new i0.EventEmitter();
|
|
1259
|
+
_this.ViewData = exports.ViewData;
|
|
1260
|
+
_this.TrackBy = exports.TrackBy;
|
|
1261
|
+
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;
|
|
1262
|
+
_this.children = chain(_this.groupViewDataModel).pluckList('children');
|
|
1263
|
+
_this.hasMixedIcons = chain(_this.groupViewDataModel).pluck('hasMixedIcons');
|
|
1264
|
+
return _this;
|
|
1265
|
+
}
|
|
1266
|
+
CommandGroupMenuRendererComponent.prototype.executeCommand = function (data) {
|
|
1267
|
+
var _this = this;
|
|
1268
|
+
exports.ViewData.getCommand(data).execute().finally(function () {
|
|
1269
|
+
_this.commandFired.emit();
|
|
1270
|
+
});
|
|
1271
|
+
};
|
|
1272
|
+
CommandGroupMenuRendererComponent.prototype.isEnabled = function (data) {
|
|
1273
|
+
return exports.ViewData.getCommand(data).enabled.value;
|
|
1274
|
+
};
|
|
1275
|
+
// @Trace()
|
|
1276
|
+
CommandGroupMenuRendererComponent.prototype.onCommandFired = function () {
|
|
1277
|
+
this.commandFired.emit();
|
|
1278
|
+
this.triggers.forEach(function (trigger) {
|
|
1279
|
+
if (trigger.menuOpen) {
|
|
1280
|
+
trigger.closeMenu();
|
|
1281
|
+
}
|
|
1282
|
+
});
|
|
1283
|
+
};
|
|
1284
|
+
return CommandGroupMenuRendererComponent;
|
|
1285
|
+
}(DisposableComponent));
|
|
1286
|
+
CommandGroupMenuRendererComponent.decorators = [
|
|
1287
|
+
{ type: i0.Component, args: [{
|
|
1288
|
+
selector: 'aup-command-group-menu',
|
|
1289
|
+
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"
|
|
1290
|
+
},] }
|
|
1291
|
+
];
|
|
1292
|
+
CommandGroupMenuRendererComponent.ctorParameters = function () { return [
|
|
1293
|
+
{ type: CommandGroupMenuRendererComponent, decorators: [{ type: i0.Optional }, { type: i0.SkipSelf }] }
|
|
1294
|
+
]; };
|
|
1295
|
+
CommandGroupMenuRendererComponent.propDecorators = {
|
|
1296
|
+
menuComponent: [{ type: i0.ViewChild, args: ['menu', { static: true },] }],
|
|
1297
|
+
groupViewData: [{ type: i0.Input }],
|
|
1298
|
+
commandFired: [{ type: i0.Output }],
|
|
1299
|
+
triggers: [{ type: i0.ViewChildren, args: [menu.MatMenuTrigger,] }]
|
|
1300
|
+
};
|
|
1301
|
+
__decorate([
|
|
1302
|
+
pectin.StoreInValueModel('groupViewDataModel'),
|
|
1303
|
+
__metadata("design:type", exports.ViewData.GroupData)
|
|
1304
|
+
], CommandGroupMenuRendererComponent.prototype, "groupViewData", void 0);
|
|
1305
|
+
|
|
1306
|
+
var CommandGroupRendererComponent = /** @class */ (function (_super) {
|
|
1307
|
+
__extends(CommandGroupRendererComponent, _super);
|
|
1308
|
+
function CommandGroupRendererComponent() {
|
|
1309
|
+
var _this = _super.call(this) || this;
|
|
1310
|
+
_this.renderRootNode = true;
|
|
1311
|
+
_this.commandFired = new i0.EventEmitter();
|
|
1312
|
+
_this.ViewData = exports.ViewData;
|
|
1313
|
+
_this.TrackBy = exports.TrackBy;
|
|
1314
|
+
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;
|
|
1315
|
+
_this.childViewDataModels = chain(_this.groupViewDataModel)
|
|
1316
|
+
.pluckList('children');
|
|
1317
|
+
return _this;
|
|
1318
|
+
}
|
|
1319
|
+
// @Trace()
|
|
1320
|
+
CommandGroupRendererComponent.prototype.onCommandFired = function () {
|
|
1321
|
+
this.commandFired.emit();
|
|
1322
|
+
this.triggers.forEach(function (trigger) {
|
|
1323
|
+
if (trigger.menuOpen) {
|
|
1324
|
+
trigger.closeMenu();
|
|
1325
|
+
}
|
|
1326
|
+
});
|
|
1327
|
+
};
|
|
1328
|
+
return CommandGroupRendererComponent;
|
|
1329
|
+
}(DisposableComponent));
|
|
1330
|
+
CommandGroupRendererComponent.decorators = [
|
|
1331
|
+
{ type: i0.Component, args: [{
|
|
1332
|
+
selector: 'aup-command-group-renderer',
|
|
1333
|
+
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",
|
|
1334
|
+
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}"]
|
|
1335
|
+
},] }
|
|
1336
|
+
];
|
|
1337
|
+
CommandGroupRendererComponent.ctorParameters = function () { return []; };
|
|
1338
|
+
CommandGroupRendererComponent.propDecorators = {
|
|
1339
|
+
groupViewDataModel: [{ type: i0.Input }],
|
|
1340
|
+
groupViewData: [{ type: i0.Input }],
|
|
1341
|
+
renderRootNode: [{ type: i0.Input }, { type: i0.HostBinding, args: ['class.render-root',] }],
|
|
1342
|
+
commandFired: [{ type: i0.Output }],
|
|
1343
|
+
triggers: [{ type: i0.ViewChildren, args: [menu.MatMenuTrigger,] }]
|
|
1344
|
+
};
|
|
1345
|
+
__decorate([
|
|
1346
|
+
pectin.TrackExternal(),
|
|
1347
|
+
__metadata("design:type", pectin.ValueModel)
|
|
1348
|
+
], CommandGroupRendererComponent.prototype, "groupViewDataModel", void 0);
|
|
1349
|
+
__decorate([
|
|
1350
|
+
pectin.StoreInValueModel('groupViewDataModel'),
|
|
1351
|
+
__metadata("design:type", exports.ViewData.GroupData)
|
|
1352
|
+
], CommandGroupRendererComponent.prototype, "groupViewData", void 0);
|
|
1353
|
+
|
|
1271
1354
|
var CommandGroupComponent = /** @class */ (function (_super) {
|
|
1272
1355
|
__extends(CommandGroupComponent, _super);
|
|
1273
1356
|
function CommandGroupComponent(parent) {
|
|
@@ -1278,6 +1361,7 @@
|
|
|
1278
1361
|
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;
|
|
1279
1362
|
_this.faceListModel = chain(_this.faceModel).mapToList(function (v) { return [v]; });
|
|
1280
1363
|
_this.parent.registerGroup(_this, _this.faceListModel);
|
|
1364
|
+
when(_this.faceListModel).changes(function () { return _this.notifyChanged(); });
|
|
1281
1365
|
return _this;
|
|
1282
1366
|
}
|
|
1283
1367
|
return CommandGroupComponent;
|
|
@@ -1486,8 +1570,7 @@
|
|
|
1486
1570
|
var MoreMenuComponent = /** @class */ (function (_super) {
|
|
1487
1571
|
__extends(MoreMenuComponent, _super);
|
|
1488
1572
|
function MoreMenuComponent(group) {
|
|
1489
|
-
var _this = _super.call(this) || this;
|
|
1490
|
-
_this.group = group;
|
|
1573
|
+
var _this = _super.call(this, group) || this;
|
|
1491
1574
|
_this.tooltipModel = new pectin.MutableValueModel();
|
|
1492
1575
|
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
1576
|
group.xPosition = 'before'; // this should be the default unless overridden by the user.
|
|
@@ -1503,18 +1586,12 @@
|
|
|
1503
1586
|
}, { allowNil: true });
|
|
1504
1587
|
return _this;
|
|
1505
1588
|
}
|
|
1506
|
-
MoreMenuComponent.prototype.ngOnInit = function () {
|
|
1507
|
-
};
|
|
1508
|
-
// @Trace()
|
|
1509
|
-
MoreMenuComponent.prototype.ngAfterContentInit = function () {
|
|
1510
|
-
this.group.initialise();
|
|
1511
|
-
};
|
|
1512
1589
|
return MoreMenuComponent;
|
|
1513
|
-
}(
|
|
1590
|
+
}(AbstractPopupMenuComponent));
|
|
1514
1591
|
MoreMenuComponent.decorators = [
|
|
1515
1592
|
{ type: i0.Component, args: [{
|
|
1516
1593
|
selector: 'aup-more-menu',
|
|
1517
|
-
template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
|
|
1594
|
+
template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate" (commandFired)="closeMenu()"></aup-command-group-renderer>',
|
|
1518
1595
|
providers: [{ provide: exports.CommandGroup, useFactory: ɵ0 }]
|
|
1519
1596
|
},] }
|
|
1520
1597
|
];
|
|
@@ -1536,28 +1613,17 @@
|
|
|
1536
1613
|
var PopupMenuComponent = /** @class */ (function (_super) {
|
|
1537
1614
|
__extends(PopupMenuComponent, _super);
|
|
1538
1615
|
function PopupMenuComponent(group) {
|
|
1539
|
-
var _this = _super.call(this) || this;
|
|
1540
|
-
_this.group = group;
|
|
1616
|
+
var _this = _super.call(this, group) || this;
|
|
1541
1617
|
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
1618
|
group.faceListModel = chain(_this.faceModel).mapToList(function (face) { return [face]; });
|
|
1543
1619
|
return _this;
|
|
1544
1620
|
}
|
|
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
1621
|
return PopupMenuComponent;
|
|
1556
|
-
}(
|
|
1622
|
+
}(AbstractPopupMenuComponent));
|
|
1557
1623
|
PopupMenuComponent.decorators = [
|
|
1558
1624
|
{ type: i0.Component, args: [{
|
|
1559
1625
|
selector: 'aup-popup-menu',
|
|
1560
|
-
template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
|
|
1626
|
+
template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate" (commandFired)="closeMenu()"></aup-command-group-renderer>',
|
|
1561
1627
|
providers: [{ provide: exports.CommandGroup, useFactory: ɵ0$1 }]
|
|
1562
1628
|
},] }
|
|
1563
1629
|
];
|
|
@@ -3728,7 +3794,8 @@
|
|
|
3728
3794
|
SeparatorComponent,
|
|
3729
3795
|
FlexComponent,
|
|
3730
3796
|
CommandGroupMenuRendererComponent,
|
|
3731
|
-
CommandGroupRendererComponent
|
|
3797
|
+
CommandGroupRendererComponent,
|
|
3798
|
+
AbstractPopupMenuComponent
|
|
3732
3799
|
],
|
|
3733
3800
|
imports: [
|
|
3734
3801
|
i2.CommonModule,
|
|
@@ -8225,6 +8292,7 @@
|
|
|
8225
8292
|
exports.AbstractListInputComponent = AbstractListInputComponent;
|
|
8226
8293
|
exports.AbstractPlaceNavigationComponent = AbstractPlaceNavigationComponent;
|
|
8227
8294
|
exports.AbstractPopStateNavigation = AbstractPopStateNavigation;
|
|
8295
|
+
exports.AbstractPopupMenuComponent = AbstractPopupMenuComponent;
|
|
8228
8296
|
exports.AbstractValueInputComponent = AbstractValueInputComponent;
|
|
8229
8297
|
exports.Activity = Activity;
|
|
8230
8298
|
exports.ActivityActionsComponent = ActivityActionsComponent;
|