@praxisui/core 10.0.0-rc.42 → 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.
@@ -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, DestroyRef, 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';
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 é 'id', um valueField igual a
2730
- // optionValueProperty (tipicamente 'id') refere-se à chave do OptionDTO e não ao
2731
- // campo irmão no registro pai.
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 === optionValueProperty ||
2735
- rawValueField !== optionValueProperty)
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
- return this.followLink(source, 'actions', options);
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.followLink(source, 'capabilities', options);
18289
+ return this.getCapabilitiesByUrl(this.requireLinkHref(source, 'capabilities', options), options);
18272
18290
  }
18273
18291
  getCapabilitiesByUrl(href, options) {
18274
- return this.fetchJson(href, options);
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 { surface, resourceId, resourcePath } = bundle.resolution;
21312
- this.requireReadProjectionSurfaceContract(surface);
21313
- const resolvedReadPath = this.interpolateItemPath(surface.path, resourceId);
21314
- const itemPath = this.itemHref(resourcePath, resourceId);
21315
- const sameAsItemEndpoint = this.normalizeComparablePath(resolvedReadPath) ===
21316
- this.normalizeComparablePath(itemPath);
21317
- const existingItemData = sameAsItemEndpoint
21318
- ? this.unwrapRecordObject(bundle.itemResponse)
21319
- : null;
21320
- const projectionRecord$ = existingItemData
21321
- ? of(existingItemData)
21322
- : this.discovery.fetchJson(resolvedReadPath, options).pipe(map$1((rawProjection) => {
21323
- const unwrapped = this.unwrapRecordObject(rawProjection);
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
- }), catchError$1((error) => throwError(() => this.normalizeFailure(error))));
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
- return this.discovery
21376
- .fetchJson(this.surfaceCatalogHref(canonicalReference.target.resourceKey), options)
21377
- .pipe(map$1((catalog) => this.requireCatalog(catalog, canonicalReference.target.resourceKey, 'RESOURCE_CATALOG_INVALID')), switchMap$1((resourceCatalog) => {
21378
- this.requireCollectionTargetSurface(resourceCatalog, canonicalReference);
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
- const resolution = this.materializeContextualSurface(contextualCatalog, resourceCatalog, canonicalReference, resourceId, options);
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
- return firstValueFrom(this.recordOpenService.resolveReadProjection(binding.recordOpen, sourceRecord, projectionOptions));
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
- ...this.projectMaterializedFormInputs(payload.widget.inputs || {}),
25920
- mode: payload.widget.inputs?.['mode'] || 'view',
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 &&
@@ -37231,11 +37915,33 @@ class PraxisIconButtonComponent {
37231
37915
  pressed = input(null, ...(ngDevMode ? [{ debugName: "pressed" }] : /* istanbul ignore next */ []));
37232
37916
  /** Replaces the glyph with a centered progress indicator and exposes aria-busy. */
37233
37917
  busy = input(false, { ...(ngDevMode ? { debugName: "busy" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
37234
- /** Preserves legacy unprefixed Material Icons while accepting Praxis icon-family prefixes. */
37918
+ iconRegistry = inject(MatIconRegistry);
37919
+ defaultAuxiliaryClasses = this.iconRegistry.getDefaultFontSetClass()
37920
+ .filter((name) => !['material-icons', 'material-symbols-outlined', 'material-symbols-rounded', 'material-symbols-sharp'].includes(name))
37921
+ .join(' ');
37922
+ /** Explicit families win; unprefixed names use the configured Material font family. */
37235
37923
  resolvedIcon = computed(() => {
37236
37924
  const icon = this.icon().trim();
37237
- return icon.includes(':') ? icon : `mi:${icon}`;
37925
+ if (icon.includes(':'))
37926
+ return icon;
37927
+ const defaults = this.iconRegistry.getDefaultFontSetClass();
37928
+ const family = defaults.includes('material-symbols-rounded') ? 'msr'
37929
+ : defaults.includes('material-symbols-sharp') ? 'mss'
37930
+ : defaults.includes('material-symbols-outlined') ? 'mso'
37931
+ : 'mi';
37932
+ return `${family}:${icon}`;
37238
37933
  }, ...(ngDevMode ? [{ debugName: "resolvedIcon" }] : /* istanbul ignore next */ []));
37934
+ /** Keep MatIcon's own font class aligned with the directive's explicit family. */
37935
+ resolvedFontClass = computed(() => {
37936
+ const prefix = this.resolvedIcon().split(':', 1)[0].toLowerCase();
37937
+ switch (prefix) {
37938
+ case 'ms':
37939
+ case 'mso': return 'material-symbols-outlined';
37940
+ case 'msr': return 'material-symbols-rounded';
37941
+ case 'mss': return 'material-symbols-sharp';
37942
+ default: return 'material-icons';
37943
+ }
37944
+ }, ...(ngDevMode ? [{ debugName: "resolvedFontClass" }] : /* istanbul ignore next */ []));
37239
37945
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PraxisIconButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
37240
37946
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: PraxisIconButtonComponent, isStandalone: true, selector: "button[praxisIconButton]", inputs: { icon: { classPropertyName: "icon", publicName: "praxisIconButton", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, presentation: { classPropertyName: "presentation", publicName: "presentation", isSignal: true, isRequired: false, transformFunction: null }, pressed: { classPropertyName: "pressed", publicName: "pressed", isSignal: true, isRequired: false, transformFunction: null }, busy: { classPropertyName: "busy", publicName: "busy", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, properties: { "attr.aria-pressed": "pressed()", "attr.aria-busy": "busy() ? \"true\" : null", "class.praxis-icon-button--dense": "size() === \"dense\"", "class.praxis-icon-button--compact": "size() === \"compact\"", "class.praxis-icon-button--standard": "size() === \"standard\"", "class.praxis-icon-button--plain": "appearance() === \"plain\"", "class.praxis-icon-button--filled": "appearance() === \"filled\"", "class.praxis-icon-button--pressed": "pressed() === true", "class.praxis-icon-button--busy": "busy()" }, classAttribute: "praxis-icon-button" }, ngImport: i0, template: `
37241
37947
  <span class="praxis-icon-button__surface" aria-hidden="true">
@@ -37244,7 +37950,7 @@ class PraxisIconButtonComponent {
37244
37950
  } @else if (presentation() === 'projected') {
37245
37951
  <span class="praxis-icon-button__projected"><ng-content></ng-content></span>
37246
37952
  } @else {
37247
- <mat-icon [praxisIcon]="resolvedIcon()"></mat-icon>
37953
+ <mat-icon [class]="defaultAuxiliaryClasses" [fontSet]="resolvedFontClass()" [praxisIcon]="resolvedIcon()"></mat-icon>
37248
37954
  }
37249
37955
  </span>
37250
37956
  `, isInline: true, styles: [":host{--praxis-icon-button-target-size: 44px;--praxis-icon-button-surface-size: 40px;--praxis-icon-button-icon-size: 22px;--praxis-icon-button-filled-background: var(--md-sys-color-primary);--praxis-icon-button-filled-foreground: var(--md-sys-color-on-primary);appearance:none;box-sizing:border-box;display:inline-grid;place-items:center;flex:0 0 auto;width:var(--praxis-icon-button-target-size);min-width:var(--praxis-icon-button-target-size);height:var(--praxis-icon-button-target-size);margin:0;padding:0;border:0;border-radius:999px;color:var(--md-sys-color-on-surface-variant);background:transparent;cursor:pointer;line-height:1;-webkit-tap-highlight-color:transparent}:host(.praxis-icon-button--compact){--praxis-icon-button-surface-size: 36px;--praxis-icon-button-icon-size: 20px}:host(.praxis-icon-button--dense){--praxis-icon-button-target-size: 36px;--praxis-icon-button-surface-size: 32px;--praxis-icon-button-icon-size: 18px}.praxis-icon-button__surface{box-sizing:border-box;display:inline-grid;place-items:center;width:var(--praxis-icon-button-surface-size);height:var(--praxis-icon-button-surface-size);border-radius:999px;color:inherit;background:transparent;transition:background-color .14s ease,color .14s ease,transform .1s ease}mat-icon{display:block;width:var(--praxis-icon-button-icon-size);height:var(--praxis-icon-button-icon-size);margin:0;font-size:var(--praxis-icon-button-icon-size);line-height:var(--praxis-icon-button-icon-size)}.praxis-icon-button__spinner{box-sizing:border-box;display:block;width:var(--praxis-icon-button-icon-size);height:var(--praxis-icon-button-icon-size);border:2px solid color-mix(in srgb,currentColor 28%,transparent);border-top-color:currentColor;border-radius:999px;animation:praxis-icon-button-spin .72s linear infinite}.praxis-icon-button__projected{box-sizing:border-box;display:inline-grid;place-items:center;width:var(--praxis-icon-button-icon-size);height:var(--praxis-icon-button-icon-size);min-width:0;overflow:hidden;line-height:var(--praxis-icon-button-icon-size)}@keyframes praxis-icon-button-spin{to{transform:rotate(360deg)}}:host(:hover:not(:disabled)) .praxis-icon-button__surface{background:color-mix(in srgb,currentColor 10%,transparent)}:host(:active:not(:disabled)) .praxis-icon-button__surface{background:color-mix(in srgb,currentColor 16%,transparent);transform:scale(.96)}:host(.praxis-icon-button--pressed:not(:disabled)) .praxis-icon-button__surface{background:color-mix(in srgb,currentColor 14%,transparent)}:host(:focus-visible){outline:2px solid var(--md-sys-color-primary);outline-offset:2px}:host(.praxis-icon-button--filled){color:var(--praxis-icon-button-filled-foreground)}:host(.praxis-icon-button--filled) .praxis-icon-button__surface{background:var(--praxis-icon-button-filled-background);box-shadow:0 4px 12px color-mix(in srgb,var(--praxis-icon-button-filled-background) 24%,transparent)}:host(.praxis-icon-button--filled:hover:not(:disabled)) .praxis-icon-button__surface{background:color-mix(in srgb,var(--praxis-icon-button-filled-background) 88%,var(--praxis-icon-button-filled-foreground))}:host(:disabled){cursor:default;opacity:.38}@media(forced-colors:active){.praxis-icon-button__surface{border:1px solid ButtonText}:host(:focus-visible){outline-color:Highlight}}@media(prefers-reduced-motion:reduce){.praxis-icon-button__surface{transition:none}.praxis-icon-button__spinner{animation:none}}@media(pointer:coarse){:host(.praxis-icon-button--dense){--praxis-icon-button-target-size: 44px}}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
@@ -37258,7 +37964,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
37258
37964
  } @else if (presentation() === 'projected') {
37259
37965
  <span class="praxis-icon-button__projected"><ng-content></ng-content></span>
37260
37966
  } @else {
37261
- <mat-icon [praxisIcon]="resolvedIcon()"></mat-icon>
37967
+ <mat-icon [class]="defaultAuxiliaryClasses" [fontSet]="resolvedFontClass()" [praxisIcon]="resolvedIcon()"></mat-icon>
37262
37968
  }
37263
37969
  </span>
37264
37970
  `, host: {
@@ -46607,7 +47313,7 @@ class PraxisResourceIdentityComponent {
46607
47313
  </div>
46608
47314
  }
46609
47315
  </div>
46610
- `, 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.4 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 });
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 });
46611
47317
  }
46612
47318
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PraxisResourceIdentityComponent, decorators: [{
46613
47319
  type: Component,
@@ -46650,7 +47356,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
46650
47356
  </div>
46651
47357
  }
46652
47358
  </div>
46653
- `, 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.4 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"] }]
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"] }]
46654
47360
  }], propDecorators: { identity: [{
46655
47361
  type: Input
46656
47362
  }], emptyTitle: [{
@@ -47202,95 +47908,6 @@ class WidgetPageCompositionFactory {
47202
47908
  }
47203
47909
  }
47204
47910
 
47205
- /** Shared presentation for derived state and links. Never infers meaning from field names. */
47206
- function validateCompositionValueFormat(format) {
47207
- const spec = typeof format === 'string' ? { kind: format } : format;
47208
- if (!spec || !['integer', 'number', 'currency', 'percent', 'date', 'mask'].includes(String(spec['kind']))) {
47209
- throw new Error('Unsupported value format kind.');
47210
- }
47211
- const numericKind = ['number', 'currency', 'percent'].includes(String(spec['kind']));
47212
- const keys = ['kind', 'locale', ...(numericKind ? ['minimumFractionDigits', 'maximumFractionDigits'] : []),
47213
- ...(spec['kind'] === 'currency' ? ['currency'] : []), ...(spec['kind'] === 'mask' ? ['mask'] : [])];
47214
- if (Object.keys(spec).some(key => !keys.includes(key)))
47215
- throw new Error('Unknown value format option.');
47216
- if (spec['locale'] !== undefined) {
47217
- if (typeof spec['locale'] !== 'string' || !spec['locale'].trim())
47218
- throw new Error('Invalid format locale.');
47219
- Intl.getCanonicalLocales(spec['locale']);
47220
- }
47221
- for (const key of ['minimumFractionDigits', 'maximumFractionDigits']) {
47222
- const digits = spec[key];
47223
- if (digits !== undefined && (typeof digits !== 'number' || !Number.isInteger(digits) || digits < 0 || digits > 20)) {
47224
- throw new Error('Fraction digits must be integers between 0 and 20.');
47225
- }
47226
- }
47227
- const minimum = spec['minimumFractionDigits'] ?? (spec['kind'] === 'currency' ? 2 : 0);
47228
- const maximum = spec['maximumFractionDigits'] ?? (spec['kind'] === 'currency' ? 2 : spec['kind'] === 'percent' ? 1 : 0);
47229
- if (numericKind && Number(minimum) > Number(maximum))
47230
- throw new Error('Invalid fraction digit range.');
47231
- if (spec['currency'] !== undefined && (typeof spec['currency'] !== 'string' || !/^[A-Z]{3}$/.test(spec['currency']))) {
47232
- throw new Error('Currency must be a three-letter uppercase code.');
47233
- }
47234
- if (spec['kind'] === 'mask') {
47235
- const mask = spec['mask'];
47236
- if (typeof mask !== 'string' || mask.length > 128 || !mask.includes('0') || !/^[0 .()/+\-]+$/.test(mask)) {
47237
- throw new Error('Mask must contain digit slots (0) and literal separators.');
47238
- }
47239
- }
47240
- }
47241
- function formatCompositionValue(value, format) {
47242
- if (format == null)
47243
- return value == null ? '' : String(value);
47244
- validateCompositionValueFormat(format);
47245
- const spec = (typeof format === 'string' ? { kind: format } : format);
47246
- const locale = typeof spec['locale'] === 'string' ? spec['locale'] : 'pt-BR';
47247
- const number = typeof value === 'number' || (typeof value === 'string' && value.trim()) ? Number(value) : 0;
47248
- const numeric = Number.isFinite(number) ? number : 0;
47249
- switch (spec['kind']) {
47250
- case 'integer': return new Intl.NumberFormat(locale, { maximumFractionDigits: 0, minimumFractionDigits: 0 }).format(numeric);
47251
- case 'number': return new Intl.NumberFormat(locale, {
47252
- maximumFractionDigits: Number(spec['maximumFractionDigits']) || 0,
47253
- minimumFractionDigits: Number(spec['minimumFractionDigits']) || 0,
47254
- }).format(numeric);
47255
- case 'currency': return new Intl.NumberFormat(locale, {
47256
- style: 'currency', currency: typeof spec['currency'] === 'string' ? spec['currency'] : 'BRL',
47257
- maximumFractionDigits: spec['maximumFractionDigits'] ?? 2,
47258
- minimumFractionDigits: spec['minimumFractionDigits'] ?? 2,
47259
- }).format(numeric);
47260
- case 'percent': return new Intl.NumberFormat(locale, {
47261
- style: 'percent', maximumFractionDigits: spec['maximumFractionDigits'] ?? 1,
47262
- minimumFractionDigits: spec['minimumFractionDigits'] ?? 0,
47263
- }).format(numeric);
47264
- case 'date': {
47265
- if (value == null || value === '')
47266
- return '';
47267
- if (typeof value !== 'string' || !/^\d{4}-\d{2}-\d{2}$/.test(value))
47268
- throw new Error('Expected a civil date in YYYY-MM-DD format.');
47269
- const [year, month, day] = value.split('-').map(Number);
47270
- const date = new Date(0);
47271
- date.setUTCFullYear(year, month - 1, day);
47272
- if (year < 1 || date.getUTCFullYear() !== year || date.getUTCMonth() !== month - 1 || date.getUTCDate() !== day) {
47273
- throw new Error('Invalid civil date.');
47274
- }
47275
- return new Intl.DateTimeFormat(locale, { timeZone: 'UTC', year: 'numeric', month: '2-digit', day: '2-digit' }).format(date);
47276
- }
47277
- case 'mask': {
47278
- if (value == null || value === '')
47279
- return '';
47280
- if (typeof value !== 'string')
47281
- throw new Error('Masked values must be strings to preserve leading zeros.');
47282
- const digits = value.replace(/[ .()/+\-]/g, '');
47283
- const mask = spec['mask'];
47284
- if (!/^\d+$/.test(digits) || digits.length !== [...mask].filter(token => token === '0').length) {
47285
- throw new Error('Value does not match the mask digit count.');
47286
- }
47287
- let index = 0;
47288
- return [...mask].map(token => token === '0' ? digits[index++] : token).join('');
47289
- }
47290
- default: throw new Error('Unsupported value format kind.');
47291
- }
47292
- }
47293
-
47294
47911
  class ConnectionManagerService {
47295
47912
  /** Extract value from an object using dot-path (e.g., 'payload.row.id'). */
47296
47913
  extractByPath(obj, path) {
@@ -62425,6 +63042,440 @@ function providePraxisDynamicPageMetadata() {
62425
63042
  };
62426
63043
  }
62427
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
+
62428
63479
  const SURFACE_HOST_I18N_NAMESPACE = 'surfaceHost';
62429
63480
  const SURFACE_HOST_I18N_CONFIG = {
62430
63481
  namespaces: {
@@ -62432,10 +63483,12 @@ const SURFACE_HOST_I18N_CONFIG = {
62432
63483
  'pt-BR': {
62433
63484
  'widget.error.title': 'Não foi possível carregar este conteúdo',
62434
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',
62435
63487
  },
62436
63488
  'en-US': {
62437
63489
  'widget.error.title': 'This content could not be loaded',
62438
63490
  'widget.error.description': 'This content is unavailable. Try again. If the problem continues, contact the platform owner.',
63491
+ 'related.section.title': 'Related resources',
62439
63492
  },
62440
63493
  },
62441
63494
  },
@@ -62475,6 +63528,102 @@ class PraxisSurfaceHostComponent {
62475
63528
  const operation = normalizeSurfaceOperationContext(this.context?.['operation']);
62476
63529
  return (operation?.subject?.identity ?? operation?.taskScope?.identity ?? null);
62477
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
+ }
62478
63627
  ngAfterViewInit() {
62479
63628
  this.scheduleWidgetRender();
62480
63629
  }
@@ -62772,6 +63921,7 @@ class PraxisSurfaceHostComponent {
62772
63921
  title: String(surface['title'] || id),
62773
63922
  description: surface['description'],
62774
63923
  intent: surface['intent'],
63924
+ icon: surface['icon'],
62775
63925
  operationId,
62776
63926
  path,
62777
63927
  method,
@@ -62889,13 +64039,55 @@ class PraxisSurfaceHostComponent {
62889
64039
  ></ng-container>
62890
64040
  </div>
62891
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
+ }
62892
64080
  </section>
62893
64081
  </div>
62894
- `, 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"] }] });
62895
64083
  }
62896
64084
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PraxisSurfaceHostComponent, decorators: [{
62897
64085
  type: Component,
62898
- args: [{ selector: 'praxis-surface-host', standalone: true, imports: [DynamicWidgetLoaderDirective, PraxisResourceIdentityComponent], providers: [providePraxisI18nConfig(SURFACE_HOST_I18N_CONFIG)], template: `
64086
+ args: [{ selector: 'praxis-surface-host', standalone: true, imports: [
64087
+ DynamicWidgetLoaderDirective,
64088
+ PraxisResourceIdentityComponent,
64089
+ PraxisRelatedResourceOutletComponent,
64090
+ ], providers: [providePraxisI18nConfig(SURFACE_HOST_I18N_CONFIG)], template: `
62899
64091
  <div class="pdx-surface-host">
62900
64092
  @if (subtitle || (title && renderTitleInsideBody)) {
62901
64093
  <header class="pdx-surface-host__header">
@@ -62999,9 +64191,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
62999
64191
  ></ng-container>
63000
64192
  </div>
63001
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
+ }
63002
64232
  </section>
63003
64233
  </div>
63004
- `, 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"] }]
63005
64235
  }], propDecorators: { title: [{
63006
64236
  type: Input
63007
64237
  }], subtitle: [{
@@ -63041,425 +64271,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
63041
64271
  args: ['afterWidgetLoader', { read: DynamicWidgetLoaderDirective }]
63042
64272
  }] } });
63043
64273
 
63044
- class PraxisRelatedResourceOutletComponent {
63045
- resolver = inject(RelatedResourceSurfaceResolverService);
63046
- materializer = inject(SurfaceOpenMaterializerService);
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 resolution = this.resolution();
63207
- const payload = resolution.state === 'ready' ? resolution.payload : null;
63208
- const requestKey = this.buildMaterializationRequestKey(resolution);
63209
- // Composition state updates can re-create structurally equal input objects.
63210
- // Keep the mounted child widget when its effective materialization contract
63211
- // did not change; destroying it here also destroys transient table state such
63212
- // as the selection that may have triggered the composition update itself.
63213
- if (requestKey === this.materializationRequestKey
63214
- && this.materializedPayload() != null) {
63215
- return;
63216
- }
63217
- this.materializationRequestKey = requestKey;
63218
- this.materializedPayload.set(null);
63219
- if (!payload) {
63220
- return;
63221
- }
63222
- let cancelled = false;
63223
- this.materializer.materialize(payload)
63224
- .then((materialized) => {
63225
- if (!cancelled && this.materializationRequestKey === requestKey) {
63226
- this.materializedPayload.set(materialized);
63227
- }
63228
- })
63229
- .catch(() => {
63230
- if (!cancelled && this.materializationRequestKey === requestKey) {
63231
- this.materializedPayload.set(payload);
63232
- }
63233
- });
63234
- onCleanup(() => {
63235
- cancelled = true;
63236
- });
63237
- });
63238
- }
63239
- openRelated() {
63240
- const payload = this.resolution().payload;
63241
- if (payload) {
63242
- this.surfaceOpen.emit(payload);
63243
- }
63244
- }
63245
- onWidgetEvent(event) {
63246
- const resourceEvent = event.resourceEvent ?? this.extractResourceEvent(event);
63247
- if (resourceEvent) {
63248
- this.resourceEvent.emit(resourceEvent);
63249
- this.widgetEvent.emit({ ...event, resourceEvent });
63250
- return;
63251
- }
63252
- this.widgetEvent.emit(event);
63253
- }
63254
- stateIcon() {
63255
- switch (this.renderResolution().state) {
63256
- case 'ready':
63257
- return 'hub';
63258
- case 'permission-limited':
63259
- return 'lock';
63260
- case 'not-found':
63261
- return 'link_off';
63262
- case 'empty':
63263
- return 'playlist_remove';
63264
- case 'error':
63265
- return 'error';
63266
- default:
63267
- return 'account_tree';
63268
- }
63269
- }
63270
- stateTitle() {
63271
- const state = this.renderResolution().state;
63272
- return this.t(`state.${state}.title`, this.defaultTitle(state));
63273
- }
63274
- stateDescription() {
63275
- const state = this.renderResolution().state;
63276
- return this.t(`state.${state}.description`, this.defaultDescription(state));
63277
- }
63278
- t(key, fallback) {
63279
- return this.i18n.t(key, undefined, fallback, RELATED_RESOURCE_OUTLET_I18N_NAMESPACE);
63280
- }
63281
- defaultTitle(state) {
63282
- return state === 'ready'
63283
- ? this.t('status.ready', 'Related resource ready')
63284
- : 'Related resource';
63285
- }
63286
- defaultDescription(state) {
63287
- return this.renderResolution().reason || state;
63288
- }
63289
- applyCatalogSurface(surfaceId, catalog) {
63290
- const normalizedId = this.trim(surfaceId);
63291
- const surface = (catalog?.surfaces || []).find((candidate) => this.trim(candidate.id) === normalizedId) || null;
63292
- this.discoveredSurface.set(surface);
63293
- this.discoveryState.set(surface ? null : 'not-found');
63294
- this.discoveryStateReason.set(surface ? null : 'surface-id-not-found');
63295
- }
63296
- resetDiscoveryState() {
63297
- this.discoveredSurface.set(null);
63298
- this.discoveryState.set(null);
63299
- this.discoveryStateReason.set(null);
63300
- this.discoveryRequestKey = '';
63301
- }
63302
- discoveryOptions(endpointKey, apiUrlEntry) {
63303
- if (!endpointKey && !apiUrlEntry) {
63304
- return undefined;
63305
- }
63306
- return {
63307
- endpointKey: endpointKey || undefined,
63308
- apiUrlEntry: apiUrlEntry || null,
63309
- };
63310
- }
63311
- resolveFallbackSurfaceCatalogHref(parentResourcePath, parentResourceId) {
63312
- const path = this.normalizeResourcePath(parentResourcePath || '');
63313
- if (!path || parentResourceId == null || parentResourceId === '') {
63314
- return null;
63315
- }
63316
- return `/api/${path}/${encodeURIComponent(String(parentResourceId))}/surfaces`;
63317
- }
63318
- normalizeResourcePath(resourcePath) {
63319
- let normalized = this.trim(resourcePath);
63320
- if (/^https?:\/\//i.test(normalized)) {
63321
- try {
63322
- normalized = new URL(normalized).pathname;
63323
- }
63324
- catch {
63325
- return '';
63326
- }
63327
- }
63328
- return normalized
63329
- .replace(/^\/+/, '')
63330
- .replace(/^(?:api\/)+/i, '')
63331
- .replace(/\/+$/, '');
63332
- }
63333
- buildDiscoveryRequestKey(surfaceId, source, href, options) {
63334
- return JSON.stringify({
63335
- surfaceId: this.trim(surfaceId),
63336
- source,
63337
- href,
63338
- endpointKey: options?.endpointKey || null,
63339
- apiUrlEntry: options?.apiUrlEntry || null,
63340
- });
63341
- }
63342
- buildMaterializationRequestKey(resolution) {
63343
- return JSON.stringify({
63344
- state: resolution.state,
63345
- payload: resolution.payload ?? null,
63346
- mode: this.mode(),
63347
- });
63348
- }
63349
- isPermissionError(error) {
63350
- const status = typeof error === 'object' && error
63351
- ? error.status
63352
- : null;
63353
- return status === 401 || status === 403;
63354
- }
63355
- extractResourceEvent(event) {
63356
- if (event.output !== 'resourceEvent' || !event.payload || typeof event.payload !== 'object') {
63357
- return null;
63358
- }
63359
- const candidate = event.payload;
63360
- return typeof candidate.kind === 'string'
63361
- && typeof candidate.sourceComponentId === 'string'
63362
- && 'payload' in candidate
63363
- ? candidate
63364
- : null;
63365
- }
63366
- trim(value) {
63367
- return typeof value === 'string' ? value.trim() : '';
63368
- }
63369
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PraxisRelatedResourceOutletComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
63370
- 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: `
63371
- <section class="pdx-related-outlet" [class.pdx-related-outlet--compact]="compact()">
63372
- @if (renderResolution().state === 'ready' && mode() === 'inline' && renderResolution().payload?.widget) {
63373
- <ng-container
63374
- [dynamicWidgetLoader]="renderResolution().payload!.widget"
63375
- [ownerWidgetKey]="ownerWidgetKey()"
63376
- [context]="renderResolution().payload!.context || null"
63377
- [strictValidation]="strictValidation()"
63378
- [autoWireOutputs]="true"
63379
- (widgetEvent)="onWidgetEvent($event)"
63380
- ></ng-container>
63381
- } @else {
63382
- <div
63383
- class="pdx-related-outlet__state"
63384
- [class.pdx-related-outlet__state--ready]="renderResolution().state === 'ready'"
63385
- [class.pdx-related-outlet__state--busy]="isBusy()"
63386
- role="status"
63387
- aria-live="polite"
63388
- >
63389
- <div class="pdx-related-outlet__icon" aria-hidden="true">
63390
- @if (isBusy()) {
63391
- <mat-progress-spinner mode="indeterminate" diameter="22"></mat-progress-spinner>
63392
- } @else {
63393
- <mat-icon [fontIcon]="stateIcon()"></mat-icon>
63394
- }
63395
- </div>
63396
- <div class="pdx-related-outlet__copy">
63397
- <h3>{{ stateTitle() }}</h3>
63398
- <p>{{ stateDescription() }}</p>
63399
- </div>
63400
- @if (resolution().state === 'ready' && mode() === 'open-action') {
63401
- <button mat-flat-button type="button" color="primary" (click)="openRelated()">
63402
- <mat-icon fontIcon="open_in_new" aria-hidden="true"></mat-icon>
63403
- {{ t('action.open', 'Open related') }}
63404
- </button>
63405
- }
63406
- </div>
63407
- }
63408
- </section>
63409
- `, 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"] }] });
63410
- }
63411
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PraxisRelatedResourceOutletComponent, decorators: [{
63412
- type: Component,
63413
- args: [{ selector: 'praxis-related-resource-outlet', standalone: true, host: {
63414
- 'data-praxis-related-resource-outlet': 'core',
63415
- '[attr.data-state]': 'renderResolution().state',
63416
- }, imports: [
63417
- DynamicWidgetLoaderDirective,
63418
- MatButtonModule,
63419
- MatIconModule,
63420
- MatProgressSpinnerModule,
63421
- ], providers: [providePraxisI18nConfig(RELATED_RESOURCE_OUTLET_I18N_CONFIG)], template: `
63422
- <section class="pdx-related-outlet" [class.pdx-related-outlet--compact]="compact()">
63423
- @if (renderResolution().state === 'ready' && mode() === 'inline' && renderResolution().payload?.widget) {
63424
- <ng-container
63425
- [dynamicWidgetLoader]="renderResolution().payload!.widget"
63426
- [ownerWidgetKey]="ownerWidgetKey()"
63427
- [context]="renderResolution().payload!.context || null"
63428
- [strictValidation]="strictValidation()"
63429
- [autoWireOutputs]="true"
63430
- (widgetEvent)="onWidgetEvent($event)"
63431
- ></ng-container>
63432
- } @else {
63433
- <div
63434
- class="pdx-related-outlet__state"
63435
- [class.pdx-related-outlet__state--ready]="renderResolution().state === 'ready'"
63436
- [class.pdx-related-outlet__state--busy]="isBusy()"
63437
- role="status"
63438
- aria-live="polite"
63439
- >
63440
- <div class="pdx-related-outlet__icon" aria-hidden="true">
63441
- @if (isBusy()) {
63442
- <mat-progress-spinner mode="indeterminate" diameter="22"></mat-progress-spinner>
63443
- } @else {
63444
- <mat-icon [fontIcon]="stateIcon()"></mat-icon>
63445
- }
63446
- </div>
63447
- <div class="pdx-related-outlet__copy">
63448
- <h3>{{ stateTitle() }}</h3>
63449
- <p>{{ stateDescription() }}</p>
63450
- </div>
63451
- @if (resolution().state === 'ready' && mode() === 'open-action') {
63452
- <button mat-flat-button type="button" color="primary" (click)="openRelated()">
63453
- <mat-icon fontIcon="open_in_new" aria-hidden="true"></mat-icon>
63454
- {{ t('action.open', 'Open related') }}
63455
- </button>
63456
- }
63457
- </div>
63458
- }
63459
- </section>
63460
- `, 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"] }]
63461
- }], 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"] }] } });
63462
-
63463
64274
  const DEFAULT_ICONS = [
63464
64275
  'search', 'close', 'check', 'add', 'remove', 'delete', 'edit', 'save', 'cancel', 'warning', 'error', 'info', 'help',
63465
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',
@@ -67139,6 +67950,8 @@ class PraxisQuickViewTriggerDirective {
67139
67950
  elementRef = inject(ElementRef);
67140
67951
  quickViewService = inject(ResourceQuickViewService);
67141
67952
  lastResolvedTargetSignature = null;
67953
+ cachedBindingRef = undefined;
67954
+ cachedIsConfigured = false;
67142
67955
  binding = null;
67143
67956
  praxisQuickViewRecord = null;
67144
67957
  praxisQuickViewTriggerMode = 'hover-and-click';
@@ -67154,10 +67967,16 @@ class PraxisQuickViewTriggerDirective {
67154
67967
  return this.praxisQuickViewTriggerMode || 'hover-and-click';
67155
67968
  }
67156
67969
  get isQuickViewConfigured() {
67970
+ if (this.binding === this.cachedBindingRef) {
67971
+ return this.cachedIsConfigured;
67972
+ }
67973
+ this.cachedBindingRef = this.binding;
67157
67974
  if (!this.binding) {
67975
+ this.cachedIsConfigured = false;
67158
67976
  return false;
67159
67977
  }
67160
- return validateResourceQuickViewBinding(this.binding).valid;
67978
+ this.cachedIsConfigured = validateResourceQuickViewBinding(this.binding).valid;
67979
+ return this.cachedIsConfigured;
67161
67980
  }
67162
67981
  get shouldExposeDialogPopupAttr() {
67163
67982
  return this.isQuickViewConfigured && this.triggerMode !== 'hover-only';
@@ -67994,7 +68813,7 @@ class PraxisAppShellComponent {
67994
68813
  </main>
67995
68814
  </div>
67996
68815
  </div>
67997
- `, 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 });
67998
68817
  }
67999
68818
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PraxisAppShellComponent, decorators: [{
68000
68819
  type: Component,
@@ -68337,7 +69156,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
68337
69156
  </main>
68338
69157
  </div>
68339
69158
  </div>
68340
- `, 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"] }]
68341
69160
  }], propDecorators: { brand: [{
68342
69161
  type: Input
68343
69162
  }], navigation: [{