@praxisui/core 10.0.0-rc.43 → 10.0.0-rc.44
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 +30 -12
- package/ai/component-registry.json +2 -2
- package/fesm2022/praxisui-core-schema.mjs +9 -5
- package/fesm2022/praxisui-core.mjs +1554 -757
- package/package.json +1 -1
- package/types/praxisui-core.d.ts +131 -59
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, InjectionToken, APP_INITIALIZER, inject, Injectable, assertInInjectionContext, Inject, Optional, SkipSelf, makeEnvironmentProviders, signal, computed, ErrorHandler, Injector,
|
|
2
|
+
import { Component, InjectionToken, APP_INITIALIZER, inject, Injectable, assertInInjectionContext, Inject, Optional, SkipSelf, makeEnvironmentProviders, signal, computed, DestroyRef, ErrorHandler, Injector, ENVIRONMENT_INITIALIZER, isSignal, Input, Directive, input, booleanAttribute, ChangeDetectionStrategy, EventEmitter, Output, SecurityContext, ViewContainerRef, effect, untracked, SimpleChange, ElementRef, ChangeDetectorRef, afterEveryRender, contentChild, viewChild, HostBinding, output, afterNextRender, ViewChild, ViewEncapsulation, createEnvironmentInjector, EnvironmentInjector, reflectComponentType, HostListener, ViewChildren, forwardRef, TemplateRef, Renderer2 } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common/http';
|
|
4
4
|
import { HttpHeaders, HttpClient, HttpParams, HttpResponse, HttpContextToken, HttpErrorResponse, HTTP_INTERCEPTORS, withInterceptors } from '@angular/common/http';
|
|
5
5
|
import { BehaviorSubject, firstValueFrom, of, defer, throwError, from, EMPTY, Subject, finalize as finalize$1, shareReplay as shareReplay$1, tap as tap$1, map as map$1, switchMap as switchMap$1, Observable, timer, catchError as catchError$1, forkJoin, isObservable, combineLatest, merge, Subscription, defaultIfEmpty, timeout as timeout$1 } from 'rxjs';
|
|
@@ -2726,13 +2726,17 @@ function resolveFieldQuickViewBinding(candidate) {
|
|
|
2726
2726
|
candidate.optionSource.valuePropertyPath.trim().length > 0
|
|
2727
2727
|
? candidate.optionSource.valuePropertyPath.trim()
|
|
2728
2728
|
: 'id';
|
|
2729
|
-
// Quando o campo possui optionSource e seu nome não
|
|
2730
|
-
// optionValueProperty (
|
|
2731
|
-
// campo irmão
|
|
2729
|
+
// Quando o campo possui optionSource e seu nome não coincide com rawValueField, um valueField
|
|
2730
|
+
// igual a 'id'/'value'/'key' ou a optionValueProperty (ex.: 'numero', 'codigo') refere-se à
|
|
2731
|
+
// chave do OptionDTO e nunca ao campo irmão 'id' do registro pai.
|
|
2732
|
+
const isOptionKeyAlias = rawValueField === 'id' ||
|
|
2733
|
+
rawValueField === 'value' ||
|
|
2734
|
+
rawValueField === 'key' ||
|
|
2735
|
+
rawValueField === optionValueProperty;
|
|
2732
2736
|
const effectiveSiblingValueField = rawValueField &&
|
|
2733
2737
|
(!candidate.optionSource ||
|
|
2734
|
-
fieldName ===
|
|
2735
|
-
|
|
2738
|
+
fieldName === rawValueField ||
|
|
2739
|
+
!isOptionKeyAlias)
|
|
2736
2740
|
? rawValueField
|
|
2737
2741
|
: '';
|
|
2738
2742
|
const refCandidate = candidate.resourceReference?.resourceKey
|
|
@@ -18193,6 +18197,8 @@ class ResourceDiscoveryService {
|
|
|
18193
18197
|
return inject(EnterpriseRuntimeContextService, { optional: true });
|
|
18194
18198
|
})();
|
|
18195
18199
|
surfaceCatalogInFlightByHref = new Map();
|
|
18200
|
+
actionCatalogInFlightByHref = new Map();
|
|
18201
|
+
capabilitySnapshotInFlightByHref = new Map();
|
|
18196
18202
|
schemaCatalogInFlightByUrl = new Map();
|
|
18197
18203
|
schemaFieldsInFlightByUrl = new Map();
|
|
18198
18204
|
/**
|
|
@@ -18255,7 +18261,19 @@ class ResourceDiscoveryService {
|
|
|
18255
18261
|
return request;
|
|
18256
18262
|
}
|
|
18257
18263
|
getActions(source, options) {
|
|
18258
|
-
|
|
18264
|
+
const href = this.requireLinkHref(source, 'actions', options);
|
|
18265
|
+
const existing = this.actionCatalogInFlightByHref.get(href);
|
|
18266
|
+
if (existing) {
|
|
18267
|
+
return existing;
|
|
18268
|
+
}
|
|
18269
|
+
let request;
|
|
18270
|
+
request = this.fetchJson(href, options).pipe(finalize$1(() => {
|
|
18271
|
+
if (this.actionCatalogInFlightByHref.get(href) === request) {
|
|
18272
|
+
this.actionCatalogInFlightByHref.delete(href);
|
|
18273
|
+
}
|
|
18274
|
+
}), shareReplay$1({ bufferSize: 1, refCount: true }));
|
|
18275
|
+
this.actionCatalogInFlightByHref.set(href, request);
|
|
18276
|
+
return request;
|
|
18259
18277
|
}
|
|
18260
18278
|
getActionsByResourceKey(resourceKey, options) {
|
|
18261
18279
|
const normalizedResourceKey = resourceKey.trim();
|
|
@@ -18268,10 +18286,22 @@ class ResourceDiscoveryService {
|
|
|
18268
18286
|
return this.http.get(this.resolveHref('/schemas/actions', options), { params: new HttpParams().set('resource', normalizedResourceKey) });
|
|
18269
18287
|
}
|
|
18270
18288
|
getCapabilities(source, options) {
|
|
18271
|
-
return this.
|
|
18289
|
+
return this.getCapabilitiesByUrl(this.requireLinkHref(source, 'capabilities', options), options);
|
|
18272
18290
|
}
|
|
18273
18291
|
getCapabilitiesByUrl(href, options) {
|
|
18274
|
-
|
|
18292
|
+
const resolvedHref = this.resolveHref(href, options);
|
|
18293
|
+
const existing = this.capabilitySnapshotInFlightByHref.get(resolvedHref);
|
|
18294
|
+
if (existing) {
|
|
18295
|
+
return existing;
|
|
18296
|
+
}
|
|
18297
|
+
let request;
|
|
18298
|
+
request = this.fetchJson(resolvedHref, options).pipe(finalize$1(() => {
|
|
18299
|
+
if (this.capabilitySnapshotInFlightByHref.get(resolvedHref) === request) {
|
|
18300
|
+
this.capabilitySnapshotInFlightByHref.delete(resolvedHref);
|
|
18301
|
+
}
|
|
18302
|
+
}), shareReplay$1({ bufferSize: 1, refCount: true }));
|
|
18303
|
+
this.capabilitySnapshotInFlightByHref.set(resolvedHref, request);
|
|
18304
|
+
return request;
|
|
18275
18305
|
}
|
|
18276
18306
|
getSchemaCatalog(query = {}, options) {
|
|
18277
18307
|
if (!this.http) {
|
|
@@ -21091,6 +21121,9 @@ class ResourceSurfaceOpenAdapterService {
|
|
|
21091
21121
|
? this.discovery.resolveHref(surface.path, discoveryOptions)
|
|
21092
21122
|
: null;
|
|
21093
21123
|
const resolvedReadUrl = this.resolveItemHydrationReadUrl(surface, resourcePath, discoveryOptions);
|
|
21124
|
+
const relatedSurfaces = this.isReadableItemSurface(surface) && !surface.relatedResource
|
|
21125
|
+
? this.extractRelatedSurfaces(options.relatedSurfaces, surface.id)
|
|
21126
|
+
: [];
|
|
21094
21127
|
const basePayload = this.buildBasePayload(surface);
|
|
21095
21128
|
const payload = {
|
|
21096
21129
|
...basePayload,
|
|
@@ -21125,6 +21158,7 @@ class ResourceSurfaceOpenAdapterService {
|
|
|
21125
21158
|
tags: surface.tags,
|
|
21126
21159
|
relatedResource: surface.relatedResource ?? null,
|
|
21127
21160
|
},
|
|
21161
|
+
...(relatedSurfaces.length > 0 ? { relatedSurfaces } : {}),
|
|
21128
21162
|
},
|
|
21129
21163
|
};
|
|
21130
21164
|
if (basePayload.widget.id === 'praxis-table') {
|
|
@@ -21177,6 +21211,35 @@ class ResourceSurfaceOpenAdapterService {
|
|
|
21177
21211
|
}
|
|
21178
21212
|
return payload;
|
|
21179
21213
|
}
|
|
21214
|
+
extractRelatedSurfaces(surfaces, activeSurfaceId) {
|
|
21215
|
+
if (!Array.isArray(surfaces) || surfaces.length === 0) {
|
|
21216
|
+
return [];
|
|
21217
|
+
}
|
|
21218
|
+
const normalizedActiveId = String(activeSurfaceId ?? '').trim();
|
|
21219
|
+
return surfaces
|
|
21220
|
+
.filter((candidate) => {
|
|
21221
|
+
if (!candidate || typeof candidate !== 'object') {
|
|
21222
|
+
return false;
|
|
21223
|
+
}
|
|
21224
|
+
const id = String(candidate.id ?? '').trim();
|
|
21225
|
+
if (!id || id === normalizedActiveId) {
|
|
21226
|
+
return false;
|
|
21227
|
+
}
|
|
21228
|
+
if (candidate.scope !== 'ITEM' || candidate.availability?.allowed !== true) {
|
|
21229
|
+
return false;
|
|
21230
|
+
}
|
|
21231
|
+
const related = candidate.relatedResource;
|
|
21232
|
+
return Boolean(related &&
|
|
21233
|
+
typeof related.childResourceKey === 'string' &&
|
|
21234
|
+
related.childResourceKey.trim() &&
|
|
21235
|
+
typeof related.childResourcePath === 'string' &&
|
|
21236
|
+
related.childResourcePath.trim() &&
|
|
21237
|
+
typeof related.childParentField === 'string' &&
|
|
21238
|
+
related.childParentField.trim());
|
|
21239
|
+
})
|
|
21240
|
+
.slice()
|
|
21241
|
+
.sort((left, right) => (left.order ?? 0) - (right.order ?? 0));
|
|
21242
|
+
}
|
|
21180
21243
|
buildBasePayload(surface) {
|
|
21181
21244
|
const presetId = surface.scope === 'COLLECTION' && this.isCollectionView(surface.kind)
|
|
21182
21245
|
? 'praxis-table'
|
|
@@ -21283,6 +21346,8 @@ class ResourceRecordOpenError extends Error {
|
|
|
21283
21346
|
this.name = 'ResourceRecordOpenError';
|
|
21284
21347
|
}
|
|
21285
21348
|
}
|
|
21349
|
+
const METADATA_CACHE_TTL_MS = 60_000;
|
|
21350
|
+
const METADATA_CACHE_MAX_ENTRIES = 64;
|
|
21286
21351
|
/**
|
|
21287
21352
|
* Resolves a governed record-open reference into a contextual surface payload
|
|
21288
21353
|
* or an authorized read projection.
|
|
@@ -21295,6 +21360,37 @@ class ResourceRecordOpenService {
|
|
|
21295
21360
|
discovery = inject(ResourceDiscoveryService);
|
|
21296
21361
|
surfaceAdapter = inject(ResourceSurfaceOpenAdapterService);
|
|
21297
21362
|
schemaNormalizer = inject(SchemaNormalizerService);
|
|
21363
|
+
runtimeContext = inject(EnterpriseRuntimeContextService, {
|
|
21364
|
+
optional: true,
|
|
21365
|
+
});
|
|
21366
|
+
destroyRef = inject(DestroyRef, { optional: true });
|
|
21367
|
+
collectionCatalogCache = new Map();
|
|
21368
|
+
collectionCatalogInFlight = new Map();
|
|
21369
|
+
surfaceSchemaCache = new Map();
|
|
21370
|
+
surfaceSchemaInFlight = new Map();
|
|
21371
|
+
lastContextSignature = '';
|
|
21372
|
+
constructor() {
|
|
21373
|
+
this.lastContextSignature = this.computeContextSignature();
|
|
21374
|
+
const sub = this.runtimeContext?.contextChanges$.subscribe(() => {
|
|
21375
|
+
const nextSignature = this.computeContextSignature();
|
|
21376
|
+
if (nextSignature !== this.lastContextSignature) {
|
|
21377
|
+
this.lastContextSignature = nextSignature;
|
|
21378
|
+
this.clearCaches();
|
|
21379
|
+
}
|
|
21380
|
+
});
|
|
21381
|
+
if (sub && this.destroyRef) {
|
|
21382
|
+
this.destroyRef.onDestroy(() => sub.unsubscribe());
|
|
21383
|
+
}
|
|
21384
|
+
}
|
|
21385
|
+
/**
|
|
21386
|
+
* Clears cached collection surface catalogs and filtered response schemas.
|
|
21387
|
+
*/
|
|
21388
|
+
clearCaches() {
|
|
21389
|
+
this.collectionCatalogCache.clear();
|
|
21390
|
+
this.collectionCatalogInFlight.clear();
|
|
21391
|
+
this.surfaceSchemaCache.clear();
|
|
21392
|
+
this.surfaceSchemaInFlight.clear();
|
|
21393
|
+
}
|
|
21298
21394
|
resolve(reference, record, options) {
|
|
21299
21395
|
return this.discoverContextualSurface(reference, record, options).pipe(map$1((bundle) => bundle.resolution), catchError$1((error) => throwError(() => this.normalizeFailure(error))));
|
|
21300
21396
|
}
|
|
@@ -21307,81 +21403,149 @@ class ResourceRecordOpenService {
|
|
|
21307
21403
|
* 4. Filtered response schema in `surface.schemaUrl` + `ResourceIdentity`.
|
|
21308
21404
|
*/
|
|
21309
21405
|
resolveReadProjection(reference, record, options) {
|
|
21310
|
-
return this.discoverContextualSurface(reference, record, options).pipe(switchMap$1((bundle) => {
|
|
21311
|
-
const
|
|
21312
|
-
|
|
21313
|
-
|
|
21314
|
-
|
|
21315
|
-
|
|
21316
|
-
|
|
21317
|
-
|
|
21318
|
-
|
|
21319
|
-
|
|
21320
|
-
|
|
21321
|
-
|
|
21322
|
-
|
|
21323
|
-
|
|
21324
|
-
if (!unwrapped || Object.keys(unwrapped).length === 0) {
|
|
21325
|
-
throw new ResourceRecordOpenError('PROJECTION_EMPTY', `Read projection for surface "${surface.id}" returned an empty record.`);
|
|
21326
|
-
}
|
|
21327
|
-
return unwrapped;
|
|
21328
|
-
}), catchError$1((err) => {
|
|
21329
|
-
if (err instanceof ResourceRecordOpenError) {
|
|
21330
|
-
return throwError(() => err);
|
|
21331
|
-
}
|
|
21332
|
-
return throwError(() => new ResourceRecordOpenError('PROJECTION_READ_FAILED', `Failed to read projection from "${resolvedReadPath}".`, err));
|
|
21333
|
-
}));
|
|
21334
|
-
const schema$ = this.discovery
|
|
21335
|
-
.getSchemaByUrl(surface.schemaUrl, options)
|
|
21336
|
-
.pipe(map$1((rawSchema) => ({
|
|
21337
|
-
rawSchema: this.record(rawSchema),
|
|
21338
|
-
fields: this.schemaNormalizer.normalizeSchema(rawSchema),
|
|
21339
|
-
})), catchError$1((err) => throwError(() => new ResourceRecordOpenError('SCHEMA_READ_FAILED', `Failed to resolve filtered response schema from "${surface.schemaUrl}".`, err))));
|
|
21340
|
-
return forkJoin({
|
|
21341
|
-
projectionRecord: projectionRecord$,
|
|
21342
|
-
schema: schema$,
|
|
21343
|
-
}).pipe(map$1(({ projectionRecord, schema }) => {
|
|
21344
|
-
const resourceMeta = this.record(this.record(schema.rawSchema?.['x-ui'])?.['resource']);
|
|
21345
|
-
const idField = this.text(resourceMeta?.['idField']) || undefined;
|
|
21346
|
-
const identityResolution = resolveResourceIdentityContract({
|
|
21347
|
-
explicitIdentity: resourceMeta?.['identity'],
|
|
21348
|
-
resourceIdField: idField,
|
|
21349
|
-
resourceIdFieldValid: resourceMeta?.['idFieldValid'],
|
|
21350
|
-
resourceIdFieldMessage: resourceMeta?.['idFieldMessage'],
|
|
21351
|
-
effectiveIdField: bundle.canonicalReference.sourceIdentityField,
|
|
21352
|
-
availableFields: schema.fields.length
|
|
21353
|
-
? schema.fields
|
|
21354
|
-
: Object.keys(this.record(schema.rawSchema?.['properties']) ?? {}),
|
|
21355
|
-
});
|
|
21356
|
-
const identity = materializeResourceIdentity(identityResolution.contract, projectionRecord, schema.fields);
|
|
21357
|
-
return {
|
|
21358
|
-
...bundle.resolution,
|
|
21359
|
-
readUrl: resolvedReadPath,
|
|
21360
|
-
record: projectionRecord,
|
|
21361
|
-
rawSchema: schema.rawSchema,
|
|
21362
|
-
fields: schema.fields,
|
|
21363
|
-
identityContract: identityResolution.contract,
|
|
21364
|
-
identityDiagnostics: identityResolution.diagnostics,
|
|
21365
|
-
identity,
|
|
21366
|
-
contextualSurfaces: bundle.contextualCatalog.surfaces,
|
|
21406
|
+
return this.discoverContextualSurface(reference, record, options).pipe(switchMap$1((bundle) => this.resolveProjectionFromBundle(bundle, options).pipe(catchError$1((err) => {
|
|
21407
|
+
const fallbackSurfaceId = this.text(options?.fallbackSurfaceId);
|
|
21408
|
+
if (fallbackSurfaceId &&
|
|
21409
|
+
bundle.canonicalReference.target.surfaceId !== fallbackSurfaceId &&
|
|
21410
|
+
err instanceof ResourceRecordOpenError &&
|
|
21411
|
+
(err.code === 'PROJECTION_READ_FAILED' ||
|
|
21412
|
+
err.code === 'PROJECTION_EMPTY' ||
|
|
21413
|
+
err.code === 'SCHEMA_READ_FAILED')) {
|
|
21414
|
+
const fallbackRef = {
|
|
21415
|
+
sourceIdentityField: bundle.canonicalReference.sourceIdentityField,
|
|
21416
|
+
target: {
|
|
21417
|
+
resourceKey: bundle.canonicalReference.target.resourceKey,
|
|
21418
|
+
surfaceId: fallbackSurfaceId,
|
|
21419
|
+
},
|
|
21367
21420
|
};
|
|
21421
|
+
try {
|
|
21422
|
+
const fallbackResolution = this.materializeContextualSurface(bundle.contextualCatalog, bundle.resourceCatalog, fallbackRef, bundle.resourceId, options);
|
|
21423
|
+
return this.resolveProjectionFromBundle({
|
|
21424
|
+
...bundle,
|
|
21425
|
+
canonicalReference: fallbackRef,
|
|
21426
|
+
resolution: fallbackResolution,
|
|
21427
|
+
}, options);
|
|
21428
|
+
}
|
|
21429
|
+
catch (fallbackErr) {
|
|
21430
|
+
return throwError(() => this.normalizeFailure(fallbackErr));
|
|
21431
|
+
}
|
|
21432
|
+
}
|
|
21433
|
+
return throwError(() => err);
|
|
21434
|
+
}))), catchError$1((error) => throwError(() => this.normalizeFailure(error))));
|
|
21435
|
+
}
|
|
21436
|
+
resolveProjectionFromBundle(bundle, options) {
|
|
21437
|
+
const { surface, resourceId, resourcePath } = bundle.resolution;
|
|
21438
|
+
this.requireReadProjectionSurfaceContract(surface);
|
|
21439
|
+
const resolvedReadPath = this.interpolateItemPath(surface.path, resourceId);
|
|
21440
|
+
const itemPath = this.itemHref(resourcePath, resourceId);
|
|
21441
|
+
const sameAsItemEndpoint = this.normalizeComparablePath(resolvedReadPath) ===
|
|
21442
|
+
this.normalizeComparablePath(itemPath);
|
|
21443
|
+
const existingItemData = sameAsItemEndpoint
|
|
21444
|
+
? this.unwrapRecordObject(bundle.itemResponse)
|
|
21445
|
+
: null;
|
|
21446
|
+
const projectionRecord$ = existingItemData
|
|
21447
|
+
? of(existingItemData)
|
|
21448
|
+
: this.discovery.fetchJson(resolvedReadPath, options).pipe(map$1((rawProjection) => {
|
|
21449
|
+
const unwrapped = this.unwrapRecordObject(rawProjection);
|
|
21450
|
+
if (!unwrapped || Object.keys(unwrapped).length === 0) {
|
|
21451
|
+
throw new ResourceRecordOpenError('PROJECTION_EMPTY', `Read projection for surface "${surface.id}" returned an empty record.`);
|
|
21452
|
+
}
|
|
21453
|
+
return unwrapped;
|
|
21454
|
+
}), catchError$1((err) => {
|
|
21455
|
+
if (err instanceof ResourceRecordOpenError) {
|
|
21456
|
+
return throwError(() => err);
|
|
21457
|
+
}
|
|
21458
|
+
return throwError(() => new ResourceRecordOpenError('PROJECTION_READ_FAILED', `Failed to read projection from "${resolvedReadPath}".`, err));
|
|
21368
21459
|
}));
|
|
21369
|
-
|
|
21460
|
+
const schema$ = this.resolveSurfaceSchema(surface.schemaUrl, options);
|
|
21461
|
+
return forkJoin({
|
|
21462
|
+
projectionRecord: projectionRecord$,
|
|
21463
|
+
schema: schema$,
|
|
21464
|
+
}).pipe(map$1(({ projectionRecord, schema }) => {
|
|
21465
|
+
const resourceMeta = this.record(this.record(schema.rawSchema?.['x-ui'])?.['resource']);
|
|
21466
|
+
const idField = this.text(resourceMeta?.['idField']) || undefined;
|
|
21467
|
+
const identityResolution = resolveResourceIdentityContract({
|
|
21468
|
+
explicitIdentity: resourceMeta?.['identity'],
|
|
21469
|
+
resourceIdField: idField,
|
|
21470
|
+
resourceIdFieldValid: resourceMeta?.['idFieldValid'],
|
|
21471
|
+
resourceIdFieldMessage: resourceMeta?.['idFieldMessage'],
|
|
21472
|
+
effectiveIdField: bundle.canonicalReference.sourceIdentityField,
|
|
21473
|
+
availableFields: schema.fields.length
|
|
21474
|
+
? schema.fields
|
|
21475
|
+
: Object.keys(this.record(schema.rawSchema?.['properties']) ?? {}),
|
|
21476
|
+
});
|
|
21477
|
+
const identity = materializeResourceIdentity(identityResolution.contract, projectionRecord, schema.fields);
|
|
21478
|
+
return {
|
|
21479
|
+
...bundle.resolution,
|
|
21480
|
+
readUrl: resolvedReadPath,
|
|
21481
|
+
record: projectionRecord,
|
|
21482
|
+
rawSchema: schema.rawSchema,
|
|
21483
|
+
fields: schema.fields,
|
|
21484
|
+
identityContract: identityResolution.contract,
|
|
21485
|
+
identityDiagnostics: identityResolution.diagnostics,
|
|
21486
|
+
identity,
|
|
21487
|
+
contextualSurfaces: bundle.contextualCatalog.surfaces,
|
|
21488
|
+
};
|
|
21489
|
+
}));
|
|
21370
21490
|
}
|
|
21371
21491
|
discoverContextualSurface(reference, record, options) {
|
|
21372
21492
|
return defer(() => {
|
|
21373
21493
|
const canonicalReference = this.requireReference(reference);
|
|
21374
21494
|
const resourceId = this.requireResourceId(record, canonicalReference.sourceIdentityField);
|
|
21375
|
-
|
|
21376
|
-
|
|
21377
|
-
|
|
21378
|
-
|
|
21495
|
+
const fallbackSurfaceId = this.text(options?.fallbackSurfaceId);
|
|
21496
|
+
const hasDistinctFallback = Boolean(fallbackSurfaceId) &&
|
|
21497
|
+
fallbackSurfaceId !== canonicalReference.target.surfaceId;
|
|
21498
|
+
return this.resolveCollectionSurfaceCatalog(canonicalReference.target.resourceKey, options).pipe(switchMap$1((resourceCatalog) => {
|
|
21499
|
+
let activeReference = canonicalReference;
|
|
21500
|
+
try {
|
|
21501
|
+
this.requireCollectionTargetSurface(resourceCatalog, activeReference);
|
|
21502
|
+
}
|
|
21503
|
+
catch (err) {
|
|
21504
|
+
if (hasDistinctFallback &&
|
|
21505
|
+
err instanceof ResourceRecordOpenError &&
|
|
21506
|
+
err.code === 'TARGET_SURFACE_UNAVAILABLE') {
|
|
21507
|
+
activeReference = {
|
|
21508
|
+
sourceIdentityField: canonicalReference.sourceIdentityField,
|
|
21509
|
+
target: {
|
|
21510
|
+
resourceKey: canonicalReference.target.resourceKey,
|
|
21511
|
+
surfaceId: fallbackSurfaceId,
|
|
21512
|
+
},
|
|
21513
|
+
};
|
|
21514
|
+
this.requireCollectionTargetSurface(resourceCatalog, activeReference);
|
|
21515
|
+
}
|
|
21516
|
+
else {
|
|
21517
|
+
throw err;
|
|
21518
|
+
}
|
|
21519
|
+
}
|
|
21379
21520
|
return this.discovery
|
|
21380
21521
|
.fetchJson(this.itemHref(resourceCatalog.resourcePath, resourceId), options)
|
|
21381
21522
|
.pipe(switchMap$1((itemResponse) => this.discovery.getSurfaces(itemResponse, options).pipe(map$1((contextualCatalog) => {
|
|
21382
|
-
|
|
21523
|
+
let effectiveReference = activeReference;
|
|
21524
|
+
let resolution;
|
|
21525
|
+
try {
|
|
21526
|
+
resolution = this.materializeContextualSurface(contextualCatalog, resourceCatalog, effectiveReference, resourceId, options);
|
|
21527
|
+
}
|
|
21528
|
+
catch (err) {
|
|
21529
|
+
if (hasDistinctFallback &&
|
|
21530
|
+
effectiveReference.target.surfaceId !==
|
|
21531
|
+
fallbackSurfaceId &&
|
|
21532
|
+
err instanceof ResourceRecordOpenError &&
|
|
21533
|
+
err.code === 'CONTEXTUAL_SURFACE_UNAVAILABLE') {
|
|
21534
|
+
effectiveReference = {
|
|
21535
|
+
sourceIdentityField: canonicalReference.sourceIdentityField,
|
|
21536
|
+
target: {
|
|
21537
|
+
resourceKey: canonicalReference.target.resourceKey,
|
|
21538
|
+
surfaceId: fallbackSurfaceId,
|
|
21539
|
+
},
|
|
21540
|
+
};
|
|
21541
|
+
resolution = this.materializeContextualSurface(contextualCatalog, resourceCatalog, effectiveReference, resourceId, options);
|
|
21542
|
+
}
|
|
21543
|
+
else {
|
|
21544
|
+
throw err;
|
|
21545
|
+
}
|
|
21546
|
+
}
|
|
21383
21547
|
return {
|
|
21384
|
-
canonicalReference,
|
|
21548
|
+
canonicalReference: effectiveReference,
|
|
21385
21549
|
resourceId,
|
|
21386
21550
|
resourceCatalog,
|
|
21387
21551
|
contextualCatalog,
|
|
@@ -21392,6 +21556,120 @@ class ResourceRecordOpenService {
|
|
|
21392
21556
|
}));
|
|
21393
21557
|
});
|
|
21394
21558
|
}
|
|
21559
|
+
resolveCollectionSurfaceCatalog(resourceKey, options) {
|
|
21560
|
+
if (!options?.useMetadataCache) {
|
|
21561
|
+
return this.discovery
|
|
21562
|
+
.fetchJson(this.surfaceCatalogHref(resourceKey), options)
|
|
21563
|
+
.pipe(map$1((catalog) => this.requireCatalog(catalog, resourceKey, 'RESOURCE_CATALOG_INVALID')));
|
|
21564
|
+
}
|
|
21565
|
+
const cacheKey = this.buildMetadataCacheKey(`catalog:${resourceKey}`, options);
|
|
21566
|
+
const cached = this.getTimedCacheEntry(this.collectionCatalogCache, cacheKey);
|
|
21567
|
+
if (cached) {
|
|
21568
|
+
return of(cached);
|
|
21569
|
+
}
|
|
21570
|
+
const inFlight = this.collectionCatalogInFlight.get(cacheKey);
|
|
21571
|
+
if (inFlight) {
|
|
21572
|
+
return inFlight;
|
|
21573
|
+
}
|
|
21574
|
+
const request$ = this.discovery
|
|
21575
|
+
.fetchJson(this.surfaceCatalogHref(resourceKey), options)
|
|
21576
|
+
.pipe(map$1((catalog) => this.requireCatalog(catalog, resourceKey, 'RESOURCE_CATALOG_INVALID')), tap$1((validated) => this.setTimedCacheEntry(this.collectionCatalogCache, cacheKey, validated)), finalize$1(() => {
|
|
21577
|
+
this.collectionCatalogInFlight.delete(cacheKey);
|
|
21578
|
+
}), shareReplay$1({ bufferSize: 1, refCount: false }));
|
|
21579
|
+
this.collectionCatalogInFlight.set(cacheKey, request$);
|
|
21580
|
+
return request$;
|
|
21581
|
+
}
|
|
21582
|
+
resolveSurfaceSchema(schemaUrl, options) {
|
|
21583
|
+
if (!options?.useMetadataCache) {
|
|
21584
|
+
return this.discovery
|
|
21585
|
+
.getSchemaByUrl(schemaUrl, options)
|
|
21586
|
+
.pipe(map$1((rawSchema) => ({
|
|
21587
|
+
rawSchema: this.record(rawSchema),
|
|
21588
|
+
fields: this.schemaNormalizer.normalizeSchema(rawSchema),
|
|
21589
|
+
})), catchError$1((err) => throwError(() => new ResourceRecordOpenError('SCHEMA_READ_FAILED', `Failed to resolve filtered response schema from "${schemaUrl}".`, err))));
|
|
21590
|
+
}
|
|
21591
|
+
const cacheKey = this.buildMetadataCacheKey(`schema:${schemaUrl}`, options);
|
|
21592
|
+
const cached = this.getTimedCacheEntry(this.surfaceSchemaCache, cacheKey);
|
|
21593
|
+
if (cached) {
|
|
21594
|
+
return of(cached);
|
|
21595
|
+
}
|
|
21596
|
+
const inFlight = this.surfaceSchemaInFlight.get(cacheKey);
|
|
21597
|
+
if (inFlight) {
|
|
21598
|
+
return inFlight;
|
|
21599
|
+
}
|
|
21600
|
+
const request$ = this.discovery
|
|
21601
|
+
.getSchemaByUrl(schemaUrl, options)
|
|
21602
|
+
.pipe(map$1((rawSchema) => ({
|
|
21603
|
+
rawSchema: this.record(rawSchema),
|
|
21604
|
+
fields: this.schemaNormalizer.normalizeSchema(rawSchema),
|
|
21605
|
+
})), tap$1((normalized) => this.setTimedCacheEntry(this.surfaceSchemaCache, cacheKey, normalized)), catchError$1((err) => throwError(() => new ResourceRecordOpenError('SCHEMA_READ_FAILED', `Failed to resolve filtered response schema from "${schemaUrl}".`, err))), finalize$1(() => {
|
|
21606
|
+
this.surfaceSchemaInFlight.delete(cacheKey);
|
|
21607
|
+
}), shareReplay$1({ bufferSize: 1, refCount: false }));
|
|
21608
|
+
this.surfaceSchemaInFlight.set(cacheKey, request$);
|
|
21609
|
+
return request$;
|
|
21610
|
+
}
|
|
21611
|
+
buildMetadataCacheKey(resourceOrSchemaKey, options) {
|
|
21612
|
+
const apiEntry = this.discovery.resolveApiEntry({
|
|
21613
|
+
endpointKey: options?.endpointKey,
|
|
21614
|
+
apiUrlEntry: options?.apiUrlEntry,
|
|
21615
|
+
});
|
|
21616
|
+
const apiSignature = canonicalJsonSha256(apiEntry ?? {});
|
|
21617
|
+
const contextSignature = this.computeContextSignature();
|
|
21618
|
+
if (contextSignature !== this.lastContextSignature) {
|
|
21619
|
+
this.lastContextSignature = contextSignature;
|
|
21620
|
+
this.clearCaches();
|
|
21621
|
+
}
|
|
21622
|
+
return `api:${options?.endpointKey ?? 'default'}:${apiSignature}::ctx:${contextSignature}::${resourceOrSchemaKey}`;
|
|
21623
|
+
}
|
|
21624
|
+
computeContextSignature() {
|
|
21625
|
+
const snapshot = this.runtimeContext?.snapshot;
|
|
21626
|
+
if (!snapshot || snapshot.state !== 'ready' || !snapshot.effectiveContext) {
|
|
21627
|
+
return 'unconfirmed';
|
|
21628
|
+
}
|
|
21629
|
+
const eff = snapshot.effectiveContext;
|
|
21630
|
+
const authorities = Array.isArray(eff.authorities)
|
|
21631
|
+
? [...eff.authorities].sort().join(',')
|
|
21632
|
+
: '';
|
|
21633
|
+
return [
|
|
21634
|
+
eff.contextVersion ?? '',
|
|
21635
|
+
eff.activeTenant?.tenantId ?? '',
|
|
21636
|
+
eff.activeOrganizationId ?? '',
|
|
21637
|
+
snapshot.user?.userId ?? '',
|
|
21638
|
+
eff.activeProfileId ?? '',
|
|
21639
|
+
eff.locale ?? '',
|
|
21640
|
+
eff.timezone ?? '',
|
|
21641
|
+
authorities,
|
|
21642
|
+
].join('|');
|
|
21643
|
+
}
|
|
21644
|
+
getTimedCacheEntry(cache, key) {
|
|
21645
|
+
const entry = cache.get(key);
|
|
21646
|
+
if (!entry) {
|
|
21647
|
+
return null;
|
|
21648
|
+
}
|
|
21649
|
+
if (Date.now() > entry.expiresAt) {
|
|
21650
|
+
cache.delete(key);
|
|
21651
|
+
return null;
|
|
21652
|
+
}
|
|
21653
|
+
// Refresh LRU order
|
|
21654
|
+
cache.delete(key);
|
|
21655
|
+
cache.set(key, entry);
|
|
21656
|
+
return entry.value;
|
|
21657
|
+
}
|
|
21658
|
+
setTimedCacheEntry(cache, key, value) {
|
|
21659
|
+
if (cache.has(key)) {
|
|
21660
|
+
cache.delete(key);
|
|
21661
|
+
}
|
|
21662
|
+
else if (cache.size >= METADATA_CACHE_MAX_ENTRIES) {
|
|
21663
|
+
const oldestKey = cache.keys().next().value;
|
|
21664
|
+
if (oldestKey !== undefined) {
|
|
21665
|
+
cache.delete(oldestKey);
|
|
21666
|
+
}
|
|
21667
|
+
}
|
|
21668
|
+
cache.set(key, {
|
|
21669
|
+
value,
|
|
21670
|
+
expiresAt: Date.now() + METADATA_CACHE_TTL_MS,
|
|
21671
|
+
});
|
|
21672
|
+
}
|
|
21395
21673
|
requireReadProjectionSurfaceContract(surface) {
|
|
21396
21674
|
const kind = this.text(surface.kind).toUpperCase();
|
|
21397
21675
|
if (kind !== 'VIEW' && kind !== 'READ_PROJECTION') {
|
|
@@ -21419,6 +21697,11 @@ class ResourceRecordOpenService {
|
|
|
21419
21697
|
if (!surface.availability.allowed) {
|
|
21420
21698
|
throw new ResourceRecordOpenError('CONTEXTUAL_SURFACE_UNAVAILABLE', `Surface "${reference.target.surfaceId}" is unavailable for the current record context.`, { reason: surface.availability.reason ?? null });
|
|
21421
21699
|
}
|
|
21700
|
+
const relatedSurfaces = (surface.kind === 'VIEW' || surface.kind === 'READ_PROJECTION') &&
|
|
21701
|
+
surface.scope === 'ITEM' &&
|
|
21702
|
+
!surface.relatedResource
|
|
21703
|
+
? this.surfaceAdapter.extractRelatedSurfaces(contextualCatalog.surfaces, surface.id)
|
|
21704
|
+
: [];
|
|
21422
21705
|
const payload = this.surfaceAdapter.toPayload(surface, {
|
|
21423
21706
|
resourcePath: contextualCatalog.resourcePath,
|
|
21424
21707
|
resourceId,
|
|
@@ -21430,6 +21713,7 @@ class ResourceRecordOpenService {
|
|
|
21430
21713
|
subtitle: options?.subtitle,
|
|
21431
21714
|
icon: options?.icon,
|
|
21432
21715
|
queryContext: options?.queryContext,
|
|
21716
|
+
...(relatedSurfaces.length > 0 ? { relatedSurfaces } : {}),
|
|
21433
21717
|
});
|
|
21434
21718
|
return {
|
|
21435
21719
|
resourceId,
|
|
@@ -21647,7 +21931,259 @@ class ResourceRecordOpenService {
|
|
|
21647
21931
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ResourceRecordOpenService, decorators: [{
|
|
21648
21932
|
type: Injectable,
|
|
21649
21933
|
args: [{ providedIn: 'any' }]
|
|
21650
|
-
}] });
|
|
21934
|
+
}], ctorParameters: () => [] });
|
|
21935
|
+
|
|
21936
|
+
const DEFAULT_LOCALE = 'en-US';
|
|
21937
|
+
const DEFAULT_DATE_TIME = {
|
|
21938
|
+
dateFormat: 'shortDate',
|
|
21939
|
+
timeFormat: 'shortTime',
|
|
21940
|
+
dateTimeFormat: 'short',
|
|
21941
|
+
firstDayOfWeek: 0,
|
|
21942
|
+
relativeTime: false,
|
|
21943
|
+
};
|
|
21944
|
+
const DEFAULT_NUMBER = {
|
|
21945
|
+
decimalSeparator: '.',
|
|
21946
|
+
thousandsSeparator: ',',
|
|
21947
|
+
defaultPrecision: 2,
|
|
21948
|
+
negativeSign: '-',
|
|
21949
|
+
negativeSignPosition: 'before',
|
|
21950
|
+
};
|
|
21951
|
+
const DEFAULT_CURRENCY = {
|
|
21952
|
+
code: 'USD',
|
|
21953
|
+
symbol: '$',
|
|
21954
|
+
position: 'before',
|
|
21955
|
+
spacing: false,
|
|
21956
|
+
precision: 2,
|
|
21957
|
+
};
|
|
21958
|
+
const IMPLICIT_FORMAT_TYPES = new Set([
|
|
21959
|
+
'number',
|
|
21960
|
+
'currency',
|
|
21961
|
+
'percentage',
|
|
21962
|
+
'date',
|
|
21963
|
+
'datetime',
|
|
21964
|
+
'time',
|
|
21965
|
+
]);
|
|
21966
|
+
function resolveValuePresentation(config, context) {
|
|
21967
|
+
const localization = context?.localization ?? null;
|
|
21968
|
+
const locale = resolveValuePresentationLocale(context, localization);
|
|
21969
|
+
const number = resolveNumberLocaleConfig(config, localization);
|
|
21970
|
+
const currency = resolveCurrencyLocaleConfig(config, localization);
|
|
21971
|
+
const dateTime = resolveDateTimeLocaleConfig(localization);
|
|
21972
|
+
return {
|
|
21973
|
+
type: config.type,
|
|
21974
|
+
locale,
|
|
21975
|
+
style: config.style,
|
|
21976
|
+
format: config.format ||
|
|
21977
|
+
resolveDefaultValuePresentationFormat(config.type, config.style, {
|
|
21978
|
+
localization,
|
|
21979
|
+
number,
|
|
21980
|
+
currency,
|
|
21981
|
+
dateTime,
|
|
21982
|
+
}),
|
|
21983
|
+
currency: config.type === 'currency' ? currency : undefined,
|
|
21984
|
+
number: config.type === 'number' || config.type === 'percentage'
|
|
21985
|
+
? number
|
|
21986
|
+
: undefined,
|
|
21987
|
+
dateTime: config.type === 'date' ||
|
|
21988
|
+
config.type === 'datetime' ||
|
|
21989
|
+
config.type === 'time'
|
|
21990
|
+
? dateTime
|
|
21991
|
+
: undefined,
|
|
21992
|
+
};
|
|
21993
|
+
}
|
|
21994
|
+
function resolveValuePresentationLocale(context, localization) {
|
|
21995
|
+
return (context?.valueLocale ||
|
|
21996
|
+
localization?.locale ||
|
|
21997
|
+
context?.surfaceLocale ||
|
|
21998
|
+
context?.appLocale ||
|
|
21999
|
+
DEFAULT_LOCALE);
|
|
22000
|
+
}
|
|
22001
|
+
function supportsImplicitValuePresentation(type) {
|
|
22002
|
+
return !!type && IMPLICIT_FORMAT_TYPES.has(type);
|
|
22003
|
+
}
|
|
22004
|
+
function resolveDefaultValuePresentationFormat(type, style, context) {
|
|
22005
|
+
switch (type) {
|
|
22006
|
+
case 'date':
|
|
22007
|
+
return resolveDateFormat(style, context.dateTime.dateFormat);
|
|
22008
|
+
case 'datetime':
|
|
22009
|
+
return resolveDateTimeFormat(style, context.dateTime.dateTimeFormat);
|
|
22010
|
+
case 'time':
|
|
22011
|
+
return resolveTimeFormat(style, context.dateTime.timeFormat);
|
|
22012
|
+
case 'number':
|
|
22013
|
+
return resolveDigitsFormat(context.number.defaultPrecision);
|
|
22014
|
+
case 'currency':
|
|
22015
|
+
return `${context.currency.code}|symbol|${context.currency.precision}`;
|
|
22016
|
+
case 'percentage':
|
|
22017
|
+
return (context.localization?.formatting?.percentageFormat ||
|
|
22018
|
+
resolveDigitsFormat(context.number.defaultPrecision));
|
|
22019
|
+
default:
|
|
22020
|
+
return undefined;
|
|
22021
|
+
}
|
|
22022
|
+
}
|
|
22023
|
+
function resolveDateTimeLocaleConfig(localization) {
|
|
22024
|
+
return {
|
|
22025
|
+
...DEFAULT_DATE_TIME,
|
|
22026
|
+
...(localization?.dateTime || {}),
|
|
22027
|
+
};
|
|
22028
|
+
}
|
|
22029
|
+
function resolveNumberLocaleConfig(config, localization) {
|
|
22030
|
+
return {
|
|
22031
|
+
...DEFAULT_NUMBER,
|
|
22032
|
+
...(localization?.number || {}),
|
|
22033
|
+
...(config.number || {}),
|
|
22034
|
+
};
|
|
22035
|
+
}
|
|
22036
|
+
function resolveCurrencyLocaleConfig(config, localization) {
|
|
22037
|
+
return {
|
|
22038
|
+
...DEFAULT_CURRENCY,
|
|
22039
|
+
...(localization?.currency || {}),
|
|
22040
|
+
...(config.currency || {}),
|
|
22041
|
+
};
|
|
22042
|
+
}
|
|
22043
|
+
function resolveDateFormat(style, fallback) {
|
|
22044
|
+
switch (style) {
|
|
22045
|
+
case 'short':
|
|
22046
|
+
return 'shortDate';
|
|
22047
|
+
case 'medium':
|
|
22048
|
+
return 'mediumDate';
|
|
22049
|
+
case 'long':
|
|
22050
|
+
return 'longDate';
|
|
22051
|
+
case 'full':
|
|
22052
|
+
return 'fullDate';
|
|
22053
|
+
default:
|
|
22054
|
+
return fallback || DEFAULT_DATE_TIME.dateFormat;
|
|
22055
|
+
}
|
|
22056
|
+
}
|
|
22057
|
+
function resolveDateTimeFormat(style, fallback) {
|
|
22058
|
+
switch (style) {
|
|
22059
|
+
case 'short':
|
|
22060
|
+
return 'short';
|
|
22061
|
+
case 'medium':
|
|
22062
|
+
return 'medium';
|
|
22063
|
+
case 'long':
|
|
22064
|
+
return 'long';
|
|
22065
|
+
case 'full':
|
|
22066
|
+
return 'full';
|
|
22067
|
+
default:
|
|
22068
|
+
return fallback || DEFAULT_DATE_TIME.dateTimeFormat;
|
|
22069
|
+
}
|
|
22070
|
+
}
|
|
22071
|
+
function resolveTimeFormat(style, fallback) {
|
|
22072
|
+
switch (style) {
|
|
22073
|
+
case 'short':
|
|
22074
|
+
return 'shortTime';
|
|
22075
|
+
case 'medium':
|
|
22076
|
+
return 'mediumTime';
|
|
22077
|
+
case 'long':
|
|
22078
|
+
return 'longTime';
|
|
22079
|
+
case 'full':
|
|
22080
|
+
return 'fullTime';
|
|
22081
|
+
default:
|
|
22082
|
+
return fallback || DEFAULT_DATE_TIME.timeFormat;
|
|
22083
|
+
}
|
|
22084
|
+
}
|
|
22085
|
+
function resolveDigitsFormat(defaultPrecision) {
|
|
22086
|
+
const precision = clampPrecision(defaultPrecision);
|
|
22087
|
+
return `1.${precision}-${precision}`;
|
|
22088
|
+
}
|
|
22089
|
+
function clampPrecision(value) {
|
|
22090
|
+
if (typeof value !== 'number' || Number.isNaN(value)) {
|
|
22091
|
+
return DEFAULT_NUMBER.defaultPrecision;
|
|
22092
|
+
}
|
|
22093
|
+
if (value < 0) {
|
|
22094
|
+
return 0;
|
|
22095
|
+
}
|
|
22096
|
+
return Math.floor(value);
|
|
22097
|
+
}
|
|
22098
|
+
|
|
22099
|
+
/** Shared presentation for derived state and links. Never infers meaning from field names. */
|
|
22100
|
+
function validateCompositionValueFormat(format) {
|
|
22101
|
+
const spec = typeof format === 'string' ? { kind: format } : format;
|
|
22102
|
+
if (!spec || !['integer', 'number', 'currency', 'percent', 'date', 'mask'].includes(String(spec['kind']))) {
|
|
22103
|
+
throw new Error('Unsupported value format kind.');
|
|
22104
|
+
}
|
|
22105
|
+
const numericKind = ['number', 'currency', 'percent'].includes(String(spec['kind']));
|
|
22106
|
+
const keys = ['kind', 'locale', ...(numericKind ? ['minimumFractionDigits', 'maximumFractionDigits'] : []),
|
|
22107
|
+
...(spec['kind'] === 'currency' ? ['currency'] : []), ...(spec['kind'] === 'mask' ? ['mask'] : [])];
|
|
22108
|
+
if (Object.keys(spec).some(key => !keys.includes(key)))
|
|
22109
|
+
throw new Error('Unknown value format option.');
|
|
22110
|
+
if (spec['locale'] !== undefined) {
|
|
22111
|
+
if (typeof spec['locale'] !== 'string' || !spec['locale'].trim())
|
|
22112
|
+
throw new Error('Invalid format locale.');
|
|
22113
|
+
Intl.getCanonicalLocales(spec['locale']);
|
|
22114
|
+
}
|
|
22115
|
+
for (const key of ['minimumFractionDigits', 'maximumFractionDigits']) {
|
|
22116
|
+
const digits = spec[key];
|
|
22117
|
+
if (digits !== undefined && (typeof digits !== 'number' || !Number.isInteger(digits) || digits < 0 || digits > 20)) {
|
|
22118
|
+
throw new Error('Fraction digits must be integers between 0 and 20.');
|
|
22119
|
+
}
|
|
22120
|
+
}
|
|
22121
|
+
const minimum = spec['minimumFractionDigits'] ?? (spec['kind'] === 'currency' ? 2 : 0);
|
|
22122
|
+
const maximum = spec['maximumFractionDigits'] ?? (spec['kind'] === 'currency' ? 2 : spec['kind'] === 'percent' ? 1 : 0);
|
|
22123
|
+
if (numericKind && Number(minimum) > Number(maximum))
|
|
22124
|
+
throw new Error('Invalid fraction digit range.');
|
|
22125
|
+
if (spec['currency'] !== undefined && (typeof spec['currency'] !== 'string' || !/^[A-Z]{3}$/.test(spec['currency']))) {
|
|
22126
|
+
throw new Error('Currency must be a three-letter uppercase code.');
|
|
22127
|
+
}
|
|
22128
|
+
if (spec['kind'] === 'mask') {
|
|
22129
|
+
const mask = spec['mask'];
|
|
22130
|
+
if (typeof mask !== 'string' || mask.length > 128 || !mask.includes('0') || !/^[0 .()/+\-]+$/.test(mask)) {
|
|
22131
|
+
throw new Error('Mask must contain digit slots (0) and literal separators.');
|
|
22132
|
+
}
|
|
22133
|
+
}
|
|
22134
|
+
}
|
|
22135
|
+
function formatCompositionValue(value, format) {
|
|
22136
|
+
if (format == null)
|
|
22137
|
+
return value == null ? '' : String(value);
|
|
22138
|
+
validateCompositionValueFormat(format);
|
|
22139
|
+
const spec = (typeof format === 'string' ? { kind: format } : format);
|
|
22140
|
+
const locale = typeof spec['locale'] === 'string' ? spec['locale'] : 'pt-BR';
|
|
22141
|
+
const number = typeof value === 'number' || (typeof value === 'string' && value.trim()) ? Number(value) : 0;
|
|
22142
|
+
const numeric = Number.isFinite(number) ? number : 0;
|
|
22143
|
+
switch (spec['kind']) {
|
|
22144
|
+
case 'integer': return new Intl.NumberFormat(locale, { maximumFractionDigits: 0, minimumFractionDigits: 0 }).format(numeric);
|
|
22145
|
+
case 'number': return new Intl.NumberFormat(locale, {
|
|
22146
|
+
maximumFractionDigits: Number(spec['maximumFractionDigits']) || 0,
|
|
22147
|
+
minimumFractionDigits: Number(spec['minimumFractionDigits']) || 0,
|
|
22148
|
+
}).format(numeric);
|
|
22149
|
+
case 'currency': return new Intl.NumberFormat(locale, {
|
|
22150
|
+
style: 'currency', currency: typeof spec['currency'] === 'string' ? spec['currency'] : 'BRL',
|
|
22151
|
+
maximumFractionDigits: spec['maximumFractionDigits'] ?? 2,
|
|
22152
|
+
minimumFractionDigits: spec['minimumFractionDigits'] ?? 2,
|
|
22153
|
+
}).format(numeric);
|
|
22154
|
+
case 'percent': return new Intl.NumberFormat(locale, {
|
|
22155
|
+
style: 'percent', maximumFractionDigits: spec['maximumFractionDigits'] ?? 1,
|
|
22156
|
+
minimumFractionDigits: spec['minimumFractionDigits'] ?? 0,
|
|
22157
|
+
}).format(numeric);
|
|
22158
|
+
case 'date': {
|
|
22159
|
+
if (value == null || value === '')
|
|
22160
|
+
return '';
|
|
22161
|
+
if (typeof value !== 'string' || !/^\d{4}-\d{2}-\d{2}$/.test(value))
|
|
22162
|
+
throw new Error('Expected a civil date in YYYY-MM-DD format.');
|
|
22163
|
+
const [year, month, day] = value.split('-').map(Number);
|
|
22164
|
+
const date = new Date(0);
|
|
22165
|
+
date.setUTCFullYear(year, month - 1, day);
|
|
22166
|
+
if (year < 1 || date.getUTCFullYear() !== year || date.getUTCMonth() !== month - 1 || date.getUTCDate() !== day) {
|
|
22167
|
+
throw new Error('Invalid civil date.');
|
|
22168
|
+
}
|
|
22169
|
+
return new Intl.DateTimeFormat(locale, { timeZone: 'UTC', year: 'numeric', month: '2-digit', day: '2-digit' }).format(date);
|
|
22170
|
+
}
|
|
22171
|
+
case 'mask': {
|
|
22172
|
+
if (value == null || value === '')
|
|
22173
|
+
return '';
|
|
22174
|
+
if (typeof value !== 'string')
|
|
22175
|
+
throw new Error('Masked values must be strings to preserve leading zeros.');
|
|
22176
|
+
const digits = value.replace(/[ .()/+\-]/g, '');
|
|
22177
|
+
const mask = spec['mask'];
|
|
22178
|
+
if (!/^\d+$/.test(digits) || digits.length !== [...mask].filter(token => token === '0').length) {
|
|
22179
|
+
throw new Error('Value does not match the mask digit count.');
|
|
22180
|
+
}
|
|
22181
|
+
let index = 0;
|
|
22182
|
+
return [...mask].map(token => token === '0' ? digits[index++] : token).join('');
|
|
22183
|
+
}
|
|
22184
|
+
default: throw new Error('Unsupported value format kind.');
|
|
22185
|
+
}
|
|
22186
|
+
}
|
|
21651
22187
|
|
|
21652
22188
|
const LOGGER_LEVEL_PRIORITY = {
|
|
21653
22189
|
error: 0,
|
|
@@ -22743,6 +23279,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
22743
23279
|
|
|
22744
23280
|
const DEFAULT_HOVER_OPEN_DELAY_MS = 280;
|
|
22745
23281
|
const DEFAULT_HOVER_CLOSE_DELAY_MS = 140;
|
|
23282
|
+
const DEFAULT_PROJECTION_CACHE_TTL_MS = 60_000;
|
|
23283
|
+
const MAX_PROJECTION_CACHE_ENTRIES = 64;
|
|
22746
23284
|
/**
|
|
22747
23285
|
* Orquestrador canônico transversal de Quick View em `@praxisui/core`.
|
|
22748
23286
|
*
|
|
@@ -22791,6 +23329,7 @@ class ResourceQuickViewService {
|
|
|
22791
23329
|
stateSubject = new BehaviorSubject('idle');
|
|
22792
23330
|
resolutionSubject = new BehaviorSubject(null);
|
|
22793
23331
|
inFlightByCompositeKey = new Map();
|
|
23332
|
+
projectionCacheByCompositeKey = new Map();
|
|
22794
23333
|
suppressedTriggerKeys = new Set();
|
|
22795
23334
|
activeGeneration = 0;
|
|
22796
23335
|
activeOpenStartedAt = 0;
|
|
@@ -22827,6 +23366,24 @@ class ResourceQuickViewService {
|
|
|
22827
23366
|
get currentResolution() {
|
|
22828
23367
|
return this.resolutionSubject.value;
|
|
22829
23368
|
}
|
|
23369
|
+
/**
|
|
23370
|
+
* Invalida o cache LRU de projeções do Quick View (por recurso específico ou completo),
|
|
23371
|
+
* bem como os caches de catálogo/schema de `ResourceRecordOpenService`.
|
|
23372
|
+
*/
|
|
23373
|
+
invalidateProjectionCache(resourceKey) {
|
|
23374
|
+
const trimmedKey = typeof resourceKey === 'string' ? resourceKey.trim() : '';
|
|
23375
|
+
if (!trimmedKey) {
|
|
23376
|
+
this.projectionCacheByCompositeKey.clear();
|
|
23377
|
+
this._recordOpenService?.clearCaches?.();
|
|
23378
|
+
return;
|
|
23379
|
+
}
|
|
23380
|
+
const token = `::res:${trimmedKey}::`;
|
|
23381
|
+
for (const key of [...this.projectionCacheByCompositeKey.keys()]) {
|
|
23382
|
+
if (key.includes(token)) {
|
|
23383
|
+
this.projectionCacheByCompositeKey.delete(key);
|
|
23384
|
+
}
|
|
23385
|
+
}
|
|
23386
|
+
}
|
|
22830
23387
|
/**
|
|
22831
23388
|
* Aciona o Quick View a partir de hover (ponteiro fino), respeitando o atraso de entrada
|
|
22832
23389
|
* e a supressão de reabertura após `Escape`.
|
|
@@ -23021,6 +23578,7 @@ class ResourceQuickViewService {
|
|
|
23021
23578
|
apiUrlEntry: request.apiUrlEntry,
|
|
23022
23579
|
presentation: resolution.binding.detailPresentation,
|
|
23023
23580
|
queryContext: request.queryContext,
|
|
23581
|
+
useMetadataCache: false,
|
|
23024
23582
|
}));
|
|
23025
23583
|
if (generationAtClick !== this.activeGeneration ||
|
|
23026
23584
|
epochAtClick !== this.contextEpoch) {
|
|
@@ -23060,6 +23618,81 @@ class ResourceQuickViewService {
|
|
|
23060
23618
|
return false;
|
|
23061
23619
|
}
|
|
23062
23620
|
}
|
|
23621
|
+
/**
|
|
23622
|
+
* Abre uma surface contextual adicional do registro (`PARTIAL_FORM`, `FORM`, `VIEW` ou `READ_PROJECTION`
|
|
23623
|
+
* relacionada) diretamente a partir do Quick View ativo, revalidando `recordOpen` antes do despacho.
|
|
23624
|
+
*/
|
|
23625
|
+
async openSurfaceFromActivePreview(surfaceId) {
|
|
23626
|
+
const targetSurfaceId = typeof surfaceId === 'string' ? surfaceId.trim() : '';
|
|
23627
|
+
const resolution = this.resolutionSubject.value;
|
|
23628
|
+
const request = this.presentedRequest ?? this.activeRequest;
|
|
23629
|
+
if (!targetSurfaceId ||
|
|
23630
|
+
!resolution ||
|
|
23631
|
+
!request ||
|
|
23632
|
+
resolution.state !== 'ready') {
|
|
23633
|
+
return false;
|
|
23634
|
+
}
|
|
23635
|
+
if (targetSurfaceId === resolution.binding.recordOpen.target.surfaceId) {
|
|
23636
|
+
return this.openDetailFromActivePreview();
|
|
23637
|
+
}
|
|
23638
|
+
this.cancelPendingOpenTimer();
|
|
23639
|
+
this.clearCloseTimer();
|
|
23640
|
+
const generationAtClick = this.activeGeneration;
|
|
23641
|
+
const epochAtClick = this.contextEpoch;
|
|
23642
|
+
const focusOrigin = this.resolveFocusOrigin(request.anchor);
|
|
23643
|
+
const contextualRecordOpen = {
|
|
23644
|
+
sourceIdentityField: resolution.binding.recordOpen.sourceIdentityField,
|
|
23645
|
+
target: {
|
|
23646
|
+
resourceKey: resolution.binding.recordOpen.target.resourceKey,
|
|
23647
|
+
surfaceId: targetSurfaceId,
|
|
23648
|
+
},
|
|
23649
|
+
};
|
|
23650
|
+
const matchedContextualAction = resolution.contextualActions?.find((item) => item.surfaceId === targetSurfaceId);
|
|
23651
|
+
const effectivePresentation = matchedContextualAction?.presentation ??
|
|
23652
|
+
resolution.binding.detailPresentation;
|
|
23653
|
+
try {
|
|
23654
|
+
const revalidated = await firstValueFrom(this.recordOpenService.resolve(contextualRecordOpen, {
|
|
23655
|
+
...(resolution.record ?? {}),
|
|
23656
|
+
[resolution.binding.recordOpen.sourceIdentityField]: resolution.resourceId,
|
|
23657
|
+
}, {
|
|
23658
|
+
endpointKey: request.endpointKey,
|
|
23659
|
+
apiUrlEntry: request.apiUrlEntry,
|
|
23660
|
+
presentation: effectivePresentation,
|
|
23661
|
+
queryContext: request.queryContext,
|
|
23662
|
+
useMetadataCache: false,
|
|
23663
|
+
}));
|
|
23664
|
+
if (generationAtClick !== this.activeGeneration ||
|
|
23665
|
+
epochAtClick !== this.contextEpoch) {
|
|
23666
|
+
return false;
|
|
23667
|
+
}
|
|
23668
|
+
const actionContext = {
|
|
23669
|
+
sourceId: request.sourceId ?? 'praxis-quick-view',
|
|
23670
|
+
output: 'quickViewOpenSurface',
|
|
23671
|
+
payload: revalidated.payload,
|
|
23672
|
+
runtime: {
|
|
23673
|
+
injector: this.injector,
|
|
23674
|
+
...(focusOrigin ? { focusOrigin } : {}),
|
|
23675
|
+
},
|
|
23676
|
+
meta: {
|
|
23677
|
+
resourceKey: resolution.resourceKey,
|
|
23678
|
+
resourceId: resolution.resourceId,
|
|
23679
|
+
surfaceId: targetSurfaceId,
|
|
23680
|
+
},
|
|
23681
|
+
};
|
|
23682
|
+
const readiness = typeof this.globalActions?.getReadiness === 'function'
|
|
23683
|
+
? this.globalActions.getReadiness('surface.open', actionContext)
|
|
23684
|
+
: null;
|
|
23685
|
+
if (!this.globalActions || (readiness && !readiness.ready)) {
|
|
23686
|
+
return false;
|
|
23687
|
+
}
|
|
23688
|
+
this.dismiss('cta');
|
|
23689
|
+
const result = await this.globalActions.executeRef({ actionId: 'surface.open', payload: revalidated.payload }, actionContext);
|
|
23690
|
+
return result ? result.success !== false : true;
|
|
23691
|
+
}
|
|
23692
|
+
catch {
|
|
23693
|
+
return false;
|
|
23694
|
+
}
|
|
23695
|
+
}
|
|
23063
23696
|
async executeOpen(request, generation) {
|
|
23064
23697
|
const epochAtStart = this.contextEpoch;
|
|
23065
23698
|
const startedAt = Date.now();
|
|
@@ -23148,6 +23781,10 @@ class ResourceQuickViewService {
|
|
|
23148
23781
|
}
|
|
23149
23782
|
fetchDeduplicatedProjection(binding, resourceId, request) {
|
|
23150
23783
|
const compositeKey = this.buildCompositeInFlightKey(binding, resourceId, request);
|
|
23784
|
+
const cached = this.getCachedProjection(compositeKey);
|
|
23785
|
+
if (cached) {
|
|
23786
|
+
return Promise.resolve(cached);
|
|
23787
|
+
}
|
|
23151
23788
|
const existing = this.inFlightByCompositeKey.get(compositeKey);
|
|
23152
23789
|
if (existing) {
|
|
23153
23790
|
return existing;
|
|
@@ -23176,6 +23813,10 @@ class ResourceQuickViewService {
|
|
|
23176
23813
|
apiUrlEntry: request.apiUrlEntry,
|
|
23177
23814
|
presentation: binding.detailPresentation,
|
|
23178
23815
|
queryContext: request.queryContext,
|
|
23816
|
+
...(hasDistinctPreviewSurface
|
|
23817
|
+
? { fallbackSurfaceId: binding.recordOpen.target.surfaceId }
|
|
23818
|
+
: {}),
|
|
23819
|
+
useMetadataCache: true,
|
|
23179
23820
|
};
|
|
23180
23821
|
let inFlightPromise;
|
|
23181
23822
|
inFlightPromise = firstValueFrom(this.recordOpenService.resolveReadProjection(projectionRef, sourceRecord, projectionOptions))
|
|
@@ -23184,10 +23825,22 @@ class ResourceQuickViewService {
|
|
|
23184
23825
|
error instanceof ResourceRecordOpenError &&
|
|
23185
23826
|
(error.code === 'TARGET_SURFACE_UNAVAILABLE' ||
|
|
23186
23827
|
error.code === 'CONTEXTUAL_SURFACE_UNAVAILABLE' ||
|
|
23187
|
-
error.code === 'PROJECTION_READ_FAILED'
|
|
23188
|
-
|
|
23828
|
+
error.code === 'PROJECTION_READ_FAILED' ||
|
|
23829
|
+
error.code === 'PROJECTION_EMPTY' ||
|
|
23830
|
+
error.code === 'SCHEMA_READ_FAILED')) {
|
|
23831
|
+
return firstValueFrom(this.recordOpenService.resolveReadProjection(binding.recordOpen, sourceRecord, {
|
|
23832
|
+
endpointKey: request.endpointKey,
|
|
23833
|
+
apiUrlEntry: request.apiUrlEntry,
|
|
23834
|
+
presentation: binding.detailPresentation,
|
|
23835
|
+
queryContext: request.queryContext,
|
|
23836
|
+
useMetadataCache: true,
|
|
23837
|
+
}));
|
|
23189
23838
|
}
|
|
23190
23839
|
throw error;
|
|
23840
|
+
})
|
|
23841
|
+
.then((projection) => {
|
|
23842
|
+
this.setCachedProjection(compositeKey, projection);
|
|
23843
|
+
return projection;
|
|
23191
23844
|
})
|
|
23192
23845
|
.finally(() => {
|
|
23193
23846
|
if (this.inFlightByCompositeKey.get(compositeKey) === inFlightPromise) {
|
|
@@ -23210,6 +23863,7 @@ class ResourceQuickViewService {
|
|
|
23210
23863
|
const emptyFallbackSubtitle = identitySubtitle || (projection.surface.description ?? null);
|
|
23211
23864
|
const resolvedAvatarUrl = this.sanitizeAvatarUrl(sanitizedIdentity?.avatar?.value);
|
|
23212
23865
|
const ctaAvailable = this.resolveTargetCtaAvailability(binding, projection);
|
|
23866
|
+
const contextualActions = this.buildContextualActions(binding, projection);
|
|
23213
23867
|
if (!hasIdentityContent && !binding.contentRef) {
|
|
23214
23868
|
return {
|
|
23215
23869
|
state: 'empty',
|
|
@@ -23227,6 +23881,7 @@ class ResourceQuickViewService {
|
|
|
23227
23881
|
fields: projection.fields,
|
|
23228
23882
|
identity: sanitizedIdentity,
|
|
23229
23883
|
summaryItems: [],
|
|
23884
|
+
...(contextualActions.length > 0 ? { contextualActions } : {}),
|
|
23230
23885
|
ctaAvailable,
|
|
23231
23886
|
ctaLabel: this.translate('quickView.openDetail', 'Abrir detalhe'),
|
|
23232
23887
|
failureCode: 'IDENTITY_UNRESOLVED',
|
|
@@ -23253,6 +23908,7 @@ class ResourceQuickViewService {
|
|
|
23253
23908
|
fields: projection.fields,
|
|
23254
23909
|
identity: sanitizedIdentity,
|
|
23255
23910
|
summaryItems,
|
|
23911
|
+
...(contextualActions.length > 0 ? { contextualActions } : {}),
|
|
23256
23912
|
ctaAvailable,
|
|
23257
23913
|
ctaLabel: this.translate('quickView.openDetail', 'Abrir detalhe'),
|
|
23258
23914
|
};
|
|
@@ -23359,6 +24015,74 @@ class ResourceQuickViewService {
|
|
|
23359
24015
|
}
|
|
23360
24016
|
return Boolean(projection.surface.availability?.allowed);
|
|
23361
24017
|
}
|
|
24018
|
+
buildContextualActions(binding, projection) {
|
|
24019
|
+
if (!Array.isArray(projection.contextualSurfaces)) {
|
|
24020
|
+
return [];
|
|
24021
|
+
}
|
|
24022
|
+
const excludedIds = new Set([
|
|
24023
|
+
binding.recordOpen.target.surfaceId,
|
|
24024
|
+
binding.previewSurfaceId,
|
|
24025
|
+
projection.surface?.id,
|
|
24026
|
+
]
|
|
24027
|
+
.filter((id) => typeof id === 'string' && id.trim().length > 0)
|
|
24028
|
+
.map((id) => id.trim()));
|
|
24029
|
+
const priorityForKind = (kind) => {
|
|
24030
|
+
switch (kind) {
|
|
24031
|
+
case 'PARTIAL_FORM':
|
|
24032
|
+
return 1;
|
|
24033
|
+
case 'FORM':
|
|
24034
|
+
return 2;
|
|
24035
|
+
case 'VIEW':
|
|
24036
|
+
case 'READ_PROJECTION':
|
|
24037
|
+
return 3;
|
|
24038
|
+
default:
|
|
24039
|
+
return 4;
|
|
24040
|
+
}
|
|
24041
|
+
};
|
|
24042
|
+
const defaultIconForKind = (kind) => {
|
|
24043
|
+
switch (kind) {
|
|
24044
|
+
case 'PARTIAL_FORM':
|
|
24045
|
+
return 'tune';
|
|
24046
|
+
case 'FORM':
|
|
24047
|
+
return 'edit';
|
|
24048
|
+
default:
|
|
24049
|
+
return 'open_in_new';
|
|
24050
|
+
}
|
|
24051
|
+
};
|
|
24052
|
+
return projection.contextualSurfaces
|
|
24053
|
+
.filter((surface) => {
|
|
24054
|
+
const id = typeof surface?.id === 'string' ? surface.id.trim() : '';
|
|
24055
|
+
const title = typeof surface?.title === 'string' ? surface.title.trim() : '';
|
|
24056
|
+
if (!id || !title || excludedIds.has(id)) {
|
|
24057
|
+
return false;
|
|
24058
|
+
}
|
|
24059
|
+
if (surface.scope && surface.scope !== 'ITEM') {
|
|
24060
|
+
return false;
|
|
24061
|
+
}
|
|
24062
|
+
return Boolean(surface.availability?.allowed);
|
|
24063
|
+
})
|
|
24064
|
+
.slice()
|
|
24065
|
+
.sort((left, right) => {
|
|
24066
|
+
const kindDiff = priorityForKind(left.kind) - priorityForKind(right.kind);
|
|
24067
|
+
if (kindDiff !== 0) {
|
|
24068
|
+
return kindDiff;
|
|
24069
|
+
}
|
|
24070
|
+
return (left.order ?? 999) - (right.order ?? 999);
|
|
24071
|
+
})
|
|
24072
|
+
.slice(0, 4)
|
|
24073
|
+
.map((surface) => ({
|
|
24074
|
+
surfaceId: surface.id.trim(),
|
|
24075
|
+
title: surface.title.trim(),
|
|
24076
|
+
...(surface.kind ? { kind: surface.kind } : {}),
|
|
24077
|
+
icon: typeof surface.icon === 'string' && surface.icon.trim().length > 0
|
|
24078
|
+
? surface.icon.trim()
|
|
24079
|
+
: defaultIconForKind(surface.kind),
|
|
24080
|
+
...(surface.description ? { description: surface.description } : {}),
|
|
24081
|
+
presentation: surface.kind === 'PARTIAL_FORM' || surface.kind === 'FORM'
|
|
24082
|
+
? 'modal'
|
|
24083
|
+
: (binding.detailPresentation ?? 'drawer'),
|
|
24084
|
+
}));
|
|
24085
|
+
}
|
|
23362
24086
|
sanitizeAvatarUrl(rawValue) {
|
|
23363
24087
|
if (typeof rawValue !== 'string') {
|
|
23364
24088
|
return null;
|
|
@@ -23469,6 +24193,11 @@ class ResourceQuickViewService {
|
|
|
23469
24193
|
if (fieldDef?.hidden) {
|
|
23470
24194
|
continue;
|
|
23471
24195
|
}
|
|
24196
|
+
if (metaPart.value === null ||
|
|
24197
|
+
metaPart.value === undefined ||
|
|
24198
|
+
String(metaPart.value).trim().length === 0) {
|
|
24199
|
+
continue;
|
|
24200
|
+
}
|
|
23472
24201
|
seenFields.add(metaPart.field);
|
|
23473
24202
|
items.push(this.createSummaryItem(metaPart.field, metaPart.label || fieldDef?.label || metaPart.field, metaPart.value, fieldDef, metaPart.presentation ?? fieldDef?.presentation));
|
|
23474
24203
|
}
|
|
@@ -23514,11 +24243,21 @@ class ResourceQuickViewService {
|
|
|
23514
24243
|
access.reason ||
|
|
23515
24244
|
this.translate('quickView.maskedFieldReason', 'Dado protegido por política de governança / LGPD')
|
|
23516
24245
|
: undefined;
|
|
24246
|
+
const icon = presentation?.icon || fieldDef?.icon || null;
|
|
24247
|
+
const tone = !isMasked
|
|
24248
|
+
? typeof rawValue === 'boolean'
|
|
24249
|
+
? (rawValue ? presentation?.toneTrue : presentation?.toneFalse) ??
|
|
24250
|
+
presentation?.tone ??
|
|
24251
|
+
null
|
|
24252
|
+
: (presentation?.tone ?? null)
|
|
24253
|
+
: null;
|
|
23517
24254
|
return {
|
|
23518
24255
|
field,
|
|
23519
24256
|
label,
|
|
23520
24257
|
value: deniedByAuthority && !hasMaskedToken ? '••••••' : rawValue,
|
|
23521
24258
|
formattedValue,
|
|
24259
|
+
...(icon ? { icon } : {}),
|
|
24260
|
+
...(tone ? { tone } : {}),
|
|
23522
24261
|
presentation,
|
|
23523
24262
|
copyable: !isMasked,
|
|
23524
24263
|
...(isMasked ? { masked: true } : {}),
|
|
@@ -23576,6 +24315,10 @@ class ResourceQuickViewService {
|
|
|
23576
24315
|
const suffix = presentation.suffix ?? '';
|
|
23577
24316
|
return `${prefix}${presentation.label}${suffix}`;
|
|
23578
24317
|
}
|
|
24318
|
+
const configuredValue = this.formatConfiguredSummaryValue(rawValue, fieldDef);
|
|
24319
|
+
if (configuredValue !== null) {
|
|
24320
|
+
return `${presentation?.prefix ?? ''}${configuredValue}${presentation?.suffix ?? ''}`;
|
|
24321
|
+
}
|
|
23579
24322
|
const isCurrencyField = fieldDef?.numericFormat ===
|
|
23580
24323
|
'currency' ||
|
|
23581
24324
|
fieldDef?.controlType === 'currency' ||
|
|
@@ -23653,6 +24396,69 @@ class ResourceQuickViewService {
|
|
|
23653
24396
|
const suffix = presentation?.suffix ?? '';
|
|
23654
24397
|
return `${prefix}${rawKey}${suffix}`;
|
|
23655
24398
|
}
|
|
24399
|
+
formatConfiguredSummaryValue(rawValue, fieldDef) {
|
|
24400
|
+
const config = fieldDef?.presentation?.valuePresentation ?? fieldDef?.valuePresentation;
|
|
24401
|
+
if (!config || !['number', 'currency', 'percentage'].includes(config.type)) {
|
|
24402
|
+
return null;
|
|
24403
|
+
}
|
|
24404
|
+
// Masked tokens and arbitrary strings must never be coerced into numeric data.
|
|
24405
|
+
if ((typeof rawValue !== 'number' && typeof rawValue !== 'string') ||
|
|
24406
|
+
String(rawValue).trim() === '' ||
|
|
24407
|
+
!Number.isFinite(Number(rawValue))) {
|
|
24408
|
+
return null;
|
|
24409
|
+
}
|
|
24410
|
+
const rawField = (fieldDef ?? {});
|
|
24411
|
+
const numericFormatToken = String(fieldDef?.numericFormat ?? rawField['format'] ?? '')
|
|
24412
|
+
.trim()
|
|
24413
|
+
.toLowerCase();
|
|
24414
|
+
const isImplicitIntegerField = config.type === 'number' &&
|
|
24415
|
+
!config.format &&
|
|
24416
|
+
config.number?.defaultPrecision === undefined &&
|
|
24417
|
+
typeof rawField['decimalPlaces'] !== 'number' &&
|
|
24418
|
+
['integer', 'int', 'int32', 'int64'].includes(numericFormatToken);
|
|
24419
|
+
// Field-level monetary metadata predates valuePresentation. Keep its host-owned
|
|
24420
|
+
// defaults instead of replacing an amount's currency with the resolver default.
|
|
24421
|
+
const configuredCurrency = config.type === 'currency'
|
|
24422
|
+
? {
|
|
24423
|
+
...config,
|
|
24424
|
+
currency: {
|
|
24425
|
+
...config.currency,
|
|
24426
|
+
code: config.currency?.code ||
|
|
24427
|
+
String(rawField['currency'] ?? rawField['currencyCode'] ?? 'BRL'),
|
|
24428
|
+
precision: config.currency?.precision ??
|
|
24429
|
+
(typeof rawField['decimalPlaces'] === 'number' ? rawField['decimalPlaces'] : 2),
|
|
24430
|
+
},
|
|
24431
|
+
}
|
|
24432
|
+
: config;
|
|
24433
|
+
const resolved = resolveValuePresentation(configuredCurrency, {
|
|
24434
|
+
valueLocale: typeof rawField['locale'] === 'string' ? rawField['locale'] : null,
|
|
24435
|
+
appLocale: this.runtimeContext?.effectiveContext?.locale ??
|
|
24436
|
+
this.i18n?.getLocale?.() ??
|
|
24437
|
+
'pt-BR',
|
|
24438
|
+
});
|
|
24439
|
+
const precision = isImplicitIntegerField
|
|
24440
|
+
? 0
|
|
24441
|
+
: (resolved.currency?.precision ?? resolved.number?.defaultPrecision ?? 2);
|
|
24442
|
+
// Reuse fraction precision from the canonical digitsInfo format when present,
|
|
24443
|
+
// except for integer fields that did not specify an explicit format or precision.
|
|
24444
|
+
const digits = isImplicitIntegerField
|
|
24445
|
+
? null
|
|
24446
|
+
: /^(\d+)\.(\d+)-(\d+)$/.exec(resolved.format ?? '');
|
|
24447
|
+
const format = {
|
|
24448
|
+
kind: config.type === 'percentage' ? 'percent' : config.type,
|
|
24449
|
+
locale: resolved.locale,
|
|
24450
|
+
minimumFractionDigits: digits ? Number(digits[2]) : precision,
|
|
24451
|
+
maximumFractionDigits: digits ? Number(digits[3]) : precision,
|
|
24452
|
+
...(resolved.currency ? { currency: resolved.currency.code } : {}),
|
|
24453
|
+
};
|
|
24454
|
+
try {
|
|
24455
|
+
return formatCompositionValue(rawValue, format);
|
|
24456
|
+
}
|
|
24457
|
+
catch {
|
|
24458
|
+
// An invalid presentation must leave the original value available to the legacy path.
|
|
24459
|
+
return null;
|
|
24460
|
+
}
|
|
24461
|
+
}
|
|
23656
24462
|
applyResolution(resolution, request, generation) {
|
|
23657
24463
|
if (generation !== this.activeGeneration) {
|
|
23658
24464
|
return;
|
|
@@ -23679,6 +24485,9 @@ class ResourceQuickViewService {
|
|
|
23679
24485
|
onOpenDetail: () => {
|
|
23680
24486
|
void this.openDetailFromActivePreview();
|
|
23681
24487
|
},
|
|
24488
|
+
onOpenSurface: (surfaceId) => {
|
|
24489
|
+
void this.openSurfaceFromActivePreview(surfaceId);
|
|
24490
|
+
},
|
|
23682
24491
|
onCopyValue: (value) => {
|
|
23683
24492
|
this.copyToClipboard(value);
|
|
23684
24493
|
},
|
|
@@ -23914,12 +24723,43 @@ class ResourceQuickViewService {
|
|
|
23914
24723
|
invalidateContextEpoch() {
|
|
23915
24724
|
this.contextEpoch += 1;
|
|
23916
24725
|
this.inFlightByCompositeKey.clear();
|
|
24726
|
+
this.projectionCacheByCompositeKey.clear();
|
|
24727
|
+
this._recordOpenService?.clearCaches?.();
|
|
23917
24728
|
this.suppressedTriggerKeys.clear();
|
|
23918
24729
|
if (this.stateSubject.value !== 'idle' &&
|
|
23919
24730
|
this.stateSubject.value !== 'dismissed') {
|
|
23920
24731
|
this.dismiss('context-change');
|
|
23921
24732
|
}
|
|
23922
24733
|
}
|
|
24734
|
+
getCachedProjection(compositeKey) {
|
|
24735
|
+
const entry = this.projectionCacheByCompositeKey.get(compositeKey);
|
|
24736
|
+
if (!entry) {
|
|
24737
|
+
return null;
|
|
24738
|
+
}
|
|
24739
|
+
if (Date.now() > entry.expiresAt) {
|
|
24740
|
+
this.projectionCacheByCompositeKey.delete(compositeKey);
|
|
24741
|
+
return null;
|
|
24742
|
+
}
|
|
24743
|
+
// Refresh LRU order
|
|
24744
|
+
this.projectionCacheByCompositeKey.delete(compositeKey);
|
|
24745
|
+
this.projectionCacheByCompositeKey.set(compositeKey, entry);
|
|
24746
|
+
return entry.value;
|
|
24747
|
+
}
|
|
24748
|
+
setCachedProjection(compositeKey, projection) {
|
|
24749
|
+
if (this.projectionCacheByCompositeKey.has(compositeKey)) {
|
|
24750
|
+
this.projectionCacheByCompositeKey.delete(compositeKey);
|
|
24751
|
+
}
|
|
24752
|
+
else if (this.projectionCacheByCompositeKey.size >= MAX_PROJECTION_CACHE_ENTRIES) {
|
|
24753
|
+
const oldestKey = this.projectionCacheByCompositeKey.keys().next().value;
|
|
24754
|
+
if (oldestKey !== undefined) {
|
|
24755
|
+
this.projectionCacheByCompositeKey.delete(oldestKey);
|
|
24756
|
+
}
|
|
24757
|
+
}
|
|
24758
|
+
this.projectionCacheByCompositeKey.set(compositeKey, {
|
|
24759
|
+
value: projection,
|
|
24760
|
+
expiresAt: Date.now() + DEFAULT_PROJECTION_CACHE_TTL_MS,
|
|
24761
|
+
});
|
|
24762
|
+
}
|
|
23923
24763
|
resolveFocusOrigin(anchor) {
|
|
23924
24764
|
if (anchor.focusOrigin && anchor.focusOrigin.isConnected !== false) {
|
|
23925
24765
|
return anchor.focusOrigin;
|
|
@@ -25911,13 +26751,20 @@ class SurfaceOpenMaterializerService {
|
|
|
25911
26751
|
if (data && typeof data === 'object' && !Array.isArray(data)) {
|
|
25912
26752
|
const objectData = data;
|
|
25913
26753
|
if (payload.widget.id === 'praxis-dynamic-form') {
|
|
26754
|
+
const projectedInputs = this.projectMaterializedFormInputs(payload.widget.inputs || {});
|
|
26755
|
+
const effectiveMode = String(projectedInputs['mode'] || 'view');
|
|
26756
|
+
const hasSchemaUrl = Boolean(String(projectedInputs['schemaUrl'] || '').trim());
|
|
26757
|
+
if (effectiveMode === 'view' && hasSchemaUrl) {
|
|
26758
|
+
delete projectedInputs['readUrl'];
|
|
26759
|
+
delete projectedInputs['resourcePath'];
|
|
26760
|
+
}
|
|
25914
26761
|
return {
|
|
25915
26762
|
...payload,
|
|
25916
26763
|
widget: {
|
|
25917
26764
|
...payload.widget,
|
|
25918
26765
|
inputs: {
|
|
25919
|
-
...
|
|
25920
|
-
mode:
|
|
26766
|
+
...projectedInputs,
|
|
26767
|
+
mode: effectiveMode,
|
|
25921
26768
|
initialValue: objectData,
|
|
25922
26769
|
resourceId,
|
|
25923
26770
|
layoutPolicy: payload.widget.inputs?.['layoutPolicy'] || {
|
|
@@ -29170,169 +30017,6 @@ function isPlainRecord(value) {
|
|
|
29170
30017
|
return prototype === Object.prototype || prototype === null;
|
|
29171
30018
|
}
|
|
29172
30019
|
|
|
29173
|
-
const DEFAULT_LOCALE = 'en-US';
|
|
29174
|
-
const DEFAULT_DATE_TIME = {
|
|
29175
|
-
dateFormat: 'shortDate',
|
|
29176
|
-
timeFormat: 'shortTime',
|
|
29177
|
-
dateTimeFormat: 'short',
|
|
29178
|
-
firstDayOfWeek: 0,
|
|
29179
|
-
relativeTime: false,
|
|
29180
|
-
};
|
|
29181
|
-
const DEFAULT_NUMBER = {
|
|
29182
|
-
decimalSeparator: '.',
|
|
29183
|
-
thousandsSeparator: ',',
|
|
29184
|
-
defaultPrecision: 2,
|
|
29185
|
-
negativeSign: '-',
|
|
29186
|
-
negativeSignPosition: 'before',
|
|
29187
|
-
};
|
|
29188
|
-
const DEFAULT_CURRENCY = {
|
|
29189
|
-
code: 'USD',
|
|
29190
|
-
symbol: '$',
|
|
29191
|
-
position: 'before',
|
|
29192
|
-
spacing: false,
|
|
29193
|
-
precision: 2,
|
|
29194
|
-
};
|
|
29195
|
-
const IMPLICIT_FORMAT_TYPES = new Set([
|
|
29196
|
-
'number',
|
|
29197
|
-
'currency',
|
|
29198
|
-
'percentage',
|
|
29199
|
-
'date',
|
|
29200
|
-
'datetime',
|
|
29201
|
-
'time',
|
|
29202
|
-
]);
|
|
29203
|
-
function resolveValuePresentation(config, context) {
|
|
29204
|
-
const localization = context?.localization ?? null;
|
|
29205
|
-
const locale = resolveValuePresentationLocale(context, localization);
|
|
29206
|
-
const number = resolveNumberLocaleConfig(config, localization);
|
|
29207
|
-
const currency = resolveCurrencyLocaleConfig(config, localization);
|
|
29208
|
-
const dateTime = resolveDateTimeLocaleConfig(localization);
|
|
29209
|
-
return {
|
|
29210
|
-
type: config.type,
|
|
29211
|
-
locale,
|
|
29212
|
-
style: config.style,
|
|
29213
|
-
format: config.format ||
|
|
29214
|
-
resolveDefaultValuePresentationFormat(config.type, config.style, {
|
|
29215
|
-
localization,
|
|
29216
|
-
number,
|
|
29217
|
-
currency,
|
|
29218
|
-
dateTime,
|
|
29219
|
-
}),
|
|
29220
|
-
currency: config.type === 'currency' ? currency : undefined,
|
|
29221
|
-
number: config.type === 'number' || config.type === 'percentage'
|
|
29222
|
-
? number
|
|
29223
|
-
: undefined,
|
|
29224
|
-
dateTime: config.type === 'date' ||
|
|
29225
|
-
config.type === 'datetime' ||
|
|
29226
|
-
config.type === 'time'
|
|
29227
|
-
? dateTime
|
|
29228
|
-
: undefined,
|
|
29229
|
-
};
|
|
29230
|
-
}
|
|
29231
|
-
function resolveValuePresentationLocale(context, localization) {
|
|
29232
|
-
return (context?.valueLocale ||
|
|
29233
|
-
localization?.locale ||
|
|
29234
|
-
context?.surfaceLocale ||
|
|
29235
|
-
context?.appLocale ||
|
|
29236
|
-
DEFAULT_LOCALE);
|
|
29237
|
-
}
|
|
29238
|
-
function supportsImplicitValuePresentation(type) {
|
|
29239
|
-
return !!type && IMPLICIT_FORMAT_TYPES.has(type);
|
|
29240
|
-
}
|
|
29241
|
-
function resolveDefaultValuePresentationFormat(type, style, context) {
|
|
29242
|
-
switch (type) {
|
|
29243
|
-
case 'date':
|
|
29244
|
-
return resolveDateFormat(style, context.dateTime.dateFormat);
|
|
29245
|
-
case 'datetime':
|
|
29246
|
-
return resolveDateTimeFormat(style, context.dateTime.dateTimeFormat);
|
|
29247
|
-
case 'time':
|
|
29248
|
-
return resolveTimeFormat(style, context.dateTime.timeFormat);
|
|
29249
|
-
case 'number':
|
|
29250
|
-
return resolveDigitsFormat(context.number.defaultPrecision);
|
|
29251
|
-
case 'currency':
|
|
29252
|
-
return `${context.currency.code}|symbol|${context.currency.precision}`;
|
|
29253
|
-
case 'percentage':
|
|
29254
|
-
return (context.localization?.formatting?.percentageFormat ||
|
|
29255
|
-
resolveDigitsFormat(context.number.defaultPrecision));
|
|
29256
|
-
default:
|
|
29257
|
-
return undefined;
|
|
29258
|
-
}
|
|
29259
|
-
}
|
|
29260
|
-
function resolveDateTimeLocaleConfig(localization) {
|
|
29261
|
-
return {
|
|
29262
|
-
...DEFAULT_DATE_TIME,
|
|
29263
|
-
...(localization?.dateTime || {}),
|
|
29264
|
-
};
|
|
29265
|
-
}
|
|
29266
|
-
function resolveNumberLocaleConfig(config, localization) {
|
|
29267
|
-
return {
|
|
29268
|
-
...DEFAULT_NUMBER,
|
|
29269
|
-
...(localization?.number || {}),
|
|
29270
|
-
...(config.number || {}),
|
|
29271
|
-
};
|
|
29272
|
-
}
|
|
29273
|
-
function resolveCurrencyLocaleConfig(config, localization) {
|
|
29274
|
-
return {
|
|
29275
|
-
...DEFAULT_CURRENCY,
|
|
29276
|
-
...(localization?.currency || {}),
|
|
29277
|
-
...(config.currency || {}),
|
|
29278
|
-
};
|
|
29279
|
-
}
|
|
29280
|
-
function resolveDateFormat(style, fallback) {
|
|
29281
|
-
switch (style) {
|
|
29282
|
-
case 'short':
|
|
29283
|
-
return 'shortDate';
|
|
29284
|
-
case 'medium':
|
|
29285
|
-
return 'mediumDate';
|
|
29286
|
-
case 'long':
|
|
29287
|
-
return 'longDate';
|
|
29288
|
-
case 'full':
|
|
29289
|
-
return 'fullDate';
|
|
29290
|
-
default:
|
|
29291
|
-
return fallback || DEFAULT_DATE_TIME.dateFormat;
|
|
29292
|
-
}
|
|
29293
|
-
}
|
|
29294
|
-
function resolveDateTimeFormat(style, fallback) {
|
|
29295
|
-
switch (style) {
|
|
29296
|
-
case 'short':
|
|
29297
|
-
return 'short';
|
|
29298
|
-
case 'medium':
|
|
29299
|
-
return 'medium';
|
|
29300
|
-
case 'long':
|
|
29301
|
-
return 'long';
|
|
29302
|
-
case 'full':
|
|
29303
|
-
return 'full';
|
|
29304
|
-
default:
|
|
29305
|
-
return fallback || DEFAULT_DATE_TIME.dateTimeFormat;
|
|
29306
|
-
}
|
|
29307
|
-
}
|
|
29308
|
-
function resolveTimeFormat(style, fallback) {
|
|
29309
|
-
switch (style) {
|
|
29310
|
-
case 'short':
|
|
29311
|
-
return 'shortTime';
|
|
29312
|
-
case 'medium':
|
|
29313
|
-
return 'mediumTime';
|
|
29314
|
-
case 'long':
|
|
29315
|
-
return 'longTime';
|
|
29316
|
-
case 'full':
|
|
29317
|
-
return 'fullTime';
|
|
29318
|
-
default:
|
|
29319
|
-
return fallback || DEFAULT_DATE_TIME.timeFormat;
|
|
29320
|
-
}
|
|
29321
|
-
}
|
|
29322
|
-
function resolveDigitsFormat(defaultPrecision) {
|
|
29323
|
-
const precision = clampPrecision(defaultPrecision);
|
|
29324
|
-
return `1.${precision}-${precision}`;
|
|
29325
|
-
}
|
|
29326
|
-
function clampPrecision(value) {
|
|
29327
|
-
if (typeof value !== 'number' || Number.isNaN(value)) {
|
|
29328
|
-
return DEFAULT_NUMBER.defaultPrecision;
|
|
29329
|
-
}
|
|
29330
|
-
if (value < 0) {
|
|
29331
|
-
return 0;
|
|
29332
|
-
}
|
|
29333
|
-
return Math.floor(value);
|
|
29334
|
-
}
|
|
29335
|
-
|
|
29336
30020
|
function isPraxisRuntimeGlobalActionEffect(value) {
|
|
29337
30021
|
const candidate = value;
|
|
29338
30022
|
return (!!candidate &&
|
|
@@ -46629,7 +47313,7 @@ class PraxisResourceIdentityComponent {
|
|
|
46629
47313
|
</div>
|
|
46630
47314
|
}
|
|
46631
47315
|
</div>
|
|
46632
|
-
`, isInline: true, styles: [":host{display:block;min-width:0}.identity{display:grid;gap:var(--pdx-resource-identity-gap, .375rem);min-width:0}.identity__primary{display:flex;align-items:center;gap:var(--pdx-resource-identity-primary-gap, .625rem);min-width:0;flex-wrap:wrap}.identity__key{display:inline-flex;align-items:center;min-height:1.75rem;padding:.125rem .625rem;border-radius:var(--pdx-resource-identity-key-radius, .5rem);background:var(--pdx-resource-identity-key-bg, var(--md-sys-color-primary));color:var(--pdx-resource-identity-key-fg, var(--md-sys-color-on-primary));font:var(--pdx-resource-identity-key-font, 600 .8125rem/1.25rem var(--md-sys-typescale-label-large-font-family, inherit));letter-spacing:.02em;white-space:nowrap}.identity__key-label{font-weight:500;opacity:.84;margin-inline-end:.25rem}.identity__title{min-width:0;overflow:hidden;text-overflow:ellipsis;color:var(--pdx-resource-identity-title-color, var(--md-sys-color-on-surface));font:var(--pdx-resource-identity-title-font, 600 1.125rem/1.
|
|
47316
|
+
`, isInline: true, styles: [":host{display:block;min-width:0}.identity{display:grid;gap:var(--pdx-resource-identity-gap, .375rem);min-width:0}.identity__primary{display:flex;align-items:center;gap:var(--pdx-resource-identity-primary-gap, .625rem);min-width:0;flex-wrap:wrap}.identity__key{display:inline-flex;align-items:center;min-height:1.75rem;padding:.125rem .625rem;border-radius:var(--pdx-resource-identity-key-radius, .5rem);background:var(--pdx-resource-identity-key-bg, var(--md-sys-color-primary));color:var(--pdx-resource-identity-key-fg, var(--md-sys-color-on-primary));font:var(--pdx-resource-identity-key-font, 600 .8125rem/1.25rem var(--md-sys-typescale-label-large-font-family, inherit));letter-spacing:.02em;white-space:nowrap}.identity__key-label{font-weight:500;opacity:.84;margin-inline-end:.25rem}.identity__title{flex:1 1 12rem;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:var(--pdx-resource-identity-title-wrap, normal);overflow-wrap:anywhere;color:var(--pdx-resource-identity-title-color, var(--md-sys-color-on-surface));font:var(--pdx-resource-identity-title-font, 600 1.125rem/1.35 var(--md-sys-typescale-title-medium-font-family, inherit))}.identity__metadata{display:flex;align-items:center;gap:.375rem .5rem;flex-wrap:wrap;color:var(--md-sys-color-on-surface-variant)}.identity__meta{display:inline-flex;align-items:center;gap:.25rem;min-width:0;font-size:.8125rem;line-height:1.25rem}.identity__meta+.identity__meta:not(.identity__meta--chip):before{content:\"\\b7\";margin-inline-end:.25rem;color:var(--md-sys-color-outline)}.identity__meta--chip{padding:.0625rem .5rem;border-radius:999px;background:var(--md-sys-color-surface-container-high);color:var(--md-sys-color-on-surface-variant)}.identity__meta-label{color:var(--md-sys-color-on-surface-variant);font-weight:500}.identity--compact{gap:.25rem}.identity--compact .identity__key{min-height:1.5rem;padding-inline:.5rem}.identity--compact .identity__title{font-size:1rem}@media(max-width:600px){.identity__primary{align-items:flex-start;gap:.375rem .5rem}.identity__title{flex:1 1 12rem;white-space:normal;overflow:visible}.identity__metadata{gap:.25rem .375rem}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
46633
47317
|
}
|
|
46634
47318
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PraxisResourceIdentityComponent, decorators: [{
|
|
46635
47319
|
type: Component,
|
|
@@ -46672,7 +47356,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
46672
47356
|
</div>
|
|
46673
47357
|
}
|
|
46674
47358
|
</div>
|
|
46675
|
-
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;min-width:0}.identity{display:grid;gap:var(--pdx-resource-identity-gap, .375rem);min-width:0}.identity__primary{display:flex;align-items:center;gap:var(--pdx-resource-identity-primary-gap, .625rem);min-width:0;flex-wrap:wrap}.identity__key{display:inline-flex;align-items:center;min-height:1.75rem;padding:.125rem .625rem;border-radius:var(--pdx-resource-identity-key-radius, .5rem);background:var(--pdx-resource-identity-key-bg, var(--md-sys-color-primary));color:var(--pdx-resource-identity-key-fg, var(--md-sys-color-on-primary));font:var(--pdx-resource-identity-key-font, 600 .8125rem/1.25rem var(--md-sys-typescale-label-large-font-family, inherit));letter-spacing:.02em;white-space:nowrap}.identity__key-label{font-weight:500;opacity:.84;margin-inline-end:.25rem}.identity__title{min-width:0;overflow:hidden;text-overflow:ellipsis;color:var(--pdx-resource-identity-title-color, var(--md-sys-color-on-surface));font:var(--pdx-resource-identity-title-font, 600 1.125rem/1.
|
|
47359
|
+
`, changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block;min-width:0}.identity{display:grid;gap:var(--pdx-resource-identity-gap, .375rem);min-width:0}.identity__primary{display:flex;align-items:center;gap:var(--pdx-resource-identity-primary-gap, .625rem);min-width:0;flex-wrap:wrap}.identity__key{display:inline-flex;align-items:center;min-height:1.75rem;padding:.125rem .625rem;border-radius:var(--pdx-resource-identity-key-radius, .5rem);background:var(--pdx-resource-identity-key-bg, var(--md-sys-color-primary));color:var(--pdx-resource-identity-key-fg, var(--md-sys-color-on-primary));font:var(--pdx-resource-identity-key-font, 600 .8125rem/1.25rem var(--md-sys-typescale-label-large-font-family, inherit));letter-spacing:.02em;white-space:nowrap}.identity__key-label{font-weight:500;opacity:.84;margin-inline-end:.25rem}.identity__title{flex:1 1 12rem;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:var(--pdx-resource-identity-title-wrap, normal);overflow-wrap:anywhere;color:var(--pdx-resource-identity-title-color, var(--md-sys-color-on-surface));font:var(--pdx-resource-identity-title-font, 600 1.125rem/1.35 var(--md-sys-typescale-title-medium-font-family, inherit))}.identity__metadata{display:flex;align-items:center;gap:.375rem .5rem;flex-wrap:wrap;color:var(--md-sys-color-on-surface-variant)}.identity__meta{display:inline-flex;align-items:center;gap:.25rem;min-width:0;font-size:.8125rem;line-height:1.25rem}.identity__meta+.identity__meta:not(.identity__meta--chip):before{content:\"\\b7\";margin-inline-end:.25rem;color:var(--md-sys-color-outline)}.identity__meta--chip{padding:.0625rem .5rem;border-radius:999px;background:var(--md-sys-color-surface-container-high);color:var(--md-sys-color-on-surface-variant)}.identity__meta-label{color:var(--md-sys-color-on-surface-variant);font-weight:500}.identity--compact{gap:.25rem}.identity--compact .identity__key{min-height:1.5rem;padding-inline:.5rem}.identity--compact .identity__title{font-size:1rem}@media(max-width:600px){.identity__primary{align-items:flex-start;gap:.375rem .5rem}.identity__title{flex:1 1 12rem;white-space:normal;overflow:visible}.identity__metadata{gap:.25rem .375rem}}\n"] }]
|
|
46676
47360
|
}], propDecorators: { identity: [{
|
|
46677
47361
|
type: Input
|
|
46678
47362
|
}], emptyTitle: [{
|
|
@@ -47224,95 +47908,6 @@ class WidgetPageCompositionFactory {
|
|
|
47224
47908
|
}
|
|
47225
47909
|
}
|
|
47226
47910
|
|
|
47227
|
-
/** Shared presentation for derived state and links. Never infers meaning from field names. */
|
|
47228
|
-
function validateCompositionValueFormat(format) {
|
|
47229
|
-
const spec = typeof format === 'string' ? { kind: format } : format;
|
|
47230
|
-
if (!spec || !['integer', 'number', 'currency', 'percent', 'date', 'mask'].includes(String(spec['kind']))) {
|
|
47231
|
-
throw new Error('Unsupported value format kind.');
|
|
47232
|
-
}
|
|
47233
|
-
const numericKind = ['number', 'currency', 'percent'].includes(String(spec['kind']));
|
|
47234
|
-
const keys = ['kind', 'locale', ...(numericKind ? ['minimumFractionDigits', 'maximumFractionDigits'] : []),
|
|
47235
|
-
...(spec['kind'] === 'currency' ? ['currency'] : []), ...(spec['kind'] === 'mask' ? ['mask'] : [])];
|
|
47236
|
-
if (Object.keys(spec).some(key => !keys.includes(key)))
|
|
47237
|
-
throw new Error('Unknown value format option.');
|
|
47238
|
-
if (spec['locale'] !== undefined) {
|
|
47239
|
-
if (typeof spec['locale'] !== 'string' || !spec['locale'].trim())
|
|
47240
|
-
throw new Error('Invalid format locale.');
|
|
47241
|
-
Intl.getCanonicalLocales(spec['locale']);
|
|
47242
|
-
}
|
|
47243
|
-
for (const key of ['minimumFractionDigits', 'maximumFractionDigits']) {
|
|
47244
|
-
const digits = spec[key];
|
|
47245
|
-
if (digits !== undefined && (typeof digits !== 'number' || !Number.isInteger(digits) || digits < 0 || digits > 20)) {
|
|
47246
|
-
throw new Error('Fraction digits must be integers between 0 and 20.');
|
|
47247
|
-
}
|
|
47248
|
-
}
|
|
47249
|
-
const minimum = spec['minimumFractionDigits'] ?? (spec['kind'] === 'currency' ? 2 : 0);
|
|
47250
|
-
const maximum = spec['maximumFractionDigits'] ?? (spec['kind'] === 'currency' ? 2 : spec['kind'] === 'percent' ? 1 : 0);
|
|
47251
|
-
if (numericKind && Number(minimum) > Number(maximum))
|
|
47252
|
-
throw new Error('Invalid fraction digit range.');
|
|
47253
|
-
if (spec['currency'] !== undefined && (typeof spec['currency'] !== 'string' || !/^[A-Z]{3}$/.test(spec['currency']))) {
|
|
47254
|
-
throw new Error('Currency must be a three-letter uppercase code.');
|
|
47255
|
-
}
|
|
47256
|
-
if (spec['kind'] === 'mask') {
|
|
47257
|
-
const mask = spec['mask'];
|
|
47258
|
-
if (typeof mask !== 'string' || mask.length > 128 || !mask.includes('0') || !/^[0 .()/+\-]+$/.test(mask)) {
|
|
47259
|
-
throw new Error('Mask must contain digit slots (0) and literal separators.');
|
|
47260
|
-
}
|
|
47261
|
-
}
|
|
47262
|
-
}
|
|
47263
|
-
function formatCompositionValue(value, format) {
|
|
47264
|
-
if (format == null)
|
|
47265
|
-
return value == null ? '' : String(value);
|
|
47266
|
-
validateCompositionValueFormat(format);
|
|
47267
|
-
const spec = (typeof format === 'string' ? { kind: format } : format);
|
|
47268
|
-
const locale = typeof spec['locale'] === 'string' ? spec['locale'] : 'pt-BR';
|
|
47269
|
-
const number = typeof value === 'number' || (typeof value === 'string' && value.trim()) ? Number(value) : 0;
|
|
47270
|
-
const numeric = Number.isFinite(number) ? number : 0;
|
|
47271
|
-
switch (spec['kind']) {
|
|
47272
|
-
case 'integer': return new Intl.NumberFormat(locale, { maximumFractionDigits: 0, minimumFractionDigits: 0 }).format(numeric);
|
|
47273
|
-
case 'number': return new Intl.NumberFormat(locale, {
|
|
47274
|
-
maximumFractionDigits: Number(spec['maximumFractionDigits']) || 0,
|
|
47275
|
-
minimumFractionDigits: Number(spec['minimumFractionDigits']) || 0,
|
|
47276
|
-
}).format(numeric);
|
|
47277
|
-
case 'currency': return new Intl.NumberFormat(locale, {
|
|
47278
|
-
style: 'currency', currency: typeof spec['currency'] === 'string' ? spec['currency'] : 'BRL',
|
|
47279
|
-
maximumFractionDigits: spec['maximumFractionDigits'] ?? 2,
|
|
47280
|
-
minimumFractionDigits: spec['minimumFractionDigits'] ?? 2,
|
|
47281
|
-
}).format(numeric);
|
|
47282
|
-
case 'percent': return new Intl.NumberFormat(locale, {
|
|
47283
|
-
style: 'percent', maximumFractionDigits: spec['maximumFractionDigits'] ?? 1,
|
|
47284
|
-
minimumFractionDigits: spec['minimumFractionDigits'] ?? 0,
|
|
47285
|
-
}).format(numeric);
|
|
47286
|
-
case 'date': {
|
|
47287
|
-
if (value == null || value === '')
|
|
47288
|
-
return '';
|
|
47289
|
-
if (typeof value !== 'string' || !/^\d{4}-\d{2}-\d{2}$/.test(value))
|
|
47290
|
-
throw new Error('Expected a civil date in YYYY-MM-DD format.');
|
|
47291
|
-
const [year, month, day] = value.split('-').map(Number);
|
|
47292
|
-
const date = new Date(0);
|
|
47293
|
-
date.setUTCFullYear(year, month - 1, day);
|
|
47294
|
-
if (year < 1 || date.getUTCFullYear() !== year || date.getUTCMonth() !== month - 1 || date.getUTCDate() !== day) {
|
|
47295
|
-
throw new Error('Invalid civil date.');
|
|
47296
|
-
}
|
|
47297
|
-
return new Intl.DateTimeFormat(locale, { timeZone: 'UTC', year: 'numeric', month: '2-digit', day: '2-digit' }).format(date);
|
|
47298
|
-
}
|
|
47299
|
-
case 'mask': {
|
|
47300
|
-
if (value == null || value === '')
|
|
47301
|
-
return '';
|
|
47302
|
-
if (typeof value !== 'string')
|
|
47303
|
-
throw new Error('Masked values must be strings to preserve leading zeros.');
|
|
47304
|
-
const digits = value.replace(/[ .()/+\-]/g, '');
|
|
47305
|
-
const mask = spec['mask'];
|
|
47306
|
-
if (!/^\d+$/.test(digits) || digits.length !== [...mask].filter(token => token === '0').length) {
|
|
47307
|
-
throw new Error('Value does not match the mask digit count.');
|
|
47308
|
-
}
|
|
47309
|
-
let index = 0;
|
|
47310
|
-
return [...mask].map(token => token === '0' ? digits[index++] : token).join('');
|
|
47311
|
-
}
|
|
47312
|
-
default: throw new Error('Unsupported value format kind.');
|
|
47313
|
-
}
|
|
47314
|
-
}
|
|
47315
|
-
|
|
47316
47911
|
class ConnectionManagerService {
|
|
47317
47912
|
/** Extract value from an object using dot-path (e.g., 'payload.row.id'). */
|
|
47318
47913
|
extractByPath(obj, path) {
|
|
@@ -62447,6 +63042,440 @@ function providePraxisDynamicPageMetadata() {
|
|
|
62447
63042
|
};
|
|
62448
63043
|
}
|
|
62449
63044
|
|
|
63045
|
+
class PraxisRelatedResourceOutletComponent {
|
|
63046
|
+
resolver = inject(RelatedResourceSurfaceResolverService);
|
|
63047
|
+
i18n = inject(PraxisI18nService);
|
|
63048
|
+
injector = inject(Injector);
|
|
63049
|
+
discoverySubscription;
|
|
63050
|
+
discoveryRequestKey = '';
|
|
63051
|
+
materializationRequestKey = '';
|
|
63052
|
+
surface = input(null, ...(ngDevMode ? [{ debugName: "surface" }] : /* istanbul ignore next */ []));
|
|
63053
|
+
surfaceId = input(null, ...(ngDevMode ? [{ debugName: "surfaceId" }] : /* istanbul ignore next */ []));
|
|
63054
|
+
surfaceCatalog = input(null, ...(ngDevMode ? [{ debugName: "surfaceCatalog" }] : /* istanbul ignore next */ []));
|
|
63055
|
+
discoverySource = input(null, ...(ngDevMode ? [{ debugName: "discoverySource" }] : /* istanbul ignore next */ []));
|
|
63056
|
+
parentLinks = input(null, ...(ngDevMode ? [{ debugName: "parentLinks" }] : /* istanbul ignore next */ []));
|
|
63057
|
+
apiEndpointKey = input(null, ...(ngDevMode ? [{ debugName: "apiEndpointKey" }] : /* istanbul ignore next */ []));
|
|
63058
|
+
apiUrlEntry = input(null, ...(ngDevMode ? [{ debugName: "apiUrlEntry" }] : /* istanbul ignore next */ []));
|
|
63059
|
+
parentRecord = input(null, ...(ngDevMode ? [{ debugName: "parentRecord" }] : /* istanbul ignore next */ []));
|
|
63060
|
+
parentResourceId = input(null, ...(ngDevMode ? [{ debugName: "parentResourceId" }] : /* istanbul ignore next */ []));
|
|
63061
|
+
parentIdentity = input(null, ...(ngDevMode ? [{ debugName: "parentIdentity" }] : /* istanbul ignore next */ []));
|
|
63062
|
+
parentResourcePath = input(null, ...(ngDevMode ? [{ debugName: "parentResourcePath" }] : /* istanbul ignore next */ []));
|
|
63063
|
+
presentation = input('drawer', ...(ngDevMode ? [{ debugName: "presentation" }] : /* istanbul ignore next */ []));
|
|
63064
|
+
title = input(null, ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
63065
|
+
subtitle = input(null, ...(ngDevMode ? [{ debugName: "subtitle" }] : /* istanbul ignore next */ []));
|
|
63066
|
+
icon = input(null, ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
63067
|
+
tableId = input(null, ...(ngDevMode ? [{ debugName: "tableId" }] : /* istanbul ignore next */ []));
|
|
63068
|
+
tableConfig = input(null, ...(ngDevMode ? [{ debugName: "tableConfig" }] : /* istanbul ignore next */ []));
|
|
63069
|
+
enableCustomization = input(false, ...(ngDevMode ? [{ debugName: "enableCustomization" }] : /* istanbul ignore next */ []));
|
|
63070
|
+
authoringCapability = input(null, ...(ngDevMode ? [{ debugName: "authoringCapability" }] : /* istanbul ignore next */ []));
|
|
63071
|
+
emptyState = input(null, ...(ngDevMode ? [{ debugName: "emptyState" }] : /* istanbul ignore next */ []));
|
|
63072
|
+
queryContext = input(null, ...(ngDevMode ? [{ debugName: "queryContext" }] : /* istanbul ignore next */ []));
|
|
63073
|
+
mode = input('inline', ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
63074
|
+
state = input(null, ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
|
|
63075
|
+
stateReason = input(null, ...(ngDevMode ? [{ debugName: "stateReason" }] : /* istanbul ignore next */ []));
|
|
63076
|
+
compact = input(false, ...(ngDevMode ? [{ debugName: "compact" }] : /* istanbul ignore next */ []));
|
|
63077
|
+
strictValidation = input(false, ...(ngDevMode ? [{ debugName: "strictValidation" }] : /* istanbul ignore next */ []));
|
|
63078
|
+
ownerWidgetKey = input('related-resource.outlet', ...(ngDevMode ? [{ debugName: "ownerWidgetKey" }] : /* istanbul ignore next */ []));
|
|
63079
|
+
surfaceOpen = output();
|
|
63080
|
+
widgetEvent = output();
|
|
63081
|
+
resourceEvent = output();
|
|
63082
|
+
discoveredSurface = signal(null, ...(ngDevMode ? [{ debugName: "discoveredSurface" }] : /* istanbul ignore next */ []));
|
|
63083
|
+
discoveryState = signal(null, ...(ngDevMode ? [{ debugName: "discoveryState" }] : /* istanbul ignore next */ []));
|
|
63084
|
+
discoveryStateReason = signal(null, ...(ngDevMode ? [{ debugName: "discoveryStateReason" }] : /* istanbul ignore next */ []));
|
|
63085
|
+
materializedPayload = signal(null, ...(ngDevMode ? [{ debugName: "materializedPayload" }] : /* istanbul ignore next */ []));
|
|
63086
|
+
resolution = computed(() => {
|
|
63087
|
+
const state = this.state();
|
|
63088
|
+
if (state && state !== 'ready') {
|
|
63089
|
+
return this.resolver.state(state, this.stateReason() || undefined);
|
|
63090
|
+
}
|
|
63091
|
+
const discoveryState = this.discoveryState();
|
|
63092
|
+
if (discoveryState && discoveryState !== 'ready') {
|
|
63093
|
+
return this.resolver.state(discoveryState, this.discoveryStateReason() || undefined);
|
|
63094
|
+
}
|
|
63095
|
+
return this.resolver.resolve({
|
|
63096
|
+
surface: this.surface() || this.discoveredSurface(),
|
|
63097
|
+
parentRecord: this.parentRecord(),
|
|
63098
|
+
parentResourceId: this.parentResourceId(),
|
|
63099
|
+
parentIdentity: this.parentIdentity(),
|
|
63100
|
+
parentResourcePath: this.parentResourcePath(),
|
|
63101
|
+
presentation: this.presentation(),
|
|
63102
|
+
title: this.title(),
|
|
63103
|
+
subtitle: this.subtitle(),
|
|
63104
|
+
icon: this.icon(),
|
|
63105
|
+
tableId: this.tableId(),
|
|
63106
|
+
tableConfig: this.tableConfig(),
|
|
63107
|
+
enableCustomization: this.enableCustomization(),
|
|
63108
|
+
authoringCapability: this.authoringCapability(),
|
|
63109
|
+
emptyState: this.emptyState(),
|
|
63110
|
+
queryContext: this.queryContext(),
|
|
63111
|
+
apiEndpointKey: this.apiEndpointKey(),
|
|
63112
|
+
apiUrlEntry: this.apiUrlEntry(),
|
|
63113
|
+
});
|
|
63114
|
+
}, ...(ngDevMode ? [{ debugName: "resolution" }] : /* istanbul ignore next */ []));
|
|
63115
|
+
renderResolution = computed(() => {
|
|
63116
|
+
const resolution = this.resolution();
|
|
63117
|
+
const materializedPayload = this.materializedPayload();
|
|
63118
|
+
if (resolution.state !== 'ready') {
|
|
63119
|
+
return resolution;
|
|
63120
|
+
}
|
|
63121
|
+
if (!materializedPayload && this.mode() === 'inline' && resolution.payload?.widget) {
|
|
63122
|
+
return this.resolver.state('loading', 'related-resource-materializing');
|
|
63123
|
+
}
|
|
63124
|
+
if (!materializedPayload) {
|
|
63125
|
+
return resolution;
|
|
63126
|
+
}
|
|
63127
|
+
return {
|
|
63128
|
+
...resolution,
|
|
63129
|
+
payload: materializedPayload,
|
|
63130
|
+
};
|
|
63131
|
+
}, ...(ngDevMode ? [{ debugName: "renderResolution" }] : /* istanbul ignore next */ []));
|
|
63132
|
+
isBusy = computed(() => {
|
|
63133
|
+
const state = this.renderResolution().state;
|
|
63134
|
+
return state === 'resolving' || state === 'loading';
|
|
63135
|
+
}, ...(ngDevMode ? [{ debugName: "isBusy" }] : /* istanbul ignore next */ []));
|
|
63136
|
+
constructor() {
|
|
63137
|
+
effect((onCleanup) => {
|
|
63138
|
+
const surface = this.surface();
|
|
63139
|
+
const surfaceId = this.surfaceId();
|
|
63140
|
+
const catalog = this.surfaceCatalog();
|
|
63141
|
+
const discoverySource = this.discoverySource() || this.parentLinks();
|
|
63142
|
+
const parentRecord = this.parentRecord();
|
|
63143
|
+
const parentResourcePath = this.parentResourcePath();
|
|
63144
|
+
const parentResourceId = this.parentResourceId();
|
|
63145
|
+
const apiEndpointKey = this.apiEndpointKey();
|
|
63146
|
+
const apiUrlEntry = this.apiUrlEntry();
|
|
63147
|
+
this.discoverySubscription?.unsubscribe();
|
|
63148
|
+
this.discoverySubscription = undefined;
|
|
63149
|
+
if (surface || !this.trim(surfaceId)) {
|
|
63150
|
+
this.resetDiscoveryState();
|
|
63151
|
+
return;
|
|
63152
|
+
}
|
|
63153
|
+
if (this.trim(parentResourcePath)
|
|
63154
|
+
&& (parentResourceId == null || parentResourceId === '')
|
|
63155
|
+
&& !parentRecord) {
|
|
63156
|
+
this.discoveredSurface.set(null);
|
|
63157
|
+
this.discoveryState.set('idle');
|
|
63158
|
+
this.discoveryStateReason.set('parent-resource-id-not-resolved');
|
|
63159
|
+
return;
|
|
63160
|
+
}
|
|
63161
|
+
if (catalog) {
|
|
63162
|
+
this.applyCatalogSurface(surfaceId, catalog);
|
|
63163
|
+
return;
|
|
63164
|
+
}
|
|
63165
|
+
const href = this.resolveFallbackSurfaceCatalogHref(parentResourcePath, parentResourceId);
|
|
63166
|
+
if (!discoverySource && !href) {
|
|
63167
|
+
this.discoveredSurface.set(null);
|
|
63168
|
+
this.discoveryState.set('not-found');
|
|
63169
|
+
this.discoveryStateReason.set('surface-discovery-source-not-provided');
|
|
63170
|
+
return;
|
|
63171
|
+
}
|
|
63172
|
+
const options = this.discoveryOptions(apiEndpointKey, apiUrlEntry);
|
|
63173
|
+
const requestKey = this.buildDiscoveryRequestKey(surfaceId, discoverySource, href, options);
|
|
63174
|
+
this.discoveryRequestKey = requestKey;
|
|
63175
|
+
this.discoveredSurface.set(null);
|
|
63176
|
+
this.discoveryState.set('resolving');
|
|
63177
|
+
this.discoveryStateReason.set(null);
|
|
63178
|
+
const discovery = this.injector.get(ResourceDiscoveryService);
|
|
63179
|
+
const catalog$ = discoverySource
|
|
63180
|
+
? discovery.getSurfaces(discoverySource, options)
|
|
63181
|
+
: discovery.getSurfaces({ surfaces: { href: href } }, options);
|
|
63182
|
+
this.discoverySubscription = catalog$.subscribe({
|
|
63183
|
+
next: (response) => {
|
|
63184
|
+
if (this.discoveryRequestKey !== requestKey) {
|
|
63185
|
+
return;
|
|
63186
|
+
}
|
|
63187
|
+
this.applyCatalogSurface(surfaceId, response);
|
|
63188
|
+
},
|
|
63189
|
+
error: (error) => {
|
|
63190
|
+
if (this.discoveryRequestKey !== requestKey) {
|
|
63191
|
+
return;
|
|
63192
|
+
}
|
|
63193
|
+
this.discoveredSurface.set(null);
|
|
63194
|
+
this.discoveryState.set(this.isPermissionError(error) ? 'permission-limited' : 'error');
|
|
63195
|
+
this.discoveryStateReason.set(this.isPermissionError(error)
|
|
63196
|
+
? 'surface-discovery-permission-limited'
|
|
63197
|
+
: 'surface-discovery-failed');
|
|
63198
|
+
},
|
|
63199
|
+
});
|
|
63200
|
+
onCleanup(() => {
|
|
63201
|
+
this.discoverySubscription?.unsubscribe();
|
|
63202
|
+
this.discoverySubscription = undefined;
|
|
63203
|
+
});
|
|
63204
|
+
});
|
|
63205
|
+
effect((onCleanup) => {
|
|
63206
|
+
const mode = this.mode();
|
|
63207
|
+
const resolution = this.resolution();
|
|
63208
|
+
const payload = mode === 'inline' && resolution.state === 'ready'
|
|
63209
|
+
? resolution.payload
|
|
63210
|
+
: null;
|
|
63211
|
+
const requestKey = this.buildMaterializationRequestKey(resolution);
|
|
63212
|
+
// Composition state updates can re-create structurally equal input objects.
|
|
63213
|
+
// Keep the mounted child widget when its effective materialization contract
|
|
63214
|
+
// did not change; destroying it here also destroys transient table state such
|
|
63215
|
+
// as the selection that may have triggered the composition update itself.
|
|
63216
|
+
if (requestKey === this.materializationRequestKey
|
|
63217
|
+
&& this.materializedPayload() != null) {
|
|
63218
|
+
return;
|
|
63219
|
+
}
|
|
63220
|
+
this.materializationRequestKey = requestKey;
|
|
63221
|
+
this.materializedPayload.set(null);
|
|
63222
|
+
if (!payload) {
|
|
63223
|
+
return;
|
|
63224
|
+
}
|
|
63225
|
+
let cancelled = false;
|
|
63226
|
+
const materializer = this.injector.get(SurfaceOpenMaterializerService);
|
|
63227
|
+
materializer.materialize(payload)
|
|
63228
|
+
.then((materialized) => {
|
|
63229
|
+
if (!cancelled && this.materializationRequestKey === requestKey) {
|
|
63230
|
+
this.materializedPayload.set(materialized);
|
|
63231
|
+
}
|
|
63232
|
+
})
|
|
63233
|
+
.catch(() => {
|
|
63234
|
+
if (!cancelled && this.materializationRequestKey === requestKey) {
|
|
63235
|
+
this.materializedPayload.set(payload);
|
|
63236
|
+
}
|
|
63237
|
+
});
|
|
63238
|
+
onCleanup(() => {
|
|
63239
|
+
cancelled = true;
|
|
63240
|
+
});
|
|
63241
|
+
});
|
|
63242
|
+
}
|
|
63243
|
+
openRelated() {
|
|
63244
|
+
const payload = this.resolution().payload;
|
|
63245
|
+
if (payload) {
|
|
63246
|
+
this.surfaceOpen.emit(payload);
|
|
63247
|
+
}
|
|
63248
|
+
}
|
|
63249
|
+
onWidgetEvent(event) {
|
|
63250
|
+
const resourceEvent = event.resourceEvent ?? this.extractResourceEvent(event);
|
|
63251
|
+
if (resourceEvent) {
|
|
63252
|
+
this.resourceEvent.emit(resourceEvent);
|
|
63253
|
+
this.widgetEvent.emit({ ...event, resourceEvent });
|
|
63254
|
+
return;
|
|
63255
|
+
}
|
|
63256
|
+
this.widgetEvent.emit(event);
|
|
63257
|
+
}
|
|
63258
|
+
stateIcon() {
|
|
63259
|
+
switch (this.renderResolution().state) {
|
|
63260
|
+
case 'ready':
|
|
63261
|
+
return (this.trim(this.icon()) ||
|
|
63262
|
+
this.trim(this.renderResolution().surface?.icon) ||
|
|
63263
|
+
'hub');
|
|
63264
|
+
case 'permission-limited':
|
|
63265
|
+
return 'lock';
|
|
63266
|
+
case 'not-found':
|
|
63267
|
+
return 'link_off';
|
|
63268
|
+
case 'empty':
|
|
63269
|
+
return 'playlist_remove';
|
|
63270
|
+
case 'error':
|
|
63271
|
+
return 'error';
|
|
63272
|
+
default:
|
|
63273
|
+
return 'account_tree';
|
|
63274
|
+
}
|
|
63275
|
+
}
|
|
63276
|
+
stateTitle() {
|
|
63277
|
+
const state = this.renderResolution().state;
|
|
63278
|
+
if (state === 'ready') {
|
|
63279
|
+
return (this.trim(this.title()) ||
|
|
63280
|
+
this.trim(this.renderResolution().surface?.title) ||
|
|
63281
|
+
this.t('status.ready', 'Related resource ready'));
|
|
63282
|
+
}
|
|
63283
|
+
return this.t(`state.${state}.title`, this.defaultTitle(state));
|
|
63284
|
+
}
|
|
63285
|
+
stateDescription() {
|
|
63286
|
+
const state = this.renderResolution().state;
|
|
63287
|
+
if (state === 'ready') {
|
|
63288
|
+
return (this.trim(this.subtitle()) ||
|
|
63289
|
+
this.trim(this.renderResolution().surface?.description) ||
|
|
63290
|
+
this.t('status.ready', 'Related resource ready'));
|
|
63291
|
+
}
|
|
63292
|
+
return this.t(`state.${state}.description`, this.defaultDescription(state));
|
|
63293
|
+
}
|
|
63294
|
+
t(key, fallback) {
|
|
63295
|
+
return this.i18n.t(key, undefined, fallback, RELATED_RESOURCE_OUTLET_I18N_NAMESPACE);
|
|
63296
|
+
}
|
|
63297
|
+
defaultTitle(state) {
|
|
63298
|
+
return state === 'ready'
|
|
63299
|
+
? this.t('status.ready', 'Related resource ready')
|
|
63300
|
+
: 'Related resource';
|
|
63301
|
+
}
|
|
63302
|
+
defaultDescription(state) {
|
|
63303
|
+
return this.renderResolution().reason || state;
|
|
63304
|
+
}
|
|
63305
|
+
applyCatalogSurface(surfaceId, catalog) {
|
|
63306
|
+
const normalizedId = this.trim(surfaceId);
|
|
63307
|
+
const surface = (catalog?.surfaces || []).find((candidate) => this.trim(candidate.id) === normalizedId) || null;
|
|
63308
|
+
this.discoveredSurface.set(surface);
|
|
63309
|
+
this.discoveryState.set(surface ? null : 'not-found');
|
|
63310
|
+
this.discoveryStateReason.set(surface ? null : 'surface-id-not-found');
|
|
63311
|
+
}
|
|
63312
|
+
resetDiscoveryState() {
|
|
63313
|
+
this.discoveredSurface.set(null);
|
|
63314
|
+
this.discoveryState.set(null);
|
|
63315
|
+
this.discoveryStateReason.set(null);
|
|
63316
|
+
this.discoveryRequestKey = '';
|
|
63317
|
+
}
|
|
63318
|
+
discoveryOptions(endpointKey, apiUrlEntry) {
|
|
63319
|
+
if (!endpointKey && !apiUrlEntry) {
|
|
63320
|
+
return undefined;
|
|
63321
|
+
}
|
|
63322
|
+
return {
|
|
63323
|
+
endpointKey: endpointKey || undefined,
|
|
63324
|
+
apiUrlEntry: apiUrlEntry || null,
|
|
63325
|
+
};
|
|
63326
|
+
}
|
|
63327
|
+
resolveFallbackSurfaceCatalogHref(parentResourcePath, parentResourceId) {
|
|
63328
|
+
const path = this.normalizeResourcePath(parentResourcePath || '');
|
|
63329
|
+
if (!path || parentResourceId == null || parentResourceId === '') {
|
|
63330
|
+
return null;
|
|
63331
|
+
}
|
|
63332
|
+
return `/api/${path}/${encodeURIComponent(String(parentResourceId))}/surfaces`;
|
|
63333
|
+
}
|
|
63334
|
+
normalizeResourcePath(resourcePath) {
|
|
63335
|
+
let normalized = this.trim(resourcePath);
|
|
63336
|
+
if (/^https?:\/\//i.test(normalized)) {
|
|
63337
|
+
try {
|
|
63338
|
+
normalized = new URL(normalized).pathname;
|
|
63339
|
+
}
|
|
63340
|
+
catch {
|
|
63341
|
+
return '';
|
|
63342
|
+
}
|
|
63343
|
+
}
|
|
63344
|
+
return normalized
|
|
63345
|
+
.replace(/^\/+/, '')
|
|
63346
|
+
.replace(/^(?:api\/)+/i, '')
|
|
63347
|
+
.replace(/\/+$/, '');
|
|
63348
|
+
}
|
|
63349
|
+
buildDiscoveryRequestKey(surfaceId, source, href, options) {
|
|
63350
|
+
return JSON.stringify({
|
|
63351
|
+
surfaceId: this.trim(surfaceId),
|
|
63352
|
+
source,
|
|
63353
|
+
href,
|
|
63354
|
+
endpointKey: options?.endpointKey || null,
|
|
63355
|
+
apiUrlEntry: options?.apiUrlEntry || null,
|
|
63356
|
+
});
|
|
63357
|
+
}
|
|
63358
|
+
buildMaterializationRequestKey(resolution) {
|
|
63359
|
+
return JSON.stringify({
|
|
63360
|
+
state: resolution.state,
|
|
63361
|
+
payload: resolution.payload ?? null,
|
|
63362
|
+
mode: this.mode(),
|
|
63363
|
+
});
|
|
63364
|
+
}
|
|
63365
|
+
isPermissionError(error) {
|
|
63366
|
+
const status = typeof error === 'object' && error
|
|
63367
|
+
? error.status
|
|
63368
|
+
: null;
|
|
63369
|
+
return status === 401 || status === 403;
|
|
63370
|
+
}
|
|
63371
|
+
extractResourceEvent(event) {
|
|
63372
|
+
if (event.output !== 'resourceEvent' || !event.payload || typeof event.payload !== 'object') {
|
|
63373
|
+
return null;
|
|
63374
|
+
}
|
|
63375
|
+
const candidate = event.payload;
|
|
63376
|
+
return typeof candidate.kind === 'string'
|
|
63377
|
+
&& typeof candidate.sourceComponentId === 'string'
|
|
63378
|
+
&& 'payload' in candidate
|
|
63379
|
+
? candidate
|
|
63380
|
+
: null;
|
|
63381
|
+
}
|
|
63382
|
+
trim(value) {
|
|
63383
|
+
return typeof value === 'string' ? value.trim() : '';
|
|
63384
|
+
}
|
|
63385
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PraxisRelatedResourceOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
63386
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: PraxisRelatedResourceOutletComponent, isStandalone: true, selector: "praxis-related-resource-outlet", inputs: { surface: { classPropertyName: "surface", publicName: "surface", isSignal: true, isRequired: false, transformFunction: null }, surfaceId: { classPropertyName: "surfaceId", publicName: "surfaceId", isSignal: true, isRequired: false, transformFunction: null }, surfaceCatalog: { classPropertyName: "surfaceCatalog", publicName: "surfaceCatalog", isSignal: true, isRequired: false, transformFunction: null }, discoverySource: { classPropertyName: "discoverySource", publicName: "discoverySource", isSignal: true, isRequired: false, transformFunction: null }, parentLinks: { classPropertyName: "parentLinks", publicName: "parentLinks", isSignal: true, isRequired: false, transformFunction: null }, apiEndpointKey: { classPropertyName: "apiEndpointKey", publicName: "apiEndpointKey", isSignal: true, isRequired: false, transformFunction: null }, apiUrlEntry: { classPropertyName: "apiUrlEntry", publicName: "apiUrlEntry", isSignal: true, isRequired: false, transformFunction: null }, parentRecord: { classPropertyName: "parentRecord", publicName: "parentRecord", isSignal: true, isRequired: false, transformFunction: null }, parentResourceId: { classPropertyName: "parentResourceId", publicName: "parentResourceId", isSignal: true, isRequired: false, transformFunction: null }, parentIdentity: { classPropertyName: "parentIdentity", publicName: "parentIdentity", isSignal: true, isRequired: false, transformFunction: null }, parentResourcePath: { classPropertyName: "parentResourcePath", publicName: "parentResourcePath", isSignal: true, isRequired: false, transformFunction: null }, presentation: { classPropertyName: "presentation", publicName: "presentation", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, tableId: { classPropertyName: "tableId", publicName: "tableId", isSignal: true, isRequired: false, transformFunction: null }, tableConfig: { classPropertyName: "tableConfig", publicName: "tableConfig", isSignal: true, isRequired: false, transformFunction: null }, enableCustomization: { classPropertyName: "enableCustomization", publicName: "enableCustomization", isSignal: true, isRequired: false, transformFunction: null }, authoringCapability: { classPropertyName: "authoringCapability", publicName: "authoringCapability", isSignal: true, isRequired: false, transformFunction: null }, emptyState: { classPropertyName: "emptyState", publicName: "emptyState", isSignal: true, isRequired: false, transformFunction: null }, queryContext: { classPropertyName: "queryContext", publicName: "queryContext", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, stateReason: { classPropertyName: "stateReason", publicName: "stateReason", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, strictValidation: { classPropertyName: "strictValidation", publicName: "strictValidation", isSignal: true, isRequired: false, transformFunction: null }, ownerWidgetKey: { classPropertyName: "ownerWidgetKey", publicName: "ownerWidgetKey", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { surfaceOpen: "surfaceOpen", widgetEvent: "widgetEvent", resourceEvent: "resourceEvent" }, host: { attributes: { "data-praxis-related-resource-outlet": "core" }, properties: { "attr.data-state": "renderResolution().state" } }, providers: [providePraxisI18nConfig(RELATED_RESOURCE_OUTLET_I18N_CONFIG)], ngImport: i0, template: `
|
|
63387
|
+
<section class="pdx-related-outlet" [class.pdx-related-outlet--compact]="compact()">
|
|
63388
|
+
@if (renderResolution().state === 'ready' && mode() === 'inline' && renderResolution().payload?.widget) {
|
|
63389
|
+
<ng-container
|
|
63390
|
+
[dynamicWidgetLoader]="renderResolution().payload!.widget"
|
|
63391
|
+
[ownerWidgetKey]="ownerWidgetKey()"
|
|
63392
|
+
[context]="renderResolution().payload!.context || null"
|
|
63393
|
+
[strictValidation]="strictValidation()"
|
|
63394
|
+
[autoWireOutputs]="true"
|
|
63395
|
+
(widgetEvent)="onWidgetEvent($event)"
|
|
63396
|
+
></ng-container>
|
|
63397
|
+
} @else {
|
|
63398
|
+
<div
|
|
63399
|
+
class="pdx-related-outlet__state"
|
|
63400
|
+
[class.pdx-related-outlet__state--ready]="renderResolution().state === 'ready'"
|
|
63401
|
+
[class.pdx-related-outlet__state--busy]="isBusy()"
|
|
63402
|
+
role="status"
|
|
63403
|
+
aria-live="polite"
|
|
63404
|
+
>
|
|
63405
|
+
<div class="pdx-related-outlet__icon" aria-hidden="true">
|
|
63406
|
+
@if (isBusy()) {
|
|
63407
|
+
<mat-progress-spinner mode="indeterminate" diameter="22"></mat-progress-spinner>
|
|
63408
|
+
} @else {
|
|
63409
|
+
<mat-icon [fontIcon]="stateIcon()"></mat-icon>
|
|
63410
|
+
}
|
|
63411
|
+
</div>
|
|
63412
|
+
<div class="pdx-related-outlet__copy">
|
|
63413
|
+
<h3>{{ stateTitle() }}</h3>
|
|
63414
|
+
<p>{{ stateDescription() }}</p>
|
|
63415
|
+
</div>
|
|
63416
|
+
@if (resolution().state === 'ready' && mode() === 'open-action') {
|
|
63417
|
+
<button mat-flat-button type="button" color="primary" (click)="openRelated()">
|
|
63418
|
+
<mat-icon fontIcon="open_in_new" aria-hidden="true"></mat-icon>
|
|
63419
|
+
{{ t('action.open', 'Open related') }}
|
|
63420
|
+
</button>
|
|
63421
|
+
}
|
|
63422
|
+
</div>
|
|
63423
|
+
}
|
|
63424
|
+
</section>
|
|
63425
|
+
`, isInline: true, styles: [":host{display:block;min-width:0}.pdx-related-outlet{display:block;min-width:0;color:var(--md-sys-color-on-surface, currentColor)}.pdx-related-outlet__state{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:var(--pdx-related-outlet-gap, 12px);min-height:var(--pdx-related-outlet-min-height, 64px);padding:var(--pdx-related-outlet-padding, 12px);border:1px solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, .16));border-radius:var(--pdx-related-outlet-radius, 8px);background:var(--md-sys-color-surface-container-low, var(--md-sys-color-surface, transparent))}.pdx-related-outlet--compact .pdx-related-outlet__state{min-height:var(--pdx-related-outlet-compact-min-height, 48px);padding:var(--pdx-related-outlet-compact-padding, 8px 10px)}.pdx-related-outlet__state--ready{border-color:var(--md-sys-color-primary, currentColor)}.pdx-related-outlet__icon{display:inline-grid;place-items:center;width:32px;height:32px;color:var(--md-sys-color-primary, currentColor)}.pdx-related-outlet__state--busy .pdx-related-outlet__icon{color:var(--md-sys-color-secondary, currentColor)}.pdx-related-outlet__copy{display:grid;gap:2px;min-width:0}.pdx-related-outlet__copy h3,.pdx-related-outlet__copy p{margin:0}.pdx-related-outlet__copy h3{font:var(--md-sys-typescale-title-small, 600 .95rem/1.25rem system-ui);color:var(--md-sys-color-on-surface, currentColor)}.pdx-related-outlet__copy p{font:var(--md-sys-typescale-body-small, 400 .82rem/1.15rem system-ui);color:var(--md-sys-color-on-surface-variant, currentColor)}@media(max-width:600px){.pdx-related-outlet__state{grid-template-columns:auto minmax(0,1fr)}.pdx-related-outlet__state button{grid-column:1 / -1;justify-self:start}}\n"], dependencies: [{ kind: "directive", type: DynamicWidgetLoaderDirective, selector: "[dynamicWidgetLoader]", inputs: ["dynamicWidgetLoader", "ownerWidgetKey", "context", "strictValidation", "autoWireOutputs"], outputs: ["widgetEvent", "widgetDiagnostic"], exportAs: ["dynamicWidgetLoader"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i3$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] });
|
|
63426
|
+
}
|
|
63427
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PraxisRelatedResourceOutletComponent, decorators: [{
|
|
63428
|
+
type: Component,
|
|
63429
|
+
args: [{ selector: 'praxis-related-resource-outlet', standalone: true, host: {
|
|
63430
|
+
'data-praxis-related-resource-outlet': 'core',
|
|
63431
|
+
'[attr.data-state]': 'renderResolution().state',
|
|
63432
|
+
}, imports: [
|
|
63433
|
+
DynamicWidgetLoaderDirective,
|
|
63434
|
+
MatButtonModule,
|
|
63435
|
+
MatIconModule,
|
|
63436
|
+
MatProgressSpinnerModule,
|
|
63437
|
+
], providers: [providePraxisI18nConfig(RELATED_RESOURCE_OUTLET_I18N_CONFIG)], template: `
|
|
63438
|
+
<section class="pdx-related-outlet" [class.pdx-related-outlet--compact]="compact()">
|
|
63439
|
+
@if (renderResolution().state === 'ready' && mode() === 'inline' && renderResolution().payload?.widget) {
|
|
63440
|
+
<ng-container
|
|
63441
|
+
[dynamicWidgetLoader]="renderResolution().payload!.widget"
|
|
63442
|
+
[ownerWidgetKey]="ownerWidgetKey()"
|
|
63443
|
+
[context]="renderResolution().payload!.context || null"
|
|
63444
|
+
[strictValidation]="strictValidation()"
|
|
63445
|
+
[autoWireOutputs]="true"
|
|
63446
|
+
(widgetEvent)="onWidgetEvent($event)"
|
|
63447
|
+
></ng-container>
|
|
63448
|
+
} @else {
|
|
63449
|
+
<div
|
|
63450
|
+
class="pdx-related-outlet__state"
|
|
63451
|
+
[class.pdx-related-outlet__state--ready]="renderResolution().state === 'ready'"
|
|
63452
|
+
[class.pdx-related-outlet__state--busy]="isBusy()"
|
|
63453
|
+
role="status"
|
|
63454
|
+
aria-live="polite"
|
|
63455
|
+
>
|
|
63456
|
+
<div class="pdx-related-outlet__icon" aria-hidden="true">
|
|
63457
|
+
@if (isBusy()) {
|
|
63458
|
+
<mat-progress-spinner mode="indeterminate" diameter="22"></mat-progress-spinner>
|
|
63459
|
+
} @else {
|
|
63460
|
+
<mat-icon [fontIcon]="stateIcon()"></mat-icon>
|
|
63461
|
+
}
|
|
63462
|
+
</div>
|
|
63463
|
+
<div class="pdx-related-outlet__copy">
|
|
63464
|
+
<h3>{{ stateTitle() }}</h3>
|
|
63465
|
+
<p>{{ stateDescription() }}</p>
|
|
63466
|
+
</div>
|
|
63467
|
+
@if (resolution().state === 'ready' && mode() === 'open-action') {
|
|
63468
|
+
<button mat-flat-button type="button" color="primary" (click)="openRelated()">
|
|
63469
|
+
<mat-icon fontIcon="open_in_new" aria-hidden="true"></mat-icon>
|
|
63470
|
+
{{ t('action.open', 'Open related') }}
|
|
63471
|
+
</button>
|
|
63472
|
+
}
|
|
63473
|
+
</div>
|
|
63474
|
+
}
|
|
63475
|
+
</section>
|
|
63476
|
+
`, styles: [":host{display:block;min-width:0}.pdx-related-outlet{display:block;min-width:0;color:var(--md-sys-color-on-surface, currentColor)}.pdx-related-outlet__state{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:var(--pdx-related-outlet-gap, 12px);min-height:var(--pdx-related-outlet-min-height, 64px);padding:var(--pdx-related-outlet-padding, 12px);border:1px solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, .16));border-radius:var(--pdx-related-outlet-radius, 8px);background:var(--md-sys-color-surface-container-low, var(--md-sys-color-surface, transparent))}.pdx-related-outlet--compact .pdx-related-outlet__state{min-height:var(--pdx-related-outlet-compact-min-height, 48px);padding:var(--pdx-related-outlet-compact-padding, 8px 10px)}.pdx-related-outlet__state--ready{border-color:var(--md-sys-color-primary, currentColor)}.pdx-related-outlet__icon{display:inline-grid;place-items:center;width:32px;height:32px;color:var(--md-sys-color-primary, currentColor)}.pdx-related-outlet__state--busy .pdx-related-outlet__icon{color:var(--md-sys-color-secondary, currentColor)}.pdx-related-outlet__copy{display:grid;gap:2px;min-width:0}.pdx-related-outlet__copy h3,.pdx-related-outlet__copy p{margin:0}.pdx-related-outlet__copy h3{font:var(--md-sys-typescale-title-small, 600 .95rem/1.25rem system-ui);color:var(--md-sys-color-on-surface, currentColor)}.pdx-related-outlet__copy p{font:var(--md-sys-typescale-body-small, 400 .82rem/1.15rem system-ui);color:var(--md-sys-color-on-surface-variant, currentColor)}@media(max-width:600px){.pdx-related-outlet__state{grid-template-columns:auto minmax(0,1fr)}.pdx-related-outlet__state button{grid-column:1 / -1;justify-self:start}}\n"] }]
|
|
63477
|
+
}], ctorParameters: () => [], propDecorators: { surface: [{ type: i0.Input, args: [{ isSignal: true, alias: "surface", required: false }] }], surfaceId: [{ type: i0.Input, args: [{ isSignal: true, alias: "surfaceId", required: false }] }], surfaceCatalog: [{ type: i0.Input, args: [{ isSignal: true, alias: "surfaceCatalog", required: false }] }], discoverySource: [{ type: i0.Input, args: [{ isSignal: true, alias: "discoverySource", required: false }] }], parentLinks: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentLinks", required: false }] }], apiEndpointKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "apiEndpointKey", required: false }] }], apiUrlEntry: [{ type: i0.Input, args: [{ isSignal: true, alias: "apiUrlEntry", required: false }] }], parentRecord: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentRecord", required: false }] }], parentResourceId: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentResourceId", required: false }] }], parentIdentity: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentIdentity", required: false }] }], parentResourcePath: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentResourcePath", required: false }] }], presentation: [{ type: i0.Input, args: [{ isSignal: true, alias: "presentation", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], subtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "subtitle", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], tableId: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableId", required: false }] }], tableConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableConfig", required: false }] }], enableCustomization: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableCustomization", required: false }] }], authoringCapability: [{ type: i0.Input, args: [{ isSignal: true, alias: "authoringCapability", required: false }] }], emptyState: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyState", required: false }] }], queryContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "queryContext", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], stateReason: [{ type: i0.Input, args: [{ isSignal: true, alias: "stateReason", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], strictValidation: [{ type: i0.Input, args: [{ isSignal: true, alias: "strictValidation", required: false }] }], ownerWidgetKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "ownerWidgetKey", required: false }] }], surfaceOpen: [{ type: i0.Output, args: ["surfaceOpen"] }], widgetEvent: [{ type: i0.Output, args: ["widgetEvent"] }], resourceEvent: [{ type: i0.Output, args: ["resourceEvent"] }] } });
|
|
63478
|
+
|
|
62450
63479
|
const SURFACE_HOST_I18N_NAMESPACE = 'surfaceHost';
|
|
62451
63480
|
const SURFACE_HOST_I18N_CONFIG = {
|
|
62452
63481
|
namespaces: {
|
|
@@ -62454,10 +63483,12 @@ const SURFACE_HOST_I18N_CONFIG = {
|
|
|
62454
63483
|
'pt-BR': {
|
|
62455
63484
|
'widget.error.title': 'Não foi possível carregar este conteúdo',
|
|
62456
63485
|
'widget.error.description': 'Este conteúdo está indisponível. Tente novamente. Se o problema continuar, informe o responsável pela plataforma.',
|
|
63486
|
+
'related.section.title': 'Recursos relacionados',
|
|
62457
63487
|
},
|
|
62458
63488
|
'en-US': {
|
|
62459
63489
|
'widget.error.title': 'This content could not be loaded',
|
|
62460
63490
|
'widget.error.description': 'This content is unavailable. Try again. If the problem continues, contact the platform owner.',
|
|
63491
|
+
'related.section.title': 'Related resources',
|
|
62461
63492
|
},
|
|
62462
63493
|
},
|
|
62463
63494
|
},
|
|
@@ -62497,6 +63528,102 @@ class PraxisSurfaceHostComponent {
|
|
|
62497
63528
|
const operation = normalizeSurfaceOperationContext(this.context?.['operation']);
|
|
62498
63529
|
return (operation?.subject?.identity ?? operation?.taskScope?.identity ?? null);
|
|
62499
63530
|
}
|
|
63531
|
+
relatedSurfaces() {
|
|
63532
|
+
if (this.context?.['relatedResourcesMode'] === 'off' ||
|
|
63533
|
+
this.context?.['hideRelatedResources'] === true) {
|
|
63534
|
+
return [];
|
|
63535
|
+
}
|
|
63536
|
+
const parentId = this.parentResourceId();
|
|
63537
|
+
if (parentId == null || String(parentId).trim() === '') {
|
|
63538
|
+
return [];
|
|
63539
|
+
}
|
|
63540
|
+
const rawCandidates = Array.isArray(this.context?.['relatedSurfaces'])
|
|
63541
|
+
? this.context?.['relatedSurfaces']
|
|
63542
|
+
: Array.isArray(this.readRecord(this.context?.['surfaceCatalog'])?.['surfaces'])
|
|
63543
|
+
? this.readRecord(this.context?.['surfaceCatalog'])?.['surfaces']
|
|
63544
|
+
: [];
|
|
63545
|
+
if (rawCandidates.length === 0) {
|
|
63546
|
+
return [];
|
|
63547
|
+
}
|
|
63548
|
+
const activeSurfaceId = this.stringOrNull(this.readRecord(this.context?.['surface'])?.['id']);
|
|
63549
|
+
const resourceContext = this.readRecord(this.context?.['resource']);
|
|
63550
|
+
const normalized = [];
|
|
63551
|
+
for (const candidate of rawCandidates) {
|
|
63552
|
+
const record = this.readRecord(candidate);
|
|
63553
|
+
if (!record) {
|
|
63554
|
+
continue;
|
|
63555
|
+
}
|
|
63556
|
+
const surface = this.toResourceSurface(record, resourceContext);
|
|
63557
|
+
if (!surface || surface.id === activeSurfaceId) {
|
|
63558
|
+
continue;
|
|
63559
|
+
}
|
|
63560
|
+
if (surface.scope !== 'ITEM' || surface.availability?.allowed !== true) {
|
|
63561
|
+
continue;
|
|
63562
|
+
}
|
|
63563
|
+
const related = surface.relatedResource;
|
|
63564
|
+
if (!related ||
|
|
63565
|
+
!this.stringOrNull(related.childResourceKey) ||
|
|
63566
|
+
!this.stringOrNull(related.childResourcePath) ||
|
|
63567
|
+
!this.stringOrNull(related.childParentField)) {
|
|
63568
|
+
continue;
|
|
63569
|
+
}
|
|
63570
|
+
normalized.push(surface);
|
|
63571
|
+
}
|
|
63572
|
+
return normalized.sort((left, right) => (left.order ?? 0) - (right.order ?? 0));
|
|
63573
|
+
}
|
|
63574
|
+
relatedResourcesMode() {
|
|
63575
|
+
return this.context?.['relatedResourcesMode'] === 'inline'
|
|
63576
|
+
? 'inline'
|
|
63577
|
+
: 'open-action';
|
|
63578
|
+
}
|
|
63579
|
+
parentResourceId() {
|
|
63580
|
+
return (this.resourceIdOrNull(this.readRecord(this.context?.['resource'])?.['resourceId']) ?? this.resourceIdOrNull(this.widget?.inputs?.['resourceId']));
|
|
63581
|
+
}
|
|
63582
|
+
parentResourcePath() {
|
|
63583
|
+
return (this.stringOrNull(this.readRecord(this.context?.['resource'])?.['resourcePath']) ?? this.stringOrNull(this.widget?.inputs?.['resourcePath']));
|
|
63584
|
+
}
|
|
63585
|
+
parentRecord() {
|
|
63586
|
+
return this.readRecord(this.widget?.inputs?.['initialValue']);
|
|
63587
|
+
}
|
|
63588
|
+
parentApiEndpointKey() {
|
|
63589
|
+
return (this.widget?.inputs?.['apiEndpointKey'] ?? null);
|
|
63590
|
+
}
|
|
63591
|
+
parentApiUrlEntry() {
|
|
63592
|
+
return (this.widget?.inputs?.['apiUrlEntry'] ?? null);
|
|
63593
|
+
}
|
|
63594
|
+
relatedOutletWidgetKey(surface) {
|
|
63595
|
+
return `surface.related.${surface.id}`;
|
|
63596
|
+
}
|
|
63597
|
+
onRelatedSurfaceOpen(surface, payload) {
|
|
63598
|
+
const widgetKey = this.relatedOutletWidgetKey(surface);
|
|
63599
|
+
if (this.globalActions.has('surface.open')) {
|
|
63600
|
+
void this.globalActions.execute('surface.open', payload, {
|
|
63601
|
+
sourceId: widgetKey,
|
|
63602
|
+
widgetKey,
|
|
63603
|
+
payload: {
|
|
63604
|
+
widgetKey,
|
|
63605
|
+
surface,
|
|
63606
|
+
payload,
|
|
63607
|
+
surfaceContext: this.context,
|
|
63608
|
+
},
|
|
63609
|
+
runtime: {
|
|
63610
|
+
injector: this.injector,
|
|
63611
|
+
state: this.context,
|
|
63612
|
+
},
|
|
63613
|
+
meta: {
|
|
63614
|
+
origin: 'surface.related-resource',
|
|
63615
|
+
componentId: 'praxis-surface-host',
|
|
63616
|
+
surfaceId: surface.id,
|
|
63617
|
+
},
|
|
63618
|
+
});
|
|
63619
|
+
}
|
|
63620
|
+
this.onSlotWidgetEvent(widgetKey, {
|
|
63621
|
+
ownerWidgetKey: widgetKey,
|
|
63622
|
+
sourceComponentId: 'praxis-related-resource-outlet',
|
|
63623
|
+
output: 'recordSurfaceOpen',
|
|
63624
|
+
payload,
|
|
63625
|
+
});
|
|
63626
|
+
}
|
|
62500
63627
|
ngAfterViewInit() {
|
|
62501
63628
|
this.scheduleWidgetRender();
|
|
62502
63629
|
}
|
|
@@ -62794,6 +63921,7 @@ class PraxisSurfaceHostComponent {
|
|
|
62794
63921
|
title: String(surface['title'] || id),
|
|
62795
63922
|
description: surface['description'],
|
|
62796
63923
|
intent: surface['intent'],
|
|
63924
|
+
icon: surface['icon'],
|
|
62797
63925
|
operationId,
|
|
62798
63926
|
path,
|
|
62799
63927
|
method,
|
|
@@ -62911,13 +64039,55 @@ class PraxisSurfaceHostComponent {
|
|
|
62911
64039
|
></ng-container>
|
|
62912
64040
|
</div>
|
|
62913
64041
|
}
|
|
64042
|
+
|
|
64043
|
+
@if (relatedSurfaces().length > 0) {
|
|
64044
|
+
<section
|
|
64045
|
+
class="pdx-surface-host__related"
|
|
64046
|
+
[attr.aria-label]="t('related.section.title', 'Related resources')"
|
|
64047
|
+
data-testid="surface-related-resources"
|
|
64048
|
+
>
|
|
64049
|
+
<h3 class="pdx-surface-host__related-title">
|
|
64050
|
+
{{ t('related.section.title', 'Related resources') }}
|
|
64051
|
+
</h3>
|
|
64052
|
+
<div class="pdx-surface-host__related-list">
|
|
64053
|
+
@for (
|
|
64054
|
+
relatedSurface of relatedSurfaces();
|
|
64055
|
+
track relatedSurface.id
|
|
64056
|
+
) {
|
|
64057
|
+
<praxis-related-resource-outlet
|
|
64058
|
+
[surface]="relatedSurface"
|
|
64059
|
+
[parentResourceId]="parentResourceId()"
|
|
64060
|
+
[parentResourcePath]="parentResourcePath()"
|
|
64061
|
+
[parentRecord]="parentRecord()"
|
|
64062
|
+
[parentIdentity]="operationIdentity()"
|
|
64063
|
+
[apiEndpointKey]="parentApiEndpointKey()"
|
|
64064
|
+
[apiUrlEntry]="parentApiUrlEntry()"
|
|
64065
|
+
[mode]="relatedResourcesMode()"
|
|
64066
|
+
[compact]="relatedResourcesMode() === 'open-action'"
|
|
64067
|
+
[ownerWidgetKey]="relatedOutletWidgetKey(relatedSurface)"
|
|
64068
|
+
(surfaceOpen)="onRelatedSurfaceOpen(relatedSurface, $event)"
|
|
64069
|
+
(widgetEvent)="
|
|
64070
|
+
onSlotWidgetEvent(
|
|
64071
|
+
relatedOutletWidgetKey(relatedSurface),
|
|
64072
|
+
$event
|
|
64073
|
+
)
|
|
64074
|
+
"
|
|
64075
|
+
></praxis-related-resource-outlet>
|
|
64076
|
+
}
|
|
64077
|
+
</div>
|
|
64078
|
+
</section>
|
|
64079
|
+
}
|
|
62914
64080
|
</section>
|
|
62915
64081
|
</div>
|
|
62916
|
-
`, isInline: true, styles: [":host{display:block;min-width:0}.pdx-surface-host{display:grid;gap:16px;min-width:0}.pdx-surface-host__header{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:start}.pdx-surface-host__icon{font-size:20px;line-height:20px;color:var(--md-sys-color-primary, currentColor)}.pdx-surface-host__copy{display:grid;gap:4px;min-width:0}.pdx-surface-host__title,.pdx-surface-host__subtitle{margin:0}.pdx-surface-host__title{font-size:1rem;font-weight:600}.pdx-surface-host__subtitle{color:var(--md-sys-color-on-surface-variant, rgba(0, 0, 0, .64));font-size:.9375rem}.pdx-surface-host__body{display:grid;gap:16px;min-width:0}.pdx-surface-host__operation-context{min-width:0;padding:12px 14px;border-inline-start:3px solid var(--md-sys-color-primary, currentColor);border-radius:0 10px 10px 0;background:var(--md-sys-color-surface-container-low, transparent)}.pdx-surface-host__error{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:12px;min-width:0;padding:14px;border:1px solid var(--md-sys-color-error, #ba1a1a);border-radius:10px;color:var(--md-sys-color-on-error-container, #410002);background:var(--md-sys-color-error-container, #ffdad6)}.pdx-surface-host__error h3,.pdx-surface-host__error p{margin:0}.pdx-surface-host__error h3{font-size:.95rem;font-weight:700}.pdx-surface-host__error p{margin-top:3px;font-size:.875rem;line-height:1.4}.pdx-surface-host__slot{min-width:0}\n"], dependencies: [{ kind: "directive", type: DynamicWidgetLoaderDirective, selector: "[dynamicWidgetLoader]", inputs: ["dynamicWidgetLoader", "ownerWidgetKey", "context", "strictValidation", "autoWireOutputs"], outputs: ["widgetEvent", "widgetDiagnostic"], exportAs: ["dynamicWidgetLoader"] }, { kind: "component", type: PraxisResourceIdentityComponent, selector: "praxis-resource-identity", inputs: ["identity", "emptyTitle", "density", "showMetadataLabels", "showKey", "showKeyLabel", "ariaLabel"] }] });
|
|
64082
|
+
`, isInline: true, styles: [":host{display:block;min-width:0;max-width:100%}.pdx-surface-host{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;min-width:0;max-width:100%}.pdx-surface-host__header{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:start}.pdx-surface-host__icon{font-size:20px;line-height:20px;color:var(--md-sys-color-primary, currentColor)}.pdx-surface-host__copy{display:grid;gap:4px;min-width:0}.pdx-surface-host__title,.pdx-surface-host__subtitle{margin:0}.pdx-surface-host__title{font-size:1rem;font-weight:600}.pdx-surface-host__subtitle{color:var(--md-sys-color-on-surface-variant, rgba(0, 0, 0, .64));font-size:.9375rem}.pdx-surface-host__body{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;min-width:0;max-width:100%}.pdx-surface-host__operation-context{min-width:0;padding:12px 14px;border-inline-start:3px solid var(--md-sys-color-primary, currentColor);border-radius:0 10px 10px 0;background:var(--md-sys-color-surface-container-low, transparent)}.pdx-surface-host__error{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:12px;min-width:0;padding:14px;border:1px solid var(--md-sys-color-error, #ba1a1a);border-radius:10px;color:var(--md-sys-color-on-error-container, #410002);background:var(--md-sys-color-error-container, #ffdad6)}.pdx-surface-host__error h3,.pdx-surface-host__error p{margin:0}.pdx-surface-host__error h3{font-size:.95rem;font-weight:700}.pdx-surface-host__error p{margin-top:3px;font-size:.875rem;line-height:1.4}.pdx-surface-host__slot{min-width:0}.pdx-surface-host__related{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;min-width:0;padding-top:12px;border-top:1px solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, .12))}.pdx-surface-host__related-title{margin:0;font-size:.875rem;font-weight:600;color:var(--md-sys-color-on-surface-variant, rgba(0, 0, 0, .68))}.pdx-surface-host__related-list{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;min-width:0}\n"], dependencies: [{ kind: "directive", type: DynamicWidgetLoaderDirective, selector: "[dynamicWidgetLoader]", inputs: ["dynamicWidgetLoader", "ownerWidgetKey", "context", "strictValidation", "autoWireOutputs"], outputs: ["widgetEvent", "widgetDiagnostic"], exportAs: ["dynamicWidgetLoader"] }, { kind: "component", type: PraxisResourceIdentityComponent, selector: "praxis-resource-identity", inputs: ["identity", "emptyTitle", "density", "showMetadataLabels", "showKey", "showKeyLabel", "ariaLabel"] }, { kind: "component", type: PraxisRelatedResourceOutletComponent, selector: "praxis-related-resource-outlet", inputs: ["surface", "surfaceId", "surfaceCatalog", "discoverySource", "parentLinks", "apiEndpointKey", "apiUrlEntry", "parentRecord", "parentResourceId", "parentIdentity", "parentResourcePath", "presentation", "title", "subtitle", "icon", "tableId", "tableConfig", "enableCustomization", "authoringCapability", "emptyState", "queryContext", "mode", "state", "stateReason", "compact", "strictValidation", "ownerWidgetKey"], outputs: ["surfaceOpen", "widgetEvent", "resourceEvent"] }] });
|
|
62917
64083
|
}
|
|
62918
64084
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PraxisSurfaceHostComponent, decorators: [{
|
|
62919
64085
|
type: Component,
|
|
62920
|
-
args: [{ selector: 'praxis-surface-host', standalone: true, imports: [
|
|
64086
|
+
args: [{ selector: 'praxis-surface-host', standalone: true, imports: [
|
|
64087
|
+
DynamicWidgetLoaderDirective,
|
|
64088
|
+
PraxisResourceIdentityComponent,
|
|
64089
|
+
PraxisRelatedResourceOutletComponent,
|
|
64090
|
+
], providers: [providePraxisI18nConfig(SURFACE_HOST_I18N_CONFIG)], template: `
|
|
62921
64091
|
<div class="pdx-surface-host">
|
|
62922
64092
|
@if (subtitle || (title && renderTitleInsideBody)) {
|
|
62923
64093
|
<header class="pdx-surface-host__header">
|
|
@@ -63021,9 +64191,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
63021
64191
|
></ng-container>
|
|
63022
64192
|
</div>
|
|
63023
64193
|
}
|
|
64194
|
+
|
|
64195
|
+
@if (relatedSurfaces().length > 0) {
|
|
64196
|
+
<section
|
|
64197
|
+
class="pdx-surface-host__related"
|
|
64198
|
+
[attr.aria-label]="t('related.section.title', 'Related resources')"
|
|
64199
|
+
data-testid="surface-related-resources"
|
|
64200
|
+
>
|
|
64201
|
+
<h3 class="pdx-surface-host__related-title">
|
|
64202
|
+
{{ t('related.section.title', 'Related resources') }}
|
|
64203
|
+
</h3>
|
|
64204
|
+
<div class="pdx-surface-host__related-list">
|
|
64205
|
+
@for (
|
|
64206
|
+
relatedSurface of relatedSurfaces();
|
|
64207
|
+
track relatedSurface.id
|
|
64208
|
+
) {
|
|
64209
|
+
<praxis-related-resource-outlet
|
|
64210
|
+
[surface]="relatedSurface"
|
|
64211
|
+
[parentResourceId]="parentResourceId()"
|
|
64212
|
+
[parentResourcePath]="parentResourcePath()"
|
|
64213
|
+
[parentRecord]="parentRecord()"
|
|
64214
|
+
[parentIdentity]="operationIdentity()"
|
|
64215
|
+
[apiEndpointKey]="parentApiEndpointKey()"
|
|
64216
|
+
[apiUrlEntry]="parentApiUrlEntry()"
|
|
64217
|
+
[mode]="relatedResourcesMode()"
|
|
64218
|
+
[compact]="relatedResourcesMode() === 'open-action'"
|
|
64219
|
+
[ownerWidgetKey]="relatedOutletWidgetKey(relatedSurface)"
|
|
64220
|
+
(surfaceOpen)="onRelatedSurfaceOpen(relatedSurface, $event)"
|
|
64221
|
+
(widgetEvent)="
|
|
64222
|
+
onSlotWidgetEvent(
|
|
64223
|
+
relatedOutletWidgetKey(relatedSurface),
|
|
64224
|
+
$event
|
|
64225
|
+
)
|
|
64226
|
+
"
|
|
64227
|
+
></praxis-related-resource-outlet>
|
|
64228
|
+
}
|
|
64229
|
+
</div>
|
|
64230
|
+
</section>
|
|
64231
|
+
}
|
|
63024
64232
|
</section>
|
|
63025
64233
|
</div>
|
|
63026
|
-
`, styles: [":host{display:block;min-width:0}.pdx-surface-host{display:grid;gap:16px;min-width:0}.pdx-surface-host__header{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:start}.pdx-surface-host__icon{font-size:20px;line-height:20px;color:var(--md-sys-color-primary, currentColor)}.pdx-surface-host__copy{display:grid;gap:4px;min-width:0}.pdx-surface-host__title,.pdx-surface-host__subtitle{margin:0}.pdx-surface-host__title{font-size:1rem;font-weight:600}.pdx-surface-host__subtitle{color:var(--md-sys-color-on-surface-variant, rgba(0, 0, 0, .64));font-size:.9375rem}.pdx-surface-host__body{display:grid;gap:16px;min-width:0}.pdx-surface-host__operation-context{min-width:0;padding:12px 14px;border-inline-start:3px solid var(--md-sys-color-primary, currentColor);border-radius:0 10px 10px 0;background:var(--md-sys-color-surface-container-low, transparent)}.pdx-surface-host__error{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:12px;min-width:0;padding:14px;border:1px solid var(--md-sys-color-error, #ba1a1a);border-radius:10px;color:var(--md-sys-color-on-error-container, #410002);background:var(--md-sys-color-error-container, #ffdad6)}.pdx-surface-host__error h3,.pdx-surface-host__error p{margin:0}.pdx-surface-host__error h3{font-size:.95rem;font-weight:700}.pdx-surface-host__error p{margin-top:3px;font-size:.875rem;line-height:1.4}.pdx-surface-host__slot{min-width:0}\n"] }]
|
|
64234
|
+
`, styles: [":host{display:block;min-width:0;max-width:100%}.pdx-surface-host{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;min-width:0;max-width:100%}.pdx-surface-host__header{display:grid;grid-template-columns:auto 1fr;gap:12px;align-items:start}.pdx-surface-host__icon{font-size:20px;line-height:20px;color:var(--md-sys-color-primary, currentColor)}.pdx-surface-host__copy{display:grid;gap:4px;min-width:0}.pdx-surface-host__title,.pdx-surface-host__subtitle{margin:0}.pdx-surface-host__title{font-size:1rem;font-weight:600}.pdx-surface-host__subtitle{color:var(--md-sys-color-on-surface-variant, rgba(0, 0, 0, .64));font-size:.9375rem}.pdx-surface-host__body{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;min-width:0;max-width:100%}.pdx-surface-host__operation-context{min-width:0;padding:12px 14px;border-inline-start:3px solid var(--md-sys-color-primary, currentColor);border-radius:0 10px 10px 0;background:var(--md-sys-color-surface-container-low, transparent)}.pdx-surface-host__error{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:start;gap:12px;min-width:0;padding:14px;border:1px solid var(--md-sys-color-error, #ba1a1a);border-radius:10px;color:var(--md-sys-color-on-error-container, #410002);background:var(--md-sys-color-error-container, #ffdad6)}.pdx-surface-host__error h3,.pdx-surface-host__error p{margin:0}.pdx-surface-host__error h3{font-size:.95rem;font-weight:700}.pdx-surface-host__error p{margin-top:3px;font-size:.875rem;line-height:1.4}.pdx-surface-host__slot{min-width:0}.pdx-surface-host__related{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;min-width:0;padding-top:12px;border-top:1px solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, .12))}.pdx-surface-host__related-title{margin:0;font-size:.875rem;font-weight:600;color:var(--md-sys-color-on-surface-variant, rgba(0, 0, 0, .68))}.pdx-surface-host__related-list{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;min-width:0}\n"] }]
|
|
63027
64235
|
}], propDecorators: { title: [{
|
|
63028
64236
|
type: Input
|
|
63029
64237
|
}], subtitle: [{
|
|
@@ -63063,425 +64271,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
63063
64271
|
args: ['afterWidgetLoader', { read: DynamicWidgetLoaderDirective }]
|
|
63064
64272
|
}] } });
|
|
63065
64273
|
|
|
63066
|
-
class PraxisRelatedResourceOutletComponent {
|
|
63067
|
-
resolver = inject(RelatedResourceSurfaceResolverService);
|
|
63068
|
-
materializer = inject(SurfaceOpenMaterializerService);
|
|
63069
|
-
i18n = inject(PraxisI18nService);
|
|
63070
|
-
injector = inject(Injector);
|
|
63071
|
-
discoverySubscription;
|
|
63072
|
-
discoveryRequestKey = '';
|
|
63073
|
-
materializationRequestKey = '';
|
|
63074
|
-
surface = input(null, ...(ngDevMode ? [{ debugName: "surface" }] : /* istanbul ignore next */ []));
|
|
63075
|
-
surfaceId = input(null, ...(ngDevMode ? [{ debugName: "surfaceId" }] : /* istanbul ignore next */ []));
|
|
63076
|
-
surfaceCatalog = input(null, ...(ngDevMode ? [{ debugName: "surfaceCatalog" }] : /* istanbul ignore next */ []));
|
|
63077
|
-
discoverySource = input(null, ...(ngDevMode ? [{ debugName: "discoverySource" }] : /* istanbul ignore next */ []));
|
|
63078
|
-
parentLinks = input(null, ...(ngDevMode ? [{ debugName: "parentLinks" }] : /* istanbul ignore next */ []));
|
|
63079
|
-
apiEndpointKey = input(null, ...(ngDevMode ? [{ debugName: "apiEndpointKey" }] : /* istanbul ignore next */ []));
|
|
63080
|
-
apiUrlEntry = input(null, ...(ngDevMode ? [{ debugName: "apiUrlEntry" }] : /* istanbul ignore next */ []));
|
|
63081
|
-
parentRecord = input(null, ...(ngDevMode ? [{ debugName: "parentRecord" }] : /* istanbul ignore next */ []));
|
|
63082
|
-
parentResourceId = input(null, ...(ngDevMode ? [{ debugName: "parentResourceId" }] : /* istanbul ignore next */ []));
|
|
63083
|
-
parentIdentity = input(null, ...(ngDevMode ? [{ debugName: "parentIdentity" }] : /* istanbul ignore next */ []));
|
|
63084
|
-
parentResourcePath = input(null, ...(ngDevMode ? [{ debugName: "parentResourcePath" }] : /* istanbul ignore next */ []));
|
|
63085
|
-
presentation = input('drawer', ...(ngDevMode ? [{ debugName: "presentation" }] : /* istanbul ignore next */ []));
|
|
63086
|
-
title = input(null, ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
|
|
63087
|
-
subtitle = input(null, ...(ngDevMode ? [{ debugName: "subtitle" }] : /* istanbul ignore next */ []));
|
|
63088
|
-
icon = input(null, ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
|
|
63089
|
-
tableId = input(null, ...(ngDevMode ? [{ debugName: "tableId" }] : /* istanbul ignore next */ []));
|
|
63090
|
-
tableConfig = input(null, ...(ngDevMode ? [{ debugName: "tableConfig" }] : /* istanbul ignore next */ []));
|
|
63091
|
-
enableCustomization = input(false, ...(ngDevMode ? [{ debugName: "enableCustomization" }] : /* istanbul ignore next */ []));
|
|
63092
|
-
authoringCapability = input(null, ...(ngDevMode ? [{ debugName: "authoringCapability" }] : /* istanbul ignore next */ []));
|
|
63093
|
-
emptyState = input(null, ...(ngDevMode ? [{ debugName: "emptyState" }] : /* istanbul ignore next */ []));
|
|
63094
|
-
queryContext = input(null, ...(ngDevMode ? [{ debugName: "queryContext" }] : /* istanbul ignore next */ []));
|
|
63095
|
-
mode = input('inline', ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
|
|
63096
|
-
state = input(null, ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
|
|
63097
|
-
stateReason = input(null, ...(ngDevMode ? [{ debugName: "stateReason" }] : /* istanbul ignore next */ []));
|
|
63098
|
-
compact = input(false, ...(ngDevMode ? [{ debugName: "compact" }] : /* istanbul ignore next */ []));
|
|
63099
|
-
strictValidation = input(false, ...(ngDevMode ? [{ debugName: "strictValidation" }] : /* istanbul ignore next */ []));
|
|
63100
|
-
ownerWidgetKey = input('related-resource.outlet', ...(ngDevMode ? [{ debugName: "ownerWidgetKey" }] : /* istanbul ignore next */ []));
|
|
63101
|
-
surfaceOpen = output();
|
|
63102
|
-
widgetEvent = output();
|
|
63103
|
-
resourceEvent = output();
|
|
63104
|
-
discoveredSurface = signal(null, ...(ngDevMode ? [{ debugName: "discoveredSurface" }] : /* istanbul ignore next */ []));
|
|
63105
|
-
discoveryState = signal(null, ...(ngDevMode ? [{ debugName: "discoveryState" }] : /* istanbul ignore next */ []));
|
|
63106
|
-
discoveryStateReason = signal(null, ...(ngDevMode ? [{ debugName: "discoveryStateReason" }] : /* istanbul ignore next */ []));
|
|
63107
|
-
materializedPayload = signal(null, ...(ngDevMode ? [{ debugName: "materializedPayload" }] : /* istanbul ignore next */ []));
|
|
63108
|
-
resolution = computed(() => {
|
|
63109
|
-
const state = this.state();
|
|
63110
|
-
if (state && state !== 'ready') {
|
|
63111
|
-
return this.resolver.state(state, this.stateReason() || undefined);
|
|
63112
|
-
}
|
|
63113
|
-
const discoveryState = this.discoveryState();
|
|
63114
|
-
if (discoveryState && discoveryState !== 'ready') {
|
|
63115
|
-
return this.resolver.state(discoveryState, this.discoveryStateReason() || undefined);
|
|
63116
|
-
}
|
|
63117
|
-
return this.resolver.resolve({
|
|
63118
|
-
surface: this.surface() || this.discoveredSurface(),
|
|
63119
|
-
parentRecord: this.parentRecord(),
|
|
63120
|
-
parentResourceId: this.parentResourceId(),
|
|
63121
|
-
parentIdentity: this.parentIdentity(),
|
|
63122
|
-
parentResourcePath: this.parentResourcePath(),
|
|
63123
|
-
presentation: this.presentation(),
|
|
63124
|
-
title: this.title(),
|
|
63125
|
-
subtitle: this.subtitle(),
|
|
63126
|
-
icon: this.icon(),
|
|
63127
|
-
tableId: this.tableId(),
|
|
63128
|
-
tableConfig: this.tableConfig(),
|
|
63129
|
-
enableCustomization: this.enableCustomization(),
|
|
63130
|
-
authoringCapability: this.authoringCapability(),
|
|
63131
|
-
emptyState: this.emptyState(),
|
|
63132
|
-
queryContext: this.queryContext(),
|
|
63133
|
-
apiEndpointKey: this.apiEndpointKey(),
|
|
63134
|
-
apiUrlEntry: this.apiUrlEntry(),
|
|
63135
|
-
});
|
|
63136
|
-
}, ...(ngDevMode ? [{ debugName: "resolution" }] : /* istanbul ignore next */ []));
|
|
63137
|
-
renderResolution = computed(() => {
|
|
63138
|
-
const resolution = this.resolution();
|
|
63139
|
-
const materializedPayload = this.materializedPayload();
|
|
63140
|
-
if (resolution.state !== 'ready') {
|
|
63141
|
-
return resolution;
|
|
63142
|
-
}
|
|
63143
|
-
if (!materializedPayload && this.mode() === 'inline' && resolution.payload?.widget) {
|
|
63144
|
-
return this.resolver.state('loading', 'related-resource-materializing');
|
|
63145
|
-
}
|
|
63146
|
-
if (!materializedPayload) {
|
|
63147
|
-
return resolution;
|
|
63148
|
-
}
|
|
63149
|
-
return {
|
|
63150
|
-
...resolution,
|
|
63151
|
-
payload: materializedPayload,
|
|
63152
|
-
};
|
|
63153
|
-
}, ...(ngDevMode ? [{ debugName: "renderResolution" }] : /* istanbul ignore next */ []));
|
|
63154
|
-
isBusy = computed(() => {
|
|
63155
|
-
const state = this.renderResolution().state;
|
|
63156
|
-
return state === 'resolving' || state === 'loading';
|
|
63157
|
-
}, ...(ngDevMode ? [{ debugName: "isBusy" }] : /* istanbul ignore next */ []));
|
|
63158
|
-
constructor() {
|
|
63159
|
-
effect((onCleanup) => {
|
|
63160
|
-
const surface = this.surface();
|
|
63161
|
-
const surfaceId = this.surfaceId();
|
|
63162
|
-
const catalog = this.surfaceCatalog();
|
|
63163
|
-
const discoverySource = this.discoverySource() || this.parentLinks();
|
|
63164
|
-
const parentRecord = this.parentRecord();
|
|
63165
|
-
const parentResourcePath = this.parentResourcePath();
|
|
63166
|
-
const parentResourceId = this.parentResourceId();
|
|
63167
|
-
const apiEndpointKey = this.apiEndpointKey();
|
|
63168
|
-
const apiUrlEntry = this.apiUrlEntry();
|
|
63169
|
-
this.discoverySubscription?.unsubscribe();
|
|
63170
|
-
this.discoverySubscription = undefined;
|
|
63171
|
-
if (surface || !this.trim(surfaceId)) {
|
|
63172
|
-
this.resetDiscoveryState();
|
|
63173
|
-
return;
|
|
63174
|
-
}
|
|
63175
|
-
if (this.trim(parentResourcePath)
|
|
63176
|
-
&& (parentResourceId == null || parentResourceId === '')
|
|
63177
|
-
&& !parentRecord) {
|
|
63178
|
-
this.discoveredSurface.set(null);
|
|
63179
|
-
this.discoveryState.set('idle');
|
|
63180
|
-
this.discoveryStateReason.set('parent-resource-id-not-resolved');
|
|
63181
|
-
return;
|
|
63182
|
-
}
|
|
63183
|
-
if (catalog) {
|
|
63184
|
-
this.applyCatalogSurface(surfaceId, catalog);
|
|
63185
|
-
return;
|
|
63186
|
-
}
|
|
63187
|
-
const href = this.resolveFallbackSurfaceCatalogHref(parentResourcePath, parentResourceId);
|
|
63188
|
-
if (!discoverySource && !href) {
|
|
63189
|
-
this.discoveredSurface.set(null);
|
|
63190
|
-
this.discoveryState.set('not-found');
|
|
63191
|
-
this.discoveryStateReason.set('surface-discovery-source-not-provided');
|
|
63192
|
-
return;
|
|
63193
|
-
}
|
|
63194
|
-
const options = this.discoveryOptions(apiEndpointKey, apiUrlEntry);
|
|
63195
|
-
const requestKey = this.buildDiscoveryRequestKey(surfaceId, discoverySource, href, options);
|
|
63196
|
-
this.discoveryRequestKey = requestKey;
|
|
63197
|
-
this.discoveredSurface.set(null);
|
|
63198
|
-
this.discoveryState.set('resolving');
|
|
63199
|
-
this.discoveryStateReason.set(null);
|
|
63200
|
-
const discovery = this.injector.get(ResourceDiscoveryService);
|
|
63201
|
-
const catalog$ = discoverySource
|
|
63202
|
-
? discovery.getSurfaces(discoverySource, options)
|
|
63203
|
-
: discovery.getSurfaces({ surfaces: { href: href } }, options);
|
|
63204
|
-
this.discoverySubscription = catalog$.subscribe({
|
|
63205
|
-
next: (response) => {
|
|
63206
|
-
if (this.discoveryRequestKey !== requestKey) {
|
|
63207
|
-
return;
|
|
63208
|
-
}
|
|
63209
|
-
this.applyCatalogSurface(surfaceId, response);
|
|
63210
|
-
},
|
|
63211
|
-
error: (error) => {
|
|
63212
|
-
if (this.discoveryRequestKey !== requestKey) {
|
|
63213
|
-
return;
|
|
63214
|
-
}
|
|
63215
|
-
this.discoveredSurface.set(null);
|
|
63216
|
-
this.discoveryState.set(this.isPermissionError(error) ? 'permission-limited' : 'error');
|
|
63217
|
-
this.discoveryStateReason.set(this.isPermissionError(error)
|
|
63218
|
-
? 'surface-discovery-permission-limited'
|
|
63219
|
-
: 'surface-discovery-failed');
|
|
63220
|
-
},
|
|
63221
|
-
});
|
|
63222
|
-
onCleanup(() => {
|
|
63223
|
-
this.discoverySubscription?.unsubscribe();
|
|
63224
|
-
this.discoverySubscription = undefined;
|
|
63225
|
-
});
|
|
63226
|
-
});
|
|
63227
|
-
effect((onCleanup) => {
|
|
63228
|
-
const resolution = this.resolution();
|
|
63229
|
-
const payload = resolution.state === 'ready' ? resolution.payload : null;
|
|
63230
|
-
const requestKey = this.buildMaterializationRequestKey(resolution);
|
|
63231
|
-
// Composition state updates can re-create structurally equal input objects.
|
|
63232
|
-
// Keep the mounted child widget when its effective materialization contract
|
|
63233
|
-
// did not change; destroying it here also destroys transient table state such
|
|
63234
|
-
// as the selection that may have triggered the composition update itself.
|
|
63235
|
-
if (requestKey === this.materializationRequestKey
|
|
63236
|
-
&& this.materializedPayload() != null) {
|
|
63237
|
-
return;
|
|
63238
|
-
}
|
|
63239
|
-
this.materializationRequestKey = requestKey;
|
|
63240
|
-
this.materializedPayload.set(null);
|
|
63241
|
-
if (!payload) {
|
|
63242
|
-
return;
|
|
63243
|
-
}
|
|
63244
|
-
let cancelled = false;
|
|
63245
|
-
this.materializer.materialize(payload)
|
|
63246
|
-
.then((materialized) => {
|
|
63247
|
-
if (!cancelled && this.materializationRequestKey === requestKey) {
|
|
63248
|
-
this.materializedPayload.set(materialized);
|
|
63249
|
-
}
|
|
63250
|
-
})
|
|
63251
|
-
.catch(() => {
|
|
63252
|
-
if (!cancelled && this.materializationRequestKey === requestKey) {
|
|
63253
|
-
this.materializedPayload.set(payload);
|
|
63254
|
-
}
|
|
63255
|
-
});
|
|
63256
|
-
onCleanup(() => {
|
|
63257
|
-
cancelled = true;
|
|
63258
|
-
});
|
|
63259
|
-
});
|
|
63260
|
-
}
|
|
63261
|
-
openRelated() {
|
|
63262
|
-
const payload = this.resolution().payload;
|
|
63263
|
-
if (payload) {
|
|
63264
|
-
this.surfaceOpen.emit(payload);
|
|
63265
|
-
}
|
|
63266
|
-
}
|
|
63267
|
-
onWidgetEvent(event) {
|
|
63268
|
-
const resourceEvent = event.resourceEvent ?? this.extractResourceEvent(event);
|
|
63269
|
-
if (resourceEvent) {
|
|
63270
|
-
this.resourceEvent.emit(resourceEvent);
|
|
63271
|
-
this.widgetEvent.emit({ ...event, resourceEvent });
|
|
63272
|
-
return;
|
|
63273
|
-
}
|
|
63274
|
-
this.widgetEvent.emit(event);
|
|
63275
|
-
}
|
|
63276
|
-
stateIcon() {
|
|
63277
|
-
switch (this.renderResolution().state) {
|
|
63278
|
-
case 'ready':
|
|
63279
|
-
return 'hub';
|
|
63280
|
-
case 'permission-limited':
|
|
63281
|
-
return 'lock';
|
|
63282
|
-
case 'not-found':
|
|
63283
|
-
return 'link_off';
|
|
63284
|
-
case 'empty':
|
|
63285
|
-
return 'playlist_remove';
|
|
63286
|
-
case 'error':
|
|
63287
|
-
return 'error';
|
|
63288
|
-
default:
|
|
63289
|
-
return 'account_tree';
|
|
63290
|
-
}
|
|
63291
|
-
}
|
|
63292
|
-
stateTitle() {
|
|
63293
|
-
const state = this.renderResolution().state;
|
|
63294
|
-
return this.t(`state.${state}.title`, this.defaultTitle(state));
|
|
63295
|
-
}
|
|
63296
|
-
stateDescription() {
|
|
63297
|
-
const state = this.renderResolution().state;
|
|
63298
|
-
return this.t(`state.${state}.description`, this.defaultDescription(state));
|
|
63299
|
-
}
|
|
63300
|
-
t(key, fallback) {
|
|
63301
|
-
return this.i18n.t(key, undefined, fallback, RELATED_RESOURCE_OUTLET_I18N_NAMESPACE);
|
|
63302
|
-
}
|
|
63303
|
-
defaultTitle(state) {
|
|
63304
|
-
return state === 'ready'
|
|
63305
|
-
? this.t('status.ready', 'Related resource ready')
|
|
63306
|
-
: 'Related resource';
|
|
63307
|
-
}
|
|
63308
|
-
defaultDescription(state) {
|
|
63309
|
-
return this.renderResolution().reason || state;
|
|
63310
|
-
}
|
|
63311
|
-
applyCatalogSurface(surfaceId, catalog) {
|
|
63312
|
-
const normalizedId = this.trim(surfaceId);
|
|
63313
|
-
const surface = (catalog?.surfaces || []).find((candidate) => this.trim(candidate.id) === normalizedId) || null;
|
|
63314
|
-
this.discoveredSurface.set(surface);
|
|
63315
|
-
this.discoveryState.set(surface ? null : 'not-found');
|
|
63316
|
-
this.discoveryStateReason.set(surface ? null : 'surface-id-not-found');
|
|
63317
|
-
}
|
|
63318
|
-
resetDiscoveryState() {
|
|
63319
|
-
this.discoveredSurface.set(null);
|
|
63320
|
-
this.discoveryState.set(null);
|
|
63321
|
-
this.discoveryStateReason.set(null);
|
|
63322
|
-
this.discoveryRequestKey = '';
|
|
63323
|
-
}
|
|
63324
|
-
discoveryOptions(endpointKey, apiUrlEntry) {
|
|
63325
|
-
if (!endpointKey && !apiUrlEntry) {
|
|
63326
|
-
return undefined;
|
|
63327
|
-
}
|
|
63328
|
-
return {
|
|
63329
|
-
endpointKey: endpointKey || undefined,
|
|
63330
|
-
apiUrlEntry: apiUrlEntry || null,
|
|
63331
|
-
};
|
|
63332
|
-
}
|
|
63333
|
-
resolveFallbackSurfaceCatalogHref(parentResourcePath, parentResourceId) {
|
|
63334
|
-
const path = this.normalizeResourcePath(parentResourcePath || '');
|
|
63335
|
-
if (!path || parentResourceId == null || parentResourceId === '') {
|
|
63336
|
-
return null;
|
|
63337
|
-
}
|
|
63338
|
-
return `/api/${path}/${encodeURIComponent(String(parentResourceId))}/surfaces`;
|
|
63339
|
-
}
|
|
63340
|
-
normalizeResourcePath(resourcePath) {
|
|
63341
|
-
let normalized = this.trim(resourcePath);
|
|
63342
|
-
if (/^https?:\/\//i.test(normalized)) {
|
|
63343
|
-
try {
|
|
63344
|
-
normalized = new URL(normalized).pathname;
|
|
63345
|
-
}
|
|
63346
|
-
catch {
|
|
63347
|
-
return '';
|
|
63348
|
-
}
|
|
63349
|
-
}
|
|
63350
|
-
return normalized
|
|
63351
|
-
.replace(/^\/+/, '')
|
|
63352
|
-
.replace(/^(?:api\/)+/i, '')
|
|
63353
|
-
.replace(/\/+$/, '');
|
|
63354
|
-
}
|
|
63355
|
-
buildDiscoveryRequestKey(surfaceId, source, href, options) {
|
|
63356
|
-
return JSON.stringify({
|
|
63357
|
-
surfaceId: this.trim(surfaceId),
|
|
63358
|
-
source,
|
|
63359
|
-
href,
|
|
63360
|
-
endpointKey: options?.endpointKey || null,
|
|
63361
|
-
apiUrlEntry: options?.apiUrlEntry || null,
|
|
63362
|
-
});
|
|
63363
|
-
}
|
|
63364
|
-
buildMaterializationRequestKey(resolution) {
|
|
63365
|
-
return JSON.stringify({
|
|
63366
|
-
state: resolution.state,
|
|
63367
|
-
payload: resolution.payload ?? null,
|
|
63368
|
-
mode: this.mode(),
|
|
63369
|
-
});
|
|
63370
|
-
}
|
|
63371
|
-
isPermissionError(error) {
|
|
63372
|
-
const status = typeof error === 'object' && error
|
|
63373
|
-
? error.status
|
|
63374
|
-
: null;
|
|
63375
|
-
return status === 401 || status === 403;
|
|
63376
|
-
}
|
|
63377
|
-
extractResourceEvent(event) {
|
|
63378
|
-
if (event.output !== 'resourceEvent' || !event.payload || typeof event.payload !== 'object') {
|
|
63379
|
-
return null;
|
|
63380
|
-
}
|
|
63381
|
-
const candidate = event.payload;
|
|
63382
|
-
return typeof candidate.kind === 'string'
|
|
63383
|
-
&& typeof candidate.sourceComponentId === 'string'
|
|
63384
|
-
&& 'payload' in candidate
|
|
63385
|
-
? candidate
|
|
63386
|
-
: null;
|
|
63387
|
-
}
|
|
63388
|
-
trim(value) {
|
|
63389
|
-
return typeof value === 'string' ? value.trim() : '';
|
|
63390
|
-
}
|
|
63391
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PraxisRelatedResourceOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
63392
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: PraxisRelatedResourceOutletComponent, isStandalone: true, selector: "praxis-related-resource-outlet", inputs: { surface: { classPropertyName: "surface", publicName: "surface", isSignal: true, isRequired: false, transformFunction: null }, surfaceId: { classPropertyName: "surfaceId", publicName: "surfaceId", isSignal: true, isRequired: false, transformFunction: null }, surfaceCatalog: { classPropertyName: "surfaceCatalog", publicName: "surfaceCatalog", isSignal: true, isRequired: false, transformFunction: null }, discoverySource: { classPropertyName: "discoverySource", publicName: "discoverySource", isSignal: true, isRequired: false, transformFunction: null }, parentLinks: { classPropertyName: "parentLinks", publicName: "parentLinks", isSignal: true, isRequired: false, transformFunction: null }, apiEndpointKey: { classPropertyName: "apiEndpointKey", publicName: "apiEndpointKey", isSignal: true, isRequired: false, transformFunction: null }, apiUrlEntry: { classPropertyName: "apiUrlEntry", publicName: "apiUrlEntry", isSignal: true, isRequired: false, transformFunction: null }, parentRecord: { classPropertyName: "parentRecord", publicName: "parentRecord", isSignal: true, isRequired: false, transformFunction: null }, parentResourceId: { classPropertyName: "parentResourceId", publicName: "parentResourceId", isSignal: true, isRequired: false, transformFunction: null }, parentIdentity: { classPropertyName: "parentIdentity", publicName: "parentIdentity", isSignal: true, isRequired: false, transformFunction: null }, parentResourcePath: { classPropertyName: "parentResourcePath", publicName: "parentResourcePath", isSignal: true, isRequired: false, transformFunction: null }, presentation: { classPropertyName: "presentation", publicName: "presentation", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, tableId: { classPropertyName: "tableId", publicName: "tableId", isSignal: true, isRequired: false, transformFunction: null }, tableConfig: { classPropertyName: "tableConfig", publicName: "tableConfig", isSignal: true, isRequired: false, transformFunction: null }, enableCustomization: { classPropertyName: "enableCustomization", publicName: "enableCustomization", isSignal: true, isRequired: false, transformFunction: null }, authoringCapability: { classPropertyName: "authoringCapability", publicName: "authoringCapability", isSignal: true, isRequired: false, transformFunction: null }, emptyState: { classPropertyName: "emptyState", publicName: "emptyState", isSignal: true, isRequired: false, transformFunction: null }, queryContext: { classPropertyName: "queryContext", publicName: "queryContext", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, stateReason: { classPropertyName: "stateReason", publicName: "stateReason", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, strictValidation: { classPropertyName: "strictValidation", publicName: "strictValidation", isSignal: true, isRequired: false, transformFunction: null }, ownerWidgetKey: { classPropertyName: "ownerWidgetKey", publicName: "ownerWidgetKey", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { surfaceOpen: "surfaceOpen", widgetEvent: "widgetEvent", resourceEvent: "resourceEvent" }, host: { attributes: { "data-praxis-related-resource-outlet": "core" }, properties: { "attr.data-state": "renderResolution().state" } }, providers: [providePraxisI18nConfig(RELATED_RESOURCE_OUTLET_I18N_CONFIG)], ngImport: i0, template: `
|
|
63393
|
-
<section class="pdx-related-outlet" [class.pdx-related-outlet--compact]="compact()">
|
|
63394
|
-
@if (renderResolution().state === 'ready' && mode() === 'inline' && renderResolution().payload?.widget) {
|
|
63395
|
-
<ng-container
|
|
63396
|
-
[dynamicWidgetLoader]="renderResolution().payload!.widget"
|
|
63397
|
-
[ownerWidgetKey]="ownerWidgetKey()"
|
|
63398
|
-
[context]="renderResolution().payload!.context || null"
|
|
63399
|
-
[strictValidation]="strictValidation()"
|
|
63400
|
-
[autoWireOutputs]="true"
|
|
63401
|
-
(widgetEvent)="onWidgetEvent($event)"
|
|
63402
|
-
></ng-container>
|
|
63403
|
-
} @else {
|
|
63404
|
-
<div
|
|
63405
|
-
class="pdx-related-outlet__state"
|
|
63406
|
-
[class.pdx-related-outlet__state--ready]="renderResolution().state === 'ready'"
|
|
63407
|
-
[class.pdx-related-outlet__state--busy]="isBusy()"
|
|
63408
|
-
role="status"
|
|
63409
|
-
aria-live="polite"
|
|
63410
|
-
>
|
|
63411
|
-
<div class="pdx-related-outlet__icon" aria-hidden="true">
|
|
63412
|
-
@if (isBusy()) {
|
|
63413
|
-
<mat-progress-spinner mode="indeterminate" diameter="22"></mat-progress-spinner>
|
|
63414
|
-
} @else {
|
|
63415
|
-
<mat-icon [fontIcon]="stateIcon()"></mat-icon>
|
|
63416
|
-
}
|
|
63417
|
-
</div>
|
|
63418
|
-
<div class="pdx-related-outlet__copy">
|
|
63419
|
-
<h3>{{ stateTitle() }}</h3>
|
|
63420
|
-
<p>{{ stateDescription() }}</p>
|
|
63421
|
-
</div>
|
|
63422
|
-
@if (resolution().state === 'ready' && mode() === 'open-action') {
|
|
63423
|
-
<button mat-flat-button type="button" color="primary" (click)="openRelated()">
|
|
63424
|
-
<mat-icon fontIcon="open_in_new" aria-hidden="true"></mat-icon>
|
|
63425
|
-
{{ t('action.open', 'Open related') }}
|
|
63426
|
-
</button>
|
|
63427
|
-
}
|
|
63428
|
-
</div>
|
|
63429
|
-
}
|
|
63430
|
-
</section>
|
|
63431
|
-
`, isInline: true, styles: [":host{display:block;min-width:0}.pdx-related-outlet{display:block;min-width:0;color:var(--md-sys-color-on-surface, currentColor)}.pdx-related-outlet__state{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:var(--pdx-related-outlet-gap, 12px);min-height:var(--pdx-related-outlet-min-height, 64px);padding:var(--pdx-related-outlet-padding, 12px);border:1px solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, .16));border-radius:var(--pdx-related-outlet-radius, 8px);background:var(--md-sys-color-surface-container-low, var(--md-sys-color-surface, transparent))}.pdx-related-outlet--compact .pdx-related-outlet__state{min-height:var(--pdx-related-outlet-compact-min-height, 48px);padding:var(--pdx-related-outlet-compact-padding, 8px 10px)}.pdx-related-outlet__state--ready{border-color:var(--md-sys-color-primary, currentColor)}.pdx-related-outlet__icon{display:inline-grid;place-items:center;width:32px;height:32px;color:var(--md-sys-color-primary, currentColor)}.pdx-related-outlet__state--busy .pdx-related-outlet__icon{color:var(--md-sys-color-secondary, currentColor)}.pdx-related-outlet__copy{display:grid;gap:2px;min-width:0}.pdx-related-outlet__copy h3,.pdx-related-outlet__copy p{margin:0}.pdx-related-outlet__copy h3{font:var(--md-sys-typescale-title-small, 600 .95rem/1.25rem system-ui);color:var(--md-sys-color-on-surface, currentColor)}.pdx-related-outlet__copy p{font:var(--md-sys-typescale-body-small, 400 .82rem/1.15rem system-ui);color:var(--md-sys-color-on-surface-variant, currentColor)}@media(max-width:600px){.pdx-related-outlet__state{grid-template-columns:auto minmax(0,1fr)}.pdx-related-outlet__state button{grid-column:1 / -1;justify-self:start}}\n"], dependencies: [{ kind: "directive", type: DynamicWidgetLoaderDirective, selector: "[dynamicWidgetLoader]", inputs: ["dynamicWidgetLoader", "ownerWidgetKey", "context", "strictValidation", "autoWireOutputs"], outputs: ["widgetEvent", "widgetDiagnostic"], exportAs: ["dynamicWidgetLoader"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i3$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] });
|
|
63432
|
-
}
|
|
63433
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PraxisRelatedResourceOutletComponent, decorators: [{
|
|
63434
|
-
type: Component,
|
|
63435
|
-
args: [{ selector: 'praxis-related-resource-outlet', standalone: true, host: {
|
|
63436
|
-
'data-praxis-related-resource-outlet': 'core',
|
|
63437
|
-
'[attr.data-state]': 'renderResolution().state',
|
|
63438
|
-
}, imports: [
|
|
63439
|
-
DynamicWidgetLoaderDirective,
|
|
63440
|
-
MatButtonModule,
|
|
63441
|
-
MatIconModule,
|
|
63442
|
-
MatProgressSpinnerModule,
|
|
63443
|
-
], providers: [providePraxisI18nConfig(RELATED_RESOURCE_OUTLET_I18N_CONFIG)], template: `
|
|
63444
|
-
<section class="pdx-related-outlet" [class.pdx-related-outlet--compact]="compact()">
|
|
63445
|
-
@if (renderResolution().state === 'ready' && mode() === 'inline' && renderResolution().payload?.widget) {
|
|
63446
|
-
<ng-container
|
|
63447
|
-
[dynamicWidgetLoader]="renderResolution().payload!.widget"
|
|
63448
|
-
[ownerWidgetKey]="ownerWidgetKey()"
|
|
63449
|
-
[context]="renderResolution().payload!.context || null"
|
|
63450
|
-
[strictValidation]="strictValidation()"
|
|
63451
|
-
[autoWireOutputs]="true"
|
|
63452
|
-
(widgetEvent)="onWidgetEvent($event)"
|
|
63453
|
-
></ng-container>
|
|
63454
|
-
} @else {
|
|
63455
|
-
<div
|
|
63456
|
-
class="pdx-related-outlet__state"
|
|
63457
|
-
[class.pdx-related-outlet__state--ready]="renderResolution().state === 'ready'"
|
|
63458
|
-
[class.pdx-related-outlet__state--busy]="isBusy()"
|
|
63459
|
-
role="status"
|
|
63460
|
-
aria-live="polite"
|
|
63461
|
-
>
|
|
63462
|
-
<div class="pdx-related-outlet__icon" aria-hidden="true">
|
|
63463
|
-
@if (isBusy()) {
|
|
63464
|
-
<mat-progress-spinner mode="indeterminate" diameter="22"></mat-progress-spinner>
|
|
63465
|
-
} @else {
|
|
63466
|
-
<mat-icon [fontIcon]="stateIcon()"></mat-icon>
|
|
63467
|
-
}
|
|
63468
|
-
</div>
|
|
63469
|
-
<div class="pdx-related-outlet__copy">
|
|
63470
|
-
<h3>{{ stateTitle() }}</h3>
|
|
63471
|
-
<p>{{ stateDescription() }}</p>
|
|
63472
|
-
</div>
|
|
63473
|
-
@if (resolution().state === 'ready' && mode() === 'open-action') {
|
|
63474
|
-
<button mat-flat-button type="button" color="primary" (click)="openRelated()">
|
|
63475
|
-
<mat-icon fontIcon="open_in_new" aria-hidden="true"></mat-icon>
|
|
63476
|
-
{{ t('action.open', 'Open related') }}
|
|
63477
|
-
</button>
|
|
63478
|
-
}
|
|
63479
|
-
</div>
|
|
63480
|
-
}
|
|
63481
|
-
</section>
|
|
63482
|
-
`, styles: [":host{display:block;min-width:0}.pdx-related-outlet{display:block;min-width:0;color:var(--md-sys-color-on-surface, currentColor)}.pdx-related-outlet__state{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:var(--pdx-related-outlet-gap, 12px);min-height:var(--pdx-related-outlet-min-height, 64px);padding:var(--pdx-related-outlet-padding, 12px);border:1px solid var(--md-sys-color-outline-variant, rgba(0, 0, 0, .16));border-radius:var(--pdx-related-outlet-radius, 8px);background:var(--md-sys-color-surface-container-low, var(--md-sys-color-surface, transparent))}.pdx-related-outlet--compact .pdx-related-outlet__state{min-height:var(--pdx-related-outlet-compact-min-height, 48px);padding:var(--pdx-related-outlet-compact-padding, 8px 10px)}.pdx-related-outlet__state--ready{border-color:var(--md-sys-color-primary, currentColor)}.pdx-related-outlet__icon{display:inline-grid;place-items:center;width:32px;height:32px;color:var(--md-sys-color-primary, currentColor)}.pdx-related-outlet__state--busy .pdx-related-outlet__icon{color:var(--md-sys-color-secondary, currentColor)}.pdx-related-outlet__copy{display:grid;gap:2px;min-width:0}.pdx-related-outlet__copy h3,.pdx-related-outlet__copy p{margin:0}.pdx-related-outlet__copy h3{font:var(--md-sys-typescale-title-small, 600 .95rem/1.25rem system-ui);color:var(--md-sys-color-on-surface, currentColor)}.pdx-related-outlet__copy p{font:var(--md-sys-typescale-body-small, 400 .82rem/1.15rem system-ui);color:var(--md-sys-color-on-surface-variant, currentColor)}@media(max-width:600px){.pdx-related-outlet__state{grid-template-columns:auto minmax(0,1fr)}.pdx-related-outlet__state button{grid-column:1 / -1;justify-self:start}}\n"] }]
|
|
63483
|
-
}], ctorParameters: () => [], propDecorators: { surface: [{ type: i0.Input, args: [{ isSignal: true, alias: "surface", required: false }] }], surfaceId: [{ type: i0.Input, args: [{ isSignal: true, alias: "surfaceId", required: false }] }], surfaceCatalog: [{ type: i0.Input, args: [{ isSignal: true, alias: "surfaceCatalog", required: false }] }], discoverySource: [{ type: i0.Input, args: [{ isSignal: true, alias: "discoverySource", required: false }] }], parentLinks: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentLinks", required: false }] }], apiEndpointKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "apiEndpointKey", required: false }] }], apiUrlEntry: [{ type: i0.Input, args: [{ isSignal: true, alias: "apiUrlEntry", required: false }] }], parentRecord: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentRecord", required: false }] }], parentResourceId: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentResourceId", required: false }] }], parentIdentity: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentIdentity", required: false }] }], parentResourcePath: [{ type: i0.Input, args: [{ isSignal: true, alias: "parentResourcePath", required: false }] }], presentation: [{ type: i0.Input, args: [{ isSignal: true, alias: "presentation", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], subtitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "subtitle", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], tableId: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableId", required: false }] }], tableConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "tableConfig", required: false }] }], enableCustomization: [{ type: i0.Input, args: [{ isSignal: true, alias: "enableCustomization", required: false }] }], authoringCapability: [{ type: i0.Input, args: [{ isSignal: true, alias: "authoringCapability", required: false }] }], emptyState: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyState", required: false }] }], queryContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "queryContext", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], stateReason: [{ type: i0.Input, args: [{ isSignal: true, alias: "stateReason", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], strictValidation: [{ type: i0.Input, args: [{ isSignal: true, alias: "strictValidation", required: false }] }], ownerWidgetKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "ownerWidgetKey", required: false }] }], surfaceOpen: [{ type: i0.Output, args: ["surfaceOpen"] }], widgetEvent: [{ type: i0.Output, args: ["widgetEvent"] }], resourceEvent: [{ type: i0.Output, args: ["resourceEvent"] }] } });
|
|
63484
|
-
|
|
63485
64274
|
const DEFAULT_ICONS = [
|
|
63486
64275
|
'search', 'close', 'check', 'add', 'remove', 'delete', 'edit', 'save', 'cancel', 'warning', 'error', 'info', 'help',
|
|
63487
64276
|
'face', 'person', 'account_circle', 'people', 'group', 'settings', 'home', 'menu', 'more_horiz', 'more_vert', 'refresh', 'arrow_back', 'arrow_forward', 'expand_more', 'expand_less', 'open_in_full', 'fullscreen', 'open_in_new',
|
|
@@ -67161,6 +67950,8 @@ class PraxisQuickViewTriggerDirective {
|
|
|
67161
67950
|
elementRef = inject(ElementRef);
|
|
67162
67951
|
quickViewService = inject(ResourceQuickViewService);
|
|
67163
67952
|
lastResolvedTargetSignature = null;
|
|
67953
|
+
cachedBindingRef = undefined;
|
|
67954
|
+
cachedIsConfigured = false;
|
|
67164
67955
|
binding = null;
|
|
67165
67956
|
praxisQuickViewRecord = null;
|
|
67166
67957
|
praxisQuickViewTriggerMode = 'hover-and-click';
|
|
@@ -67176,10 +67967,16 @@ class PraxisQuickViewTriggerDirective {
|
|
|
67176
67967
|
return this.praxisQuickViewTriggerMode || 'hover-and-click';
|
|
67177
67968
|
}
|
|
67178
67969
|
get isQuickViewConfigured() {
|
|
67970
|
+
if (this.binding === this.cachedBindingRef) {
|
|
67971
|
+
return this.cachedIsConfigured;
|
|
67972
|
+
}
|
|
67973
|
+
this.cachedBindingRef = this.binding;
|
|
67179
67974
|
if (!this.binding) {
|
|
67975
|
+
this.cachedIsConfigured = false;
|
|
67180
67976
|
return false;
|
|
67181
67977
|
}
|
|
67182
|
-
|
|
67978
|
+
this.cachedIsConfigured = validateResourceQuickViewBinding(this.binding).valid;
|
|
67979
|
+
return this.cachedIsConfigured;
|
|
67183
67980
|
}
|
|
67184
67981
|
get shouldExposeDialogPopupAttr() {
|
|
67185
67982
|
return this.isQuickViewConfigured && this.triggerMode !== 'hover-only';
|
|
@@ -68016,7 +68813,7 @@ class PraxisAppShellComponent {
|
|
|
68016
68813
|
</main>
|
|
68017
68814
|
</div>
|
|
68018
68815
|
</div>
|
|
68019
|
-
`, isInline: true, styles: [":host{display:block;width:100%;height:100vh;overflow:hidden;font-family:inherit}.praxis-shell{display:flex;width:100%;height:100%;background:var(--background, #090d16);color:var(--foreground, #f0f4f8);position:relative;overflow:hidden;box-sizing:border-box}.praxis-shell__skip-link{position:absolute;top:-100px;left:16px;background:var(--primary, #0ea5e9);color:var(--primary-foreground, #ffffff);padding:8px 16px;border-radius:6px;font-weight:600;font-size:.875rem;z-index:9999;text-decoration:none;transition:top .2s ease}.praxis-shell__skip-link:focus{top:16px;outline:2px solid var(--ring, var(--primary, #0ea5e9));outline-offset:2px}.praxis-shell__progress-bar{position:absolute;top:0;left:0;right:0;height:3px;background:color-mix(in oklab,var(--primary, #0ea5e9) 15%,transparent);z-index:1000;overflow:hidden}.praxis-shell__progress-laser{width:40%;height:100%;background:linear-gradient(90deg,transparent,var(--primary, #0ea5e9),var(--primary-deep, var(--primary, #0ea5e9)),transparent);box-shadow:0 0 10px color-mix(in oklab,var(--primary, #0ea5e9) 30%,transparent);animation:praxis-laser-slide 1.4s infinite cubic-bezier(.4,0,.2,1)}@keyframes praxis-laser-slide{0%{transform:translate(-150%)}to{transform:translate(350%)}}.praxis-shell__backdrop{position:fixed;inset:0;background:var(--overlay, rgba(0, 0, 0, .55));-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:200;animation:praxis-fade-in .2s ease}@keyframes praxis-fade-in{0%{opacity:0}to{opacity:1}}.praxis-shell__sidebar{width:260px;min-width:260px;height:100%;background:var(--sidebar, var(--card, #0f172a));color:var(--sidebar-foreground, var(--foreground, #f0f4f8));border-right:1px solid var(--border, rgba(255, 255, 255, .08));display:flex;flex-direction:column;transition:width .25s cubic-bezier(.16,1,.3,1),transform .25s cubic-bezier(.16,1,.3,1);z-index:250;overflow:hidden}.praxis-shell--collapsed .praxis-shell__sidebar{width:72px;min-width:72px}.praxis-shell__brand{height:64px;padding:0 16px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border, rgba(255, 255, 255, .06))}.praxis-shell__brand-link{display:flex;align-items:center;gap:12px;text-decoration:none;color:inherit;min-width:0}.praxis-shell__brand-icon{width:40px;height:40px;border-radius:10px;background:var(--command-gradient, linear-gradient(135deg, var(--primary, #0369a1), var(--primary-deep, var(--primary, #075985))));color:var(--primary-foreground, #fff);display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:var(--shadow-panel, 0 4px 12px color-mix(in oklab, var(--primary, #0ea5e9) 20%, transparent))}.praxis-shell__brand-logo{height:36px;max-width:140px;object-fit:contain}.praxis-shell__brand-info{display:flex;flex-direction:column;overflow:hidden}.praxis-shell__brand-title{font-weight:var(--mat-sys-title-small-weight, 500);font-size:.95rem;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;letter-spacing:-.01em}.praxis-shell__brand-meta{font-size:.72rem;color:var(--sidebar-foreground, var(--muted-foreground, #94a3b8));white-space:nowrap}.praxis-shell__mobile-close-btn{display:none;background:transparent;border:none;color:var(--sidebar-foreground, var(--muted-foreground, #94a3b8));cursor:pointer;padding:6px;border-radius:6px}.praxis-shell__nav{flex:1;padding:16px 10px;overflow-y:auto;overflow-x:hidden}.praxis-shell__nav-group{margin-bottom:20px}.praxis-shell__nav-group-title{padding:0 10px 8px;font-size:.7rem;font-weight:var(--mat-sys-label-small-weight, 500);text-transform:uppercase;letter-spacing:.06em;color:var(--sidebar-foreground, var(--muted-foreground, #64748b))}.praxis-shell__nav-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:4px}.praxis-shell__nav-item{margin:0}.praxis-shell__nav-link{display:flex;align-items:center;gap:12px;padding:9px 12px;border-radius:9px;color:var(--sidebar-foreground, var(--muted-foreground, #94a3b8));text-decoration:none;font-size:.88rem;font-weight:var(--mat-sys-body-medium-weight, 400);transition:background .15s ease,color .15s ease;cursor:pointer;white-space:nowrap}.praxis-shell__nav-link:hover{background:var(--sidebar-accent, color-mix(in oklab, var(--sidebar-foreground, var(--foreground, #f0f4f8)) 10%, transparent));color:var(--sidebar-accent-foreground, var(--sidebar-foreground, var(--foreground, #f8fafc)))}.praxis-shell__nav-link.active{background:color-mix(in oklab,var(--primary, #0ea5e9) 16%,transparent);color:var(--sidebar-primary, var(--primary, #38bdf8));font-weight:var(--mat-sys-title-small-weight, 500)}.praxis-shell__nav-icon{display:flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0}.praxis-shell__nav-icon .material-symbols-outlined{font-size:20px}.praxis-shell__nav-label{flex:1;overflow:hidden;text-overflow:ellipsis}.praxis-shell__nav-badge{font-size:.7rem;font-weight:700;padding:2px 7px;border-radius:9999px;line-height:1}.praxis-shell__nav-badge--primary{background:color-mix(in oklab,var(--primary, #0ea5e9) 14%,var(--card, var(--md-sys-color-surface)));color:var(--foreground, #1f2937)}.praxis-shell__nav-badge--success{background:color-mix(in oklab,var(--praxis-success, var(--ready, #15803d)) 14%,var(--card, var(--md-sys-color-surface)));color:var(--foreground, #1f2937)}.praxis-shell__nav-badge--warning{background:color-mix(in oklab,var(--praxis-warning, var(--warning, #a16207)) 14%,var(--card, var(--md-sys-color-surface)));color:var(--foreground, #1f2937)}.praxis-shell__nav-badge--error{background:color-mix(in oklab,var(--destructive, #b91c1c) 14%,var(--card, var(--md-sys-color-surface)));color:var(--foreground, #1f2937)}.praxis-shell__nav-badge--info{background:color-mix(in oklab,var(--praxis-info, #2563eb) 14%,var(--card, var(--md-sys-color-surface)));color:var(--foreground, #1f2937)}.praxis-shell__nav-badge--neutral{background:color-mix(in oklab,var(--muted-foreground, #64748b) 14%,var(--card, var(--md-sys-color-surface)));color:var(--foreground, #1f2937)}.praxis-shell__sidebar-footer-status{padding:10px}.praxis-shell__status-card{padding:10px 12px;border-radius:10px;background:var(--sidebar-accent, color-mix(in oklab, var(--sidebar-foreground, var(--foreground, #f0f4f8)) 10%, transparent));border:1px solid var(--border, rgba(255, 255, 255, .07));color:var(--sidebar-accent-foreground, var(--sidebar-foreground, var(--foreground, #f0f4f8)))}.praxis-shell__status-card--success{border-color:color-mix(in oklab,var(--praxis-success, var(--ready, #15803d)) 30%,transparent)}.praxis-shell__status-card--warning{border-color:color-mix(in oklab,var(--praxis-warning, var(--warning, #a16207)) 30%,transparent)}.praxis-shell__status-card--error{border-color:color-mix(in oklab,var(--destructive, #b91c1c) 30%,transparent)}.praxis-shell__status-card-header{display:flex;align-items:center;gap:8px;font-size:.75rem;font-weight:600}.praxis-shell__pulse-indicator{position:relative;display:inline-flex;width:8px;height:8px}.praxis-shell__pulse-ring{position:absolute;inset:-2px;border-radius:9999px;background:var(--praxis-success, var(--ready, #15803d));opacity:.6;animation:praxis-pulse 1.8s cubic-bezier(0,0,.2,1) infinite}.praxis-shell__pulse-dot{width:8px;height:8px;border-radius:9999px;background:var(--praxis-success, var(--ready, #15803d))}@keyframes praxis-pulse{0%{transform:scale(.9);opacity:.8}70%{transform:scale(2.2);opacity:0}to{transform:scale(2.2);opacity:0}}.praxis-shell__status-card-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.praxis-shell__status-card-metric{font-size:.7rem;color:inherit;margin-top:4px}.praxis-shell__sidebar-toggle-bar{padding:10px;border-top:1px solid var(--border, rgba(255, 255, 255, .06))}.praxis-shell__collapse-btn{display:flex;align-items:center;gap:10px;width:100%;height:38px;padding:0 10px;border-radius:8px;background:transparent;border:none;color:var(--sidebar-foreground, var(--muted-foreground, #94a3b8));cursor:pointer;font-size:.85rem;font-weight:500;transition:background .15s ease,color .15s ease}.praxis-shell__collapse-btn:hover{background:var(--sidebar-accent, color-mix(in oklab, var(--sidebar-foreground, var(--foreground, #f0f4f8)) 10%, transparent));color:var(--sidebar-accent-foreground, var(--sidebar-foreground, var(--foreground, #f8fafc)))}.praxis-shell__stage{flex:1;min-width:0;display:flex;flex-direction:column;height:100%;overflow:hidden}.praxis-shell__topbar{height:64px;padding:0 20px;background:var(--surface-gradient, var(--card, #0f172a));border-bottom:1px solid var(--border, rgba(255, 255, 255, .08));display:flex;align-items:center;gap:12px;flex-shrink:0;z-index:100}.praxis-shell__burger-btn{display:none;background:transparent;border:none;color:var(--foreground, #f8fafc);cursor:pointer;padding:8px;border-radius:8px}.praxis-shell__search-box{display:flex;align-items:center;gap:10px;width:clamp(160px,20vw,280px);min-width:140px;max-width:100%;flex-shrink:1;height:38px;padding:0 12px;background:var(--secondary, color-mix(in oklab, var(--card, var(--md-sys-color-surface)) 95%, var(--primary, #0ea5e9)));border:1px solid var(--border, rgba(255, 255, 255, .08));border-radius:9px;color:var(--muted-foreground, #94a3b8);transition:border-color .15s ease,box-shadow .15s ease}.praxis-shell__search-box:focus-within{border-color:var(--primary, #0ea5e9);box-shadow:0 0 0 2px color-mix(in oklab,var(--ring, var(--primary, #0ea5e9)) 20%,transparent);color:var(--foreground, #f8fafc)}.praxis-shell__search-icon{font-size:18px}.praxis-shell__search-input{flex:1;min-width:0;background:transparent;border:none;outline:none;color:inherit;font-size:.85rem}.praxis-shell__topbar-spacer{flex:1;min-width:4px}.praxis-shell__customization-bar{display:flex;align-items:center;gap:8px;flex-wrap:nowrap;flex-shrink:0}.praxis-shell__gov-status{font-size:.72rem;font-weight:600;padding:4px 10px;border-radius:999px;background:var(--secondary, color-mix(in oklab, var(--card, #0f172a) 92%, var(--foreground, #f8fafc)));color:var(--muted-foreground, #94a3b8);border:1px solid var(--border, rgba(255, 255, 255, .1));white-space:nowrap;max-width:280px;overflow:hidden;text-overflow:ellipsis}.praxis-shell__gov-status--customized{color:var(--primary, #0ea5e9);border-color:color-mix(in oklab,var(--primary, #0ea5e9) 35%,transparent);background:color-mix(in oklab,var(--primary, #0ea5e9) 10%,transparent)}.praxis-shell__gov-status--busy{color:var(--warning, #f59e0b);border-color:color-mix(in oklab,var(--warning, #f59e0b) 35%,transparent);background:color-mix(in oklab,var(--warning, #f59e0b) 10%,transparent)}.praxis-shell__gov-status--error{color:var(--destructive, #ef4444);border-color:color-mix(in oklab,var(--destructive, #ef4444) 45%,transparent);background:color-mix(in oklab,var(--destructive, #ef4444) 12%,transparent)}.praxis-shell__gov-btn{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 11px;border-radius:8px;font-size:.76rem;font-weight:600;cursor:pointer;transition:all .15s ease;background:transparent;border:1px solid var(--border, rgba(255, 255, 255, .12));color:var(--foreground, #f8fafc);white-space:nowrap}.praxis-shell__gov-btn .material-symbols-outlined{font-size:16px}.praxis-shell__gov-btn:disabled{opacity:.5;cursor:not-allowed}.praxis-shell__gov-btn--reset{color:var(--destructive, #ef4444);border-color:color-mix(in oklab,var(--destructive, #ef4444) 32%,transparent);background:color-mix(in oklab,var(--destructive, #ef4444) 8%,transparent)}.praxis-shell__gov-btn--reset:hover:not(:disabled){background:color-mix(in oklab,var(--destructive, #ef4444) 16%,transparent);border-color:var(--destructive, #ef4444)}.praxis-shell__gov-btn--retry,.praxis-shell__gov-btn--reload{border-color:color-mix(in oklab,var(--primary, #0ea5e9) 35%,transparent);background:color-mix(in oklab,var(--primary, #0ea5e9) 10%,transparent)}.praxis-shell__gov-btn--retry:hover:not(:disabled),.praxis-shell__gov-btn--reload:hover:not(:disabled){background:color-mix(in oklab,var(--primary, #0ea5e9) 18%,transparent);border-color:var(--primary, #0ea5e9)}.praxis-shell__customize-toggle-btn{display:inline-flex;align-items:center;gap:7px;height:36px;padding:0 13px;border-radius:9px;font-size:.8rem;font-weight:600;cursor:pointer;transition:all .15s ease;background:color-mix(in oklab,var(--primary, #0ea5e9) 10%,transparent);border:1px solid color-mix(in oklab,var(--primary, #0ea5e9) 32%,transparent);color:var(--primary, #0ea5e9);white-space:nowrap}.praxis-shell__customize-toggle-btn .material-symbols-outlined{font-size:18px}.praxis-shell__customize-toggle-btn:hover:not(:disabled){background:color-mix(in oklab,var(--primary, #0ea5e9) 18%,transparent);border-color:var(--primary, #0ea5e9)}.praxis-shell__customize-toggle-btn--active{background:var(--ready, #10b981);border-color:var(--ready, #10b981);color:#04130d;box-shadow:0 2px 10px color-mix(in oklab,var(--ready, #10b981) 30%,transparent)}.praxis-shell__customize-toggle-btn--active:hover:not(:disabled){background:color-mix(in oklab,var(--ready, #10b981) 90%,var(--md-sys-color-on-surface, currentColor));border-color:var(--ready, #10b981);color:#04130d}.praxis-shell__customize-toggle-btn:disabled{opacity:.5;cursor:not-allowed}.praxis-shell__header-actions{display:flex;align-items:center;gap:8px}.praxis-shell__icon-btn{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:9px;background:transparent;border:1px solid var(--border, rgba(255, 255, 255, .08));color:var(--muted-foreground, #94a3b8);cursor:pointer;transition:all .15s ease}.praxis-shell__icon-btn:hover{background:var(--accent, color-mix(in oklab, var(--primary, #0ea5e9) 8%, transparent));color:var(--foreground, #f8fafc);border-color:var(--border, rgba(255, 255, 255, .15))}.praxis-shell__user-profile{display:flex;align-items:center;gap:10px;padding:5px 10px 5px 6px;border-radius:9999px;background:var(--secondary, rgba(255, 255, 255, .03));border:1px solid var(--border, rgba(255, 255, 255, .08));cursor:pointer;transition:all .15s ease;-webkit-user-select:none;user-select:none}.praxis-shell__user-profile:hover{background:var(--accent, color-mix(in oklab, var(--primary, #0ea5e9) 8%, transparent));border-color:var(--border, rgba(255, 255, 255, .16))}.praxis-shell__user-avatar{width:28px;height:28px;border-radius:9999px;object-fit:cover}.praxis-shell__user-initials{width:28px;height:28px;border-radius:9999px;background:var(--primary, #0ea5e9);color:var(--primary-foreground, #fff);display:flex;align-items:center;justify-content:center;font-size:.75rem;font-weight:700}.praxis-shell__user-info{display:flex;flex-direction:column;line-height:1.2}.praxis-shell__user-name{font-size:.82rem;font-weight:600;color:var(--foreground, #f8fafc)}.praxis-shell__user-role{font-size:.68rem;color:var(--muted-foreground, #94a3b8)}.praxis-shell__main{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:24px;box-sizing:border-box;background:var(--background, #090d16)}@media(max-width:900px){.praxis-shell__burger-btn,.praxis-shell__mobile-close-btn{display:flex}.praxis-shell__sidebar{position:fixed;top:0;bottom:0;left:0;transform:translate(-100%);width:280px!important;box-shadow:4px 0 24px #00000080}.praxis-shell--mobile-open .praxis-shell__sidebar{transform:translate(0)}.praxis-shell__search-box{width:180px}.praxis-shell__user-info{display:none}.praxis-shell__gov-status{max-width:180px}}@media(max-width:600px){.praxis-shell__topbar{height:auto;min-height:56px;padding:6px 10px;gap:8px;flex-wrap:wrap}.praxis-shell__search-box{display:none}.praxis-shell__gov-status{font-size:.66rem;padding:3px 7px;max-width:130px}.praxis-shell__customize-toggle-label,.praxis-shell__gov-btn-label{display:none}.praxis-shell__customize-toggle-btn,.praxis-shell__gov-btn{padding:0 8px}.praxis-shell__main{padding:16px 12px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
68816
|
+
`, isInline: true, styles: [":host{display:block;width:100%;height:100vh;overflow:hidden;font-family:inherit}.praxis-shell{display:flex;width:100%;height:100%;background:var(--background, #090d16);color:var(--foreground, #f0f4f8);position:relative;overflow:hidden;box-sizing:border-box}.praxis-shell__skip-link{position:absolute;top:-100px;left:16px;background:var(--primary, #0ea5e9);color:var(--primary-foreground, #ffffff);padding:8px 16px;border-radius:6px;font-weight:600;font-size:.875rem;z-index:9999;text-decoration:none;transition:top .2s ease}.praxis-shell__skip-link:focus{top:16px;outline:2px solid var(--ring, var(--primary, #0ea5e9));outline-offset:2px}.praxis-shell__progress-bar{position:absolute;top:0;left:0;right:0;height:3px;background:color-mix(in oklab,var(--primary, #0ea5e9) 15%,transparent);z-index:1000;overflow:hidden}.praxis-shell__progress-laser{width:40%;height:100%;background:linear-gradient(90deg,transparent,var(--primary, #0ea5e9),var(--primary-deep, var(--primary, #0ea5e9)),transparent);box-shadow:0 0 10px color-mix(in oklab,var(--primary, #0ea5e9) 30%,transparent);animation:praxis-laser-slide 1.4s infinite cubic-bezier(.4,0,.2,1)}@keyframes praxis-laser-slide{0%{transform:translate(-150%)}to{transform:translate(350%)}}.praxis-shell__backdrop{position:fixed;inset:0;background:var(--overlay, rgba(0, 0, 0, .55));-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:200;animation:praxis-fade-in .2s ease}@keyframes praxis-fade-in{0%{opacity:0}to{opacity:1}}.praxis-shell__sidebar{width:260px;min-width:260px;height:100%;background:var(--sidebar, var(--card, #0f172a));color:var(--sidebar-foreground, var(--foreground, #f0f4f8));border-right:none;box-shadow:1px 0 color-mix(in oklab,var(--border, rgba(255, 255, 255, .08)) 40%,transparent);display:flex;flex-direction:column;transition:width .25s cubic-bezier(.16,1,.3,1),transform .25s cubic-bezier(.16,1,.3,1);z-index:250;overflow:hidden}.praxis-shell--collapsed .praxis-shell__sidebar{width:72px;min-width:72px}.praxis-shell__brand{height:64px;padding:0 16px;display:flex;align-items:center;justify-content:space-between;border-bottom:none}.praxis-shell--collapsed .praxis-shell__brand{justify-content:center;padding:0}.praxis-shell__brand-link{display:flex;align-items:center;gap:12px;text-decoration:none;color:inherit;min-width:0}.praxis-shell__brand-icon{width:40px;height:40px;border-radius:10px;background:var(--command-gradient, linear-gradient(135deg, var(--primary, #0369a1), var(--primary-deep, var(--primary, #075985))));color:var(--primary-foreground, #fff);display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:var(--shadow-panel, 0 4px 12px color-mix(in oklab, var(--primary, #0ea5e9) 20%, transparent))}.praxis-shell__brand-logo{height:36px;max-width:140px;object-fit:contain}.praxis-shell__brand-info{display:flex;flex-direction:column;overflow:hidden}.praxis-shell__brand-title{font-weight:var(--mat-sys-title-small-weight, 500);font-size:.95rem;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;letter-spacing:-.01em}.praxis-shell__brand-meta{font-size:.72rem;color:var(--sidebar-foreground, var(--muted-foreground, #94a3b8));white-space:nowrap}.praxis-shell__mobile-close-btn{display:none;background:transparent;border:none;color:var(--sidebar-foreground, var(--muted-foreground, #94a3b8));cursor:pointer;padding:6px;border-radius:6px}.praxis-shell__nav{flex:1;padding:16px 10px;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:transparent transparent}.praxis-shell__nav:hover{scrollbar-color:color-mix(in oklab,var(--muted-foreground, #64748b) 28%,transparent) transparent}.praxis-shell__nav::-webkit-scrollbar{width:4px;height:4px}.praxis-shell__nav::-webkit-scrollbar-button{display:none;width:0;height:0}.praxis-shell__nav::-webkit-scrollbar-track{background:transparent}.praxis-shell__nav::-webkit-scrollbar-thumb{background:transparent;border-radius:999px}.praxis-shell__nav:hover::-webkit-scrollbar-thumb{background:color-mix(in oklab,var(--muted-foreground, #64748b) 28%,transparent)}.praxis-shell--collapsed .praxis-shell__nav{padding:14px 10px;scrollbar-width:none}.praxis-shell--collapsed .praxis-shell__nav::-webkit-scrollbar{width:0;display:none}.praxis-shell__nav-group{margin-bottom:20px}.praxis-shell__nav-group-title{padding:0 10px 8px;font-size:.7rem;font-weight:var(--mat-sys-label-small-weight, 500);text-transform:uppercase;letter-spacing:.06em;color:var(--sidebar-foreground, var(--muted-foreground, #64748b))}.praxis-shell__nav-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:4px}.praxis-shell__nav-item{margin:0}.praxis-shell__nav-link{display:flex;align-items:center;gap:12px;padding:9px 12px;border-radius:9px;color:var(--sidebar-foreground, var(--muted-foreground, #94a3b8));text-decoration:none;font-size:.88rem;font-weight:var(--mat-sys-body-medium-weight, 400);transition:background .15s ease,color .15s ease;cursor:pointer;white-space:nowrap}.praxis-shell--collapsed .praxis-shell__nav-link{justify-content:center;padding:0;width:44px;height:44px;margin-inline:auto;gap:0;border-radius:12px}.praxis-shell__nav-link:hover{background:var(--sidebar-accent, color-mix(in oklab, var(--sidebar-foreground, var(--foreground, #f0f4f8)) 10%, transparent));color:var(--sidebar-accent-foreground, var(--sidebar-foreground, var(--foreground, #f8fafc)))}.praxis-shell__nav-link.active{background:color-mix(in oklab,var(--primary, #0ea5e9) 16%,transparent);color:var(--sidebar-primary, var(--primary, #38bdf8));font-weight:var(--mat-sys-title-small-weight, 500)}.praxis-shell__nav-icon{display:flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0}.praxis-shell__nav-icon .material-symbols-outlined{font-size:20px;width:20px;height:20px;line-height:1;display:inline-flex;align-items:center;justify-content:center}.praxis-shell__nav-label{flex:1;overflow:hidden;text-overflow:ellipsis}.praxis-shell__nav-badge{font-size:.7rem;font-weight:700;padding:2px 7px;border-radius:9999px;line-height:1}.praxis-shell__nav-badge--primary{background:color-mix(in oklab,var(--primary, #0ea5e9) 14%,var(--card, var(--md-sys-color-surface)));color:var(--foreground, #1f2937)}.praxis-shell__nav-badge--success{background:color-mix(in oklab,var(--praxis-success, var(--ready, #15803d)) 14%,var(--card, var(--md-sys-color-surface)));color:var(--foreground, #1f2937)}.praxis-shell__nav-badge--warning{background:color-mix(in oklab,var(--praxis-warning, var(--warning, #a16207)) 14%,var(--card, var(--md-sys-color-surface)));color:var(--foreground, #1f2937)}.praxis-shell__nav-badge--error{background:color-mix(in oklab,var(--destructive, #b91c1c) 14%,var(--card, var(--md-sys-color-surface)));color:var(--foreground, #1f2937)}.praxis-shell__nav-badge--info{background:color-mix(in oklab,var(--praxis-info, #2563eb) 14%,var(--card, var(--md-sys-color-surface)));color:var(--foreground, #1f2937)}.praxis-shell__nav-badge--neutral{background:color-mix(in oklab,var(--muted-foreground, #64748b) 14%,var(--card, var(--md-sys-color-surface)));color:var(--foreground, #1f2937)}.praxis-shell__sidebar-footer-status{padding:10px}.praxis-shell__status-card{padding:10px 12px;border-radius:10px;background:var(--sidebar-accent, color-mix(in oklab, var(--sidebar-foreground, var(--foreground, #f0f4f8)) 10%, transparent));border:1px solid var(--border, rgba(255, 255, 255, .07));color:var(--sidebar-accent-foreground, var(--sidebar-foreground, var(--foreground, #f0f4f8)))}.praxis-shell__status-card--success{border-color:color-mix(in oklab,var(--praxis-success, var(--ready, #15803d)) 30%,transparent)}.praxis-shell__status-card--warning{border-color:color-mix(in oklab,var(--praxis-warning, var(--warning, #a16207)) 30%,transparent)}.praxis-shell__status-card--error{border-color:color-mix(in oklab,var(--destructive, #b91c1c) 30%,transparent)}.praxis-shell__status-card-header{display:flex;align-items:center;gap:8px;font-size:.75rem;font-weight:600}.praxis-shell__pulse-indicator{position:relative;display:inline-flex;width:8px;height:8px}.praxis-shell__pulse-ring{position:absolute;inset:-2px;border-radius:9999px;background:var(--praxis-success, var(--ready, #15803d));opacity:.6;animation:praxis-pulse 1.8s cubic-bezier(0,0,.2,1) infinite}.praxis-shell__pulse-dot{width:8px;height:8px;border-radius:9999px;background:var(--praxis-success, var(--ready, #15803d))}@keyframes praxis-pulse{0%{transform:scale(.9);opacity:.8}70%{transform:scale(2.2);opacity:0}to{transform:scale(2.2);opacity:0}}.praxis-shell__status-card-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.praxis-shell__status-card-metric{font-size:.7rem;color:inherit;margin-top:4px}.praxis-shell__sidebar-toggle-bar{padding:10px;border-top:none}.praxis-shell__collapse-btn{display:flex;align-items:center;gap:10px;width:100%;height:38px;padding:0 10px;border-radius:8px;background:transparent;border:none;color:var(--sidebar-foreground, var(--muted-foreground, #94a3b8));cursor:pointer;font-size:.85rem;font-weight:500;transition:background .15s ease,color .15s ease}.praxis-shell__collapse-btn .material-symbols-outlined{font-size:20px;width:20px;height:20px;line-height:1;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.praxis-shell--collapsed .praxis-shell__collapse-btn{justify-content:center;padding:0;gap:0}.praxis-shell__collapse-btn:hover{background:var(--sidebar-accent, color-mix(in oklab, var(--sidebar-foreground, var(--foreground, #f0f4f8)) 10%, transparent));color:var(--sidebar-accent-foreground, var(--sidebar-foreground, var(--foreground, #f8fafc)))}.praxis-shell__stage{flex:1;min-width:0;display:flex;flex-direction:column;height:100%;overflow:hidden}.praxis-shell__topbar{height:64px;padding:0 20px;background:var(--surface-gradient, var(--card, #0f172a));border-bottom:none;box-shadow:0 1px color-mix(in oklab,var(--border, rgba(255, 255, 255, .08)) 40%,transparent);display:flex;align-items:center;gap:12px;flex-shrink:0;z-index:100}.praxis-shell__burger-btn{display:none;background:transparent;border:none;color:var(--foreground, #f8fafc);cursor:pointer;padding:8px;border-radius:8px}.praxis-shell__search-box{display:flex;align-items:center;gap:10px;width:clamp(160px,20vw,280px);min-width:140px;max-width:100%;flex-shrink:1;height:38px;padding:0 12px;background:var(--secondary, color-mix(in oklab, var(--card, var(--md-sys-color-surface)) 95%, var(--primary, #0ea5e9)));border:1px solid var(--border, rgba(255, 255, 255, .08));border-radius:9px;color:var(--muted-foreground, #94a3b8);transition:border-color .15s ease,box-shadow .15s ease}.praxis-shell__search-box:focus-within{border-color:var(--primary, #0ea5e9);box-shadow:0 0 0 2px color-mix(in oklab,var(--ring, var(--primary, #0ea5e9)) 20%,transparent);color:var(--foreground, #f8fafc)}.praxis-shell__search-icon{font-size:18px}.praxis-shell__search-input{flex:1;min-width:0;background:transparent;border:none;outline:none;color:inherit;font-size:.85rem}.praxis-shell__topbar-spacer{flex:1;min-width:4px}.praxis-shell__customization-bar{display:flex;align-items:center;gap:8px;flex-wrap:nowrap;flex-shrink:0}.praxis-shell__gov-status{font-size:.72rem;font-weight:600;padding:4px 10px;border-radius:999px;background:var(--secondary, color-mix(in oklab, var(--card, #0f172a) 92%, var(--foreground, #f8fafc)));color:var(--muted-foreground, #94a3b8);border:1px solid var(--border, rgba(255, 255, 255, .1));white-space:nowrap;max-width:280px;overflow:hidden;text-overflow:ellipsis}.praxis-shell__gov-status--customized{color:var(--primary, #0ea5e9);border-color:color-mix(in oklab,var(--primary, #0ea5e9) 35%,transparent);background:color-mix(in oklab,var(--primary, #0ea5e9) 10%,transparent)}.praxis-shell__gov-status--busy{color:var(--warning, #f59e0b);border-color:color-mix(in oklab,var(--warning, #f59e0b) 35%,transparent);background:color-mix(in oklab,var(--warning, #f59e0b) 10%,transparent)}.praxis-shell__gov-status--error{color:var(--destructive, #ef4444);border-color:color-mix(in oklab,var(--destructive, #ef4444) 45%,transparent);background:color-mix(in oklab,var(--destructive, #ef4444) 12%,transparent)}.praxis-shell__gov-btn{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 11px;border-radius:8px;font-size:.76rem;font-weight:600;cursor:pointer;transition:all .15s ease;background:transparent;border:1px solid var(--border, rgba(255, 255, 255, .12));color:var(--foreground, #f8fafc);white-space:nowrap}.praxis-shell__gov-btn .material-symbols-outlined{font-size:16px}.praxis-shell__gov-btn:disabled{opacity:.5;cursor:not-allowed}.praxis-shell__gov-btn--reset{color:var(--destructive, #ef4444);border-color:color-mix(in oklab,var(--destructive, #ef4444) 32%,transparent);background:color-mix(in oklab,var(--destructive, #ef4444) 8%,transparent)}.praxis-shell__gov-btn--reset:hover:not(:disabled){background:color-mix(in oklab,var(--destructive, #ef4444) 16%,transparent);border-color:var(--destructive, #ef4444)}.praxis-shell__gov-btn--retry,.praxis-shell__gov-btn--reload{border-color:color-mix(in oklab,var(--primary, #0ea5e9) 35%,transparent);background:color-mix(in oklab,var(--primary, #0ea5e9) 10%,transparent)}.praxis-shell__gov-btn--retry:hover:not(:disabled),.praxis-shell__gov-btn--reload:hover:not(:disabled){background:color-mix(in oklab,var(--primary, #0ea5e9) 18%,transparent);border-color:var(--primary, #0ea5e9)}.praxis-shell__customize-toggle-btn{display:inline-flex;align-items:center;gap:7px;height:36px;padding:0 13px;border-radius:9px;font-size:.8rem;font-weight:600;cursor:pointer;transition:all .15s ease;background:color-mix(in oklab,var(--primary, #0ea5e9) 10%,transparent);border:1px solid color-mix(in oklab,var(--primary, #0ea5e9) 32%,transparent);color:var(--primary, #0ea5e9);white-space:nowrap}.praxis-shell__customize-toggle-btn .material-symbols-outlined{font-size:18px}.praxis-shell__customize-toggle-btn:hover:not(:disabled){background:color-mix(in oklab,var(--primary, #0ea5e9) 18%,transparent);border-color:var(--primary, #0ea5e9)}.praxis-shell__customize-toggle-btn--active{background:var(--ready, #10b981);border-color:var(--ready, #10b981);color:#04130d;box-shadow:0 2px 10px color-mix(in oklab,var(--ready, #10b981) 30%,transparent)}.praxis-shell__customize-toggle-btn--active:hover:not(:disabled){background:color-mix(in oklab,var(--ready, #10b981) 90%,var(--md-sys-color-on-surface, currentColor));border-color:var(--ready, #10b981);color:#04130d}.praxis-shell__customize-toggle-btn:disabled{opacity:.5;cursor:not-allowed}.praxis-shell__header-actions{display:flex;align-items:center;gap:8px}.praxis-shell__header-actions ::ng-deep .mat-mdc-icon-button{display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:0!important}.praxis-shell__header-actions ::ng-deep .mat-mdc-icon-button>.mat-icon{margin:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;line-height:1!important}.praxis-shell__icon-btn{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;padding:0;border-radius:9px;background:transparent;border:1px solid var(--border, rgba(255, 255, 255, .08));color:var(--muted-foreground, #94a3b8);cursor:pointer;transition:all .15s ease}.praxis-shell__icon-btn .material-symbols-outlined{font-size:20px;width:20px;height:20px;line-height:1;display:inline-flex;align-items:center;justify-content:center}.praxis-shell__icon-btn:hover{background:var(--accent, color-mix(in oklab, var(--primary, #0ea5e9) 8%, transparent));color:var(--foreground, #f8fafc);border-color:var(--border, rgba(255, 255, 255, .15))}.praxis-shell__user-profile{display:flex;align-items:center;gap:10px;padding:5px 10px 5px 6px;border-radius:9999px;background:var(--secondary, rgba(255, 255, 255, .03));border:1px solid var(--border, rgba(255, 255, 255, .08));cursor:pointer;transition:all .15s ease;-webkit-user-select:none;user-select:none}.praxis-shell__user-profile:hover{background:var(--accent, color-mix(in oklab, var(--primary, #0ea5e9) 8%, transparent));border-color:var(--border, rgba(255, 255, 255, .16))}.praxis-shell__user-avatar{width:28px;height:28px;border-radius:9999px;object-fit:cover}.praxis-shell__user-initials{width:28px;height:28px;border-radius:9999px;background:var(--primary, #0ea5e9);color:var(--primary-foreground, #fff);display:flex;align-items:center;justify-content:center;font-size:.75rem;font-weight:700}.praxis-shell__user-info{display:flex;flex-direction:column;line-height:1.2}.praxis-shell__user-name{font-size:.82rem;font-weight:600;color:var(--foreground, #f8fafc)}.praxis-shell__user-role{font-size:.68rem;color:var(--muted-foreground, #94a3b8)}.praxis-shell__main{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:24px;box-sizing:border-box;background:var(--background, #090d16)}@media(max-width:900px){.praxis-shell__burger-btn,.praxis-shell__mobile-close-btn{display:flex}.praxis-shell__sidebar{position:fixed;top:0;bottom:0;left:0;transform:translate(-100%);width:280px!important;box-shadow:4px 0 24px #00000080}.praxis-shell--mobile-open .praxis-shell__sidebar{transform:translate(0)}.praxis-shell__search-box{width:180px}.praxis-shell__user-info{display:none}.praxis-shell__gov-status{max-width:180px}}@media(max-width:600px){.praxis-shell__topbar{height:auto;min-height:56px;padding:6px 10px;gap:8px;flex-wrap:wrap}.praxis-shell__search-box{display:none}.praxis-shell__gov-status{font-size:.66rem;padding:3px 7px;max-width:130px}.praxis-shell__customize-toggle-label,.praxis-shell__gov-btn-label{display:none}.praxis-shell__customize-toggle-btn,.praxis-shell__gov-btn{padding:0 8px}.praxis-shell__main{padding:16px 12px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
68020
68817
|
}
|
|
68021
68818
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PraxisAppShellComponent, decorators: [{
|
|
68022
68819
|
type: Component,
|
|
@@ -68359,7 +69156,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
68359
69156
|
</main>
|
|
68360
69157
|
</div>
|
|
68361
69158
|
</div>
|
|
68362
|
-
`, styles: [":host{display:block;width:100%;height:100vh;overflow:hidden;font-family:inherit}.praxis-shell{display:flex;width:100%;height:100%;background:var(--background, #090d16);color:var(--foreground, #f0f4f8);position:relative;overflow:hidden;box-sizing:border-box}.praxis-shell__skip-link{position:absolute;top:-100px;left:16px;background:var(--primary, #0ea5e9);color:var(--primary-foreground, #ffffff);padding:8px 16px;border-radius:6px;font-weight:600;font-size:.875rem;z-index:9999;text-decoration:none;transition:top .2s ease}.praxis-shell__skip-link:focus{top:16px;outline:2px solid var(--ring, var(--primary, #0ea5e9));outline-offset:2px}.praxis-shell__progress-bar{position:absolute;top:0;left:0;right:0;height:3px;background:color-mix(in oklab,var(--primary, #0ea5e9) 15%,transparent);z-index:1000;overflow:hidden}.praxis-shell__progress-laser{width:40%;height:100%;background:linear-gradient(90deg,transparent,var(--primary, #0ea5e9),var(--primary-deep, var(--primary, #0ea5e9)),transparent);box-shadow:0 0 10px color-mix(in oklab,var(--primary, #0ea5e9) 30%,transparent);animation:praxis-laser-slide 1.4s infinite cubic-bezier(.4,0,.2,1)}@keyframes praxis-laser-slide{0%{transform:translate(-150%)}to{transform:translate(350%)}}.praxis-shell__backdrop{position:fixed;inset:0;background:var(--overlay, rgba(0, 0, 0, .55));-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:200;animation:praxis-fade-in .2s ease}@keyframes praxis-fade-in{0%{opacity:0}to{opacity:1}}.praxis-shell__sidebar{width:260px;min-width:260px;height:100%;background:var(--sidebar, var(--card, #0f172a));color:var(--sidebar-foreground, var(--foreground, #f0f4f8));border-right:1px solid var(--border, rgba(255, 255, 255, .08));display:flex;flex-direction:column;transition:width .25s cubic-bezier(.16,1,.3,1),transform .25s cubic-bezier(.16,1,.3,1);z-index:250;overflow:hidden}.praxis-shell--collapsed .praxis-shell__sidebar{width:72px;min-width:72px}.praxis-shell__brand{height:64px;padding:0 16px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border, rgba(255, 255, 255, .06))}.praxis-shell__brand-link{display:flex;align-items:center;gap:12px;text-decoration:none;color:inherit;min-width:0}.praxis-shell__brand-icon{width:40px;height:40px;border-radius:10px;background:var(--command-gradient, linear-gradient(135deg, var(--primary, #0369a1), var(--primary-deep, var(--primary, #075985))));color:var(--primary-foreground, #fff);display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:var(--shadow-panel, 0 4px 12px color-mix(in oklab, var(--primary, #0ea5e9) 20%, transparent))}.praxis-shell__brand-logo{height:36px;max-width:140px;object-fit:contain}.praxis-shell__brand-info{display:flex;flex-direction:column;overflow:hidden}.praxis-shell__brand-title{font-weight:var(--mat-sys-title-small-weight, 500);font-size:.95rem;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;letter-spacing:-.01em}.praxis-shell__brand-meta{font-size:.72rem;color:var(--sidebar-foreground, var(--muted-foreground, #94a3b8));white-space:nowrap}.praxis-shell__mobile-close-btn{display:none;background:transparent;border:none;color:var(--sidebar-foreground, var(--muted-foreground, #94a3b8));cursor:pointer;padding:6px;border-radius:6px}.praxis-shell__nav{flex:1;padding:16px 10px;overflow-y:auto;overflow-x:hidden}.praxis-shell__nav-group{margin-bottom:20px}.praxis-shell__nav-group-title{padding:0 10px 8px;font-size:.7rem;font-weight:var(--mat-sys-label-small-weight, 500);text-transform:uppercase;letter-spacing:.06em;color:var(--sidebar-foreground, var(--muted-foreground, #64748b))}.praxis-shell__nav-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:4px}.praxis-shell__nav-item{margin:0}.praxis-shell__nav-link{display:flex;align-items:center;gap:12px;padding:9px 12px;border-radius:9px;color:var(--sidebar-foreground, var(--muted-foreground, #94a3b8));text-decoration:none;font-size:.88rem;font-weight:var(--mat-sys-body-medium-weight, 400);transition:background .15s ease,color .15s ease;cursor:pointer;white-space:nowrap}.praxis-shell__nav-link:hover{background:var(--sidebar-accent, color-mix(in oklab, var(--sidebar-foreground, var(--foreground, #f0f4f8)) 10%, transparent));color:var(--sidebar-accent-foreground, var(--sidebar-foreground, var(--foreground, #f8fafc)))}.praxis-shell__nav-link.active{background:color-mix(in oklab,var(--primary, #0ea5e9) 16%,transparent);color:var(--sidebar-primary, var(--primary, #38bdf8));font-weight:var(--mat-sys-title-small-weight, 500)}.praxis-shell__nav-icon{display:flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0}.praxis-shell__nav-icon .material-symbols-outlined{font-size:20px}.praxis-shell__nav-label{flex:1;overflow:hidden;text-overflow:ellipsis}.praxis-shell__nav-badge{font-size:.7rem;font-weight:700;padding:2px 7px;border-radius:9999px;line-height:1}.praxis-shell__nav-badge--primary{background:color-mix(in oklab,var(--primary, #0ea5e9) 14%,var(--card, var(--md-sys-color-surface)));color:var(--foreground, #1f2937)}.praxis-shell__nav-badge--success{background:color-mix(in oklab,var(--praxis-success, var(--ready, #15803d)) 14%,var(--card, var(--md-sys-color-surface)));color:var(--foreground, #1f2937)}.praxis-shell__nav-badge--warning{background:color-mix(in oklab,var(--praxis-warning, var(--warning, #a16207)) 14%,var(--card, var(--md-sys-color-surface)));color:var(--foreground, #1f2937)}.praxis-shell__nav-badge--error{background:color-mix(in oklab,var(--destructive, #b91c1c) 14%,var(--card, var(--md-sys-color-surface)));color:var(--foreground, #1f2937)}.praxis-shell__nav-badge--info{background:color-mix(in oklab,var(--praxis-info, #2563eb) 14%,var(--card, var(--md-sys-color-surface)));color:var(--foreground, #1f2937)}.praxis-shell__nav-badge--neutral{background:color-mix(in oklab,var(--muted-foreground, #64748b) 14%,var(--card, var(--md-sys-color-surface)));color:var(--foreground, #1f2937)}.praxis-shell__sidebar-footer-status{padding:10px}.praxis-shell__status-card{padding:10px 12px;border-radius:10px;background:var(--sidebar-accent, color-mix(in oklab, var(--sidebar-foreground, var(--foreground, #f0f4f8)) 10%, transparent));border:1px solid var(--border, rgba(255, 255, 255, .07));color:var(--sidebar-accent-foreground, var(--sidebar-foreground, var(--foreground, #f0f4f8)))}.praxis-shell__status-card--success{border-color:color-mix(in oklab,var(--praxis-success, var(--ready, #15803d)) 30%,transparent)}.praxis-shell__status-card--warning{border-color:color-mix(in oklab,var(--praxis-warning, var(--warning, #a16207)) 30%,transparent)}.praxis-shell__status-card--error{border-color:color-mix(in oklab,var(--destructive, #b91c1c) 30%,transparent)}.praxis-shell__status-card-header{display:flex;align-items:center;gap:8px;font-size:.75rem;font-weight:600}.praxis-shell__pulse-indicator{position:relative;display:inline-flex;width:8px;height:8px}.praxis-shell__pulse-ring{position:absolute;inset:-2px;border-radius:9999px;background:var(--praxis-success, var(--ready, #15803d));opacity:.6;animation:praxis-pulse 1.8s cubic-bezier(0,0,.2,1) infinite}.praxis-shell__pulse-dot{width:8px;height:8px;border-radius:9999px;background:var(--praxis-success, var(--ready, #15803d))}@keyframes praxis-pulse{0%{transform:scale(.9);opacity:.8}70%{transform:scale(2.2);opacity:0}to{transform:scale(2.2);opacity:0}}.praxis-shell__status-card-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.praxis-shell__status-card-metric{font-size:.7rem;color:inherit;margin-top:4px}.praxis-shell__sidebar-toggle-bar{padding:10px;border-top:1px solid var(--border, rgba(255, 255, 255, .06))}.praxis-shell__collapse-btn{display:flex;align-items:center;gap:10px;width:100%;height:38px;padding:0 10px;border-radius:8px;background:transparent;border:none;color:var(--sidebar-foreground, var(--muted-foreground, #94a3b8));cursor:pointer;font-size:.85rem;font-weight:500;transition:background .15s ease,color .15s ease}.praxis-shell__collapse-btn:hover{background:var(--sidebar-accent, color-mix(in oklab, var(--sidebar-foreground, var(--foreground, #f0f4f8)) 10%, transparent));color:var(--sidebar-accent-foreground, var(--sidebar-foreground, var(--foreground, #f8fafc)))}.praxis-shell__stage{flex:1;min-width:0;display:flex;flex-direction:column;height:100%;overflow:hidden}.praxis-shell__topbar{height:64px;padding:0 20px;background:var(--surface-gradient, var(--card, #0f172a));border-bottom:1px solid var(--border, rgba(255, 255, 255, .08));display:flex;align-items:center;gap:12px;flex-shrink:0;z-index:100}.praxis-shell__burger-btn{display:none;background:transparent;border:none;color:var(--foreground, #f8fafc);cursor:pointer;padding:8px;border-radius:8px}.praxis-shell__search-box{display:flex;align-items:center;gap:10px;width:clamp(160px,20vw,280px);min-width:140px;max-width:100%;flex-shrink:1;height:38px;padding:0 12px;background:var(--secondary, color-mix(in oklab, var(--card, var(--md-sys-color-surface)) 95%, var(--primary, #0ea5e9)));border:1px solid var(--border, rgba(255, 255, 255, .08));border-radius:9px;color:var(--muted-foreground, #94a3b8);transition:border-color .15s ease,box-shadow .15s ease}.praxis-shell__search-box:focus-within{border-color:var(--primary, #0ea5e9);box-shadow:0 0 0 2px color-mix(in oklab,var(--ring, var(--primary, #0ea5e9)) 20%,transparent);color:var(--foreground, #f8fafc)}.praxis-shell__search-icon{font-size:18px}.praxis-shell__search-input{flex:1;min-width:0;background:transparent;border:none;outline:none;color:inherit;font-size:.85rem}.praxis-shell__topbar-spacer{flex:1;min-width:4px}.praxis-shell__customization-bar{display:flex;align-items:center;gap:8px;flex-wrap:nowrap;flex-shrink:0}.praxis-shell__gov-status{font-size:.72rem;font-weight:600;padding:4px 10px;border-radius:999px;background:var(--secondary, color-mix(in oklab, var(--card, #0f172a) 92%, var(--foreground, #f8fafc)));color:var(--muted-foreground, #94a3b8);border:1px solid var(--border, rgba(255, 255, 255, .1));white-space:nowrap;max-width:280px;overflow:hidden;text-overflow:ellipsis}.praxis-shell__gov-status--customized{color:var(--primary, #0ea5e9);border-color:color-mix(in oklab,var(--primary, #0ea5e9) 35%,transparent);background:color-mix(in oklab,var(--primary, #0ea5e9) 10%,transparent)}.praxis-shell__gov-status--busy{color:var(--warning, #f59e0b);border-color:color-mix(in oklab,var(--warning, #f59e0b) 35%,transparent);background:color-mix(in oklab,var(--warning, #f59e0b) 10%,transparent)}.praxis-shell__gov-status--error{color:var(--destructive, #ef4444);border-color:color-mix(in oklab,var(--destructive, #ef4444) 45%,transparent);background:color-mix(in oklab,var(--destructive, #ef4444) 12%,transparent)}.praxis-shell__gov-btn{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 11px;border-radius:8px;font-size:.76rem;font-weight:600;cursor:pointer;transition:all .15s ease;background:transparent;border:1px solid var(--border, rgba(255, 255, 255, .12));color:var(--foreground, #f8fafc);white-space:nowrap}.praxis-shell__gov-btn .material-symbols-outlined{font-size:16px}.praxis-shell__gov-btn:disabled{opacity:.5;cursor:not-allowed}.praxis-shell__gov-btn--reset{color:var(--destructive, #ef4444);border-color:color-mix(in oklab,var(--destructive, #ef4444) 32%,transparent);background:color-mix(in oklab,var(--destructive, #ef4444) 8%,transparent)}.praxis-shell__gov-btn--reset:hover:not(:disabled){background:color-mix(in oklab,var(--destructive, #ef4444) 16%,transparent);border-color:var(--destructive, #ef4444)}.praxis-shell__gov-btn--retry,.praxis-shell__gov-btn--reload{border-color:color-mix(in oklab,var(--primary, #0ea5e9) 35%,transparent);background:color-mix(in oklab,var(--primary, #0ea5e9) 10%,transparent)}.praxis-shell__gov-btn--retry:hover:not(:disabled),.praxis-shell__gov-btn--reload:hover:not(:disabled){background:color-mix(in oklab,var(--primary, #0ea5e9) 18%,transparent);border-color:var(--primary, #0ea5e9)}.praxis-shell__customize-toggle-btn{display:inline-flex;align-items:center;gap:7px;height:36px;padding:0 13px;border-radius:9px;font-size:.8rem;font-weight:600;cursor:pointer;transition:all .15s ease;background:color-mix(in oklab,var(--primary, #0ea5e9) 10%,transparent);border:1px solid color-mix(in oklab,var(--primary, #0ea5e9) 32%,transparent);color:var(--primary, #0ea5e9);white-space:nowrap}.praxis-shell__customize-toggle-btn .material-symbols-outlined{font-size:18px}.praxis-shell__customize-toggle-btn:hover:not(:disabled){background:color-mix(in oklab,var(--primary, #0ea5e9) 18%,transparent);border-color:var(--primary, #0ea5e9)}.praxis-shell__customize-toggle-btn--active{background:var(--ready, #10b981);border-color:var(--ready, #10b981);color:#04130d;box-shadow:0 2px 10px color-mix(in oklab,var(--ready, #10b981) 30%,transparent)}.praxis-shell__customize-toggle-btn--active:hover:not(:disabled){background:color-mix(in oklab,var(--ready, #10b981) 90%,var(--md-sys-color-on-surface, currentColor));border-color:var(--ready, #10b981);color:#04130d}.praxis-shell__customize-toggle-btn:disabled{opacity:.5;cursor:not-allowed}.praxis-shell__header-actions{display:flex;align-items:center;gap:8px}.praxis-shell__icon-btn{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:9px;background:transparent;border:1px solid var(--border, rgba(255, 255, 255, .08));color:var(--muted-foreground, #94a3b8);cursor:pointer;transition:all .15s ease}.praxis-shell__icon-btn:hover{background:var(--accent, color-mix(in oklab, var(--primary, #0ea5e9) 8%, transparent));color:var(--foreground, #f8fafc);border-color:var(--border, rgba(255, 255, 255, .15))}.praxis-shell__user-profile{display:flex;align-items:center;gap:10px;padding:5px 10px 5px 6px;border-radius:9999px;background:var(--secondary, rgba(255, 255, 255, .03));border:1px solid var(--border, rgba(255, 255, 255, .08));cursor:pointer;transition:all .15s ease;-webkit-user-select:none;user-select:none}.praxis-shell__user-profile:hover{background:var(--accent, color-mix(in oklab, var(--primary, #0ea5e9) 8%, transparent));border-color:var(--border, rgba(255, 255, 255, .16))}.praxis-shell__user-avatar{width:28px;height:28px;border-radius:9999px;object-fit:cover}.praxis-shell__user-initials{width:28px;height:28px;border-radius:9999px;background:var(--primary, #0ea5e9);color:var(--primary-foreground, #fff);display:flex;align-items:center;justify-content:center;font-size:.75rem;font-weight:700}.praxis-shell__user-info{display:flex;flex-direction:column;line-height:1.2}.praxis-shell__user-name{font-size:.82rem;font-weight:600;color:var(--foreground, #f8fafc)}.praxis-shell__user-role{font-size:.68rem;color:var(--muted-foreground, #94a3b8)}.praxis-shell__main{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:24px;box-sizing:border-box;background:var(--background, #090d16)}@media(max-width:900px){.praxis-shell__burger-btn,.praxis-shell__mobile-close-btn{display:flex}.praxis-shell__sidebar{position:fixed;top:0;bottom:0;left:0;transform:translate(-100%);width:280px!important;box-shadow:4px 0 24px #00000080}.praxis-shell--mobile-open .praxis-shell__sidebar{transform:translate(0)}.praxis-shell__search-box{width:180px}.praxis-shell__user-info{display:none}.praxis-shell__gov-status{max-width:180px}}@media(max-width:600px){.praxis-shell__topbar{height:auto;min-height:56px;padding:6px 10px;gap:8px;flex-wrap:wrap}.praxis-shell__search-box{display:none}.praxis-shell__gov-status{font-size:.66rem;padding:3px 7px;max-width:130px}.praxis-shell__customize-toggle-label,.praxis-shell__gov-btn-label{display:none}.praxis-shell__customize-toggle-btn,.praxis-shell__gov-btn{padding:0 8px}.praxis-shell__main{padding:16px 12px}}\n"] }]
|
|
69159
|
+
`, styles: [":host{display:block;width:100%;height:100vh;overflow:hidden;font-family:inherit}.praxis-shell{display:flex;width:100%;height:100%;background:var(--background, #090d16);color:var(--foreground, #f0f4f8);position:relative;overflow:hidden;box-sizing:border-box}.praxis-shell__skip-link{position:absolute;top:-100px;left:16px;background:var(--primary, #0ea5e9);color:var(--primary-foreground, #ffffff);padding:8px 16px;border-radius:6px;font-weight:600;font-size:.875rem;z-index:9999;text-decoration:none;transition:top .2s ease}.praxis-shell__skip-link:focus{top:16px;outline:2px solid var(--ring, var(--primary, #0ea5e9));outline-offset:2px}.praxis-shell__progress-bar{position:absolute;top:0;left:0;right:0;height:3px;background:color-mix(in oklab,var(--primary, #0ea5e9) 15%,transparent);z-index:1000;overflow:hidden}.praxis-shell__progress-laser{width:40%;height:100%;background:linear-gradient(90deg,transparent,var(--primary, #0ea5e9),var(--primary-deep, var(--primary, #0ea5e9)),transparent);box-shadow:0 0 10px color-mix(in oklab,var(--primary, #0ea5e9) 30%,transparent);animation:praxis-laser-slide 1.4s infinite cubic-bezier(.4,0,.2,1)}@keyframes praxis-laser-slide{0%{transform:translate(-150%)}to{transform:translate(350%)}}.praxis-shell__backdrop{position:fixed;inset:0;background:var(--overlay, rgba(0, 0, 0, .55));-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:200;animation:praxis-fade-in .2s ease}@keyframes praxis-fade-in{0%{opacity:0}to{opacity:1}}.praxis-shell__sidebar{width:260px;min-width:260px;height:100%;background:var(--sidebar, var(--card, #0f172a));color:var(--sidebar-foreground, var(--foreground, #f0f4f8));border-right:none;box-shadow:1px 0 color-mix(in oklab,var(--border, rgba(255, 255, 255, .08)) 40%,transparent);display:flex;flex-direction:column;transition:width .25s cubic-bezier(.16,1,.3,1),transform .25s cubic-bezier(.16,1,.3,1);z-index:250;overflow:hidden}.praxis-shell--collapsed .praxis-shell__sidebar{width:72px;min-width:72px}.praxis-shell__brand{height:64px;padding:0 16px;display:flex;align-items:center;justify-content:space-between;border-bottom:none}.praxis-shell--collapsed .praxis-shell__brand{justify-content:center;padding:0}.praxis-shell__brand-link{display:flex;align-items:center;gap:12px;text-decoration:none;color:inherit;min-width:0}.praxis-shell__brand-icon{width:40px;height:40px;border-radius:10px;background:var(--command-gradient, linear-gradient(135deg, var(--primary, #0369a1), var(--primary-deep, var(--primary, #075985))));color:var(--primary-foreground, #fff);display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:var(--shadow-panel, 0 4px 12px color-mix(in oklab, var(--primary, #0ea5e9) 20%, transparent))}.praxis-shell__brand-logo{height:36px;max-width:140px;object-fit:contain}.praxis-shell__brand-info{display:flex;flex-direction:column;overflow:hidden}.praxis-shell__brand-title{font-weight:var(--mat-sys-title-small-weight, 500);font-size:.95rem;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;letter-spacing:-.01em}.praxis-shell__brand-meta{font-size:.72rem;color:var(--sidebar-foreground, var(--muted-foreground, #94a3b8));white-space:nowrap}.praxis-shell__mobile-close-btn{display:none;background:transparent;border:none;color:var(--sidebar-foreground, var(--muted-foreground, #94a3b8));cursor:pointer;padding:6px;border-radius:6px}.praxis-shell__nav{flex:1;padding:16px 10px;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:transparent transparent}.praxis-shell__nav:hover{scrollbar-color:color-mix(in oklab,var(--muted-foreground, #64748b) 28%,transparent) transparent}.praxis-shell__nav::-webkit-scrollbar{width:4px;height:4px}.praxis-shell__nav::-webkit-scrollbar-button{display:none;width:0;height:0}.praxis-shell__nav::-webkit-scrollbar-track{background:transparent}.praxis-shell__nav::-webkit-scrollbar-thumb{background:transparent;border-radius:999px}.praxis-shell__nav:hover::-webkit-scrollbar-thumb{background:color-mix(in oklab,var(--muted-foreground, #64748b) 28%,transparent)}.praxis-shell--collapsed .praxis-shell__nav{padding:14px 10px;scrollbar-width:none}.praxis-shell--collapsed .praxis-shell__nav::-webkit-scrollbar{width:0;display:none}.praxis-shell__nav-group{margin-bottom:20px}.praxis-shell__nav-group-title{padding:0 10px 8px;font-size:.7rem;font-weight:var(--mat-sys-label-small-weight, 500);text-transform:uppercase;letter-spacing:.06em;color:var(--sidebar-foreground, var(--muted-foreground, #64748b))}.praxis-shell__nav-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:4px}.praxis-shell__nav-item{margin:0}.praxis-shell__nav-link{display:flex;align-items:center;gap:12px;padding:9px 12px;border-radius:9px;color:var(--sidebar-foreground, var(--muted-foreground, #94a3b8));text-decoration:none;font-size:.88rem;font-weight:var(--mat-sys-body-medium-weight, 400);transition:background .15s ease,color .15s ease;cursor:pointer;white-space:nowrap}.praxis-shell--collapsed .praxis-shell__nav-link{justify-content:center;padding:0;width:44px;height:44px;margin-inline:auto;gap:0;border-radius:12px}.praxis-shell__nav-link:hover{background:var(--sidebar-accent, color-mix(in oklab, var(--sidebar-foreground, var(--foreground, #f0f4f8)) 10%, transparent));color:var(--sidebar-accent-foreground, var(--sidebar-foreground, var(--foreground, #f8fafc)))}.praxis-shell__nav-link.active{background:color-mix(in oklab,var(--primary, #0ea5e9) 16%,transparent);color:var(--sidebar-primary, var(--primary, #38bdf8));font-weight:var(--mat-sys-title-small-weight, 500)}.praxis-shell__nav-icon{display:flex;align-items:center;justify-content:center;width:24px;height:24px;flex-shrink:0}.praxis-shell__nav-icon .material-symbols-outlined{font-size:20px;width:20px;height:20px;line-height:1;display:inline-flex;align-items:center;justify-content:center}.praxis-shell__nav-label{flex:1;overflow:hidden;text-overflow:ellipsis}.praxis-shell__nav-badge{font-size:.7rem;font-weight:700;padding:2px 7px;border-radius:9999px;line-height:1}.praxis-shell__nav-badge--primary{background:color-mix(in oklab,var(--primary, #0ea5e9) 14%,var(--card, var(--md-sys-color-surface)));color:var(--foreground, #1f2937)}.praxis-shell__nav-badge--success{background:color-mix(in oklab,var(--praxis-success, var(--ready, #15803d)) 14%,var(--card, var(--md-sys-color-surface)));color:var(--foreground, #1f2937)}.praxis-shell__nav-badge--warning{background:color-mix(in oklab,var(--praxis-warning, var(--warning, #a16207)) 14%,var(--card, var(--md-sys-color-surface)));color:var(--foreground, #1f2937)}.praxis-shell__nav-badge--error{background:color-mix(in oklab,var(--destructive, #b91c1c) 14%,var(--card, var(--md-sys-color-surface)));color:var(--foreground, #1f2937)}.praxis-shell__nav-badge--info{background:color-mix(in oklab,var(--praxis-info, #2563eb) 14%,var(--card, var(--md-sys-color-surface)));color:var(--foreground, #1f2937)}.praxis-shell__nav-badge--neutral{background:color-mix(in oklab,var(--muted-foreground, #64748b) 14%,var(--card, var(--md-sys-color-surface)));color:var(--foreground, #1f2937)}.praxis-shell__sidebar-footer-status{padding:10px}.praxis-shell__status-card{padding:10px 12px;border-radius:10px;background:var(--sidebar-accent, color-mix(in oklab, var(--sidebar-foreground, var(--foreground, #f0f4f8)) 10%, transparent));border:1px solid var(--border, rgba(255, 255, 255, .07));color:var(--sidebar-accent-foreground, var(--sidebar-foreground, var(--foreground, #f0f4f8)))}.praxis-shell__status-card--success{border-color:color-mix(in oklab,var(--praxis-success, var(--ready, #15803d)) 30%,transparent)}.praxis-shell__status-card--warning{border-color:color-mix(in oklab,var(--praxis-warning, var(--warning, #a16207)) 30%,transparent)}.praxis-shell__status-card--error{border-color:color-mix(in oklab,var(--destructive, #b91c1c) 30%,transparent)}.praxis-shell__status-card-header{display:flex;align-items:center;gap:8px;font-size:.75rem;font-weight:600}.praxis-shell__pulse-indicator{position:relative;display:inline-flex;width:8px;height:8px}.praxis-shell__pulse-ring{position:absolute;inset:-2px;border-radius:9999px;background:var(--praxis-success, var(--ready, #15803d));opacity:.6;animation:praxis-pulse 1.8s cubic-bezier(0,0,.2,1) infinite}.praxis-shell__pulse-dot{width:8px;height:8px;border-radius:9999px;background:var(--praxis-success, var(--ready, #15803d))}@keyframes praxis-pulse{0%{transform:scale(.9);opacity:.8}70%{transform:scale(2.2);opacity:0}to{transform:scale(2.2);opacity:0}}.praxis-shell__status-card-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.praxis-shell__status-card-metric{font-size:.7rem;color:inherit;margin-top:4px}.praxis-shell__sidebar-toggle-bar{padding:10px;border-top:none}.praxis-shell__collapse-btn{display:flex;align-items:center;gap:10px;width:100%;height:38px;padding:0 10px;border-radius:8px;background:transparent;border:none;color:var(--sidebar-foreground, var(--muted-foreground, #94a3b8));cursor:pointer;font-size:.85rem;font-weight:500;transition:background .15s ease,color .15s ease}.praxis-shell__collapse-btn .material-symbols-outlined{font-size:20px;width:20px;height:20px;line-height:1;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.praxis-shell--collapsed .praxis-shell__collapse-btn{justify-content:center;padding:0;gap:0}.praxis-shell__collapse-btn:hover{background:var(--sidebar-accent, color-mix(in oklab, var(--sidebar-foreground, var(--foreground, #f0f4f8)) 10%, transparent));color:var(--sidebar-accent-foreground, var(--sidebar-foreground, var(--foreground, #f8fafc)))}.praxis-shell__stage{flex:1;min-width:0;display:flex;flex-direction:column;height:100%;overflow:hidden}.praxis-shell__topbar{height:64px;padding:0 20px;background:var(--surface-gradient, var(--card, #0f172a));border-bottom:none;box-shadow:0 1px color-mix(in oklab,var(--border, rgba(255, 255, 255, .08)) 40%,transparent);display:flex;align-items:center;gap:12px;flex-shrink:0;z-index:100}.praxis-shell__burger-btn{display:none;background:transparent;border:none;color:var(--foreground, #f8fafc);cursor:pointer;padding:8px;border-radius:8px}.praxis-shell__search-box{display:flex;align-items:center;gap:10px;width:clamp(160px,20vw,280px);min-width:140px;max-width:100%;flex-shrink:1;height:38px;padding:0 12px;background:var(--secondary, color-mix(in oklab, var(--card, var(--md-sys-color-surface)) 95%, var(--primary, #0ea5e9)));border:1px solid var(--border, rgba(255, 255, 255, .08));border-radius:9px;color:var(--muted-foreground, #94a3b8);transition:border-color .15s ease,box-shadow .15s ease}.praxis-shell__search-box:focus-within{border-color:var(--primary, #0ea5e9);box-shadow:0 0 0 2px color-mix(in oklab,var(--ring, var(--primary, #0ea5e9)) 20%,transparent);color:var(--foreground, #f8fafc)}.praxis-shell__search-icon{font-size:18px}.praxis-shell__search-input{flex:1;min-width:0;background:transparent;border:none;outline:none;color:inherit;font-size:.85rem}.praxis-shell__topbar-spacer{flex:1;min-width:4px}.praxis-shell__customization-bar{display:flex;align-items:center;gap:8px;flex-wrap:nowrap;flex-shrink:0}.praxis-shell__gov-status{font-size:.72rem;font-weight:600;padding:4px 10px;border-radius:999px;background:var(--secondary, color-mix(in oklab, var(--card, #0f172a) 92%, var(--foreground, #f8fafc)));color:var(--muted-foreground, #94a3b8);border:1px solid var(--border, rgba(255, 255, 255, .1));white-space:nowrap;max-width:280px;overflow:hidden;text-overflow:ellipsis}.praxis-shell__gov-status--customized{color:var(--primary, #0ea5e9);border-color:color-mix(in oklab,var(--primary, #0ea5e9) 35%,transparent);background:color-mix(in oklab,var(--primary, #0ea5e9) 10%,transparent)}.praxis-shell__gov-status--busy{color:var(--warning, #f59e0b);border-color:color-mix(in oklab,var(--warning, #f59e0b) 35%,transparent);background:color-mix(in oklab,var(--warning, #f59e0b) 10%,transparent)}.praxis-shell__gov-status--error{color:var(--destructive, #ef4444);border-color:color-mix(in oklab,var(--destructive, #ef4444) 45%,transparent);background:color-mix(in oklab,var(--destructive, #ef4444) 12%,transparent)}.praxis-shell__gov-btn{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 11px;border-radius:8px;font-size:.76rem;font-weight:600;cursor:pointer;transition:all .15s ease;background:transparent;border:1px solid var(--border, rgba(255, 255, 255, .12));color:var(--foreground, #f8fafc);white-space:nowrap}.praxis-shell__gov-btn .material-symbols-outlined{font-size:16px}.praxis-shell__gov-btn:disabled{opacity:.5;cursor:not-allowed}.praxis-shell__gov-btn--reset{color:var(--destructive, #ef4444);border-color:color-mix(in oklab,var(--destructive, #ef4444) 32%,transparent);background:color-mix(in oklab,var(--destructive, #ef4444) 8%,transparent)}.praxis-shell__gov-btn--reset:hover:not(:disabled){background:color-mix(in oklab,var(--destructive, #ef4444) 16%,transparent);border-color:var(--destructive, #ef4444)}.praxis-shell__gov-btn--retry,.praxis-shell__gov-btn--reload{border-color:color-mix(in oklab,var(--primary, #0ea5e9) 35%,transparent);background:color-mix(in oklab,var(--primary, #0ea5e9) 10%,transparent)}.praxis-shell__gov-btn--retry:hover:not(:disabled),.praxis-shell__gov-btn--reload:hover:not(:disabled){background:color-mix(in oklab,var(--primary, #0ea5e9) 18%,transparent);border-color:var(--primary, #0ea5e9)}.praxis-shell__customize-toggle-btn{display:inline-flex;align-items:center;gap:7px;height:36px;padding:0 13px;border-radius:9px;font-size:.8rem;font-weight:600;cursor:pointer;transition:all .15s ease;background:color-mix(in oklab,var(--primary, #0ea5e9) 10%,transparent);border:1px solid color-mix(in oklab,var(--primary, #0ea5e9) 32%,transparent);color:var(--primary, #0ea5e9);white-space:nowrap}.praxis-shell__customize-toggle-btn .material-symbols-outlined{font-size:18px}.praxis-shell__customize-toggle-btn:hover:not(:disabled){background:color-mix(in oklab,var(--primary, #0ea5e9) 18%,transparent);border-color:var(--primary, #0ea5e9)}.praxis-shell__customize-toggle-btn--active{background:var(--ready, #10b981);border-color:var(--ready, #10b981);color:#04130d;box-shadow:0 2px 10px color-mix(in oklab,var(--ready, #10b981) 30%,transparent)}.praxis-shell__customize-toggle-btn--active:hover:not(:disabled){background:color-mix(in oklab,var(--ready, #10b981) 90%,var(--md-sys-color-on-surface, currentColor));border-color:var(--ready, #10b981);color:#04130d}.praxis-shell__customize-toggle-btn:disabled{opacity:.5;cursor:not-allowed}.praxis-shell__header-actions{display:flex;align-items:center;gap:8px}.praxis-shell__header-actions ::ng-deep .mat-mdc-icon-button{display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:0!important}.praxis-shell__header-actions ::ng-deep .mat-mdc-icon-button>.mat-icon{margin:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;line-height:1!important}.praxis-shell__icon-btn{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;padding:0;border-radius:9px;background:transparent;border:1px solid var(--border, rgba(255, 255, 255, .08));color:var(--muted-foreground, #94a3b8);cursor:pointer;transition:all .15s ease}.praxis-shell__icon-btn .material-symbols-outlined{font-size:20px;width:20px;height:20px;line-height:1;display:inline-flex;align-items:center;justify-content:center}.praxis-shell__icon-btn:hover{background:var(--accent, color-mix(in oklab, var(--primary, #0ea5e9) 8%, transparent));color:var(--foreground, #f8fafc);border-color:var(--border, rgba(255, 255, 255, .15))}.praxis-shell__user-profile{display:flex;align-items:center;gap:10px;padding:5px 10px 5px 6px;border-radius:9999px;background:var(--secondary, rgba(255, 255, 255, .03));border:1px solid var(--border, rgba(255, 255, 255, .08));cursor:pointer;transition:all .15s ease;-webkit-user-select:none;user-select:none}.praxis-shell__user-profile:hover{background:var(--accent, color-mix(in oklab, var(--primary, #0ea5e9) 8%, transparent));border-color:var(--border, rgba(255, 255, 255, .16))}.praxis-shell__user-avatar{width:28px;height:28px;border-radius:9999px;object-fit:cover}.praxis-shell__user-initials{width:28px;height:28px;border-radius:9999px;background:var(--primary, #0ea5e9);color:var(--primary-foreground, #fff);display:flex;align-items:center;justify-content:center;font-size:.75rem;font-weight:700}.praxis-shell__user-info{display:flex;flex-direction:column;line-height:1.2}.praxis-shell__user-name{font-size:.82rem;font-weight:600;color:var(--foreground, #f8fafc)}.praxis-shell__user-role{font-size:.68rem;color:var(--muted-foreground, #94a3b8)}.praxis-shell__main{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:24px;box-sizing:border-box;background:var(--background, #090d16)}@media(max-width:900px){.praxis-shell__burger-btn,.praxis-shell__mobile-close-btn{display:flex}.praxis-shell__sidebar{position:fixed;top:0;bottom:0;left:0;transform:translate(-100%);width:280px!important;box-shadow:4px 0 24px #00000080}.praxis-shell--mobile-open .praxis-shell__sidebar{transform:translate(0)}.praxis-shell__search-box{width:180px}.praxis-shell__user-info{display:none}.praxis-shell__gov-status{max-width:180px}}@media(max-width:600px){.praxis-shell__topbar{height:auto;min-height:56px;padding:6px 10px;gap:8px;flex-wrap:wrap}.praxis-shell__search-box{display:none}.praxis-shell__gov-status{font-size:.66rem;padding:3px 7px;max-width:130px}.praxis-shell__customize-toggle-label,.praxis-shell__gov-btn-label{display:none}.praxis-shell__customize-toggle-btn,.praxis-shell__gov-btn{padding:0 8px}.praxis-shell__main{padding:16px 12px}}\n"] }]
|
|
68363
69160
|
}], propDecorators: { brand: [{
|
|
68364
69161
|
type: Input
|
|
68365
69162
|
}], navigation: [{
|