@xiriframework/xiri-ng 0.2.28 → 0.2.30
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.
- package/fesm2022/xiriframework-xiri-ng.mjs +16 -3
- package/fesm2022/xiriframework-xiri-ng.mjs.map +1 -1
- package/package.json +1 -1
- package/skills/xiri-ng-expert/references/components.md +5 -1
- package/styles/material-components.scss +16 -0
- package/types/xiriframework-xiri-ng.d.ts +3 -2
- package/types/xiriframework-xiri-ng.d.ts.map +1 -1
|
@@ -2629,6 +2629,13 @@ function parseHttpError(err) {
|
|
|
2629
2629
|
return 'Unknown error';
|
|
2630
2630
|
}
|
|
2631
2631
|
|
|
2632
|
+
const DIALOG_SIZE_MAP = {
|
|
2633
|
+
sm: '400px',
|
|
2634
|
+
md: '600px',
|
|
2635
|
+
lg: '900px',
|
|
2636
|
+
xl: '1200px',
|
|
2637
|
+
full: '95vw',
|
|
2638
|
+
};
|
|
2632
2639
|
class XiriDialogComponent {
|
|
2633
2640
|
constructor() {
|
|
2634
2641
|
this.dialogRef = inject(MatDialogRef);
|
|
@@ -2653,14 +2660,20 @@ class XiriDialogComponent {
|
|
|
2653
2660
|
this.checkSubject = new Subject();
|
|
2654
2661
|
this.to = null;
|
|
2655
2662
|
this.refreshTime = 2000;
|
|
2663
|
+
this.dialogRef.addPanelClass('xiri-dialog-sized');
|
|
2656
2664
|
this.breakpointObserver
|
|
2657
2665
|
.observe([Breakpoints.XSmall, Breakpoints.Small])
|
|
2658
2666
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
2659
2667
|
.subscribe((state) => {
|
|
2660
|
-
if (state.matches)
|
|
2668
|
+
if (state.matches) {
|
|
2661
2669
|
this.dialogRef.updateSize('90vw');
|
|
2662
|
-
|
|
2663
|
-
|
|
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');
|
|
2664
2677
|
});
|
|
2665
2678
|
if (this.initData.url)
|
|
2666
2679
|
this.url = this.initData.url;
|