@coolon/angular-ui-powerups 3.7.0-alpha.6 → 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.
- package/CHANGELOG.md +14 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +322 -631
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
- package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/commands/command/command.component.js +15 -12
- package/esm2015/lib/components/commands/command/command.component.js.map +1 -1
- package/esm2015/lib/components/commands/command/command.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/flex.component.js +2 -9
- package/esm2015/lib/components/commands/flex.component.js.map +1 -1
- package/esm2015/lib/components/commands/flex.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/command-container.js +21 -0
- package/esm2015/lib/components/commands/group/command-container.js.map +1 -0
- package/esm2015/lib/components/commands/group/command-container.metadata.json +1 -0
- package/esm2015/lib/components/commands/group/popup-aware.component.js +23 -0
- package/esm2015/lib/components/commands/group/popup-aware.component.js.map +1 -0
- package/esm2015/lib/components/commands/group/popup-aware.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/group/popup-container.js +3 -0
- package/esm2015/lib/components/commands/group/popup-container.js.map +1 -0
- package/esm2015/lib/components/commands/group/popup-container.metadata.json +1 -0
- package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.js +67 -0
- package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.js.map +1 -0
- package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.js +47 -0
- package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.js.map +1 -0
- package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/group/popup-menu/more-menu.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.js +90 -0
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.js.map +1 -0
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.js +42 -0
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.js.map +1 -0
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.metadata.json +1 -0
- package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.js +12 -15
- package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.js.map +1 -1
- package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.metadata.json +1 -1
- package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.scss.ngstyle.js.map +1 -0
- package/esm2015/lib/components/commands/separator.component.js +24 -14
- package/esm2015/lib/components/commands/separator.component.js.map +1 -1
- package/esm2015/lib/components/commands/separator.component.metadata.json +1 -1
- package/esm2015/lib/components/components.module.js +6 -11
- package/esm2015/lib/components/components.module.js.map +1 -1
- package/esm2015/lib/components/components.module.metadata.json +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/exports.js +7 -9
- package/esm2015/lib/components/exports.js.map +1 -1
- package/esm2015/lib/components/exports.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
- package/fesm2015/coolon-angular-ui-powerups.js +304 -562
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/commands/command/command.component.d.ts +7 -6
- package/lib/components/commands/flex.component.d.ts +1 -3
- package/lib/components/commands/group/command-container.d.ts +16 -0
- package/lib/components/commands/group/popup-aware.component.d.ts +11 -0
- package/lib/components/commands/group/popup-container.d.ts +6 -0
- package/lib/components/commands/group/popup-menu/abstract-popup-menu.component.d.ts +24 -0
- package/lib/components/commands/group/popup-menu/more-menu.component.d.ts +12 -0
- package/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.d.ts +33 -0
- package/lib/components/commands/group/{popup-menu.component.d.ts → popup-menu/popup-menu.component.d.ts} +4 -3
- package/lib/components/commands/group/tool-bar/tool-bar.component.d.ts +4 -5
- package/lib/components/commands/separator.component.d.ts +7 -7
- package/lib/components/exports.d.ts +7 -9
- package/package.json +1 -1
- package/esm2015/lib/components/commands/group/abstract-popup-menu.component.js +0 -50
- package/esm2015/lib/components/commands/group/abstract-popup-menu.component.js.map +0 -1
- package/esm2015/lib/components/commands/group/abstract-popup-menu.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/group/abstract-popup-menu.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/group/command-group/command-group.component.js +0 -44
- package/esm2015/lib/components/commands/group/command-group/command-group.component.js.map +0 -1
- package/esm2015/lib/components/commands/group/command-group/command-group.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/group/command-group/command-group.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js +0 -57
- package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.js.map +0 -1
- package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js +0 -52
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.js.map +0 -1
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/group/command-group-renderer/command-group-renderer.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/components/commands/group/command-group.js +0 -105
- package/esm2015/lib/components/commands/group/command-group.js.map +0 -1
- package/esm2015/lib/components/commands/group/command-group.metadata.json +0 -1
- package/esm2015/lib/components/commands/group/more-menu.component.js +0 -46
- package/esm2015/lib/components/commands/group/more-menu.component.js.map +0 -1
- package/esm2015/lib/components/commands/group/more-menu.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/group/more-menu.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/group/popup-menu.component.js +0 -41
- package/esm2015/lib/components/commands/group/popup-menu.component.js.map +0 -1
- package/esm2015/lib/components/commands/group/popup-menu.component.metadata.json +0 -1
- package/esm2015/lib/components/commands/group/popup-menu.component.ngfactory.js.map +0 -1
- package/esm2015/lib/components/commands/group/registration.js +0 -58
- package/esm2015/lib/components/commands/group/registration.js.map +0 -1
- package/esm2015/lib/components/commands/group/registration.metadata.json +0 -1
- package/esm2015/lib/components/commands/group/tool-bar/tool-bar.component.scss.shim.ngstyle.js.map +0 -1
- package/esm2015/lib/components/commands/group/view-data.js +0 -113
- package/esm2015/lib/components/commands/group/view-data.js.map +0 -1
- package/esm2015/lib/components/commands/group/view-data.metadata.json +0 -1
- package/lib/components/commands/group/abstract-popup-menu.component.d.ts +0 -16
- package/lib/components/commands/group/command-group/command-group.component.d.ts +0 -12
- package/lib/components/commands/group/command-group-menu-renderer/command-group-menu-renderer.component.d.ts +0 -24
- package/lib/components/commands/group/command-group-renderer/command-group-renderer.component.d.ts +0 -18
- package/lib/components/commands/group/command-group.d.ts +0 -42
- package/lib/components/commands/group/more-menu.component.d.ts +0 -10
- package/lib/components/commands/group/registration.d.ts +0 -32
- 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,471 +857,327 @@
|
|
|
853
857
|
CommandFace.Adapter = Adapter;
|
|
854
858
|
})(exports.CommandFace || (exports.CommandFace = {}));
|
|
855
859
|
|
|
856
|
-
|
|
857
|
-
|
|
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
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
_this.childTemplates = chain(_this._rootTemplate).pluckList('children');
|
|
1080
|
-
_this.initialised = chain(_this._rootTemplate).isNotNil();
|
|
866
|
+
if (parent) {
|
|
867
|
+
_this.registerDisposable(_this.parent.register(_this));
|
|
868
|
+
}
|
|
1081
869
|
return _this;
|
|
1082
870
|
}
|
|
1083
|
-
|
|
1084
|
-
this.rebuildTemplates();
|
|
1085
|
-
};
|
|
1086
|
-
Object.defineProperty(CommandGroup.prototype, "rootTemplate", {
|
|
871
|
+
Object.defineProperty(PopupAwareComponent.prototype, "componentIndex", {
|
|
1087
872
|
get: function () {
|
|
1088
|
-
|
|
873
|
+
var node = this.element.nativeElement;
|
|
874
|
+
var index = 0;
|
|
875
|
+
while ((node = node.previousElementSibling)) {
|
|
876
|
+
index++;
|
|
877
|
+
}
|
|
878
|
+
return index;
|
|
1089
879
|
},
|
|
1090
880
|
enumerable: false,
|
|
1091
881
|
configurable: true
|
|
1092
882
|
});
|
|
1093
|
-
|
|
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", {
|
|
1094
971
|
get: function () {
|
|
1095
|
-
return this.
|
|
972
|
+
return this.hasParent() ? this.parent.depth + 1 : 0;
|
|
1096
973
|
},
|
|
1097
974
|
enumerable: false,
|
|
1098
975
|
configurable: true
|
|
1099
976
|
});
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
this.parent.notifyChanged();
|
|
1103
|
-
}
|
|
1104
|
-
else {
|
|
1105
|
-
this.rebuildTemplates();
|
|
1106
|
-
}
|
|
1107
|
-
};
|
|
1108
|
-
CommandGroup.prototype.notifyChildFaceChanged = function (is, was) {
|
|
1109
|
-
this.notifyChanged();
|
|
1110
|
-
};
|
|
1111
|
-
CommandGroup.prototype.rebuildTemplates = function () {
|
|
1112
|
-
this._rootTemplate.value = new exports.ViewData.GroupData(this.faceListModel.value, this.xPosition, this.yPosition, this.registrations.value.map(function (r) { return r.toTemplate(); }));
|
|
977
|
+
CommandContainer.prototype.hasParent = function () {
|
|
978
|
+
return !!this.parent;
|
|
1113
979
|
};
|
|
1114
|
-
Object.defineProperty(
|
|
980
|
+
Object.defineProperty(CommandContainer.prototype, "orientation", {
|
|
1115
981
|
get: function () {
|
|
1116
|
-
return
|
|
982
|
+
return CommandContainer.Orientation.VERTICAL;
|
|
1117
983
|
},
|
|
1118
984
|
enumerable: false,
|
|
1119
985
|
configurable: true
|
|
1120
986
|
});
|
|
1121
|
-
|
|
1122
|
-
return false;
|
|
1123
|
-
};
|
|
1124
|
-
CommandGroup.prototype.registerCommand = function (command, faceListModel) {
|
|
1125
|
-
return this.register(new exports.Registration.CommandRegistration(command, faceListModel));
|
|
1126
|
-
};
|
|
1127
|
-
CommandGroup.prototype.registerGroup = function (group, faceModel) {
|
|
1128
|
-
return this.register(new exports.Registration.GroupRegistration(faceModel, group));
|
|
1129
|
-
};
|
|
1130
|
-
CommandGroup.prototype.registerFlex = function (component) {
|
|
1131
|
-
return this.register(new exports.Registration.FlexRegistration());
|
|
1132
|
-
};
|
|
1133
|
-
CommandGroup.prototype.registerSeparator = function (component) {
|
|
1134
|
-
return this.register(new exports.Registration.SeparatorRegistration());
|
|
1135
|
-
};
|
|
1136
|
-
CommandGroup.prototype.register = function (registration) {
|
|
1137
|
-
var _this = this;
|
|
1138
|
-
this._registrations.push(registration);
|
|
1139
|
-
if (registration instanceof exports.Registration.FaceRegistration) {
|
|
1140
|
-
var when = pectin.Dsl.disposeWith(registration).when;
|
|
1141
|
-
when(registration.faceListModel).changes(function (is, was) {
|
|
1142
|
-
_this.notifyChildFaceChanged(is, was);
|
|
1143
|
-
}, { asLongAs: this.initialised });
|
|
1144
|
-
}
|
|
1145
|
-
registration.onDispose(function () { return _this._registrations.remove(registration); });
|
|
1146
|
-
return registration;
|
|
1147
|
-
};
|
|
1148
|
-
return CommandGroup;
|
|
987
|
+
return CommandContainer;
|
|
1149
988
|
}(pectin.GarbageCollector));
|
|
1150
|
-
(function (
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
function Root() {
|
|
1154
|
-
var _this = _super.call(this) || this;
|
|
1155
|
-
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1156
|
-
when(_this.faceListModel).changes(function () { return _this.notifyChanged(); });
|
|
1157
|
-
return _this;
|
|
1158
|
-
}
|
|
1159
|
-
Root.prototype.isRoot = function () {
|
|
1160
|
-
return true;
|
|
1161
|
-
};
|
|
1162
|
-
return Root;
|
|
1163
|
-
}(CommandGroup));
|
|
1164
|
-
__decorate([
|
|
1165
|
-
pectin.TrackExternal(),
|
|
1166
|
-
__metadata("design:type", pectin.ListModel)
|
|
1167
|
-
], Root.prototype, "faceListModel", void 0);
|
|
1168
|
-
__decorate([
|
|
1169
|
-
pectin.TrackExternal({ defaultValue: 'after' }),
|
|
1170
|
-
__metadata("design:type", pectin.ValueModel)
|
|
1171
|
-
], Root.prototype, "xPositionModel", void 0);
|
|
1172
|
-
__decorate([
|
|
1173
|
-
pectin.StoreInValueModel('xPositionModel'),
|
|
1174
|
-
__metadata("design:type", String)
|
|
1175
|
-
], Root.prototype, "xPosition", void 0);
|
|
1176
|
-
__decorate([
|
|
1177
|
-
pectin.TrackExternal({ defaultValue: 'below' }),
|
|
1178
|
-
__metadata("design:type", pectin.ValueModel)
|
|
1179
|
-
], Root.prototype, "yPositionModel", void 0);
|
|
1180
|
-
__decorate([
|
|
1181
|
-
pectin.StoreInValueModel('yPositionModel'),
|
|
1182
|
-
__metadata("design:type", String)
|
|
1183
|
-
], Root.prototype, "yPosition", void 0);
|
|
1184
|
-
CommandGroup.Root = Root;
|
|
1185
|
-
function factory() {
|
|
1186
|
-
return new Root();
|
|
1187
|
-
}
|
|
1188
|
-
CommandGroup.factory = factory;
|
|
1189
|
-
})(exports.CommandGroup || (exports.CommandGroup = {}));
|
|
989
|
+
(function (CommandContainer) {
|
|
990
|
+
CommandContainer.Orientation = typescriptStringEnums.Enum({ HORIZONTAL: 'horizontal', VERTICAL: 'vertical' });
|
|
991
|
+
})(exports.CommandContainer || (exports.CommandContainer = {}));
|
|
1190
992
|
|
|
993
|
+
/**
|
|
994
|
+
*
|
|
995
|
+
*/
|
|
1191
996
|
var AbstractPopupMenuComponent = /** @class */ (function (_super) {
|
|
1192
997
|
__extends(AbstractPopupMenuComponent, _super);
|
|
1193
|
-
function AbstractPopupMenuComponent(
|
|
1194
|
-
var _this = _super.call(this) || this;
|
|
1195
|
-
_this.
|
|
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');
|
|
1196
1008
|
return _this;
|
|
1197
1009
|
}
|
|
1198
|
-
Object.defineProperty(AbstractPopupMenuComponent.prototype, "
|
|
1199
|
-
get: function () {
|
|
1200
|
-
return this.group.xPosition;
|
|
1201
|
-
},
|
|
1202
|
-
set: function (position) {
|
|
1203
|
-
this.group.xPosition = position;
|
|
1204
|
-
},
|
|
1205
|
-
enumerable: false,
|
|
1206
|
-
configurable: true
|
|
1207
|
-
});
|
|
1208
|
-
Object.defineProperty(AbstractPopupMenuComponent.prototype, "yPosition", {
|
|
1010
|
+
Object.defineProperty(AbstractPopupMenuComponent.prototype, "faceAdapter", {
|
|
1209
1011
|
get: function () {
|
|
1210
|
-
return this.
|
|
1211
|
-
},
|
|
1212
|
-
set: function (position) {
|
|
1213
|
-
this.group.yPosition = position;
|
|
1012
|
+
return this.faceAdapterModel.value;
|
|
1214
1013
|
},
|
|
1215
1014
|
enumerable: false,
|
|
1216
1015
|
configurable: true
|
|
1217
1016
|
});
|
|
1218
|
-
AbstractPopupMenuComponent.prototype.
|
|
1219
|
-
this.
|
|
1017
|
+
AbstractPopupMenuComponent.prototype.isRoot = function () {
|
|
1018
|
+
return !this.parent;
|
|
1220
1019
|
};
|
|
1221
|
-
AbstractPopupMenuComponent.prototype.
|
|
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
|
+
});
|
|
1222
1026
|
};
|
|
1223
|
-
|
|
1224
|
-
AbstractPopupMenuComponent.prototype.closeMenu = function () {
|
|
1027
|
+
AbstractPopupMenuComponent.prototype.onCommandFired = function () {
|
|
1225
1028
|
this.triggers.forEach(function (trigger) {
|
|
1226
1029
|
if (trigger.menuOpen) {
|
|
1227
1030
|
trigger.closeMenu();
|
|
1228
1031
|
}
|
|
1229
1032
|
});
|
|
1230
1033
|
};
|
|
1034
|
+
AbstractPopupMenuComponent.prototype.getFace = function () {
|
|
1035
|
+
return this.faceAdapter.face;
|
|
1036
|
+
};
|
|
1231
1037
|
return AbstractPopupMenuComponent;
|
|
1232
|
-
}(
|
|
1038
|
+
}(PopupAwareComponent));
|
|
1233
1039
|
AbstractPopupMenuComponent.decorators = [
|
|
1234
1040
|
{ type: i0.Component, args: [{
|
|
1235
|
-
selector: 'aup-abstract-popup-menu
|
|
1041
|
+
selector: 'aup-abstract-popup-menu',
|
|
1236
1042
|
template: ''
|
|
1237
1043
|
},] }
|
|
1238
1044
|
];
|
|
1239
1045
|
AbstractPopupMenuComponent.ctorParameters = function () { return [
|
|
1240
|
-
{ type:
|
|
1046
|
+
{ type: i0.ElementRef },
|
|
1047
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: [POPUP_CONTAINER,] }] }
|
|
1241
1048
|
]; };
|
|
1242
1049
|
AbstractPopupMenuComponent.propDecorators = {
|
|
1243
1050
|
xPosition: [{ type: i0.Input }],
|
|
1244
1051
|
yPosition: [{ type: i0.Input }],
|
|
1245
1052
|
triggers: [{ type: i0.ViewChildren, args: [menu.MatMenuTrigger,] }]
|
|
1246
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);
|
|
1247
1060
|
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
var _this = _super.call(this) || this;
|
|
1256
|
-
_this.parent = parent;
|
|
1257
|
-
_this.groupViewDataModel = new pectin.MutableValueModel();
|
|
1258
|
-
_this.commandFired = new i0.EventEmitter();
|
|
1259
|
-
_this.ViewData = exports.ViewData;
|
|
1260
|
-
_this.TrackBy = exports.TrackBy;
|
|
1261
|
-
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1262
|
-
_this.children = chain(_this.groupViewDataModel).pluckList('children');
|
|
1263
|
-
_this.hasMixedIcons = chain(_this.groupViewDataModel).pluck('hasMixedIcons');
|
|
1264
|
-
return _this;
|
|
1061
|
+
/**
|
|
1062
|
+
*
|
|
1063
|
+
*/
|
|
1064
|
+
var ToolBarComponent = /** @class */ (function (_super) {
|
|
1065
|
+
__extends(ToolBarComponent, _super);
|
|
1066
|
+
function ToolBarComponent() {
|
|
1067
|
+
return _super.call(this) || this;
|
|
1265
1068
|
}
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
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 () {
|
|
1271
1078
|
};
|
|
1272
|
-
|
|
1273
|
-
|
|
1079
|
+
// @Trace()
|
|
1080
|
+
ToolBarComponent.prototype.ngAfterContentInit = function () {
|
|
1081
|
+
// this.group.initialise();
|
|
1274
1082
|
};
|
|
1275
1083
|
// @Trace()
|
|
1276
|
-
|
|
1277
|
-
this.commandFired.emit();
|
|
1278
|
-
this.triggers.forEach(function (trigger) {
|
|
1279
|
-
if (trigger.menuOpen) {
|
|
1280
|
-
trigger.closeMenu();
|
|
1281
|
-
}
|
|
1282
|
-
});
|
|
1084
|
+
ToolBarComponent.prototype.ngAfterViewInit = function () {
|
|
1283
1085
|
};
|
|
1284
|
-
return
|
|
1285
|
-
}(
|
|
1286
|
-
|
|
1086
|
+
return ToolBarComponent;
|
|
1087
|
+
}(exports.CommandContainer));
|
|
1088
|
+
ToolBarComponent.decorators = [
|
|
1287
1089
|
{ type: i0.Component, args: [{
|
|
1288
|
-
selector: 'aup-
|
|
1289
|
-
template:
|
|
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}"]
|
|
1290
1094
|
},] }
|
|
1291
1095
|
];
|
|
1292
|
-
|
|
1293
|
-
|
|
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 = [
|
|
1116
|
+
{ type: i0.Component, args: [{
|
|
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 }"]
|
|
1121
|
+
},] }
|
|
1122
|
+
];
|
|
1123
|
+
SeparatorComponent.ctorParameters = function () { return [
|
|
1124
|
+
{ type: i0.ElementRef },
|
|
1125
|
+
{ type: exports.CommandContainer, decorators: [{ type: i0.Optional }] }
|
|
1294
1126
|
]; };
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
groupViewData: [{ type: i0.Input }],
|
|
1298
|
-
commandFired: [{ type: i0.Output }],
|
|
1299
|
-
triggers: [{ type: i0.ViewChildren, args: [menu.MatMenuTrigger,] }]
|
|
1127
|
+
SeparatorComponent.propDecorators = {
|
|
1128
|
+
isHorizontalContainer: [{ type: i0.HostBinding, args: ['class.horizontal-container',] }]
|
|
1300
1129
|
};
|
|
1301
|
-
__decorate([
|
|
1302
|
-
pectin.StoreInValueModel('groupViewDataModel'),
|
|
1303
|
-
__metadata("design:type", exports.ViewData.GroupData)
|
|
1304
|
-
], CommandGroupMenuRendererComponent.prototype, "groupViewData", void 0);
|
|
1305
1130
|
|
|
1306
|
-
var
|
|
1307
|
-
__extends(
|
|
1308
|
-
function
|
|
1131
|
+
var PopupMenuRendererComponent = /** @class */ (function (_super) {
|
|
1132
|
+
__extends(PopupMenuRendererComponent, _super);
|
|
1133
|
+
function PopupMenuRendererComponent() {
|
|
1309
1134
|
var _this = _super.call(this) || this;
|
|
1310
|
-
_this.
|
|
1135
|
+
_this._childList = new pectin.DelegatingListModel();
|
|
1311
1136
|
_this.commandFired = new i0.EventEmitter();
|
|
1312
|
-
_this.ViewData = exports.ViewData;
|
|
1313
1137
|
_this.TrackBy = exports.TrackBy;
|
|
1314
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;
|
|
1315
|
-
|
|
1316
|
-
|
|
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();
|
|
1317
1148
|
return _this;
|
|
1318
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
|
+
};
|
|
1319
1179
|
// @Trace()
|
|
1320
|
-
|
|
1180
|
+
PopupMenuRendererComponent.prototype.onCommandFired = function () {
|
|
1321
1181
|
this.commandFired.emit();
|
|
1322
1182
|
this.triggers.forEach(function (trigger) {
|
|
1323
1183
|
if (trigger.menuOpen) {
|
|
@@ -1325,73 +1185,40 @@
|
|
|
1325
1185
|
}
|
|
1326
1186
|
});
|
|
1327
1187
|
};
|
|
1328
|
-
|
|
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;
|
|
1329
1208
|
}(DisposableComponent));
|
|
1330
|
-
|
|
1209
|
+
PopupMenuRendererComponent.decorators = [
|
|
1331
1210
|
{ type: i0.Component, args: [{
|
|
1332
|
-
selector: 'aup-
|
|
1333
|
-
template: "<
|
|
1334
|
-
styles: [":host{align-items:center;display:inline-flex;flex-direction:row}:host:not(.render-root) mat-divider{-ms-grid-row-align:stretch;align-self:stretch;margin:4px 0}:host:not(.render-root)>*+*{margin-left:8px}:host span.flex{flex:1}"]
|
|
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"
|
|
1335
1213
|
},] }
|
|
1336
1214
|
];
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
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 },] }],
|
|
1342
1219
|
commandFired: [{ type: i0.Output }],
|
|
1343
1220
|
triggers: [{ type: i0.ViewChildren, args: [menu.MatMenuTrigger,] }]
|
|
1344
1221
|
};
|
|
1345
|
-
__decorate([
|
|
1346
|
-
pectin.TrackExternal(),
|
|
1347
|
-
__metadata("design:type", pectin.ValueModel)
|
|
1348
|
-
], CommandGroupRendererComponent.prototype, "groupViewDataModel", void 0);
|
|
1349
|
-
__decorate([
|
|
1350
|
-
pectin.StoreInValueModel('groupViewDataModel'),
|
|
1351
|
-
__metadata("design:type", exports.ViewData.GroupData)
|
|
1352
|
-
], CommandGroupRendererComponent.prototype, "groupViewData", void 0);
|
|
1353
|
-
|
|
1354
|
-
var CommandGroupComponent = /** @class */ (function (_super) {
|
|
1355
|
-
__extends(CommandGroupComponent, _super);
|
|
1356
|
-
function CommandGroupComponent(parent) {
|
|
1357
|
-
var _this = _super.call(this, parent) || this;
|
|
1358
|
-
_this.parent = parent;
|
|
1359
|
-
_this.xPosition = 'after';
|
|
1360
|
-
_this.yPosition = 'below';
|
|
1361
|
-
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
|
|
1362
|
-
_this.faceListModel = chain(_this.faceModel).mapToList(function (v) { return [v]; });
|
|
1363
|
-
_this.parent.registerGroup(_this, _this.faceListModel);
|
|
1364
|
-
when(_this.faceListModel).changes(function () { return _this.notifyChanged(); });
|
|
1365
|
-
return _this;
|
|
1366
|
-
}
|
|
1367
|
-
return CommandGroupComponent;
|
|
1368
|
-
}(exports.CommandGroup));
|
|
1369
|
-
CommandGroupComponent.decorators = [
|
|
1370
|
-
{ type: i0.Component, args: [{
|
|
1371
|
-
selector: 'aup-command-group',
|
|
1372
|
-
template: '',
|
|
1373
|
-
providers: [
|
|
1374
|
-
{ provide: exports.CommandGroup, useExisting: CommandGroupComponent }
|
|
1375
|
-
]
|
|
1376
|
-
},] }
|
|
1377
|
-
];
|
|
1378
|
-
CommandGroupComponent.ctorParameters = function () { return [
|
|
1379
|
-
{ type: exports.CommandGroup, decorators: [{ type: i0.SkipSelf }] }
|
|
1380
|
-
]; };
|
|
1381
|
-
CommandGroupComponent.propDecorators = {
|
|
1382
|
-
faceModel: [{ type: i0.Input }],
|
|
1383
|
-
face: [{ type: i0.Input }],
|
|
1384
|
-
xPosition: [{ type: i0.Input }],
|
|
1385
|
-
yPosition: [{ type: i0.Input }]
|
|
1386
|
-
};
|
|
1387
|
-
__decorate([
|
|
1388
|
-
pectin.TrackExternal(),
|
|
1389
|
-
__metadata("design:type", pectin.ValueModel)
|
|
1390
|
-
], CommandGroupComponent.prototype, "faceModel", void 0);
|
|
1391
|
-
__decorate([
|
|
1392
|
-
pectin.StoreInValueModel('faceModel'),
|
|
1393
|
-
__metadata("design:type", Object)
|
|
1394
|
-
], CommandGroupComponent.prototype, "face", void 0);
|
|
1395
1222
|
|
|
1396
1223
|
/**
|
|
1397
1224
|
* Custom CSS:
|
|
@@ -1467,87 +1294,13 @@
|
|
|
1467
1294
|
__metadata("design:type", Array)
|
|
1468
1295
|
], CommandFaceComponent.prototype, "_rawFaces", void 0);
|
|
1469
1296
|
|
|
1470
|
-
/**
|
|
1471
|
-
*
|
|
1472
|
-
*/
|
|
1473
|
-
var CommandComponent = /** @class */ (function (_super) {
|
|
1474
|
-
__extends(CommandComponent, _super);
|
|
1475
|
-
function CommandComponent(parent) {
|
|
1476
|
-
var _this = _super.call(this) || this;
|
|
1477
|
-
_this.parent = parent;
|
|
1478
|
-
_this.CommandFace = exports.CommandFace;
|
|
1479
|
-
var _a = pectin.Dsl.disposeWith(_this), chain = _a.chain, switchOn = _a.switchOn;
|
|
1480
|
-
_this.faces = chain(_this.command.busy).mapToList(function (busy) {
|
|
1481
|
-
return busy ?
|
|
1482
|
-
[_this.busyFaceModel.value, _this.faceModel.value] :
|
|
1483
|
-
[_this.faceModel.value, _this.busyFaceModel.value];
|
|
1484
|
-
}, { allowNil: true, dependsOn: [_this.faceModel, _this.busyFaceModel] })
|
|
1485
|
-
.rejectNil();
|
|
1486
|
-
_this.activeFace = _this.faces.first();
|
|
1487
|
-
_this.buttonStyle = chain(_this.activeFace).map(function (f) { return exports.CommandFace.getStyleOf(f); });
|
|
1488
|
-
_this.colorModel = chain(_this.activeFace).map(function (f) { return exports.CommandFace.getColorOf(f); });
|
|
1489
|
-
if (parent) {
|
|
1490
|
-
_this.registerDisposable(_this.parent.registerCommand(_this.command, _this.faces));
|
|
1491
|
-
}
|
|
1492
|
-
return _this;
|
|
1493
|
-
}
|
|
1494
|
-
CommandComponent.prototype.isActive = function (face) {
|
|
1495
|
-
return this.activeFace.query().equals(face);
|
|
1496
|
-
};
|
|
1497
|
-
CommandComponent.prototype.ngOnInit = function () {
|
|
1498
|
-
};
|
|
1499
|
-
return CommandComponent;
|
|
1500
|
-
}(DisposableComponent));
|
|
1501
|
-
CommandComponent.decorators = [
|
|
1502
|
-
{ type: i0.Component, args: [{
|
|
1503
|
-
selector: 'aup-command',
|
|
1504
|
-
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",
|
|
1505
|
-
styles: [":host{display:inline-flex;flex-direction:row;justify-content:stretch}button{flex:1}"]
|
|
1506
|
-
},] }
|
|
1507
|
-
];
|
|
1508
|
-
CommandComponent.ctorParameters = function () { return [
|
|
1509
|
-
{ type: exports.CommandGroup, decorators: [{ type: i0.Optional }] }
|
|
1510
|
-
]; };
|
|
1511
|
-
CommandComponent.propDecorators = {
|
|
1512
|
-
command: [{ type: i0.Input }],
|
|
1513
|
-
faceModel: [{ type: i0.Input }],
|
|
1514
|
-
face: [{ type: i0.Input }],
|
|
1515
|
-
busyFaceModel: [{ type: i0.Input }],
|
|
1516
|
-
busyFace: [{ type: i0.Input }]
|
|
1517
|
-
};
|
|
1518
|
-
__decorate([
|
|
1519
|
-
pectin.TrackExternal(),
|
|
1520
|
-
__metadata("design:type", pectin.Command)
|
|
1521
|
-
], CommandComponent.prototype, "command", void 0);
|
|
1522
|
-
__decorate([
|
|
1523
|
-
pectin.TrackExternal(),
|
|
1524
|
-
__metadata("design:type", pectin.ValueModel)
|
|
1525
|
-
], CommandComponent.prototype, "faceModel", void 0);
|
|
1526
|
-
__decorate([
|
|
1527
|
-
pectin.StoreInValueModel('faceModel'),
|
|
1528
|
-
__metadata("design:type", Object)
|
|
1529
|
-
], CommandComponent.prototype, "face", void 0);
|
|
1530
|
-
__decorate([
|
|
1531
|
-
pectin.TrackExternal(),
|
|
1532
|
-
__metadata("design:type", pectin.ValueModel)
|
|
1533
|
-
], CommandComponent.prototype, "busyFaceModel", void 0);
|
|
1534
|
-
__decorate([
|
|
1535
|
-
pectin.StoreInValueModel('busyFaceModel'),
|
|
1536
|
-
__metadata("design:type", Object)
|
|
1537
|
-
], CommandComponent.prototype, "busyFace", void 0);
|
|
1538
|
-
|
|
1539
1297
|
/**
|
|
1540
1298
|
*
|
|
1541
1299
|
*/
|
|
1542
1300
|
var FlexComponent = /** @class */ (function (_super) {
|
|
1543
1301
|
__extends(FlexComponent, _super);
|
|
1544
|
-
function FlexComponent(
|
|
1545
|
-
|
|
1546
|
-
_this.parent = parent;
|
|
1547
|
-
if (parent) {
|
|
1548
|
-
parent.registerFlex(_this);
|
|
1549
|
-
}
|
|
1550
|
-
return _this;
|
|
1302
|
+
function FlexComponent() {
|
|
1303
|
+
return _super.call(this) || this;
|
|
1551
1304
|
}
|
|
1552
1305
|
FlexComponent.prototype.ngOnInit = function () {
|
|
1553
1306
|
};
|
|
@@ -1559,44 +1312,48 @@
|
|
|
1559
1312
|
template: ""
|
|
1560
1313
|
},] }
|
|
1561
1314
|
];
|
|
1562
|
-
FlexComponent.ctorParameters = function () { return [
|
|
1563
|
-
{ type: exports.CommandGroup }
|
|
1564
|
-
]; };
|
|
1315
|
+
FlexComponent.ctorParameters = function () { return []; };
|
|
1565
1316
|
|
|
1566
|
-
var ɵ0 = exports.CommandGroup.factory;
|
|
1567
1317
|
/**
|
|
1568
1318
|
*
|
|
1569
1319
|
*/
|
|
1570
1320
|
var MoreMenuComponent = /** @class */ (function (_super) {
|
|
1571
1321
|
__extends(MoreMenuComponent, _super);
|
|
1572
|
-
function MoreMenuComponent(
|
|
1573
|
-
var _this = _super.call(this,
|
|
1322
|
+
function MoreMenuComponent(element, parent) {
|
|
1323
|
+
var _this = _super.call(this, element, parent) || this;
|
|
1574
1324
|
_this.tooltipModel = new pectin.MutableValueModel();
|
|
1575
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;
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
{
|
|
1580
|
-
|
|
1581
|
-
tooltip: function () {
|
|
1582
|
-
return tooltip;
|
|
1583
|
-
}
|
|
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;
|
|
1584
1331
|
}
|
|
1585
|
-
|
|
1586
|
-
}, { allowNil: true });
|
|
1332
|
+
};
|
|
1333
|
+
}, { allowNil: true }));
|
|
1587
1334
|
return _this;
|
|
1588
1335
|
}
|
|
1336
|
+
Object.defineProperty(MoreMenuComponent.prototype, "face", {
|
|
1337
|
+
get: function () {
|
|
1338
|
+
return this.faceModelDelegate.value;
|
|
1339
|
+
},
|
|
1340
|
+
enumerable: false,
|
|
1341
|
+
configurable: true
|
|
1342
|
+
});
|
|
1589
1343
|
return MoreMenuComponent;
|
|
1590
1344
|
}(AbstractPopupMenuComponent));
|
|
1591
1345
|
MoreMenuComponent.decorators = [
|
|
1592
1346
|
{ type: i0.Component, args: [{
|
|
1593
1347
|
selector: 'aup-more-menu',
|
|
1594
|
-
template: '<aup-command-
|
|
1595
|
-
providers: [
|
|
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
|
+
]
|
|
1596
1352
|
},] }
|
|
1597
1353
|
];
|
|
1598
1354
|
MoreMenuComponent.ctorParameters = function () { return [
|
|
1599
|
-
{ type:
|
|
1355
|
+
{ type: i0.ElementRef },
|
|
1356
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: [POPUP_CONTAINER,] }, { type: i0.Optional }, { type: i0.SkipSelf }] }
|
|
1600
1357
|
]; };
|
|
1601
1358
|
MoreMenuComponent.propDecorators = {
|
|
1602
1359
|
tooltip: [{ type: i0.Input }]
|
|
@@ -1606,36 +1363,38 @@
|
|
|
1606
1363
|
__metadata("design:type", String)
|
|
1607
1364
|
], MoreMenuComponent.prototype, "tooltip", void 0);
|
|
1608
1365
|
|
|
1609
|
-
var ɵ0$1 = exports.CommandGroup.factory;
|
|
1610
1366
|
/**
|
|
1611
1367
|
*
|
|
1612
1368
|
*/
|
|
1613
1369
|
var PopupMenuComponent = /** @class */ (function (_super) {
|
|
1614
1370
|
__extends(PopupMenuComponent, _super);
|
|
1615
|
-
function PopupMenuComponent(
|
|
1616
|
-
var _this = _super.call(this,
|
|
1371
|
+
function PopupMenuComponent(element, parent) {
|
|
1372
|
+
var _this = _super.call(this, element, parent) || this;
|
|
1617
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;
|
|
1618
|
-
group.faceListModel = chain(_this.faceModel).mapToList(function (face) { return [face]; });
|
|
1619
1374
|
return _this;
|
|
1375
|
+
// group.faceListModel = chain(this.faceModel).mapToList(face => [face]);
|
|
1620
1376
|
}
|
|
1621
1377
|
return PopupMenuComponent;
|
|
1622
1378
|
}(AbstractPopupMenuComponent));
|
|
1623
1379
|
PopupMenuComponent.decorators = [
|
|
1624
1380
|
{ type: i0.Component, args: [{
|
|
1625
1381
|
selector: 'aup-popup-menu',
|
|
1626
|
-
template: '<aup-command-
|
|
1627
|
-
providers: [
|
|
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
|
+
]
|
|
1628
1386
|
},] }
|
|
1629
1387
|
];
|
|
1630
1388
|
PopupMenuComponent.ctorParameters = function () { return [
|
|
1631
|
-
{ type:
|
|
1389
|
+
{ type: i0.ElementRef },
|
|
1390
|
+
{ type: undefined, decorators: [{ type: i0.Inject, args: [POPUP_CONTAINER,] }, { type: i0.Optional }, { type: i0.SkipSelf }] }
|
|
1632
1391
|
]; };
|
|
1633
1392
|
PopupMenuComponent.propDecorators = {
|
|
1634
1393
|
faceModel: [{ type: i0.Input }],
|
|
1635
1394
|
face: [{ type: i0.Input }]
|
|
1636
1395
|
};
|
|
1637
1396
|
__decorate([
|
|
1638
|
-
pectin.TrackExternal(),
|
|
1397
|
+
pectin.TrackExternal({ delegateTo: 'faceModelDelegate' }),
|
|
1639
1398
|
__metadata("design:type", pectin.ValueModel)
|
|
1640
1399
|
], PopupMenuComponent.prototype, "faceModel", void 0);
|
|
1641
1400
|
__decorate([
|
|
@@ -1643,71 +1402,6 @@
|
|
|
1643
1402
|
__metadata("design:type", Object)
|
|
1644
1403
|
], PopupMenuComponent.prototype, "face", void 0);
|
|
1645
1404
|
|
|
1646
|
-
/**
|
|
1647
|
-
*
|
|
1648
|
-
*/
|
|
1649
|
-
var SeparatorComponent = /** @class */ (function (_super) {
|
|
1650
|
-
__extends(SeparatorComponent, _super);
|
|
1651
|
-
function SeparatorComponent(parent) {
|
|
1652
|
-
var _this = _super.call(this) || this;
|
|
1653
|
-
_this.parent = parent;
|
|
1654
|
-
if (parent) {
|
|
1655
|
-
parent.registerSeparator(_this);
|
|
1656
|
-
}
|
|
1657
|
-
return _this;
|
|
1658
|
-
}
|
|
1659
|
-
SeparatorComponent.prototype.isVertical = function () {
|
|
1660
|
-
return this === null || this === void 0 ? void 0 : this.parent.isRoot();
|
|
1661
|
-
};
|
|
1662
|
-
SeparatorComponent.prototype.ngOnInit = function () {
|
|
1663
|
-
};
|
|
1664
|
-
return SeparatorComponent;
|
|
1665
|
-
}(DisposableComponent));
|
|
1666
|
-
SeparatorComponent.decorators = [
|
|
1667
|
-
{ type: i0.Component, args: [{
|
|
1668
|
-
selector: 'aup-separator',
|
|
1669
|
-
template: "\n <mat-divider [vertical]=\"isVertical()\"></mat-divider>"
|
|
1670
|
-
},] }
|
|
1671
|
-
];
|
|
1672
|
-
SeparatorComponent.ctorParameters = function () { return [
|
|
1673
|
-
{ type: exports.CommandGroup, decorators: [{ type: i0.Optional }] }
|
|
1674
|
-
]; };
|
|
1675
|
-
|
|
1676
|
-
var ɵ0$2 = exports.CommandGroup.factory;
|
|
1677
|
-
/**
|
|
1678
|
-
*
|
|
1679
|
-
*/
|
|
1680
|
-
var ToolBarComponent = /** @class */ (function (_super) {
|
|
1681
|
-
__extends(ToolBarComponent, _super);
|
|
1682
|
-
function ToolBarComponent(group) {
|
|
1683
|
-
var _this = _super.call(this) || this;
|
|
1684
|
-
_this.group = group;
|
|
1685
|
-
return _this;
|
|
1686
|
-
}
|
|
1687
|
-
// @Trace()
|
|
1688
|
-
ToolBarComponent.prototype.ngOnInit = function () {
|
|
1689
|
-
};
|
|
1690
|
-
// @Trace()
|
|
1691
|
-
ToolBarComponent.prototype.ngAfterContentInit = function () {
|
|
1692
|
-
this.group.initialise();
|
|
1693
|
-
};
|
|
1694
|
-
// @Trace()
|
|
1695
|
-
ToolBarComponent.prototype.ngAfterViewInit = function () {
|
|
1696
|
-
};
|
|
1697
|
-
return ToolBarComponent;
|
|
1698
|
-
}(DisposableComponent));
|
|
1699
|
-
ToolBarComponent.decorators = [
|
|
1700
|
-
{ type: i0.Component, args: [{
|
|
1701
|
-
selector: 'aup-tool-bar',
|
|
1702
|
-
template: '<aup-command-group-renderer [renderRootNode]="false" [groupViewDataModel]="group.rootTemplate"></aup-command-group-renderer>',
|
|
1703
|
-
providers: [{ provide: exports.CommandGroup, useFactory: ɵ0$2 }],
|
|
1704
|
-
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}"]
|
|
1705
|
-
},] }
|
|
1706
|
-
];
|
|
1707
|
-
ToolBarComponent.ctorParameters = function () { return [
|
|
1708
|
-
{ type: exports.CommandGroup }
|
|
1709
|
-
]; };
|
|
1710
|
-
|
|
1711
1405
|
var FocusContainerComponent = /** @class */ (function (_super) {
|
|
1712
1406
|
__extends(FocusContainerComponent, _super);
|
|
1713
1407
|
function FocusContainerComponent(focusManager) {
|
|
@@ -2834,7 +2528,7 @@
|
|
|
2834
2528
|
|
|
2835
2529
|
var noop = function () {
|
|
2836
2530
|
};
|
|
2837
|
-
var ɵ0
|
|
2531
|
+
var ɵ0 = noop;
|
|
2838
2532
|
var CELL_RENDERER_COMPONENT_ROW_CACHE = Symbol("aup-cell-renderer:row-data-cache");
|
|
2839
2533
|
var ColumnModel = /** @class */ (function () {
|
|
2840
2534
|
function ColumnModel(columnId, defaults) {
|
|
@@ -3788,14 +3482,12 @@
|
|
|
3788
3482
|
ToolBarComponent,
|
|
3789
3483
|
CommandComponent,
|
|
3790
3484
|
PopupMenuComponent,
|
|
3791
|
-
CommandGroupComponent,
|
|
3792
3485
|
CommandFaceComponent,
|
|
3793
3486
|
MoreMenuComponent,
|
|
3794
3487
|
SeparatorComponent,
|
|
3795
3488
|
FlexComponent,
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
AbstractPopupMenuComponent
|
|
3489
|
+
AbstractPopupMenuComponent,
|
|
3490
|
+
PopupMenuRendererComponent
|
|
3799
3491
|
],
|
|
3800
3492
|
imports: [
|
|
3801
3493
|
i2.CommonModule,
|
|
@@ -3842,7 +3534,6 @@
|
|
|
3842
3534
|
exports.IconComponent,
|
|
3843
3535
|
SectionHeaderComponent,
|
|
3844
3536
|
TableRowMenuComponent,
|
|
3845
|
-
CommandGroupComponent,
|
|
3846
3537
|
ToolBarComponent,
|
|
3847
3538
|
CommandComponent,
|
|
3848
3539
|
PopupMenuComponent,
|
|
@@ -8317,9 +8008,6 @@
|
|
|
8317
8008
|
exports.CommandComponent = CommandComponent;
|
|
8318
8009
|
exports.CommandDirective = CommandDirective;
|
|
8319
8010
|
exports.CommandFaceComponent = CommandFaceComponent;
|
|
8320
|
-
exports.CommandGroupComponent = CommandGroupComponent;
|
|
8321
|
-
exports.CommandGroupMenuRendererComponent = CommandGroupMenuRendererComponent;
|
|
8322
|
-
exports.CommandGroupRendererComponent = CommandGroupRendererComponent;
|
|
8323
8011
|
exports.ComponentCellRendererPortalRef = ComponentCellRendererPortalRef;
|
|
8324
8012
|
exports.ComponentsModule = ComponentsModule;
|
|
8325
8013
|
exports.ConfirmThenDialogComponent = ConfirmThenDialogComponent;
|
|
@@ -8365,6 +8053,7 @@
|
|
|
8365
8053
|
exports.NoopComponent = NoopComponent;
|
|
8366
8054
|
exports.NumberInputComponent = NumberInputComponent;
|
|
8367
8055
|
exports.PLACE_AUTH_SERVICE = PLACE_AUTH_SERVICE;
|
|
8056
|
+
exports.POPUP_CONTAINER = POPUP_CONTAINER;
|
|
8368
8057
|
exports.PORTAL_EDITOR_COMPONENT = PORTAL_EDITOR_COMPONENT;
|
|
8369
8058
|
exports.PORTAL_RENDERER_COMPONENT = PORTAL_RENDERER_COMPONENT;
|
|
8370
8059
|
exports.PasswordInputComponent = PasswordInputComponent;
|
|
@@ -8378,8 +8067,10 @@
|
|
|
8378
8067
|
exports.Point = Point;
|
|
8379
8068
|
exports.PopStateDuringInteractionNavigation = PopStateDuringInteractionNavigation;
|
|
8380
8069
|
exports.PopStateNavigation = PopStateNavigation;
|
|
8070
|
+
exports.PopupAwareComponent = PopupAwareComponent;
|
|
8381
8071
|
exports.PopupInteractionContextComponent = PopupInteractionContextComponent;
|
|
8382
8072
|
exports.PopupMenuComponent = PopupMenuComponent;
|
|
8073
|
+
exports.PopupMenuRendererComponent = PopupMenuRendererComponent;
|
|
8383
8074
|
exports.PropertyColumnModel = PropertyColumnModel;
|
|
8384
8075
|
exports.ROUTE_PARAMETER_LIST_KEY = ROUTE_PARAMETER_LIST_KEY;
|
|
8385
8076
|
exports.RemoveLastInteractionFromUrlNavigationSession = RemoveLastInteractionFromUrlNavigationSession;
|