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

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 (28) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/bundles/coolon-angular-ui-powerups.umd.js +81 -76
  3. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
  5. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  6. package/coolon-angular-ui-powerups.metadata.json +1 -1
  7. package/esm2015/lib/components/commands/group/popup-aware.component.js +3 -0
  8. package/esm2015/lib/components/commands/group/popup-aware.component.js.map +1 -1
  9. package/esm2015/lib/components/commands/group/popup-aware.component.metadata.json +1 -1
  10. package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.js +10 -10
  11. package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.js.map +1 -1
  12. package/esm2015/lib/components/commands/group/popup-menu/abstract-popup-menu.component.metadata.json +1 -1
  13. package/esm2015/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.js.map +1 -1
  14. package/esm2015/lib/components/commands/group/popup-menu/popup-menu-renderer/popup-menu-renderer.component.metadata.json +1 -1
  15. package/esm2015/lib/components/commands/group/popup-menu/popup-menu.component.js.map +1 -1
  16. package/esm2015/lib/components/commands/separator.component.js +5 -4
  17. package/esm2015/lib/components/commands/separator.component.js.map +1 -1
  18. package/esm2015/lib/components/commands/separator.component.metadata.json +1 -1
  19. package/fesm2015/coolon-angular-ui-powerups.js +69 -64
  20. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  21. package/lib/components/commands/group/popup-aware.component.d.ts +1 -0
  22. package/lib/components/commands/group/popup-menu/abstract-popup-menu.component.d.ts +3 -2
  23. package/lib/components/commands/separator.component.d.ts +2 -1
  24. package/package.json +5 -4
  25. package/schematics/ng-add/index.js +4 -4
  26. package/schematics/ng-add/index.js.map +1 -1
  27. package/schematics/place-routes/place-builder.js +1 -1
  28. package/schematics/place-routes/place-builder.js.map +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,28 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [3.7.0](https://bitbucket.org/coolon/angular-ui-powerups/compare/v3.7.0-alpha.10...v3.7.0) (2021-01-22)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * fixed schematic issues and updated package versions ([d24992c](https://bitbucket.org/coolon/angular-ui-powerups/commit/d24992c7d04259a557771d0adfb4358ced57f54b))
11
+
12
+ ## [3.7.0-alpha.10](https://bitbucket.org/coolon/angular-ui-powerups/compare/v3.7.0-alpha.9...v3.7.0-alpha.10) (2020-12-30)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * updated AbstractPopupMenu to re-order correctly on content changes ([6d63a1b](https://bitbucket.org/coolon/angular-ui-powerups/commit/6d63a1b49e271db0b10c52e2db77310349142b8e))
18
+
19
+ ## [3.7.0-alpha.9](https://bitbucket.org/coolon/angular-ui-powerups/compare/v3.7.0-alpha.7...v3.7.0-alpha.9) (2020-12-30)
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * popup menus now support children using ng-if and ng-for ([ea0d020](https://bitbucket.org/coolon/angular-ui-powerups/commit/ea0d0205982edf126eb24516fc17dd0aeaa23146))
25
+ * separators not rendering in popups ([7d17468](https://bitbucket.org/coolon/angular-ui-powerups/commit/7d1746822d3105b1f0aab66c0d710146864a6e94))
26
+
5
27
  ## [3.7.0-alpha.8](https://bitbucket.org/coolon/angular-ui-powerups/compare/v3.7.0-alpha.7...v3.7.0-alpha.8) (2020-12-30)
6
28
 
7
29
 
@@ -870,16 +870,19 @@
870
870
  }
871
871
  Object.defineProperty(PopupAwareComponent.prototype, "componentIndex", {
872
872
  get: function () {
873
- var node = this.element.nativeElement;
874
- var index = 0;
875
- while ((node = node.previousElementSibling)) {
876
- index++;
877
- }
878
- return index;
873
+ return this.computeComponentIndex();
879
874
  },
880
875
  enumerable: false,
881
876
  configurable: true
882
877
  });
878
+ PopupAwareComponent.prototype.computeComponentIndex = function () {
879
+ var node = this.element.nativeElement;
880
+ var index = 0;
881
+ while ((node = node.previousElementSibling)) {
882
+ index++;
883
+ }
884
+ return index;
885
+ };
883
886
  PopupAwareComponent.prototype.getFace = function () {
884
887
  return undefined;
885
888
  };
@@ -990,74 +993,6 @@
990
993
  CommandContainer.Orientation = typescriptStringEnums.Enum({ HORIZONTAL: 'horizontal', VERTICAL: 'vertical' });
991
994
  })(exports.CommandContainer || (exports.CommandContainer = {}));
992
995
 
993
- /**
994
- *
995
- */
996
- var AbstractPopupMenuComponent = /** @class */ (function (_super) {
997
- __extends(AbstractPopupMenuComponent, _super);
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');
1008
- return _this;
1009
- }
1010
- Object.defineProperty(AbstractPopupMenuComponent.prototype, "faceAdapter", {
1011
- get: function () {
1012
- return this.faceAdapterModel.value;
1013
- },
1014
- enumerable: false,
1015
- configurable: true
1016
- });
1017
- AbstractPopupMenuComponent.prototype.isRoot = function () {
1018
- return !this.parent;
1019
- };
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
- });
1026
- };
1027
- AbstractPopupMenuComponent.prototype.onCommandFired = function () {
1028
- this.triggers.forEach(function (trigger) {
1029
- if (trigger.menuOpen) {
1030
- trigger.closeMenu();
1031
- }
1032
- });
1033
- };
1034
- AbstractPopupMenuComponent.prototype.getFace = function () {
1035
- return this.faceAdapter.face;
1036
- };
1037
- return AbstractPopupMenuComponent;
1038
- }(PopupAwareComponent));
1039
- AbstractPopupMenuComponent.decorators = [
1040
- { type: i0.Component, args: [{
1041
- selector: 'aup-abstract-popup-menu',
1042
- template: ''
1043
- },] }
1044
- ];
1045
- AbstractPopupMenuComponent.ctorParameters = function () { return [
1046
- { type: i0.ElementRef },
1047
- { type: undefined, decorators: [{ type: i0.Inject, args: [POPUP_CONTAINER,] }] }
1048
- ]; };
1049
- AbstractPopupMenuComponent.propDecorators = {
1050
- xPosition: [{ type: i0.Input }],
1051
- yPosition: [{ type: i0.Input }],
1052
- triggers: [{ type: i0.ViewChildren, args: [menu.MatMenuTrigger,] }]
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);
1060
-
1061
996
  /**
1062
997
  *
1063
998
  */
@@ -1100,8 +1035,8 @@
1100
1035
  */
1101
1036
  var SeparatorComponent = /** @class */ (function (_super) {
1102
1037
  __extends(SeparatorComponent, _super);
1103
- function SeparatorComponent(element, containerParent) {
1104
- var _this = _super.call(this, element, containerParent instanceof AbstractPopupMenuComponent ? containerParent : undefined) || this;
1038
+ function SeparatorComponent(element, popupContainer, containerParent) {
1039
+ var _this = _super.call(this, element, popupContainer) || this;
1105
1040
  _this.containerParent = containerParent;
1106
1041
  return _this;
1107
1042
  }
@@ -1122,12 +1057,82 @@
1122
1057
  ];
1123
1058
  SeparatorComponent.ctorParameters = function () { return [
1124
1059
  { type: i0.ElementRef },
1060
+ { type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [POPUP_CONTAINER,] }] },
1125
1061
  { type: exports.CommandContainer, decorators: [{ type: i0.Optional }] }
1126
1062
  ]; };
1127
1063
  SeparatorComponent.propDecorators = {
1128
1064
  isHorizontalContainer: [{ type: i0.HostBinding, args: ['class.horizontal-container',] }]
1129
1065
  };
1130
1066
 
1067
+ /**
1068
+ *
1069
+ */
1070
+ var AbstractPopupMenuComponent = /** @class */ (function (_super) {
1071
+ __extends(AbstractPopupMenuComponent, _super);
1072
+ function AbstractPopupMenuComponent(element, parent) {
1073
+ var _this = _super.call(this, element, parent) || this;
1074
+ _this._unorderedChildren = new pectin.MutableListModel();
1075
+ _this.faceModelDelegate = new pectin.DelegatingValueModel();
1076
+ _this.faceAdapterModel = new pectin.DelegatingValueModel();
1077
+ _this.xPosition = 'after';
1078
+ _this.yPosition = 'below';
1079
+ 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;
1080
+ // TODO: get faceAdapter seems to get called during the super constuctor so we have to use a delegate
1081
+ // to avoid null pointers.
1082
+ _this.faceAdapterModel.setDelegate(chain(_this.faceModelDelegate).map(function (f) { return new exports.CommandFace.Adapter(f); }));
1083
+ _this.children = chain(_this._unorderedChildren).sortBy('componentIndex');
1084
+ return _this;
1085
+ }
1086
+ AbstractPopupMenuComponent.prototype.ngAfterContentChecked = function () {
1087
+ // force the list to re-order as the child indicies may have changed.
1088
+ this._unorderedChildren.value = __spread(this._unorderedChildren.value);
1089
+ };
1090
+ Object.defineProperty(AbstractPopupMenuComponent.prototype, "faceAdapter", {
1091
+ get: function () {
1092
+ return this.faceAdapterModel.value;
1093
+ },
1094
+ enumerable: false,
1095
+ configurable: true
1096
+ });
1097
+ AbstractPopupMenuComponent.prototype.isRoot = function () {
1098
+ return !this.parent;
1099
+ };
1100
+ // @Trace()
1101
+ AbstractPopupMenuComponent.prototype.register = function (component) {
1102
+ var _this = this;
1103
+ this._unorderedChildren.push(component);
1104
+ return pectin.Disposable.disposableThatRuns(function () {
1105
+ _this._unorderedChildren.remove(component);
1106
+ });
1107
+ };
1108
+ AbstractPopupMenuComponent.prototype.onCommandFired = function () {
1109
+ this.triggers.forEach(function (trigger) {
1110
+ if (trigger.menuOpen) {
1111
+ trigger.closeMenu();
1112
+ }
1113
+ });
1114
+ };
1115
+ AbstractPopupMenuComponent.prototype.getFace = function () {
1116
+ return this.faceAdapter.face;
1117
+ };
1118
+ return AbstractPopupMenuComponent;
1119
+ }(PopupAwareComponent));
1120
+ AbstractPopupMenuComponent.decorators = [
1121
+ { type: i0.Component, args: [{
1122
+ selector: 'aup-abstract-popup-menu',
1123
+ template: ''
1124
+ },] }
1125
+ ];
1126
+ AbstractPopupMenuComponent.ctorParameters = function () { return [
1127
+ { type: i0.ElementRef },
1128
+ { type: undefined, decorators: [{ type: i0.Inject, args: [POPUP_CONTAINER,] }] }
1129
+ ]; };
1130
+ AbstractPopupMenuComponent.propDecorators = {
1131
+ xPosition: [{ type: i0.Input }],
1132
+ yPosition: [{ type: i0.Input }],
1133
+ triggers: [{ type: i0.ViewChildren, args: [menu.MatMenuTrigger,] }]
1134
+ };
1135
+
1131
1136
  var PopupMenuRendererComponent = /** @class */ (function (_super) {
1132
1137
  __extends(PopupMenuRendererComponent, _super);
1133
1138
  function PopupMenuRendererComponent() {