@coolon/angular-ui-powerups 2.0.0-alpha.28 → 2.0.0-alpha.29

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 (29) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/bundles/coolon-angular-ui-powerups.umd.js +24 -9
  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/popup-menu/abstract-popup-menu.component.js +10 -3
  8. package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.js.map +1 -1
  9. package/esm2015/lib/components/commands/popup-menu/abstract-popup-menu.component.metadata.json +1 -1
  10. package/esm2015/lib/components/commands/popup-menu/more-menu.component.js +10 -5
  11. package/esm2015/lib/components/commands/popup-menu/more-menu.component.js.map +1 -1
  12. package/esm2015/lib/components/commands/popup-menu/more-menu.component.metadata.json +1 -1
  13. package/esm2015/lib/components/commands/popup-menu/popup-menu.component.js +7 -4
  14. package/esm2015/lib/components/commands/popup-menu/popup-menu.component.js.map +1 -1
  15. package/esm2015/lib/components/commands/popup-menu/popup-menu.component.metadata.json +1 -1
  16. package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.js +10 -3
  17. package/esm5/lib/components/commands/popup-menu/abstract-popup-menu.component.js.map +1 -1
  18. package/esm5/lib/components/commands/popup-menu/more-menu.component.js +10 -5
  19. package/esm5/lib/components/commands/popup-menu/more-menu.component.js.map +1 -1
  20. package/esm5/lib/components/commands/popup-menu/popup-menu.component.js +7 -4
  21. package/esm5/lib/components/commands/popup-menu/popup-menu.component.js.map +1 -1
  22. package/fesm2015/coolon-angular-ui-powerups.js +25 -10
  23. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  24. package/fesm5/coolon-angular-ui-powerups.js +25 -10
  25. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  26. package/lib/components/commands/popup-menu/abstract-popup-menu.component.d.ts +5 -2
  27. package/lib/components/commands/popup-menu/more-menu.component.d.ts +2 -1
  28. package/lib/components/commands/popup-menu/popup-menu.component.d.ts +2 -2
  29. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
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
+ ## [2.0.0-alpha.29](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.28...v2.0.0-alpha.29) (2020-08-25)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * aup-more-menu menu position and change detection fixes ([7cc4476](https://bitbucket.org/coolon/angular-ui-powerups/commit/7cc4476a661ba344600789f864dd49bb7d6d855a))
11
+
5
12
  ## [2.0.0-alpha.28](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.27...v2.0.0-alpha.28) (2020-08-25)
6
13
 
7
14
  ## [2.0.0-alpha.27](https://bitbucket.org/coolon/angular-ui-powerups/compare/v2.0.0-alpha.26...v2.0.0-alpha.27) (2020-08-25)
@@ -952,12 +952,16 @@
952
952
  */
953
953
  var AbstractPopupMenuComponent = /** @class */ (function (_super) {
954
954
  __extends(AbstractPopupMenuComponent, _super);
955
- function AbstractPopupMenuComponent() {
955
+ function AbstractPopupMenuComponent(cdr) {
956
956
  var _this = _super.call(this) || this;
957
+ _this.cdr = cdr;
957
958
  _this.xPosition = 'after';
958
959
  _this.yPosition = 'below';
959
960
  return _this;
960
961
  }
962
+ AbstractPopupMenuComponent.prototype.ngAfterViewInit = function () {
963
+ this.cdr.detectChanges();
964
+ };
961
965
  Object.defineProperty(AbstractPopupMenuComponent.prototype, "matMenuComponent", {
962
966
  get: function () {
963
967
  var _a;
@@ -972,6 +976,9 @@
972
976
  AbstractPopupMenuComponent.prototype.getButtonColor = function (registration) {
973
977
  return registration.faceAdapter.destructive ? 'warn' : undefined;
974
978
  };
979
+ AbstractPopupMenuComponent.ctorParameters = function () { return [
980
+ { type: core.ChangeDetectorRef }
981
+ ]; };
975
982
  __decorate([
976
983
  core.Input(),
977
984
  __metadata("design:type", String)
@@ -993,7 +1000,7 @@
993
1000
  selector: 'aup-abstract-popup-menu',
994
1001
  template: ''
995
1002
  }),
996
- __metadata("design:paramtypes", [])
1003
+ __metadata("design:paramtypes", [core.ChangeDetectorRef])
997
1004
  ], AbstractPopupMenuComponent);
998
1005
  return AbstractPopupMenuComponent;
999
1006
  }(CommandContainer));
@@ -1003,8 +1010,8 @@
1003
1010
  */
1004
1011
  var PopupMenuComponent = /** @class */ (function (_super) {
1005
1012
  __extends(PopupMenuComponent, _super);
1006
- function PopupMenuComponent() {
1007
- var _this = _super.call(this) || this;
1013
+ function PopupMenuComponent(cdr) {
1014
+ var _this = _super.call(this, cdr) || this;
1008
1015
  _this.faceModel = new pectin.MutableValueModel();
1009
1016
  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;
1010
1017
  var faceAdapterModel = chain(_this.faceModel).map(function (face) { return new exports.CommandFace.Adapter(face); });
@@ -1018,6 +1025,9 @@
1018
1025
  PopupMenuComponent.prototype.ngOnInit = function () {
1019
1026
  };
1020
1027
  var PopupMenuComponent_1;
1028
+ PopupMenuComponent.ctorParameters = function () { return [
1029
+ { type: core.ChangeDetectorRef }
1030
+ ]; };
1021
1031
  __decorate([
1022
1032
  core.Input(), pectin.StoreInValueModel('faceModel'),
1023
1033
  __metadata("design:type", Object)
@@ -1028,7 +1038,7 @@
1028
1038
  template: "\n <!-- we can only render the button after th popup menu has initialised and rendered it's menu component -->\n <button *ngIf=\"matMenuComponent\" mat-icon-button [matMenuTriggerFor]=\"matMenuComponent\" [matTooltip]=\"getTooltip()\">\n <aup-command-face [face]=\"face\"></aup-command-face>\n </button>\n <aup-popup-menu-renderer [commandRegistrations]=\"commandRegistrations\" [yPosition]=\"yPosition\"\n [xPosition]=\"xPosition\"\n (commandExecuted)=\"closeMenu()\"></aup-popup-menu-renderer>\n ",
1029
1039
  providers: [{ provide: CommandContainer, useExisting: core.forwardRef(function () { return PopupMenuComponent_1; }) }]
1030
1040
  }),
1031
- __metadata("design:paramtypes", [])
1041
+ __metadata("design:paramtypes", [core.ChangeDetectorRef])
1032
1042
  ], PopupMenuComponent);
1033
1043
  return PopupMenuComponent;
1034
1044
  }(AbstractPopupMenuComponent));
@@ -1038,11 +1048,16 @@
1038
1048
  */
1039
1049
  var MoreMenuComponent = /** @class */ (function (_super) {
1040
1050
  __extends(MoreMenuComponent, _super);
1041
- function MoreMenuComponent() {
1042
- return _super.call(this) || this;
1051
+ function MoreMenuComponent(cdr) {
1052
+ var _this = _super.call(this, cdr) || this;
1053
+ _this.xPosition = "before"; // this should be the default unless overriden by the user.
1054
+ return _this;
1043
1055
  }
1044
1056
  MoreMenuComponent_1 = MoreMenuComponent;
1045
1057
  var MoreMenuComponent_1;
1058
+ MoreMenuComponent.ctorParameters = function () { return [
1059
+ { type: core.ChangeDetectorRef }
1060
+ ]; };
1046
1061
  __decorate([
1047
1062
  core.Input(),
1048
1063
  __metadata("design:type", String)
@@ -1050,10 +1065,10 @@
1050
1065
  MoreMenuComponent = MoreMenuComponent_1 = __decorate([
1051
1066
  core.Component({
1052
1067
  selector: 'aup-more-menu',
1053
- template: "\n <!-- we can only render the button after th popup menu has initialised and rendered it's menu component -->\n <button *ngIf=\"matMenuComponent\" mat-icon-button [matMenuTriggerFor]=\"matMenuComponent\" [matTooltip]=\"tooltip\">\n <mat-icon>more_vert</mat-icon>\n </button>\n <aup-popup-menu-renderer [commandRegistrations]=\"commandRegistrations\"\n [yPosition]=\"yPosition\" [xPosition]=\"xPosition\"\n (commandExecuted)=\"closeMenu()\"></aup-popup-menu-renderer>\n ",
1068
+ template: "\n <!-- we can only render the button after th popup menu has initialised and rendered it's menu component -->\n <button *ngIf=\"matMenuComponent\" mat-icon-button [matMenuTriggerFor]=\"matMenuComponent\" [matTooltip]=\"tooltip\">\n <mat-icon>more_vert</mat-icon>\n </button>\n <aup-popup-menu-renderer [commandRegistrations]=\"commandRegistrations\"\n [xPosition]=\"xPosition\"\n [yPosition]=\"yPosition\"\n (commandExecuted)=\"closeMenu()\"></aup-popup-menu-renderer>\n ",
1054
1069
  providers: [{ provide: CommandContainer, useExisting: core.forwardRef(function () { return MoreMenuComponent_1; }) }]
1055
1070
  }),
1056
- __metadata("design:paramtypes", [])
1071
+ __metadata("design:paramtypes", [core.ChangeDetectorRef])
1057
1072
  ], MoreMenuComponent);
1058
1073
  return MoreMenuComponent;
1059
1074
  }(AbstractPopupMenuComponent));