@xiriframework/xiri-ng 0.2.30 → 0.2.31
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.
|
@@ -2661,19 +2661,12 @@ class XiriDialogComponent {
|
|
|
2661
2661
|
this.to = null;
|
|
2662
2662
|
this.refreshTime = 2000;
|
|
2663
2663
|
this.dialogRef.addPanelClass('xiri-dialog-sized');
|
|
2664
|
+
this.effectiveSize = this.initData.size;
|
|
2664
2665
|
this.breakpointObserver
|
|
2665
2666
|
.observe([Breakpoints.XSmall, Breakpoints.Small])
|
|
2666
2667
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
2667
2668
|
.subscribe((state) => {
|
|
2668
|
-
|
|
2669
|
-
this.dialogRef.updateSize('90vw');
|
|
2670
|
-
return;
|
|
2671
|
-
}
|
|
2672
|
-
const raw = this.initData.size;
|
|
2673
|
-
const width = DIALOG_SIZE_MAP[raw] ?? raw ?? '600px';
|
|
2674
|
-
this.dialogRef.updateSize(width);
|
|
2675
|
-
if (raw === 'full')
|
|
2676
|
-
this.dialogRef.addPanelClass('xiri-dialog-full');
|
|
2669
|
+
this.applyDialogSize(state.matches);
|
|
2677
2670
|
});
|
|
2678
2671
|
if (this.initData.url)
|
|
2679
2672
|
this.url = this.initData.url;
|
|
@@ -2717,8 +2710,23 @@ class XiriDialogComponent {
|
|
|
2717
2710
|
}]);
|
|
2718
2711
|
}
|
|
2719
2712
|
}
|
|
2713
|
+
applyDialogSize(isMobile) {
|
|
2714
|
+
if (isMobile) {
|
|
2715
|
+
this.dialogRef.updateSize('90vw');
|
|
2716
|
+
return;
|
|
2717
|
+
}
|
|
2718
|
+
const raw = this.effectiveSize;
|
|
2719
|
+
const width = DIALOG_SIZE_MAP[raw] ?? raw ?? '600px';
|
|
2720
|
+
this.dialogRef.updateSize(width);
|
|
2721
|
+
if (raw === 'full')
|
|
2722
|
+
this.dialogRef.addPanelClass('xiri-dialog-full');
|
|
2723
|
+
}
|
|
2720
2724
|
loadData(res) {
|
|
2721
2725
|
if (res.buttons) {
|
|
2726
|
+
if (res.size && res.size !== this.effectiveSize) {
|
|
2727
|
+
this.effectiveSize = res.size;
|
|
2728
|
+
this.applyDialogSize(this.breakpointObserver.isMatched([Breakpoints.XSmall, Breakpoints.Small]));
|
|
2729
|
+
}
|
|
2722
2730
|
if (res.url)
|
|
2723
2731
|
this.url = res.url;
|
|
2724
2732
|
let formData = [];
|