@coolon/angular-ui-powerups 3.7.0-alpha.7 → 3.7.0-alpha.9

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 (112) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/bundles/coolon-angular-ui-powerups.umd.js +325 -649
  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/angular-ui-powerups.module.ngfactory.js.map +1 -1
  8. package/esm2015/lib/components/commands/command/command.component.js +11 -13
  9. package/esm2015/lib/components/commands/command/command.component.js.map +1 -1
  10. package/esm2015/lib/components/commands/command/command.component.metadata.json +1 -1
  11. package/esm2015/lib/components/commands/flex.component.js +2 -9
  12. package/esm2015/lib/components/commands/flex.component.js.map +1 -1
  13. package/esm2015/lib/components/commands/flex.component.metadata.json +1 -1
  14. package/esm2015/lib/components/commands/group/command-container.js +21 -0
  15. package/esm2015/lib/components/commands/group/command-container.js.map +1 -0
  16. package/esm2015/lib/components/commands/group/command-container.metadata.json +1 -0
  17. package/esm2015/lib/components/commands/group/popup-aware.component.js +23 -0
  18. package/esm2015/lib/components/commands/group/popup-aware.component.js.map +1 -0
  19. package/esm2015/lib/components/commands/group/popup-aware.component.metadata.json +1 -0
  20. package/esm2015/lib/components/commands/group/popup-container.js +3 -0
  21. package/esm2015/lib/components/commands/group/popup-container.js.map +1 -0
  22. package/esm2015/lib/components/commands/group/popup-container.metadata.json +1 -0
  23. package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.js +67 -0
  24. package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.js.map +1 -0
  25. package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.metadata.json +1 -0
  26. package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.ngfactory.js.map +1 -0
  27. package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.js +47 -0
  28. package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.js.map +1 -0
  29. package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.metadata.json +1 -0
  30. package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.ngfactory.js.map +1 -0
  31. package/esm2015/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.js +90 -0
  32. package/esm2015/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.js.map +1 -0
  33. package/esm2015/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.metadata.json +1 -0
  34. package/esm2015/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.ngfactory.js.map +1 -0
  35. package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.js +42 -0
  36. package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.js.map +1 -0
  37. package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.metadata.json +1 -0
  38. package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.ngfactory.js.map +1 -0
  39. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.js +12 -16
  40. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.js.map +1 -1
  41. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.metadata.json +1 -1
  42. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.scss.ngstyle.js.map +1 -0
  43. package/esm2015/lib/components/commands/separator.component.js +25 -14
  44. package/esm2015/lib/components/commands/separator.component.js.map +1 -1
  45. package/esm2015/lib/components/commands/separator.component.metadata.json +1 -1
  46. package/esm2015/lib/components/components.module.js +6 -11
  47. package/esm2015/lib/components/components.module.js.map +1 -1
  48. package/esm2015/lib/components/components.module.metadata.json +1 -1
  49. package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
  50. package/esm2015/lib/components/exports.js +7 -9
  51. package/esm2015/lib/components/exports.js.map +1 -1
  52. package/esm2015/lib/components/exports.metadata.json +1 -1
  53. package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
  54. package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
  55. package/fesm2015/coolon-angular-ui-powerups.js +302 -575
  56. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  57. package/lib/components/commands/command/command.component.d.ts +5 -6
  58. package/lib/components/commands/flex.component.d.ts +1 -3
  59. package/lib/components/commands/group/command-container.d.ts +16 -0
  60. package/lib/components/commands/group/popup-aware.component.d.ts +11 -0
  61. package/lib/components/commands/group/popup-container.d.ts +6 -0
  62. package/lib/components/commands/group/popup-menu/abstract-popup-menu.component.d.ts +24 -0
  63. package/lib/components/commands/group/popup-menu/more-menu.component.d.ts +12 -0
  64. package/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.d.ts +33 -0
  65. package/lib/components/commands/group/{popup-menu.component.d.ts → popup-menu/popup-menu.component.d.ts} +4 -3
  66. package/lib/components/commands/group/tool-bar/tool-bar.component.d.ts +4 -5
  67. package/lib/components/commands/separator.component.d.ts +8 -7
  68. package/lib/components/exports.d.ts +7 -9
  69. package/package.json +1 -1
  70. package/esm2015/lib/components/commands/group/abstract-popup-menu.component.js +0 -51
  71. package/esm2015/lib/components/commands/group/abstract-popup-menu.component.js.map +0 -1
  72. package/esm2015/lib/components/commands/group/abstract-popup-menu.component.metadata.json +0 -1
  73. package/esm2015/lib/components/commands/group/abstract-popup-menu.component.ngfactory.js.map +0 -1
  74. package/esm2015/lib/components/commands/group/command-group/command-group.component.js +0 -44
  75. package/esm2015/lib/components/commands/group/command-group/command-group.component.js.map +0 -1
  76. package/esm2015/lib/components/commands/group/command-group/command-group.component.metadata.json +0 -1
  77. package/esm2015/lib/components/commands/group/command-group/command-group.component.ngfactory.js.map +0 -1
  78. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js +0 -57
  79. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js.map +0 -1
  80. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.metadata.json +0 -1
  81. package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.ngfactory.js.map +0 -1
  82. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js +0 -52
  83. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js.map +0 -1
  84. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.metadata.json +0 -1
  85. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.ngfactory.js.map +0 -1
  86. package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.scss.shim.ngstyle.js.map +0 -1
  87. package/esm2015/lib/components/commands/group/command-group.js +0 -114
  88. package/esm2015/lib/components/commands/group/command-group.js.map +0 -1
  89. package/esm2015/lib/components/commands/group/command-group.metadata.json +0 -1
  90. package/esm2015/lib/components/commands/group/more-menu.component.js +0 -46
  91. package/esm2015/lib/components/commands/group/more-menu.component.js.map +0 -1
  92. package/esm2015/lib/components/commands/group/more-menu.component.metadata.json +0 -1
  93. package/esm2015/lib/components/commands/group/more-menu.component.ngfactory.js.map +0 -1
  94. package/esm2015/lib/components/commands/group/popup-menu.component.js +0 -41
  95. package/esm2015/lib/components/commands/group/popup-menu.component.js.map +0 -1
  96. package/esm2015/lib/components/commands/group/popup-menu.component.metadata.json +0 -1
  97. package/esm2015/lib/components/commands/group/popup-menu.component.ngfactory.js.map +0 -1
  98. package/esm2015/lib/components/commands/group/registration.js +0 -58
  99. package/esm2015/lib/components/commands/group/registration.js.map +0 -1
  100. package/esm2015/lib/components/commands/group/registration.metadata.json +0 -1
  101. package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.scss.shim.ngstyle.js.map +0 -1
  102. package/esm2015/lib/components/commands/group/view-data.js +0 -113
  103. package/esm2015/lib/components/commands/group/view-data.js.map +0 -1
  104. package/esm2015/lib/components/commands/group/view-data.metadata.json +0 -1
  105. package/lib/components/commands/group/abstract-popup-menu.component.d.ts +0 -16
  106. package/lib/components/commands/group/command-group/command-group.component.d.ts +0 -12
  107. package/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.d.ts +0 -24
  108. package/lib/components/commands/group/command-group-renderer/command-group-renderer.component.d.ts +0 -18
  109. package/lib/components/commands/group/command-group.d.ts +0 -42
  110. package/lib/components/commands/group/more-menu.component.d.ts +0 -10
  111. package/lib/components/commands/group/registration.d.ts +0 -32
  112. package/lib/components/commands/group/view-data.d.ts +0 -41
@@ -713,6 +713,10 @@
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
+
716
720
  (function (CommandFace) {
717
721
  var Position;
718
722
  (function (Position) {
@@ -853,437 +857,328 @@
853
857
  CommandFace.Adapter = Adapter;
854
858
  })(exports.CommandFace || (exports.CommandFace = {}));
855
859
 
856
- exports.ViewData = /** @class */ (function () {
857
- function ViewData() {
858
- }
859
- return ViewData;
860
- }());
861
- (function (ViewData) {
862
- var FaceData = /** @class */ (function (_super) {
863
- __extends(FaceData, _super);
864
- function FaceData(faces) {
865
- var _this = _super.call(this) || this;
866
- _this.faces = faces;
867
- pectin.assert.notNil(faces);
868
- return _this;
869
- }
870
- Object.defineProperty(FaceData.prototype, "activeFaceAdapter", {
871
- get: function () {
872
- return new exports.CommandFace.Adapter(this.faces.length > 0 ? this.faces[0] : undefined);
873
- },
874
- enumerable: false,
875
- configurable: true
876
- });
877
- return FaceData;
878
- }(ViewData));
879
- __decorate([
880
- src.Memoize(),
881
- __metadata("design:type", exports.CommandFace.Adapter),
882
- __metadata("design:paramtypes", [])
883
- ], FaceData.prototype, "activeFaceAdapter", null);
884
- ViewData.FaceData = FaceData;
885
- var GroupData = /** @class */ (function (_super) {
886
- __extends(GroupData, _super);
887
- function GroupData(faces, xPosition, yPosition, children) {
888
- var _this = _super.call(this, faces) || this;
889
- _this.xPosition = xPosition;
890
- _this.yPosition = yPosition;
891
- _this.children = children;
892
- return _this;
893
- }
894
- Object.defineProperty(GroupData.prototype, "hasMixedIcons", {
895
- get: function () {
896
- var hasFaces = this.children.filter(function (c) { return ViewData.hasFace(c); });
897
- var iconCount = hasFaces.filter(function (c) { return !!c.activeFaceAdapter.icon; }).length;
898
- return iconCount > 0 && hasFaces.length !== iconCount;
899
- },
900
- enumerable: false,
901
- configurable: true
902
- });
903
- return GroupData;
904
- }(FaceData));
905
- __decorate([
906
- src.Memoize(),
907
- __metadata("design:type", Boolean),
908
- __metadata("design:paramtypes", [])
909
- ], GroupData.prototype, "hasMixedIcons", null);
910
- ViewData.GroupData = GroupData;
911
- var CommandData = /** @class */ (function (_super) {
912
- __extends(CommandData, _super);
913
- function CommandData(command, faces) {
914
- var _this = _super.call(this, faces) || this;
915
- _this.command = command;
916
- return _this;
917
- }
918
- return CommandData;
919
- }(FaceData));
920
- ViewData.CommandData = CommandData;
921
- var SeparatorData = /** @class */ (function (_super) {
922
- __extends(SeparatorData, _super);
923
- function SeparatorData() {
924
- return _super !== null && _super.apply(this, arguments) || this;
925
- }
926
- return SeparatorData;
927
- }(ViewData));
928
- ViewData.SeparatorData = SeparatorData;
929
- var FlexData = /** @class */ (function (_super) {
930
- __extends(FlexData, _super);
931
- function FlexData() {
932
- return _super !== null && _super.apply(this, arguments) || this;
933
- }
934
- return FlexData;
935
- }(ViewData));
936
- ViewData.FlexData = FlexData;
937
- function as(type, viewData) {
938
- return viewData instanceof type ? viewData : pectin.lang.illegalState("expected instance of " + type.name + ", got " + viewData.constructor.name);
939
- }
940
- ViewData.as = as;
941
- function getCommand(data) {
942
- return as(CommandData, data).command;
943
- }
944
- ViewData.getCommand = getCommand;
945
- function getTooltip(data) {
946
- return as(FaceData, data).activeFaceAdapter.tooltip;
947
- }
948
- ViewData.getTooltip = getTooltip;
949
- function getStyle(data) {
950
- return as(FaceData, data).activeFaceAdapter.style;
951
- }
952
- ViewData.getStyle = getStyle;
953
- function getColor(data) {
954
- return as(FaceData, data).activeFaceAdapter.color;
955
- }
956
- ViewData.getColor = getColor;
957
- function hasText(data) {
958
- return !!as(FaceData, data).activeFaceAdapter.text;
959
- }
960
- ViewData.hasText = hasText;
961
- function getFaces(data) {
962
- return as(FaceData, data).faces;
963
- }
964
- ViewData.getFaces = getFaces;
965
- function asGroup(viewData) {
966
- return as(GroupData, viewData);
967
- }
968
- ViewData.asGroup = asGroup;
969
- function hasMixedIcons(data) {
970
- return as(GroupData, data).hasMixedIcons;
971
- }
972
- ViewData.hasMixedIcons = hasMixedIcons;
973
- function isGroup(data) {
974
- return data instanceof GroupData;
975
- }
976
- ViewData.isGroup = isGroup;
977
- function hasFace(data) {
978
- return data instanceof FaceData;
979
- }
980
- ViewData.hasFace = hasFace;
981
- function isCommand(data) {
982
- return data instanceof CommandData;
983
- }
984
- ViewData.isCommand = isCommand;
985
- function isSeparator(data) {
986
- return data instanceof SeparatorData;
987
- }
988
- ViewData.isSeparator = isSeparator;
989
- function isFlex(data) {
990
- return data instanceof FlexData;
991
- }
992
- ViewData.isFlex = isFlex;
993
- })(exports.ViewData || (exports.ViewData = {}));
994
-
995
- exports.Registration = /** @class */ (function (_super) {
996
- __extends(Registration, _super);
997
- function Registration() {
998
- return _super !== null && _super.apply(this, arguments) || this;
999
- }
1000
- return Registration;
1001
- }(pectin.GarbageCollector));
1002
- (function (Registration) {
1003
- var FaceRegistration = /** @class */ (function (_super) {
1004
- __extends(FaceRegistration, _super);
1005
- function FaceRegistration(faceListModel) {
1006
- var _this = _super.call(this) || this;
1007
- _this.faceListModel = faceListModel;
1008
- return _this;
1009
- }
1010
- return FaceRegistration;
1011
- }(Registration));
1012
- Registration.FaceRegistration = FaceRegistration;
1013
- var CommandRegistration = /** @class */ (function (_super) {
1014
- __extends(CommandRegistration, _super);
1015
- function CommandRegistration(command, faceListModel) {
1016
- var _this = _super.call(this, faceListModel) || this;
1017
- _this.command = command;
1018
- return _this;
1019
- }
1020
- CommandRegistration.prototype.toTemplate = function () {
1021
- return new exports.ViewData.CommandData(this.command, this.faceListModel.value);
1022
- };
1023
- return CommandRegistration;
1024
- }(FaceRegistration));
1025
- Registration.CommandRegistration = CommandRegistration;
1026
- var GroupRegistration = /** @class */ (function (_super) {
1027
- __extends(GroupRegistration, _super);
1028
- function GroupRegistration(faceModel, group) {
1029
- var _this = _super.call(this, faceModel) || this;
1030
- _this.group = group;
1031
- return _this;
1032
- }
1033
- GroupRegistration.prototype.toTemplate = function () {
1034
- return new exports.ViewData.GroupData(this.faceListModel.value, this.group.xPosition, this.group.yPosition, this.group.registrations.value.map(function (r) { return r.toTemplate(); }));
1035
- };
1036
- return GroupRegistration;
1037
- }(FaceRegistration));
1038
- Registration.GroupRegistration = GroupRegistration;
1039
- var SeparatorRegistration = /** @class */ (function (_super) {
1040
- __extends(SeparatorRegistration, _super);
1041
- function SeparatorRegistration() {
1042
- var _this = _super.apply(this, __spread(arguments)) || this;
1043
- _this.template = new exports.ViewData.SeparatorData();
1044
- return _this;
1045
- }
1046
- SeparatorRegistration.prototype.toTemplate = function () {
1047
- return this.template;
1048
- };
1049
- return SeparatorRegistration;
1050
- }(Registration));
1051
- Registration.SeparatorRegistration = SeparatorRegistration;
1052
- var FlexRegistration = /** @class */ (function (_super) {
1053
- __extends(FlexRegistration, _super);
1054
- function FlexRegistration() {
1055
- var _this = _super.apply(this, __spread(arguments)) || this;
1056
- _this.template = new exports.ViewData.FlexData();
1057
- return _this;
1058
- }
1059
- FlexRegistration.prototype.toTemplate = function () {
1060
- return this.template;
1061
- };
1062
- return FlexRegistration;
1063
- }(Registration));
1064
- Registration.FlexRegistration = FlexRegistration;
1065
- function hasFace(entry) {
1066
- return entry instanceof CommandRegistration || entry instanceof GroupRegistration;
1067
- }
1068
- Registration.hasFace = hasFace;
1069
- })(exports.Registration || (exports.Registration = {}));
1070
-
1071
- exports.CommandGroup = /** @class */ (function (_super) {
1072
- __extends(CommandGroup, _super);
1073
- function CommandGroup(parent) {
860
+ var PopupAwareComponent = /** @class */ (function (_super) {
861
+ __extends(PopupAwareComponent, _super);
862
+ function PopupAwareComponent(element, parent) {
1074
863
  var _this = _super.call(this) || this;
864
+ _this.element = element;
1075
865
  _this.parent = parent;
1076
- _this._rootTemplate = new pectin.MutableValueModel();
1077
- _this._registrations = new pectin.MutableListModel();
1078
- 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;
1079
- _this.childTemplates = chain(_this._rootTemplate).pluckList('children');
1080
- _this.initialised = chain(_this._rootTemplate).isNotNil();
1081
- // This is a hack to trigger re-rendering when a command is removed from it's parent using ng-if ng-for etc.
1082
- when(chain(_this._registrations)
1083
- .throttle(20)
1084
- .count())
1085
- .changes(function (is, was) {
1086
- if (_this.initialised.value) {
1087
- _this.notifyChanged();
866
+ if (parent) {
867
+ _this.registerDisposable(_this.parent.register(_this));
868
+ }
869
+ return _this;
870
+ }
871
+ Object.defineProperty(PopupAwareComponent.prototype, "componentIndex", {
872
+ get: function () {
873
+ var node = this.element.nativeElement;
874
+ var index = 0;
875
+ while ((node = node.previousElementSibling)) {
876
+ index++;
1088
877
  }
1089
- });
878
+ return index;
879
+ },
880
+ enumerable: false,
881
+ configurable: true
882
+ });
883
+ PopupAwareComponent.prototype.getFace = function () {
884
+ return undefined;
885
+ };
886
+ return PopupAwareComponent;
887
+ }(DisposableComponent));
888
+
889
+ var POPUP_CONTAINER = new i0.InjectionToken('popup-component');
890
+
891
+ /**
892
+ *
893
+ */
894
+ var CommandComponent = /** @class */ (function (_super) {
895
+ __extends(CommandComponent, _super);
896
+ function CommandComponent(element, parent) {
897
+ var _this = _super.call(this, element, parent) || this;
898
+ _this.CommandFace = exports.CommandFace;
899
+ var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, switchOn = _a.switchOn;
900
+ _this.faces = chain(_this.command.busy).mapToList(function (busy) {
901
+ return busy ?
902
+ [_this.busyFaceModel.value, _this.faceModel.value] :
903
+ [_this.faceModel.value, _this.busyFaceModel.value];
904
+ }, { allowNil: true, dependsOn: [_this.faceModel, _this.busyFaceModel] })
905
+ .rejectNil();
906
+ _this.activeFace = _this.faces.first();
907
+ _this.buttonStyle = chain(_this.activeFace).map(function (f) { return exports.CommandFace.getStyleOf(f); });
908
+ _this.colorModel = chain(_this.activeFace).map(function (f) { return exports.CommandFace.getColorOf(f); });
1090
909
  return _this;
1091
910
  }
1092
- CommandGroup.prototype.initialise = function () {
1093
- this.rebuildTemplates();
911
+ CommandComponent.prototype.isActive = function (face) {
912
+ return this.activeFace.query().equals(face);
913
+ };
914
+ CommandComponent.prototype.ngOnInit = function () {
915
+ };
916
+ CommandComponent.prototype.ngAfterViewInit = function () {
917
+ // console.log(this.element.nativeElement.previousSibling)
918
+ };
919
+ CommandComponent.prototype.getFace = function () {
920
+ return this.face;
1094
921
  };
1095
- Object.defineProperty(CommandGroup.prototype, "rootTemplate", {
922
+ return CommandComponent;
923
+ }(PopupAwareComponent));
924
+ CommandComponent.decorators = [
925
+ { type: i0.Component, args: [{
926
+ selector: 'aup-command',
927
+ template: "<ng-container [ngSwitch]=\"buttonStyle.value\">\n <ng-container *ngSwitchCase=\"CommandFace.Style.STROKED\">\n <button mat-stroked-button [pectinCommand]=\"command\" [color]=\"colorModel.value\" [class.busy]=\"command.busy.value\">\n <aup-command-face class=\"centered\" [faces]=\"faces.value\"></aup-command-face>\n </button>\n </ng-container>\n <ng-container *ngSwitchCase=\"CommandFace.Style.RAISED\">\n <button mat-raised-button [pectinCommand]=\"command\" [color]=\"colorModel.value\" [class.busy]=\"command.busy.value\">\n <aup-command-face class=\"centered\" [faces]=\"faces.value\"></aup-command-face>\n </button>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <button mat-button [pectinCommand]=\"command\" [color]=\"colorModel.value\" [class.busy]=\"command.busy.value\">\n <aup-command-face class=\"centered\" [faces]=\"faces.value\"></aup-command-face>\n </button>\n </ng-container>\n</ng-container>\n",
928
+ styles: [":host{display:inline-flex;flex-direction:row;justify-content:stretch}button{flex:1}"]
929
+ },] }
930
+ ];
931
+ CommandComponent.ctorParameters = function () { return [
932
+ { type: i0.ElementRef },
933
+ { type: undefined, decorators: [{ type: i0.Inject, args: [POPUP_CONTAINER,] }, { type: i0.Optional }] }
934
+ ]; };
935
+ CommandComponent.propDecorators = {
936
+ command: [{ type: i0.Input }],
937
+ faceModel: [{ type: i0.Input }],
938
+ face: [{ type: i0.Input }],
939
+ busyFaceModel: [{ type: i0.Input }],
940
+ busyFace: [{ type: i0.Input }]
941
+ };
942
+ __decorate([
943
+ pectin.TrackExternal(),
944
+ __metadata("design:type", pectin.Command)
945
+ ], CommandComponent.prototype, "command", void 0);
946
+ __decorate([
947
+ pectin.TrackExternal(),
948
+ __metadata("design:type", pectin.ValueModel)
949
+ ], CommandComponent.prototype, "faceModel", void 0);
950
+ __decorate([
951
+ pectin.StoreInValueModel('faceModel'),
952
+ __metadata("design:type", Object)
953
+ ], CommandComponent.prototype, "face", void 0);
954
+ __decorate([
955
+ pectin.TrackExternal(),
956
+ __metadata("design:type", pectin.ValueModel)
957
+ ], CommandComponent.prototype, "busyFaceModel", void 0);
958
+ __decorate([
959
+ pectin.StoreInValueModel('busyFaceModel'),
960
+ __metadata("design:type", Object)
961
+ ], CommandComponent.prototype, "busyFace", void 0);
962
+
963
+ exports.CommandContainer = /** @class */ (function (_super) {
964
+ __extends(CommandContainer, _super);
965
+ function CommandContainer(parent) {
966
+ var _this = _super.call(this) || this;
967
+ _this.parent = parent;
968
+ return _this;
969
+ }
970
+ Object.defineProperty(CommandContainer.prototype, "depth", {
1096
971
  get: function () {
1097
- return this._rootTemplate.readonly;
972
+ return this.hasParent() ? this.parent.depth + 1 : 0;
1098
973
  },
1099
974
  enumerable: false,
1100
975
  configurable: true
1101
976
  });
1102
- Object.defineProperty(CommandGroup.prototype, "registrations", {
977
+ CommandContainer.prototype.hasParent = function () {
978
+ return !!this.parent;
979
+ };
980
+ Object.defineProperty(CommandContainer.prototype, "orientation", {
1103
981
  get: function () {
1104
- return this._registrations.readonly;
982
+ return CommandContainer.Orientation.VERTICAL;
1105
983
  },
1106
984
  enumerable: false,
1107
985
  configurable: true
1108
986
  });
1109
- CommandGroup.prototype.notifyChanged = function () {
1110
- if (this.parent) {
1111
- this.parent.notifyChanged();
1112
- }
1113
- else {
1114
- this.rebuildTemplates();
1115
- }
1116
- };
1117
- CommandGroup.prototype.notifyChildFaceChanged = function (is, was) {
1118
- this.notifyChanged();
1119
- };
1120
- CommandGroup.prototype.rebuildTemplates = function () {
1121
- this._rootTemplate.value = new exports.ViewData.GroupData(this.faceListModel.value, this.xPosition, this.yPosition, this.registrations.value.map(function (r) { return r.toTemplate(); }));
1122
- };
1123
- Object.defineProperty(CommandGroup.prototype, "depth", {
987
+ return CommandContainer;
988
+ }(pectin.GarbageCollector));
989
+ (function (CommandContainer) {
990
+ CommandContainer.Orientation = typescriptStringEnums.Enum({ HORIZONTAL: 'horizontal', VERTICAL: 'vertical' });
991
+ })(exports.CommandContainer || (exports.CommandContainer = {}));
992
+
993
+ /**
994
+ *
995
+ */
996
+ var ToolBarComponent = /** @class */ (function (_super) {
997
+ __extends(ToolBarComponent, _super);
998
+ function ToolBarComponent() {
999
+ return _super.call(this) || this;
1000
+ }
1001
+ Object.defineProperty(ToolBarComponent.prototype, "orientation", {
1124
1002
  get: function () {
1125
- return this.isRoot() ? 0 : this.parent.depth + 1;
1003
+ return exports.CommandContainer.Orientation.HORIZONTAL;
1126
1004
  },
1127
1005
  enumerable: false,
1128
1006
  configurable: true
1129
1007
  });
1130
- CommandGroup.prototype.isRoot = function () {
1131
- return false;
1132
- };
1133
- CommandGroup.prototype.registerCommand = function (command, faceListModel) {
1134
- return this.register(new exports.Registration.CommandRegistration(command, faceListModel));
1008
+ // @Trace()
1009
+ ToolBarComponent.prototype.ngOnInit = function () {
1135
1010
  };
1136
- CommandGroup.prototype.registerGroup = function (group, faceModel) {
1137
- return this.register(new exports.Registration.GroupRegistration(faceModel, group));
1011
+ // @Trace()
1012
+ ToolBarComponent.prototype.ngAfterContentInit = function () {
1013
+ // this.group.initialise();
1138
1014
  };
1139
- CommandGroup.prototype.registerFlex = function (component) {
1140
- return this.register(new exports.Registration.FlexRegistration());
1015
+ // @Trace()
1016
+ ToolBarComponent.prototype.ngAfterViewInit = function () {
1141
1017
  };
1142
- CommandGroup.prototype.registerSeparator = function (component) {
1143
- return this.register(new exports.Registration.SeparatorRegistration());
1018
+ return ToolBarComponent;
1019
+ }(exports.CommandContainer));
1020
+ ToolBarComponent.decorators = [
1021
+ { type: i0.Component, args: [{
1022
+ selector: 'aup-tool-bar',
1023
+ template: '<div class="toolbar-content"><ng-content></ng-content></div>',
1024
+ encapsulation: i0.ViewEncapsulation.None,
1025
+ styles: [":host{display:inline-block}.toolbar-content{align-items:center;display:inline-flex;flex-direction:row}.toolbar-content>aup-separator{-ms-grid-row-align:stretch;align-self:stretch;margin:4px 0 4px 8px}.toolbar-content>aup-flex{flex:1}.toolbar-content>*+*{margin-left:8px}"]
1026
+ },] }
1027
+ ];
1028
+ ToolBarComponent.ctorParameters = function () { return []; };
1029
+
1030
+ /**
1031
+ *
1032
+ */
1033
+ var SeparatorComponent = /** @class */ (function (_super) {
1034
+ __extends(SeparatorComponent, _super);
1035
+ function SeparatorComponent(element, popupContainer, containerParent) {
1036
+ var _this = _super.call(this, element, popupContainer) || this;
1037
+ _this.containerParent = containerParent;
1038
+ return _this;
1039
+ }
1040
+ SeparatorComponent.prototype.isHorizontalContainer = function () {
1041
+ return this.containerParent instanceof ToolBarComponent && this.containerParent.orientation === exports.CommandContainer.Orientation.HORIZONTAL;
1144
1042
  };
1145
- CommandGroup.prototype.register = function (registration) {
1146
- var _this = this;
1147
- this._registrations.push(registration);
1148
- if (registration instanceof exports.Registration.FaceRegistration) {
1149
- var when = pectin.Dsl.disposeWith(registration).when;
1150
- when(registration.faceListModel).changes(function (is, was) {
1151
- _this.notifyChildFaceChanged(is, was);
1152
- }, { asLongAs: this.initialised });
1153
- }
1154
- registration.onDispose(function () { return _this._registrations.remove(registration); });
1155
- return registration;
1043
+ SeparatorComponent.prototype.ngOnInit = function () {
1156
1044
  };
1157
- return CommandGroup;
1158
- }(pectin.GarbageCollector));
1159
- (function (CommandGroup) {
1160
- var Root = /** @class */ (function (_super) {
1161
- __extends(Root, _super);
1162
- function Root() {
1163
- var _this = _super.call(this) || this;
1164
- 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;
1165
- when(_this.faceListModel).changes(function () { return _this.notifyChanged(); });
1166
- return _this;
1167
- }
1168
- Root.prototype.isRoot = function () {
1169
- return true;
1170
- };
1171
- return Root;
1172
- }(CommandGroup));
1173
- __decorate([
1174
- pectin.TrackExternal(),
1175
- __metadata("design:type", pectin.ListModel)
1176
- ], Root.prototype, "faceListModel", void 0);
1177
- __decorate([
1178
- pectin.TrackExternal({ defaultValue: 'after' }),
1179
- __metadata("design:type", pectin.ValueModel)
1180
- ], Root.prototype, "xPositionModel", void 0);
1181
- __decorate([
1182
- pectin.StoreInValueModel('xPositionModel'),
1183
- __metadata("design:type", String)
1184
- ], Root.prototype, "xPosition", void 0);
1185
- __decorate([
1186
- pectin.TrackExternal({ defaultValue: 'below' }),
1187
- __metadata("design:type", pectin.ValueModel)
1188
- ], Root.prototype, "yPositionModel", void 0);
1189
- __decorate([
1190
- pectin.StoreInValueModel('yPositionModel'),
1191
- __metadata("design:type", String)
1192
- ], Root.prototype, "yPosition", void 0);
1193
- CommandGroup.Root = Root;
1194
- function factory() {
1195
- return new Root();
1196
- }
1197
- CommandGroup.factory = factory;
1198
- })(exports.CommandGroup || (exports.CommandGroup = {}));
1045
+ return SeparatorComponent;
1046
+ }(PopupAwareComponent));
1047
+ SeparatorComponent.decorators = [
1048
+ { type: i0.Component, args: [{
1049
+ selector: 'aup-separator',
1050
+ template: "\n <mat-divider [vertical]=\"!isHorizontalContainer()\"></mat-divider>",
1051
+ styles: [":host {\n }",
1052
+ ":host(.horizontal-container) {\n display: inline-flex;\n flex-direction: row;\n align-items: stretch;\n }"]
1053
+ },] }
1054
+ ];
1055
+ SeparatorComponent.ctorParameters = function () { return [
1056
+ { type: i0.ElementRef },
1057
+ { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [POPUP_CONTAINER,] }] },
1058
+ { type: exports.CommandContainer, decorators: [{ type: i0.Optional }] }
1059
+ ]; };
1060
+ SeparatorComponent.propDecorators = {
1061
+ isHorizontalContainer: [{ type: i0.HostBinding, args: ['class.horizontal-container',] }]
1062
+ };
1199
1063
 
1064
+ /**
1065
+ *
1066
+ */
1200
1067
  var AbstractPopupMenuComponent = /** @class */ (function (_super) {
1201
1068
  __extends(AbstractPopupMenuComponent, _super);
1202
- function AbstractPopupMenuComponent(group) {
1203
- var _this = _super.call(this) || this;
1204
- _this.group = group;
1205
- _this.registerDisposable(group);
1069
+ function AbstractPopupMenuComponent(element, parent) {
1070
+ var _this = _super.call(this, element, parent) || this;
1071
+ _this._unorderedChildren = new pectin.MutableListModel();
1072
+ _this.faceModelDelegate = new pectin.DelegatingValueModel();
1073
+ _this.xPosition = 'after';
1074
+ _this.yPosition = 'below';
1075
+ 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;
1076
+ // group.faceListModel = chain(this.faceModel).mapToList(face => [face]);
1077
+ _this.faceAdapterModel = chain(_this.faceModelDelegate).map(function (f) { return new exports.CommandFace.Adapter(f); });
1078
+ _this.children = chain(_this._unorderedChildren).sortBy('componentIndex');
1206
1079
  return _this;
1207
1080
  }
1208
- Object.defineProperty(AbstractPopupMenuComponent.prototype, "xPosition", {
1081
+ Object.defineProperty(AbstractPopupMenuComponent.prototype, "faceAdapter", {
1209
1082
  get: function () {
1210
- return this.group.xPosition;
1211
- },
1212
- set: function (position) {
1213
- this.group.xPosition = position;
1083
+ return this.faceAdapterModel.value;
1214
1084
  },
1215
1085
  enumerable: false,
1216
1086
  configurable: true
1217
1087
  });
1218
- Object.defineProperty(AbstractPopupMenuComponent.prototype, "yPosition", {
1219
- get: function () {
1220
- return this.group.yPosition;
1221
- },
1222
- set: function (position) {
1223
- this.group.yPosition = position;
1224
- },
1225
- enumerable: false,
1226
- configurable: true
1227
- });
1228
- AbstractPopupMenuComponent.prototype.ngAfterContentInit = function () {
1229
- this.group.initialise();
1088
+ AbstractPopupMenuComponent.prototype.isRoot = function () {
1089
+ return !this.parent;
1230
1090
  };
1231
- AbstractPopupMenuComponent.prototype.ngOnInit = function () {
1091
+ AbstractPopupMenuComponent.prototype.register = function (component) {
1092
+ var _this = this;
1093
+ this._unorderedChildren.push(component);
1094
+ return pectin.Disposable.disposableThatRuns(function () {
1095
+ _this._unorderedChildren.remove(component);
1096
+ });
1232
1097
  };
1233
- // @Trace()
1234
- AbstractPopupMenuComponent.prototype.closeMenu = function () {
1098
+ AbstractPopupMenuComponent.prototype.onCommandFired = function () {
1235
1099
  this.triggers.forEach(function (trigger) {
1236
1100
  if (trigger.menuOpen) {
1237
1101
  trigger.closeMenu();
1238
1102
  }
1239
1103
  });
1240
1104
  };
1105
+ AbstractPopupMenuComponent.prototype.getFace = function () {
1106
+ return this.faceAdapter.face;
1107
+ };
1241
1108
  return AbstractPopupMenuComponent;
1242
- }(DisposableComponent));
1109
+ }(PopupAwareComponent));
1243
1110
  AbstractPopupMenuComponent.decorators = [
1244
1111
  { type: i0.Component, args: [{
1245
- selector: 'aup-abstract-popup-menu-component',
1112
+ selector: 'aup-abstract-popup-menu',
1246
1113
  template: ''
1247
1114
  },] }
1248
1115
  ];
1249
1116
  AbstractPopupMenuComponent.ctorParameters = function () { return [
1250
- { type: exports.CommandGroup }
1117
+ { type: i0.ElementRef },
1118
+ { type: undefined, decorators: [{ type: i0.Inject, args: [POPUP_CONTAINER,] }] }
1251
1119
  ]; };
1252
1120
  AbstractPopupMenuComponent.propDecorators = {
1253
1121
  xPosition: [{ type: i0.Input }],
1254
1122
  yPosition: [{ type: i0.Input }],
1255
1123
  triggers: [{ type: i0.ViewChildren, args: [menu.MatMenuTrigger,] }]
1256
1124
  };
1125
+ __decorate([
1126
+ pectin.Trace(),
1127
+ __metadata("design:type", Function),
1128
+ __metadata("design:paramtypes", [PopupAwareComponent]),
1129
+ __metadata("design:returntype", void 0)
1130
+ ], AbstractPopupMenuComponent.prototype, "register", null);
1257
1131
 
1258
- (function (TrackBy) {
1259
- TrackBy.byIndex = function (data, index) { return index; };
1260
- })(exports.TrackBy || (exports.TrackBy = {}));
1261
-
1262
- var CommandGroupMenuRendererComponent = /** @class */ (function (_super) {
1263
- __extends(CommandGroupMenuRendererComponent, _super);
1264
- function CommandGroupMenuRendererComponent(parent) {
1132
+ var PopupMenuRendererComponent = /** @class */ (function (_super) {
1133
+ __extends(PopupMenuRendererComponent, _super);
1134
+ function PopupMenuRendererComponent() {
1265
1135
  var _this = _super.call(this) || this;
1266
- _this.parent = parent;
1267
- _this.groupViewDataModel = new pectin.MutableValueModel();
1136
+ _this._childList = new pectin.DelegatingListModel();
1268
1137
  _this.commandFired = new i0.EventEmitter();
1269
- _this.ViewData = exports.ViewData;
1270
1138
  _this.TrackBy = exports.TrackBy;
1271
1139
  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;
1272
- _this.children = chain(_this.groupViewDataModel).pluckList('children');
1273
- _this.hasMixedIcons = chain(_this.groupViewDataModel).pluck('hasMixedIcons');
1140
+ // this.children = chain(this.groupViewDataModel).pluckList('children');
1141
+ // this.hasMixedIcons = chain(this.groupViewDataModel).pluck('hasMixedIcons');
1142
+ var faces = chain(_this._childList).map(function (child) {
1143
+ return child.getFace();
1144
+ }).rejectNil();
1145
+ var icons = faces.select(function (face) { return !!exports.CommandFace.getIconOf(face); });
1146
+ var iconCount = icons.count();
1147
+ var totalFaces = faces.count();
1148
+ _this.hasMixedIcons = valueOf.all(iconCount.isGreaterThan(0), totalFaces.doesNotEqual(iconCount)).areTruthy();
1274
1149
  return _this;
1275
1150
  }
1276
- CommandGroupMenuRendererComponent.prototype.executeCommand = function (data) {
1151
+ Object.defineProperty(PopupMenuRendererComponent.prototype, "parent", {
1152
+ get: function () {
1153
+ return this._parentComponent;
1154
+ },
1155
+ set: function (comp) {
1156
+ this._parentComponent = comp;
1157
+ this._childList.setDelegate(comp.children);
1158
+ },
1159
+ enumerable: false,
1160
+ configurable: true
1161
+ });
1162
+ Object.defineProperty(PopupMenuRendererComponent.prototype, "children", {
1163
+ get: function () {
1164
+ return this.parent.children.value;
1165
+ },
1166
+ enumerable: false,
1167
+ configurable: true
1168
+ });
1169
+ PopupMenuRendererComponent.prototype.executeCommand = function (data) {
1277
1170
  var _this = this;
1278
- exports.ViewData.getCommand(data).execute().finally(function () {
1279
- _this.commandFired.emit();
1280
- });
1171
+ if (this.isCommand(data)) {
1172
+ data.command.execute().finally(function () {
1173
+ _this.commandFired.emit();
1174
+ });
1175
+ }
1281
1176
  };
1282
- CommandGroupMenuRendererComponent.prototype.isEnabled = function (data) {
1283
- return exports.ViewData.getCommand(data).enabled.value;
1177
+ PopupMenuRendererComponent.prototype.isEnabled = function (data) {
1178
+ return true; //ViewData.getCommand(data).enabled.value;
1284
1179
  };
1285
1180
  // @Trace()
1286
- CommandGroupMenuRendererComponent.prototype.onCommandFired = function () {
1181
+ PopupMenuRendererComponent.prototype.onCommandFired = function () {
1287
1182
  this.commandFired.emit();
1288
1183
  this.triggers.forEach(function (trigger) {
1289
1184
  if (trigger.menuOpen) {
@@ -1291,117 +1186,40 @@
1291
1186
  }
1292
1187
  });
1293
1188
  };
1294
- return CommandGroupMenuRendererComponent;
1295
- }(DisposableComponent));
1296
- CommandGroupMenuRendererComponent.decorators = [
1297
- { type: i0.Component, args: [{
1298
- selector: 'aup-command-group-menu',
1299
- 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"
1300
- },] }
1301
- ];
1302
- CommandGroupMenuRendererComponent.ctorParameters = function () { return [
1303
- { type: CommandGroupMenuRendererComponent, decorators: [{ type: i0.Optional }, { type: i0.SkipSelf }] }
1304
- ]; };
1305
- CommandGroupMenuRendererComponent.propDecorators = {
1306
- menuComponent: [{ type: i0.ViewChild, args: ['menu', { static: true },] }],
1307
- groupViewData: [{ type: i0.Input }],
1308
- commandFired: [{ type: i0.Output }],
1309
- triggers: [{ type: i0.ViewChildren, args: [menu.MatMenuTrigger,] }]
1310
- };
1311
- __decorate([
1312
- pectin.StoreInValueModel('groupViewDataModel'),
1313
- __metadata("design:type", exports.ViewData.GroupData)
1314
- ], CommandGroupMenuRendererComponent.prototype, "groupViewData", void 0);
1315
-
1316
- var CommandGroupRendererComponent = /** @class */ (function (_super) {
1317
- __extends(CommandGroupRendererComponent, _super);
1318
- function CommandGroupRendererComponent() {
1319
- var _this = _super.call(this) || this;
1320
- _this.renderRootNode = true;
1321
- _this.commandFired = new i0.EventEmitter();
1322
- _this.ViewData = exports.ViewData;
1323
- _this.TrackBy = exports.TrackBy;
1324
- 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;
1325
- _this.childViewDataModels = chain(_this.groupViewDataModel)
1326
- .pluckList('children');
1327
- return _this;
1328
- }
1329
- // @Trace()
1330
- CommandGroupRendererComponent.prototype.onCommandFired = function () {
1331
- this.commandFired.emit();
1332
- this.triggers.forEach(function (trigger) {
1333
- if (trigger.menuOpen) {
1334
- trigger.closeMenu();
1335
- }
1336
- });
1189
+ PopupMenuRendererComponent.prototype.isCommand = function (child) {
1190
+ return child instanceof CommandComponent;
1191
+ };
1192
+ PopupMenuRendererComponent.prototype.isPopupMenu = function (child) {
1193
+ return child instanceof AbstractPopupMenuComponent;
1194
+ };
1195
+ PopupMenuRendererComponent.prototype.isSeparator = function (child) {
1196
+ return child instanceof SeparatorComponent;
1197
+ };
1198
+ PopupMenuRendererComponent.prototype.getTooltip = function (child) {
1199
+ return this.isCommand(child) ? exports.CommandFace.getTooltipOf(child.face) : undefined;
1337
1200
  };
1338
- return CommandGroupRendererComponent;
1201
+ PopupMenuRendererComponent.prototype.getFaces = function (child) {
1202
+ return this.isCommand(child) ?
1203
+ child.faces.value :
1204
+ this.isPopupMenu(child) ?
1205
+ [child.faceAdapter.face] :
1206
+ undefined;
1207
+ };
1208
+ return PopupMenuRendererComponent;
1339
1209
  }(DisposableComponent));
1340
- CommandGroupRendererComponent.decorators = [
1210
+ PopupMenuRendererComponent.decorators = [
1341
1211
  { type: i0.Component, args: [{
1342
- selector: 'aup-command-group-renderer',
1343
- 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",
1344
- 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}"]
1212
+ selector: 'aup-popup-menu-renderer',
1213
+ template: "<mat-menu #menu [xPosition]=\"parent.xPosition\" [yPosition]=\"parent.yPosition\">\n <ng-template matMenuContent>\n <ng-container *ngFor=\"let child of children; trackBy: TrackBy.byIndex\" >\n <button *ngIf=\"isCommand(child)\"\n (click)=\"executeCommand(child)\"\n [disabled]=\"!isEnabled(child)\"\n [matTooltip]=\"getTooltip(child)\"\n mat-menu-item>\n <aup-command-face [faces]=\"getFaces(child)\"\n [includeMissingIconInLayout]=\"hasMixedIcons.value\"></aup-command-face>\n </button>\n\n <ng-container *ngIf=\"isPopupMenu(child)\">\n <button mat-menu-item\n matMenuTrigger\n [matMenuTriggerFor]=\"innerPanel.menuComponent\"\n >\n <aup-command-face [faces]=\"getFaces(child)\"\n [includeMissingIconInLayout]=\"hasMixedIcons.value\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #innerPanel\n [parent]=\"child\"\n (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n\n <mat-divider *ngIf=\"isSeparator(child)\"></mat-divider>\n\n </ng-container>\n\n </ng-template>\n</mat-menu>\n"
1345
1214
  },] }
1346
1215
  ];
1347
- CommandGroupRendererComponent.ctorParameters = function () { return []; };
1348
- CommandGroupRendererComponent.propDecorators = {
1349
- groupViewDataModel: [{ type: i0.Input }],
1350
- groupViewData: [{ type: i0.Input }],
1351
- renderRootNode: [{ type: i0.Input }, { type: i0.HostBinding, args: ['class.render-root',] }],
1216
+ PopupMenuRendererComponent.ctorParameters = function () { return []; };
1217
+ PopupMenuRendererComponent.propDecorators = {
1218
+ parent: [{ type: i0.Input }],
1219
+ menuComponent: [{ type: i0.ViewChild, args: ['menu', { static: true },] }],
1352
1220
  commandFired: [{ type: i0.Output }],
1353
1221
  triggers: [{ type: i0.ViewChildren, args: [menu.MatMenuTrigger,] }]
1354
1222
  };
1355
- __decorate([
1356
- pectin.TrackExternal(),
1357
- __metadata("design:type", pectin.ValueModel)
1358
- ], CommandGroupRendererComponent.prototype, "groupViewDataModel", void 0);
1359
- __decorate([
1360
- pectin.StoreInValueModel('groupViewDataModel'),
1361
- __metadata("design:type", exports.ViewData.GroupData)
1362
- ], CommandGroupRendererComponent.prototype, "groupViewData", void 0);
1363
-
1364
- var CommandGroupComponent = /** @class */ (function (_super) {
1365
- __extends(CommandGroupComponent, _super);
1366
- function CommandGroupComponent(parent) {
1367
- var _this = _super.call(this, parent) || this;
1368
- _this.parent = parent;
1369
- _this.xPosition = 'after';
1370
- _this.yPosition = 'below';
1371
- 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;
1372
- _this.faceListModel = chain(_this.faceModel).mapToList(function (v) { return [v]; });
1373
- _this.parent.registerGroup(_this, _this.faceListModel);
1374
- when(_this.faceListModel).changes(function () { return _this.notifyChanged(); });
1375
- return _this;
1376
- }
1377
- return CommandGroupComponent;
1378
- }(exports.CommandGroup));
1379
- CommandGroupComponent.decorators = [
1380
- { type: i0.Component, args: [{
1381
- selector: 'aup-command-group',
1382
- template: '',
1383
- providers: [
1384
- { provide: exports.CommandGroup, useExisting: CommandGroupComponent }
1385
- ]
1386
- },] }
1387
- ];
1388
- CommandGroupComponent.ctorParameters = function () { return [
1389
- { type: exports.CommandGroup, decorators: [{ type: i0.SkipSelf }] }
1390
- ]; };
1391
- CommandGroupComponent.propDecorators = {
1392
- faceModel: [{ type: i0.Input }],
1393
- face: [{ type: i0.Input }],
1394
- xPosition: [{ type: i0.Input }],
1395
- yPosition: [{ type: i0.Input }]
1396
- };
1397
- __decorate([
1398
- pectin.TrackExternal(),
1399
- __metadata("design:type", pectin.ValueModel)
1400
- ], CommandGroupComponent.prototype, "faceModel", void 0);
1401
- __decorate([
1402
- pectin.StoreInValueModel('faceModel'),
1403
- __metadata("design:type", Object)
1404
- ], CommandGroupComponent.prototype, "face", void 0);
1405
1223
 
1406
1224
  /**
1407
1225
  * Custom CSS:
@@ -1477,92 +1295,13 @@
1477
1295
  __metadata("design:type", Array)
1478
1296
  ], CommandFaceComponent.prototype, "_rawFaces", void 0);
1479
1297
 
1480
- /**
1481
- *
1482
- */
1483
- var CommandComponent = /** @class */ (function (_super) {
1484
- __extends(CommandComponent, _super);
1485
- function CommandComponent(element, parent) {
1486
- var _this = _super.call(this) || this;
1487
- _this.element = element;
1488
- _this.parent = parent;
1489
- _this.CommandFace = exports.CommandFace;
1490
- var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, switchOn = _a.switchOn;
1491
- _this.faces = chain(_this.command.busy).mapToList(function (busy) {
1492
- return busy ?
1493
- [_this.busyFaceModel.value, _this.faceModel.value] :
1494
- [_this.faceModel.value, _this.busyFaceModel.value];
1495
- }, { allowNil: true, dependsOn: [_this.faceModel, _this.busyFaceModel] })
1496
- .rejectNil();
1497
- _this.activeFace = _this.faces.first();
1498
- _this.buttonStyle = chain(_this.activeFace).map(function (f) { return exports.CommandFace.getStyleOf(f); });
1499
- _this.colorModel = chain(_this.activeFace).map(function (f) { return exports.CommandFace.getColorOf(f); });
1500
- if (parent) {
1501
- _this.registerDisposable(_this.parent.registerCommand(_this.command, _this.faces));
1502
- }
1503
- return _this;
1504
- }
1505
- CommandComponent.prototype.isActive = function (face) {
1506
- return this.activeFace.query().equals(face);
1507
- };
1508
- CommandComponent.prototype.ngOnInit = function () {
1509
- };
1510
- CommandComponent.prototype.ngAfterViewInit = function () {
1511
- // console.log(this.element.nativeElement)
1512
- };
1513
- return CommandComponent;
1514
- }(DisposableComponent));
1515
- CommandComponent.decorators = [
1516
- { type: i0.Component, args: [{
1517
- selector: 'aup-command',
1518
- template: "<ng-container *ngIf=\"!parent\">\n <ng-container [ngSwitch]=\"buttonStyle.value\">\n <ng-container *ngSwitchCase=\"CommandFace.Style.STROKED\">\n <button mat-stroked-button [pectinCommand]=\"command\" [color]=\"colorModel.value\" [class.busy]=\"command.busy.value\">\n <aup-command-face class=\"centered\" [faces]=\"faces.value\"></aup-command-face>\n </button>\n </ng-container>\n <ng-container *ngSwitchCase=\"CommandFace.Style.RAISED\">\n <button mat-raised-button [pectinCommand]=\"command\" [color]=\"colorModel.value\" [class.busy]=\"command.busy.value\">\n <aup-command-face class=\"centered\" [faces]=\"faces.value\"></aup-command-face>\n </button>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <button mat-button [pectinCommand]=\"command\" [color]=\"colorModel.value\" [class.busy]=\"command.busy.value\">\n <aup-command-face class=\"centered\" [faces]=\"faces.value\"></aup-command-face>\n </button>\n </ng-container>\n </ng-container>\n</ng-container>\n",
1519
- styles: [":host{display:inline-flex;flex-direction:row;justify-content:stretch}button{flex:1}"]
1520
- },] }
1521
- ];
1522
- CommandComponent.ctorParameters = function () { return [
1523
- { type: i0.ElementRef },
1524
- { type: exports.CommandGroup, decorators: [{ type: i0.Optional }] }
1525
- ]; };
1526
- CommandComponent.propDecorators = {
1527
- command: [{ type: i0.Input }],
1528
- faceModel: [{ type: i0.Input }],
1529
- face: [{ type: i0.Input }],
1530
- busyFaceModel: [{ type: i0.Input }],
1531
- busyFace: [{ type: i0.Input }]
1532
- };
1533
- __decorate([
1534
- pectin.TrackExternal(),
1535
- __metadata("design:type", pectin.Command)
1536
- ], CommandComponent.prototype, "command", void 0);
1537
- __decorate([
1538
- pectin.TrackExternal(),
1539
- __metadata("design:type", pectin.ValueModel)
1540
- ], CommandComponent.prototype, "faceModel", void 0);
1541
- __decorate([
1542
- pectin.StoreInValueModel('faceModel'),
1543
- __metadata("design:type", Object)
1544
- ], CommandComponent.prototype, "face", void 0);
1545
- __decorate([
1546
- pectin.TrackExternal(),
1547
- __metadata("design:type", pectin.ValueModel)
1548
- ], CommandComponent.prototype, "busyFaceModel", void 0);
1549
- __decorate([
1550
- pectin.StoreInValueModel('busyFaceModel'),
1551
- __metadata("design:type", Object)
1552
- ], CommandComponent.prototype, "busyFace", void 0);
1553
-
1554
1298
  /**
1555
1299
  *
1556
1300
  */
1557
1301
  var FlexComponent = /** @class */ (function (_super) {
1558
1302
  __extends(FlexComponent, _super);
1559
- function FlexComponent(parent) {
1560
- var _this = _super.call(this) || this;
1561
- _this.parent = parent;
1562
- if (parent) {
1563
- parent.registerFlex(_this);
1564
- }
1565
- return _this;
1303
+ function FlexComponent() {
1304
+ return _super.call(this) || this;
1566
1305
  }
1567
1306
  FlexComponent.prototype.ngOnInit = function () {
1568
1307
  };
@@ -1574,44 +1313,48 @@
1574
1313
  template: ""
1575
1314
  },] }
1576
1315
  ];
1577
- FlexComponent.ctorParameters = function () { return [
1578
- { type: exports.CommandGroup }
1579
- ]; };
1316
+ FlexComponent.ctorParameters = function () { return []; };
1580
1317
 
1581
- var ɵ0 = exports.CommandGroup.factory;
1582
1318
  /**
1583
1319
  *
1584
1320
  */
1585
1321
  var MoreMenuComponent = /** @class */ (function (_super) {
1586
1322
  __extends(MoreMenuComponent, _super);
1587
- function MoreMenuComponent(group) {
1588
- var _this = _super.call(this, group) || this;
1323
+ function MoreMenuComponent(element, parent) {
1324
+ var _this = _super.call(this, element, parent) || this;
1589
1325
  _this.tooltipModel = new pectin.MutableValueModel();
1590
1326
  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;
1591
- group.xPosition = 'before'; // this should be the default unless overridden by the user.
1592
- group.faceListModel = chain(_this.tooltipModel).mapToList(function (tooltip) {
1593
- return [
1594
- {
1595
- icon: function () { return 'mat:more_vert'; },
1596
- tooltip: function () {
1597
- return tooltip;
1598
- }
1327
+ _this.faceModelDelegate.setDelegate(chain(_this.tooltipModel).map(function (tooltip) {
1328
+ return {
1329
+ icon: function () { return 'mat:more_vert'; },
1330
+ tooltip: function () {
1331
+ return tooltip;
1599
1332
  }
1600
- ];
1601
- }, { allowNil: true });
1333
+ };
1334
+ }, { allowNil: true }));
1602
1335
  return _this;
1603
1336
  }
1337
+ Object.defineProperty(MoreMenuComponent.prototype, "face", {
1338
+ get: function () {
1339
+ return this.faceModelDelegate.value;
1340
+ },
1341
+ enumerable: false,
1342
+ configurable: true
1343
+ });
1604
1344
  return MoreMenuComponent;
1605
1345
  }(AbstractPopupMenuComponent));
1606
1346
  MoreMenuComponent.decorators = [
1607
1347
  { type: i0.Component, args: [{
1608
1348
  selector: 'aup-more-menu',
1609
- template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate" (commandFired)="closeMenu()"></aup-command-group-renderer>',
1610
- providers: [{ provide: exports.CommandGroup, useFactory: ɵ0 }]
1349
+ template: "<div class=\"content\" style=\"display: none\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"isRoot()\">\n <ng-container *ngIf=\"faceAdapter.text\" [ngSwitch]=\"faceAdapter.style\">\n <ng-container *ngSwitchCase=\"'stroked'\">\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n mat-stroked-button>\n <aup-command-face [faces]=\"[face]\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]=\"this\"\n (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'raised'\">\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n mat-raised-button>\n <aup-command-face [faces]=\"[face]\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]=\"this\"\n (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n mat-button>\n <aup-command-face [faces]=\"[face]\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu [parent]=\"this\" (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngIf=\"!faceAdapter.text\">\n <button matMenuTrigger\n mat-icon-button\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n >\n <aup-command-face [faces]=\"[face]\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]=\"this\"\n (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n</ng-container>\n",
1350
+ providers: [
1351
+ { provide: POPUP_CONTAINER, useExisting: MoreMenuComponent }
1352
+ ]
1611
1353
  },] }
1612
1354
  ];
1613
1355
  MoreMenuComponent.ctorParameters = function () { return [
1614
- { type: exports.CommandGroup }
1356
+ { type: i0.ElementRef },
1357
+ { type: undefined, decorators: [{ type: i0.Inject, args: [POPUP_CONTAINER,] }, { type: i0.Optional }, { type: i0.SkipSelf }] }
1615
1358
  ]; };
1616
1359
  MoreMenuComponent.propDecorators = {
1617
1360
  tooltip: [{ type: i0.Input }]
@@ -1621,36 +1364,38 @@
1621
1364
  __metadata("design:type", String)
1622
1365
  ], MoreMenuComponent.prototype, "tooltip", void 0);
1623
1366
 
1624
- var ɵ0$1 = exports.CommandGroup.factory;
1625
1367
  /**
1626
1368
  *
1627
1369
  */
1628
1370
  var PopupMenuComponent = /** @class */ (function (_super) {
1629
1371
  __extends(PopupMenuComponent, _super);
1630
- function PopupMenuComponent(group) {
1631
- var _this = _super.call(this, group) || this;
1372
+ function PopupMenuComponent(element, parent) {
1373
+ var _this = _super.call(this, element, parent) || this;
1632
1374
  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;
1633
- group.faceListModel = chain(_this.faceModel).mapToList(function (face) { return [face]; });
1634
1375
  return _this;
1376
+ // group.faceListModel = chain(this.faceModel).mapToList(face => [face]);
1635
1377
  }
1636
1378
  return PopupMenuComponent;
1637
1379
  }(AbstractPopupMenuComponent));
1638
1380
  PopupMenuComponent.decorators = [
1639
1381
  { type: i0.Component, args: [{
1640
1382
  selector: 'aup-popup-menu',
1641
- template: '<aup-command-group-renderer [renderRootNode]="true" [groupViewDataModel]="group.rootTemplate" (commandFired)="closeMenu()"></aup-command-group-renderer>',
1642
- providers: [{ provide: exports.CommandGroup, useFactory: ɵ0$1 }]
1383
+ template: "<div class=\"content\" style=\"display: none\">\n <ng-content></ng-content>\n</div>\n<ng-container *ngIf=\"isRoot()\">\n <ng-container *ngIf=\"faceAdapter.text\" [ngSwitch]=\"faceAdapter.style\">\n <ng-container *ngSwitchCase=\"'stroked'\">\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n mat-stroked-button>\n <aup-command-face [faces]=\"[face]\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]=\"this\"\n (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"'raised'\">\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n mat-raised-button>\n <aup-command-face [faces]=\"[face]\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]=\"this\"\n (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n\n <ng-container *ngSwitchDefault>\n <button matMenuTrigger\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n mat-button>\n <aup-command-face [faces]=\"[face]\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu [parent]=\"this\" (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n\n </ng-container>\n\n <ng-container *ngIf=\"!faceAdapter.text\">\n <button matMenuTrigger\n mat-icon-button\n [matMenuTriggerFor]=\"subMenu.menuComponent\"\n [matTooltip]=\"faceAdapter.tooltip\"\n [color]=\"faceAdapter.color\"\n >\n <aup-command-face [faces]=\"[face]\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer #subMenu\n [parent]=\"this\"\n (commandFired)=\"onCommandFired()\"></aup-popup-menu-renderer>\n </ng-container>\n</ng-container>\n",
1384
+ providers: [
1385
+ { provide: POPUP_CONTAINER, useExisting: PopupMenuComponent }
1386
+ ]
1643
1387
  },] }
1644
1388
  ];
1645
1389
  PopupMenuComponent.ctorParameters = function () { return [
1646
- { type: exports.CommandGroup }
1390
+ { type: i0.ElementRef },
1391
+ { type: undefined, decorators: [{ type: i0.Inject, args: [POPUP_CONTAINER,] }, { type: i0.Optional }, { type: i0.SkipSelf }] }
1647
1392
  ]; };
1648
1393
  PopupMenuComponent.propDecorators = {
1649
1394
  faceModel: [{ type: i0.Input }],
1650
1395
  face: [{ type: i0.Input }]
1651
1396
  };
1652
1397
  __decorate([
1653
- pectin.TrackExternal(),
1398
+ pectin.TrackExternal({ delegateTo: 'faceModelDelegate' }),
1654
1399
  __metadata("design:type", pectin.ValueModel)
1655
1400
  ], PopupMenuComponent.prototype, "faceModel", void 0);
1656
1401
  __decorate([
@@ -1658,72 +1403,6 @@
1658
1403
  __metadata("design:type", Object)
1659
1404
  ], PopupMenuComponent.prototype, "face", void 0);
1660
1405
 
1661
- /**
1662
- *
1663
- */
1664
- var SeparatorComponent = /** @class */ (function (_super) {
1665
- __extends(SeparatorComponent, _super);
1666
- function SeparatorComponent(parent) {
1667
- var _this = _super.call(this) || this;
1668
- _this.parent = parent;
1669
- if (parent) {
1670
- parent.registerSeparator(_this);
1671
- }
1672
- return _this;
1673
- }
1674
- SeparatorComponent.prototype.isVertical = function () {
1675
- return this === null || this === void 0 ? void 0 : this.parent.isRoot();
1676
- };
1677
- SeparatorComponent.prototype.ngOnInit = function () {
1678
- };
1679
- return SeparatorComponent;
1680
- }(DisposableComponent));
1681
- SeparatorComponent.decorators = [
1682
- { type: i0.Component, args: [{
1683
- selector: 'aup-separator',
1684
- template: "\n <mat-divider [vertical]=\"isVertical()\"></mat-divider>"
1685
- },] }
1686
- ];
1687
- SeparatorComponent.ctorParameters = function () { return [
1688
- { type: exports.CommandGroup, decorators: [{ type: i0.Optional }] }
1689
- ]; };
1690
-
1691
- var ɵ0$2 = exports.CommandGroup.factory;
1692
- /**
1693
- *
1694
- */
1695
- var ToolBarComponent = /** @class */ (function (_super) {
1696
- __extends(ToolBarComponent, _super);
1697
- function ToolBarComponent(group) {
1698
- var _this = _super.call(this) || this;
1699
- _this.group = group;
1700
- _this.registerDisposable(group);
1701
- return _this;
1702
- }
1703
- // @Trace()
1704
- ToolBarComponent.prototype.ngOnInit = function () {
1705
- };
1706
- // @Trace()
1707
- ToolBarComponent.prototype.ngAfterContentInit = function () {
1708
- this.group.initialise();
1709
- };
1710
- // @Trace()
1711
- ToolBarComponent.prototype.ngAfterViewInit = function () {
1712
- };
1713
- return ToolBarComponent;
1714
- }(DisposableComponent));
1715
- ToolBarComponent.decorators = [
1716
- { type: i0.Component, args: [{
1717
- selector: 'aup-tool-bar',
1718
- template: '<aup-command-group-renderer [renderRootNode]="false" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
1719
- providers: [{ provide: exports.CommandGroup, useFactory: ɵ0$2 }],
1720
- styles: [":host{align-items:center;display:inline-flex;flex-direction:row}:host mat-divider{-ms-grid-row-align:stretch;align-self:stretch;margin:4px 0}:host span.flex{flex:1}:host>*+*{margin-left:8px}"]
1721
- },] }
1722
- ];
1723
- ToolBarComponent.ctorParameters = function () { return [
1724
- { type: exports.CommandGroup }
1725
- ]; };
1726
-
1727
1406
  var FocusContainerComponent = /** @class */ (function (_super) {
1728
1407
  __extends(FocusContainerComponent, _super);
1729
1408
  function FocusContainerComponent(focusManager) {
@@ -2850,7 +2529,7 @@
2850
2529
 
2851
2530
  var noop = function () {
2852
2531
  };
2853
- var ɵ0$3 = noop;
2532
+ var ɵ0 = noop;
2854
2533
  var CELL_RENDERER_COMPONENT_ROW_CACHE = Symbol("aup-cell-renderer:row-data-cache");
2855
2534
  var ColumnModel = /** @class */ (function () {
2856
2535
  function ColumnModel(columnId, defaults) {
@@ -3804,14 +3483,12 @@
3804
3483
  ToolBarComponent,
3805
3484
  CommandComponent,
3806
3485
  PopupMenuComponent,
3807
- CommandGroupComponent,
3808
3486
  CommandFaceComponent,
3809
3487
  MoreMenuComponent,
3810
3488
  SeparatorComponent,
3811
3489
  FlexComponent,
3812
- CommandGroupMenuRendererComponent,
3813
- CommandGroupRendererComponent,
3814
- AbstractPopupMenuComponent
3490
+ AbstractPopupMenuComponent,
3491
+ PopupMenuRendererComponent
3815
3492
  ],
3816
3493
  imports: [
3817
3494
  i2.CommonModule,
@@ -3858,7 +3535,6 @@
3858
3535
  exports.IconComponent,
3859
3536
  SectionHeaderComponent,
3860
3537
  TableRowMenuComponent,
3861
- CommandGroupComponent,
3862
3538
  ToolBarComponent,
3863
3539
  CommandComponent,
3864
3540
  PopupMenuComponent,
@@ -8333,9 +8009,6 @@
8333
8009
  exports.CommandComponent = CommandComponent;
8334
8010
  exports.CommandDirective = CommandDirective;
8335
8011
  exports.CommandFaceComponent = CommandFaceComponent;
8336
- exports.CommandGroupComponent = CommandGroupComponent;
8337
- exports.CommandGroupMenuRendererComponent = CommandGroupMenuRendererComponent;
8338
- exports.CommandGroupRendererComponent = CommandGroupRendererComponent;
8339
8012
  exports.ComponentCellRendererPortalRef = ComponentCellRendererPortalRef;
8340
8013
  exports.ComponentsModule = ComponentsModule;
8341
8014
  exports.ConfirmThenDialogComponent = ConfirmThenDialogComponent;
@@ -8381,6 +8054,7 @@
8381
8054
  exports.NoopComponent = NoopComponent;
8382
8055
  exports.NumberInputComponent = NumberInputComponent;
8383
8056
  exports.PLACE_AUTH_SERVICE = PLACE_AUTH_SERVICE;
8057
+ exports.POPUP_CONTAINER = POPUP_CONTAINER;
8384
8058
  exports.PORTAL_EDITOR_COMPONENT = PORTAL_EDITOR_COMPONENT;
8385
8059
  exports.PORTAL_RENDERER_COMPONENT = PORTAL_RENDERER_COMPONENT;
8386
8060
  exports.PasswordInputComponent = PasswordInputComponent;
@@ -8394,8 +8068,10 @@
8394
8068
  exports.Point = Point;
8395
8069
  exports.PopStateDuringInteractionNavigation = PopStateDuringInteractionNavigation;
8396
8070
  exports.PopStateNavigation = PopStateNavigation;
8071
+ exports.PopupAwareComponent = PopupAwareComponent;
8397
8072
  exports.PopupInteractionContextComponent = PopupInteractionContextComponent;
8398
8073
  exports.PopupMenuComponent = PopupMenuComponent;
8074
+ exports.PopupMenuRendererComponent = PopupMenuRendererComponent;
8399
8075
  exports.PropertyColumnModel = PropertyColumnModel;
8400
8076
  exports.ROUTE_PARAMETER_LIST_KEY = ROUTE_PARAMETER_LIST_KEY;
8401
8077
  exports.RemoveLastInteractionFromUrlNavigationSession = RemoveLastInteractionFromUrlNavigationSession;