@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
@@ -1,6 +1,6 @@
1
1
  import { __extends, __decorate, __metadata, __param, __assign, __awaiter, __generator, __spread } from 'tslib';
2
2
  import { DOCUMENT, CommonModule, Location } from '@angular/common';
3
- import { ElementRef, Inject, Input, HostListener, Directive, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule, ContentChild, TemplateRef, Component, forwardRef, Optional, HostBinding, ViewEncapsulation, EventEmitter, Output, ViewChild, Self, ChangeDetectorRef, ContentChildren, QueryList, ViewContainerRef, InjectionToken, Injector, ComponentFactoryResolver, ViewChildren, SkipSelf } from '@angular/core';
3
+ import { ElementRef, Inject, Input, HostListener, Directive, NgZone, ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule, ContentChild, TemplateRef, Component, forwardRef, Optional, HostBinding, ViewEncapsulation, EventEmitter, Output, ViewChild, ChangeDetectorRef, Self, ContentChildren, QueryList, ViewContainerRef, InjectionToken, Injector, ComponentFactoryResolver, ViewChildren, SkipSelf } from '@angular/core';
4
4
  import { FormsModule } from '@angular/forms';
5
5
  import { MatFormFieldModule } from '@angular/material/form-field';
6
6
  import { MatInputModule } from '@angular/material/input';
@@ -783,12 +783,16 @@ var PopupMenuRendererComponent = /** @class */ (function (_super) {
783
783
  */
784
784
  var AbstractPopupMenuComponent = /** @class */ (function (_super) {
785
785
  __extends(AbstractPopupMenuComponent, _super);
786
- function AbstractPopupMenuComponent() {
786
+ function AbstractPopupMenuComponent(cdr) {
787
787
  var _this = _super.call(this) || this;
788
+ _this.cdr = cdr;
788
789
  _this.xPosition = 'after';
789
790
  _this.yPosition = 'below';
790
791
  return _this;
791
792
  }
793
+ AbstractPopupMenuComponent.prototype.ngAfterViewInit = function () {
794
+ this.cdr.detectChanges();
795
+ };
792
796
  Object.defineProperty(AbstractPopupMenuComponent.prototype, "matMenuComponent", {
793
797
  get: function () {
794
798
  var _a;
@@ -803,6 +807,9 @@ var AbstractPopupMenuComponent = /** @class */ (function (_super) {
803
807
  AbstractPopupMenuComponent.prototype.getButtonColor = function (registration) {
804
808
  return registration.faceAdapter.destructive ? 'warn' : undefined;
805
809
  };
810
+ AbstractPopupMenuComponent.ctorParameters = function () { return [
811
+ { type: ChangeDetectorRef }
812
+ ]; };
806
813
  __decorate([
807
814
  Input(),
808
815
  __metadata("design:type", String)
@@ -824,7 +831,7 @@ var AbstractPopupMenuComponent = /** @class */ (function (_super) {
824
831
  selector: 'aup-abstract-popup-menu',
825
832
  template: ''
826
833
  }),
827
- __metadata("design:paramtypes", [])
834
+ __metadata("design:paramtypes", [ChangeDetectorRef])
828
835
  ], AbstractPopupMenuComponent);
829
836
  return AbstractPopupMenuComponent;
830
837
  }(CommandContainer));
@@ -834,8 +841,8 @@ var AbstractPopupMenuComponent = /** @class */ (function (_super) {
834
841
  */
835
842
  var PopupMenuComponent = /** @class */ (function (_super) {
836
843
  __extends(PopupMenuComponent, _super);
837
- function PopupMenuComponent() {
838
- var _this = _super.call(this) || this;
844
+ function PopupMenuComponent(cdr) {
845
+ var _this = _super.call(this, cdr) || this;
839
846
  _this.faceModel = new MutableValueModel();
840
847
  var _a = Dsl.disposeWith(_this), chain = _a.chain, valueOf = _a.valueOf, before = _a.before, when = _a.when, after = _a.after, observe = _a.observe, switchOn = _a.switchOn;
841
848
  var faceAdapterModel = chain(_this.faceModel).map(function (face) { return new CommandFace.Adapter(face); });
@@ -849,6 +856,9 @@ var PopupMenuComponent = /** @class */ (function (_super) {
849
856
  PopupMenuComponent.prototype.ngOnInit = function () {
850
857
  };
851
858
  var PopupMenuComponent_1;
859
+ PopupMenuComponent.ctorParameters = function () { return [
860
+ { type: ChangeDetectorRef }
861
+ ]; };
852
862
  __decorate([
853
863
  Input(), StoreInValueModel('faceModel'),
854
864
  __metadata("design:type", Object)
@@ -859,7 +869,7 @@ var PopupMenuComponent = /** @class */ (function (_super) {
859
869
  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 ",
860
870
  providers: [{ provide: CommandContainer, useExisting: forwardRef(function () { return PopupMenuComponent_1; }) }]
861
871
  }),
862
- __metadata("design:paramtypes", [])
872
+ __metadata("design:paramtypes", [ChangeDetectorRef])
863
873
  ], PopupMenuComponent);
864
874
  return PopupMenuComponent;
865
875
  }(AbstractPopupMenuComponent));
@@ -869,11 +879,16 @@ var PopupMenuComponent = /** @class */ (function (_super) {
869
879
  */
870
880
  var MoreMenuComponent = /** @class */ (function (_super) {
871
881
  __extends(MoreMenuComponent, _super);
872
- function MoreMenuComponent() {
873
- return _super.call(this) || this;
882
+ function MoreMenuComponent(cdr) {
883
+ var _this = _super.call(this, cdr) || this;
884
+ _this.xPosition = "before"; // this should be the default unless overriden by the user.
885
+ return _this;
874
886
  }
875
887
  MoreMenuComponent_1 = MoreMenuComponent;
876
888
  var MoreMenuComponent_1;
889
+ MoreMenuComponent.ctorParameters = function () { return [
890
+ { type: ChangeDetectorRef }
891
+ ]; };
877
892
  __decorate([
878
893
  Input(),
879
894
  __metadata("design:type", String)
@@ -881,10 +896,10 @@ var MoreMenuComponent = /** @class */ (function (_super) {
881
896
  MoreMenuComponent = MoreMenuComponent_1 = __decorate([
882
897
  Component({
883
898
  selector: 'aup-more-menu',
884
- 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 ",
899
+ 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 ",
885
900
  providers: [{ provide: CommandContainer, useExisting: forwardRef(function () { return MoreMenuComponent_1; }) }]
886
901
  }),
887
- __metadata("design:paramtypes", [])
902
+ __metadata("design:paramtypes", [ChangeDetectorRef])
888
903
  ], MoreMenuComponent);
889
904
  return MoreMenuComponent;
890
905
  }(AbstractPopupMenuComponent));