@praxisui/dialog 10.0.0-rc.5 → 10.0.0-rc.50

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 { InjectionToken, Directive, EventEmitter, inject, HostBinding, ContentChild, ViewChild, Output, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, Injectable, Injector, ApplicationRef, TemplateRef, ENVIRONMENT_INITIALIZER } from '@angular/core';
2
+ import { InjectionToken, Directive, EventEmitter, inject, HostBinding, ContentChild, ViewChild, Output, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, Injectable, Injector, ApplicationRef, TemplateRef, signal, computed, ENVIRONMENT_INITIALIZER } from '@angular/core';
3
3
  import { Subject, firstValueFrom } from 'rxjs';
4
4
  import * as i1 from '@angular/common';
5
5
  import { CommonModule } from '@angular/common';
@@ -9,7 +9,7 @@ import * as i3 from '@angular/cdk/a11y';
9
9
  import { A11yModule } from '@angular/cdk/a11y';
10
10
  import * as i4 from '@angular/material/icon';
11
11
  import { MatIconModule } from '@angular/material/icon';
12
- import { PraxisIconDirective, PraxisLayerScaleStyleService, GlobalConfigService, GLOBAL_DIALOG_SERVICE, ComponentMetadataRegistry, markGlobalActionProviderOperational, GLOBAL_SURFACE_SERVICE, SurfaceOpenMaterializerService, LoggerService, SURFACE_DRAWER_BRIDGE, PraxisSurfaceHostComponent, SurfaceNavigationError } from '@praxisui/core';
12
+ import { PraxisIconDirective, PraxisLayerScaleStyleService, SURFACE_DRAWER_REF, SURFACE_DRAWER_CONTENT_DATA, GlobalConfigService, GLOBAL_DIALOG_SERVICE, ComponentMetadataRegistry, markGlobalActionProviderOperational, GLOBAL_SURFACE_SERVICE, SurfaceOpenMaterializerService, LoggerService, SURFACE_DRAWER_BRIDGE, PraxisSurfaceHostComponent, SurfaceNavigationError, PraxisI18nService, PraxisResourceIdentityComponent, isResourceQuickViewAnchorValid, PRAXIS_QUICK_VIEW_PRESENTER } from '@praxisui/core';
13
13
  import { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
14
14
  import * as i1$1 from '@angular/forms';
15
15
  import { FormsModule } from '@angular/forms';
@@ -755,12 +755,17 @@ class PraxisDialog {
755
755
  open(content, config) {
756
756
  this.layerScale.ensureInstalled();
757
757
  const effectiveInjector = config?.injector ?? config?.viewContainerRef?.injector ?? this.injector;
758
+ const overlayRef = this.overlay.createOverlay(config ?? {});
759
+ const ref = new PraxisDialogRef(overlayRef);
758
760
  const injector = Injector.create({
759
- providers: [{ provide: PRAXIS_DIALOG_DATA, useValue: config?.data }],
761
+ providers: [
762
+ { provide: PRAXIS_DIALOG_DATA, useValue: config?.data },
763
+ { provide: PraxisDialogRef, useValue: ref },
764
+ { provide: SURFACE_DRAWER_REF, useValue: null },
765
+ { provide: SURFACE_DRAWER_CONTENT_DATA, useValue: null },
766
+ ],
760
767
  parent: effectiveInjector,
761
768
  });
762
- const overlayRef = this.overlay.createOverlay(config ?? {});
763
- const ref = new PraxisDialogRef(overlayRef);
764
769
  // Auto-id fallback if not provided
765
770
  let assignedId = config?.id ?? `praxis-dialog-${++this._seq}`;
766
771
  while (this.getDialogById(assignedId)) {
@@ -1368,13 +1373,20 @@ function toSurfaceSelectionResult(output, payload) {
1368
1373
  payload,
1369
1374
  };
1370
1375
  }
1371
- function resolveParentSurfaceRuntime(context) {
1376
+ function resolveParentSurfaceRuntime(context, runtimeInjector) {
1372
1377
  const runtime = context?.runtime?.state?.surfaceRuntime ||
1373
1378
  context?.payload?.surfaceContext?.surfaceRuntime ||
1374
1379
  context?.pageContext?.surfaceRuntime;
1375
- return runtime && typeof runtime === 'object'
1376
- ? runtime
1377
- : null;
1380
+ if (runtime && typeof runtime === 'object') {
1381
+ return runtime;
1382
+ }
1383
+ if (runtimeInjector && !runtimeInjector.get(PraxisDialogRef, null)) {
1384
+ const injectedRuntime = runtimeInjector.get(SURFACE_DRAWER_REF, null);
1385
+ if (injectedRuntime && typeof injectedRuntime === 'object') {
1386
+ return injectedRuntime;
1387
+ }
1388
+ }
1389
+ return null;
1378
1390
  }
1379
1391
  /**
1380
1392
  * The action origin is runtime-only: persisted surface payloads remain JSON
@@ -1485,7 +1497,7 @@ function providePraxisSurfaceGlobalActions() {
1485
1497
  }),
1486
1498
  },
1487
1499
  };
1488
- const parentRuntime = resolveParentSurfaceRuntime(context);
1500
+ const parentRuntime = resolveParentSurfaceRuntime(context, runtimeInjector);
1489
1501
  if (typeof parentRuntime?.['push'] === 'function') {
1490
1502
  const frameRef = await parentRuntime['push'](frame);
1491
1503
  if (!frameRef) {
@@ -1562,6 +1574,1242 @@ function providePraxisSurfaceGlobalActions() {
1562
1574
  };
1563
1575
  }
1564
1576
 
1577
+ class PraxisQuickViewOverlayComponent {
1578
+ i18n = inject(PraxisI18nService, { optional: true });
1579
+ resolution = signal(null, ...(ngDevMode ? [{ debugName: "resolution" }] : /* istanbul ignore next */ []));
1580
+ bodyRenderer = signal(null, ...(ngDevMode ? [{ debugName: "bodyRenderer" }] : /* istanbul ignore next */ []));
1581
+ narrowModalMode = signal(false, ...(ngDevMode ? [{ debugName: "narrowModalMode" }] : /* istanbul ignore next */ []));
1582
+ copiedField = signal(null, ...(ngDevMode ? [{ debugName: "copiedField" }] : /* istanbul ignore next */ []));
1583
+ failedAvatarUrl = signal(null, ...(ngDevMode ? [{ debugName: "failedAvatarUrl" }] : /* istanbul ignore next */ []));
1584
+ copiedFeedbackTimer = null;
1585
+ pointerEnter = new EventEmitter();
1586
+ pointerLeave = new EventEmitter();
1587
+ openDetail = new EventEmitter();
1588
+ openSurface = new EventEmitter();
1589
+ copyValue = new EventEmitter();
1590
+ dismiss = new EventEmitter();
1591
+ dialogSurface;
1592
+ ctaButton;
1593
+ closeButton;
1594
+ summaryItems = computed(() => this.resolution()?.summaryItems ?? [], ...(ngDevMode ? [{ debugName: "summaryItems" }] : /* istanbul ignore next */ []));
1595
+ contextualActions = computed(() => this.resolution()?.contextualActions ?? [], ...(ngDevMode ? [{ debugName: "contextualActions" }] : /* istanbul ignore next */ []));
1596
+ headerKeyPart = computed(() => this.resolution()?.identity?.key ?? null, ...(ngDevMode ? [{ debugName: "headerKeyPart" }] : /* istanbul ignore next */ []));
1597
+ headerKeyBadgeText = computed(() => {
1598
+ const key = this.headerKeyPart();
1599
+ if (!key || key.value === null || key.value === undefined) {
1600
+ return null;
1601
+ }
1602
+ const raw = String(key.value).trim();
1603
+ if (!raw) {
1604
+ return null;
1605
+ }
1606
+ const res = this.resolution();
1607
+ const mainTitle = String(res?.identity?.title?.value ?? res?.title ?? '').trim();
1608
+ if (mainTitle && raw.toLowerCase() === mainTitle.toLowerCase()) {
1609
+ return null;
1610
+ }
1611
+ const prefix = key.presentation?.prefix ?? '';
1612
+ const suffix = key.presentation?.suffix ?? '';
1613
+ if (prefix || suffix) {
1614
+ return `${prefix}${raw}${suffix}`;
1615
+ }
1616
+ return /^\d+$/.test(raw) ? `#${raw}` : raw;
1617
+ }, ...(ngDevMode ? [{ debugName: "headerKeyBadgeText" }] : /* istanbul ignore next */ []));
1618
+ headerKeyTooltip = computed(() => {
1619
+ const key = this.headerKeyPart();
1620
+ const badge = this.headerKeyBadgeText();
1621
+ if (!key || !badge) {
1622
+ return null;
1623
+ }
1624
+ const label = typeof key.label === 'string' ? key.label.trim() : '';
1625
+ return label ? `${label}: ${badge}` : badge;
1626
+ }, ...(ngDevMode ? [{ debugName: "headerKeyTooltip" }] : /* istanbul ignore next */ []));
1627
+ headerIdentity = computed(() => {
1628
+ const identity = this.resolution()?.identity ?? null;
1629
+ if (!identity) {
1630
+ return null;
1631
+ }
1632
+ if (this.shouldUseCustomBodyRenderer() || this.summaryItems().length > 0) {
1633
+ return {
1634
+ ...identity,
1635
+ metadata: [],
1636
+ };
1637
+ }
1638
+ return identity;
1639
+ }, ...(ngDevMode ? [{ debugName: "headerIdentity" }] : /* istanbul ignore next */ []));
1640
+ contextLabel = computed(() => {
1641
+ const res = this.resolution();
1642
+ const surfaceTitle = String(res?.surface?.title ?? '').trim();
1643
+ if (!surfaceTitle) {
1644
+ return null;
1645
+ }
1646
+ const mainTitle = String(res?.title ?? '').trim();
1647
+ return surfaceTitle.toLowerCase() === mainTitle.toLowerCase()
1648
+ ? null
1649
+ : surfaceTitle;
1650
+ }, ...(ngDevMode ? [{ debugName: "contextLabel" }] : /* istanbul ignore next */ []));
1651
+ hasContextEyebrow = computed(() => {
1652
+ const res = this.resolution();
1653
+ return Boolean((res?.icon && res.icon.trim().length > 0) ||
1654
+ this.contextLabel() ||
1655
+ this.headerKeyBadgeText());
1656
+ }, ...(ngDevMode ? [{ debugName: "hasContextEyebrow" }] : /* istanbul ignore next */ []));
1657
+ safeAvatarUrl = computed(() => {
1658
+ const res = this.resolution();
1659
+ const rawCandidate = res?.avatarUrl ??
1660
+ (typeof res?.identity?.avatar?.value === 'string'
1661
+ ? res.identity.avatar.value
1662
+ : null);
1663
+ if (typeof rawCandidate !== 'string') {
1664
+ return null;
1665
+ }
1666
+ const candidate = rawCandidate.trim();
1667
+ if (!candidate || this.failedAvatarUrl() === candidate) {
1668
+ return null;
1669
+ }
1670
+ if (candidate.startsWith('https://') ||
1671
+ candidate.startsWith('http://') ||
1672
+ (candidate.startsWith('/') && !candidate.startsWith('//'))) {
1673
+ return candidate;
1674
+ }
1675
+ return null;
1676
+ }, ...(ngDevMode ? [{ debugName: "safeAvatarUrl" }] : /* istanbul ignore next */ []));
1677
+ onAvatarError(failedUrl) {
1678
+ this.failedAvatarUrl.set(failedUrl);
1679
+ }
1680
+ closeAriaLabel = computed(() => this.translate('quickView.closeAriaLabel', 'Fechar visualização rápida'), ...(ngDevMode ? [{ debugName: "closeAriaLabel" }] : /* istanbul ignore next */ []));
1681
+ copyButtonLabel = computed(() => this.translate('quickView.copyAction', 'Copiar'), ...(ngDevMode ? [{ debugName: "copyButtonLabel" }] : /* istanbul ignore next */ []));
1682
+ copiedLabel = computed(() => this.translate('quickView.copiedFeedback', 'Copiado'), ...(ngDevMode ? [{ debugName: "copiedLabel" }] : /* istanbul ignore next */ []));
1683
+ copySummaryLabel = computed(() => this.translate('quickView.copySummaryAction', 'Copiar resumo'), ...(ngDevMode ? [{ debugName: "copySummaryLabel" }] : /* istanbul ignore next */ []));
1684
+ summaryCopiedLabel = computed(() => this.translate('quickView.summaryCopiedFeedback', 'Resumo copiado'), ...(ngDevMode ? [{ debugName: "summaryCopiedLabel" }] : /* istanbul ignore next */ []));
1685
+ emptyStateLabel = computed(() => this.translate('quickView.emptyAttributes', 'Nenhum atributo resumido está disponível para este registro.'), ...(ngDevMode ? [{ debugName: "emptyStateLabel" }] : /* istanbul ignore next */ []));
1686
+ unavailableStateLabel = computed(() => this.translate('quickView.unavailableContext', 'Este resumo não está disponível para o seu contexto atual.'), ...(ngDevMode ? [{ debugName: "unavailableStateLabel" }] : /* istanbul ignore next */ []));
1687
+ errorStateLabel = computed(() => this.translate('quickView.loadError', 'Não foi possível carregar o resumo deste registro.'), ...(ngDevMode ? [{ debugName: "errorStateLabel" }] : /* istanbul ignore next */ []));
1688
+ defaultCtaLabel = computed(() => this.translate('quickView.openDetail', 'Abrir detalhe'), ...(ngDevMode ? [{ debugName: "defaultCtaLabel" }] : /* istanbul ignore next */ []));
1689
+ contextualActionsAriaLabel = computed(() => this.translate('quickView.contextualActionsAriaLabel', 'Ações rápidas do registro'), ...(ngDevMode ? [{ debugName: "contextualActionsAriaLabel" }] : /* istanbul ignore next */ []));
1690
+ maskedBadgeLabel = computed(() => this.translate('quickView.maskedBadge', 'LGPD'), ...(ngDevMode ? [{ debugName: "maskedBadgeLabel" }] : /* istanbul ignore next */ []));
1691
+ maskedFieldReasonLabel = computed(() => this.translate('quickView.maskedFieldReason', 'Dado protegido por política de governança / LGPD'), ...(ngDevMode ? [{ debugName: "maskedFieldReasonLabel" }] : /* istanbul ignore next */ []));
1692
+ accessibleLabel = computed(() => {
1693
+ const res = this.resolution();
1694
+ const identityTitle = String(res?.identity?.title?.value ?? res?.identity?.displayLabel ?? '').trim();
1695
+ return (identityTitle ||
1696
+ res?.title ||
1697
+ this.translate('quickView.dialogAriaLabel', 'Visualização rápida do registro'));
1698
+ }, ...(ngDevMode ? [{ debugName: "accessibleLabel" }] : /* istanbul ignore next */ []));
1699
+ translate(key, fallback) {
1700
+ if (!this.i18n) {
1701
+ return fallback;
1702
+ }
1703
+ const translated = this.i18n.t(key, undefined, fallback);
1704
+ return typeof translated === 'string' && translated.trim().length > 0
1705
+ ? translated
1706
+ : fallback;
1707
+ }
1708
+ shouldUseCustomBodyRenderer = computed(() => {
1709
+ const res = this.resolution();
1710
+ const renderer = this.bodyRenderer();
1711
+ return Boolean(res?.state === 'ready' && renderer && res.binding.contentRef);
1712
+ }, ...(ngDevMode ? [{ debugName: "shouldUseCustomBodyRenderer" }] : /* istanbul ignore next */ []));
1713
+ customBodyInputs = computed(() => {
1714
+ const res = this.resolution();
1715
+ const renderer = this.bodyRenderer();
1716
+ if (!res || !renderer) {
1717
+ return {};
1718
+ }
1719
+ return renderer.buildInputs({
1720
+ resolution: res,
1721
+ onOpenDetail: () => this.openDetail.emit(),
1722
+ onOpenSurface: (surfaceId) => this.openSurface.emit(surfaceId),
1723
+ onCopyValue: (value, field) => this.copyValue.emit({ value, field }),
1724
+ onDismiss: () => this.dismiss.emit('programmatic'),
1725
+ });
1726
+ }, ...(ngDevMode ? [{ debugName: "customBodyInputs" }] : /* istanbul ignore next */ []));
1727
+ unmaskedCopyableItems = computed(() => this.summaryItems().filter((item) => Boolean(item.copyable && !item.masked && item.formattedValue?.trim())), ...(ngDevMode ? [{ debugName: "unmaskedCopyableItems" }] : /* istanbul ignore next */ []));
1728
+ canCopySummary = computed(() => !this.shouldUseCustomBodyRenderer() &&
1729
+ this.unmaskedCopyableItems().length > 0, ...(ngDevMode ? [{ debugName: "canCopySummary" }] : /* istanbul ignore next */ []));
1730
+ summaryClipboardText = computed(() => {
1731
+ const res = this.resolution();
1732
+ const items = this.unmaskedCopyableItems();
1733
+ if (!res || items.length === 0) {
1734
+ return '';
1735
+ }
1736
+ const lines = [];
1737
+ const context = this.contextLabel();
1738
+ const rawKey = String(res.identity?.key?.value ?? '').trim();
1739
+ const rawTitle = String(res.identity?.title?.value ?? res.title ?? '').trim();
1740
+ const isTitleMasked = rawTitle.includes('••') || rawTitle.includes('**');
1741
+ const safeTitle = isTitleMasked ? '' : rawTitle;
1742
+ const isKeyMasked = rawKey.includes('••') || rawKey.includes('**');
1743
+ const safeKey = isKeyMasked ? '' : rawKey;
1744
+ let headerLine = safeTitle;
1745
+ if (safeKey && safeTitle && safeKey !== safeTitle) {
1746
+ headerLine = `${safeTitle} (#${safeKey})`;
1747
+ }
1748
+ else if (safeKey && !safeTitle) {
1749
+ headerLine = `#${safeKey}`;
1750
+ }
1751
+ if (context && headerLine) {
1752
+ headerLine = `[${context}] ${headerLine}`;
1753
+ }
1754
+ else if (context) {
1755
+ headerLine = `[${context}]`;
1756
+ }
1757
+ if (headerLine) {
1758
+ lines.push(headerLine);
1759
+ }
1760
+ const subtitle = String(res.subtitle ?? '').trim();
1761
+ if (subtitle &&
1762
+ subtitle !== safeTitle &&
1763
+ !subtitle.includes('••') &&
1764
+ !subtitle.includes('**')) {
1765
+ lines.push(subtitle);
1766
+ }
1767
+ for (const item of items) {
1768
+ lines.push(`• ${item.label}: ${item.formattedValue}`);
1769
+ }
1770
+ return lines.join('\n');
1771
+ }, ...(ngDevMode ? [{ debugName: "summaryClipboardText" }] : /* istanbul ignore next */ []));
1772
+ focusInteractiveEntry() {
1773
+ const target = this.ctaButton?.nativeElement ??
1774
+ this.closeButton?.nativeElement ??
1775
+ this.dialogSurface?.nativeElement;
1776
+ if (target && typeof target.focus === 'function') {
1777
+ try {
1778
+ target.focus({ preventScroll: true });
1779
+ }
1780
+ catch {
1781
+ try {
1782
+ target.focus();
1783
+ }
1784
+ catch { }
1785
+ }
1786
+ }
1787
+ }
1788
+ isBadgeOrChip(item) {
1789
+ if (item.masked) {
1790
+ return false;
1791
+ }
1792
+ const presenter = item.presentation?.presenter;
1793
+ return (presenter === 'badge' ||
1794
+ presenter === 'chip' ||
1795
+ presenter === 'status' ||
1796
+ Boolean(item.tone && item.tone !== 'neutral'));
1797
+ }
1798
+ onCopyItem(item) {
1799
+ if (!item.formattedValue || item.masked) {
1800
+ return;
1801
+ }
1802
+ this.markCopiedField(item.field);
1803
+ this.copyValue.emit({
1804
+ value: item.formattedValue,
1805
+ field: item.field,
1806
+ });
1807
+ }
1808
+ onCopySummary() {
1809
+ const summaryText = this.summaryClipboardText();
1810
+ if (!summaryText) {
1811
+ return;
1812
+ }
1813
+ this.markCopiedField('__summary__');
1814
+ this.copyValue.emit({
1815
+ value: summaryText,
1816
+ field: '__summary__',
1817
+ });
1818
+ }
1819
+ markCopiedField(field) {
1820
+ this.copiedField.set(field);
1821
+ if (this.copiedFeedbackTimer !== null) {
1822
+ clearTimeout(this.copiedFeedbackTimer);
1823
+ }
1824
+ this.copiedFeedbackTimer = setTimeout(() => {
1825
+ if (this.copiedField() === field) {
1826
+ this.copiedField.set(null);
1827
+ }
1828
+ this.copiedFeedbackTimer = null;
1829
+ }, 1800);
1830
+ }
1831
+ ngOnDestroy() {
1832
+ if (this.copiedFeedbackTimer !== null) {
1833
+ clearTimeout(this.copiedFeedbackTimer);
1834
+ this.copiedFeedbackTimer = null;
1835
+ }
1836
+ }
1837
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PraxisQuickViewOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1838
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: PraxisQuickViewOverlayComponent, isStandalone: true, selector: "praxis-quick-view-overlay", outputs: { pointerEnter: "pointerEnter", pointerLeave: "pointerLeave", openDetail: "openDetail", openSurface: "openSurface", copyValue: "copyValue", dismiss: "dismiss" }, viewQueries: [{ propertyName: "dialogSurface", first: true, predicate: ["dialogSurface"], descendants: true }, { propertyName: "ctaButton", first: true, predicate: ["ctaButton"], descendants: true }, { propertyName: "closeButton", first: true, predicate: ["closeButton"], descendants: true }], ngImport: i0, template: `
1839
+ <section
1840
+ #dialogSurface
1841
+ class="pdx-quick-view"
1842
+ [class.pdx-quick-view--narrow]="narrowModalMode()"
1843
+ role="dialog"
1844
+ [attr.aria-modal]="narrowModalMode() ? 'true' : null"
1845
+ [attr.aria-label]="accessibleLabel()"
1846
+ [attr.aria-busy]="resolution()?.state === 'loading' ? 'true' : null"
1847
+ [attr.data-quick-view-state]="resolution()?.state || 'idle'"
1848
+ tabindex="-1"
1849
+ (mouseenter)="pointerEnter.emit()"
1850
+ (mouseleave)="pointerLeave.emit()"
1851
+ >
1852
+ <header class="pdx-quick-view__header">
1853
+ @if (safeAvatarUrl(); as avatarSrc) {
1854
+ <div class="pdx-quick-view__avatar-wrap" data-testid="quick-view-avatar">
1855
+ <img
1856
+ class="pdx-quick-view__avatar-img"
1857
+ [src]="avatarSrc"
1858
+ alt=""
1859
+ loading="lazy"
1860
+ (error)="onAvatarError(avatarSrc)"
1861
+ />
1862
+ </div>
1863
+ }
1864
+ <div class="pdx-quick-view__heading">
1865
+ @if (hasContextEyebrow()) {
1866
+ <div class="pdx-quick-view__context" data-testid="quick-view-context">
1867
+ @if (resolution()?.icon; as iconName) {
1868
+ <span class="pdx-quick-view__context-icon-badge" aria-hidden="true">
1869
+ <mat-icon
1870
+ class="pdx-quick-view__context-icon"
1871
+ [praxisIcon]="iconName"
1872
+ ></mat-icon>
1873
+ </span>
1874
+ }
1875
+ @if (contextLabel(); as label) {
1876
+ <span class="pdx-quick-view__context-label">{{ label }}</span>
1877
+ }
1878
+ @if (headerKeyBadgeText(); as keyBadge) {
1879
+ <span
1880
+ class="pdx-quick-view__context-key"
1881
+ data-testid="quick-view-key-badge"
1882
+ [attr.title]="headerKeyTooltip()"
1883
+ >
1884
+ {{ keyBadge }}
1885
+ </span>
1886
+ }
1887
+ </div>
1888
+ }
1889
+ @if (headerIdentity(); as identity) {
1890
+ <praxis-resource-identity
1891
+ [identity]="identity"
1892
+ [emptyTitle]="resolution()?.title || ''"
1893
+ density="compact"
1894
+ [showKey]="false"
1895
+ [showMetadataLabels]="false"
1896
+ />
1897
+ } @else {
1898
+ <h2 class="pdx-quick-view__title">{{ resolution()?.title }}</h2>
1899
+ }
1900
+ @if (resolution()?.subtitle; as subtitle) {
1901
+ <p class="pdx-quick-view__subtitle">{{ subtitle }}</p>
1902
+ }
1903
+ </div>
1904
+ <button
1905
+ #closeButton
1906
+ type="button"
1907
+ class="pdx-quick-view__close"
1908
+ [attr.aria-label]="closeAriaLabel()"
1909
+ (click)="dismiss.emit('programmatic')"
1910
+ >
1911
+ ×
1912
+ </button>
1913
+ </header>
1914
+
1915
+ <div class="pdx-quick-view__body">
1916
+ @switch (resolution()?.state) {
1917
+ @case ('loading') {
1918
+ <div class="pdx-quick-view__skeleton" data-testid="quick-view-loading">
1919
+ <div class="pdx-quick-view__skeleton-line pdx-quick-view__skeleton-line--wide"></div>
1920
+ <div class="pdx-quick-view__skeleton-line"></div>
1921
+ <div class="pdx-quick-view__skeleton-line pdx-quick-view__skeleton-line--short"></div>
1922
+ </div>
1923
+ }
1924
+ @case ('ready') {
1925
+ @if (shouldUseCustomBodyRenderer()) {
1926
+ <ng-container
1927
+ *ngComponentOutlet="
1928
+ bodyRenderer()!.component;
1929
+ inputs: customBodyInputs()
1930
+ "
1931
+ />
1932
+ } @else {
1933
+ @if (summaryItems().length > 0) {
1934
+ <dl class="pdx-quick-view__summary-list" data-testid="quick-view-summary-list">
1935
+ @for (item of summaryItems(); track item.field) {
1936
+ <div class="pdx-quick-view__summary-item">
1937
+ <dt class="pdx-quick-view__summary-label">
1938
+ @if (item.icon; as itemIcon) {
1939
+ <mat-icon
1940
+ class="pdx-quick-view__summary-label-icon"
1941
+ data-testid="quick-view-summary-item-icon"
1942
+ [praxisIcon]="itemIcon"
1943
+ aria-hidden="true"
1944
+ ></mat-icon>
1945
+ }
1946
+ <span class="pdx-quick-view__summary-label-text">{{ item.label }}</span>
1947
+ </dt>
1948
+ <dd class="pdx-quick-view__summary-value-wrap">
1949
+ <span
1950
+ class="pdx-quick-view__summary-value"
1951
+ [class.pdx-quick-view__summary-value--badge]="isBadgeOrChip(item)"
1952
+ [class.pdx-quick-view__summary-value--masked]="item.masked"
1953
+ [attr.data-tone]="item.tone || null"
1954
+ [attr.title]="(item.masked ? (item.maskReason || maskedFieldReasonLabel()) : item.formattedValue) || null"
1955
+ >
1956
+ {{ item.formattedValue }}
1957
+ </span>
1958
+ @if (item.masked) {
1959
+ <span
1960
+ class="pdx-quick-view__masked-badge"
1961
+ data-testid="quick-view-masked-indicator"
1962
+ role="note"
1963
+ [attr.title]="item.maskReason || maskedFieldReasonLabel()"
1964
+ [attr.aria-label]="item.maskReason || maskedFieldReasonLabel()"
1965
+ >
1966
+ <svg
1967
+ class="pdx-quick-view__masked-icon"
1968
+ viewBox="0 0 16 16"
1969
+ fill="none"
1970
+ stroke="currentColor"
1971
+ stroke-width="1.5"
1972
+ aria-hidden="true"
1973
+ >
1974
+ <rect x="3.5" y="7" width="9" height="6.5" rx="1.5" />
1975
+ <path d="M5.5 7V5a2.5 2.5 0 0 1 5 0v2" />
1976
+ </svg>
1977
+ <span>{{ maskedBadgeLabel() }}</span>
1978
+ </span>
1979
+ }
1980
+ @if (item.copyable && !item.masked && item.formattedValue) {
1981
+ <button
1982
+ type="button"
1983
+ class="pdx-quick-view__copy-btn"
1984
+ [attr.data-copied]="copiedField() === item.field ? 'true' : null"
1985
+ [attr.title]="(copiedField() === item.field ? copiedLabel() : copyButtonLabel()) + ' ' + item.label"
1986
+ [attr.aria-label]="copyButtonLabel() + ' ' + item.label"
1987
+ (click)="onCopyItem(item)"
1988
+ >
1989
+ @if (copiedField() === item.field) {
1990
+ <svg
1991
+ class="pdx-quick-view__copy-icon"
1992
+ viewBox="0 0 16 16"
1993
+ fill="none"
1994
+ stroke="currentColor"
1995
+ stroke-width="1.8"
1996
+ stroke-linecap="round"
1997
+ stroke-linejoin="round"
1998
+ aria-hidden="true"
1999
+ >
2000
+ <path d="M3.5 8.5L6.5 11.5L12.5 4.5" />
2001
+ </svg>
2002
+ } @else {
2003
+ <svg
2004
+ class="pdx-quick-view__copy-icon"
2005
+ viewBox="0 0 16 16"
2006
+ fill="none"
2007
+ stroke="currentColor"
2008
+ stroke-width="1.5"
2009
+ stroke-linecap="round"
2010
+ stroke-linejoin="round"
2011
+ aria-hidden="true"
2012
+ >
2013
+ <rect x="5.5" y="5.5" width="8" height="8" rx="1.5" />
2014
+ <path d="M3.5 10.5H3a1.5 1.5 0 0 1-1.5-1.5V3A1.5 1.5 0 0 1 3 1.5h6A1.5 1.5 0 0 1 10.5 3v.5" />
2015
+ </svg>
2016
+ }
2017
+ <span class="pdx-quick-view__sr-only">
2018
+ {{ copiedField() === item.field ? copiedLabel() : copyButtonLabel() }}
2019
+ </span>
2020
+ </button>
2021
+ }
2022
+ </dd>
2023
+ </div>
2024
+ }
2025
+ </dl>
2026
+ }
2027
+ }
2028
+ }
2029
+ @case ('empty') {
2030
+ <p class="pdx-quick-view__feedback pdx-quick-view__feedback--empty" data-testid="quick-view-empty">
2031
+ {{ resolution()?.failureReason || emptyStateLabel() }}
2032
+ </p>
2033
+ }
2034
+ @case ('unavailable') {
2035
+ <p class="pdx-quick-view__feedback pdx-quick-view__feedback--unavailable" data-testid="quick-view-unavailable">
2036
+ {{ resolution()?.failureReason || unavailableStateLabel() }}
2037
+ </p>
2038
+ }
2039
+ @case ('error') {
2040
+ <p class="pdx-quick-view__feedback pdx-quick-view__feedback--error" data-testid="quick-view-error">
2041
+ {{ resolution()?.failureReason || errorStateLabel() }}
2042
+ </p>
2043
+ }
2044
+ }
2045
+ </div>
2046
+
2047
+ @if (resolution()?.state === 'ready' && contextualActions().length > 0) {
2048
+ <div
2049
+ class="pdx-quick-view__contextual-actions"
2050
+ data-testid="quick-view-contextual-actions"
2051
+ role="group"
2052
+ [attr.aria-label]="contextualActionsAriaLabel()"
2053
+ >
2054
+ @for (action of contextualActions(); track action.surfaceId) {
2055
+ <button
2056
+ type="button"
2057
+ class="pdx-quick-view__contextual-btn"
2058
+ [attr.data-surface-id]="action.surfaceId"
2059
+ [attr.data-surface-kind]="action.kind || null"
2060
+ [attr.title]="action.description || action.title"
2061
+ (click)="openSurface.emit(action.surfaceId)"
2062
+ >
2063
+ @if (action.icon; as actionIcon) {
2064
+ <mat-icon
2065
+ class="pdx-quick-view__contextual-icon"
2066
+ [praxisIcon]="actionIcon"
2067
+ aria-hidden="true"
2068
+ ></mat-icon>
2069
+ }
2070
+ <span class="pdx-quick-view__contextual-label">{{ action.title }}</span>
2071
+ </button>
2072
+ }
2073
+ </div>
2074
+ }
2075
+
2076
+ @if (resolution()?.state === 'ready' && (resolution()?.ctaAvailable || canCopySummary())) {
2077
+ <footer class="pdx-quick-view__footer">
2078
+ @if (canCopySummary()) {
2079
+ <button
2080
+ type="button"
2081
+ class="pdx-quick-view__copy-summary-btn"
2082
+ data-testid="quick-view-copy-summary"
2083
+ [attr.data-copied]="copiedField() === '__summary__' ? 'true' : null"
2084
+ [attr.aria-label]="copiedField() === '__summary__' ? summaryCopiedLabel() : copySummaryLabel()"
2085
+ (click)="onCopySummary()"
2086
+ >
2087
+ @if (copiedField() === '__summary__') {
2088
+ <svg
2089
+ class="pdx-quick-view__copy-icon"
2090
+ viewBox="0 0 16 16"
2091
+ fill="none"
2092
+ stroke="currentColor"
2093
+ stroke-width="1.8"
2094
+ stroke-linecap="round"
2095
+ stroke-linejoin="round"
2096
+ aria-hidden="true"
2097
+ >
2098
+ <path d="M3.5 8.5L6.5 11.5L12.5 4.5" />
2099
+ </svg>
2100
+ } @else {
2101
+ <svg
2102
+ class="pdx-quick-view__copy-icon"
2103
+ viewBox="0 0 16 16"
2104
+ fill="none"
2105
+ stroke="currentColor"
2106
+ stroke-width="1.5"
2107
+ stroke-linecap="round"
2108
+ stroke-linejoin="round"
2109
+ aria-hidden="true"
2110
+ >
2111
+ <rect x="5.5" y="5.5" width="8" height="8" rx="1.5" />
2112
+ <path d="M3.5 10.5H3a1.5 1.5 0 0 1-1.5-1.5V3A1.5 1.5 0 0 1 3 1.5h6A1.5 1.5 0 0 1 10.5 3v.5" />
2113
+ </svg>
2114
+ }
2115
+ <span>{{ copiedField() === '__summary__' ? summaryCopiedLabel() : copySummaryLabel() }}</span>
2116
+ </button>
2117
+ }
2118
+ @if (resolution()?.ctaAvailable) {
2119
+ <button
2120
+ #ctaButton
2121
+ type="button"
2122
+ class="pdx-quick-view__cta"
2123
+ data-testid="quick-view-open-detail"
2124
+ (click)="openDetail.emit()"
2125
+ >
2126
+ {{ resolution()?.ctaLabel || defaultCtaLabel() }}
2127
+ </button>
2128
+ }
2129
+ </footer>
2130
+ }
2131
+ </section>
2132
+ `, isInline: true, styles: [":host{display:block;max-width:min(26rem,calc(100vw - 1.5rem));min-width:min(20rem,calc(100vw - 1.5rem));box-sizing:border-box}.pdx-quick-view{box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr);gap:.625rem;padding:.875rem 1rem;border-radius:var(--pdx-quick-view-radius, .75rem);background:var( --pdx-quick-view-bg, var(--md-sys-color-surface-container-high, var(--mat-sys-surface-container-high)) );color:var(--md-sys-color-on-surface, var(--mat-sys-on-surface));border:1px solid color-mix(in srgb,var(--md-sys-color-outline, var(--mat-sys-outline)) 36%,var(--md-sys-color-outline-variant, var(--mat-sys-outline-variant)));box-shadow:var( --pdx-quick-view-shadow, 0 18px 38px -6px color-mix(in srgb, var(--md-sys-color-shadow, #000000) 32%, transparent), 0 6px 16px -4px color-mix(in srgb, var(--md-sys-color-shadow, #000000) 18%, transparent) );outline:none;overflow:hidden}.pdx-quick-view--narrow{width:calc(100vw - 1.5rem);max-width:28rem;border-radius:var(--pdx-quick-view-narrow-radius, 1rem);padding:.75rem 1rem 1rem}.pdx-quick-view--narrow:before{content:\"\";display:block;width:2.25rem;height:.25rem;margin:0 auto .25rem;border-radius:999px;background:color-mix(in srgb,var(--md-sys-color-on-surface-variant, var(--mat-sys-on-surface-variant)) 32%,transparent)}.pdx-quick-view__header{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem;min-width:0;padding-bottom:.5rem;border-bottom:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, var(--mat-sys-outline-variant)) 55%,transparent)}.pdx-quick-view__avatar-wrap{flex:0 0 auto;width:2.5rem;height:2.5rem;border-radius:999px;overflow:hidden;background:color-mix(in srgb,var(--md-sys-color-primary, var(--mat-sys-primary)) 12%,transparent);border:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, var(--mat-sys-outline-variant)) 60%,transparent);display:inline-flex;align-items:center;justify-content:center}.pdx-quick-view__avatar-img{width:100%;height:100%;object-fit:cover;display:block}.pdx-quick-view__heading{min-width:0;flex:1 1 auto;display:grid;gap:.1875rem}.pdx-quick-view__heading praxis-resource-identity{--pdx-resource-identity-title-font: 700 1.03125rem/1.32 var(--md-sys-typescale-title-medium-font-family, inherit);--pdx-resource-identity-title-wrap: normal}.pdx-quick-view__context{display:inline-flex;align-items:center;flex-wrap:wrap;gap:.375rem;min-width:0;margin-bottom:.125rem}.pdx-quick-view__context-icon-badge{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;border-radius:.3125rem;background:color-mix(in srgb,var(--md-sys-color-primary, var(--mat-sys-primary)) 14%,transparent);color:var(--md-sys-color-primary, var(--mat-sys-primary))}.pdx-quick-view__context-icon{width:.875rem;height:.875rem;font-size:.875rem;line-height:1}.pdx-quick-view__context-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.6875rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--md-sys-color-primary, var(--mat-sys-primary))}.pdx-quick-view__context-key{flex:0 0 auto;display:inline-flex;align-items:center;padding:.0625rem .4375rem;border-radius:999px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.6875rem;font-weight:700;line-height:1.25;letter-spacing:.02em;background:color-mix(in srgb,var(--md-sys-color-primary, var(--mat-sys-primary)) 12%,transparent);color:var(--md-sys-color-primary, var(--mat-sys-primary));border:1px solid color-mix(in srgb,var(--md-sys-color-primary, var(--mat-sys-primary)) 26%,transparent)}.pdx-quick-view__title{margin:0;font-size:1.03125rem;font-weight:700;line-height:1.32;color:var(--md-sys-color-on-surface, var(--mat-sys-on-surface));overflow-wrap:anywhere}.pdx-quick-view__subtitle{margin:.0625rem 0 0;font-size:.8125rem;font-weight:500;line-height:1.35;color:var(--md-sys-color-on-surface-variant, var(--mat-sys-on-surface-variant))}.pdx-quick-view__close{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;border:none;border-radius:.375rem;background:transparent;color:var(--md-sys-color-on-surface-variant, var(--mat-sys-on-surface-variant));font-size:1.125rem;line-height:1;cursor:pointer;transition:background-color .14s ease,color .14s ease}.pdx-quick-view__close:hover{background:color-mix(in srgb,var(--md-sys-color-on-surface, var(--mat-sys-on-surface)) 8%,transparent);color:var(--md-sys-color-on-surface, var(--mat-sys-on-surface))}.pdx-quick-view__close:focus-visible{outline:2px solid var(--md-sys-color-primary, var(--mat-sys-primary));outline-offset:2px;background:color-mix(in srgb,var(--md-sys-color-on-surface, var(--mat-sys-on-surface)) 8%,transparent);color:var(--md-sys-color-on-surface, var(--mat-sys-on-surface))}.pdx-quick-view__body{min-width:0}.pdx-quick-view__summary-list{margin:0;display:grid;grid-template-columns:minmax(0,1fr);gap:.4375rem;min-width:0}.pdx-quick-view__summary-item{display:flex;align-items:center;justify-content:space-between;gap:.625rem;min-width:0;font-size:.8125rem;line-height:1.35}.pdx-quick-view__summary-label{color:var(--md-sys-color-on-surface-variant, var(--mat-sys-on-surface-variant));font-weight:500;flex:0 0 auto;max-width:44%;display:inline-flex;align-items:center;gap:.3125rem;overflow-wrap:anywhere}.pdx-quick-view__summary-label-icon{flex:0 0 auto;width:.875rem;height:.875rem;font-size:.875rem;line-height:1;opacity:.78}.pdx-quick-view__summary-label-text{min-width:0}.pdx-quick-view__summary-value-wrap{margin:0;flex:1 1 auto;display:inline-flex;align-items:center;justify-content:flex-end;gap:.375rem;min-width:0;text-align:right}.pdx-quick-view__summary-value{min-width:0;color:var(--md-sys-color-on-surface, var(--mat-sys-on-surface));font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pdx-quick-view__summary-value--badge{padding:.125rem .5rem;border-radius:999px;background:color-mix(in srgb,var(--md-sys-color-primary, var(--mat-sys-primary)) 14%,transparent);color:var(--md-sys-color-primary, var(--mat-sys-primary));font-size:.75rem;font-weight:600}.pdx-quick-view__summary-value--badge[data-tone=success]{background:color-mix(in srgb,#16a34a 15%,transparent);color:#15803d}.pdx-quick-view__summary-value--badge[data-tone=warning]{background:color-mix(in srgb,#d97706 16%,transparent);color:#b45309}.pdx-quick-view__summary-value--badge[data-tone=danger],.pdx-quick-view__summary-value--badge[data-tone=error]{background:color-mix(in srgb,var(--md-sys-color-error, var(--mat-sys-error, #dc2626)) 15%,transparent);color:var(--md-sys-color-error, var(--mat-sys-error, #dc2626))}.pdx-quick-view__summary-value--masked{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;letter-spacing:.04em;color:var(--md-sys-color-on-surface-variant, var(--mat-sys-on-surface-variant))}.pdx-quick-view__masked-badge{display:inline-flex;align-items:center;gap:.25rem;flex:0 0 auto;padding:.0625rem .375rem;border-radius:999px;border:1px solid color-mix(in srgb,var(--md-sys-color-tertiary, var(--mat-sys-tertiary, #d97706)) 42%,transparent);background:color-mix(in srgb,var(--md-sys-color-tertiary, var(--mat-sys-tertiary, #d97706)) 12%,transparent);color:var(--md-sys-color-tertiary, var(--mat-sys-tertiary, #d97706));font-size:.6875rem;font-weight:600;line-height:1.2}.pdx-quick-view__masked-icon{width:.75rem;height:.75rem;flex:0 0 auto}.pdx-quick-view__copy-btn{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;padding:0;border:1px solid transparent;background:transparent;color:var(--md-sys-color-on-surface-variant, var(--mat-sys-on-surface-variant));border-radius:.3125rem;opacity:0;cursor:pointer;transition:opacity .14s ease,background-color .14s ease,color .14s ease,border-color .14s ease}.pdx-quick-view--narrow .pdx-quick-view__copy-btn,.pdx-quick-view__summary-item:hover .pdx-quick-view__copy-btn,.pdx-quick-view__summary-item:focus-within .pdx-quick-view__copy-btn,.pdx-quick-view__copy-btn:focus-visible,.pdx-quick-view__copy-btn[data-copied=true]{opacity:1}.pdx-quick-view__copy-btn:hover{background:color-mix(in srgb,var(--md-sys-color-primary, var(--mat-sys-primary)) 12%,transparent);color:var(--md-sys-color-primary, var(--mat-sys-primary));border-color:color-mix(in srgb,var(--md-sys-color-primary, var(--mat-sys-primary)) 35%,transparent)}.pdx-quick-view__copy-btn[data-copied=true]{background:color-mix(in srgb,#16a34a 15%,transparent);color:#15803d;border-color:color-mix(in srgb,#16a34a 38%,transparent)}.pdx-quick-view__copy-btn:focus-visible{outline:2px solid var(--md-sys-color-primary, var(--mat-sys-primary));outline-offset:2px}.pdx-quick-view__copy-icon{width:.875rem;height:.875rem;flex:0 0 auto}.pdx-quick-view__sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.pdx-quick-view__feedback{margin:0;font-size:.8125rem;line-height:1.4;color:var(--md-sys-color-on-surface-variant, var(--mat-sys-on-surface-variant))}.pdx-quick-view__feedback--error{color:var(--md-sys-color-error, var(--mat-sys-error))}.pdx-quick-view__skeleton{display:grid;gap:.4375rem;padding:.125rem 0}.pdx-quick-view__skeleton-line{height:.75rem;border-radius:.25rem;background:color-mix(in srgb,var(--md-sys-color-on-surface, var(--mat-sys-on-surface)) 12%,transparent);width:75%}.pdx-quick-view__skeleton-line--wide{width:92%}.pdx-quick-view__skeleton-line--short{width:52%}.pdx-quick-view__contextual-actions{display:flex;align-items:center;flex-wrap:wrap;gap:.375rem;padding-top:.4375rem;border-top:1px dashed color-mix(in srgb,var(--md-sys-color-outline-variant, var(--mat-sys-outline-variant)) 60%,transparent)}.pdx-quick-view__contextual-btn{display:inline-flex;align-items:center;gap:.25rem;min-width:0;max-width:100%;padding:.25rem .5625rem;border-radius:999px;border:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, var(--mat-sys-outline-variant)) 85%,transparent);background:color-mix(in srgb,var(--md-sys-color-surface-container, var(--mat-sys-surface-container)) 78%,transparent);color:var(--md-sys-color-on-surface, var(--mat-sys-on-surface));font-size:.71875rem;font-weight:600;line-height:1.25;cursor:pointer;transition:background-color .14s ease,color .14s ease,border-color .14s ease}.pdx-quick-view__contextual-btn:hover{background:color-mix(in srgb,var(--md-sys-color-primary, var(--mat-sys-primary)) 12%,transparent);color:var(--md-sys-color-primary, var(--mat-sys-primary));border-color:color-mix(in srgb,var(--md-sys-color-primary, var(--mat-sys-primary)) 40%,transparent)}.pdx-quick-view__contextual-btn:focus-visible{outline:2px solid var(--md-sys-color-primary, var(--mat-sys-primary));outline-offset:2px}.pdx-quick-view__contextual-icon{flex:0 0 auto;width:.8125rem;height:.8125rem;font-size:.8125rem;line-height:1}.pdx-quick-view__contextual-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pdx-quick-view__footer{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding-top:.5rem;border-top:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, var(--mat-sys-outline-variant)) 65%,transparent)}.pdx-quick-view__copy-summary-btn{display:inline-flex;align-items:center;justify-content:center;gap:.375rem;padding:.3125rem .625rem;border-radius:.375rem;border:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, var(--mat-sys-outline-variant)) 80%,transparent);background:color-mix(in srgb,var(--md-sys-color-surface-container, var(--mat-sys-surface-container)) 70%,transparent);color:var(--md-sys-color-on-surface-variant, var(--mat-sys-on-surface-variant));font-size:.75rem;font-weight:600;cursor:pointer;transition:background-color .14s ease,color .14s ease,border-color .14s ease}.pdx-quick-view__copy-summary-btn:hover{background:color-mix(in srgb,var(--md-sys-color-primary, var(--mat-sys-primary)) 10%,transparent);color:var(--md-sys-color-primary, var(--mat-sys-primary));border-color:color-mix(in srgb,var(--md-sys-color-primary, var(--mat-sys-primary)) 40%,transparent)}.pdx-quick-view__copy-summary-btn[data-copied=true]{background:color-mix(in srgb,#16a34a 15%,transparent);color:#15803d;border-color:color-mix(in srgb,#16a34a 38%,transparent)}.pdx-quick-view__copy-summary-btn:focus-visible{outline:2px solid var(--md-sys-color-primary, var(--mat-sys-primary));outline-offset:2px}.pdx-quick-view__cta{margin-left:auto;display:inline-flex;align-items:center;justify-content:center;gap:.375rem;padding:.375rem .8125rem;border-radius:.375rem;border:none;background:var(--md-sys-color-primary, var(--mat-sys-primary));color:var(--md-sys-color-on-primary, var(--mat-sys-on-primary));font-size:.8125rem;font-weight:600;cursor:pointer;transition:filter .14s ease,box-shadow .14s ease}.pdx-quick-view__cta:hover{filter:brightness(1.06)}.pdx-quick-view__cta:focus-visible{outline:2px solid var(--md-sys-color-primary, var(--mat-sys-primary));outline-offset:2px}.pdx-quick-view--narrow .pdx-quick-view__footer{flex-wrap:wrap}.pdx-quick-view--narrow .pdx-quick-view__copy-summary-btn,.pdx-quick-view--narrow .pdx-quick-view__cta{flex:1 1 auto;padding:.5rem .875rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }, { kind: "component", type: PraxisResourceIdentityComponent, selector: "praxis-resource-identity", inputs: ["identity", "emptyTitle", "density", "showMetadataLabels", "showKey", "showKeyLabel", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2133
+ }
2134
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PraxisQuickViewOverlayComponent, decorators: [{
2135
+ type: Component,
2136
+ args: [{ selector: 'praxis-quick-view-overlay', standalone: true, imports: [
2137
+ CommonModule,
2138
+ MatIconModule,
2139
+ PraxisIconDirective,
2140
+ PraxisResourceIdentityComponent,
2141
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: `
2142
+ <section
2143
+ #dialogSurface
2144
+ class="pdx-quick-view"
2145
+ [class.pdx-quick-view--narrow]="narrowModalMode()"
2146
+ role="dialog"
2147
+ [attr.aria-modal]="narrowModalMode() ? 'true' : null"
2148
+ [attr.aria-label]="accessibleLabel()"
2149
+ [attr.aria-busy]="resolution()?.state === 'loading' ? 'true' : null"
2150
+ [attr.data-quick-view-state]="resolution()?.state || 'idle'"
2151
+ tabindex="-1"
2152
+ (mouseenter)="pointerEnter.emit()"
2153
+ (mouseleave)="pointerLeave.emit()"
2154
+ >
2155
+ <header class="pdx-quick-view__header">
2156
+ @if (safeAvatarUrl(); as avatarSrc) {
2157
+ <div class="pdx-quick-view__avatar-wrap" data-testid="quick-view-avatar">
2158
+ <img
2159
+ class="pdx-quick-view__avatar-img"
2160
+ [src]="avatarSrc"
2161
+ alt=""
2162
+ loading="lazy"
2163
+ (error)="onAvatarError(avatarSrc)"
2164
+ />
2165
+ </div>
2166
+ }
2167
+ <div class="pdx-quick-view__heading">
2168
+ @if (hasContextEyebrow()) {
2169
+ <div class="pdx-quick-view__context" data-testid="quick-view-context">
2170
+ @if (resolution()?.icon; as iconName) {
2171
+ <span class="pdx-quick-view__context-icon-badge" aria-hidden="true">
2172
+ <mat-icon
2173
+ class="pdx-quick-view__context-icon"
2174
+ [praxisIcon]="iconName"
2175
+ ></mat-icon>
2176
+ </span>
2177
+ }
2178
+ @if (contextLabel(); as label) {
2179
+ <span class="pdx-quick-view__context-label">{{ label }}</span>
2180
+ }
2181
+ @if (headerKeyBadgeText(); as keyBadge) {
2182
+ <span
2183
+ class="pdx-quick-view__context-key"
2184
+ data-testid="quick-view-key-badge"
2185
+ [attr.title]="headerKeyTooltip()"
2186
+ >
2187
+ {{ keyBadge }}
2188
+ </span>
2189
+ }
2190
+ </div>
2191
+ }
2192
+ @if (headerIdentity(); as identity) {
2193
+ <praxis-resource-identity
2194
+ [identity]="identity"
2195
+ [emptyTitle]="resolution()?.title || ''"
2196
+ density="compact"
2197
+ [showKey]="false"
2198
+ [showMetadataLabels]="false"
2199
+ />
2200
+ } @else {
2201
+ <h2 class="pdx-quick-view__title">{{ resolution()?.title }}</h2>
2202
+ }
2203
+ @if (resolution()?.subtitle; as subtitle) {
2204
+ <p class="pdx-quick-view__subtitle">{{ subtitle }}</p>
2205
+ }
2206
+ </div>
2207
+ <button
2208
+ #closeButton
2209
+ type="button"
2210
+ class="pdx-quick-view__close"
2211
+ [attr.aria-label]="closeAriaLabel()"
2212
+ (click)="dismiss.emit('programmatic')"
2213
+ >
2214
+ ×
2215
+ </button>
2216
+ </header>
2217
+
2218
+ <div class="pdx-quick-view__body">
2219
+ @switch (resolution()?.state) {
2220
+ @case ('loading') {
2221
+ <div class="pdx-quick-view__skeleton" data-testid="quick-view-loading">
2222
+ <div class="pdx-quick-view__skeleton-line pdx-quick-view__skeleton-line--wide"></div>
2223
+ <div class="pdx-quick-view__skeleton-line"></div>
2224
+ <div class="pdx-quick-view__skeleton-line pdx-quick-view__skeleton-line--short"></div>
2225
+ </div>
2226
+ }
2227
+ @case ('ready') {
2228
+ @if (shouldUseCustomBodyRenderer()) {
2229
+ <ng-container
2230
+ *ngComponentOutlet="
2231
+ bodyRenderer()!.component;
2232
+ inputs: customBodyInputs()
2233
+ "
2234
+ />
2235
+ } @else {
2236
+ @if (summaryItems().length > 0) {
2237
+ <dl class="pdx-quick-view__summary-list" data-testid="quick-view-summary-list">
2238
+ @for (item of summaryItems(); track item.field) {
2239
+ <div class="pdx-quick-view__summary-item">
2240
+ <dt class="pdx-quick-view__summary-label">
2241
+ @if (item.icon; as itemIcon) {
2242
+ <mat-icon
2243
+ class="pdx-quick-view__summary-label-icon"
2244
+ data-testid="quick-view-summary-item-icon"
2245
+ [praxisIcon]="itemIcon"
2246
+ aria-hidden="true"
2247
+ ></mat-icon>
2248
+ }
2249
+ <span class="pdx-quick-view__summary-label-text">{{ item.label }}</span>
2250
+ </dt>
2251
+ <dd class="pdx-quick-view__summary-value-wrap">
2252
+ <span
2253
+ class="pdx-quick-view__summary-value"
2254
+ [class.pdx-quick-view__summary-value--badge]="isBadgeOrChip(item)"
2255
+ [class.pdx-quick-view__summary-value--masked]="item.masked"
2256
+ [attr.data-tone]="item.tone || null"
2257
+ [attr.title]="(item.masked ? (item.maskReason || maskedFieldReasonLabel()) : item.formattedValue) || null"
2258
+ >
2259
+ {{ item.formattedValue }}
2260
+ </span>
2261
+ @if (item.masked) {
2262
+ <span
2263
+ class="pdx-quick-view__masked-badge"
2264
+ data-testid="quick-view-masked-indicator"
2265
+ role="note"
2266
+ [attr.title]="item.maskReason || maskedFieldReasonLabel()"
2267
+ [attr.aria-label]="item.maskReason || maskedFieldReasonLabel()"
2268
+ >
2269
+ <svg
2270
+ class="pdx-quick-view__masked-icon"
2271
+ viewBox="0 0 16 16"
2272
+ fill="none"
2273
+ stroke="currentColor"
2274
+ stroke-width="1.5"
2275
+ aria-hidden="true"
2276
+ >
2277
+ <rect x="3.5" y="7" width="9" height="6.5" rx="1.5" />
2278
+ <path d="M5.5 7V5a2.5 2.5 0 0 1 5 0v2" />
2279
+ </svg>
2280
+ <span>{{ maskedBadgeLabel() }}</span>
2281
+ </span>
2282
+ }
2283
+ @if (item.copyable && !item.masked && item.formattedValue) {
2284
+ <button
2285
+ type="button"
2286
+ class="pdx-quick-view__copy-btn"
2287
+ [attr.data-copied]="copiedField() === item.field ? 'true' : null"
2288
+ [attr.title]="(copiedField() === item.field ? copiedLabel() : copyButtonLabel()) + ' ' + item.label"
2289
+ [attr.aria-label]="copyButtonLabel() + ' ' + item.label"
2290
+ (click)="onCopyItem(item)"
2291
+ >
2292
+ @if (copiedField() === item.field) {
2293
+ <svg
2294
+ class="pdx-quick-view__copy-icon"
2295
+ viewBox="0 0 16 16"
2296
+ fill="none"
2297
+ stroke="currentColor"
2298
+ stroke-width="1.8"
2299
+ stroke-linecap="round"
2300
+ stroke-linejoin="round"
2301
+ aria-hidden="true"
2302
+ >
2303
+ <path d="M3.5 8.5L6.5 11.5L12.5 4.5" />
2304
+ </svg>
2305
+ } @else {
2306
+ <svg
2307
+ class="pdx-quick-view__copy-icon"
2308
+ viewBox="0 0 16 16"
2309
+ fill="none"
2310
+ stroke="currentColor"
2311
+ stroke-width="1.5"
2312
+ stroke-linecap="round"
2313
+ stroke-linejoin="round"
2314
+ aria-hidden="true"
2315
+ >
2316
+ <rect x="5.5" y="5.5" width="8" height="8" rx="1.5" />
2317
+ <path d="M3.5 10.5H3a1.5 1.5 0 0 1-1.5-1.5V3A1.5 1.5 0 0 1 3 1.5h6A1.5 1.5 0 0 1 10.5 3v.5" />
2318
+ </svg>
2319
+ }
2320
+ <span class="pdx-quick-view__sr-only">
2321
+ {{ copiedField() === item.field ? copiedLabel() : copyButtonLabel() }}
2322
+ </span>
2323
+ </button>
2324
+ }
2325
+ </dd>
2326
+ </div>
2327
+ }
2328
+ </dl>
2329
+ }
2330
+ }
2331
+ }
2332
+ @case ('empty') {
2333
+ <p class="pdx-quick-view__feedback pdx-quick-view__feedback--empty" data-testid="quick-view-empty">
2334
+ {{ resolution()?.failureReason || emptyStateLabel() }}
2335
+ </p>
2336
+ }
2337
+ @case ('unavailable') {
2338
+ <p class="pdx-quick-view__feedback pdx-quick-view__feedback--unavailable" data-testid="quick-view-unavailable">
2339
+ {{ resolution()?.failureReason || unavailableStateLabel() }}
2340
+ </p>
2341
+ }
2342
+ @case ('error') {
2343
+ <p class="pdx-quick-view__feedback pdx-quick-view__feedback--error" data-testid="quick-view-error">
2344
+ {{ resolution()?.failureReason || errorStateLabel() }}
2345
+ </p>
2346
+ }
2347
+ }
2348
+ </div>
2349
+
2350
+ @if (resolution()?.state === 'ready' && contextualActions().length > 0) {
2351
+ <div
2352
+ class="pdx-quick-view__contextual-actions"
2353
+ data-testid="quick-view-contextual-actions"
2354
+ role="group"
2355
+ [attr.aria-label]="contextualActionsAriaLabel()"
2356
+ >
2357
+ @for (action of contextualActions(); track action.surfaceId) {
2358
+ <button
2359
+ type="button"
2360
+ class="pdx-quick-view__contextual-btn"
2361
+ [attr.data-surface-id]="action.surfaceId"
2362
+ [attr.data-surface-kind]="action.kind || null"
2363
+ [attr.title]="action.description || action.title"
2364
+ (click)="openSurface.emit(action.surfaceId)"
2365
+ >
2366
+ @if (action.icon; as actionIcon) {
2367
+ <mat-icon
2368
+ class="pdx-quick-view__contextual-icon"
2369
+ [praxisIcon]="actionIcon"
2370
+ aria-hidden="true"
2371
+ ></mat-icon>
2372
+ }
2373
+ <span class="pdx-quick-view__contextual-label">{{ action.title }}</span>
2374
+ </button>
2375
+ }
2376
+ </div>
2377
+ }
2378
+
2379
+ @if (resolution()?.state === 'ready' && (resolution()?.ctaAvailable || canCopySummary())) {
2380
+ <footer class="pdx-quick-view__footer">
2381
+ @if (canCopySummary()) {
2382
+ <button
2383
+ type="button"
2384
+ class="pdx-quick-view__copy-summary-btn"
2385
+ data-testid="quick-view-copy-summary"
2386
+ [attr.data-copied]="copiedField() === '__summary__' ? 'true' : null"
2387
+ [attr.aria-label]="copiedField() === '__summary__' ? summaryCopiedLabel() : copySummaryLabel()"
2388
+ (click)="onCopySummary()"
2389
+ >
2390
+ @if (copiedField() === '__summary__') {
2391
+ <svg
2392
+ class="pdx-quick-view__copy-icon"
2393
+ viewBox="0 0 16 16"
2394
+ fill="none"
2395
+ stroke="currentColor"
2396
+ stroke-width="1.8"
2397
+ stroke-linecap="round"
2398
+ stroke-linejoin="round"
2399
+ aria-hidden="true"
2400
+ >
2401
+ <path d="M3.5 8.5L6.5 11.5L12.5 4.5" />
2402
+ </svg>
2403
+ } @else {
2404
+ <svg
2405
+ class="pdx-quick-view__copy-icon"
2406
+ viewBox="0 0 16 16"
2407
+ fill="none"
2408
+ stroke="currentColor"
2409
+ stroke-width="1.5"
2410
+ stroke-linecap="round"
2411
+ stroke-linejoin="round"
2412
+ aria-hidden="true"
2413
+ >
2414
+ <rect x="5.5" y="5.5" width="8" height="8" rx="1.5" />
2415
+ <path d="M3.5 10.5H3a1.5 1.5 0 0 1-1.5-1.5V3A1.5 1.5 0 0 1 3 1.5h6A1.5 1.5 0 0 1 10.5 3v.5" />
2416
+ </svg>
2417
+ }
2418
+ <span>{{ copiedField() === '__summary__' ? summaryCopiedLabel() : copySummaryLabel() }}</span>
2419
+ </button>
2420
+ }
2421
+ @if (resolution()?.ctaAvailable) {
2422
+ <button
2423
+ #ctaButton
2424
+ type="button"
2425
+ class="pdx-quick-view__cta"
2426
+ data-testid="quick-view-open-detail"
2427
+ (click)="openDetail.emit()"
2428
+ >
2429
+ {{ resolution()?.ctaLabel || defaultCtaLabel() }}
2430
+ </button>
2431
+ }
2432
+ </footer>
2433
+ }
2434
+ </section>
2435
+ `, styles: [":host{display:block;max-width:min(26rem,calc(100vw - 1.5rem));min-width:min(20rem,calc(100vw - 1.5rem));box-sizing:border-box}.pdx-quick-view{box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr);gap:.625rem;padding:.875rem 1rem;border-radius:var(--pdx-quick-view-radius, .75rem);background:var( --pdx-quick-view-bg, var(--md-sys-color-surface-container-high, var(--mat-sys-surface-container-high)) );color:var(--md-sys-color-on-surface, var(--mat-sys-on-surface));border:1px solid color-mix(in srgb,var(--md-sys-color-outline, var(--mat-sys-outline)) 36%,var(--md-sys-color-outline-variant, var(--mat-sys-outline-variant)));box-shadow:var( --pdx-quick-view-shadow, 0 18px 38px -6px color-mix(in srgb, var(--md-sys-color-shadow, #000000) 32%, transparent), 0 6px 16px -4px color-mix(in srgb, var(--md-sys-color-shadow, #000000) 18%, transparent) );outline:none;overflow:hidden}.pdx-quick-view--narrow{width:calc(100vw - 1.5rem);max-width:28rem;border-radius:var(--pdx-quick-view-narrow-radius, 1rem);padding:.75rem 1rem 1rem}.pdx-quick-view--narrow:before{content:\"\";display:block;width:2.25rem;height:.25rem;margin:0 auto .25rem;border-radius:999px;background:color-mix(in srgb,var(--md-sys-color-on-surface-variant, var(--mat-sys-on-surface-variant)) 32%,transparent)}.pdx-quick-view__header{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem;min-width:0;padding-bottom:.5rem;border-bottom:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, var(--mat-sys-outline-variant)) 55%,transparent)}.pdx-quick-view__avatar-wrap{flex:0 0 auto;width:2.5rem;height:2.5rem;border-radius:999px;overflow:hidden;background:color-mix(in srgb,var(--md-sys-color-primary, var(--mat-sys-primary)) 12%,transparent);border:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, var(--mat-sys-outline-variant)) 60%,transparent);display:inline-flex;align-items:center;justify-content:center}.pdx-quick-view__avatar-img{width:100%;height:100%;object-fit:cover;display:block}.pdx-quick-view__heading{min-width:0;flex:1 1 auto;display:grid;gap:.1875rem}.pdx-quick-view__heading praxis-resource-identity{--pdx-resource-identity-title-font: 700 1.03125rem/1.32 var(--md-sys-typescale-title-medium-font-family, inherit);--pdx-resource-identity-title-wrap: normal}.pdx-quick-view__context{display:inline-flex;align-items:center;flex-wrap:wrap;gap:.375rem;min-width:0;margin-bottom:.125rem}.pdx-quick-view__context-icon-badge{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;border-radius:.3125rem;background:color-mix(in srgb,var(--md-sys-color-primary, var(--mat-sys-primary)) 14%,transparent);color:var(--md-sys-color-primary, var(--mat-sys-primary))}.pdx-quick-view__context-icon{width:.875rem;height:.875rem;font-size:.875rem;line-height:1}.pdx-quick-view__context-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.6875rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--md-sys-color-primary, var(--mat-sys-primary))}.pdx-quick-view__context-key{flex:0 0 auto;display:inline-flex;align-items:center;padding:.0625rem .4375rem;border-radius:999px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.6875rem;font-weight:700;line-height:1.25;letter-spacing:.02em;background:color-mix(in srgb,var(--md-sys-color-primary, var(--mat-sys-primary)) 12%,transparent);color:var(--md-sys-color-primary, var(--mat-sys-primary));border:1px solid color-mix(in srgb,var(--md-sys-color-primary, var(--mat-sys-primary)) 26%,transparent)}.pdx-quick-view__title{margin:0;font-size:1.03125rem;font-weight:700;line-height:1.32;color:var(--md-sys-color-on-surface, var(--mat-sys-on-surface));overflow-wrap:anywhere}.pdx-quick-view__subtitle{margin:.0625rem 0 0;font-size:.8125rem;font-weight:500;line-height:1.35;color:var(--md-sys-color-on-surface-variant, var(--mat-sys-on-surface-variant))}.pdx-quick-view__close{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;border:none;border-radius:.375rem;background:transparent;color:var(--md-sys-color-on-surface-variant, var(--mat-sys-on-surface-variant));font-size:1.125rem;line-height:1;cursor:pointer;transition:background-color .14s ease,color .14s ease}.pdx-quick-view__close:hover{background:color-mix(in srgb,var(--md-sys-color-on-surface, var(--mat-sys-on-surface)) 8%,transparent);color:var(--md-sys-color-on-surface, var(--mat-sys-on-surface))}.pdx-quick-view__close:focus-visible{outline:2px solid var(--md-sys-color-primary, var(--mat-sys-primary));outline-offset:2px;background:color-mix(in srgb,var(--md-sys-color-on-surface, var(--mat-sys-on-surface)) 8%,transparent);color:var(--md-sys-color-on-surface, var(--mat-sys-on-surface))}.pdx-quick-view__body{min-width:0}.pdx-quick-view__summary-list{margin:0;display:grid;grid-template-columns:minmax(0,1fr);gap:.4375rem;min-width:0}.pdx-quick-view__summary-item{display:flex;align-items:center;justify-content:space-between;gap:.625rem;min-width:0;font-size:.8125rem;line-height:1.35}.pdx-quick-view__summary-label{color:var(--md-sys-color-on-surface-variant, var(--mat-sys-on-surface-variant));font-weight:500;flex:0 0 auto;max-width:44%;display:inline-flex;align-items:center;gap:.3125rem;overflow-wrap:anywhere}.pdx-quick-view__summary-label-icon{flex:0 0 auto;width:.875rem;height:.875rem;font-size:.875rem;line-height:1;opacity:.78}.pdx-quick-view__summary-label-text{min-width:0}.pdx-quick-view__summary-value-wrap{margin:0;flex:1 1 auto;display:inline-flex;align-items:center;justify-content:flex-end;gap:.375rem;min-width:0;text-align:right}.pdx-quick-view__summary-value{min-width:0;color:var(--md-sys-color-on-surface, var(--mat-sys-on-surface));font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pdx-quick-view__summary-value--badge{padding:.125rem .5rem;border-radius:999px;background:color-mix(in srgb,var(--md-sys-color-primary, var(--mat-sys-primary)) 14%,transparent);color:var(--md-sys-color-primary, var(--mat-sys-primary));font-size:.75rem;font-weight:600}.pdx-quick-view__summary-value--badge[data-tone=success]{background:color-mix(in srgb,#16a34a 15%,transparent);color:#15803d}.pdx-quick-view__summary-value--badge[data-tone=warning]{background:color-mix(in srgb,#d97706 16%,transparent);color:#b45309}.pdx-quick-view__summary-value--badge[data-tone=danger],.pdx-quick-view__summary-value--badge[data-tone=error]{background:color-mix(in srgb,var(--md-sys-color-error, var(--mat-sys-error, #dc2626)) 15%,transparent);color:var(--md-sys-color-error, var(--mat-sys-error, #dc2626))}.pdx-quick-view__summary-value--masked{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;letter-spacing:.04em;color:var(--md-sys-color-on-surface-variant, var(--mat-sys-on-surface-variant))}.pdx-quick-view__masked-badge{display:inline-flex;align-items:center;gap:.25rem;flex:0 0 auto;padding:.0625rem .375rem;border-radius:999px;border:1px solid color-mix(in srgb,var(--md-sys-color-tertiary, var(--mat-sys-tertiary, #d97706)) 42%,transparent);background:color-mix(in srgb,var(--md-sys-color-tertiary, var(--mat-sys-tertiary, #d97706)) 12%,transparent);color:var(--md-sys-color-tertiary, var(--mat-sys-tertiary, #d97706));font-size:.6875rem;font-weight:600;line-height:1.2}.pdx-quick-view__masked-icon{width:.75rem;height:.75rem;flex:0 0 auto}.pdx-quick-view__copy-btn{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;padding:0;border:1px solid transparent;background:transparent;color:var(--md-sys-color-on-surface-variant, var(--mat-sys-on-surface-variant));border-radius:.3125rem;opacity:0;cursor:pointer;transition:opacity .14s ease,background-color .14s ease,color .14s ease,border-color .14s ease}.pdx-quick-view--narrow .pdx-quick-view__copy-btn,.pdx-quick-view__summary-item:hover .pdx-quick-view__copy-btn,.pdx-quick-view__summary-item:focus-within .pdx-quick-view__copy-btn,.pdx-quick-view__copy-btn:focus-visible,.pdx-quick-view__copy-btn[data-copied=true]{opacity:1}.pdx-quick-view__copy-btn:hover{background:color-mix(in srgb,var(--md-sys-color-primary, var(--mat-sys-primary)) 12%,transparent);color:var(--md-sys-color-primary, var(--mat-sys-primary));border-color:color-mix(in srgb,var(--md-sys-color-primary, var(--mat-sys-primary)) 35%,transparent)}.pdx-quick-view__copy-btn[data-copied=true]{background:color-mix(in srgb,#16a34a 15%,transparent);color:#15803d;border-color:color-mix(in srgb,#16a34a 38%,transparent)}.pdx-quick-view__copy-btn:focus-visible{outline:2px solid var(--md-sys-color-primary, var(--mat-sys-primary));outline-offset:2px}.pdx-quick-view__copy-icon{width:.875rem;height:.875rem;flex:0 0 auto}.pdx-quick-view__sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.pdx-quick-view__feedback{margin:0;font-size:.8125rem;line-height:1.4;color:var(--md-sys-color-on-surface-variant, var(--mat-sys-on-surface-variant))}.pdx-quick-view__feedback--error{color:var(--md-sys-color-error, var(--mat-sys-error))}.pdx-quick-view__skeleton{display:grid;gap:.4375rem;padding:.125rem 0}.pdx-quick-view__skeleton-line{height:.75rem;border-radius:.25rem;background:color-mix(in srgb,var(--md-sys-color-on-surface, var(--mat-sys-on-surface)) 12%,transparent);width:75%}.pdx-quick-view__skeleton-line--wide{width:92%}.pdx-quick-view__skeleton-line--short{width:52%}.pdx-quick-view__contextual-actions{display:flex;align-items:center;flex-wrap:wrap;gap:.375rem;padding-top:.4375rem;border-top:1px dashed color-mix(in srgb,var(--md-sys-color-outline-variant, var(--mat-sys-outline-variant)) 60%,transparent)}.pdx-quick-view__contextual-btn{display:inline-flex;align-items:center;gap:.25rem;min-width:0;max-width:100%;padding:.25rem .5625rem;border-radius:999px;border:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, var(--mat-sys-outline-variant)) 85%,transparent);background:color-mix(in srgb,var(--md-sys-color-surface-container, var(--mat-sys-surface-container)) 78%,transparent);color:var(--md-sys-color-on-surface, var(--mat-sys-on-surface));font-size:.71875rem;font-weight:600;line-height:1.25;cursor:pointer;transition:background-color .14s ease,color .14s ease,border-color .14s ease}.pdx-quick-view__contextual-btn:hover{background:color-mix(in srgb,var(--md-sys-color-primary, var(--mat-sys-primary)) 12%,transparent);color:var(--md-sys-color-primary, var(--mat-sys-primary));border-color:color-mix(in srgb,var(--md-sys-color-primary, var(--mat-sys-primary)) 40%,transparent)}.pdx-quick-view__contextual-btn:focus-visible{outline:2px solid var(--md-sys-color-primary, var(--mat-sys-primary));outline-offset:2px}.pdx-quick-view__contextual-icon{flex:0 0 auto;width:.8125rem;height:.8125rem;font-size:.8125rem;line-height:1}.pdx-quick-view__contextual-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pdx-quick-view__footer{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding-top:.5rem;border-top:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, var(--mat-sys-outline-variant)) 65%,transparent)}.pdx-quick-view__copy-summary-btn{display:inline-flex;align-items:center;justify-content:center;gap:.375rem;padding:.3125rem .625rem;border-radius:.375rem;border:1px solid color-mix(in srgb,var(--md-sys-color-outline-variant, var(--mat-sys-outline-variant)) 80%,transparent);background:color-mix(in srgb,var(--md-sys-color-surface-container, var(--mat-sys-surface-container)) 70%,transparent);color:var(--md-sys-color-on-surface-variant, var(--mat-sys-on-surface-variant));font-size:.75rem;font-weight:600;cursor:pointer;transition:background-color .14s ease,color .14s ease,border-color .14s ease}.pdx-quick-view__copy-summary-btn:hover{background:color-mix(in srgb,var(--md-sys-color-primary, var(--mat-sys-primary)) 10%,transparent);color:var(--md-sys-color-primary, var(--mat-sys-primary));border-color:color-mix(in srgb,var(--md-sys-color-primary, var(--mat-sys-primary)) 40%,transparent)}.pdx-quick-view__copy-summary-btn[data-copied=true]{background:color-mix(in srgb,#16a34a 15%,transparent);color:#15803d;border-color:color-mix(in srgb,#16a34a 38%,transparent)}.pdx-quick-view__copy-summary-btn:focus-visible{outline:2px solid var(--md-sys-color-primary, var(--mat-sys-primary));outline-offset:2px}.pdx-quick-view__cta{margin-left:auto;display:inline-flex;align-items:center;justify-content:center;gap:.375rem;padding:.375rem .8125rem;border-radius:.375rem;border:none;background:var(--md-sys-color-primary, var(--mat-sys-primary));color:var(--md-sys-color-on-primary, var(--mat-sys-on-primary));font-size:.8125rem;font-weight:600;cursor:pointer;transition:filter .14s ease,box-shadow .14s ease}.pdx-quick-view__cta:hover{filter:brightness(1.06)}.pdx-quick-view__cta:focus-visible{outline:2px solid var(--md-sys-color-primary, var(--mat-sys-primary));outline-offset:2px}.pdx-quick-view--narrow .pdx-quick-view__footer{flex-wrap:wrap}.pdx-quick-view--narrow .pdx-quick-view__copy-summary-btn,.pdx-quick-view--narrow .pdx-quick-view__cta{flex:1 1 auto;padding:.5rem .875rem}\n"] }]
2436
+ }], propDecorators: { pointerEnter: [{
2437
+ type: Output
2438
+ }], pointerLeave: [{
2439
+ type: Output
2440
+ }], openDetail: [{
2441
+ type: Output
2442
+ }], openSurface: [{
2443
+ type: Output
2444
+ }], copyValue: [{
2445
+ type: Output
2446
+ }], dismiss: [{
2447
+ type: Output
2448
+ }], dialogSurface: [{
2449
+ type: ViewChild,
2450
+ args: ['dialogSurface']
2451
+ }], ctaButton: [{
2452
+ type: ViewChild,
2453
+ args: ['ctaButton']
2454
+ }], closeButton: [{
2455
+ type: ViewChild,
2456
+ args: ['closeButton']
2457
+ }] } });
2458
+
2459
+ const QUICK_VIEW_CONNECTED_POSITIONS = [
2460
+ {
2461
+ originX: 'start',
2462
+ originY: 'bottom',
2463
+ overlayX: 'start',
2464
+ overlayY: 'top',
2465
+ offsetY: 4,
2466
+ },
2467
+ {
2468
+ originX: 'end',
2469
+ originY: 'bottom',
2470
+ overlayX: 'end',
2471
+ overlayY: 'top',
2472
+ offsetY: 4,
2473
+ },
2474
+ {
2475
+ originX: 'start',
2476
+ originY: 'top',
2477
+ overlayX: 'start',
2478
+ overlayY: 'bottom',
2479
+ offsetY: -4,
2480
+ },
2481
+ {
2482
+ originX: 'end',
2483
+ originY: 'top',
2484
+ overlayX: 'end',
2485
+ overlayY: 'bottom',
2486
+ offsetY: -4,
2487
+ },
2488
+ {
2489
+ originX: 'end',
2490
+ originY: 'center',
2491
+ overlayX: 'start',
2492
+ overlayY: 'center',
2493
+ offsetX: 6,
2494
+ },
2495
+ {
2496
+ originX: 'start',
2497
+ originY: 'center',
2498
+ overlayX: 'end',
2499
+ overlayY: 'center',
2500
+ offsetX: -6,
2501
+ },
2502
+ ];
2503
+ /**
2504
+ * Apresentador conectado não-modal para Quick View em `@praxisui/dialog`.
2505
+ *
2506
+ * Regras arquiteturais:
2507
+ * - Em desktop (`hover`, `focus-shortcut`, `explicit-button`), utiliza `flexibleConnectedTo`
2508
+ * sem `aria-modal="true"` e sem trap global de foco;
2509
+ * - Em `narrow-tap` (ou viewport compacta <= 640px sob ativação explícita), utiliza folha compacta
2510
+ * inferior com backdrop e semântica modal real;
2511
+ * - Reposiciona em scroll/resize enquanto a âncora permanecer válida e fecha imediatamente
2512
+ * quando a âncora sai do DOM ou se torna inválida;
2513
+ * - Restaura o foco ao gatilho original quando o usuário fecha por `Escape` ou botão Fechar
2514
+ * estando com o foco dentro do card.
2515
+ */
2516
+ class QuickViewDialogPresenterService {
2517
+ overlay = inject(Overlay);
2518
+ injector = inject(Injector);
2519
+ layerScale = inject(PraxisLayerScaleStyleService);
2520
+ activeSession = null;
2521
+ present(options) {
2522
+ this.closeAll();
2523
+ this.layerScale.ensureInstalled();
2524
+ const narrowModalMode = this.shouldUseNarrowModalFallback(options);
2525
+ const overlayRef = this.overlay.create(this.buildOverlayConfig(options.anchor, narrowModalMode));
2526
+ const portal = new ComponentPortal(PraxisQuickViewOverlayComponent, null, this.injector);
2527
+ const compRef = overlayRef.attach(portal);
2528
+ compRef.instance.narrowModalMode.set(narrowModalMode);
2529
+ compRef.instance.bodyRenderer.set(options.bodyRenderer ?? null);
2530
+ compRef.instance.resolution.set(options.resolution);
2531
+ try {
2532
+ compRef.changeDetectorRef.detectChanges();
2533
+ }
2534
+ catch { }
2535
+ overlayRef.updatePosition();
2536
+ const session = new ActiveOverlaySession(overlayRef, compRef, options, narrowModalMode, (anchor) => this.resolveConnectedOrigin(anchor), () => {
2537
+ if (this.activeSession === session) {
2538
+ this.activeSession = null;
2539
+ }
2540
+ });
2541
+ this.activeSession = session;
2542
+ if (narrowModalMode ||
2543
+ options.trigger === 'explicit-button' ||
2544
+ options.trigger === 'focus-shortcut' ||
2545
+ options.trigger === 'narrow-tap') {
2546
+ queueMicrotask(() => {
2547
+ compRef.instance.focusInteractiveEntry();
2548
+ });
2549
+ }
2550
+ return session;
2551
+ }
2552
+ closeAll() {
2553
+ if (this.activeSession) {
2554
+ const current = this.activeSession;
2555
+ this.activeSession = null;
2556
+ current.close('programmatic');
2557
+ }
2558
+ }
2559
+ shouldUseNarrowModalFallback(options) {
2560
+ if (options.trigger === 'narrow-tap') {
2561
+ return true;
2562
+ }
2563
+ if (options.trigger === 'hover') {
2564
+ return false;
2565
+ }
2566
+ const width = typeof window !== 'undefined' && Number.isFinite(window.innerWidth)
2567
+ ? window.innerWidth
2568
+ : 1280;
2569
+ return (width <= 640 &&
2570
+ (options.trigger === 'explicit-button' ||
2571
+ options.trigger === 'focus-shortcut'));
2572
+ }
2573
+ buildOverlayConfig(anchor, narrowModalMode) {
2574
+ if (narrowModalMode) {
2575
+ const positionStrategy = this.overlay
2576
+ .position()
2577
+ .global()
2578
+ .centerHorizontally()
2579
+ .bottom('12px');
2580
+ return new OverlayConfig({
2581
+ hasBackdrop: true,
2582
+ panelClass: ['pdx-quick-view-overlay-pane', 'pdx-quick-view-overlay-pane--narrow'],
2583
+ backdropClass: 'pdx-quick-view-backdrop',
2584
+ positionStrategy,
2585
+ scrollStrategy: this.overlay.scrollStrategies.block(),
2586
+ });
2587
+ }
2588
+ const origin = this.resolveConnectedOrigin(anchor);
2589
+ const positionStrategy = this.overlay
2590
+ .position()
2591
+ .flexibleConnectedTo(origin)
2592
+ .withPositions(QUICK_VIEW_CONNECTED_POSITIONS)
2593
+ .withViewportMargin(12)
2594
+ .withPush(true)
2595
+ .withFlexibleDimensions(false);
2596
+ return new OverlayConfig({
2597
+ hasBackdrop: false,
2598
+ panelClass: 'pdx-quick-view-overlay-pane',
2599
+ positionStrategy,
2600
+ scrollStrategy: this.overlay.scrollStrategies.reposition(),
2601
+ });
2602
+ }
2603
+ resolveConnectedOrigin(anchor) {
2604
+ if (anchor.kind === 'element') {
2605
+ return anchor.element;
2606
+ }
2607
+ const rect = anchor.getViewportRect() ?? {
2608
+ x: 0,
2609
+ y: 0,
2610
+ width: 0,
2611
+ height: 0,
2612
+ };
2613
+ return {
2614
+ x: rect.x,
2615
+ y: rect.y,
2616
+ width: rect.width,
2617
+ height: rect.height,
2618
+ };
2619
+ }
2620
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: QuickViewDialogPresenterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2621
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: QuickViewDialogPresenterService, providedIn: 'root' });
2622
+ }
2623
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: QuickViewDialogPresenterService, decorators: [{
2624
+ type: Injectable,
2625
+ args: [{ providedIn: 'root' }]
2626
+ }] });
2627
+ class ActiveOverlaySession {
2628
+ overlayRef;
2629
+ compRef;
2630
+ options;
2631
+ narrowModalMode;
2632
+ resolveOrigin;
2633
+ onDisposed;
2634
+ closedSubject = new Subject();
2635
+ pointerEnterSubject = new Subject();
2636
+ pointerLeaveSubject = new Subject();
2637
+ subs = [];
2638
+ cleanupDomListeners = [];
2639
+ isClosed = false;
2640
+ closed$ = this.closedSubject.asObservable();
2641
+ pointerEnteredCard$ = this.pointerEnterSubject.asObservable();
2642
+ pointerLeftCard$ = this.pointerLeaveSubject.asObservable();
2643
+ constructor(overlayRef, compRef, options, narrowModalMode, resolveOrigin, onDisposed) {
2644
+ this.overlayRef = overlayRef;
2645
+ this.compRef = compRef;
2646
+ this.options = options;
2647
+ this.narrowModalMode = narrowModalMode;
2648
+ this.resolveOrigin = resolveOrigin;
2649
+ this.onDisposed = onDisposed;
2650
+ const inst = compRef.instance;
2651
+ this.subs.push(inst.pointerEnter.subscribe(() => this.pointerEnterSubject.next()), inst.pointerLeave.subscribe(() => this.pointerLeaveSubject.next()), inst.openDetail.subscribe(() => this.options.onOpenDetail()), inst.openSurface.subscribe((surfaceId) => this.options.onOpenSurface?.(surfaceId)), inst.copyValue.subscribe(({ value, field }) => this.options.onCopyValue?.(value, field)), inst.dismiss.subscribe((reason) => this.close(reason)));
2652
+ if (narrowModalMode) {
2653
+ this.subs.push(overlayRef.backdropClick().subscribe(() => {
2654
+ this.close('outside-pointer');
2655
+ }));
2656
+ }
2657
+ this.installDomListeners();
2658
+ }
2659
+ update(resolution) {
2660
+ if (this.isClosed) {
2661
+ return;
2662
+ }
2663
+ const previousState = this.compRef.instance.resolution()?.state;
2664
+ const focusWasInside = this.wasFocusInsideOverlay();
2665
+ this.compRef.instance.resolution.set(resolution);
2666
+ try {
2667
+ this.compRef.changeDetectorRef.detectChanges();
2668
+ }
2669
+ catch { }
2670
+ this.updatePosition();
2671
+ if (previousState === 'loading' &&
2672
+ resolution.state === 'ready' &&
2673
+ (focusWasInside ||
2674
+ this.narrowModalMode ||
2675
+ this.options.trigger === 'explicit-button' ||
2676
+ this.options.trigger === 'focus-shortcut' ||
2677
+ this.options.trigger === 'narrow-tap')) {
2678
+ queueMicrotask(() => {
2679
+ if (!this.isClosed) {
2680
+ this.compRef.instance.focusInteractiveEntry();
2681
+ }
2682
+ });
2683
+ }
2684
+ }
2685
+ updatePosition() {
2686
+ if (this.isClosed) {
2687
+ return;
2688
+ }
2689
+ if (!isResourceQuickViewAnchorValid(this.options.anchor)) {
2690
+ this.close('anchor-invalid');
2691
+ return;
2692
+ }
2693
+ if (!this.narrowModalMode && this.options.anchor.kind === 'virtual-rect') {
2694
+ const strategy = this.overlayRef.getConfig().positionStrategy;
2695
+ strategy?.setOrigin?.(this.resolveOrigin(this.options.anchor));
2696
+ }
2697
+ this.overlayRef.updatePosition();
2698
+ }
2699
+ close(reason = 'programmatic') {
2700
+ if (this.isClosed) {
2701
+ return;
2702
+ }
2703
+ this.isClosed = true;
2704
+ const focusInside = this.wasFocusInsideOverlay();
2705
+ const isInteractiveTrigger = this.narrowModalMode ||
2706
+ this.options.trigger === 'explicit-button' ||
2707
+ this.options.trigger === 'focus-shortcut' ||
2708
+ this.options.trigger === 'narrow-tap';
2709
+ const shouldRestoreFocus = focusInside ||
2710
+ (isInteractiveTrigger &&
2711
+ (reason === 'escape' ||
2712
+ reason === 'programmatic' ||
2713
+ this.narrowModalMode));
2714
+ for (const cleanup of this.cleanupDomListeners) {
2715
+ cleanup();
2716
+ }
2717
+ this.cleanupDomListeners.length = 0;
2718
+ for (const sub of this.subs) {
2719
+ sub.unsubscribe();
2720
+ }
2721
+ this.subs.length = 0;
2722
+ try {
2723
+ this.overlayRef.dispose();
2724
+ }
2725
+ catch { }
2726
+ if (shouldRestoreFocus && reason !== 'cta') {
2727
+ this.restoreFocusToOrigin();
2728
+ }
2729
+ this.closedSubject.next(reason);
2730
+ this.closedSubject.complete();
2731
+ this.pointerEnterSubject.complete();
2732
+ this.pointerLeaveSubject.complete();
2733
+ this.onDisposed();
2734
+ this.options.onDismiss(reason);
2735
+ }
2736
+ installDomListeners() {
2737
+ if (typeof document !== 'undefined') {
2738
+ const onKeydown = (event) => {
2739
+ if (event.key === 'Escape') {
2740
+ event.preventDefault();
2741
+ event.stopPropagation();
2742
+ event.stopImmediatePropagation();
2743
+ this.close('escape');
2744
+ }
2745
+ };
2746
+ document.addEventListener('keydown', onKeydown, true);
2747
+ this.cleanupDomListeners.push(() => document.removeEventListener('keydown', onKeydown, true));
2748
+ if (!this.narrowModalMode) {
2749
+ const onPointerDown = (event) => {
2750
+ const target = event.target;
2751
+ if (!target) {
2752
+ return;
2753
+ }
2754
+ if (this.overlayRef.overlayElement?.contains(target)) {
2755
+ return;
2756
+ }
2757
+ const anchorEl = this.options.anchor.kind === 'element'
2758
+ ? this.options.anchor.element
2759
+ : this.options.anchor.hostElement;
2760
+ if (anchorEl && anchorEl.contains(target)) {
2761
+ return;
2762
+ }
2763
+ this.close('outside-pointer');
2764
+ };
2765
+ document.addEventListener('pointerdown', onPointerDown, true);
2766
+ this.cleanupDomListeners.push(() => document.removeEventListener('pointerdown', onPointerDown, true));
2767
+ }
2768
+ }
2769
+ if (typeof window !== 'undefined') {
2770
+ const onViewportChange = () => {
2771
+ this.updatePosition();
2772
+ };
2773
+ window.addEventListener('scroll', onViewportChange, true);
2774
+ window.addEventListener('resize', onViewportChange, { passive: true });
2775
+ this.cleanupDomListeners.push(() => {
2776
+ window.removeEventListener('scroll', onViewportChange, true);
2777
+ window.removeEventListener('resize', onViewportChange);
2778
+ });
2779
+ }
2780
+ }
2781
+ wasFocusInsideOverlay() {
2782
+ if (typeof document === 'undefined' || !document.activeElement) {
2783
+ return false;
2784
+ }
2785
+ return Boolean(this.overlayRef.overlayElement?.contains(document.activeElement));
2786
+ }
2787
+ restoreFocusToOrigin() {
2788
+ const anchor = this.options.anchor;
2789
+ const candidate = anchor.focusOrigin ??
2790
+ (anchor.kind === 'element' ? anchor.element : anchor.hostElement);
2791
+ if (candidate &&
2792
+ candidate.isConnected !== false &&
2793
+ typeof candidate.focus === 'function') {
2794
+ try {
2795
+ candidate.focus({ preventScroll: true });
2796
+ }
2797
+ catch {
2798
+ try {
2799
+ candidate.focus();
2800
+ }
2801
+ catch { }
2802
+ }
2803
+ }
2804
+ }
2805
+ }
2806
+ function providePraxisQuickViewDialogPresenter() {
2807
+ return {
2808
+ provide: PRAXIS_QUICK_VIEW_PRESENTER,
2809
+ useExisting: QuickViewDialogPresenterService,
2810
+ };
2811
+ }
2812
+
1565
2813
  class LongContentDialogExampleComponent {
1566
2814
  items = Array.from({ length: 40 }, (_, idx) => `Example line ${idx + 1}`);
1567
2815
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: LongContentDialogExampleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
@@ -1731,6 +2979,26 @@ function providePraxisDialogMetadata() {
1731
2979
  };
1732
2980
  }
1733
2981
 
2982
+ const dialogConfigRootResolutionSpec = {
2983
+ strategy: 'root-path',
2984
+ paths: ['config', ''],
2985
+ allowIndex: false,
2986
+ };
2987
+ const dialogPositionResolutionSpec = {
2988
+ strategy: 'root-path',
2989
+ paths: ['config.position', 'position'],
2990
+ allowIndex: false,
2991
+ };
2992
+ const dialogPresetResolutionSpec = {
2993
+ strategy: 'root-path',
2994
+ paths: ['variant', 'config'],
2995
+ allowIndex: false,
2996
+ };
2997
+ const dialogChildHostResolutionSpec = {
2998
+ strategy: 'root-path',
2999
+ paths: ['content', 'componentId', 'inputs', 'data'],
3000
+ allowIndex: false,
3001
+ };
1734
3002
  const sizeFieldSchema = {
1735
3003
  type: 'object',
1736
3004
  minProperties: 1,
@@ -1791,13 +3059,13 @@ const PRAXIS_DIALOG_AUTHORING_MANIFEST = {
1791
3059
  { name: 'inputs', type: 'Record<string, unknown>', description: 'Inputs applied to the child component after opening the dialog.' },
1792
3060
  ],
1793
3061
  editableTargets: [
1794
- { kind: 'dialogShell', resolver: 'praxis-dialog-config-root', description: 'Top-level PraxisDialogConfig shell fields such as title, role, actions and theme.' },
1795
- { kind: 'size', resolver: 'praxis-dialog-size-fields', description: 'Width, height, min/max size fields on PraxisDialogConfig.' },
1796
- { kind: 'position', resolver: 'praxis-dialog-position-fields', description: 'Overlay position fields top, bottom, left and right.' },
1797
- { kind: 'backdrop', resolver: 'praxis-dialog-backdrop-fields', description: 'Backdrop enablement and backdrop class semantics.' },
1798
- { kind: 'closePolicy', resolver: 'praxis-dialog-close-policy-fields', description: 'disableClose, closeOnBackdropClick, closeOnNavigation, restoreFocus and autofocus behavior.' },
1799
- { kind: 'preset', resolver: 'praxis-dialog-global-preset-by-type-variant', description: 'Type and variant presets merged through PRAXIS_DIALOG_GLOBAL_PRESETS.' },
1800
- { kind: 'childHost', resolver: 'praxis-dialog-child-component-or-template-host', description: 'Component/template registry child host and input/data envelope.' },
3062
+ { kind: 'dialogShell', resolver: 'praxis-dialog-config-root', resolutionSpec: dialogConfigRootResolutionSpec, description: 'Top-level PraxisDialogConfig shell fields such as title, role, actions and theme.' },
3063
+ { kind: 'size', resolver: 'praxis-dialog-size-fields', resolutionSpec: dialogConfigRootResolutionSpec, description: 'Width, height, min/max size fields on PraxisDialogConfig.' },
3064
+ { kind: 'position', resolver: 'praxis-dialog-position-fields', resolutionSpec: dialogPositionResolutionSpec, description: 'Overlay position fields top, bottom, left and right.' },
3065
+ { kind: 'backdrop', resolver: 'praxis-dialog-backdrop-fields', resolutionSpec: dialogConfigRootResolutionSpec, description: 'Backdrop enablement and backdrop class semantics.' },
3066
+ { kind: 'closePolicy', resolver: 'praxis-dialog-close-policy-fields', resolutionSpec: dialogConfigRootResolutionSpec, description: 'disableClose, closeOnBackdropClick, closeOnNavigation, restoreFocus and autofocus behavior.' },
3067
+ { kind: 'preset', resolver: 'praxis-dialog-global-preset-by-type-variant', resolutionSpec: dialogPresetResolutionSpec, description: 'Type and variant presets merged through PRAXIS_DIALOG_GLOBAL_PRESETS.' },
3068
+ { kind: 'childHost', resolver: 'praxis-dialog-child-component-or-template-host', resolutionSpec: dialogChildHostResolutionSpec, description: 'Component/template registry child host and input/data envelope.' },
1801
3069
  ],
1802
3070
  operations: [
1803
3071
  {
@@ -1805,7 +3073,7 @@ const PRAXIS_DIALOG_AUTHORING_MANIFEST = {
1805
3073
  title: 'Set dialog shell fields',
1806
3074
  scope: 'global',
1807
3075
  targetKind: 'dialogShell',
1808
- target: { kind: 'dialogShell', resolver: 'praxis-dialog-config-root', ambiguityPolicy: 'fail', required: false },
3076
+ target: { kind: 'dialogShell', resolver: 'praxis-dialog-config-root', resolutionSpec: dialogConfigRootResolutionSpec, ambiguityPolicy: 'fail', required: false },
1809
3077
  inputSchema: {
1810
3078
  type: 'object',
1811
3079
  minProperties: 1,
@@ -1833,7 +3101,7 @@ const PRAXIS_DIALOG_AUTHORING_MANIFEST = {
1833
3101
  title: 'Set dialog size',
1834
3102
  scope: 'layout',
1835
3103
  targetKind: 'size',
1836
- target: { kind: 'size', resolver: 'praxis-dialog-size-fields', ambiguityPolicy: 'fail', required: false },
3104
+ target: { kind: 'size', resolver: 'praxis-dialog-size-fields', resolutionSpec: dialogConfigRootResolutionSpec, ambiguityPolicy: 'fail', required: false },
1837
3105
  inputSchema: sizeFieldSchema,
1838
3106
  effects: [{ kind: 'merge-object', path: 'config' }],
1839
3107
  destructive: false,
@@ -1848,7 +3116,7 @@ const PRAXIS_DIALOG_AUTHORING_MANIFEST = {
1848
3116
  title: 'Set dialog position',
1849
3117
  scope: 'layout',
1850
3118
  targetKind: 'position',
1851
- target: { kind: 'position', resolver: 'praxis-dialog-position-fields', ambiguityPolicy: 'fail', required: false },
3119
+ target: { kind: 'position', resolver: 'praxis-dialog-position-fields', resolutionSpec: dialogPositionResolutionSpec, ambiguityPolicy: 'fail', required: false },
1852
3120
  inputSchema: positionSchema,
1853
3121
  effects: [{ kind: 'set-value', path: 'config.position' }],
1854
3122
  destructive: false,
@@ -1863,7 +3131,7 @@ const PRAXIS_DIALOG_AUTHORING_MANIFEST = {
1863
3131
  title: 'Set dialog backdrop',
1864
3132
  scope: 'skin',
1865
3133
  targetKind: 'backdrop',
1866
- target: { kind: 'backdrop', resolver: 'praxis-dialog-backdrop-fields', ambiguityPolicy: 'fail', required: false },
3134
+ target: { kind: 'backdrop', resolver: 'praxis-dialog-backdrop-fields', resolutionSpec: dialogConfigRootResolutionSpec, ambiguityPolicy: 'fail', required: false },
1867
3135
  inputSchema: {
1868
3136
  type: 'object',
1869
3137
  minProperties: 1,
@@ -1885,7 +3153,7 @@ const PRAXIS_DIALOG_AUTHORING_MANIFEST = {
1885
3153
  title: 'Set dialog close policy',
1886
3154
  scope: 'accessibility',
1887
3155
  targetKind: 'closePolicy',
1888
- target: { kind: 'closePolicy', resolver: 'praxis-dialog-close-policy-fields', ambiguityPolicy: 'fail', required: false },
3156
+ target: { kind: 'closePolicy', resolver: 'praxis-dialog-close-policy-fields', resolutionSpec: dialogConfigRootResolutionSpec, ambiguityPolicy: 'fail', required: false },
1889
3157
  inputSchema: closePolicySchema,
1890
3158
  effects: [{ kind: 'merge-object', path: 'config' }],
1891
3159
  destructive: true,
@@ -1900,7 +3168,7 @@ const PRAXIS_DIALOG_AUTHORING_MANIFEST = {
1900
3168
  title: 'Apply dialog preset',
1901
3169
  scope: 'global',
1902
3170
  targetKind: 'preset',
1903
- target: { kind: 'preset', resolver: 'praxis-dialog-global-preset-by-type-variant', ambiguityPolicy: 'fail', required: false },
3171
+ target: { kind: 'preset', resolver: 'praxis-dialog-global-preset-by-type-variant', resolutionSpec: dialogPresetResolutionSpec, ambiguityPolicy: 'fail', required: false },
1904
3172
  inputSchema: {
1905
3173
  type: 'object',
1906
3174
  required: ['dialogType'],
@@ -1930,7 +3198,7 @@ const PRAXIS_DIALOG_AUTHORING_MANIFEST = {
1930
3198
  title: 'Configure dialog child host',
1931
3199
  scope: 'templating',
1932
3200
  targetKind: 'childHost',
1933
- target: { kind: 'childHost', resolver: 'praxis-dialog-child-component-or-template-host', ambiguityPolicy: 'fail', required: false },
3201
+ target: { kind: 'childHost', resolver: 'praxis-dialog-child-component-or-template-host', resolutionSpec: dialogChildHostResolutionSpec, ambiguityPolicy: 'fail', required: false },
1934
3202
  inputSchema: childHostSchema,
1935
3203
  effects: [{ kind: 'compile-domain-patch', handler: 'dialog-child-host-configure', handlerContract: {
1936
3204
  reads: ['ComponentMetadataRegistry', 'PRAXIS_DIALOG_CONTENT_REGISTRY', 'PRAXIS_DIALOG_TEMPLATE_REGISTRY', 'content', 'componentId', 'inputs', 'data'],
@@ -1952,7 +3220,7 @@ const PRAXIS_DIALOG_AUTHORING_MANIFEST = {
1952
3220
  title: 'Delegate operation to child manifest',
1953
3221
  scope: 'templating',
1954
3222
  targetKind: 'childHost',
1955
- target: { kind: 'childHost', resolver: 'praxis-dialog-child-component-or-template-host', ambiguityPolicy: 'fail', required: true },
3223
+ target: { kind: 'childHost', resolver: 'praxis-dialog-child-component-or-template-host', resolutionSpec: dialogChildHostResolutionSpec, ambiguityPolicy: 'fail', required: true },
1956
3224
  inputSchema: {
1957
3225
  type: 'object',
1958
3226
  required: ['childManifestComponentId', 'operationId', 'params'],
@@ -2028,4 +3296,4 @@ const PRAXIS_DIALOG_AUTHORING_MANIFEST = {
2028
3296
  * Generated bundle index. Do not edit.
2029
3297
  */
2030
3298
 
2031
- export { LongContentDialogExampleComponent, PRAXIS_DIALOG_AUTHORING_MANIFEST, PRAXIS_DIALOG_COMPONENT_METADATA, PRAXIS_DIALOG_CONTENT_REGISTRY, PRAXIS_DIALOG_DATA, PRAXIS_DIALOG_DEFAULTS, PRAXIS_DIALOG_EXAMPLE_LONG_CONTENT, PRAXIS_DIALOG_GLOBAL_PRESETS, PRAXIS_DIALOG_I18N, PRAXIS_DIALOG_TEMPLATE_REGISTRY, PraxisDialog, PraxisDialogActionsDirective, PraxisDialogComponent, PraxisDialogContentDirective, PraxisDialogDirectives, PraxisDialogRef, PraxisDialogTitleDirective, provideDialogGlobalPresetsFromGlobalConfig, providePraxisDialogExamples, providePraxisDialogGlobalActions, providePraxisDialogMetadata, providePraxisSurfaceGlobalActions };
3299
+ export { LongContentDialogExampleComponent, PRAXIS_DIALOG_AUTHORING_MANIFEST, PRAXIS_DIALOG_COMPONENT_METADATA, PRAXIS_DIALOG_CONTENT_REGISTRY, PRAXIS_DIALOG_DATA, PRAXIS_DIALOG_DEFAULTS, PRAXIS_DIALOG_EXAMPLE_LONG_CONTENT, PRAXIS_DIALOG_GLOBAL_PRESETS, PRAXIS_DIALOG_I18N, PRAXIS_DIALOG_TEMPLATE_REGISTRY, PraxisDialog, PraxisDialogActionsDirective, PraxisDialogComponent, PraxisDialogContentDirective, PraxisDialogDirectives, PraxisDialogRef, PraxisDialogTitleDirective, PraxisQuickViewOverlayComponent, QuickViewDialogPresenterService, provideDialogGlobalPresetsFromGlobalConfig, providePraxisDialogExamples, providePraxisDialogGlobalActions, providePraxisDialogMetadata, providePraxisQuickViewDialogPresenter, providePraxisSurfaceGlobalActions };