@praxisui/charts 9.0.67 → 9.0.68-rc.1

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
@@ -1,5 +1,7 @@
1
1
  # @praxisui/charts
2
2
 
3
+ Horizontal-bar plots reserve category-label space once in the engine adapter. Narrow widgets retain comparison space instead of adding a second label-sized margin; the renderer-neutral chart document remains unchanged.
4
+
3
5
  Metadata-driven charting for Praxis UI Angular applications. Install `@praxisui/charts` when a host needs declarative analytics widgets aligned with the Praxis runtime instead of passing raw chart-engine options through the public API.
4
6
 
5
7
  The package renders `PraxisChartConfig` and canonical `x-ui.chart` documents through a Praxis engine boundary. Apache ECharts is the current adapter implementation, but host integrations should depend on Praxis contracts.
@@ -248,6 +250,13 @@ The mapper emits one `POST /stats/comparison` request with canonical `metrics[]`
248
250
 
249
251
  Supported sizing modes are `fixed`, `fill-container` and `auto`. Prefer `fill-container` inside dashboard widget shells. Supported surface modes are `auto`, `embedded` and `contained`; prefer `embedded` when another shell owns the card, header or border.
250
252
 
253
+ An explicitly embedded chart does not inherit a contained background from the page's
254
+ chart preset. Both the engine canvas and the HTML surface remain transparent unless
255
+ the chart explicitly authors their backgrounds, while its unspecified foreground
256
+ follows the host. Palette inheritance is preserved. Explicit chart surface/background
257
+ and text colors remain authoritative; choosing them requires a coherent contrast pair.
258
+ Changing the host theme updates inherited colors without modifying the chart document.
259
+
251
260
  ## Micro Visualizations
252
261
 
253
262
  `PraxisMicroVisualizationComponent` renders the first renderer-neutral presentation visualizations from `@praxisui/core`.
@@ -276,7 +285,7 @@ Rich charts still use the canonical `x-ui.chart` document flow above; micro visu
276
285
 
277
286
  `PraxisChartConfigEditor` is the initial editor shell for canonical `x-ui.chart` documents. It consumes governed resources, fields and targets and emits structured apply/save/reset events. The authoring manifest is exported as `PRAXIS_CHARTS_AUTHORING_MANIFEST` for backend/tooling workflows that need executable chart-edit operations.
278
287
 
279
- For the direct runtime editor, Apply updates only the chart preview and emits `chartDocumentApplied`. Save emits `chartDocumentSaved` for direct hosts and `chartDocumentPatchChange` with `inputPatch.chartDocument` for dynamic widget hosts. That explicit patch lets Dynamic Page/Page Builder materialize the saved canonical document without inferring persistence from an event name; unrelated widget inputs remain owned by the host.
288
+ For the direct runtime editor, Apply updates the chart and emits `chartDocumentApplied`; Save emits `chartDocumentSaved`. Both also emit `chartDocumentPatchChange` with an independent `inputPatch.chartDocument` snapshot for dynamic widget hosts. Dynamic Page/Page Builder updates its authored page, so Apply followed by Save Page preserves the canonical document. Apply alone does not persist the page remotely. Unrelated widget inputs and transient catalogs remain owned by their existing host/context boundaries.
280
289
 
281
290
  `ChartResourceCapabilityCatalogAdapter` derives resource operations and eligible dimension, time and metric options directly from `ResourceCapabilitySnapshot`, including fail-closed comparison eligibility.
282
291
 
@@ -299,3 +308,66 @@ Main exports include `PraxisChartComponent`, `PraxisChartDocumentPatchChangeEven
299
308
  - Documentation: https://praxisui.dev/components/charts
300
309
  - Live demo: https://praxis-ui-4e602.web.app
301
310
  - Quickstart app: https://github.com/codexrodrigues/praxis-ui-quickstart
311
+
312
+ ### Remote chart documents in Page Builder
313
+
314
+ Author editable remote widgets with `inputs.chartDocument` (`PraxisXUiChartContract`),
315
+ not a persisted runtime `config` or hand-built stats request. The canonical mapper
316
+ materializes the runtime configuration and request. The `public-chart-document-praxis-stats-timeseries`
317
+ and `public-chart-document-praxis-stats-group-by` profiles attest resource reads from
318
+ `chartDocument.source.resource` and validate the `queryContext` filter against the
319
+ published operation schema. They reject custom resolvers, local data, competing
320
+ runtime config and document events with undeclared effects.
321
+
322
+ These public read profiles keep child `enableCustomization` disabled. A trusted
323
+ Page Builder host exposes the component metadata editor through **Configurar conteúdo**
324
+ and the card editor through **Configurar widget**, controlled by its existing authoring
325
+ capabilities. Host customization mode is not persisted into the chart document.
326
+ The Dynamic Page Lab demonstrates both remote operations using canonical documents.
327
+
328
+
329
+ ### Commands authored on a widget shell
330
+
331
+ The published `open-chart-editor` action executes `command: "openConfigEditor"` through
332
+ `PraxisChartComponent.handleShellAction`. Its authored ID/label may change without changing
333
+ the operation. It takes no example payload: the current canonical `chartDocument` and the
334
+ owner's context resolver provide editor inputs. Opening requires `enableCustomization`,
335
+ a Settings Panel bridge and a canonical chart document. The method checks these conditions
336
+ at entry and rechecks availability after asynchronous context resolution, preventing a
337
+ late open after customization is disabled. This is a UI authoring guard, not backend
338
+ permission enforcement. Existing hosts calling `openConfigEditor()` directly must enable
339
+ customization explicitly.
340
+
341
+ `praxis-chart:toggle-data-view` is a separate runtime-contributed accessibility control;
342
+ it does not require customization. No CRUD or export semantics are inferred from button IDs.
343
+
344
+
345
+ Charts assesses the existing `openConfigEditor` command through the optional live shell
346
+ availability query. It explains disabled customization, a missing Settings Panel bridge,
347
+ a missing canonical document, or pending context resolution using localized copy. The
348
+ owner's execution guard remains authoritative; the catalog's availability message is
349
+ presentation state. Unrecognized commands return undefined. No automatic editor button is
350
+ contributed by this query and no availability data enters `chartDocument`.
351
+
352
+
353
+ The positive shell-command E2E inserts a chart from the official palette, adds the available
354
+ editor action, renames the button, applies a title, resets the draft, saves another title,
355
+ and reopens it. It checks both the rendered chart and the Lab's authored chartDocument.
356
+ This proves the in-page round-trip, not backend persistence after reloading the page.
357
+ Apply keeps the Charts draft unsaved; Reset returns it to the opening snapshot, and Save
358
+ advances that snapshot. The test does not assume Apply clears dirty state for this editor.
359
+
360
+
361
+ Chart editor availability also requires a live component owner. If context resolution
362
+ finishes after the chart is destroyed, `openConfigEditor` must not open a panel. Queries
363
+ against a destroyed owner's action availability return undefined. Destruction releases
364
+ existing Apply/Save subscriptions, so late panel emissions cannot materialize another
365
+ chartDocument patch. Charts passes its `DestroyRef` as the transient Settings Panel
366
+ `owner`. The official bridge cancels that panel when the chart is destroyed, including
367
+ a dirty draft, without emitting Save or asking to save a target that no longer exists.
368
+ A pending opening is cancelled as well. This applies to the chart-owned editor; other
369
+ consumers must explicitly supply their own owner to adopt the same lifecycle.
370
+
371
+ ### Cor dos nomes dos eixos
372
+
373
+ O adaptador ECharts aplica a cor efetiva de texto (`theme.textColor`) tanto aos valores quanto aos nomes dos eixos cartesianos, incluindo eixo secundário, orientação horizontal e dispersão. Essa projeção não cria opções de engine no contrato público nem altera dados ou formatação. A legibilidade final ainda depende da coerência entre a cor de texto e o fundo configurado.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "generatedAt": "2026-09-07T00:54:55.301Z",
3
+ "generatedAt": "2026-09-09T11:40:45.048Z",
4
4
  "packageName": "@praxisui/charts",
5
- "packageVersion": "9.0.67",
5
+ "packageVersion": "9.0.68-rc.1",
6
6
  "sourceRegistry": "praxis-component-registry-ingestion",
7
7
  "sourceRegistryVersion": "1.0.0",
8
8
  "componentCount": 3,
@@ -592,7 +592,7 @@
592
592
  "name": "chartDocumentPatchChange",
593
593
  "type": "PraxisChartDocumentPatchChangeEvent",
594
594
  "required": false,
595
- "description": "Emitted on Save with inputPatch.chartDocument so dynamic widget hosts can materialize the canonical document without inferring persistence from event names."
595
+ "description": "Emitted on Apply and Save with inputPatch.chartDocument so dynamic widget hosts can materialize the canonical document without inferring persistence from event names."
596
596
  }
597
597
  ],
598
598
  "configSchemaId": null,
@@ -808,6 +808,202 @@
808
808
  }
809
809
  ],
810
810
  "runtimeProfiles": [
811
+ {
812
+ "id": "public-chart-document-praxis-stats-timeseries",
813
+ "audience": "public-untrusted",
814
+ "description": "Documento canônico de chart timeseries com leitura de recurso e filtro governado.",
815
+ "constraints": [
816
+ {
817
+ "path": "$",
818
+ "operator": "keys-subset",
819
+ "values": [
820
+ "chartDocument",
821
+ "queryContext",
822
+ "enableCustomization"
823
+ ]
824
+ },
825
+ {
826
+ "path": "enableCustomization",
827
+ "operator": "not-true"
828
+ },
829
+ {
830
+ "path": "chartDocument",
831
+ "operator": "keys-subset",
832
+ "values": [
833
+ "version",
834
+ "kind",
835
+ "preset",
836
+ "chartId",
837
+ "orientation",
838
+ "title",
839
+ "subtitle",
840
+ "sizing",
841
+ "height",
842
+ "source",
843
+ "dimensions",
844
+ "metrics",
845
+ "aggregations",
846
+ "groupBy",
847
+ "sort",
848
+ "filters",
849
+ "limit",
850
+ "legend",
851
+ "labels",
852
+ "tooltip",
853
+ "theme",
854
+ "state",
855
+ "motion",
856
+ "gauge"
857
+ ]
858
+ },
859
+ {
860
+ "path": "chartDocument.version",
861
+ "operator": "equals",
862
+ "value": "0.1.0"
863
+ },
864
+ {
865
+ "path": "chartDocument.source",
866
+ "operator": "keys-subset",
867
+ "values": [
868
+ "kind",
869
+ "resource",
870
+ "operation",
871
+ "options",
872
+ "refresh"
873
+ ]
874
+ },
875
+ {
876
+ "path": "chartDocument.source.kind",
877
+ "operator": "equals",
878
+ "value": "praxis.stats"
879
+ },
880
+ {
881
+ "path": "chartDocument.source.resource",
882
+ "operator": "present"
883
+ },
884
+ {
885
+ "path": "chartDocument.source.operation",
886
+ "operator": "equals",
887
+ "value": "timeseries"
888
+ }
889
+ ],
890
+ "effects": [
891
+ {
892
+ "kind": "resource-read",
893
+ "resourcePath": "chartDocument.source.resource",
894
+ "operations": [
895
+ {
896
+ "operationId": "statsTimeSeries",
897
+ "method": "POST",
898
+ "pathSuffix": "stats/timeseries",
899
+ "role": "primary",
900
+ "queryContext": {
901
+ "portId": "queryContext",
902
+ "requestFieldPath": "filter"
903
+ }
904
+ }
905
+ ]
906
+ }
907
+ ]
908
+ },
909
+ {
910
+ "id": "public-chart-document-praxis-stats-group-by",
911
+ "audience": "public-untrusted",
912
+ "description": "Documento canônico de chart group-by com leitura de recurso e filtro governado.",
913
+ "constraints": [
914
+ {
915
+ "path": "$",
916
+ "operator": "keys-subset",
917
+ "values": [
918
+ "chartDocument",
919
+ "queryContext",
920
+ "enableCustomization"
921
+ ]
922
+ },
923
+ {
924
+ "path": "enableCustomization",
925
+ "operator": "not-true"
926
+ },
927
+ {
928
+ "path": "chartDocument",
929
+ "operator": "keys-subset",
930
+ "values": [
931
+ "version",
932
+ "kind",
933
+ "preset",
934
+ "chartId",
935
+ "orientation",
936
+ "title",
937
+ "subtitle",
938
+ "sizing",
939
+ "height",
940
+ "source",
941
+ "dimensions",
942
+ "metrics",
943
+ "aggregations",
944
+ "groupBy",
945
+ "sort",
946
+ "filters",
947
+ "limit",
948
+ "legend",
949
+ "labels",
950
+ "tooltip",
951
+ "theme",
952
+ "state",
953
+ "motion",
954
+ "gauge"
955
+ ]
956
+ },
957
+ {
958
+ "path": "chartDocument.version",
959
+ "operator": "equals",
960
+ "value": "0.1.0"
961
+ },
962
+ {
963
+ "path": "chartDocument.source",
964
+ "operator": "keys-subset",
965
+ "values": [
966
+ "kind",
967
+ "resource",
968
+ "operation",
969
+ "options",
970
+ "refresh"
971
+ ]
972
+ },
973
+ {
974
+ "path": "chartDocument.source.kind",
975
+ "operator": "equals",
976
+ "value": "praxis.stats"
977
+ },
978
+ {
979
+ "path": "chartDocument.source.resource",
980
+ "operator": "present"
981
+ },
982
+ {
983
+ "path": "chartDocument.source.operation",
984
+ "operator": "equals",
985
+ "value": "group-by"
986
+ }
987
+ ],
988
+ "effects": [
989
+ {
990
+ "kind": "resource-read",
991
+ "resourcePath": "chartDocument.source.resource",
992
+ "operations": [
993
+ {
994
+ "operationId": "statsGroupBy",
995
+ "method": "POST",
996
+ "pathSuffix": "stats/group-by",
997
+ "role": "primary",
998
+ "queryContext": {
999
+ "portId": "queryContext",
1000
+ "requestFieldPath": "filter"
1001
+ }
1002
+ }
1003
+ ]
1004
+ }
1005
+ ]
1006
+ },
811
1007
  {
812
1008
  "id": "public-praxis-stats-timeseries",
813
1009
  "audience": "public-untrusted",
@@ -2358,10 +2358,10 @@ class PraxisChartComponent {
2358
2358
  return this.i18n.t(key, params, fallback, PRAXIS_CHARTS_I18N_NAMESPACE);
2359
2359
  }
2360
2360
  canOpenConfigEditor() {
2361
- return this.enableCustomization() && !!this.settingsPanel && !!this.runtimeChartDocument();
2361
+ return !this.destroyRef.destroyed && this.enableCustomization() && !!this.settingsPanel && !!this.runtimeChartDocument();
2362
2362
  }
2363
2363
  async openConfigEditor() {
2364
- if (!this.settingsPanel || this.configEditorContextPending()) {
2364
+ if (!this.settingsPanel || !this.canOpenConfigEditor() || this.configEditorContextPending()) {
2365
2365
  return;
2366
2366
  }
2367
2367
  const document = this.runtimeChartDocument();
@@ -2373,8 +2373,12 @@ class PraxisChartComponent {
2373
2373
  try {
2374
2374
  const resolvedContext = await this.resolveConfigEditorContext(document);
2375
2375
  const { PraxisChartConfigEditor } = await Promise.resolve().then(function () { return praxisChartConfigEditor; });
2376
+ // Context resolution can outlive the host's customization session.
2377
+ if (!this.canOpenConfigEditor())
2378
+ return;
2376
2379
  this.clearEditorSessionSubscriptions();
2377
2380
  const ref = this.settingsPanel.open({
2381
+ owner: this.destroyRef,
2378
2382
  id: `chart.${document.chartId || this.effectiveConfig().id || 'praxis-chart'}`,
2379
2383
  title: this.editChartLabel(),
2380
2384
  content: {
@@ -2398,6 +2402,9 @@ class PraxisChartComponent {
2398
2402
  const clone = structuredClone(nextDocument);
2399
2403
  this.runtimeChartDocument.set(clone);
2400
2404
  this.chartDocumentApplied.emit(clone);
2405
+ this.chartDocumentPatchChange.emit({
2406
+ inputPatch: { chartDocument: structuredClone(clone) },
2407
+ });
2401
2408
  });
2402
2409
  const savedSubscription = ref.saved$
2403
2410
  .subscribe((nextDocument) => {
@@ -2544,7 +2551,24 @@ class PraxisChartComponent {
2544
2551
  setWidgetShellActionHostActive(active) {
2545
2552
  this.widgetShellActionHostActive.set(active);
2546
2553
  }
2554
+ getWidgetShellActionAvailability(action) {
2555
+ if (this.destroyRef.destroyed || action.command !== 'openConfigEditor')
2556
+ return undefined;
2557
+ if (!this.enableCustomization())
2558
+ return { disabled: true, tooltip: this.t('praxis.charts.runtime.editorCustomizationDisabled', 'Chart customization is disabled. Use the page content editor if available.') };
2559
+ if (!this.settingsPanel)
2560
+ return { disabled: true, tooltip: this.t('praxis.charts.runtime.editorBridgeMissing', 'The host has not provided a settings panel.') };
2561
+ if (!this.runtimeChartDocument())
2562
+ return { disabled: true, tooltip: this.t('praxis.charts.runtime.editorDocumentMissing', 'A canonical chart document is required to edit this chart.') };
2563
+ if (this.configEditorContextPending())
2564
+ return { disabled: true, tooltip: this.t('praxis.charts.runtime.editorContextPending', 'The editor context is loading. Try again when it finishes.') };
2565
+ return { disabled: false };
2566
+ }
2547
2567
  handleShellAction(action) {
2568
+ if (action.command === 'openConfigEditor') {
2569
+ void this.openConfigEditor();
2570
+ return;
2571
+ }
2548
2572
  if (action.command === 'praxis-chart:toggle-data-view' ||
2549
2573
  action.id === 'chart-data-view') {
2550
2574
  this.toggleAccessibleData();
@@ -2825,7 +2849,10 @@ class PraxisChartComponent {
2825
2849
  borderRadius: explicit?.borderRadius ?? inherited.borderRadius,
2826
2850
  legend: this.mergeOptionalThemeObject(inherited.legend, explicit?.legend),
2827
2851
  tooltip: this.mergeOptionalThemeObject(inherited.tooltip, explicit?.tooltip),
2828
- surface: this.mergeOptionalThemeObject(inherited.surface, explicit?.surface),
2852
+ surface: this.mergeOptionalThemeObject(
2853
+ // Embedded content inherits the host surface, not the page preset's
2854
+ // contained background. Explicit surface values still win below.
2855
+ usesHostSurface ? { ...inherited.surface, background: undefined } : inherited.surface, explicit?.surface),
2829
2856
  },
2830
2857
  };
2831
2858
  }
@@ -5186,6 +5213,7 @@ class EChartsOptionBuilderService {
5186
5213
  xAxis: {
5187
5214
  type: config.axes?.x?.type ?? 'value',
5188
5215
  name: config.axes?.x?.label,
5216
+ nameTextStyle: { color: textColor },
5189
5217
  nameLocation: 'middle',
5190
5218
  nameGap: 32,
5191
5219
  axisLabel: {
@@ -5199,6 +5227,7 @@ class EChartsOptionBuilderService {
5199
5227
  yAxis: {
5200
5228
  type: config.axes?.y?.type ?? 'value',
5201
5229
  name: config.axes?.y?.label,
5230
+ nameTextStyle: { color: textColor },
5202
5231
  nameLocation: 'middle',
5203
5232
  nameGap: 40,
5204
5233
  min: config.axes?.y?.min,
@@ -5229,6 +5258,7 @@ class EChartsOptionBuilderService {
5229
5258
  ? {
5230
5259
  type: config.axes?.y?.type ?? 'value',
5231
5260
  name: config.axes?.y?.label,
5261
+ nameTextStyle: { color: textColor },
5232
5262
  nameLocation: 'middle',
5233
5263
  nameGap: 32,
5234
5264
  min: config.axes?.y?.min,
@@ -5243,6 +5273,7 @@ class EChartsOptionBuilderService {
5243
5273
  : {
5244
5274
  type: xAxisType,
5245
5275
  name: config.axes?.x?.label,
5276
+ nameTextStyle: { color: textColor },
5246
5277
  data: xAxisType === 'time' ? undefined : transformed.categories,
5247
5278
  nameLocation: 'middle',
5248
5279
  nameGap: 18,
@@ -5258,6 +5289,7 @@ class EChartsOptionBuilderService {
5258
5289
  ? {
5259
5290
  type: config.axes?.x?.type ?? 'category',
5260
5291
  name: config.axes?.x?.label,
5292
+ nameTextStyle: { color: textColor },
5261
5293
  data: transformed.categories,
5262
5294
  axisLabel: {
5263
5295
  show: config.axes?.x?.labels?.visible ?? true,
@@ -5443,7 +5475,9 @@ class EChartsOptionBuilderService {
5443
5475
  : CARTESIAN_GRID_BOTTOM_WITHOUT_LEGEND,
5444
5476
  left: sideLegend && legendPosition === 'left'
5445
5477
  ? 168
5446
- : options.horizontal ? 136 : 56,
5478
+ : options.horizontal ? TITLE_LEFT : 56,
5479
+ // outerBoundsContain already reserves the category-label width. Adding a
5480
+ // second label-sized left margin leaves almost no plot in narrow widgets.
5447
5481
  // ECharts deprecou containLabel; esta combinacao preserva o mesmo comportamento
5448
5482
  // sem depender da feature legacy de grid.
5449
5483
  outerBoundsMode: 'same',
@@ -5455,6 +5489,7 @@ class EChartsOptionBuilderService {
5455
5489
  const primaryAxis = {
5456
5490
  type: config.axes?.y?.type ?? 'value',
5457
5491
  name: config.axes?.y?.label,
5492
+ nameTextStyle: { color: textColor },
5458
5493
  nameLocation: 'middle',
5459
5494
  nameGap: 40,
5460
5495
  min: config.axes?.y?.min,
@@ -5474,6 +5509,7 @@ class EChartsOptionBuilderService {
5474
5509
  {
5475
5510
  type: config.axes.ySecondary.type ?? 'value',
5476
5511
  name: config.axes.ySecondary.label,
5512
+ nameTextStyle: { color: textColor },
5477
5513
  nameLocation: 'middle',
5478
5514
  nameGap: 40,
5479
5515
  min: config.axes.ySecondary.min,
@@ -6005,6 +6041,10 @@ function pointData(category, value) {
6005
6041
  }
6006
6042
 
6007
6043
  const PRAXIS_CHARTS_EN_US = {
6044
+ "praxis.charts.runtime.editorCustomizationDisabled": "Chart customization is disabled. Use the page content editor if available.",
6045
+ "praxis.charts.runtime.editorBridgeMissing": "The host has not provided a settings panel.",
6046
+ "praxis.charts.runtime.editorDocumentMissing": "A canonical chart document is required to edit this chart.",
6047
+ "praxis.charts.runtime.editorContextPending": "The editor context is loading. Try again when it finishes.",
6008
6048
  'praxis.charts.runtime.editChart': 'Edit chart settings',
6009
6049
  'praxis.charts.runtime.loadingDescription': 'Publishing the analytics slice and preparing visual buckets.',
6010
6050
  'praxis.charts.runtime.emptyTitle': 'No chart data available',
@@ -6270,6 +6310,10 @@ const PRAXIS_CHARTS_EN_US = {
6270
6310
  };
6271
6311
 
6272
6312
  const PRAXIS_CHARTS_PT_BR = {
6313
+ "praxis.charts.runtime.editorCustomizationDisabled": "A customização deste gráfico está desabilitada. Use Configurar conteúdo na página, se disponível.",
6314
+ "praxis.charts.runtime.editorBridgeMissing": "O host não disponibilizou o painel de configurações.",
6315
+ "praxis.charts.runtime.editorDocumentMissing": "Este gráfico precisa de um documento canônico para ser editado.",
6316
+ "praxis.charts.runtime.editorContextPending": "O contexto do editor está carregando. Tente novamente ao concluir.",
6273
6317
  'praxis.charts.runtime.editChart': 'Editar configurações do gráfico',
6274
6318
  'praxis.charts.runtime.loadingDescription': 'Publicando o recorte analítico e preparando os buckets visuais.',
6275
6319
  'praxis.charts.runtime.emptyTitle': 'Nenhum dado disponível para o gráfico',
@@ -9434,6 +9478,8 @@ const PRAXIS_CHART_COMPONENT_METADATA = {
9434
9478
  source: 'PRAXIS_CHARTS_AUTHORING_MANIFEST',
9435
9479
  },
9436
9480
  runtimeProfiles: [
9481
+ chartDocumentStatsRuntimeProfile('timeseries'),
9482
+ chartDocumentStatsRuntimeProfile('group-by'),
9437
9483
  statsRuntimeProfile('timeseries'),
9438
9484
  statsRuntimeProfile('group-by'),
9439
9485
  ],
@@ -9558,7 +9604,7 @@ const PRAXIS_CHART_COMPONENT_METADATA = {
9558
9604
  {
9559
9605
  name: 'chartDocumentPatchChange',
9560
9606
  type: 'PraxisChartDocumentPatchChangeEvent',
9561
- description: 'Emitted on Save with inputPatch.chartDocument so dynamic widget hosts can materialize the canonical document without inferring persistence from event names.',
9607
+ description: 'Emitted on Apply and Save with inputPatch.chartDocument so dynamic widget hosts can materialize the canonical document without inferring persistence from event names.',
9562
9608
  },
9563
9609
  ],
9564
9610
  actions: [
@@ -9573,6 +9619,40 @@ const PRAXIS_CHART_COMPONENT_METADATA = {
9573
9619
  ],
9574
9620
  ports: PRAXIS_CHART_PHASE1_PORTS,
9575
9621
  };
9622
+ /** Attests the canonical document directly; runtime config remains mapper-owned. */
9623
+ function chartDocumentStatsRuntimeProfile(operation) {
9624
+ return {
9625
+ id: `public-chart-document-praxis-stats-${operation}`,
9626
+ audience: 'public-untrusted',
9627
+ description: `Documento canônico de chart ${operation} com leitura de recurso e filtro governado.`,
9628
+ constraints: [
9629
+ { path: '$', operator: 'keys-subset', values: ['chartDocument', 'queryContext', 'enableCustomization'] },
9630
+ { path: 'enableCustomization', operator: 'not-true' },
9631
+ { path: 'chartDocument', operator: 'keys-subset', values: [
9632
+ 'version', 'kind', 'preset', 'chartId', 'orientation', 'title', 'subtitle',
9633
+ 'sizing', 'height', 'source', 'dimensions', 'metrics', 'aggregations',
9634
+ 'groupBy', 'sort', 'filters', 'limit', 'legend', 'labels', 'tooltip',
9635
+ 'theme', 'state', 'motion', 'gauge',
9636
+ ] },
9637
+ { path: 'chartDocument.version', operator: 'equals', value: PRAXIS_X_UI_CHART_AUTHORABLE_VERSION },
9638
+ { path: 'chartDocument.source', operator: 'keys-subset', values: ['kind', 'resource', 'operation', 'options', 'refresh'] },
9639
+ { path: 'chartDocument.source.kind', operator: 'equals', value: 'praxis.stats' },
9640
+ { path: 'chartDocument.source.resource', operator: 'present' },
9641
+ { path: 'chartDocument.source.operation', operator: 'equals', value: operation },
9642
+ ],
9643
+ effects: [{
9644
+ kind: 'resource-read',
9645
+ resourcePath: 'chartDocument.source.resource',
9646
+ operations: [{
9647
+ operationId: operation === 'timeseries' ? 'statsTimeSeries' : 'statsGroupBy',
9648
+ method: 'POST',
9649
+ pathSuffix: `stats/${operation}`,
9650
+ role: 'primary',
9651
+ queryContext: { portId: 'queryContext', requestFieldPath: 'filter' },
9652
+ }],
9653
+ }],
9654
+ };
9655
+ }
9576
9656
  function statsRuntimeProfile(operation) {
9577
9657
  return {
9578
9658
  id: `public-praxis-stats-${operation}`,
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@praxisui/charts",
3
- "version": "9.0.67",
3
+ "version": "9.0.68-rc.1",
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.67",
8
+ "@praxisui/core": "^9.0.68-rc.1",
9
9
  "@angular/forms": "^21.0.0",
10
10
  "@angular/material": "^21.0.0",
11
- "@praxisui/table": "^9.0.67",
11
+ "@praxisui/table": "^9.0.68-rc.1",
12
12
  "rxjs": "~7.8.0"
13
13
  },
14
14
  "dependencies": {
@@ -671,6 +671,7 @@ declare class PraxisChartComponent implements WidgetShellActionContributor {
671
671
  private handlePointClick;
672
672
  toggleAccessibleData(): void;
673
673
  setWidgetShellActionHostActive(active: boolean): void;
674
+ getWidgetShellActionAvailability(action: WidgetShellAction): Pick<WidgetShellAction, 'disabled' | 'tooltip'> | undefined;
674
675
  handleShellAction(action: WidgetShellActionEvent): void;
675
676
  activateAccessiblePoint(point: PraxisChartAccessiblePoint): void;
676
677
  accessiblePointPressed(point: PraxisChartAccessiblePoint): string | null;