@praxisui/charts 3.0.0-beta.8 → 4.0.0-beta.0
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 +14 -0
- package/fesm2022/praxisui-charts.mjs +397 -117
- package/index.d.ts +118 -29
- package/package.json +2 -2
- package/fesm2022/praxisui-charts.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -279,3 +279,17 @@ The current runtime does not yet expose as stable public surface:
|
|
|
279
279
|
- the package is designed for the Praxis platform model, where chart semantics live in canonical contracts and not in engine-specific payloads
|
|
280
280
|
- if you are integrating charts into dynamic pages or widget shells, prefer the exported Praxis contracts and mappers over direct engine customization
|
|
281
281
|
- if you need raw ECharts tuning, treat it as adapter-level implementation detail unless the contract is promoted to the public surface intentionally
|
|
282
|
+
|
|
283
|
+
## Reusable `x-ui.analytics` Runtime Pattern
|
|
284
|
+
|
|
285
|
+
When the backend publishes `x-ui.analytics.projections[]`, the reusable platform path is now:
|
|
286
|
+
|
|
287
|
+
1. `@praxisui/core` resolves the contract with `AnalyticsSchemaContractService`
|
|
288
|
+
2. `AnalyticsPresentationResolver` chooses the presentation family
|
|
289
|
+
3. `AnalyticsChartContractService` in `@praxisui/charts` materializes the selected projection into `PraxisChartConfig`
|
|
290
|
+
|
|
291
|
+
This keeps chart hosts out of the business of:
|
|
292
|
+
- calling `/schemas/filtered` manually
|
|
293
|
+
- parsing `x-ui.analytics` by hand
|
|
294
|
+
- selecting projections ad hoc
|
|
295
|
+
- rebuilding the chart contract pipeline inside each app
|
|
@@ -2,7 +2,7 @@ import { CommonModule } from '@angular/common';
|
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { Injectable, Inject, InjectionToken, input, booleanAttribute, output, viewChild, inject, ElementRef, DestroyRef, signal, computed, afterNextRender, effect, ChangeDetectionStrategy, Component, ENVIRONMENT_INITIALIZER } from '@angular/core';
|
|
4
4
|
import * as i1$2 from '@praxisui/core';
|
|
5
|
-
import { buildApiUrl, API_URL, PraxisI18nService, SETTINGS_PANEL_BRIDGE, ComponentMetadataRegistry, createDefaultTableConfig, DynamicWidgetPageComponent, providePraxisI18n, SETTINGS_PANEL_DATA } from '@praxisui/core';
|
|
5
|
+
import { buildApiUrl, API_URL, PraxisI18nService, SETTINGS_PANEL_BRIDGE, ComponentMetadataRegistry, createDefaultTableConfig, AnalyticsStatsRequestBuilderService, DynamicWidgetPageComponent, providePraxisI18n, SETTINGS_PANEL_DATA } from '@praxisui/core';
|
|
6
6
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
7
7
|
import * as i1$1 from '@angular/material/button';
|
|
8
8
|
import { MatButtonModule } from '@angular/material/button';
|
|
@@ -2818,6 +2818,245 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
2818
2818
|
args: [{ providedIn: 'root' }]
|
|
2819
2819
|
}], ctorParameters: () => [{ type: PraxisChartSchemaMapperService }, { type: PraxisChartCanonicalContractMapperService }] });
|
|
2820
2820
|
|
|
2821
|
+
class AnalyticsChartConfigAdapterService {
|
|
2822
|
+
statsBuilder = new AnalyticsStatsRequestBuilderService();
|
|
2823
|
+
toPraxisChartConfig(projection, options) {
|
|
2824
|
+
const chartType = this.resolveChartType(projection);
|
|
2825
|
+
const orientation = chartType === 'horizontal-bar' ? 'horizontal' : undefined;
|
|
2826
|
+
const dimension = projection.bindings.primaryDimension;
|
|
2827
|
+
const metrics = projection.bindings.primaryMetrics ?? [];
|
|
2828
|
+
if (!dimension?.field) {
|
|
2829
|
+
throw new Error(`AnalyticsChartConfigAdapterService requires primaryDimension for projection "${projection.id}".`);
|
|
2830
|
+
}
|
|
2831
|
+
if (!metrics.length) {
|
|
2832
|
+
throw new Error(`AnalyticsChartConfigAdapterService requires at least one metric for projection "${projection.id}".`);
|
|
2833
|
+
}
|
|
2834
|
+
return {
|
|
2835
|
+
id: projection.id,
|
|
2836
|
+
type: chartType,
|
|
2837
|
+
orientation,
|
|
2838
|
+
title: options?.title,
|
|
2839
|
+
subtitle: options?.subtitle,
|
|
2840
|
+
height: options?.height,
|
|
2841
|
+
axes: this.buildAxes(projection, chartType),
|
|
2842
|
+
series: this.buildSeries(projection, chartType),
|
|
2843
|
+
dataSource: this.buildDataSource(projection),
|
|
2844
|
+
interactions: {
|
|
2845
|
+
pointClick: Boolean(projection.interactions?.pointSelection || projection.interactions?.drillDown),
|
|
2846
|
+
drillDown: Boolean(projection.interactions?.drillDown),
|
|
2847
|
+
selection: Boolean(projection.interactions?.pointSelection),
|
|
2848
|
+
},
|
|
2849
|
+
};
|
|
2850
|
+
}
|
|
2851
|
+
buildAxes(projection, chartType) {
|
|
2852
|
+
const dimension = projection.bindings.primaryDimension;
|
|
2853
|
+
const metrics = this.getDisplayMetrics(projection);
|
|
2854
|
+
const firstMetric = metrics[0];
|
|
2855
|
+
if (chartType === 'pie' || chartType === 'donut') {
|
|
2856
|
+
return {
|
|
2857
|
+
x: {
|
|
2858
|
+
field: dimension.field,
|
|
2859
|
+
label: dimension.label ?? undefined,
|
|
2860
|
+
},
|
|
2861
|
+
};
|
|
2862
|
+
}
|
|
2863
|
+
return {
|
|
2864
|
+
x: {
|
|
2865
|
+
field: dimension.field,
|
|
2866
|
+
label: dimension.label ?? undefined,
|
|
2867
|
+
type: dimension.role === 'time' ? 'time' : 'category',
|
|
2868
|
+
},
|
|
2869
|
+
y: {
|
|
2870
|
+
label: metrics.length === 1
|
|
2871
|
+
? firstMetric?.label ?? firstMetric?.field
|
|
2872
|
+
: undefined,
|
|
2873
|
+
type: 'value',
|
|
2874
|
+
},
|
|
2875
|
+
};
|
|
2876
|
+
}
|
|
2877
|
+
buildSeries(projection, chartType) {
|
|
2878
|
+
const dimension = projection.bindings.primaryDimension;
|
|
2879
|
+
return this.getDisplayMetrics(projection).map((metric, index) => ({
|
|
2880
|
+
id: `${projection.id}.${metric.field}.${index + 1}`,
|
|
2881
|
+
name: metric.label ?? metric.field,
|
|
2882
|
+
type: chartType,
|
|
2883
|
+
categoryField: chartType === 'pie' || chartType === 'donut' ? dimension.field : undefined,
|
|
2884
|
+
metric: {
|
|
2885
|
+
field: metric.field,
|
|
2886
|
+
aggregation: this.mapAggregation(metric.aggregation),
|
|
2887
|
+
label: metric.label ?? undefined,
|
|
2888
|
+
},
|
|
2889
|
+
smooth: chartType === 'line' || chartType === 'area',
|
|
2890
|
+
}));
|
|
2891
|
+
}
|
|
2892
|
+
buildDataSource(projection) {
|
|
2893
|
+
const executionPlan = this.statsBuilder.buildExecutionPlan(projection);
|
|
2894
|
+
return {
|
|
2895
|
+
kind: 'remote',
|
|
2896
|
+
resourcePath: executionPlan.resourcePath,
|
|
2897
|
+
schemaId: executionPlan.resourcePath,
|
|
2898
|
+
query: {
|
|
2899
|
+
sourceKind: 'praxis.stats',
|
|
2900
|
+
statsOperation: executionPlan.operation,
|
|
2901
|
+
statsPath: executionPlan.statsPath,
|
|
2902
|
+
statsRequest: executionPlan.statsRequest,
|
|
2903
|
+
dimensions: executionPlan.dimensions,
|
|
2904
|
+
metrics: this.mapExecutionMetrics(executionPlan),
|
|
2905
|
+
sort: executionPlan.sort,
|
|
2906
|
+
limit: executionPlan.limit,
|
|
2907
|
+
},
|
|
2908
|
+
};
|
|
2909
|
+
}
|
|
2910
|
+
resolveChartType(projection) {
|
|
2911
|
+
if (projection.intent === 'trend' && projection.source.operation === 'timeseries') {
|
|
2912
|
+
return 'line';
|
|
2913
|
+
}
|
|
2914
|
+
if (projection.intent === 'ranking' && projection.source.operation === 'group-by') {
|
|
2915
|
+
return 'horizontal-bar';
|
|
2916
|
+
}
|
|
2917
|
+
if (projection.intent === 'composition') {
|
|
2918
|
+
return 'pie';
|
|
2919
|
+
}
|
|
2920
|
+
if (projection.intent === 'distribution') {
|
|
2921
|
+
return 'bar';
|
|
2922
|
+
}
|
|
2923
|
+
return 'bar';
|
|
2924
|
+
}
|
|
2925
|
+
mapAggregation(aggregation) {
|
|
2926
|
+
const normalizedAggregation = (aggregation ?? '').toLowerCase();
|
|
2927
|
+
switch (normalizedAggregation) {
|
|
2928
|
+
case 'avg':
|
|
2929
|
+
case 'min':
|
|
2930
|
+
case 'max':
|
|
2931
|
+
case 'count':
|
|
2932
|
+
case 'sum':
|
|
2933
|
+
return normalizedAggregation;
|
|
2934
|
+
case '':
|
|
2935
|
+
return undefined;
|
|
2936
|
+
default:
|
|
2937
|
+
throw new Error(`Analytics aggregation "${aggregation}" is not supported in @praxisui/charts.`);
|
|
2938
|
+
}
|
|
2939
|
+
}
|
|
2940
|
+
mapExecutionMetrics(executionPlan) {
|
|
2941
|
+
return executionPlan.metrics.map((metric) => ({
|
|
2942
|
+
field: metric.field,
|
|
2943
|
+
aggregation: this.mapAggregation(metric.aggregation),
|
|
2944
|
+
alias: metric.alias,
|
|
2945
|
+
}));
|
|
2946
|
+
}
|
|
2947
|
+
getDisplayMetrics(projection) {
|
|
2948
|
+
return [
|
|
2949
|
+
...(projection.bindings.primaryMetrics ?? []),
|
|
2950
|
+
...(projection.bindings.secondaryMetrics ?? []),
|
|
2951
|
+
];
|
|
2952
|
+
}
|
|
2953
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: AnalyticsChartConfigAdapterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2954
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: AnalyticsChartConfigAdapterService, providedIn: 'root' });
|
|
2955
|
+
}
|
|
2956
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: AnalyticsChartConfigAdapterService, decorators: [{
|
|
2957
|
+
type: Injectable,
|
|
2958
|
+
args: [{ providedIn: 'root' }]
|
|
2959
|
+
}] });
|
|
2960
|
+
|
|
2961
|
+
class AnalyticsChartContractService {
|
|
2962
|
+
analyticsSchema;
|
|
2963
|
+
resolver;
|
|
2964
|
+
chartAdapter;
|
|
2965
|
+
constructor(analyticsSchema, resolver, chartAdapter) {
|
|
2966
|
+
this.analyticsSchema = analyticsSchema;
|
|
2967
|
+
this.resolver = resolver;
|
|
2968
|
+
this.chartAdapter = chartAdapter;
|
|
2969
|
+
}
|
|
2970
|
+
buildBootstrapChartConfigs(definitions) {
|
|
2971
|
+
return definitions.reduce((acc, definition) => {
|
|
2972
|
+
acc[definition.key] = this.buildChartConfig({
|
|
2973
|
+
projection: definition.fallbackProjection,
|
|
2974
|
+
title: definition.title,
|
|
2975
|
+
subtitle: definition.subtitle,
|
|
2976
|
+
});
|
|
2977
|
+
return acc;
|
|
2978
|
+
}, {});
|
|
2979
|
+
}
|
|
2980
|
+
async loadChartConfigs(definitions, options) {
|
|
2981
|
+
const results = await Promise.all(definitions.map((definition) => this.loadSingleChartConfig(definition, options)));
|
|
2982
|
+
return {
|
|
2983
|
+
configs: results.reduce((acc, result) => {
|
|
2984
|
+
acc[result.key] = result.config;
|
|
2985
|
+
return acc;
|
|
2986
|
+
}, {}),
|
|
2987
|
+
sources: results.reduce((acc, result) => {
|
|
2988
|
+
acc[result.key] = result.source;
|
|
2989
|
+
return acc;
|
|
2990
|
+
}, {}),
|
|
2991
|
+
errors: results.reduce((acc, result) => {
|
|
2992
|
+
if (result.error) {
|
|
2993
|
+
acc[result.key] = result.error;
|
|
2994
|
+
}
|
|
2995
|
+
return acc;
|
|
2996
|
+
}, {}),
|
|
2997
|
+
};
|
|
2998
|
+
}
|
|
2999
|
+
async loadSingleChartConfig(definition, options) {
|
|
3000
|
+
const fallbackConfig = this.buildChartConfig({
|
|
3001
|
+
projection: definition.fallbackProjection,
|
|
3002
|
+
title: definition.title,
|
|
3003
|
+
subtitle: definition.subtitle,
|
|
3004
|
+
});
|
|
3005
|
+
try {
|
|
3006
|
+
const analytics = await this.analyticsSchema.getAnalytics({
|
|
3007
|
+
path: definition.path,
|
|
3008
|
+
cacheNamespace: options?.cacheNamespace,
|
|
3009
|
+
});
|
|
3010
|
+
const projection = analytics.projections.find((candidate) => candidate.id === definition.projectionId);
|
|
3011
|
+
if (!projection) {
|
|
3012
|
+
throw new Error(`Projection "${definition.projectionId}" was not published for ${definition.path}.`);
|
|
3013
|
+
}
|
|
3014
|
+
return {
|
|
3015
|
+
key: definition.key,
|
|
3016
|
+
source: 'remote',
|
|
3017
|
+
config: this.buildChartConfig({
|
|
3018
|
+
projection,
|
|
3019
|
+
title: definition.title,
|
|
3020
|
+
subtitle: definition.subtitle,
|
|
3021
|
+
}),
|
|
3022
|
+
};
|
|
3023
|
+
}
|
|
3024
|
+
catch (error) {
|
|
3025
|
+
return {
|
|
3026
|
+
key: definition.key,
|
|
3027
|
+
source: 'fallback',
|
|
3028
|
+
config: fallbackConfig,
|
|
3029
|
+
error: normalizeError(error),
|
|
3030
|
+
};
|
|
3031
|
+
}
|
|
3032
|
+
}
|
|
3033
|
+
buildChartConfig(params) {
|
|
3034
|
+
const decision = this.resolver.resolve({ projections: [params.projection] }, {
|
|
3035
|
+
availableFamilies: ['chart', 'analytic-table'],
|
|
3036
|
+
preferFamily: 'chart',
|
|
3037
|
+
});
|
|
3038
|
+
if (decision.family !== 'chart') {
|
|
3039
|
+
throw new Error(`Projection "${params.projection.id}" did not resolve to the chart family.`);
|
|
3040
|
+
}
|
|
3041
|
+
return this.chartAdapter.toPraxisChartConfig(params.projection, {
|
|
3042
|
+
title: params.title,
|
|
3043
|
+
subtitle: params.subtitle,
|
|
3044
|
+
});
|
|
3045
|
+
}
|
|
3046
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: AnalyticsChartContractService, deps: [{ token: i1$2.AnalyticsSchemaContractService }, { token: i1$2.AnalyticsPresentationResolver }, { token: AnalyticsChartConfigAdapterService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3047
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: AnalyticsChartContractService, providedIn: 'root' });
|
|
3048
|
+
}
|
|
3049
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: AnalyticsChartContractService, decorators: [{
|
|
3050
|
+
type: Injectable,
|
|
3051
|
+
args: [{ providedIn: 'root' }]
|
|
3052
|
+
}], ctorParameters: () => [{ type: i1$2.AnalyticsSchemaContractService }, { type: i1$2.AnalyticsPresentationResolver }, { type: AnalyticsChartConfigAdapterService }] });
|
|
3053
|
+
function normalizeError(error) {
|
|
3054
|
+
if (error instanceof Error && error.message.trim()) {
|
|
3055
|
+
return error.message.trim();
|
|
3056
|
+
}
|
|
3057
|
+
return 'Unknown analytics contract error.';
|
|
3058
|
+
}
|
|
3059
|
+
|
|
2821
3060
|
const PRAXIS_CHART_BACKEND_MOCK_BAR = {
|
|
2822
3061
|
schemaMeta: {
|
|
2823
3062
|
schemaId: 'api/human-resources/vw-perfil-heroi|post|response|tenant:demo|locale:pt-BR',
|
|
@@ -3386,7 +3625,7 @@ function buildPraxisChartInteractiveWidgetPage(adapter) {
|
|
|
3386
3625
|
},
|
|
3387
3626
|
shell: {
|
|
3388
3627
|
title: 'Runtime Probe',
|
|
3389
|
-
subtitle: 'Conectado via
|
|
3628
|
+
subtitle: 'Conectado via composition.links',
|
|
3390
3629
|
},
|
|
3391
3630
|
},
|
|
3392
3631
|
withShowcaseViewToggle(adapter.toWidgetInstance(PRAXIS_CHART_BACKEND_MOCK_DONUT)),
|
|
@@ -3395,16 +3634,10 @@ function buildPraxisChartInteractiveWidgetPage(adapter) {
|
|
|
3395
3634
|
withShowcaseViewToggle(adapter.toWidgetInstance(PRAXIS_CHART_BACKEND_MOCK_SCATTER)),
|
|
3396
3635
|
withShowcaseViewToggle(adapter.toWidgetInstance(PRAXIS_CHART_BACKEND_MOCK_COMBO)),
|
|
3397
3636
|
],
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
},
|
|
3403
|
-
{
|
|
3404
|
-
from: { widget: 'monthly-revenue-chart', output: 'pointClick' },
|
|
3405
|
-
to: { widget: 'chart-drilldown-panel', input: 'selection' },
|
|
3406
|
-
},
|
|
3407
|
-
],
|
|
3637
|
+
composition: {
|
|
3638
|
+
version: '1.0.0',
|
|
3639
|
+
links: buildInteractiveCompositionLinks(),
|
|
3640
|
+
},
|
|
3408
3641
|
layout: {
|
|
3409
3642
|
orientation: 'columns',
|
|
3410
3643
|
columns: 2,
|
|
@@ -3454,21 +3687,19 @@ function buildPraxisChartInteractiveCanvasPage(adapter) {
|
|
|
3454
3687
|
widget: withShowcaseViewToggle(adapter.toWidgetInstance(PRAXIS_CHART_BACKEND_MOCK_COMBO)),
|
|
3455
3688
|
canvasItem: { col: 1, row: 25, colSpan: 12, rowSpan: 4 },
|
|
3456
3689
|
},
|
|
3457
|
-
],
|
|
3458
|
-
{
|
|
3459
|
-
from: { widget: 'monthly-revenue-chart', output: 'pointClick' },
|
|
3460
|
-
to: { widget: 'chart-event-probe', input: 'value' },
|
|
3461
|
-
},
|
|
3462
|
-
{
|
|
3463
|
-
from: { widget: 'monthly-revenue-chart', output: 'pointClick' },
|
|
3464
|
-
to: { widget: 'chart-drilldown-panel', input: 'selection' },
|
|
3465
|
-
},
|
|
3466
|
-
]);
|
|
3690
|
+
], buildInteractiveCompositionLinks());
|
|
3467
3691
|
}
|
|
3468
|
-
function buildCanvasPage(entries,
|
|
3692
|
+
function buildCanvasPage(entries, compositionLinks) {
|
|
3469
3693
|
return {
|
|
3470
3694
|
widgets: entries.map((entry) => entry.widget),
|
|
3471
|
-
|
|
3695
|
+
...(compositionLinks?.length
|
|
3696
|
+
? {
|
|
3697
|
+
composition: {
|
|
3698
|
+
version: '1.0.0',
|
|
3699
|
+
links: compositionLinks,
|
|
3700
|
+
},
|
|
3701
|
+
}
|
|
3702
|
+
: {}),
|
|
3472
3703
|
canvas: {
|
|
3473
3704
|
mode: 'grid',
|
|
3474
3705
|
columns: 12,
|
|
@@ -3506,10 +3737,60 @@ function buildProbeWidget() {
|
|
|
3506
3737
|
},
|
|
3507
3738
|
shell: {
|
|
3508
3739
|
title: 'Runtime Probe',
|
|
3509
|
-
subtitle: 'Conectado via
|
|
3740
|
+
subtitle: 'Conectado via composition.links',
|
|
3510
3741
|
},
|
|
3511
3742
|
};
|
|
3512
3743
|
}
|
|
3744
|
+
function buildInteractiveCompositionLinks() {
|
|
3745
|
+
return [
|
|
3746
|
+
{
|
|
3747
|
+
id: 'persisted:monthly-revenue-chart.pointClick->chart-event-probe.value',
|
|
3748
|
+
from: {
|
|
3749
|
+
kind: 'component-port',
|
|
3750
|
+
ref: {
|
|
3751
|
+
widget: 'monthly-revenue-chart',
|
|
3752
|
+
port: 'pointClick',
|
|
3753
|
+
direction: 'output',
|
|
3754
|
+
},
|
|
3755
|
+
},
|
|
3756
|
+
to: {
|
|
3757
|
+
kind: 'component-port',
|
|
3758
|
+
ref: {
|
|
3759
|
+
widget: 'chart-event-probe',
|
|
3760
|
+
port: 'value',
|
|
3761
|
+
direction: 'input',
|
|
3762
|
+
},
|
|
3763
|
+
},
|
|
3764
|
+
intent: 'event-propagation',
|
|
3765
|
+
metadata: {
|
|
3766
|
+
source: 'persisted-composition-link',
|
|
3767
|
+
},
|
|
3768
|
+
},
|
|
3769
|
+
{
|
|
3770
|
+
id: 'persisted:monthly-revenue-chart.pointClick->chart-drilldown-panel.selection',
|
|
3771
|
+
from: {
|
|
3772
|
+
kind: 'component-port',
|
|
3773
|
+
ref: {
|
|
3774
|
+
widget: 'monthly-revenue-chart',
|
|
3775
|
+
port: 'pointClick',
|
|
3776
|
+
direction: 'output',
|
|
3777
|
+
},
|
|
3778
|
+
},
|
|
3779
|
+
to: {
|
|
3780
|
+
kind: 'component-port',
|
|
3781
|
+
ref: {
|
|
3782
|
+
widget: 'chart-drilldown-panel',
|
|
3783
|
+
port: 'selection',
|
|
3784
|
+
direction: 'input',
|
|
3785
|
+
},
|
|
3786
|
+
},
|
|
3787
|
+
intent: 'event-propagation',
|
|
3788
|
+
metadata: {
|
|
3789
|
+
source: 'persisted-composition-link',
|
|
3790
|
+
},
|
|
3791
|
+
},
|
|
3792
|
+
];
|
|
3793
|
+
}
|
|
3513
3794
|
function withShowcaseViewToggle(widget, initialViewMode = 'chart') {
|
|
3514
3795
|
return {
|
|
3515
3796
|
...widget,
|
|
@@ -4072,123 +4353,123 @@ const PRAXIS_CHARTS_EN_US = {
|
|
|
4072
4353
|
};
|
|
4073
4354
|
|
|
4074
4355
|
const PRAXIS_CHARTS_PT_BR = {
|
|
4075
|
-
'praxis.charts.runtime.editChart': 'Editar
|
|
4076
|
-
'praxis.charts.runtime.invalidDocumentTitle': '
|
|
4077
|
-
'praxis.charts.runtime.invalidDocumentDescription': 'O documento
|
|
4356
|
+
'praxis.charts.runtime.editChart': 'Editar configurações do gráfico',
|
|
4357
|
+
'praxis.charts.runtime.invalidDocumentTitle': 'Configuração canônica inválida',
|
|
4358
|
+
'praxis.charts.runtime.invalidDocumentDescription': 'O documento canônico do gráfico não pode ser mapeado para o runtime atual do Praxis Charts. Revise o contrato do gráfico antes de continuar.',
|
|
4078
4359
|
'praxis.charts.editor.section.general': 'Geral',
|
|
4079
4360
|
'praxis.charts.editor.section.data': 'Dados',
|
|
4080
4361
|
'praxis.charts.editor.section.analytics': 'Estrutura',
|
|
4081
|
-
'praxis.charts.editor.section.appearance': '
|
|
4082
|
-
'praxis.charts.editor.section.motion': '
|
|
4362
|
+
'praxis.charts.editor.section.appearance': 'Aparência',
|
|
4363
|
+
'praxis.charts.editor.section.motion': 'Movimento',
|
|
4083
4364
|
'praxis.charts.editor.section.events': 'Eventos',
|
|
4084
|
-
'praxis.charts.editor.section.preview': '
|
|
4085
|
-
'praxis.charts.editor.field.chartId': '
|
|
4365
|
+
'praxis.charts.editor.section.preview': 'Visualização',
|
|
4366
|
+
'praxis.charts.editor.field.chartId': 'ID do Gráfico',
|
|
4086
4367
|
'praxis.charts.editor.field.kind': 'Tipo',
|
|
4087
|
-
'praxis.charts.editor.field.title': '
|
|
4088
|
-
'praxis.charts.editor.field.subtitle': '
|
|
4368
|
+
'praxis.charts.editor.field.title': 'Título',
|
|
4369
|
+
'praxis.charts.editor.field.subtitle': 'Subtítulo',
|
|
4089
4370
|
'praxis.charts.editor.field.height': 'Altura',
|
|
4090
4371
|
'praxis.charts.editor.field.sourceKind': 'Fonte',
|
|
4091
4372
|
'praxis.charts.editor.field.resource': 'Recurso',
|
|
4092
|
-
'praxis.charts.editor.field.operation': '
|
|
4373
|
+
'praxis.charts.editor.field.operation': 'Operação',
|
|
4093
4374
|
'praxis.charts.editor.field.granularity': 'Granularidade',
|
|
4094
4375
|
'praxis.charts.editor.field.fillGaps': 'Preencher intervalos sem dados',
|
|
4095
|
-
'praxis.charts.editor.field.distributionMode': 'Modo
|
|
4376
|
+
'praxis.charts.editor.field.distributionMode': 'Modo de distribuição',
|
|
4096
4377
|
'praxis.charts.editor.field.bucketSize': 'Tamanho do bucket',
|
|
4097
4378
|
'praxis.charts.editor.field.bucketCount': 'Quantidade de buckets',
|
|
4098
|
-
'praxis.charts.editor.field.dimension': '
|
|
4099
|
-
'praxis.charts.editor.field.dimensionRole': 'Papel da
|
|
4100
|
-
'praxis.charts.editor.field.metric': '
|
|
4101
|
-
'praxis.charts.editor.field.metricLabel': '
|
|
4102
|
-
'praxis.charts.editor.field.metricAggregation': '
|
|
4379
|
+
'praxis.charts.editor.field.dimension': 'Dimensão',
|
|
4380
|
+
'praxis.charts.editor.field.dimensionRole': 'Papel da dimensão',
|
|
4381
|
+
'praxis.charts.editor.field.metric': 'Métrica',
|
|
4382
|
+
'praxis.charts.editor.field.metricLabel': 'Rótulo da métrica',
|
|
4383
|
+
'praxis.charts.editor.field.metricAggregation': 'Agregação',
|
|
4103
4384
|
'praxis.charts.editor.field.metricAxis': 'Eixo',
|
|
4104
|
-
'praxis.charts.editor.field.metricSeriesKind': 'Tipo da
|
|
4385
|
+
'praxis.charts.editor.field.metricSeriesKind': 'Tipo da série',
|
|
4105
4386
|
'praxis.charts.editor.field.legendEnabled': 'Exibir legenda',
|
|
4106
|
-
'praxis.charts.editor.field.labelsEnabled': 'Exibir
|
|
4107
|
-
'praxis.charts.editor.field.tooltipEnabled': 'Exibir tooltip',
|
|
4387
|
+
'praxis.charts.editor.field.labelsEnabled': 'Exibir rótulos',
|
|
4388
|
+
'praxis.charts.editor.field.tooltipEnabled': 'Exibir dica de ferramenta (tooltip)',
|
|
4108
4389
|
'praxis.charts.editor.field.palette': 'Cores da paleta',
|
|
4109
|
-
'praxis.charts.editor.field.emptyTitle': '
|
|
4110
|
-
'praxis.charts.editor.field.emptyDescription': '
|
|
4111
|
-
'praxis.charts.editor.field.loadingTitle': '
|
|
4112
|
-
'praxis.charts.editor.field.loadingDescription': '
|
|
4113
|
-
'praxis.charts.editor.field.errorTitle': '
|
|
4114
|
-
'praxis.charts.editor.field.errorDescription': '
|
|
4115
|
-
'praxis.charts.editor.field.motionEnabled': 'Ativar
|
|
4116
|
-
'praxis.charts.editor.field.motionPreset': '
|
|
4117
|
-
'praxis.charts.editor.field.eventAction': '
|
|
4390
|
+
'praxis.charts.editor.field.emptyTitle': 'Título do estado vazio',
|
|
4391
|
+
'praxis.charts.editor.field.emptyDescription': 'Descrição do estado vazio',
|
|
4392
|
+
'praxis.charts.editor.field.loadingTitle': 'Título de carregamento',
|
|
4393
|
+
'praxis.charts.editor.field.loadingDescription': 'Descrição de carregamento',
|
|
4394
|
+
'praxis.charts.editor.field.errorTitle': 'Título do erro',
|
|
4395
|
+
'praxis.charts.editor.field.errorDescription': 'Descrição do erro',
|
|
4396
|
+
'praxis.charts.editor.field.motionEnabled': 'Ativar animações',
|
|
4397
|
+
'praxis.charts.editor.field.motionPreset': 'Predefinição de movimento',
|
|
4398
|
+
'praxis.charts.editor.field.eventAction': 'Ação',
|
|
4118
4399
|
'praxis.charts.editor.field.eventTarget': 'Destino',
|
|
4119
4400
|
'praxis.charts.editor.field.eventMapping': 'Mapeamento',
|
|
4120
|
-
'praxis.charts.editor.preview.title': '
|
|
4121
|
-
'praxis.charts.editor.preview.caption': '
|
|
4122
|
-
'praxis.charts.editor.preview.invalid': '
|
|
4123
|
-
'praxis.charts.editor.issues.title': '
|
|
4124
|
-
'praxis.charts.editor.issues.empty': 'Nenhum
|
|
4401
|
+
'praxis.charts.editor.preview.title': 'Visualização do gráfico',
|
|
4402
|
+
'praxis.charts.editor.preview.caption': 'Visualização local derivada do contrato canônico, sem chamadas remotas.',
|
|
4403
|
+
'praxis.charts.editor.preview.invalid': 'A visualização fica indisponível enquanto houver erro bloqueante no contrato.',
|
|
4404
|
+
'praxis.charts.editor.issues.title': 'Problemas de validação',
|
|
4405
|
+
'praxis.charts.editor.issues.empty': 'Nenhum problema identificado.',
|
|
4125
4406
|
'praxis.charts.editor.appearance.featuresTitle': 'Recursos visuais',
|
|
4126
4407
|
'praxis.charts.editor.appearance.paletteTitle': 'Paleta',
|
|
4127
|
-
'praxis.charts.editor.appearance.paletteHint': 'Use cores separadas por
|
|
4408
|
+
'praxis.charts.editor.appearance.paletteHint': 'Use cores separadas por vírgula ou linha para persistir `theme.palette` como array canônico.',
|
|
4128
4409
|
'praxis.charts.editor.appearance.statesTitle': 'Mensagens de estado',
|
|
4129
|
-
'praxis.charts.editor.analytics.dimensionsTitle': '
|
|
4130
|
-
'praxis.charts.editor.analytics.metricsTitle': '
|
|
4131
|
-
'praxis.charts.editor.analytics.addDimension': 'Adicionar
|
|
4132
|
-
'praxis.charts.editor.analytics.addMetric': 'Adicionar
|
|
4133
|
-
'praxis.charts.editor.analytics.removeDimension': 'Remover
|
|
4134
|
-
'praxis.charts.editor.analytics.removeMetric': 'Remover
|
|
4135
|
-
'praxis.charts.editor.specialization.timeseriesTitle': '
|
|
4136
|
-
'praxis.charts.editor.specialization.distributionTitle': '
|
|
4410
|
+
'praxis.charts.editor.analytics.dimensionsTitle': 'Dimensões',
|
|
4411
|
+
'praxis.charts.editor.analytics.metricsTitle': 'Métricas',
|
|
4412
|
+
'praxis.charts.editor.analytics.addDimension': 'Adicionar dimensão',
|
|
4413
|
+
'praxis.charts.editor.analytics.addMetric': 'Adicionar métrica',
|
|
4414
|
+
'praxis.charts.editor.analytics.removeDimension': 'Remover dimensão',
|
|
4415
|
+
'praxis.charts.editor.analytics.removeMetric': 'Remover métrica',
|
|
4416
|
+
'praxis.charts.editor.specialization.timeseriesTitle': 'Opções de séries temporais',
|
|
4417
|
+
'praxis.charts.editor.specialization.distributionTitle': 'Opções de distribuição',
|
|
4137
4418
|
'praxis.charts.editor.specialization.comboTitle': 'Guia de combo',
|
|
4138
|
-
'praxis.charts.editor.specialization.comboHint': '
|
|
4139
|
-
'praxis.charts.editor.specialization.pieDonutTitle': 'Guia de
|
|
4140
|
-
'praxis.charts.editor.specialization.pieDonutHint': '
|
|
4141
|
-
'praxis.charts.editor.specialization.scatterTitle': 'Guia de scatter',
|
|
4142
|
-
'praxis.charts.editor.specialization.scatterHint': '
|
|
4419
|
+
'praxis.charts.editor.specialization.comboHint': 'Gráficos combo exigem pelo menos duas métricas e permitem configurar eixo e tipo de série por métrica.',
|
|
4420
|
+
'praxis.charts.editor.specialization.pieDonutTitle': 'Guia de composição',
|
|
4421
|
+
'praxis.charts.editor.specialization.pieDonutHint': 'Gráficos de pizza (pie) e rosca (donut) mantêm apenas a primeira métrica e usam a primeira dimensão como segmento categórico.',
|
|
4422
|
+
'praxis.charts.editor.specialization.scatterTitle': 'Guia de dispersão (scatter)',
|
|
4423
|
+
'praxis.charts.editor.specialization.scatterHint': 'Gráficos de dispersão usam a primeira dimensão como eixo X e a primeira métrica como eixo Y.',
|
|
4143
4424
|
'praxis.charts.editor.events.pointClickTitle': 'Clique no ponto',
|
|
4144
4425
|
'praxis.charts.editor.events.drillDownTitle': 'Drill down',
|
|
4145
4426
|
'praxis.charts.editor.events.none': 'Nenhuma',
|
|
4146
4427
|
'praxis.charts.editor.sourceKind.praxisStats': 'praxis.stats',
|
|
4147
|
-
'praxis.charts.editor.sourceKind.derived': '
|
|
4148
|
-
'praxis.charts.editor.operation.groupBy': '
|
|
4149
|
-
'praxis.charts.editor.operation.timeseries': '
|
|
4150
|
-
'praxis.charts.editor.operation.distribution': '
|
|
4151
|
-
'praxis.charts.editor.granularity.hour': '
|
|
4152
|
-
'praxis.charts.editor.granularity.day': '
|
|
4153
|
-
'praxis.charts.editor.granularity.week': '
|
|
4154
|
-
'praxis.charts.editor.granularity.month': '
|
|
4155
|
-
'praxis.charts.editor.granularity.quarter': '
|
|
4156
|
-
'praxis.charts.editor.granularity.year': '
|
|
4157
|
-
'praxis.charts.editor.distributionMode.terms': '
|
|
4158
|
-
'praxis.charts.editor.distributionMode.histogram': '
|
|
4428
|
+
'praxis.charts.editor.sourceKind.derived': 'derivado',
|
|
4429
|
+
'praxis.charts.editor.operation.groupBy': 'agrupar por',
|
|
4430
|
+
'praxis.charts.editor.operation.timeseries': 'série temporal',
|
|
4431
|
+
'praxis.charts.editor.operation.distribution': 'distribuição',
|
|
4432
|
+
'praxis.charts.editor.granularity.hour': 'hora',
|
|
4433
|
+
'praxis.charts.editor.granularity.day': 'dia',
|
|
4434
|
+
'praxis.charts.editor.granularity.week': 'semana',
|
|
4435
|
+
'praxis.charts.editor.granularity.month': 'mês',
|
|
4436
|
+
'praxis.charts.editor.granularity.quarter': 'trimestre',
|
|
4437
|
+
'praxis.charts.editor.granularity.year': 'ano',
|
|
4438
|
+
'praxis.charts.editor.distributionMode.terms': 'termos',
|
|
4439
|
+
'praxis.charts.editor.distributionMode.histogram': 'histograma',
|
|
4159
4440
|
'praxis.charts.editor.motionPreset.subtle': 'sutil',
|
|
4160
|
-
'praxis.charts.editor.motionPreset.standard': '
|
|
4441
|
+
'praxis.charts.editor.motionPreset.standard': 'padrão',
|
|
4161
4442
|
'praxis.charts.editor.motionPreset.expressive': 'expressivo',
|
|
4162
|
-
'praxis.charts.editor.dimensionRole.category': '
|
|
4163
|
-
'praxis.charts.editor.dimensionRole.series': '
|
|
4164
|
-
'praxis.charts.editor.dimensionRole.segment': '
|
|
4165
|
-
'praxis.charts.editor.dimensionRole.time': '
|
|
4166
|
-
'praxis.charts.editor.dimensionRole.value': '
|
|
4167
|
-
'praxis.charts.editor.metricAggregation.sum': '
|
|
4168
|
-
'praxis.charts.editor.metricAggregation.count': '
|
|
4169
|
-
'praxis.charts.editor.metricAggregation.avg': '
|
|
4170
|
-
'praxis.charts.editor.metricAggregation.min': '
|
|
4171
|
-
'praxis.charts.editor.metricAggregation.max': '
|
|
4172
|
-
'praxis.charts.editor.metricAxis.primary': '
|
|
4173
|
-
'praxis.charts.editor.metricAxis.secondary': '
|
|
4174
|
-
'praxis.charts.editor.metricSeriesKind.bar': '
|
|
4175
|
-
'praxis.charts.editor.metricSeriesKind.line': '
|
|
4176
|
-
'praxis.charts.editor.metricSeriesKind.area': '
|
|
4177
|
-
'praxis.charts.editor.eventAction.filter-widget': '
|
|
4178
|
-
'praxis.charts.editor.eventAction.open-detail': '
|
|
4179
|
-
'praxis.charts.editor.eventAction.navigate': '
|
|
4180
|
-
'praxis.charts.editor.eventAction.update-context': '
|
|
4181
|
-
'praxis.charts.editor.eventAction.emit': '
|
|
4182
|
-
'praxis.charts.editor.kind.bar': '
|
|
4183
|
-
'praxis.charts.editor.kind.horizontal-bar': 'Horizontal
|
|
4184
|
-
'praxis.charts.editor.kind.line': '
|
|
4185
|
-
'praxis.charts.editor.kind.area': '
|
|
4186
|
-
'praxis.charts.editor.kind.stacked-bar': '
|
|
4187
|
-
'praxis.charts.editor.kind.stacked-area': '
|
|
4188
|
-
'praxis.charts.editor.kind.combo': 'Combo',
|
|
4189
|
-
'praxis.charts.editor.kind.pie': 'Pie',
|
|
4190
|
-
'praxis.charts.editor.kind.donut': 'Donut',
|
|
4191
|
-
'praxis.charts.editor.kind.scatter': 'Scatter',
|
|
4443
|
+
'praxis.charts.editor.dimensionRole.category': 'categoria',
|
|
4444
|
+
'praxis.charts.editor.dimensionRole.series': 'série',
|
|
4445
|
+
'praxis.charts.editor.dimensionRole.segment': 'segmento',
|
|
4446
|
+
'praxis.charts.editor.dimensionRole.time': 'tempo',
|
|
4447
|
+
'praxis.charts.editor.dimensionRole.value': 'valor',
|
|
4448
|
+
'praxis.charts.editor.metricAggregation.sum': 'soma',
|
|
4449
|
+
'praxis.charts.editor.metricAggregation.count': 'contagem',
|
|
4450
|
+
'praxis.charts.editor.metricAggregation.avg': 'média',
|
|
4451
|
+
'praxis.charts.editor.metricAggregation.min': 'mínimo',
|
|
4452
|
+
'praxis.charts.editor.metricAggregation.max': 'máximo',
|
|
4453
|
+
'praxis.charts.editor.metricAxis.primary': 'primário',
|
|
4454
|
+
'praxis.charts.editor.metricAxis.secondary': 'secundário',
|
|
4455
|
+
'praxis.charts.editor.metricSeriesKind.bar': 'barra',
|
|
4456
|
+
'praxis.charts.editor.metricSeriesKind.line': 'linha',
|
|
4457
|
+
'praxis.charts.editor.metricSeriesKind.area': 'área',
|
|
4458
|
+
'praxis.charts.editor.eventAction.filter-widget': 'filtrar widget',
|
|
4459
|
+
'praxis.charts.editor.eventAction.open-detail': 'abrir detalhes',
|
|
4460
|
+
'praxis.charts.editor.eventAction.navigate': 'navegar',
|
|
4461
|
+
'praxis.charts.editor.eventAction.update-context': 'atualizar contexto',
|
|
4462
|
+
'praxis.charts.editor.eventAction.emit': 'emitir',
|
|
4463
|
+
'praxis.charts.editor.kind.bar': 'Barra',
|
|
4464
|
+
'praxis.charts.editor.kind.horizontal-bar': 'Barra Horizontal',
|
|
4465
|
+
'praxis.charts.editor.kind.line': 'Linha',
|
|
4466
|
+
'praxis.charts.editor.kind.area': 'Área',
|
|
4467
|
+
'praxis.charts.editor.kind.stacked-bar': 'Barra Empilhada',
|
|
4468
|
+
'praxis.charts.editor.kind.stacked-area': 'Área Empilhada',
|
|
4469
|
+
'praxis.charts.editor.kind.combo': 'Combinado (Combo)',
|
|
4470
|
+
'praxis.charts.editor.kind.pie': 'Pizza (Pie)',
|
|
4471
|
+
'praxis.charts.editor.kind.donut': 'Rosca (Donut)',
|
|
4472
|
+
'praxis.charts.editor.kind.scatter': 'Dispersão (Scatter)',
|
|
4192
4473
|
};
|
|
4193
4474
|
|
|
4194
4475
|
const PRAXIS_CHARTS_I18N = new InjectionToken('PRAXIS_CHARTS_I18N', {
|
|
@@ -4999,5 +5280,4 @@ var praxisChartConfigEditor = /*#__PURE__*/Object.freeze({
|
|
|
4999
5280
|
* Generated bundle index. Do not edit.
|
|
5000
5281
|
*/
|
|
5001
5282
|
|
|
5002
|
-
export { ChartContractNormalizerService, ChartContractValidationService, ChartEditorDefaultsService, ChartEditorPreviewMapperService, PRAXIS_CHARTS_I18N, PRAXIS_CHART_BACKEND_MOCK_BAR, PRAXIS_CHART_BACKEND_MOCK_COMBO, PRAXIS_CHART_BACKEND_MOCK_DONUT, PRAXIS_CHART_BACKEND_MOCK_HORIZONTAL_BAR, PRAXIS_CHART_BACKEND_MOCK_MULTI_METRIC_BAR, PRAXIS_CHART_BACKEND_MOCK_SCATTER, PRAXIS_CHART_BACKEND_MOCK_STACKED_AREA, PRAXIS_CHART_BACKEND_MOCK_TIMESERIES, PRAXIS_CHART_COMPONENT_METADATA, PRAXIS_CHART_DRILLDOWN_DATA_BY_MONTH, PRAXIS_CHART_DRILLDOWN_PANEL_METADATA, PRAXIS_CHART_ENGINE, PRAXIS_CHART_STATE_PROBE_COMPONENT_METADATA, PraxisChartBackendPayloadAdapterService, PraxisChartCanonicalContractMapperService, PraxisChartComponent, PraxisChartCompositionShowcaseComponent, PraxisChartConfigEditor, PraxisChartDataTransformerService, PraxisChartDrilldownPanelComponent, PraxisChartOptionBuilderService, PraxisChartSchemaMapperService, PraxisChartStateProbeComponent, PraxisChartStatsApiService, buildPraxisChartInteractiveCanvasPage, buildPraxisChartInteractiveWidgetPage, buildPraxisChartMockCanvasPage, buildPraxisChartMockWidgetPage, createPraxisChartsI18nConfig, providePraxisChartDrilldownPanelMetadata, providePraxisChartStateProbeMetadata, providePraxisCharts, providePraxisChartsI18n, providePraxisChartsMetadata, resolvePraxisChartsText };
|
|
5003
|
-
//# sourceMappingURL=praxisui-charts.mjs.map
|
|
5283
|
+
export { AnalyticsChartConfigAdapterService, AnalyticsChartContractService, ChartContractNormalizerService, ChartContractValidationService, ChartEditorDefaultsService, ChartEditorPreviewMapperService, PRAXIS_CHARTS_I18N, PRAXIS_CHART_BACKEND_MOCK_BAR, PRAXIS_CHART_BACKEND_MOCK_COMBO, PRAXIS_CHART_BACKEND_MOCK_DONUT, PRAXIS_CHART_BACKEND_MOCK_HORIZONTAL_BAR, PRAXIS_CHART_BACKEND_MOCK_MULTI_METRIC_BAR, PRAXIS_CHART_BACKEND_MOCK_SCATTER, PRAXIS_CHART_BACKEND_MOCK_STACKED_AREA, PRAXIS_CHART_BACKEND_MOCK_TIMESERIES, PRAXIS_CHART_COMPONENT_METADATA, PRAXIS_CHART_DRILLDOWN_DATA_BY_MONTH, PRAXIS_CHART_DRILLDOWN_PANEL_METADATA, PRAXIS_CHART_ENGINE, PRAXIS_CHART_STATE_PROBE_COMPONENT_METADATA, PraxisChartBackendPayloadAdapterService, PraxisChartCanonicalContractMapperService, PraxisChartComponent, PraxisChartCompositionShowcaseComponent, PraxisChartConfigEditor, PraxisChartDataTransformerService, PraxisChartDrilldownPanelComponent, PraxisChartOptionBuilderService, PraxisChartSchemaMapperService, PraxisChartStateProbeComponent, PraxisChartStatsApiService, buildPraxisChartInteractiveCanvasPage, buildPraxisChartInteractiveWidgetPage, buildPraxisChartMockCanvasPage, buildPraxisChartMockWidgetPage, createPraxisChartsI18nConfig, providePraxisChartDrilldownPanelMetadata, providePraxisChartStateProbeMetadata, providePraxisCharts, providePraxisChartsI18n, providePraxisChartsMetadata, resolvePraxisChartsText };
|