@praxisui/core 9.0.50 → 9.0.51
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.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-08-
|
|
3
|
+
"generatedAt": "2026-08-31T16:32:43.469Z",
|
|
4
4
|
"packageName": "@praxisui/core",
|
|
5
|
-
"packageVersion": "9.0.
|
|
5
|
+
"packageVersion": "9.0.51",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 4,
|
|
@@ -40362,6 +40362,7 @@ class DynamicWidgetPageComponent {
|
|
|
40362
40362
|
const materializedInputs = metadata.configEditor?.contextResolver
|
|
40363
40363
|
? this.readMaterializedInputsForWidget(metadata, key)
|
|
40364
40364
|
: undefined;
|
|
40365
|
+
const focusReturnTarget = this.captureFocusReturnTarget();
|
|
40365
40366
|
const requestId = ++this.nextConfigEditorContextRequestId;
|
|
40366
40367
|
this.configEditorContextRequests.set(key, requestId);
|
|
40367
40368
|
this.setWidgetComponentSettingsPending(key, true);
|
|
@@ -40388,6 +40389,9 @@ class DynamicWidgetPageComponent {
|
|
|
40388
40389
|
});
|
|
40389
40390
|
ref.applied$.subscribe((result) => this.applyWidgetComponentInputs(key, result, false));
|
|
40390
40391
|
ref.saved$.subscribe((result) => this.applyWidgetComponentInputs(key, result, true));
|
|
40392
|
+
ref.closed$?.pipe(take(1)).subscribe(() => {
|
|
40393
|
+
this.restoreFocus(focusReturnTarget);
|
|
40394
|
+
});
|
|
40391
40395
|
}
|
|
40392
40396
|
finally {
|
|
40393
40397
|
if (this.configEditorContextRequests.get(key) === requestId) {
|
|
@@ -40408,6 +40412,25 @@ class DynamicWidgetPageComponent {
|
|
|
40408
40412
|
return next;
|
|
40409
40413
|
});
|
|
40410
40414
|
}
|
|
40415
|
+
captureFocusReturnTarget() {
|
|
40416
|
+
if (typeof document === 'undefined') {
|
|
40417
|
+
return null;
|
|
40418
|
+
}
|
|
40419
|
+
const activeElement = document.activeElement;
|
|
40420
|
+
return activeElement instanceof HTMLElement && activeElement !== document.body
|
|
40421
|
+
? activeElement
|
|
40422
|
+
: null;
|
|
40423
|
+
}
|
|
40424
|
+
restoreFocus(target) {
|
|
40425
|
+
queueMicrotask(() => {
|
|
40426
|
+
if (!this.destroyed
|
|
40427
|
+
&& target?.isConnected
|
|
40428
|
+
&& !target.hasAttribute('disabled')
|
|
40429
|
+
&& target.getAttribute('aria-disabled') !== 'true') {
|
|
40430
|
+
target.focus();
|
|
40431
|
+
}
|
|
40432
|
+
});
|
|
40433
|
+
}
|
|
40411
40434
|
async resolveWidgetConfigEditorContext(metadata, page, widget, key, persistedInputs, materializedInputs) {
|
|
40412
40435
|
const resolver = metadata.configEditor?.contextResolver;
|
|
40413
40436
|
if (!resolver) {
|
package/package.json
CHANGED
package/types/praxisui-core.d.ts
CHANGED
|
@@ -16729,6 +16729,8 @@ declare class DynamicWidgetPageComponent implements OnChanges, OnDestroy {
|
|
|
16729
16729
|
openWidgetShellSettings(key: string): void;
|
|
16730
16730
|
openWidgetComponentSettings(key: string): Promise<void>;
|
|
16731
16731
|
private setWidgetComponentSettingsPending;
|
|
16732
|
+
private captureFocusReturnTarget;
|
|
16733
|
+
private restoreFocus;
|
|
16732
16734
|
private resolveWidgetConfigEditorContext;
|
|
16733
16735
|
private isConfigEditorContextResult;
|
|
16734
16736
|
private readMaterializedInputsForWidget;
|