@praxisui/core 10.0.0-rc.55 → 10.0.0-rc.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "generatedAt": "2026-11-19T04:18:21.275Z",
3
+ "generatedAt": "2026-11-19T10:38:31.259Z",
4
4
  "packageName": "@praxisui/core",
5
- "packageVersion": "10.0.0-rc.55",
5
+ "packageVersion": "10.0.0-rc.56",
6
6
  "sourceRegistry": "praxis-component-registry-ingestion",
7
7
  "sourceRegistryVersion": "1.0.0",
8
8
  "componentCount": 4,
@@ -2156,7 +2156,7 @@ function resolveResourceQuickViewTarget(binding, sourceRecord) {
2156
2156
  /**
2157
2157
  * Verifica se a âncora efêmera de runtime permanece conectada e visível na viewport.
2158
2158
  */
2159
- function isResourceQuickViewAnchorValid(anchor) {
2159
+ function isResourceQuickViewAnchorValid(anchor, trigger) {
2160
2160
  if (!anchor || typeof anchor !== 'object') {
2161
2161
  return false;
2162
2162
  }
@@ -2181,10 +2181,11 @@ function isResourceQuickViewAnchorValid(anchor) {
2181
2181
  if (rect.width === 0 && rect.height === 0) {
2182
2182
  return false;
2183
2183
  }
2184
- return (rect.bottom >= 0 &&
2185
- rect.right >= 0 &&
2186
- rect.top <= viewportHeight &&
2187
- rect.left <= viewportWidth);
2184
+ const edgeTolerance = trigger === 'focus-shortcut' || trigger === 'explicit-button' ? 96 : 0;
2185
+ return (rect.bottom >= -edgeTolerance &&
2186
+ rect.right >= -edgeTolerance &&
2187
+ rect.top <= viewportHeight + edgeTolerance &&
2188
+ rect.left <= viewportWidth + edgeTolerance);
2188
2189
  }
2189
2190
  if (anchor.kind === 'virtual-rect') {
2190
2191
  if (!anchor.anchorKey || !anchor.anchorKey.trim()) {
@@ -2,8 +2,8 @@ import * as i0 from '@angular/core';
2
2
  import { Component, InjectionToken, APP_INITIALIZER, inject, Injectable, Inject, DestroyRef, signal, computed, Optional, SkipSelf, assertInInjectionContext, Injector, ErrorHandler, makeEnvironmentProviders, 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
- import { BehaviorSubject, firstValueFrom, of, defer, throwError, from, EMPTY, tap, finalize as finalize$1, shareReplay, map as map$1, catchError as catchError$1, switchMap as switchMap$1, Subject, takeUntil, forkJoin, Observable, timer, isObservable, combineLatest, merge, Subscription, defaultIfEmpty, timeout as timeout$1 } from 'rxjs';
6
- import { switchMap, map, take, catchError, finalize, concatMap, tap as tap$1, shareReplay as shareReplay$1, takeUntil as takeUntil$1, toArray, exhaustMap, filter, timeout } from 'rxjs/operators';
5
+ import { BehaviorSubject, firstValueFrom, of, defer, throwError, from, EMPTY, tap, finalize as finalize$1, shareReplay as shareReplay$1, map as map$1, catchError as catchError$1, switchMap as switchMap$1, Subject, takeUntil, forkJoin, Observable, timer, isObservable, combineLatest, merge, Subscription, defaultIfEmpty, timeout as timeout$1 } from 'rxjs';
6
+ import { switchMap, map, take, finalize, shareReplay, catchError, concatMap, tap as tap$1, takeUntil as takeUntil$1, toArray, exhaustMap, filter, timeout } from 'rxjs/operators';
7
7
  import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
8
8
  import * as i1$2 from '@angular/forms';
9
9
  import { Validators, FormGroup, FormControl, FormArray, FormsModule, ReactiveFormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
@@ -1497,6 +1497,8 @@ class ApiConfigStorage {
1497
1497
  // cannot satisfy If-Match for governed writes.
1498
1498
  cache = new Map();
1499
1499
  scopedCache = new Map();
1500
+ negativeCache = new Set();
1501
+ inFlightLoads = new Map();
1500
1502
  constructor() {
1501
1503
  this.destroyRef?.onDestroy(() => {
1502
1504
  for (const release of Array.from(this.activeProbeReleases)) {
@@ -1525,6 +1527,8 @@ class ApiConfigStorage {
1525
1527
  invalidateCache() {
1526
1528
  this.cache.clear();
1527
1529
  this.scopedCache.clear();
1530
+ this.negativeCache.clear();
1531
+ this.inFlightLoads.clear();
1528
1532
  this.clearSaveError();
1529
1533
  }
1530
1534
  shouldLogLoadError(key, err) {
@@ -1544,11 +1548,32 @@ class ApiConfigStorage {
1544
1548
  }
1545
1549
  loadConfig(key, options) {
1546
1550
  return defer(() => {
1547
- const existingProbe = ApiConfigStorage.loadAvailabilityProbes.get(this.baseUrl);
1548
- if (existingProbe) {
1549
- return from(existingProbe).pipe(switchMap((available) => available ? this.executeLoadConfigRequest(key, false, options?.scope) : of(null)));
1551
+ const headers = this.buildHeaders();
1552
+ const effectiveScope = options?.scope ?? this.resolveRequestScope(headers);
1553
+ const cacheKey = this.buildNegativeCacheKey(key, effectiveScope, headers);
1554
+ if (this.negativeCache.has(cacheKey)) {
1555
+ return of(null);
1550
1556
  }
1551
- return this.executeLoadConfigRequest(key, true, options?.scope);
1557
+ const existingInFlight = this.inFlightLoads.get(cacheKey);
1558
+ if (existingInFlight) {
1559
+ return existingInFlight;
1560
+ }
1561
+ const existingProbe = ApiConfigStorage.loadAvailabilityProbes.get(this.baseUrl);
1562
+ const request$ = existingProbe
1563
+ ? from(existingProbe).pipe(switchMap((available) => {
1564
+ if (!available || this.negativeCache.has(cacheKey)) {
1565
+ return of(null);
1566
+ }
1567
+ return this.executeLoadConfigRequest(key, false, options?.scope, cacheKey);
1568
+ }))
1569
+ : this.executeLoadConfigRequest(key, true, options?.scope, cacheKey);
1570
+ const shared$ = request$.pipe(finalize(() => {
1571
+ if (this.inFlightLoads.get(cacheKey) === shared$) {
1572
+ this.inFlightLoads.delete(cacheKey);
1573
+ }
1574
+ }), shareReplay({ bufferSize: 1, refCount: true }));
1575
+ this.inFlightLoads.set(cacheKey, shared$);
1576
+ return shared$;
1552
1577
  });
1553
1578
  }
1554
1579
  loadConfigDocument(key, options) {
@@ -1557,13 +1582,22 @@ class ApiConfigStorage {
1557
1582
  const { type, id } = this.resolveKey(key);
1558
1583
  const params = this.buildParams(type, id, options?.scope);
1559
1584
  const headers = this.buildHeaders(etag ? { 'If-None-Match': this.formatEtag(etag) } : {});
1585
+ const effectiveScope = options?.scope ?? this.resolveRequestScope(headers);
1586
+ const cacheKey = this.buildNegativeCacheKey(key, effectiveScope, headers);
1587
+ if (this.negativeCache.has(cacheKey)) {
1588
+ return of(null);
1589
+ }
1560
1590
  return this.http
1561
1591
  .get(this.baseUrl, { observe: 'response', headers, params })
1562
- .pipe(map((resp) => this.cacheResponseDocument(key, resp.body, resp.headers.get('ETag'), options?.scope)), catchError((err) => {
1592
+ .pipe(map((resp) => {
1593
+ this.negativeCache.delete(cacheKey);
1594
+ return this.cacheResponseDocument(key, resp.body, resp.headers.get('ETag'), options?.scope);
1595
+ }), catchError((err) => {
1563
1596
  if (err.status === 304 && cached?.document) {
1564
1597
  return of(cached.document);
1565
1598
  }
1566
1599
  if (err.status === 404) {
1600
+ this.negativeCache.add(cacheKey);
1567
1601
  return of(null);
1568
1602
  }
1569
1603
  if (this.shouldLogLoadError(key, err)) {
@@ -1574,7 +1608,7 @@ class ApiConfigStorage {
1574
1608
  : of(null);
1575
1609
  }));
1576
1610
  }
1577
- executeLoadConfigRequest(key, establishAvailability, explicitScope) {
1611
+ executeLoadConfigRequest(key, establishAvailability, explicitScope, negativeCacheKey) {
1578
1612
  const cached = this.getCachedEntry(key, explicitScope);
1579
1613
  const etag = cached?.readEtag ?? cached?.writeEtag;
1580
1614
  const { type, id } = this.resolveKey(key);
@@ -1604,6 +1638,7 @@ class ApiConfigStorage {
1604
1638
  return this.http
1605
1639
  .get(url, { observe: 'response', headers, params })
1606
1640
  .pipe(map((resp) => {
1641
+ this.negativeCache.delete(negativeCacheKey);
1607
1642
  const body = resp.body;
1608
1643
  const responseEtag = resp.headers.get('ETag');
1609
1644
  const readEtag = this.resolveReadEtag(responseEtag, body?.etag);
@@ -1627,6 +1662,7 @@ class ApiConfigStorage {
1627
1662
  return of(cached.payload);
1628
1663
  }
1629
1664
  if (err.status === 404) {
1665
+ this.negativeCache.add(negativeCacheKey);
1630
1666
  releaseProbe?.();
1631
1667
  return of(null);
1632
1668
  }
@@ -1644,6 +1680,7 @@ class ApiConfigStorage {
1644
1680
  return this.http
1645
1681
  .get(url, { observe: 'response', headers, params })
1646
1682
  .pipe(map((resp) => {
1683
+ this.negativeCache.delete(negativeCacheKey);
1647
1684
  const body = resp.body;
1648
1685
  const responseEtag = resp.headers.get('ETag');
1649
1686
  const readEtag = this.resolveReadEtag(responseEtag, body?.etag);
@@ -1666,6 +1703,7 @@ class ApiConfigStorage {
1666
1703
  return of(cached.payload);
1667
1704
  }
1668
1705
  if (err.status === 404) {
1706
+ this.negativeCache.add(negativeCacheKey);
1669
1707
  return of(null);
1670
1708
  }
1671
1709
  if (this.shouldLogLoadError(key, err)) {
@@ -1696,6 +1734,7 @@ class ApiConfigStorage {
1696
1734
  .put(url, { payload: config }, { observe: 'response', headers, params })
1697
1735
  .pipe(map((resp) => {
1698
1736
  this.clearSaveError();
1737
+ this.invalidateKeyCaches(key);
1699
1738
  const body = resp.body;
1700
1739
  const responseEtag = resp.headers.get('ETag');
1701
1740
  const payload = body?.payload ?? config;
@@ -1774,6 +1813,7 @@ class ApiConfigStorage {
1774
1813
  .pipe(map(() => {
1775
1814
  this.clearSaveError();
1776
1815
  this.evictCachedScope(key, requestScope);
1816
+ this.invalidateKeyCaches(key);
1777
1817
  }), catchError((err) => {
1778
1818
  this.recordSaveError(key, requestScope, 'clear', err);
1779
1819
  if (this.shouldLogClearError(key, err)) {
@@ -1815,6 +1855,7 @@ class ApiConfigStorage {
1815
1855
  }), switchMap(() => {
1816
1856
  this.clearSaveError();
1817
1857
  this.evictCachedScope(key, 'user');
1858
+ this.invalidateKeyCaches(key, 'user');
1818
1859
  return this.loadConfig(key, { scope: 'tenant' });
1819
1860
  }));
1820
1861
  }
@@ -1885,6 +1926,30 @@ class ApiConfigStorage {
1885
1926
  this.cache.delete(key);
1886
1927
  }
1887
1928
  }
1929
+ buildNegativeCacheKey(key, scope, headers) {
1930
+ const { id } = this.resolveKey(key);
1931
+ const contextHeaderSignature = headers
1932
+ .keys()
1933
+ .filter((name) => name.toLowerCase() !== 'if-none-match')
1934
+ .sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase()))
1935
+ .map((name) => `${name.toLowerCase()}=${headers.getAll(name)?.join(',') ?? ''}`)
1936
+ .join('|');
1937
+ return `${scope}\u0000${contextHeaderSignature}\u0000${id}`;
1938
+ }
1939
+ invalidateKeyCaches(key, scope) {
1940
+ const { id } = this.resolveKey(key);
1941
+ const suffix = `\u0000${id}`;
1942
+ for (const cacheKey of Array.from(this.negativeCache)) {
1943
+ if (cacheKey.endsWith(suffix) && (!scope || cacheKey.startsWith(`${scope}\u0000`))) {
1944
+ this.negativeCache.delete(cacheKey);
1945
+ }
1946
+ }
1947
+ for (const cacheKey of Array.from(this.inFlightLoads.keys())) {
1948
+ if (cacheKey.endsWith(suffix) && (!scope || cacheKey.startsWith(`${scope}\u0000`))) {
1949
+ this.inFlightLoads.delete(cacheKey);
1950
+ }
1951
+ }
1952
+ }
1888
1953
  resolveDynamicWriteScopeOverride() {
1889
1954
  return this._writeScopeOverride() ?? this.opts?.resolveWriteScope?.();
1890
1955
  }
@@ -4364,7 +4429,7 @@ function resolveResourceQuickViewTarget(binding, sourceRecord) {
4364
4429
  /**
4365
4430
  * Verifica se a âncora efêmera de runtime permanece conectada e visível na viewport.
4366
4431
  */
4367
- function isResourceQuickViewAnchorValid(anchor) {
4432
+ function isResourceQuickViewAnchorValid(anchor, trigger) {
4368
4433
  if (!anchor || typeof anchor !== 'object') {
4369
4434
  return false;
4370
4435
  }
@@ -4389,10 +4454,11 @@ function isResourceQuickViewAnchorValid(anchor) {
4389
4454
  if (rect.width === 0 && rect.height === 0) {
4390
4455
  return false;
4391
4456
  }
4392
- return (rect.bottom >= 0 &&
4393
- rect.right >= 0 &&
4394
- rect.top <= viewportHeight &&
4395
- rect.left <= viewportWidth);
4457
+ const edgeTolerance = trigger === 'focus-shortcut' || trigger === 'explicit-button' ? 96 : 0;
4458
+ return (rect.bottom >= -edgeTolerance &&
4459
+ rect.right >= -edgeTolerance &&
4460
+ rect.top <= viewportHeight + edgeTolerance &&
4461
+ rect.left <= viewportWidth + edgeTolerance);
4396
4462
  }
4397
4463
  if (anchor.kind === 'virtual-rect') {
4398
4464
  if (!anchor.anchorKey || !anchor.anchorKey.trim()) {
@@ -13291,7 +13357,7 @@ class ResourceDiscoveryService {
13291
13357
  if (inFlight.get(requestKey) === request)
13292
13358
  inFlight.delete(requestKey);
13293
13359
  };
13294
- const shared = defer(load).pipe(tap({ next: release, error: release, complete: release }), finalize$1(release), shareReplay({ bufferSize: 1, refCount: true }));
13360
+ const shared = defer(load).pipe(tap({ next: release, error: release, complete: release }), finalize$1(release), shareReplay$1({ bufferSize: 1, refCount: true }));
13295
13361
  const request = defer(() => {
13296
13362
  assertCurrentContext();
13297
13363
  return inFlight.get(requestKey) === request
@@ -18914,7 +18980,7 @@ class ResourceRecordOpenService {
18914
18980
  if (this.collectionCatalogInFlight.get(cacheKey) === request$) {
18915
18981
  this.collectionCatalogInFlight.delete(cacheKey);
18916
18982
  }
18917
- }), shareReplay({ bufferSize: 1, refCount: true }));
18983
+ }), shareReplay$1({ bufferSize: 1, refCount: true }));
18918
18984
  this.collectionCatalogInFlight.set(cacheKey, request$);
18919
18985
  return request$;
18920
18986
  }
@@ -18950,7 +19016,7 @@ class ResourceRecordOpenService {
18950
19016
  if (this.surfaceSchemaInFlight.get(cacheKey) === request$) {
18951
19017
  this.surfaceSchemaInFlight.delete(cacheKey);
18952
19018
  }
18953
- }), shareReplay({ bufferSize: 1, refCount: true }));
19019
+ }), shareReplay$1({ bufferSize: 1, refCount: true }));
18954
19020
  this.surfaceSchemaInFlight.set(cacheKey, request$);
18955
19021
  return request$;
18956
19022
  }
@@ -20418,7 +20484,7 @@ class ResourceQuickViewService {
20418
20484
  resourceKey: request.binding?.recordOpen?.target?.resourceKey ?? 'unknown',
20419
20485
  surfaceId: request.binding?.recordOpen?.target?.surfaceId ?? 'unknown',
20420
20486
  });
20421
- if (!isResourceQuickViewAnchorValid(request.anchor)) {
20487
+ if (!isResourceQuickViewAnchorValid(request.anchor, request.trigger)) {
20422
20488
  const invalidAnchorResolution = this.buildFailureResolution(request.binding, '', 'INVALID_ANCHOR', this.translate('quickView.invalidAnchor', 'A referência visual do item não está mais disponível na tela.'));
20423
20489
  this.stateSubject.next('error');
20424
20490
  this.resolutionSubject.next(invalidAnchorResolution);
@@ -20466,9 +20532,9 @@ class ResourceQuickViewService {
20466
20532
  const projection = await this.fetchDeduplicatedProjection(canonicalBinding, extractedId, request);
20467
20533
  if (generation !== this.activeGeneration ||
20468
20534
  epochAtStart !== this.contextEpoch ||
20469
- !isResourceQuickViewAnchorValid(request.anchor)) {
20535
+ !isResourceQuickViewAnchorValid(request.anchor, request.trigger)) {
20470
20536
  if (generation === this.activeGeneration &&
20471
- !isResourceQuickViewAnchorValid(request.anchor)) {
20537
+ !isResourceQuickViewAnchorValid(request.anchor, request.trigger)) {
20472
20538
  this.dismiss('anchor-invalid');
20473
20539
  }
20474
20540
  return null;
@@ -22577,7 +22643,7 @@ class GenericCrudService {
22577
22643
  }));
22578
22644
  }
22579
22645
  return this.handleError(err);
22580
- }))), shareReplay$1({ bufferSize: 1, refCount: true }));
22646
+ }))), shareReplay({ bufferSize: 1, refCount: true }));
22581
22647
  }
22582
22648
  captureSchemaHeaders(entry, tenant, locale) {
22583
22649
  if (this.enterpriseRuntimeContext?.snapshot && !this.enterpriseRuntimeContext.effectiveContext) {
@@ -23122,7 +23188,7 @@ class GenericCrudService {
23122
23188
  }));
23123
23189
  }
23124
23190
  return this.handleError(err);
23125
- }))), shareReplay$1({ bufferSize: 1, refCount: true }));
23191
+ }))), shareReplay({ bufferSize: 1, refCount: true }));
23126
23192
  }
23127
23193
  /**
23128
23194
  * Retorna todos os registros do recurso.
@@ -23801,7 +23867,7 @@ class GenericCrudService {
23801
23867
  }, error: releaseRequest, complete: releaseRequest }),
23802
23868
  // Share only work in flight. A later initialization must revalidate the
23803
23869
  // representation instead of replaying an indefinitely completed schema.
23804
- finalize(releaseRequest), shareReplay$1({ bufferSize: 1, refCount: true }));
23870
+ finalize(releaseRequest), shareReplay({ bufferSize: 1, refCount: true }));
23805
23871
  if (cacheEnabled) {
23806
23872
  this._filterSchemaCache.set(cacheKey, request$);
23807
23873
  }
@@ -31783,7 +31849,18 @@ class AnalyticsPresentationResolver {
31783
31849
  const hintedKind = String(hints?.preferredChartType ?? hints?.chartKind ?? '')
31784
31850
  .trim()
31785
31851
  .toLowerCase();
31786
- if (hintedKind === 'boxplot' || hintedKind === 'calendar' || hintedKind === 'waterfall') {
31852
+ if (hintedKind === 'boxplot' ||
31853
+ hintedKind === 'calendar' ||
31854
+ hintedKind === 'waterfall' ||
31855
+ hintedKind === 'sankey' ||
31856
+ hintedKind === 'sunburst' ||
31857
+ hintedKind === 'treemap' ||
31858
+ hintedKind === 'radar' ||
31859
+ hintedKind === 'heatmap' ||
31860
+ hintedKind === 'scatter') {
31861
+ return true;
31862
+ }
31863
+ if (projection.intent === 'correlation') {
31787
31864
  return true;
31788
31865
  }
31789
31866
  if (projection.intent === 'distribution' && this.hasQuartileMetricBundle(projection)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@praxisui/core",
3
- "version": "10.0.0-rc.55",
3
+ "version": "10.0.0-rc.56",
4
4
  "description": "Core library for Praxis UI Workspace: types, tokens, services and utilities shared across @praxisui/* packages.",
5
5
  "peerDependencies": {
6
6
  "@angular/cdk": "^21.0.0",
@@ -2205,7 +2205,7 @@ declare function resolveResourceQuickViewTarget(binding: unknown, sourceRecord:
2205
2205
  /**
2206
2206
  * Verifica se a âncora efêmera de runtime permanece conectada e visível na viewport.
2207
2207
  */
2208
- declare function isResourceQuickViewAnchorValid(anchor: ResourceQuickViewAnchor | null | undefined): boolean;
2208
+ declare function isResourceQuickViewAnchorValid(anchor: ResourceQuickViewAnchor | null | undefined, trigger?: ResourceQuickViewTriggerKind | null): boolean;
2209
2209
  declare function resolveQuickViewAnchorKey(anchor: ResourceQuickViewAnchor): string;
2210
2210
 
2211
2211
  type RichBlockContextScope = 'row' | 'computed' | 'detail' | 'meta' | 'user' | 'tenant';
@@ -8377,6 +8377,8 @@ declare class ApiConfigStorage implements AsyncConfigDocumentStorage {
8377
8377
  private readonly componentTypeResolver;
8378
8378
  private readonly cache;
8379
8379
  private readonly scopedCache;
8380
+ private readonly negativeCache;
8381
+ private readonly inFlightLoads;
8380
8382
  constructor();
8381
8383
  setWriteScope(scope: ConfigStorageScope | undefined): void;
8382
8384
  toggleWriteScope(): ConfigStorageScope;
@@ -8413,6 +8415,8 @@ declare class ApiConfigStorage implements AsyncConfigDocumentStorage {
8413
8415
  private getCachedEntry;
8414
8416
  private storeCachedEntry;
8415
8417
  private evictCachedScope;
8418
+ private buildNegativeCacheKey;
8419
+ private invalidateKeyCaches;
8416
8420
  private resolveDynamicWriteScopeOverride;
8417
8421
  private recordSaveError;
8418
8422
  private toConfigDocument;