@acorex/components 16.19.20 → 16.19.22
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.
@@ -613,11 +613,12 @@ class AXOverlayService {
|
|
613
613
|
this.overlayService2 = overlayService2;
|
614
614
|
this.appRef = appRef;
|
615
615
|
}
|
616
|
+
activeOverlays = [];
|
616
617
|
show(content, context, configs) {
|
617
618
|
configs = Object.assign({
|
618
619
|
hasBackdrop: true,
|
619
620
|
transparentBackdrop: true,
|
620
|
-
closeOnClickOutside: true
|
621
|
+
closeOnClickOutside: true,
|
621
622
|
}, configs || {});
|
622
623
|
// get root viewref
|
623
624
|
const viewRef = this.appRef.components[0].instance.viewRef;
|
@@ -638,11 +639,17 @@ class AXOverlayService {
|
|
638
639
|
positionStrategy = this.overlayService
|
639
640
|
.position()
|
640
641
|
.flexibleConnectedTo(configs.targetElement)
|
641
|
-
.withPositions(Array.isArray(configs.position)
|
642
|
+
.withPositions(Array.isArray(configs.position)
|
643
|
+
? configs.position
|
644
|
+
: [configs.position])
|
642
645
|
.withPush(true);
|
643
646
|
}
|
644
647
|
else {
|
645
|
-
positionStrategy = this.overlayService
|
648
|
+
positionStrategy = this.overlayService
|
649
|
+
.position()
|
650
|
+
.global()
|
651
|
+
.centerHorizontally()
|
652
|
+
.centerVertically();
|
646
653
|
}
|
647
654
|
let scrollStrategy = this.overlayService.scrollStrategies.reposition({ autoClose: true });
|
648
655
|
if (configs.scroll === 'block') {
|
@@ -653,11 +660,20 @@ class AXOverlayService {
|
|
653
660
|
scrollStrategy,
|
654
661
|
hasBackdrop: configs.hasBackdrop,
|
655
662
|
disposeOnNavigation: true,
|
656
|
-
backdropClass: configs.backdropClass
|
657
|
-
|
663
|
+
backdropClass: configs.backdropClass
|
664
|
+
? configs.backdropClass
|
665
|
+
: configs.transparentBackdrop
|
666
|
+
? 'cdk-overlay-transparent-backdrop'
|
667
|
+
: undefined,
|
668
|
+
panelClass: configs.panelClass
|
669
|
+
? configs.panelClass
|
670
|
+
: ['animate__animated', 'animate__fadeIn'],
|
658
671
|
};
|
659
672
|
// joon nanat dorost sho
|
660
|
-
let overlayRef = configs.containerElement
|
673
|
+
let overlayRef = configs.containerElement
|
674
|
+
? this.overlayService.createOn(configs.containerElement, config)
|
675
|
+
: this.overlayService2.create(config);
|
676
|
+
this.activeOverlays.push(overlayRef);
|
661
677
|
const host = overlayRef.attach(portal);
|
662
678
|
if (host.instance) {
|
663
679
|
Object.assign(host.instance, context);
|
@@ -679,9 +695,17 @@ class AXOverlayService {
|
|
679
695
|
return {
|
680
696
|
instance: host.instance,
|
681
697
|
dispose: overlayRef.dispose.bind(overlayRef),
|
682
|
-
overlayRef: overlayRef
|
698
|
+
overlayRef: overlayRef,
|
683
699
|
};
|
684
700
|
}
|
701
|
+
closeOverlay(overlayRef) {
|
702
|
+
overlayRef.dispose();
|
703
|
+
this.activeOverlays = this.activeOverlays.filter((ref) => ref !== overlayRef);
|
704
|
+
}
|
705
|
+
closeAllOverlays() {
|
706
|
+
this.activeOverlays.forEach((ref) => ref.dispose());
|
707
|
+
this.activeOverlays = [];
|
708
|
+
}
|
685
709
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: AXOverlayService, deps: [{ token: DynamicOverlay }, { token: i1.Overlay }, { token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Injectable });
|
686
710
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: AXOverlayService, providedIn: 'root' });
|
687
711
|
}
|
@@ -8565,19 +8589,19 @@ class AXPasswordBoxComponent extends AXBaseTextComponent {
|
|
8565
8589
|
constructor(cdr, ref) {
|
8566
8590
|
super(cdr, ref);
|
8567
8591
|
this.cdr = cdr;
|
8592
|
+
afterNextRender(() => {
|
8593
|
+
if (this.allowAutocomplete()) {
|
8594
|
+
this.type = 'password';
|
8595
|
+
}
|
8596
|
+
else {
|
8597
|
+
this.type = 'text';
|
8598
|
+
this.getInputElement()?.classList.add('ax-password-mask');
|
8599
|
+
}
|
8600
|
+
});
|
8568
8601
|
}
|
8569
8602
|
allowAutocomplete = input(false);
|
8570
8603
|
type = 'text';
|
8571
8604
|
eyeIcon = 'far fa-eye';
|
8572
|
-
ngAfterViewInit() {
|
8573
|
-
if (this.allowAutocomplete()) {
|
8574
|
-
this.type = 'password';
|
8575
|
-
}
|
8576
|
-
else {
|
8577
|
-
this.type = 'text';
|
8578
|
-
this.getInputElement()?.classList.add('ax-password-mask');
|
8579
|
-
}
|
8580
|
-
}
|
8581
8605
|
handleShowPassword() {
|
8582
8606
|
if (this.allowAutocomplete()) {
|
8583
8607
|
if (this.type === 'password') {
|