@praxisui/charts 9.0.50 → 9.0.52

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/README.md CHANGED
@@ -150,7 +150,8 @@ The public contract is `PraxisChartConfig` or the canonical `PraxisXUiChartContr
150
150
  - every ready chart offers a localized `Show chart data` / `Exibir dados do gráfico` control with a structured HTML table;
151
151
  - each table point is a native button, so Enter and Space follow browser keyboard conventions and activate the same renderer-neutral `pointClick` path as the visual point;
152
152
  - when single selection is configured, the point button publishes `aria-pressed` and preserves the existing select/deselect and cross-filter payloads;
153
- - loading, empty and error states remove the data controls, preventing stale chart values from remaining available to assistive technology.
153
+ - loading and empty are exposed as atomic status messages, error is exposed as an alert, and the chart shell reports `aria-busy` only while loading;
154
+ - all non-ready states remove the data controls, preventing stale chart values from remaining available to assistive technology.
154
155
 
155
156
  The structured alternative is automatic. It does not add an accessibility field to `PraxisChartConfig` or `x-ui.chart`, and custom engines remain responsible for an accessible visual rendering while the component-level data alternative remains renderer-neutral.
156
157
 
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "generatedAt": "2026-08-31T15:53:16.439Z",
3
+ "generatedAt": "2026-08-31T20:42:03.904Z",
4
4
  "packageName": "@praxisui/charts",
5
- "packageVersion": "9.0.50",
5
+ "packageVersion": "9.0.52",
6
6
  "sourceRegistry": "praxis-component-registry-ingestion",
7
7
  "sourceRegistryVersion": "1.0.0",
8
8
  "componentCount": 3,
@@ -2040,6 +2040,7 @@ class PraxisChartComponent {
2040
2040
  return config;
2041
2041
  }, ...(ngDevMode ? [{ debugName: "renderConfig" }] : /* istanbul ignore next */ []));
2042
2042
  loadingLabel = computed(() => this.i18n.resolve(this.renderConfig().state?.loadingLabel), ...(ngDevMode ? [{ debugName: "loadingLabel" }] : /* istanbul ignore next */ []));
2043
+ loadingDescription = computed(() => this.t('praxis.charts.runtime.loadingDescription', 'Publishing the analytics slice and preparing visual buckets.'), ...(ngDevMode ? [{ debugName: "loadingDescription" }] : /* istanbul ignore next */ []));
2043
2044
  transformedData = computed(() => this.transformer.transform(this.renderConfig(), this.resolvedData()), ...(ngDevMode ? [{ debugName: "transformedData" }] : /* istanbul ignore next */ []));
2044
2045
  accessiblePoints = computed(() => buildAccessibleChartPoints(this.renderConfig(), this.transformedData(), (value) => this.formatAccessibleValue(value), (index) => this.t('praxis.charts.runtime.accessibility.pointFallback', `Point ${index + 1}`, { index: index + 1 }), () => this.t('praxis.charts.runtime.accessibility.seriesFallback', 'Series')), ...(ngDevMode ? [{ debugName: "accessiblePoints" }] : /* istanbul ignore next */ []));
2045
2046
  dataDiagnostic = computed(() => {
@@ -2315,6 +2316,7 @@ class PraxisChartComponent {
2315
2316
  if (!document) {
2316
2317
  return;
2317
2318
  }
2319
+ const focusReturnTarget = this.captureFocusReturnTarget();
2318
2320
  this.configEditorContextPending.set(true);
2319
2321
  try {
2320
2322
  const resolvedContext = await this.resolveConfigEditorContext(document);
@@ -2354,7 +2356,14 @@ class PraxisChartComponent {
2354
2356
  this.runtimeChartDocument.set(clone);
2355
2357
  this.chartDocumentSaved.emit(clone);
2356
2358
  });
2357
- this.editorSessionSubscriptions = [appliedSubscription, savedSubscription];
2359
+ const closedSubscription = ref.closed$?.subscribe(() => {
2360
+ this.restoreFocus(focusReturnTarget);
2361
+ });
2362
+ this.editorSessionSubscriptions = [
2363
+ appliedSubscription,
2364
+ savedSubscription,
2365
+ ...(closedSubscription ? [closedSubscription] : []),
2366
+ ];
2358
2367
  }
2359
2368
  finally {
2360
2369
  this.configEditorContextPending.set(false);
@@ -2391,6 +2400,24 @@ class PraxisChartComponent {
2391
2400
  }
2392
2401
  return Array.isArray(resolvedOptions) ? resolvedOptions : [];
2393
2402
  }
2403
+ captureFocusReturnTarget() {
2404
+ if (typeof document === 'undefined') {
2405
+ return null;
2406
+ }
2407
+ const activeElement = document.activeElement;
2408
+ return activeElement instanceof HTMLElement && activeElement !== document.body
2409
+ ? activeElement
2410
+ : null;
2411
+ }
2412
+ restoreFocus(target) {
2413
+ queueMicrotask(() => {
2414
+ if (target?.isConnected
2415
+ && !target.hasAttribute('disabled')
2416
+ && target.getAttribute('aria-disabled') !== 'true') {
2417
+ target.focus();
2418
+ }
2419
+ });
2420
+ }
2394
2421
  isConfigEditorContextResult(value) {
2395
2422
  const record = this.asRecord(value);
2396
2423
  return !!record && ('context' in record || 'diagnostics' in record);
@@ -2839,6 +2866,7 @@ class PraxisChartComponent {
2839
2866
  [style.--praxis-chart-config-surface-border-width]="surfaceBorderWidth()"
2840
2867
  [style.--praxis-chart-config-surface-radius]="surfaceBorderRadius()"
2841
2868
  [style.--praxis-chart-config-text-color]="surfaceTextColor()"
2869
+ [attr.aria-busy]="loadState() === 'loading' ? 'true' : null"
2842
2870
  >
2843
2871
  @if (canOpenConfigEditor()) {
2844
2872
  <button
@@ -2872,7 +2900,11 @@ class PraxisChartComponent {
2872
2900
  }
2873
2901
 
2874
2902
  @if (loadState() === 'loading') {
2875
- <div class="praxis-chart-state praxis-chart-state-loading">
2903
+ <div
2904
+ class="praxis-chart-state praxis-chart-state-loading"
2905
+ role="status"
2906
+ aria-atomic="true"
2907
+ >
2876
2908
  <div class="praxis-chart-loading-hero" aria-hidden="true">
2877
2909
  <div class="praxis-chart-loading-summary">
2878
2910
  <span class="praxis-chart-loading-chip"></span>
@@ -2891,12 +2923,16 @@ class PraxisChartComponent {
2891
2923
  <div class="praxis-chart-state-title">{{ loadingLabel() }}</div>
2892
2924
  }
2893
2925
  <div class="praxis-chart-state-description">
2894
- Publicando o recorte analitico e preparando os buckets visuais.
2926
+ {{ loadingDescription() }}
2895
2927
  </div>
2896
2928
  </div>
2897
2929
  </div>
2898
2930
  } @else if (loadState() === 'error') {
2899
- <div class="praxis-chart-state praxis-chart-state-error">
2931
+ <div
2932
+ class="praxis-chart-state praxis-chart-state-error"
2933
+ role="alert"
2934
+ aria-atomic="true"
2935
+ >
2900
2936
  @if (errorTitle()) {
2901
2937
  <div class="praxis-chart-state-title">{{ errorTitle() }}</div>
2902
2938
  }
@@ -2905,7 +2941,11 @@ class PraxisChartComponent {
2905
2941
  }
2906
2942
  </div>
2907
2943
  } @else if (loadState() === 'empty') {
2908
- <div class="praxis-chart-state praxis-chart-state-empty">
2944
+ <div
2945
+ class="praxis-chart-state praxis-chart-state-empty"
2946
+ role="status"
2947
+ aria-atomic="true"
2948
+ >
2909
2949
  @if (emptyTitle()) {
2910
2950
  <div class="praxis-chart-state-title">{{ emptyTitle() }}</div>
2911
2951
  }
@@ -2981,6 +3021,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
2981
3021
  [style.--praxis-chart-config-surface-border-width]="surfaceBorderWidth()"
2982
3022
  [style.--praxis-chart-config-surface-radius]="surfaceBorderRadius()"
2983
3023
  [style.--praxis-chart-config-text-color]="surfaceTextColor()"
3024
+ [attr.aria-busy]="loadState() === 'loading' ? 'true' : null"
2984
3025
  >
2985
3026
  @if (canOpenConfigEditor()) {
2986
3027
  <button
@@ -3014,7 +3055,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
3014
3055
  }
3015
3056
 
3016
3057
  @if (loadState() === 'loading') {
3017
- <div class="praxis-chart-state praxis-chart-state-loading">
3058
+ <div
3059
+ class="praxis-chart-state praxis-chart-state-loading"
3060
+ role="status"
3061
+ aria-atomic="true"
3062
+ >
3018
3063
  <div class="praxis-chart-loading-hero" aria-hidden="true">
3019
3064
  <div class="praxis-chart-loading-summary">
3020
3065
  <span class="praxis-chart-loading-chip"></span>
@@ -3033,12 +3078,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
3033
3078
  <div class="praxis-chart-state-title">{{ loadingLabel() }}</div>
3034
3079
  }
3035
3080
  <div class="praxis-chart-state-description">
3036
- Publicando o recorte analitico e preparando os buckets visuais.
3081
+ {{ loadingDescription() }}
3037
3082
  </div>
3038
3083
  </div>
3039
3084
  </div>
3040
3085
  } @else if (loadState() === 'error') {
3041
- <div class="praxis-chart-state praxis-chart-state-error">
3086
+ <div
3087
+ class="praxis-chart-state praxis-chart-state-error"
3088
+ role="alert"
3089
+ aria-atomic="true"
3090
+ >
3042
3091
  @if (errorTitle()) {
3043
3092
  <div class="praxis-chart-state-title">{{ errorTitle() }}</div>
3044
3093
  }
@@ -3047,7 +3096,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
3047
3096
  }
3048
3097
  </div>
3049
3098
  } @else if (loadState() === 'empty') {
3050
- <div class="praxis-chart-state praxis-chart-state-empty">
3099
+ <div
3100
+ class="praxis-chart-state praxis-chart-state-empty"
3101
+ role="status"
3102
+ aria-atomic="true"
3103
+ >
3051
3104
  @if (emptyTitle()) {
3052
3105
  <div class="praxis-chart-state-title">{{ emptyTitle() }}</div>
3053
3106
  }
@@ -5860,6 +5913,7 @@ function pointData(category, value) {
5860
5913
 
5861
5914
  const PRAXIS_CHARTS_EN_US = {
5862
5915
  'praxis.charts.runtime.editChart': 'Edit chart settings',
5916
+ 'praxis.charts.runtime.loadingDescription': 'Publishing the analytics slice and preparing visual buckets.',
5863
5917
  'praxis.charts.runtime.invalidDocumentTitle': 'Invalid canonical configuration',
5864
5918
  'praxis.charts.runtime.invalidDocumentDescription': 'The canonical chart document could not be mapped by Praxis Charts. Review the chart contract before continuing.',
5865
5919
  'praxis.charts.runtime.remoteErrorTitle': 'Chart data could not be loaded',
@@ -6122,6 +6176,7 @@ const PRAXIS_CHARTS_EN_US = {
6122
6176
 
6123
6177
  const PRAXIS_CHARTS_PT_BR = {
6124
6178
  'praxis.charts.runtime.editChart': 'Editar configurações do gráfico',
6179
+ 'praxis.charts.runtime.loadingDescription': 'Publicando o recorte analítico e preparando os buckets visuais.',
6125
6180
  'praxis.charts.runtime.invalidDocumentTitle': 'Configuração canônica inválida',
6126
6181
  'praxis.charts.runtime.invalidDocumentDescription': 'O documento canônico do gráfico não pode ser mapeado pelo Praxis Charts. Revise o contrato do gráfico antes de continuar.',
6127
6182
  'praxis.charts.runtime.remoteErrorTitle': 'Não foi possível carregar os dados do gráfico',
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@praxisui/charts",
3
- "version": "9.0.50",
3
+ "version": "9.0.52",
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.52",
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.52",
12
12
  "rxjs": "~7.8.0"
13
13
  },
14
14
  "dependencies": {
@@ -630,6 +630,7 @@ declare class PraxisChartComponent {
630
630
  readonly surfaceTextColor: _angular_core.Signal<string | null>;
631
631
  readonly renderConfig: _angular_core.Signal<PraxisChartConfig>;
632
632
  readonly loadingLabel: _angular_core.Signal<string>;
633
+ readonly loadingDescription: _angular_core.Signal<string>;
633
634
  readonly transformedData: _angular_core.Signal<PraxisChartTransformedData>;
634
635
  readonly accessiblePoints: _angular_core.Signal<PraxisChartAccessiblePoint[]>;
635
636
  readonly dataDiagnostic: _angular_core.Signal<PraxisChartDataDiagnostic | null>;
@@ -653,6 +654,8 @@ declare class PraxisChartComponent {
653
654
  openConfigEditor(): Promise<void>;
654
655
  private resolveConfigEditorContext;
655
656
  private resolveEditorOptions;
657
+ private captureFocusReturnTarget;
658
+ private restoreFocus;
656
659
  private isConfigEditorContextResult;
657
660
  private asRecord;
658
661
  private handlePointClick;