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

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 +7 -0
  2. package/bundles/coolon-angular-ui-powerups.umd.js +322 -647
  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 +24 -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 +304 -578
  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 +7 -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,481 +857,327 @@
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();
1088
- }
1089
- });
866
+ if (parent) {
867
+ _this.registerDisposable(_this.parent.register(_this));
868
+ }
1090
869
  return _this;
1091
870
  }
1092
- CommandGroup.prototype.initialise = function () {
1093
- this.rebuildTemplates();
1094
- };
1095
- Object.defineProperty(CommandGroup.prototype, "rootTemplate", {
871
+ Object.defineProperty(PopupAwareComponent.prototype, "componentIndex", {
1096
872
  get: function () {
1097
- return this._rootTemplate.readonly;
873
+ var node = this.element.nativeElement;
874
+ var index = 0;
875
+ while ((node = node.previousElementSibling)) {
876
+ index++;
877
+ }
878
+ return index;
1098
879
  },
1099
880
  enumerable: false,
1100
881
  configurable: true
1101
882
  });
1102
- Object.defineProperty(CommandGroup.prototype, "registrations", {
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); });
909
+ return _this;
910
+ }
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;
921
+ };
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", {
1103
971
  get: function () {
1104
- return this._registrations.readonly;
972
+ return this.hasParent() ? this.parent.depth + 1 : 0;
1105
973
  },
1106
974
  enumerable: false,
1107
975
  configurable: true
1108
976
  });
1109
- CommandGroup.prototype.notifyChanged = function () {
1110
- if (this.parent) {
1111
- this.parent.notifyChanged();
1112
- }
1113
- else {
1114
- this.rebuildTemplates();
1115
- }
977
+ CommandContainer.prototype.hasParent = function () {
978
+ return !!this.parent;
1116
979
  };
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", {
980
+ Object.defineProperty(CommandContainer.prototype, "orientation", {
1124
981
  get: function () {
1125
- return this.isRoot() ? 0 : this.parent.depth + 1;
982
+ return CommandContainer.Orientation.VERTICAL;
1126
983
  },
1127
984
  enumerable: false,
1128
985
  configurable: true
1129
986
  });
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));
1135
- };
1136
- CommandGroup.prototype.registerGroup = function (group, faceModel) {
1137
- return this.register(new exports.Registration.GroupRegistration(faceModel, group));
1138
- };
1139
- CommandGroup.prototype.registerFlex = function (component) {
1140
- return this.register(new exports.Registration.FlexRegistration());
1141
- };
1142
- CommandGroup.prototype.registerSeparator = function (component) {
1143
- return this.register(new exports.Registration.SeparatorRegistration());
1144
- };
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;
1156
- };
1157
- return CommandGroup;
987
+ return CommandContainer;
1158
988
  }(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 = {}));
989
+ (function (CommandContainer) {
990
+ CommandContainer.Orientation = typescriptStringEnums.Enum({ HORIZONTAL: 'horizontal', VERTICAL: 'vertical' });
991
+ })(exports.CommandContainer || (exports.CommandContainer = {}));
1199
992
 
993
+ /**
994
+ *
995
+ */
1200
996
  var AbstractPopupMenuComponent = /** @class */ (function (_super) {
1201
997
  __extends(AbstractPopupMenuComponent, _super);
1202
- function AbstractPopupMenuComponent(group) {
1203
- var _this = _super.call(this) || this;
1204
- _this.group = group;
1205
- _this.registerDisposable(group);
998
+ function AbstractPopupMenuComponent(element, parent) {
999
+ var _this = _super.call(this, element, parent) || this;
1000
+ _this._unorderedChildren = new pectin.MutableListModel();
1001
+ _this.faceModelDelegate = new pectin.DelegatingValueModel();
1002
+ _this.xPosition = 'after';
1003
+ _this.yPosition = 'below';
1004
+ 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;
1005
+ // group.faceListModel = chain(this.faceModel).mapToList(face => [face]);
1006
+ _this.faceAdapterModel = chain(_this.faceModelDelegate).map(function (f) { return new exports.CommandFace.Adapter(f); });
1007
+ _this.children = chain(_this._unorderedChildren).sortBy('componentIndex');
1206
1008
  return _this;
1207
1009
  }
1208
- Object.defineProperty(AbstractPopupMenuComponent.prototype, "xPosition", {
1209
- get: function () {
1210
- return this.group.xPosition;
1211
- },
1212
- set: function (position) {
1213
- this.group.xPosition = position;
1214
- },
1215
- enumerable: false,
1216
- configurable: true
1217
- });
1218
- Object.defineProperty(AbstractPopupMenuComponent.prototype, "yPosition", {
1010
+ Object.defineProperty(AbstractPopupMenuComponent.prototype, "faceAdapter", {
1219
1011
  get: function () {
1220
- return this.group.yPosition;
1221
- },
1222
- set: function (position) {
1223
- this.group.yPosition = position;
1012
+ return this.faceAdapterModel.value;
1224
1013
  },
1225
1014
  enumerable: false,
1226
1015
  configurable: true
1227
1016
  });
1228
- AbstractPopupMenuComponent.prototype.ngAfterContentInit = function () {
1229
- this.group.initialise();
1017
+ AbstractPopupMenuComponent.prototype.isRoot = function () {
1018
+ return !this.parent;
1230
1019
  };
1231
- AbstractPopupMenuComponent.prototype.ngOnInit = function () {
1020
+ AbstractPopupMenuComponent.prototype.register = function (component) {
1021
+ var _this = this;
1022
+ this._unorderedChildren.push(component);
1023
+ return pectin.Disposable.disposableThatRuns(function () {
1024
+ _this._unorderedChildren.remove(component);
1025
+ });
1232
1026
  };
1233
- // @Trace()
1234
- AbstractPopupMenuComponent.prototype.closeMenu = function () {
1027
+ AbstractPopupMenuComponent.prototype.onCommandFired = function () {
1235
1028
  this.triggers.forEach(function (trigger) {
1236
1029
  if (trigger.menuOpen) {
1237
1030
  trigger.closeMenu();
1238
1031
  }
1239
1032
  });
1240
1033
  };
1034
+ AbstractPopupMenuComponent.prototype.getFace = function () {
1035
+ return this.faceAdapter.face;
1036
+ };
1241
1037
  return AbstractPopupMenuComponent;
1242
- }(DisposableComponent));
1038
+ }(PopupAwareComponent));
1243
1039
  AbstractPopupMenuComponent.decorators = [
1244
1040
  { type: i0.Component, args: [{
1245
- selector: 'aup-abstract-popup-menu-component',
1041
+ selector: 'aup-abstract-popup-menu',
1246
1042
  template: ''
1247
1043
  },] }
1248
1044
  ];
1249
1045
  AbstractPopupMenuComponent.ctorParameters = function () { return [
1250
- { type: exports.CommandGroup }
1046
+ { type: i0.ElementRef },
1047
+ { type: undefined, decorators: [{ type: i0.Inject, args: [POPUP_CONTAINER,] }] }
1251
1048
  ]; };
1252
1049
  AbstractPopupMenuComponent.propDecorators = {
1253
1050
  xPosition: [{ type: i0.Input }],
1254
1051
  yPosition: [{ type: i0.Input }],
1255
1052
  triggers: [{ type: i0.ViewChildren, args: [menu.MatMenuTrigger,] }]
1256
1053
  };
1054
+ __decorate([
1055
+ pectin.Trace(),
1056
+ __metadata("design:type", Function),
1057
+ __metadata("design:paramtypes", [PopupAwareComponent]),
1058
+ __metadata("design:returntype", void 0)
1059
+ ], AbstractPopupMenuComponent.prototype, "register", null);
1257
1060
 
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) {
1265
- var _this = _super.call(this) || this;
1266
- _this.parent = parent;
1267
- _this.groupViewDataModel = new pectin.MutableValueModel();
1268
- _this.commandFired = new i0.EventEmitter();
1269
- _this.ViewData = exports.ViewData;
1270
- _this.TrackBy = exports.TrackBy;
1271
- 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');
1274
- return _this;
1061
+ /**
1062
+ *
1063
+ */
1064
+ var ToolBarComponent = /** @class */ (function (_super) {
1065
+ __extends(ToolBarComponent, _super);
1066
+ function ToolBarComponent() {
1067
+ return _super.call(this) || this;
1275
1068
  }
1276
- CommandGroupMenuRendererComponent.prototype.executeCommand = function (data) {
1277
- var _this = this;
1278
- exports.ViewData.getCommand(data).execute().finally(function () {
1279
- _this.commandFired.emit();
1280
- });
1069
+ Object.defineProperty(ToolBarComponent.prototype, "orientation", {
1070
+ get: function () {
1071
+ return exports.CommandContainer.Orientation.HORIZONTAL;
1072
+ },
1073
+ enumerable: false,
1074
+ configurable: true
1075
+ });
1076
+ // @Trace()
1077
+ ToolBarComponent.prototype.ngOnInit = function () {
1281
1078
  };
1282
- CommandGroupMenuRendererComponent.prototype.isEnabled = function (data) {
1283
- return exports.ViewData.getCommand(data).enabled.value;
1079
+ // @Trace()
1080
+ ToolBarComponent.prototype.ngAfterContentInit = function () {
1081
+ // this.group.initialise();
1284
1082
  };
1285
1083
  // @Trace()
1286
- CommandGroupMenuRendererComponent.prototype.onCommandFired = function () {
1287
- this.commandFired.emit();
1288
- this.triggers.forEach(function (trigger) {
1289
- if (trigger.menuOpen) {
1290
- trigger.closeMenu();
1291
- }
1292
- });
1084
+ ToolBarComponent.prototype.ngAfterViewInit = function () {
1293
1085
  };
1294
- return CommandGroupMenuRendererComponent;
1295
- }(DisposableComponent));
1296
- CommandGroupMenuRendererComponent.decorators = [
1086
+ return ToolBarComponent;
1087
+ }(exports.CommandContainer));
1088
+ ToolBarComponent.decorators = [
1089
+ { type: i0.Component, args: [{
1090
+ selector: 'aup-tool-bar',
1091
+ template: '<div class="toolbar-content"><ng-content></ng-content></div>',
1092
+ encapsulation: i0.ViewEncapsulation.None,
1093
+ 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}"]
1094
+ },] }
1095
+ ];
1096
+ ToolBarComponent.ctorParameters = function () { return []; };
1097
+
1098
+ /**
1099
+ *
1100
+ */
1101
+ var SeparatorComponent = /** @class */ (function (_super) {
1102
+ __extends(SeparatorComponent, _super);
1103
+ function SeparatorComponent(element, containerParent) {
1104
+ var _this = _super.call(this, element, containerParent instanceof AbstractPopupMenuComponent ? containerParent : undefined) || this;
1105
+ _this.containerParent = containerParent;
1106
+ return _this;
1107
+ }
1108
+ SeparatorComponent.prototype.isHorizontalContainer = function () {
1109
+ return this.containerParent instanceof ToolBarComponent && this.containerParent.orientation === exports.CommandContainer.Orientation.HORIZONTAL;
1110
+ };
1111
+ SeparatorComponent.prototype.ngOnInit = function () {
1112
+ };
1113
+ return SeparatorComponent;
1114
+ }(PopupAwareComponent));
1115
+ SeparatorComponent.decorators = [
1297
1116
  { 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"
1117
+ selector: 'aup-separator',
1118
+ template: "\n <mat-divider [vertical]=\"!isHorizontalContainer()\"></mat-divider>",
1119
+ styles: [":host {\n }",
1120
+ ":host(.horizontal-container) {\n display: inline-flex;\n flex-direction: row;\n align-items: stretch;\n }"]
1300
1121
  },] }
1301
1122
  ];
1302
- CommandGroupMenuRendererComponent.ctorParameters = function () { return [
1303
- { type: CommandGroupMenuRendererComponent, decorators: [{ type: i0.Optional }, { type: i0.SkipSelf }] }
1123
+ SeparatorComponent.ctorParameters = function () { return [
1124
+ { type: i0.ElementRef },
1125
+ { type: exports.CommandContainer, decorators: [{ type: i0.Optional }] }
1304
1126
  ]; };
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,] }]
1127
+ SeparatorComponent.propDecorators = {
1128
+ isHorizontalContainer: [{ type: i0.HostBinding, args: ['class.horizontal-container',] }]
1310
1129
  };
1311
- __decorate([
1312
- pectin.StoreInValueModel('groupViewDataModel'),
1313
- __metadata("design:type", exports.ViewData.GroupData)
1314
- ], CommandGroupMenuRendererComponent.prototype, "groupViewData", void 0);
1315
1130
 
1316
- var CommandGroupRendererComponent = /** @class */ (function (_super) {
1317
- __extends(CommandGroupRendererComponent, _super);
1318
- function CommandGroupRendererComponent() {
1131
+ var PopupMenuRendererComponent = /** @class */ (function (_super) {
1132
+ __extends(PopupMenuRendererComponent, _super);
1133
+ function PopupMenuRendererComponent() {
1319
1134
  var _this = _super.call(this) || this;
1320
- _this.renderRootNode = true;
1135
+ _this._childList = new pectin.DelegatingListModel();
1321
1136
  _this.commandFired = new i0.EventEmitter();
1322
- _this.ViewData = exports.ViewData;
1323
1137
  _this.TrackBy = exports.TrackBy;
1324
1138
  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');
1139
+ // this.children = chain(this.groupViewDataModel).pluckList('children');
1140
+ // this.hasMixedIcons = chain(this.groupViewDataModel).pluck('hasMixedIcons');
1141
+ var faces = chain(_this._childList).map(function (child) {
1142
+ return child.getFace();
1143
+ }).rejectNil();
1144
+ var icons = faces.select(function (face) { return !!exports.CommandFace.getIconOf(face); });
1145
+ var iconCount = icons.count();
1146
+ var totalFaces = faces.count();
1147
+ _this.hasMixedIcons = valueOf.all(iconCount.isGreaterThan(0), totalFaces.doesNotEqual(iconCount)).areTruthy();
1327
1148
  return _this;
1328
1149
  }
1150
+ Object.defineProperty(PopupMenuRendererComponent.prototype, "parent", {
1151
+ get: function () {
1152
+ return this._parentComponent;
1153
+ },
1154
+ set: function (comp) {
1155
+ this._parentComponent = comp;
1156
+ this._childList.setDelegate(comp.children);
1157
+ },
1158
+ enumerable: false,
1159
+ configurable: true
1160
+ });
1161
+ Object.defineProperty(PopupMenuRendererComponent.prototype, "children", {
1162
+ get: function () {
1163
+ return this.parent.children.value;
1164
+ },
1165
+ enumerable: false,
1166
+ configurable: true
1167
+ });
1168
+ PopupMenuRendererComponent.prototype.executeCommand = function (data) {
1169
+ var _this = this;
1170
+ if (this.isCommand(data)) {
1171
+ data.command.execute().finally(function () {
1172
+ _this.commandFired.emit();
1173
+ });
1174
+ }
1175
+ };
1176
+ PopupMenuRendererComponent.prototype.isEnabled = function (data) {
1177
+ return true; //ViewData.getCommand(data).enabled.value;
1178
+ };
1329
1179
  // @Trace()
1330
- CommandGroupRendererComponent.prototype.onCommandFired = function () {
1180
+ PopupMenuRendererComponent.prototype.onCommandFired = function () {
1331
1181
  this.commandFired.emit();
1332
1182
  this.triggers.forEach(function (trigger) {
1333
1183
  if (trigger.menuOpen) {
@@ -1335,73 +1185,40 @@
1335
1185
  }
1336
1186
  });
1337
1187
  };
1338
- return CommandGroupRendererComponent;
1188
+ PopupMenuRendererComponent.prototype.isCommand = function (child) {
1189
+ return child instanceof CommandComponent;
1190
+ };
1191
+ PopupMenuRendererComponent.prototype.isPopupMenu = function (child) {
1192
+ return child instanceof AbstractPopupMenuComponent;
1193
+ };
1194
+ PopupMenuRendererComponent.prototype.isSeparator = function (child) {
1195
+ return child instanceof SeparatorComponent;
1196
+ };
1197
+ PopupMenuRendererComponent.prototype.getTooltip = function (child) {
1198
+ return this.isCommand(child) ? exports.CommandFace.getTooltipOf(child.face) : undefined;
1199
+ };
1200
+ PopupMenuRendererComponent.prototype.getFaces = function (child) {
1201
+ return this.isCommand(child) ?
1202
+ child.faces.value :
1203
+ this.isPopupMenu(child) ?
1204
+ [child.faceAdapter.face] :
1205
+ undefined;
1206
+ };
1207
+ return PopupMenuRendererComponent;
1339
1208
  }(DisposableComponent));
1340
- CommandGroupRendererComponent.decorators = [
1209
+ PopupMenuRendererComponent.decorators = [
1341
1210
  { 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}"]
1211
+ selector: 'aup-popup-menu-renderer',
1212
+ 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
1213
  },] }
1346
1214
  ];
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',] }],
1215
+ PopupMenuRendererComponent.ctorParameters = function () { return []; };
1216
+ PopupMenuRendererComponent.propDecorators = {
1217
+ parent: [{ type: i0.Input }],
1218
+ menuComponent: [{ type: i0.ViewChild, args: ['menu', { static: true },] }],
1352
1219
  commandFired: [{ type: i0.Output }],
1353
1220
  triggers: [{ type: i0.ViewChildren, args: [menu.MatMenuTrigger,] }]
1354
1221
  };
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
1222
 
1406
1223
  /**
1407
1224
  * Custom CSS:
@@ -1477,92 +1294,13 @@
1477
1294
  __metadata("design:type", Array)
1478
1295
  ], CommandFaceComponent.prototype, "_rawFaces", void 0);
1479
1296
 
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
1297
  /**
1555
1298
  *
1556
1299
  */
1557
1300
  var FlexComponent = /** @class */ (function (_super) {
1558
1301
  __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;
1302
+ function FlexComponent() {
1303
+ return _super.call(this) || this;
1566
1304
  }
1567
1305
  FlexComponent.prototype.ngOnInit = function () {
1568
1306
  };
@@ -1574,44 +1312,48 @@
1574
1312
  template: ""
1575
1313
  },] }
1576
1314
  ];
1577
- FlexComponent.ctorParameters = function () { return [
1578
- { type: exports.CommandGroup }
1579
- ]; };
1315
+ FlexComponent.ctorParameters = function () { return []; };
1580
1316
 
1581
- var ɵ0 = exports.CommandGroup.factory;
1582
1317
  /**
1583
1318
  *
1584
1319
  */
1585
1320
  var MoreMenuComponent = /** @class */ (function (_super) {
1586
1321
  __extends(MoreMenuComponent, _super);
1587
- function MoreMenuComponent(group) {
1588
- var _this = _super.call(this, group) || this;
1322
+ function MoreMenuComponent(element, parent) {
1323
+ var _this = _super.call(this, element, parent) || this;
1589
1324
  _this.tooltipModel = new pectin.MutableValueModel();
1590
1325
  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
- }
1326
+ _this.faceModelDelegate.setDelegate(chain(_this.tooltipModel).map(function (tooltip) {
1327
+ return {
1328
+ icon: function () { return 'mat:more_vert'; },
1329
+ tooltip: function () {
1330
+ return tooltip;
1599
1331
  }
1600
- ];
1601
- }, { allowNil: true });
1332
+ };
1333
+ }, { allowNil: true }));
1602
1334
  return _this;
1603
1335
  }
1336
+ Object.defineProperty(MoreMenuComponent.prototype, "face", {
1337
+ get: function () {
1338
+ return this.faceModelDelegate.value;
1339
+ },
1340
+ enumerable: false,
1341
+ configurable: true
1342
+ });
1604
1343
  return MoreMenuComponent;
1605
1344
  }(AbstractPopupMenuComponent));
1606
1345
  MoreMenuComponent.decorators = [
1607
1346
  { type: i0.Component, args: [{
1608
1347
  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 }]
1348
+ 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",
1349
+ providers: [
1350
+ { provide: POPUP_CONTAINER, useExisting: MoreMenuComponent }
1351
+ ]
1611
1352
  },] }
1612
1353
  ];
1613
1354
  MoreMenuComponent.ctorParameters = function () { return [
1614
- { type: exports.CommandGroup }
1355
+ { type: i0.ElementRef },
1356
+ { type: undefined, decorators: [{ type: i0.Inject, args: [POPUP_CONTAINER,] }, { type: i0.Optional }, { type: i0.SkipSelf }] }
1615
1357
  ]; };
1616
1358
  MoreMenuComponent.propDecorators = {
1617
1359
  tooltip: [{ type: i0.Input }]
@@ -1621,36 +1363,38 @@
1621
1363
  __metadata("design:type", String)
1622
1364
  ], MoreMenuComponent.prototype, "tooltip", void 0);
1623
1365
 
1624
- var ɵ0$1 = exports.CommandGroup.factory;
1625
1366
  /**
1626
1367
  *
1627
1368
  */
1628
1369
  var PopupMenuComponent = /** @class */ (function (_super) {
1629
1370
  __extends(PopupMenuComponent, _super);
1630
- function PopupMenuComponent(group) {
1631
- var _this = _super.call(this, group) || this;
1371
+ function PopupMenuComponent(element, parent) {
1372
+ var _this = _super.call(this, element, parent) || this;
1632
1373
  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
1374
  return _this;
1375
+ // group.faceListModel = chain(this.faceModel).mapToList(face => [face]);
1635
1376
  }
1636
1377
  return PopupMenuComponent;
1637
1378
  }(AbstractPopupMenuComponent));
1638
1379
  PopupMenuComponent.decorators = [
1639
1380
  { type: i0.Component, args: [{
1640
1381
  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 }]
1382
+ 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",
1383
+ providers: [
1384
+ { provide: POPUP_CONTAINER, useExisting: PopupMenuComponent }
1385
+ ]
1643
1386
  },] }
1644
1387
  ];
1645
1388
  PopupMenuComponent.ctorParameters = function () { return [
1646
- { type: exports.CommandGroup }
1389
+ { type: i0.ElementRef },
1390
+ { type: undefined, decorators: [{ type: i0.Inject, args: [POPUP_CONTAINER,] }, { type: i0.Optional }, { type: i0.SkipSelf }] }
1647
1391
  ]; };
1648
1392
  PopupMenuComponent.propDecorators = {
1649
1393
  faceModel: [{ type: i0.Input }],
1650
1394
  face: [{ type: i0.Input }]
1651
1395
  };
1652
1396
  __decorate([
1653
- pectin.TrackExternal(),
1397
+ pectin.TrackExternal({ delegateTo: 'faceModelDelegate' }),
1654
1398
  __metadata("design:type", pectin.ValueModel)
1655
1399
  ], PopupMenuComponent.prototype, "faceModel", void 0);
1656
1400
  __decorate([
@@ -1658,72 +1402,6 @@
1658
1402
  __metadata("design:type", Object)
1659
1403
  ], PopupMenuComponent.prototype, "face", void 0);
1660
1404
 
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
1405
  var FocusContainerComponent = /** @class */ (function (_super) {
1728
1406
  __extends(FocusContainerComponent, _super);
1729
1407
  function FocusContainerComponent(focusManager) {
@@ -2850,7 +2528,7 @@
2850
2528
 
2851
2529
  var noop = function () {
2852
2530
  };
2853
- var ɵ0$3 = noop;
2531
+ var ɵ0 = noop;
2854
2532
  var CELL_RENDERER_COMPONENT_ROW_CACHE = Symbol("aup-cell-renderer:row-data-cache");
2855
2533
  var ColumnModel = /** @class */ (function () {
2856
2534
  function ColumnModel(columnId, defaults) {
@@ -3804,14 +3482,12 @@
3804
3482
  ToolBarComponent,
3805
3483
  CommandComponent,
3806
3484
  PopupMenuComponent,
3807
- CommandGroupComponent,
3808
3485
  CommandFaceComponent,
3809
3486
  MoreMenuComponent,
3810
3487
  SeparatorComponent,
3811
3488
  FlexComponent,
3812
- CommandGroupMenuRendererComponent,
3813
- CommandGroupRendererComponent,
3814
- AbstractPopupMenuComponent
3489
+ AbstractPopupMenuComponent,
3490
+ PopupMenuRendererComponent
3815
3491
  ],
3816
3492
  imports: [
3817
3493
  i2.CommonModule,
@@ -3858,7 +3534,6 @@
3858
3534
  exports.IconComponent,
3859
3535
  SectionHeaderComponent,
3860
3536
  TableRowMenuComponent,
3861
- CommandGroupComponent,
3862
3537
  ToolBarComponent,
3863
3538
  CommandComponent,
3864
3539
  PopupMenuComponent,
@@ -8333,9 +8008,6 @@
8333
8008
  exports.CommandComponent = CommandComponent;
8334
8009
  exports.CommandDirective = CommandDirective;
8335
8010
  exports.CommandFaceComponent = CommandFaceComponent;
8336
- exports.CommandGroupComponent = CommandGroupComponent;
8337
- exports.CommandGroupMenuRendererComponent = CommandGroupMenuRendererComponent;
8338
- exports.CommandGroupRendererComponent = CommandGroupRendererComponent;
8339
8011
  exports.ComponentCellRendererPortalRef = ComponentCellRendererPortalRef;
8340
8012
  exports.ComponentsModule = ComponentsModule;
8341
8013
  exports.ConfirmThenDialogComponent = ConfirmThenDialogComponent;
@@ -8381,6 +8053,7 @@
8381
8053
  exports.NoopComponent = NoopComponent;
8382
8054
  exports.NumberInputComponent = NumberInputComponent;
8383
8055
  exports.PLACE_AUTH_SERVICE = PLACE_AUTH_SERVICE;
8056
+ exports.POPUP_CONTAINER = POPUP_CONTAINER;
8384
8057
  exports.PORTAL_EDITOR_COMPONENT = PORTAL_EDITOR_COMPONENT;
8385
8058
  exports.PORTAL_RENDERER_COMPONENT = PORTAL_RENDERER_COMPONENT;
8386
8059
  exports.PasswordInputComponent = PasswordInputComponent;
@@ -8394,8 +8067,10 @@
8394
8067
  exports.Point = Point;
8395
8068
  exports.PopStateDuringInteractionNavigation = PopStateDuringInteractionNavigation;
8396
8069
  exports.PopStateNavigation = PopStateNavigation;
8070
+ exports.PopupAwareComponent = PopupAwareComponent;
8397
8071
  exports.PopupInteractionContextComponent = PopupInteractionContextComponent;
8398
8072
  exports.PopupMenuComponent = PopupMenuComponent;
8073
+ exports.PopupMenuRendererComponent = PopupMenuRendererComponent;
8399
8074
  exports.PropertyColumnModel = PropertyColumnModel;
8400
8075
  exports.ROUTE_PARAMETER_LIST_KEY = ROUTE_PARAMETER_LIST_KEY;
8401
8076
  exports.RemoveLastInteractionFromUrlNavigationSession = RemoveLastInteractionFromUrlNavigationSession;