@praxisui/dialog 8.0.0-beta.3 → 8.0.0-beta.5
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/praxisui-dialog.mjs +21 -7
- package/package.json +2 -2
|
@@ -731,6 +731,9 @@ class PraxisDialog {
|
|
|
731
731
|
});
|
|
732
732
|
const keydownSub = overlayRef.keydownEvents().subscribe((ev) => {
|
|
733
733
|
ref.notifyKeydown(ev);
|
|
734
|
+
if (ev.key === 'Escape' && !config?.disableClose) {
|
|
735
|
+
ref.close();
|
|
736
|
+
}
|
|
734
737
|
});
|
|
735
738
|
// Attach portal content now that the outlet exists
|
|
736
739
|
const doAttach = () => {
|
|
@@ -1093,6 +1096,21 @@ function buildHostInputs(payload, context, options) {
|
|
|
1093
1096
|
},
|
|
1094
1097
|
};
|
|
1095
1098
|
}
|
|
1099
|
+
function applySurfaceHostInputs(ref, hostInputs) {
|
|
1100
|
+
const apply = () => {
|
|
1101
|
+
if (!ref.componentInstance)
|
|
1102
|
+
return false;
|
|
1103
|
+
Object.assign(ref.componentInstance, hostInputs);
|
|
1104
|
+
try {
|
|
1105
|
+
ref.componentRef?.changeDetectorRef?.detectChanges();
|
|
1106
|
+
}
|
|
1107
|
+
catch { }
|
|
1108
|
+
return true;
|
|
1109
|
+
};
|
|
1110
|
+
if (apply())
|
|
1111
|
+
return;
|
|
1112
|
+
queueMicrotask(apply);
|
|
1113
|
+
}
|
|
1096
1114
|
function providePraxisSurfaceGlobalActions() {
|
|
1097
1115
|
return {
|
|
1098
1116
|
provide: GLOBAL_SURFACE_SERVICE,
|
|
@@ -1126,15 +1144,11 @@ function providePraxisSurfaceGlobalActions() {
|
|
|
1126
1144
|
}),
|
|
1127
1145
|
},
|
|
1128
1146
|
});
|
|
1129
|
-
return
|
|
1147
|
+
return ref;
|
|
1130
1148
|
}
|
|
1131
1149
|
const ref = dialog.open(PraxisSurfaceHostComponent, buildDialogConfig(payload));
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
ref.componentRef?.changeDetectorRef?.detectChanges();
|
|
1135
|
-
}
|
|
1136
|
-
catch { }
|
|
1137
|
-
return firstValueFrom(ref.afterClosed());
|
|
1150
|
+
applySurfaceHostInputs(ref, hostInputs);
|
|
1151
|
+
return ref;
|
|
1138
1152
|
},
|
|
1139
1153
|
};
|
|
1140
1154
|
},
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/dialog",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.5",
|
|
4
4
|
"description": "Dialog helpers and components for Praxis UI with Angular Material integration.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^20.0.0",
|
|
7
7
|
"@angular/core": "^20.0.0",
|
|
8
8
|
"@angular/cdk": "^20.0.0",
|
|
9
9
|
"@angular/forms": "^20.0.0",
|
|
10
|
-
"@praxisui/core": "^8.0.0-beta.
|
|
10
|
+
"@praxisui/core": "^8.0.0-beta.5"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"tslib": "^2.3.0"
|