@praxisui/charts 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-31T15:53:16.439Z",
3
+ "generatedAt": "2026-08-31T16:32:43.469Z",
4
4
  "packageName": "@praxisui/charts",
5
- "packageVersion": "9.0.50",
5
+ "packageVersion": "9.0.51",
6
6
  "sourceRegistry": "praxis-component-registry-ingestion",
7
7
  "sourceRegistryVersion": "1.0.0",
8
8
  "componentCount": 3,
@@ -2315,6 +2315,7 @@ class PraxisChartComponent {
2315
2315
  if (!document) {
2316
2316
  return;
2317
2317
  }
2318
+ const focusReturnTarget = this.captureFocusReturnTarget();
2318
2319
  this.configEditorContextPending.set(true);
2319
2320
  try {
2320
2321
  const resolvedContext = await this.resolveConfigEditorContext(document);
@@ -2354,7 +2355,14 @@ class PraxisChartComponent {
2354
2355
  this.runtimeChartDocument.set(clone);
2355
2356
  this.chartDocumentSaved.emit(clone);
2356
2357
  });
2357
- this.editorSessionSubscriptions = [appliedSubscription, savedSubscription];
2358
+ const closedSubscription = ref.closed$?.subscribe(() => {
2359
+ this.restoreFocus(focusReturnTarget);
2360
+ });
2361
+ this.editorSessionSubscriptions = [
2362
+ appliedSubscription,
2363
+ savedSubscription,
2364
+ ...(closedSubscription ? [closedSubscription] : []),
2365
+ ];
2358
2366
  }
2359
2367
  finally {
2360
2368
  this.configEditorContextPending.set(false);
@@ -2391,6 +2399,24 @@ class PraxisChartComponent {
2391
2399
  }
2392
2400
  return Array.isArray(resolvedOptions) ? resolvedOptions : [];
2393
2401
  }
2402
+ captureFocusReturnTarget() {
2403
+ if (typeof document === 'undefined') {
2404
+ return null;
2405
+ }
2406
+ const activeElement = document.activeElement;
2407
+ return activeElement instanceof HTMLElement && activeElement !== document.body
2408
+ ? activeElement
2409
+ : null;
2410
+ }
2411
+ restoreFocus(target) {
2412
+ queueMicrotask(() => {
2413
+ if (target?.isConnected
2414
+ && !target.hasAttribute('disabled')
2415
+ && target.getAttribute('aria-disabled') !== 'true') {
2416
+ target.focus();
2417
+ }
2418
+ });
2419
+ }
2394
2420
  isConfigEditorContextResult(value) {
2395
2421
  const record = this.asRecord(value);
2396
2422
  return !!record && ('context' in record || 'diagnostics' in record);
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@praxisui/charts",
3
- "version": "9.0.50",
3
+ "version": "9.0.51",
4
4
  "description": "Metadata-driven charts library for Praxis UI Angular with engine adapters and Apache ECharts as the initial renderer.",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^21.0.0",
7
7
  "@angular/core": "^21.0.0",
8
- "@praxisui/core": "^9.0.50",
8
+ "@praxisui/core": "^9.0.51",
9
9
  "@angular/forms": "^21.0.0",
10
10
  "@angular/material": "^21.0.0",
11
- "@praxisui/table": "^9.0.50",
11
+ "@praxisui/table": "^9.0.51",
12
12
  "rxjs": "~7.8.0"
13
13
  },
14
14
  "dependencies": {
@@ -653,6 +653,8 @@ declare class PraxisChartComponent {
653
653
  openConfigEditor(): Promise<void>;
654
654
  private resolveConfigEditorContext;
655
655
  private resolveEditorOptions;
656
+ private captureFocusReturnTarget;
657
+ private restoreFocus;
656
658
  private isConfigEditorContextResult;
657
659
  private asRecord;
658
660
  private handlePointClick;