@abp/ng.theme.shared 7.0.0 → 7.1.0-rc.1

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.
@@ -869,9 +869,12 @@ class ToastContainerComponent {
869
869
  constructor() {
870
870
  this.toasts = [];
871
871
  this.right = '30px';
872
+ this.defaultRight = '30px';
873
+ this.defaultMobileRight = '0';
872
874
  this.bottom = '30px';
873
875
  }
874
876
  ngOnInit() {
877
+ this.setDefaultRight();
875
878
  this.toasts$.subscribe(toasts => {
876
879
  this.toasts = this.toastKey
877
880
  ? toasts.filter(t => {
@@ -880,6 +883,15 @@ class ToastContainerComponent {
880
883
  : toasts;
881
884
  });
882
885
  }
886
+ onWindowResize() {
887
+ this.setDefaultRight();
888
+ }
889
+ setDefaultRight() {
890
+ const screenWidth = window.innerWidth;
891
+ if (screenWidth < 768 && this.right == this.defaultRight) {
892
+ this.right = this.defaultMobileRight;
893
+ }
894
+ }
883
895
  trackByFunc(index, toast) {
884
896
  if (!toast)
885
897
  return null;
@@ -887,10 +899,10 @@ class ToastContainerComponent {
887
899
  }
888
900
  }
889
901
  ToastContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ToastContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
890
- ToastContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ToastContainerComponent, selector: "abp-toast-container", inputs: { top: "top", right: "right", bottom: "bottom", left: "left", toastKey: "toastKey" }, ngImport: i0, template: "<div\r\n class=\"abp-toast-container\"\r\n [style.top]=\"top || 'auto'\"\r\n [style.right]=\"right || 'auto'\"\r\n [style.bottom]=\"bottom || 'auto'\"\r\n [style.left]=\"left || 'auto'\"\r\n [style.display]=\"toasts.length ? 'flex' : 'none'\"\r\n [@toastInOut]=\"toasts.length\"\r\n>\r\n <abp-toast\r\n [toast]=\"toast\"\r\n *ngFor=\"let toast of toasts; trackBy: trackByFunc\"\r\n (remove)=\"remove($event)\"\r\n ></abp-toast>\r\n</div>\r\n", styles: [".abp-toast-container{position:fixed;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-width:350px;min-height:80px;z-index:1900}.abp-toast-container.new-on-top{flex-direction:column-reverse}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: ToastComponent, selector: "abp-toast", inputs: ["toast"], outputs: ["remove"] }], animations: [toastInOut] });
902
+ ToastContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: ToastContainerComponent, selector: "abp-toast-container", inputs: { top: "top", right: "right", bottom: "bottom", left: "left", toastKey: "toastKey" }, host: { listeners: { "window:resize": "onWindowResize($event)" } }, ngImport: i0, template: "<div\r\n class=\"abp-toast-container\"\r\n [style.top]=\"top || 'auto'\"\r\n [style.right]=\"right || 'auto'\"\r\n [style.bottom]=\"bottom || 'auto'\"\r\n [style.left]=\"left || 'auto'\"\r\n [style.display]=\"toasts.length ? 'flex' : 'none'\"\r\n [@toastInOut]=\"toasts.length\"\r\n>\r\n <abp-toast\r\n [toast]=\"toast\"\r\n *ngFor=\"let toast of toasts; trackBy: trackByFunc\"\r\n (remove)=\"remove($event)\"\r\n ></abp-toast>\r\n</div>\r\n", styles: [".abp-toast-container{position:fixed;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-width:350px;min-height:80px;z-index:1900}.abp-toast-container.new-on-top{flex-direction:column-reverse}@media only screen and (max-width: 768px){.abp-toast-container{min-width:100%}}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: ToastComponent, selector: "abp-toast", inputs: ["toast"], outputs: ["remove"] }], animations: [toastInOut] });
891
903
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ToastContainerComponent, decorators: [{
892
904
  type: Component,
893
- args: [{ selector: 'abp-toast-container', animations: [toastInOut], template: "<div\r\n class=\"abp-toast-container\"\r\n [style.top]=\"top || 'auto'\"\r\n [style.right]=\"right || 'auto'\"\r\n [style.bottom]=\"bottom || 'auto'\"\r\n [style.left]=\"left || 'auto'\"\r\n [style.display]=\"toasts.length ? 'flex' : 'none'\"\r\n [@toastInOut]=\"toasts.length\"\r\n>\r\n <abp-toast\r\n [toast]=\"toast\"\r\n *ngFor=\"let toast of toasts; trackBy: trackByFunc\"\r\n (remove)=\"remove($event)\"\r\n ></abp-toast>\r\n</div>\r\n", styles: [".abp-toast-container{position:fixed;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-width:350px;min-height:80px;z-index:1900}.abp-toast-container.new-on-top{flex-direction:column-reverse}\n"] }]
905
+ args: [{ selector: 'abp-toast-container', animations: [toastInOut], template: "<div\r\n class=\"abp-toast-container\"\r\n [style.top]=\"top || 'auto'\"\r\n [style.right]=\"right || 'auto'\"\r\n [style.bottom]=\"bottom || 'auto'\"\r\n [style.left]=\"left || 'auto'\"\r\n [style.display]=\"toasts.length ? 'flex' : 'none'\"\r\n [@toastInOut]=\"toasts.length\"\r\n>\r\n <abp-toast\r\n [toast]=\"toast\"\r\n *ngFor=\"let toast of toasts; trackBy: trackByFunc\"\r\n (remove)=\"remove($event)\"\r\n ></abp-toast>\r\n</div>\r\n", styles: [".abp-toast-container{position:fixed;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-width:350px;min-height:80px;z-index:1900}.abp-toast-container.new-on-top{flex-direction:column-reverse}@media only screen and (max-width: 768px){.abp-toast-container{min-width:100%}}\n"] }]
894
906
  }], propDecorators: { top: [{
895
907
  type: Input
896
908
  }], right: [{
@@ -901,6 +913,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
901
913
  type: Input
902
914
  }], toastKey: [{
903
915
  type: Input
916
+ }], onWindowResize: [{
917
+ type: HostListener,
918
+ args: ['window:resize', ['$event']]
904
919
  }] } });
905
920
 
906
921
  class PasswordComponent extends AbstractNgModelComponent {