@praxisui/charts 9.0.49 → 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-
|
|
3
|
+
"generatedAt": "2026-08-31T16:32:43.469Z",
|
|
4
4
|
"packageName": "@praxisui/charts",
|
|
5
|
-
"packageVersion": "9.0.
|
|
5
|
+
"packageVersion": "9.0.51",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 3,
|
|
@@ -1914,6 +1914,7 @@ class PraxisChartComponent {
|
|
|
1914
1914
|
mappedRuntimeConfig = signal(null, ...(ngDevMode ? [{ debugName: "mappedRuntimeConfig" }] : /* istanbul ignore next */ []));
|
|
1915
1915
|
chartDocumentMappingError = signal(null, ...(ngDevMode ? [{ debugName: "chartDocumentMappingError" }] : /* istanbul ignore next */ []));
|
|
1916
1916
|
activeSelectionSignature = signal(null, ...(ngDevMode ? [{ debugName: "activeSelectionSignature" }] : /* istanbul ignore next */ []));
|
|
1917
|
+
configEditorContextPending = signal(false, ...(ngDevMode ? [{ debugName: "configEditorContextPending" }] : /* istanbul ignore next */ []));
|
|
1917
1918
|
showAccessibleData = signal(false, ...(ngDevMode ? [{ debugName: "showAccessibleData" }] : /* istanbul ignore next */ []));
|
|
1918
1919
|
accessibilityPanelId = `praxis-chart-data-${++chartAccessibilityPanelSequence}`;
|
|
1919
1920
|
accessibilityPanelTitleId = `${this.accessibilityPanelId}-title`;
|
|
@@ -2307,51 +2308,65 @@ class PraxisChartComponent {
|
|
|
2307
2308
|
return this.enableCustomization() && !!this.settingsPanel && !!this.runtimeChartDocument();
|
|
2308
2309
|
}
|
|
2309
2310
|
async openConfigEditor() {
|
|
2310
|
-
if (!this.settingsPanel) {
|
|
2311
|
+
if (!this.settingsPanel || this.configEditorContextPending()) {
|
|
2311
2312
|
return;
|
|
2312
2313
|
}
|
|
2313
2314
|
const document = this.runtimeChartDocument();
|
|
2314
2315
|
if (!document) {
|
|
2315
2316
|
return;
|
|
2316
2317
|
}
|
|
2317
|
-
const
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2318
|
+
const focusReturnTarget = this.captureFocusReturnTarget();
|
|
2319
|
+
this.configEditorContextPending.set(true);
|
|
2320
|
+
try {
|
|
2321
|
+
const resolvedContext = await this.resolveConfigEditorContext(document);
|
|
2322
|
+
const { PraxisChartConfigEditor } = await Promise.resolve().then(function () { return praxisChartConfigEditor; });
|
|
2323
|
+
this.clearEditorSessionSubscriptions();
|
|
2324
|
+
const ref = this.settingsPanel.open({
|
|
2325
|
+
id: `chart.${document.chartId || this.effectiveConfig().id || 'praxis-chart'}`,
|
|
2326
|
+
title: this.editChartLabel(),
|
|
2327
|
+
content: {
|
|
2328
|
+
component: PraxisChartConfigEditor,
|
|
2329
|
+
inputs: {
|
|
2330
|
+
chartDocument: document,
|
|
2331
|
+
document,
|
|
2332
|
+
mode: 'edit',
|
|
2333
|
+
readonly: false,
|
|
2334
|
+
availableResources: this.resolveEditorOptions(this.availableResources(), resolvedContext['availableResources']),
|
|
2335
|
+
availableFields: this.resolveEditorOptions(this.availableFields(), resolvedContext['availableFields']),
|
|
2336
|
+
availableTargets: this.resolveEditorOptions(this.availableTargets(), resolvedContext['availableTargets']),
|
|
2337
|
+
},
|
|
2333
2338
|
},
|
|
2334
|
-
}
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2339
|
+
});
|
|
2340
|
+
const appliedSubscription = ref.applied$
|
|
2341
|
+
.subscribe((nextDocument) => {
|
|
2342
|
+
if (!nextDocument) {
|
|
2343
|
+
return;
|
|
2344
|
+
}
|
|
2345
|
+
const clone = structuredClone(nextDocument);
|
|
2346
|
+
this.runtimeChartDocument.set(clone);
|
|
2347
|
+
this.chartDocumentApplied.emit(clone);
|
|
2348
|
+
});
|
|
2349
|
+
const savedSubscription = ref.saved$
|
|
2350
|
+
.subscribe((nextDocument) => {
|
|
2351
|
+
if (!nextDocument) {
|
|
2352
|
+
return;
|
|
2353
|
+
}
|
|
2354
|
+
const clone = structuredClone(nextDocument);
|
|
2355
|
+
this.runtimeChartDocument.set(clone);
|
|
2356
|
+
this.chartDocumentSaved.emit(clone);
|
|
2357
|
+
});
|
|
2358
|
+
const closedSubscription = ref.closed$?.subscribe(() => {
|
|
2359
|
+
this.restoreFocus(focusReturnTarget);
|
|
2360
|
+
});
|
|
2361
|
+
this.editorSessionSubscriptions = [
|
|
2362
|
+
appliedSubscription,
|
|
2363
|
+
savedSubscription,
|
|
2364
|
+
...(closedSubscription ? [closedSubscription] : []),
|
|
2365
|
+
];
|
|
2366
|
+
}
|
|
2367
|
+
finally {
|
|
2368
|
+
this.configEditorContextPending.set(false);
|
|
2369
|
+
}
|
|
2355
2370
|
}
|
|
2356
2371
|
async resolveConfigEditorContext(document) {
|
|
2357
2372
|
const metadata = this.componentMetadataRegistry.get('praxis-chart');
|
|
@@ -2384,6 +2399,24 @@ class PraxisChartComponent {
|
|
|
2384
2399
|
}
|
|
2385
2400
|
return Array.isArray(resolvedOptions) ? resolvedOptions : [];
|
|
2386
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
|
+
}
|
|
2387
2420
|
isConfigEditorContextResult(value) {
|
|
2388
2421
|
const record = this.asRecord(value);
|
|
2389
2422
|
return !!record && ('context' in record || 'diagnostics' in record);
|
|
@@ -2840,6 +2873,8 @@ class PraxisChartComponent {
|
|
|
2840
2873
|
size="compact"
|
|
2841
2874
|
appearance="filled"
|
|
2842
2875
|
type="button"
|
|
2876
|
+
[busy]="configEditorContextPending()"
|
|
2877
|
+
[disabled]="configEditorContextPending()"
|
|
2843
2878
|
[attr.aria-label]="editChartLabel()"
|
|
2844
2879
|
[matTooltip]="editChartLabel()"
|
|
2845
2880
|
(click)="openConfigEditor()"
|
|
@@ -2980,6 +3015,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
2980
3015
|
size="compact"
|
|
2981
3016
|
appearance="filled"
|
|
2982
3017
|
type="button"
|
|
3018
|
+
[busy]="configEditorContextPending()"
|
|
3019
|
+
[disabled]="configEditorContextPending()"
|
|
2983
3020
|
[attr.aria-label]="editChartLabel()"
|
|
2984
3021
|
[matTooltip]="editChartLabel()"
|
|
2985
3022
|
(click)="openConfigEditor()"
|
|
@@ -7076,7 +7113,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
7076
7113
|
}] });
|
|
7077
7114
|
|
|
7078
7115
|
class PraxisChartConfigEditorContextResolverService {
|
|
7079
|
-
static
|
|
7116
|
+
static CATALOG_REQUEST_TIMEOUT_MS = 30_000;
|
|
7117
|
+
static CAPABILITY_REQUEST_TIMEOUT_MS = 10_000;
|
|
7080
7118
|
discovery = inject(ResourceDiscoveryService);
|
|
7081
7119
|
capabilityAdapter = inject(ChartResourceCapabilityCatalogAdapter);
|
|
7082
7120
|
targetAdapter = inject(ChartCompositionTargetCatalogAdapter);
|
|
@@ -7249,7 +7287,7 @@ class PraxisChartConfigEditorContextResolverService {
|
|
|
7249
7287
|
return cached.promise;
|
|
7250
7288
|
}
|
|
7251
7289
|
let request;
|
|
7252
|
-
const promise = firstValueFrom(this.discovery.getSchemaCatalog().pipe(timeout(PraxisChartConfigEditorContextResolverService.
|
|
7290
|
+
const promise = firstValueFrom(this.discovery.getSchemaCatalog().pipe(timeout(PraxisChartConfigEditorContextResolverService.CATALOG_REQUEST_TIMEOUT_MS)))
|
|
7253
7291
|
.then((catalog) => this.projectCatalog(catalog))
|
|
7254
7292
|
.finally(() => {
|
|
7255
7293
|
if (this.catalogProjectionRequest === request) {
|
|
@@ -7348,7 +7386,7 @@ class PraxisChartConfigEditorContextResolverService {
|
|
|
7348
7386
|
return cached.promise;
|
|
7349
7387
|
}
|
|
7350
7388
|
let request;
|
|
7351
|
-
const promise = firstValueFrom(this.discovery.getCapabilitiesByUrl(candidate.capabilitiesHref).pipe(timeout(PraxisChartConfigEditorContextResolverService.
|
|
7389
|
+
const promise = firstValueFrom(this.discovery.getCapabilitiesByUrl(candidate.capabilitiesHref).pipe(timeout(PraxisChartConfigEditorContextResolverService.CAPABILITY_REQUEST_TIMEOUT_MS)))
|
|
7352
7390
|
.finally(() => {
|
|
7353
7391
|
if (this.capabilityRequests.get(key) === request) {
|
|
7354
7392
|
this.capabilityRequests.delete(key);
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/charts",
|
|
3
|
-
"version": "9.0.
|
|
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.
|
|
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.
|
|
11
|
+
"@praxisui/table": "^9.0.51",
|
|
12
12
|
"rxjs": "~7.8.0"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
@@ -598,6 +598,7 @@ declare class PraxisChartComponent {
|
|
|
598
598
|
private readonly mappedRuntimeConfig;
|
|
599
599
|
private readonly chartDocumentMappingError;
|
|
600
600
|
private readonly activeSelectionSignature;
|
|
601
|
+
protected readonly configEditorContextPending: _angular_core.WritableSignal<boolean>;
|
|
601
602
|
readonly showAccessibleData: _angular_core.WritableSignal<boolean>;
|
|
602
603
|
readonly accessibilityPanelId: string;
|
|
603
604
|
readonly accessibilityPanelTitleId: string;
|
|
@@ -652,6 +653,8 @@ declare class PraxisChartComponent {
|
|
|
652
653
|
openConfigEditor(): Promise<void>;
|
|
653
654
|
private resolveConfigEditorContext;
|
|
654
655
|
private resolveEditorOptions;
|
|
656
|
+
private captureFocusReturnTarget;
|
|
657
|
+
private restoreFocus;
|
|
655
658
|
private isConfigEditorContextResult;
|
|
656
659
|
private asRecord;
|
|
657
660
|
private handlePointClick;
|