@praxisui/charts 9.0.30 → 9.0.31
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-28T17:36:46.890Z",
|
|
4
4
|
"packageName": "@praxisui/charts",
|
|
5
|
-
"packageVersion": "9.0.
|
|
5
|
+
"packageVersion": "9.0.31",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 3,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, Optional, Inject, InjectionToken, input, booleanAttribute, output, viewChild, inject, ElementRef, NgZone, DestroyRef, signal, computed, afterNextRender, effect, ChangeDetectionStrategy, Component, ViewChild, Input, Injector, ENVIRONMENT_INITIALIZER } from '@angular/core';
|
|
3
3
|
import * as i1 from '@praxisui/core';
|
|
4
|
-
import { buildApiUrl, API_URL, PraxisI18nService, SETTINGS_PANEL_BRIDGE, normalizePraxisDataQueryContext, resolvePraxisFilterCriteria, BUILTIN_PAGE_THEME_PRESETS, PraxisIconButtonComponent, normalizePraxisPresentationVisualization, AnalyticsStatsRequestBuilderService, AnalyticsPresentationResolver, providePraxisI18n,
|
|
4
|
+
import { buildApiUrl, API_URL, PraxisI18nService, ComponentMetadataRegistry, SETTINGS_PANEL_BRIDGE, normalizePraxisDataQueryContext, resolvePraxisFilterCriteria, BUILTIN_PAGE_THEME_PRESETS, PraxisIconButtonComponent, normalizePraxisPresentationVisualization, AnalyticsStatsRequestBuilderService, AnalyticsPresentationResolver, providePraxisI18n, ResourceDiscoveryService, SETTINGS_PANEL_DATA, createDefaultTableConfig, PRAXIS_TABLE_DETAIL_INLINE_RENDERERS, DynamicWidgetPageComponent } from '@praxisui/core';
|
|
5
5
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
6
|
import { throwError, map, of, isObservable, from, firstValueFrom, timeout, BehaviorSubject, Subscription } from 'rxjs';
|
|
7
7
|
import * as i1$2 from '@angular/material/tooltip';
|
|
@@ -1705,6 +1705,7 @@ class PraxisChartComponent {
|
|
|
1705
1705
|
statsApi = inject(PraxisChartStatsApiService);
|
|
1706
1706
|
i18n = inject(PraxisI18nService);
|
|
1707
1707
|
ngZone = inject(NgZone);
|
|
1708
|
+
componentMetadataRegistry = inject(ComponentMetadataRegistry);
|
|
1708
1709
|
settingsPanel = inject(SETTINGS_PANEL_BRIDGE, { optional: true });
|
|
1709
1710
|
destroyRef = inject(DestroyRef);
|
|
1710
1711
|
resizeObserver = signal(null, ...(ngDevMode ? [{ debugName: "resizeObserver" }] : /* istanbul ignore next */ []));
|
|
@@ -2047,6 +2048,7 @@ class PraxisChartComponent {
|
|
|
2047
2048
|
if (!document) {
|
|
2048
2049
|
return;
|
|
2049
2050
|
}
|
|
2051
|
+
const resolvedContext = await this.resolveConfigEditorContext(document);
|
|
2050
2052
|
const { PraxisChartConfigEditor } = await Promise.resolve().then(function () { return praxisChartConfigEditor; });
|
|
2051
2053
|
this.clearEditorSessionSubscriptions();
|
|
2052
2054
|
const ref = this.settingsPanel.open({
|
|
@@ -2059,9 +2061,9 @@ class PraxisChartComponent {
|
|
|
2059
2061
|
document,
|
|
2060
2062
|
mode: 'edit',
|
|
2061
2063
|
readonly: false,
|
|
2062
|
-
availableResources: this.availableResources(),
|
|
2063
|
-
availableFields: this.availableFields(),
|
|
2064
|
-
availableTargets: this.availableTargets(),
|
|
2064
|
+
availableResources: this.resolveEditorOptions(this.availableResources(), resolvedContext['availableResources']),
|
|
2065
|
+
availableFields: this.resolveEditorOptions(this.availableFields(), resolvedContext['availableFields']),
|
|
2066
|
+
availableTargets: this.resolveEditorOptions(this.availableTargets(), resolvedContext['availableTargets']),
|
|
2065
2067
|
},
|
|
2066
2068
|
},
|
|
2067
2069
|
});
|
|
@@ -2085,6 +2087,46 @@ class PraxisChartComponent {
|
|
|
2085
2087
|
});
|
|
2086
2088
|
this.editorSessionSubscriptions = [appliedSubscription, savedSubscription];
|
|
2087
2089
|
}
|
|
2090
|
+
async resolveConfigEditorContext(document) {
|
|
2091
|
+
const metadata = this.componentMetadataRegistry.get('praxis-chart');
|
|
2092
|
+
const resolver = metadata?.configEditor?.contextResolver;
|
|
2093
|
+
if (!metadata || !resolver) {
|
|
2094
|
+
return {};
|
|
2095
|
+
}
|
|
2096
|
+
try {
|
|
2097
|
+
const resolved = await resolver({
|
|
2098
|
+
componentId: metadata.id,
|
|
2099
|
+
widgetKey: document.chartId || this.effectiveConfig().id || 'praxis-chart',
|
|
2100
|
+
widgetType: metadata.id,
|
|
2101
|
+
persistedInputs: {
|
|
2102
|
+
chartDocument: structuredClone(document),
|
|
2103
|
+
},
|
|
2104
|
+
metadata,
|
|
2105
|
+
});
|
|
2106
|
+
const candidate = this.isConfigEditorContextResult(resolved)
|
|
2107
|
+
? resolved['context']
|
|
2108
|
+
: resolved;
|
|
2109
|
+
return this.asRecord(candidate) ?? {};
|
|
2110
|
+
}
|
|
2111
|
+
catch {
|
|
2112
|
+
return {};
|
|
2113
|
+
}
|
|
2114
|
+
}
|
|
2115
|
+
resolveEditorOptions(explicitOptions, resolvedOptions) {
|
|
2116
|
+
if (explicitOptions.length) {
|
|
2117
|
+
return explicitOptions;
|
|
2118
|
+
}
|
|
2119
|
+
return Array.isArray(resolvedOptions) ? resolvedOptions : [];
|
|
2120
|
+
}
|
|
2121
|
+
isConfigEditorContextResult(value) {
|
|
2122
|
+
const record = this.asRecord(value);
|
|
2123
|
+
return !!record && ('context' in record || 'diagnostics' in record);
|
|
2124
|
+
}
|
|
2125
|
+
asRecord(value) {
|
|
2126
|
+
return value && typeof value === 'object' && !Array.isArray(value)
|
|
2127
|
+
? value
|
|
2128
|
+
: null;
|
|
2129
|
+
}
|
|
2088
2130
|
handlePointClick(event) {
|
|
2089
2131
|
this.pointClick.emit(event);
|
|
2090
2132
|
const config = this.renderConfig();
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/charts",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.31",
|
|
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.
|
|
8
|
+
"@praxisui/core": "^9.0.31",
|
|
9
9
|
"@angular/forms": "^21.0.0",
|
|
10
10
|
"@angular/material": "^21.0.0",
|
|
11
|
-
"@praxisui/table": "^9.0.
|
|
11
|
+
"@praxisui/table": "^9.0.31",
|
|
12
12
|
"rxjs": "~7.8.0"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
@@ -491,6 +491,7 @@ declare class PraxisChartComponent {
|
|
|
491
491
|
private readonly statsApi;
|
|
492
492
|
private readonly i18n;
|
|
493
493
|
private readonly ngZone;
|
|
494
|
+
private readonly componentMetadataRegistry;
|
|
494
495
|
private readonly settingsPanel;
|
|
495
496
|
private readonly destroyRef;
|
|
496
497
|
private readonly resizeObserver;
|
|
@@ -541,6 +542,10 @@ declare class PraxisChartComponent {
|
|
|
541
542
|
constructor();
|
|
542
543
|
canOpenConfigEditor(): boolean;
|
|
543
544
|
openConfigEditor(): Promise<void>;
|
|
545
|
+
private resolveConfigEditorContext;
|
|
546
|
+
private resolveEditorOptions;
|
|
547
|
+
private isConfigEditorContextResult;
|
|
548
|
+
private asRecord;
|
|
544
549
|
private handlePointClick;
|
|
545
550
|
private buildSelectionEvent;
|
|
546
551
|
private buildEventFilters;
|