@praxisui/dialog 10.0.0-rc.6 → 10.0.0-rc.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/component-registry.json +134 -8
- package/fesm2022/praxisui-dialog.mjs +1348 -26
- package/package.json +2 -2
- package/types/praxisui-dialog.d.ts +111 -19
|
@@ -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, PraxisOperationalAssistantLaunchService, 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: [
|
|
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
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
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,1296 @@ function providePraxisSurfaceGlobalActions() {
|
|
|
1562
1574
|
};
|
|
1563
1575
|
}
|
|
1564
1576
|
|
|
1577
|
+
class PraxisQuickViewOverlayComponent {
|
|
1578
|
+
i18n = inject(PraxisI18nService, { optional: true });
|
|
1579
|
+
assistantLaunch = inject(PraxisOperationalAssistantLaunchService, {
|
|
1580
|
+
optional: true,
|
|
1581
|
+
});
|
|
1582
|
+
resolution = signal(null, ...(ngDevMode ? [{ debugName: "resolution" }] : /* istanbul ignore next */ []));
|
|
1583
|
+
bodyRenderer = signal(null, ...(ngDevMode ? [{ debugName: "bodyRenderer" }] : /* istanbul ignore next */ []));
|
|
1584
|
+
narrowModalMode = signal(false, ...(ngDevMode ? [{ debugName: "narrowModalMode" }] : /* istanbul ignore next */ []));
|
|
1585
|
+
copiedField = signal(null, ...(ngDevMode ? [{ debugName: "copiedField" }] : /* istanbul ignore next */ []));
|
|
1586
|
+
failedAvatarUrl = signal(null, ...(ngDevMode ? [{ debugName: "failedAvatarUrl" }] : /* istanbul ignore next */ []));
|
|
1587
|
+
copiedFeedbackTimer = null;
|
|
1588
|
+
pointerEnter = new EventEmitter();
|
|
1589
|
+
pointerLeave = new EventEmitter();
|
|
1590
|
+
openDetail = new EventEmitter();
|
|
1591
|
+
openSurface = new EventEmitter();
|
|
1592
|
+
copyValue = new EventEmitter();
|
|
1593
|
+
dismiss = new EventEmitter();
|
|
1594
|
+
dialogSurface;
|
|
1595
|
+
ctaButton;
|
|
1596
|
+
closeButton;
|
|
1597
|
+
summaryItems = computed(() => this.resolution()?.summaryItems ?? [], ...(ngDevMode ? [{ debugName: "summaryItems" }] : /* istanbul ignore next */ []));
|
|
1598
|
+
contextualActions = computed(() => this.resolution()?.contextualActions ?? [], ...(ngDevMode ? [{ debugName: "contextualActions" }] : /* istanbul ignore next */ []));
|
|
1599
|
+
headerKeyPart = computed(() => this.resolution()?.identity?.key ?? null, ...(ngDevMode ? [{ debugName: "headerKeyPart" }] : /* istanbul ignore next */ []));
|
|
1600
|
+
headerKeyBadgeText = computed(() => {
|
|
1601
|
+
const key = this.headerKeyPart();
|
|
1602
|
+
if (!key || key.value === null || key.value === undefined) {
|
|
1603
|
+
return null;
|
|
1604
|
+
}
|
|
1605
|
+
const raw = String(key.value).trim();
|
|
1606
|
+
if (!raw) {
|
|
1607
|
+
return null;
|
|
1608
|
+
}
|
|
1609
|
+
const res = this.resolution();
|
|
1610
|
+
const mainTitle = String(res?.identity?.title?.value ?? res?.title ?? '').trim();
|
|
1611
|
+
if (mainTitle && raw.toLowerCase() === mainTitle.toLowerCase()) {
|
|
1612
|
+
return null;
|
|
1613
|
+
}
|
|
1614
|
+
const prefix = key.presentation?.prefix ?? '';
|
|
1615
|
+
const suffix = key.presentation?.suffix ?? '';
|
|
1616
|
+
if (prefix || suffix) {
|
|
1617
|
+
return `${prefix}${raw}${suffix}`;
|
|
1618
|
+
}
|
|
1619
|
+
return /^\d+$/.test(raw) ? `#${raw}` : raw;
|
|
1620
|
+
}, ...(ngDevMode ? [{ debugName: "headerKeyBadgeText" }] : /* istanbul ignore next */ []));
|
|
1621
|
+
headerKeyTooltip = computed(() => {
|
|
1622
|
+
const key = this.headerKeyPart();
|
|
1623
|
+
const badge = this.headerKeyBadgeText();
|
|
1624
|
+
if (!key || !badge) {
|
|
1625
|
+
return null;
|
|
1626
|
+
}
|
|
1627
|
+
const label = typeof key.label === 'string' ? key.label.trim() : '';
|
|
1628
|
+
return label ? `${label}: ${badge}` : badge;
|
|
1629
|
+
}, ...(ngDevMode ? [{ debugName: "headerKeyTooltip" }] : /* istanbul ignore next */ []));
|
|
1630
|
+
headerIdentity = computed(() => {
|
|
1631
|
+
const identity = this.resolution()?.identity ?? null;
|
|
1632
|
+
if (!identity) {
|
|
1633
|
+
return null;
|
|
1634
|
+
}
|
|
1635
|
+
if (this.shouldUseCustomBodyRenderer() || this.summaryItems().length > 0) {
|
|
1636
|
+
return {
|
|
1637
|
+
...identity,
|
|
1638
|
+
metadata: [],
|
|
1639
|
+
};
|
|
1640
|
+
}
|
|
1641
|
+
return identity;
|
|
1642
|
+
}, ...(ngDevMode ? [{ debugName: "headerIdentity" }] : /* istanbul ignore next */ []));
|
|
1643
|
+
contextLabel = computed(() => {
|
|
1644
|
+
const res = this.resolution();
|
|
1645
|
+
const surfaceTitle = String(res?.surface?.title ?? '').trim();
|
|
1646
|
+
if (!surfaceTitle) {
|
|
1647
|
+
return null;
|
|
1648
|
+
}
|
|
1649
|
+
const mainTitle = String(res?.title ?? '').trim();
|
|
1650
|
+
return surfaceTitle.toLowerCase() === mainTitle.toLowerCase()
|
|
1651
|
+
? null
|
|
1652
|
+
: surfaceTitle;
|
|
1653
|
+
}, ...(ngDevMode ? [{ debugName: "contextLabel" }] : /* istanbul ignore next */ []));
|
|
1654
|
+
hasContextEyebrow = computed(() => {
|
|
1655
|
+
const res = this.resolution();
|
|
1656
|
+
return Boolean((res?.icon && res.icon.trim().length > 0) ||
|
|
1657
|
+
this.contextLabel() ||
|
|
1658
|
+
this.headerKeyBadgeText());
|
|
1659
|
+
}, ...(ngDevMode ? [{ debugName: "hasContextEyebrow" }] : /* istanbul ignore next */ []));
|
|
1660
|
+
safeAvatarUrl = computed(() => {
|
|
1661
|
+
const res = this.resolution();
|
|
1662
|
+
const rawCandidate = res?.avatarUrl ??
|
|
1663
|
+
(typeof res?.identity?.avatar?.value === 'string'
|
|
1664
|
+
? res.identity.avatar.value
|
|
1665
|
+
: null);
|
|
1666
|
+
if (typeof rawCandidate !== 'string') {
|
|
1667
|
+
return null;
|
|
1668
|
+
}
|
|
1669
|
+
const candidate = rawCandidate.trim();
|
|
1670
|
+
if (!candidate || this.failedAvatarUrl() === candidate) {
|
|
1671
|
+
return null;
|
|
1672
|
+
}
|
|
1673
|
+
if (candidate.startsWith('https://') ||
|
|
1674
|
+
candidate.startsWith('http://') ||
|
|
1675
|
+
(candidate.startsWith('/') && !candidate.startsWith('//'))) {
|
|
1676
|
+
return candidate;
|
|
1677
|
+
}
|
|
1678
|
+
return null;
|
|
1679
|
+
}, ...(ngDevMode ? [{ debugName: "safeAvatarUrl" }] : /* istanbul ignore next */ []));
|
|
1680
|
+
onAvatarError(failedUrl) {
|
|
1681
|
+
this.failedAvatarUrl.set(failedUrl);
|
|
1682
|
+
}
|
|
1683
|
+
closeAriaLabel = computed(() => this.translate('quickView.closeAriaLabel', 'Fechar visualização rápida'), ...(ngDevMode ? [{ debugName: "closeAriaLabel" }] : /* istanbul ignore next */ []));
|
|
1684
|
+
copyButtonLabel = computed(() => this.translate('quickView.copyAction', 'Copiar'), ...(ngDevMode ? [{ debugName: "copyButtonLabel" }] : /* istanbul ignore next */ []));
|
|
1685
|
+
copiedLabel = computed(() => this.translate('quickView.copiedFeedback', 'Copiado'), ...(ngDevMode ? [{ debugName: "copiedLabel" }] : /* istanbul ignore next */ []));
|
|
1686
|
+
copySummaryLabel = computed(() => this.translate('quickView.copySummaryAction', 'Copiar resumo'), ...(ngDevMode ? [{ debugName: "copySummaryLabel" }] : /* istanbul ignore next */ []));
|
|
1687
|
+
summaryCopiedLabel = computed(() => this.translate('quickView.summaryCopiedFeedback', 'Resumo copiado'), ...(ngDevMode ? [{ debugName: "summaryCopiedLabel" }] : /* istanbul ignore next */ []));
|
|
1688
|
+
emptyStateLabel = computed(() => this.translate('quickView.emptyAttributes', 'Nenhum atributo resumido está disponível para este registro.'), ...(ngDevMode ? [{ debugName: "emptyStateLabel" }] : /* istanbul ignore next */ []));
|
|
1689
|
+
unavailableStateLabel = computed(() => this.translate('quickView.unavailableContext', 'Este resumo não está disponível para o seu contexto atual.'), ...(ngDevMode ? [{ debugName: "unavailableStateLabel" }] : /* istanbul ignore next */ []));
|
|
1690
|
+
errorStateLabel = computed(() => this.translate('quickView.loadError', 'Não foi possível carregar o resumo deste registro.'), ...(ngDevMode ? [{ debugName: "errorStateLabel" }] : /* istanbul ignore next */ []));
|
|
1691
|
+
defaultCtaLabel = computed(() => this.translate('quickView.openDetail', 'Abrir detalhe'), ...(ngDevMode ? [{ debugName: "defaultCtaLabel" }] : /* istanbul ignore next */ []));
|
|
1692
|
+
contextualActionsAriaLabel = computed(() => this.translate('quickView.contextualActionsAriaLabel', 'Ações rápidas do registro'), ...(ngDevMode ? [{ debugName: "contextualActionsAriaLabel" }] : /* istanbul ignore next */ []));
|
|
1693
|
+
maskedBadgeLabel = computed(() => this.translate('quickView.maskedBadge', 'LGPD'), ...(ngDevMode ? [{ debugName: "maskedBadgeLabel" }] : /* istanbul ignore next */ []));
|
|
1694
|
+
maskedFieldReasonLabel = computed(() => this.translate('quickView.maskedFieldReason', 'Dado protegido por política de governança / LGPD'), ...(ngDevMode ? [{ debugName: "maskedFieldReasonLabel" }] : /* istanbul ignore next */ []));
|
|
1695
|
+
accessibleLabel = computed(() => {
|
|
1696
|
+
const res = this.resolution();
|
|
1697
|
+
const identityTitle = String(res?.identity?.title?.value ?? res?.identity?.displayLabel ?? '').trim();
|
|
1698
|
+
return (identityTitle ||
|
|
1699
|
+
res?.title ||
|
|
1700
|
+
this.translate('quickView.dialogAriaLabel', 'Visualização rápida do registro'));
|
|
1701
|
+
}, ...(ngDevMode ? [{ debugName: "accessibleLabel" }] : /* istanbul ignore next */ []));
|
|
1702
|
+
translate(key, fallback) {
|
|
1703
|
+
if (!this.i18n) {
|
|
1704
|
+
return fallback;
|
|
1705
|
+
}
|
|
1706
|
+
const translated = this.i18n.t(key, undefined, fallback);
|
|
1707
|
+
return typeof translated === 'string' && translated.trim().length > 0
|
|
1708
|
+
? translated
|
|
1709
|
+
: fallback;
|
|
1710
|
+
}
|
|
1711
|
+
shouldUseCustomBodyRenderer = computed(() => {
|
|
1712
|
+
const res = this.resolution();
|
|
1713
|
+
const renderer = this.bodyRenderer();
|
|
1714
|
+
return Boolean(res?.state === 'ready' && renderer && res.binding.contentRef);
|
|
1715
|
+
}, ...(ngDevMode ? [{ debugName: "shouldUseCustomBodyRenderer" }] : /* istanbul ignore next */ []));
|
|
1716
|
+
customBodyInputs = computed(() => {
|
|
1717
|
+
const res = this.resolution();
|
|
1718
|
+
const renderer = this.bodyRenderer();
|
|
1719
|
+
if (!res || !renderer) {
|
|
1720
|
+
return {};
|
|
1721
|
+
}
|
|
1722
|
+
return renderer.buildInputs({
|
|
1723
|
+
resolution: res,
|
|
1724
|
+
onOpenDetail: () => this.openDetail.emit(),
|
|
1725
|
+
onOpenSurface: (surfaceId) => this.openSurface.emit(surfaceId),
|
|
1726
|
+
onCopyValue: (value, field) => this.copyValue.emit({ value, field }),
|
|
1727
|
+
onDismiss: () => this.dismiss.emit('programmatic'),
|
|
1728
|
+
});
|
|
1729
|
+
}, ...(ngDevMode ? [{ debugName: "customBodyInputs" }] : /* istanbul ignore next */ []));
|
|
1730
|
+
unmaskedCopyableItems = computed(() => this.summaryItems().filter((item) => Boolean(item.copyable && !item.masked && item.formattedValue?.trim())), ...(ngDevMode ? [{ debugName: "unmaskedCopyableItems" }] : /* istanbul ignore next */ []));
|
|
1731
|
+
canCopySummary = computed(() => !this.shouldUseCustomBodyRenderer() &&
|
|
1732
|
+
this.unmaskedCopyableItems().length > 0, ...(ngDevMode ? [{ debugName: "canCopySummary" }] : /* istanbul ignore next */ []));
|
|
1733
|
+
canAskAssistant = computed(() => Boolean(this.assistantLaunch?.isAvailable() && this.resolution()?.state === 'ready'), ...(ngDevMode ? [{ debugName: "canAskAssistant" }] : /* istanbul ignore next */ []));
|
|
1734
|
+
askAssistantLabel = computed(() => {
|
|
1735
|
+
const isEn = this.i18n?.getLocale?.()?.toLowerCase().startsWith('en') ?? false;
|
|
1736
|
+
return this.translate('quickView.askAssistantAction', isEn ? 'Ask Assistant' : 'Perguntar ao Assistente');
|
|
1737
|
+
}, ...(ngDevMode ? [{ debugName: "askAssistantLabel" }] : /* istanbul ignore next */ []));
|
|
1738
|
+
summaryClipboardText = computed(() => {
|
|
1739
|
+
const res = this.resolution();
|
|
1740
|
+
const items = this.unmaskedCopyableItems();
|
|
1741
|
+
if (!res || items.length === 0) {
|
|
1742
|
+
return '';
|
|
1743
|
+
}
|
|
1744
|
+
const lines = [];
|
|
1745
|
+
const context = this.contextLabel();
|
|
1746
|
+
const rawKey = String(res.identity?.key?.value ?? '').trim();
|
|
1747
|
+
const rawTitle = String(res.identity?.title?.value ?? res.title ?? '').trim();
|
|
1748
|
+
const isTitleMasked = rawTitle.includes('••') || rawTitle.includes('**');
|
|
1749
|
+
const safeTitle = isTitleMasked ? '' : rawTitle;
|
|
1750
|
+
const isKeyMasked = rawKey.includes('••') || rawKey.includes('**');
|
|
1751
|
+
const safeKey = isKeyMasked ? '' : rawKey;
|
|
1752
|
+
let headerLine = safeTitle;
|
|
1753
|
+
if (safeKey && safeTitle && safeKey !== safeTitle) {
|
|
1754
|
+
headerLine = `${safeTitle} (#${safeKey})`;
|
|
1755
|
+
}
|
|
1756
|
+
else if (safeKey && !safeTitle) {
|
|
1757
|
+
headerLine = `#${safeKey}`;
|
|
1758
|
+
}
|
|
1759
|
+
if (context && headerLine) {
|
|
1760
|
+
headerLine = `[${context}] ${headerLine}`;
|
|
1761
|
+
}
|
|
1762
|
+
else if (context) {
|
|
1763
|
+
headerLine = `[${context}]`;
|
|
1764
|
+
}
|
|
1765
|
+
if (headerLine) {
|
|
1766
|
+
lines.push(headerLine);
|
|
1767
|
+
}
|
|
1768
|
+
const subtitle = String(res.subtitle ?? '').trim();
|
|
1769
|
+
if (subtitle &&
|
|
1770
|
+
subtitle !== safeTitle &&
|
|
1771
|
+
!subtitle.includes('••') &&
|
|
1772
|
+
!subtitle.includes('**')) {
|
|
1773
|
+
lines.push(subtitle);
|
|
1774
|
+
}
|
|
1775
|
+
for (const item of items) {
|
|
1776
|
+
lines.push(`• ${item.label}: ${item.formattedValue}`);
|
|
1777
|
+
}
|
|
1778
|
+
return lines.join('\n');
|
|
1779
|
+
}, ...(ngDevMode ? [{ debugName: "summaryClipboardText" }] : /* istanbul ignore next */ []));
|
|
1780
|
+
focusInteractiveEntry() {
|
|
1781
|
+
const target = this.ctaButton?.nativeElement ??
|
|
1782
|
+
this.closeButton?.nativeElement ??
|
|
1783
|
+
this.dialogSurface?.nativeElement;
|
|
1784
|
+
if (target && typeof target.focus === 'function') {
|
|
1785
|
+
try {
|
|
1786
|
+
target.focus({ preventScroll: true });
|
|
1787
|
+
}
|
|
1788
|
+
catch {
|
|
1789
|
+
try {
|
|
1790
|
+
target.focus();
|
|
1791
|
+
}
|
|
1792
|
+
catch { }
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
}
|
|
1796
|
+
isBadgeOrChip(item) {
|
|
1797
|
+
if (item.masked) {
|
|
1798
|
+
return false;
|
|
1799
|
+
}
|
|
1800
|
+
const presenter = item.presentation?.presenter;
|
|
1801
|
+
return (presenter === 'badge' ||
|
|
1802
|
+
presenter === 'chip' ||
|
|
1803
|
+
presenter === 'status' ||
|
|
1804
|
+
Boolean(item.tone && item.tone !== 'neutral'));
|
|
1805
|
+
}
|
|
1806
|
+
onCopyItem(item) {
|
|
1807
|
+
if (!item.formattedValue || item.masked) {
|
|
1808
|
+
return;
|
|
1809
|
+
}
|
|
1810
|
+
this.markCopiedField(item.field);
|
|
1811
|
+
this.copyValue.emit({
|
|
1812
|
+
value: item.formattedValue,
|
|
1813
|
+
field: item.field,
|
|
1814
|
+
});
|
|
1815
|
+
}
|
|
1816
|
+
onCopySummary() {
|
|
1817
|
+
const summaryText = this.summaryClipboardText();
|
|
1818
|
+
if (!summaryText) {
|
|
1819
|
+
return;
|
|
1820
|
+
}
|
|
1821
|
+
this.markCopiedField('__summary__');
|
|
1822
|
+
this.copyValue.emit({
|
|
1823
|
+
value: summaryText,
|
|
1824
|
+
field: '__summary__',
|
|
1825
|
+
});
|
|
1826
|
+
}
|
|
1827
|
+
onAskAssistant() {
|
|
1828
|
+
const res = this.resolution();
|
|
1829
|
+
if (!res || !this.assistantLaunch?.isAvailable()) {
|
|
1830
|
+
return;
|
|
1831
|
+
}
|
|
1832
|
+
const isEn = this.i18n?.getLocale?.()?.toLowerCase().startsWith('en') ?? false;
|
|
1833
|
+
const entityIdRaw = res.identity?.key?.value;
|
|
1834
|
+
const entityId = entityIdRaw !== null && entityIdRaw !== undefined ? String(entityIdRaw).trim() : undefined;
|
|
1835
|
+
const title = String(res.identity?.title?.value ?? res.title ?? '').trim() || undefined;
|
|
1836
|
+
const resourceKey = res.surface?.resourceKey || res.binding?.recordOpen?.target?.resourceKey || undefined;
|
|
1837
|
+
const resourcePath = res.surface?.contextualReadPath || res.surface?.path || undefined;
|
|
1838
|
+
this.assistantLaunch.ask({
|
|
1839
|
+
prompt: isEn
|
|
1840
|
+
? `Analyze rules, restrictions, and history for ${title || resourceKey || 'this record'}${entityId ? ` (${entityId})` : ''}`
|
|
1841
|
+
: `Analise regras, restrições e histórico de ${title || resourceKey || 'este registro'}${entityId ? ` (${entityId})` : ''}`,
|
|
1842
|
+
resourceKey,
|
|
1843
|
+
resourcePath,
|
|
1844
|
+
entityId,
|
|
1845
|
+
recordTitle: title,
|
|
1846
|
+
});
|
|
1847
|
+
this.dismiss.emit('cta');
|
|
1848
|
+
}
|
|
1849
|
+
markCopiedField(field) {
|
|
1850
|
+
this.copiedField.set(field);
|
|
1851
|
+
if (this.copiedFeedbackTimer !== null) {
|
|
1852
|
+
clearTimeout(this.copiedFeedbackTimer);
|
|
1853
|
+
}
|
|
1854
|
+
this.copiedFeedbackTimer = setTimeout(() => {
|
|
1855
|
+
if (this.copiedField() === field) {
|
|
1856
|
+
this.copiedField.set(null);
|
|
1857
|
+
}
|
|
1858
|
+
this.copiedFeedbackTimer = null;
|
|
1859
|
+
}, 1800);
|
|
1860
|
+
}
|
|
1861
|
+
ngOnDestroy() {
|
|
1862
|
+
if (this.copiedFeedbackTimer !== null) {
|
|
1863
|
+
clearTimeout(this.copiedFeedbackTimer);
|
|
1864
|
+
this.copiedFeedbackTimer = null;
|
|
1865
|
+
}
|
|
1866
|
+
}
|
|
1867
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PraxisQuickViewOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1868
|
+
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: `
|
|
1869
|
+
<section
|
|
1870
|
+
#dialogSurface
|
|
1871
|
+
class="pdx-quick-view"
|
|
1872
|
+
[class.pdx-quick-view--narrow]="narrowModalMode()"
|
|
1873
|
+
role="dialog"
|
|
1874
|
+
[attr.aria-modal]="narrowModalMode() ? 'true' : null"
|
|
1875
|
+
[attr.aria-label]="accessibleLabel()"
|
|
1876
|
+
[attr.aria-busy]="resolution()?.state === 'loading' ? 'true' : null"
|
|
1877
|
+
[attr.data-quick-view-state]="resolution()?.state || 'idle'"
|
|
1878
|
+
tabindex="-1"
|
|
1879
|
+
(mouseenter)="pointerEnter.emit()"
|
|
1880
|
+
(mouseleave)="pointerLeave.emit()"
|
|
1881
|
+
>
|
|
1882
|
+
<header class="pdx-quick-view__header">
|
|
1883
|
+
@if (safeAvatarUrl(); as avatarSrc) {
|
|
1884
|
+
<div class="pdx-quick-view__avatar-wrap" data-testid="quick-view-avatar">
|
|
1885
|
+
<img
|
|
1886
|
+
class="pdx-quick-view__avatar-img"
|
|
1887
|
+
[src]="avatarSrc"
|
|
1888
|
+
alt=""
|
|
1889
|
+
loading="lazy"
|
|
1890
|
+
(error)="onAvatarError(avatarSrc)"
|
|
1891
|
+
/>
|
|
1892
|
+
</div>
|
|
1893
|
+
}
|
|
1894
|
+
<div class="pdx-quick-view__heading">
|
|
1895
|
+
@if (hasContextEyebrow()) {
|
|
1896
|
+
<div class="pdx-quick-view__context" data-testid="quick-view-context">
|
|
1897
|
+
@if (resolution()?.icon; as iconName) {
|
|
1898
|
+
<span class="pdx-quick-view__context-icon-badge" aria-hidden="true">
|
|
1899
|
+
<mat-icon
|
|
1900
|
+
class="pdx-quick-view__context-icon"
|
|
1901
|
+
[praxisIcon]="iconName"
|
|
1902
|
+
></mat-icon>
|
|
1903
|
+
</span>
|
|
1904
|
+
}
|
|
1905
|
+
@if (contextLabel(); as label) {
|
|
1906
|
+
<span class="pdx-quick-view__context-label">{{ label }}</span>
|
|
1907
|
+
}
|
|
1908
|
+
@if (headerKeyBadgeText(); as keyBadge) {
|
|
1909
|
+
<span
|
|
1910
|
+
class="pdx-quick-view__context-key"
|
|
1911
|
+
data-testid="quick-view-key-badge"
|
|
1912
|
+
[attr.title]="headerKeyTooltip()"
|
|
1913
|
+
>
|
|
1914
|
+
{{ keyBadge }}
|
|
1915
|
+
</span>
|
|
1916
|
+
}
|
|
1917
|
+
</div>
|
|
1918
|
+
}
|
|
1919
|
+
@if (headerIdentity(); as identity) {
|
|
1920
|
+
<praxis-resource-identity
|
|
1921
|
+
[identity]="identity"
|
|
1922
|
+
[emptyTitle]="resolution()?.title || ''"
|
|
1923
|
+
density="compact"
|
|
1924
|
+
[showKey]="false"
|
|
1925
|
+
[showMetadataLabels]="false"
|
|
1926
|
+
/>
|
|
1927
|
+
} @else {
|
|
1928
|
+
<h2 class="pdx-quick-view__title">{{ resolution()?.title }}</h2>
|
|
1929
|
+
}
|
|
1930
|
+
@if (resolution()?.subtitle; as subtitle) {
|
|
1931
|
+
<p class="pdx-quick-view__subtitle">{{ subtitle }}</p>
|
|
1932
|
+
}
|
|
1933
|
+
</div>
|
|
1934
|
+
<button
|
|
1935
|
+
#closeButton
|
|
1936
|
+
type="button"
|
|
1937
|
+
class="pdx-quick-view__close"
|
|
1938
|
+
[attr.aria-label]="closeAriaLabel()"
|
|
1939
|
+
(click)="dismiss.emit('programmatic')"
|
|
1940
|
+
>
|
|
1941
|
+
×
|
|
1942
|
+
</button>
|
|
1943
|
+
</header>
|
|
1944
|
+
|
|
1945
|
+
<div class="pdx-quick-view__body">
|
|
1946
|
+
@switch (resolution()?.state) {
|
|
1947
|
+
@case ('loading') {
|
|
1948
|
+
<div class="pdx-quick-view__skeleton" data-testid="quick-view-loading">
|
|
1949
|
+
<div class="pdx-quick-view__skeleton-line pdx-quick-view__skeleton-line--wide"></div>
|
|
1950
|
+
<div class="pdx-quick-view__skeleton-line"></div>
|
|
1951
|
+
<div class="pdx-quick-view__skeleton-line pdx-quick-view__skeleton-line--short"></div>
|
|
1952
|
+
</div>
|
|
1953
|
+
}
|
|
1954
|
+
@case ('ready') {
|
|
1955
|
+
@if (shouldUseCustomBodyRenderer()) {
|
|
1956
|
+
<ng-container
|
|
1957
|
+
*ngComponentOutlet="
|
|
1958
|
+
bodyRenderer()!.component;
|
|
1959
|
+
inputs: customBodyInputs()
|
|
1960
|
+
"
|
|
1961
|
+
/>
|
|
1962
|
+
} @else {
|
|
1963
|
+
@if (summaryItems().length > 0) {
|
|
1964
|
+
<dl class="pdx-quick-view__summary-list" data-testid="quick-view-summary-list">
|
|
1965
|
+
@for (item of summaryItems(); track item.field) {
|
|
1966
|
+
<div class="pdx-quick-view__summary-item">
|
|
1967
|
+
<dt class="pdx-quick-view__summary-label">
|
|
1968
|
+
@if (item.icon; as itemIcon) {
|
|
1969
|
+
<mat-icon
|
|
1970
|
+
class="pdx-quick-view__summary-label-icon"
|
|
1971
|
+
data-testid="quick-view-summary-item-icon"
|
|
1972
|
+
[praxisIcon]="itemIcon"
|
|
1973
|
+
aria-hidden="true"
|
|
1974
|
+
></mat-icon>
|
|
1975
|
+
}
|
|
1976
|
+
<span class="pdx-quick-view__summary-label-text">{{ item.label }}</span>
|
|
1977
|
+
</dt>
|
|
1978
|
+
<dd class="pdx-quick-view__summary-value-wrap">
|
|
1979
|
+
<span
|
|
1980
|
+
class="pdx-quick-view__summary-value"
|
|
1981
|
+
[class.pdx-quick-view__summary-value--badge]="isBadgeOrChip(item)"
|
|
1982
|
+
[class.pdx-quick-view__summary-value--masked]="item.masked"
|
|
1983
|
+
[attr.data-tone]="item.tone || null"
|
|
1984
|
+
[attr.title]="(item.masked ? (item.maskReason || maskedFieldReasonLabel()) : item.formattedValue) || null"
|
|
1985
|
+
>
|
|
1986
|
+
{{ item.formattedValue }}
|
|
1987
|
+
</span>
|
|
1988
|
+
@if (item.masked) {
|
|
1989
|
+
<span
|
|
1990
|
+
class="pdx-quick-view__masked-badge"
|
|
1991
|
+
data-testid="quick-view-masked-indicator"
|
|
1992
|
+
role="note"
|
|
1993
|
+
[attr.title]="item.maskReason || maskedFieldReasonLabel()"
|
|
1994
|
+
[attr.aria-label]="item.maskReason || maskedFieldReasonLabel()"
|
|
1995
|
+
>
|
|
1996
|
+
<svg
|
|
1997
|
+
class="pdx-quick-view__masked-icon"
|
|
1998
|
+
viewBox="0 0 16 16"
|
|
1999
|
+
fill="none"
|
|
2000
|
+
stroke="currentColor"
|
|
2001
|
+
stroke-width="1.5"
|
|
2002
|
+
aria-hidden="true"
|
|
2003
|
+
>
|
|
2004
|
+
<rect x="3.5" y="7" width="9" height="6.5" rx="1.5" />
|
|
2005
|
+
<path d="M5.5 7V5a2.5 2.5 0 0 1 5 0v2" />
|
|
2006
|
+
</svg>
|
|
2007
|
+
<span>{{ maskedBadgeLabel() }}</span>
|
|
2008
|
+
</span>
|
|
2009
|
+
}
|
|
2010
|
+
@if (item.copyable && !item.masked && item.formattedValue) {
|
|
2011
|
+
<button
|
|
2012
|
+
type="button"
|
|
2013
|
+
class="pdx-quick-view__copy-btn"
|
|
2014
|
+
[attr.data-copied]="copiedField() === item.field ? 'true' : null"
|
|
2015
|
+
[attr.title]="(copiedField() === item.field ? copiedLabel() : copyButtonLabel()) + ' ' + item.label"
|
|
2016
|
+
[attr.aria-label]="copyButtonLabel() + ' ' + item.label"
|
|
2017
|
+
(click)="onCopyItem(item)"
|
|
2018
|
+
>
|
|
2019
|
+
@if (copiedField() === item.field) {
|
|
2020
|
+
<svg
|
|
2021
|
+
class="pdx-quick-view__copy-icon"
|
|
2022
|
+
viewBox="0 0 16 16"
|
|
2023
|
+
fill="none"
|
|
2024
|
+
stroke="currentColor"
|
|
2025
|
+
stroke-width="1.8"
|
|
2026
|
+
stroke-linecap="round"
|
|
2027
|
+
stroke-linejoin="round"
|
|
2028
|
+
aria-hidden="true"
|
|
2029
|
+
>
|
|
2030
|
+
<path d="M3.5 8.5L6.5 11.5L12.5 4.5" />
|
|
2031
|
+
</svg>
|
|
2032
|
+
} @else {
|
|
2033
|
+
<svg
|
|
2034
|
+
class="pdx-quick-view__copy-icon"
|
|
2035
|
+
viewBox="0 0 16 16"
|
|
2036
|
+
fill="none"
|
|
2037
|
+
stroke="currentColor"
|
|
2038
|
+
stroke-width="1.5"
|
|
2039
|
+
stroke-linecap="round"
|
|
2040
|
+
stroke-linejoin="round"
|
|
2041
|
+
aria-hidden="true"
|
|
2042
|
+
>
|
|
2043
|
+
<rect x="5.5" y="5.5" width="8" height="8" rx="1.5" />
|
|
2044
|
+
<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" />
|
|
2045
|
+
</svg>
|
|
2046
|
+
}
|
|
2047
|
+
<span class="pdx-quick-view__sr-only">
|
|
2048
|
+
{{ copiedField() === item.field ? copiedLabel() : copyButtonLabel() }}
|
|
2049
|
+
</span>
|
|
2050
|
+
</button>
|
|
2051
|
+
}
|
|
2052
|
+
</dd>
|
|
2053
|
+
</div>
|
|
2054
|
+
}
|
|
2055
|
+
</dl>
|
|
2056
|
+
}
|
|
2057
|
+
}
|
|
2058
|
+
}
|
|
2059
|
+
@case ('empty') {
|
|
2060
|
+
<p class="pdx-quick-view__feedback pdx-quick-view__feedback--empty" data-testid="quick-view-empty">
|
|
2061
|
+
{{ resolution()?.failureReason || emptyStateLabel() }}
|
|
2062
|
+
</p>
|
|
2063
|
+
}
|
|
2064
|
+
@case ('unavailable') {
|
|
2065
|
+
<p class="pdx-quick-view__feedback pdx-quick-view__feedback--unavailable" data-testid="quick-view-unavailable">
|
|
2066
|
+
{{ resolution()?.failureReason || unavailableStateLabel() }}
|
|
2067
|
+
</p>
|
|
2068
|
+
}
|
|
2069
|
+
@case ('error') {
|
|
2070
|
+
<p class="pdx-quick-view__feedback pdx-quick-view__feedback--error" data-testid="quick-view-error">
|
|
2071
|
+
{{ resolution()?.failureReason || errorStateLabel() }}
|
|
2072
|
+
</p>
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
</div>
|
|
2076
|
+
|
|
2077
|
+
@if (resolution()?.state === 'ready' && contextualActions().length > 0) {
|
|
2078
|
+
<div
|
|
2079
|
+
class="pdx-quick-view__contextual-actions"
|
|
2080
|
+
data-testid="quick-view-contextual-actions"
|
|
2081
|
+
role="group"
|
|
2082
|
+
[attr.aria-label]="contextualActionsAriaLabel()"
|
|
2083
|
+
>
|
|
2084
|
+
@for (action of contextualActions(); track action.surfaceId) {
|
|
2085
|
+
<button
|
|
2086
|
+
type="button"
|
|
2087
|
+
class="pdx-quick-view__contextual-btn"
|
|
2088
|
+
[attr.data-surface-id]="action.surfaceId"
|
|
2089
|
+
[attr.data-surface-kind]="action.kind || null"
|
|
2090
|
+
[attr.title]="action.description || action.title"
|
|
2091
|
+
(click)="openSurface.emit(action.surfaceId)"
|
|
2092
|
+
>
|
|
2093
|
+
@if (action.icon; as actionIcon) {
|
|
2094
|
+
<mat-icon
|
|
2095
|
+
class="pdx-quick-view__contextual-icon"
|
|
2096
|
+
[praxisIcon]="actionIcon"
|
|
2097
|
+
aria-hidden="true"
|
|
2098
|
+
></mat-icon>
|
|
2099
|
+
}
|
|
2100
|
+
<span class="pdx-quick-view__contextual-label">{{ action.title }}</span>
|
|
2101
|
+
</button>
|
|
2102
|
+
}
|
|
2103
|
+
</div>
|
|
2104
|
+
}
|
|
2105
|
+
|
|
2106
|
+
@if (resolution()?.state === 'ready' && (resolution()?.ctaAvailable || canCopySummary() || canAskAssistant())) {
|
|
2107
|
+
<footer class="pdx-quick-view__footer">
|
|
2108
|
+
@if (canCopySummary()) {
|
|
2109
|
+
<button
|
|
2110
|
+
type="button"
|
|
2111
|
+
class="pdx-quick-view__copy-summary-btn"
|
|
2112
|
+
data-testid="quick-view-copy-summary"
|
|
2113
|
+
[attr.data-copied]="copiedField() === '__summary__' ? 'true' : null"
|
|
2114
|
+
[attr.aria-label]="copiedField() === '__summary__' ? summaryCopiedLabel() : copySummaryLabel()"
|
|
2115
|
+
(click)="onCopySummary()"
|
|
2116
|
+
>
|
|
2117
|
+
@if (copiedField() === '__summary__') {
|
|
2118
|
+
<svg
|
|
2119
|
+
class="pdx-quick-view__copy-icon"
|
|
2120
|
+
viewBox="0 0 16 16"
|
|
2121
|
+
fill="none"
|
|
2122
|
+
stroke="currentColor"
|
|
2123
|
+
stroke-width="1.8"
|
|
2124
|
+
stroke-linecap="round"
|
|
2125
|
+
stroke-linejoin="round"
|
|
2126
|
+
aria-hidden="true"
|
|
2127
|
+
>
|
|
2128
|
+
<path d="M3.5 8.5L6.5 11.5L12.5 4.5" />
|
|
2129
|
+
</svg>
|
|
2130
|
+
} @else {
|
|
2131
|
+
<svg
|
|
2132
|
+
class="pdx-quick-view__copy-icon"
|
|
2133
|
+
viewBox="0 0 16 16"
|
|
2134
|
+
fill="none"
|
|
2135
|
+
stroke="currentColor"
|
|
2136
|
+
stroke-width="1.5"
|
|
2137
|
+
stroke-linecap="round"
|
|
2138
|
+
stroke-linejoin="round"
|
|
2139
|
+
aria-hidden="true"
|
|
2140
|
+
>
|
|
2141
|
+
<rect x="5.5" y="5.5" width="8" height="8" rx="1.5" />
|
|
2142
|
+
<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" />
|
|
2143
|
+
</svg>
|
|
2144
|
+
}
|
|
2145
|
+
<span>{{ copiedField() === '__summary__' ? summaryCopiedLabel() : copySummaryLabel() }}</span>
|
|
2146
|
+
</button>
|
|
2147
|
+
}
|
|
2148
|
+
@if (canAskAssistant()) {
|
|
2149
|
+
<button
|
|
2150
|
+
type="button"
|
|
2151
|
+
class="pdx-quick-view__copy-summary-btn pdx-quick-view__ask-ai-btn"
|
|
2152
|
+
data-testid="quick-view-ask-ai"
|
|
2153
|
+
[attr.aria-label]="askAssistantLabel()"
|
|
2154
|
+
(click)="onAskAssistant()"
|
|
2155
|
+
>
|
|
2156
|
+
<mat-icon class="pdx-quick-view__copy-icon" aria-hidden="true">auto_awesome</mat-icon>
|
|
2157
|
+
<span>{{ askAssistantLabel() }}</span>
|
|
2158
|
+
</button>
|
|
2159
|
+
}
|
|
2160
|
+
@if (resolution()?.ctaAvailable) {
|
|
2161
|
+
<button
|
|
2162
|
+
#ctaButton
|
|
2163
|
+
type="button"
|
|
2164
|
+
class="pdx-quick-view__cta"
|
|
2165
|
+
data-testid="quick-view-open-detail"
|
|
2166
|
+
(click)="openDetail.emit()"
|
|
2167
|
+
>
|
|
2168
|
+
{{ resolution()?.ctaLabel || defaultCtaLabel() }}
|
|
2169
|
+
</button>
|
|
2170
|
+
}
|
|
2171
|
+
</footer>
|
|
2172
|
+
}
|
|
2173
|
+
</section>
|
|
2174
|
+
`, 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 });
|
|
2175
|
+
}
|
|
2176
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PraxisQuickViewOverlayComponent, decorators: [{
|
|
2177
|
+
type: Component,
|
|
2178
|
+
args: [{ selector: 'praxis-quick-view-overlay', standalone: true, imports: [
|
|
2179
|
+
CommonModule,
|
|
2180
|
+
MatIconModule,
|
|
2181
|
+
PraxisIconDirective,
|
|
2182
|
+
PraxisResourceIdentityComponent,
|
|
2183
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
2184
|
+
<section
|
|
2185
|
+
#dialogSurface
|
|
2186
|
+
class="pdx-quick-view"
|
|
2187
|
+
[class.pdx-quick-view--narrow]="narrowModalMode()"
|
|
2188
|
+
role="dialog"
|
|
2189
|
+
[attr.aria-modal]="narrowModalMode() ? 'true' : null"
|
|
2190
|
+
[attr.aria-label]="accessibleLabel()"
|
|
2191
|
+
[attr.aria-busy]="resolution()?.state === 'loading' ? 'true' : null"
|
|
2192
|
+
[attr.data-quick-view-state]="resolution()?.state || 'idle'"
|
|
2193
|
+
tabindex="-1"
|
|
2194
|
+
(mouseenter)="pointerEnter.emit()"
|
|
2195
|
+
(mouseleave)="pointerLeave.emit()"
|
|
2196
|
+
>
|
|
2197
|
+
<header class="pdx-quick-view__header">
|
|
2198
|
+
@if (safeAvatarUrl(); as avatarSrc) {
|
|
2199
|
+
<div class="pdx-quick-view__avatar-wrap" data-testid="quick-view-avatar">
|
|
2200
|
+
<img
|
|
2201
|
+
class="pdx-quick-view__avatar-img"
|
|
2202
|
+
[src]="avatarSrc"
|
|
2203
|
+
alt=""
|
|
2204
|
+
loading="lazy"
|
|
2205
|
+
(error)="onAvatarError(avatarSrc)"
|
|
2206
|
+
/>
|
|
2207
|
+
</div>
|
|
2208
|
+
}
|
|
2209
|
+
<div class="pdx-quick-view__heading">
|
|
2210
|
+
@if (hasContextEyebrow()) {
|
|
2211
|
+
<div class="pdx-quick-view__context" data-testid="quick-view-context">
|
|
2212
|
+
@if (resolution()?.icon; as iconName) {
|
|
2213
|
+
<span class="pdx-quick-view__context-icon-badge" aria-hidden="true">
|
|
2214
|
+
<mat-icon
|
|
2215
|
+
class="pdx-quick-view__context-icon"
|
|
2216
|
+
[praxisIcon]="iconName"
|
|
2217
|
+
></mat-icon>
|
|
2218
|
+
</span>
|
|
2219
|
+
}
|
|
2220
|
+
@if (contextLabel(); as label) {
|
|
2221
|
+
<span class="pdx-quick-view__context-label">{{ label }}</span>
|
|
2222
|
+
}
|
|
2223
|
+
@if (headerKeyBadgeText(); as keyBadge) {
|
|
2224
|
+
<span
|
|
2225
|
+
class="pdx-quick-view__context-key"
|
|
2226
|
+
data-testid="quick-view-key-badge"
|
|
2227
|
+
[attr.title]="headerKeyTooltip()"
|
|
2228
|
+
>
|
|
2229
|
+
{{ keyBadge }}
|
|
2230
|
+
</span>
|
|
2231
|
+
}
|
|
2232
|
+
</div>
|
|
2233
|
+
}
|
|
2234
|
+
@if (headerIdentity(); as identity) {
|
|
2235
|
+
<praxis-resource-identity
|
|
2236
|
+
[identity]="identity"
|
|
2237
|
+
[emptyTitle]="resolution()?.title || ''"
|
|
2238
|
+
density="compact"
|
|
2239
|
+
[showKey]="false"
|
|
2240
|
+
[showMetadataLabels]="false"
|
|
2241
|
+
/>
|
|
2242
|
+
} @else {
|
|
2243
|
+
<h2 class="pdx-quick-view__title">{{ resolution()?.title }}</h2>
|
|
2244
|
+
}
|
|
2245
|
+
@if (resolution()?.subtitle; as subtitle) {
|
|
2246
|
+
<p class="pdx-quick-view__subtitle">{{ subtitle }}</p>
|
|
2247
|
+
}
|
|
2248
|
+
</div>
|
|
2249
|
+
<button
|
|
2250
|
+
#closeButton
|
|
2251
|
+
type="button"
|
|
2252
|
+
class="pdx-quick-view__close"
|
|
2253
|
+
[attr.aria-label]="closeAriaLabel()"
|
|
2254
|
+
(click)="dismiss.emit('programmatic')"
|
|
2255
|
+
>
|
|
2256
|
+
×
|
|
2257
|
+
</button>
|
|
2258
|
+
</header>
|
|
2259
|
+
|
|
2260
|
+
<div class="pdx-quick-view__body">
|
|
2261
|
+
@switch (resolution()?.state) {
|
|
2262
|
+
@case ('loading') {
|
|
2263
|
+
<div class="pdx-quick-view__skeleton" data-testid="quick-view-loading">
|
|
2264
|
+
<div class="pdx-quick-view__skeleton-line pdx-quick-view__skeleton-line--wide"></div>
|
|
2265
|
+
<div class="pdx-quick-view__skeleton-line"></div>
|
|
2266
|
+
<div class="pdx-quick-view__skeleton-line pdx-quick-view__skeleton-line--short"></div>
|
|
2267
|
+
</div>
|
|
2268
|
+
}
|
|
2269
|
+
@case ('ready') {
|
|
2270
|
+
@if (shouldUseCustomBodyRenderer()) {
|
|
2271
|
+
<ng-container
|
|
2272
|
+
*ngComponentOutlet="
|
|
2273
|
+
bodyRenderer()!.component;
|
|
2274
|
+
inputs: customBodyInputs()
|
|
2275
|
+
"
|
|
2276
|
+
/>
|
|
2277
|
+
} @else {
|
|
2278
|
+
@if (summaryItems().length > 0) {
|
|
2279
|
+
<dl class="pdx-quick-view__summary-list" data-testid="quick-view-summary-list">
|
|
2280
|
+
@for (item of summaryItems(); track item.field) {
|
|
2281
|
+
<div class="pdx-quick-view__summary-item">
|
|
2282
|
+
<dt class="pdx-quick-view__summary-label">
|
|
2283
|
+
@if (item.icon; as itemIcon) {
|
|
2284
|
+
<mat-icon
|
|
2285
|
+
class="pdx-quick-view__summary-label-icon"
|
|
2286
|
+
data-testid="quick-view-summary-item-icon"
|
|
2287
|
+
[praxisIcon]="itemIcon"
|
|
2288
|
+
aria-hidden="true"
|
|
2289
|
+
></mat-icon>
|
|
2290
|
+
}
|
|
2291
|
+
<span class="pdx-quick-view__summary-label-text">{{ item.label }}</span>
|
|
2292
|
+
</dt>
|
|
2293
|
+
<dd class="pdx-quick-view__summary-value-wrap">
|
|
2294
|
+
<span
|
|
2295
|
+
class="pdx-quick-view__summary-value"
|
|
2296
|
+
[class.pdx-quick-view__summary-value--badge]="isBadgeOrChip(item)"
|
|
2297
|
+
[class.pdx-quick-view__summary-value--masked]="item.masked"
|
|
2298
|
+
[attr.data-tone]="item.tone || null"
|
|
2299
|
+
[attr.title]="(item.masked ? (item.maskReason || maskedFieldReasonLabel()) : item.formattedValue) || null"
|
|
2300
|
+
>
|
|
2301
|
+
{{ item.formattedValue }}
|
|
2302
|
+
</span>
|
|
2303
|
+
@if (item.masked) {
|
|
2304
|
+
<span
|
|
2305
|
+
class="pdx-quick-view__masked-badge"
|
|
2306
|
+
data-testid="quick-view-masked-indicator"
|
|
2307
|
+
role="note"
|
|
2308
|
+
[attr.title]="item.maskReason || maskedFieldReasonLabel()"
|
|
2309
|
+
[attr.aria-label]="item.maskReason || maskedFieldReasonLabel()"
|
|
2310
|
+
>
|
|
2311
|
+
<svg
|
|
2312
|
+
class="pdx-quick-view__masked-icon"
|
|
2313
|
+
viewBox="0 0 16 16"
|
|
2314
|
+
fill="none"
|
|
2315
|
+
stroke="currentColor"
|
|
2316
|
+
stroke-width="1.5"
|
|
2317
|
+
aria-hidden="true"
|
|
2318
|
+
>
|
|
2319
|
+
<rect x="3.5" y="7" width="9" height="6.5" rx="1.5" />
|
|
2320
|
+
<path d="M5.5 7V5a2.5 2.5 0 0 1 5 0v2" />
|
|
2321
|
+
</svg>
|
|
2322
|
+
<span>{{ maskedBadgeLabel() }}</span>
|
|
2323
|
+
</span>
|
|
2324
|
+
}
|
|
2325
|
+
@if (item.copyable && !item.masked && item.formattedValue) {
|
|
2326
|
+
<button
|
|
2327
|
+
type="button"
|
|
2328
|
+
class="pdx-quick-view__copy-btn"
|
|
2329
|
+
[attr.data-copied]="copiedField() === item.field ? 'true' : null"
|
|
2330
|
+
[attr.title]="(copiedField() === item.field ? copiedLabel() : copyButtonLabel()) + ' ' + item.label"
|
|
2331
|
+
[attr.aria-label]="copyButtonLabel() + ' ' + item.label"
|
|
2332
|
+
(click)="onCopyItem(item)"
|
|
2333
|
+
>
|
|
2334
|
+
@if (copiedField() === item.field) {
|
|
2335
|
+
<svg
|
|
2336
|
+
class="pdx-quick-view__copy-icon"
|
|
2337
|
+
viewBox="0 0 16 16"
|
|
2338
|
+
fill="none"
|
|
2339
|
+
stroke="currentColor"
|
|
2340
|
+
stroke-width="1.8"
|
|
2341
|
+
stroke-linecap="round"
|
|
2342
|
+
stroke-linejoin="round"
|
|
2343
|
+
aria-hidden="true"
|
|
2344
|
+
>
|
|
2345
|
+
<path d="M3.5 8.5L6.5 11.5L12.5 4.5" />
|
|
2346
|
+
</svg>
|
|
2347
|
+
} @else {
|
|
2348
|
+
<svg
|
|
2349
|
+
class="pdx-quick-view__copy-icon"
|
|
2350
|
+
viewBox="0 0 16 16"
|
|
2351
|
+
fill="none"
|
|
2352
|
+
stroke="currentColor"
|
|
2353
|
+
stroke-width="1.5"
|
|
2354
|
+
stroke-linecap="round"
|
|
2355
|
+
stroke-linejoin="round"
|
|
2356
|
+
aria-hidden="true"
|
|
2357
|
+
>
|
|
2358
|
+
<rect x="5.5" y="5.5" width="8" height="8" rx="1.5" />
|
|
2359
|
+
<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" />
|
|
2360
|
+
</svg>
|
|
2361
|
+
}
|
|
2362
|
+
<span class="pdx-quick-view__sr-only">
|
|
2363
|
+
{{ copiedField() === item.field ? copiedLabel() : copyButtonLabel() }}
|
|
2364
|
+
</span>
|
|
2365
|
+
</button>
|
|
2366
|
+
}
|
|
2367
|
+
</dd>
|
|
2368
|
+
</div>
|
|
2369
|
+
}
|
|
2370
|
+
</dl>
|
|
2371
|
+
}
|
|
2372
|
+
}
|
|
2373
|
+
}
|
|
2374
|
+
@case ('empty') {
|
|
2375
|
+
<p class="pdx-quick-view__feedback pdx-quick-view__feedback--empty" data-testid="quick-view-empty">
|
|
2376
|
+
{{ resolution()?.failureReason || emptyStateLabel() }}
|
|
2377
|
+
</p>
|
|
2378
|
+
}
|
|
2379
|
+
@case ('unavailable') {
|
|
2380
|
+
<p class="pdx-quick-view__feedback pdx-quick-view__feedback--unavailable" data-testid="quick-view-unavailable">
|
|
2381
|
+
{{ resolution()?.failureReason || unavailableStateLabel() }}
|
|
2382
|
+
</p>
|
|
2383
|
+
}
|
|
2384
|
+
@case ('error') {
|
|
2385
|
+
<p class="pdx-quick-view__feedback pdx-quick-view__feedback--error" data-testid="quick-view-error">
|
|
2386
|
+
{{ resolution()?.failureReason || errorStateLabel() }}
|
|
2387
|
+
</p>
|
|
2388
|
+
}
|
|
2389
|
+
}
|
|
2390
|
+
</div>
|
|
2391
|
+
|
|
2392
|
+
@if (resolution()?.state === 'ready' && contextualActions().length > 0) {
|
|
2393
|
+
<div
|
|
2394
|
+
class="pdx-quick-view__contextual-actions"
|
|
2395
|
+
data-testid="quick-view-contextual-actions"
|
|
2396
|
+
role="group"
|
|
2397
|
+
[attr.aria-label]="contextualActionsAriaLabel()"
|
|
2398
|
+
>
|
|
2399
|
+
@for (action of contextualActions(); track action.surfaceId) {
|
|
2400
|
+
<button
|
|
2401
|
+
type="button"
|
|
2402
|
+
class="pdx-quick-view__contextual-btn"
|
|
2403
|
+
[attr.data-surface-id]="action.surfaceId"
|
|
2404
|
+
[attr.data-surface-kind]="action.kind || null"
|
|
2405
|
+
[attr.title]="action.description || action.title"
|
|
2406
|
+
(click)="openSurface.emit(action.surfaceId)"
|
|
2407
|
+
>
|
|
2408
|
+
@if (action.icon; as actionIcon) {
|
|
2409
|
+
<mat-icon
|
|
2410
|
+
class="pdx-quick-view__contextual-icon"
|
|
2411
|
+
[praxisIcon]="actionIcon"
|
|
2412
|
+
aria-hidden="true"
|
|
2413
|
+
></mat-icon>
|
|
2414
|
+
}
|
|
2415
|
+
<span class="pdx-quick-view__contextual-label">{{ action.title }}</span>
|
|
2416
|
+
</button>
|
|
2417
|
+
}
|
|
2418
|
+
</div>
|
|
2419
|
+
}
|
|
2420
|
+
|
|
2421
|
+
@if (resolution()?.state === 'ready' && (resolution()?.ctaAvailable || canCopySummary() || canAskAssistant())) {
|
|
2422
|
+
<footer class="pdx-quick-view__footer">
|
|
2423
|
+
@if (canCopySummary()) {
|
|
2424
|
+
<button
|
|
2425
|
+
type="button"
|
|
2426
|
+
class="pdx-quick-view__copy-summary-btn"
|
|
2427
|
+
data-testid="quick-view-copy-summary"
|
|
2428
|
+
[attr.data-copied]="copiedField() === '__summary__' ? 'true' : null"
|
|
2429
|
+
[attr.aria-label]="copiedField() === '__summary__' ? summaryCopiedLabel() : copySummaryLabel()"
|
|
2430
|
+
(click)="onCopySummary()"
|
|
2431
|
+
>
|
|
2432
|
+
@if (copiedField() === '__summary__') {
|
|
2433
|
+
<svg
|
|
2434
|
+
class="pdx-quick-view__copy-icon"
|
|
2435
|
+
viewBox="0 0 16 16"
|
|
2436
|
+
fill="none"
|
|
2437
|
+
stroke="currentColor"
|
|
2438
|
+
stroke-width="1.8"
|
|
2439
|
+
stroke-linecap="round"
|
|
2440
|
+
stroke-linejoin="round"
|
|
2441
|
+
aria-hidden="true"
|
|
2442
|
+
>
|
|
2443
|
+
<path d="M3.5 8.5L6.5 11.5L12.5 4.5" />
|
|
2444
|
+
</svg>
|
|
2445
|
+
} @else {
|
|
2446
|
+
<svg
|
|
2447
|
+
class="pdx-quick-view__copy-icon"
|
|
2448
|
+
viewBox="0 0 16 16"
|
|
2449
|
+
fill="none"
|
|
2450
|
+
stroke="currentColor"
|
|
2451
|
+
stroke-width="1.5"
|
|
2452
|
+
stroke-linecap="round"
|
|
2453
|
+
stroke-linejoin="round"
|
|
2454
|
+
aria-hidden="true"
|
|
2455
|
+
>
|
|
2456
|
+
<rect x="5.5" y="5.5" width="8" height="8" rx="1.5" />
|
|
2457
|
+
<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" />
|
|
2458
|
+
</svg>
|
|
2459
|
+
}
|
|
2460
|
+
<span>{{ copiedField() === '__summary__' ? summaryCopiedLabel() : copySummaryLabel() }}</span>
|
|
2461
|
+
</button>
|
|
2462
|
+
}
|
|
2463
|
+
@if (canAskAssistant()) {
|
|
2464
|
+
<button
|
|
2465
|
+
type="button"
|
|
2466
|
+
class="pdx-quick-view__copy-summary-btn pdx-quick-view__ask-ai-btn"
|
|
2467
|
+
data-testid="quick-view-ask-ai"
|
|
2468
|
+
[attr.aria-label]="askAssistantLabel()"
|
|
2469
|
+
(click)="onAskAssistant()"
|
|
2470
|
+
>
|
|
2471
|
+
<mat-icon class="pdx-quick-view__copy-icon" aria-hidden="true">auto_awesome</mat-icon>
|
|
2472
|
+
<span>{{ askAssistantLabel() }}</span>
|
|
2473
|
+
</button>
|
|
2474
|
+
}
|
|
2475
|
+
@if (resolution()?.ctaAvailable) {
|
|
2476
|
+
<button
|
|
2477
|
+
#ctaButton
|
|
2478
|
+
type="button"
|
|
2479
|
+
class="pdx-quick-view__cta"
|
|
2480
|
+
data-testid="quick-view-open-detail"
|
|
2481
|
+
(click)="openDetail.emit()"
|
|
2482
|
+
>
|
|
2483
|
+
{{ resolution()?.ctaLabel || defaultCtaLabel() }}
|
|
2484
|
+
</button>
|
|
2485
|
+
}
|
|
2486
|
+
</footer>
|
|
2487
|
+
}
|
|
2488
|
+
</section>
|
|
2489
|
+
`, 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"] }]
|
|
2490
|
+
}], propDecorators: { pointerEnter: [{
|
|
2491
|
+
type: Output
|
|
2492
|
+
}], pointerLeave: [{
|
|
2493
|
+
type: Output
|
|
2494
|
+
}], openDetail: [{
|
|
2495
|
+
type: Output
|
|
2496
|
+
}], openSurface: [{
|
|
2497
|
+
type: Output
|
|
2498
|
+
}], copyValue: [{
|
|
2499
|
+
type: Output
|
|
2500
|
+
}], dismiss: [{
|
|
2501
|
+
type: Output
|
|
2502
|
+
}], dialogSurface: [{
|
|
2503
|
+
type: ViewChild,
|
|
2504
|
+
args: ['dialogSurface']
|
|
2505
|
+
}], ctaButton: [{
|
|
2506
|
+
type: ViewChild,
|
|
2507
|
+
args: ['ctaButton']
|
|
2508
|
+
}], closeButton: [{
|
|
2509
|
+
type: ViewChild,
|
|
2510
|
+
args: ['closeButton']
|
|
2511
|
+
}] } });
|
|
2512
|
+
|
|
2513
|
+
const QUICK_VIEW_CONNECTED_POSITIONS = [
|
|
2514
|
+
{
|
|
2515
|
+
originX: 'start',
|
|
2516
|
+
originY: 'bottom',
|
|
2517
|
+
overlayX: 'start',
|
|
2518
|
+
overlayY: 'top',
|
|
2519
|
+
offsetY: 4,
|
|
2520
|
+
},
|
|
2521
|
+
{
|
|
2522
|
+
originX: 'end',
|
|
2523
|
+
originY: 'bottom',
|
|
2524
|
+
overlayX: 'end',
|
|
2525
|
+
overlayY: 'top',
|
|
2526
|
+
offsetY: 4,
|
|
2527
|
+
},
|
|
2528
|
+
{
|
|
2529
|
+
originX: 'start',
|
|
2530
|
+
originY: 'top',
|
|
2531
|
+
overlayX: 'start',
|
|
2532
|
+
overlayY: 'bottom',
|
|
2533
|
+
offsetY: -4,
|
|
2534
|
+
},
|
|
2535
|
+
{
|
|
2536
|
+
originX: 'end',
|
|
2537
|
+
originY: 'top',
|
|
2538
|
+
overlayX: 'end',
|
|
2539
|
+
overlayY: 'bottom',
|
|
2540
|
+
offsetY: -4,
|
|
2541
|
+
},
|
|
2542
|
+
{
|
|
2543
|
+
originX: 'end',
|
|
2544
|
+
originY: 'center',
|
|
2545
|
+
overlayX: 'start',
|
|
2546
|
+
overlayY: 'center',
|
|
2547
|
+
offsetX: 6,
|
|
2548
|
+
},
|
|
2549
|
+
{
|
|
2550
|
+
originX: 'start',
|
|
2551
|
+
originY: 'center',
|
|
2552
|
+
overlayX: 'end',
|
|
2553
|
+
overlayY: 'center',
|
|
2554
|
+
offsetX: -6,
|
|
2555
|
+
},
|
|
2556
|
+
];
|
|
2557
|
+
/**
|
|
2558
|
+
* Apresentador conectado não-modal para Quick View em `@praxisui/dialog`.
|
|
2559
|
+
*
|
|
2560
|
+
* Regras arquiteturais:
|
|
2561
|
+
* - Em desktop (`hover`, `focus-shortcut`, `explicit-button`), utiliza `flexibleConnectedTo`
|
|
2562
|
+
* sem `aria-modal="true"` e sem trap global de foco;
|
|
2563
|
+
* - Em `narrow-tap` (ou viewport compacta <= 640px sob ativação explícita), utiliza folha compacta
|
|
2564
|
+
* inferior com backdrop e semântica modal real;
|
|
2565
|
+
* - Reposiciona em scroll/resize enquanto a âncora permanecer válida e fecha imediatamente
|
|
2566
|
+
* quando a âncora sai do DOM ou se torna inválida;
|
|
2567
|
+
* - Restaura o foco ao gatilho original quando o usuário fecha por `Escape` ou botão Fechar
|
|
2568
|
+
* estando com o foco dentro do card.
|
|
2569
|
+
*/
|
|
2570
|
+
class QuickViewDialogPresenterService {
|
|
2571
|
+
overlay = inject(Overlay);
|
|
2572
|
+
injector = inject(Injector);
|
|
2573
|
+
layerScale = inject(PraxisLayerScaleStyleService);
|
|
2574
|
+
activeSession = null;
|
|
2575
|
+
present(options) {
|
|
2576
|
+
this.closeAll();
|
|
2577
|
+
this.layerScale.ensureInstalled();
|
|
2578
|
+
const narrowModalMode = this.shouldUseNarrowModalFallback(options);
|
|
2579
|
+
const overlayRef = this.overlay.create(this.buildOverlayConfig(options.anchor, narrowModalMode));
|
|
2580
|
+
const portal = new ComponentPortal(PraxisQuickViewOverlayComponent, null, this.injector);
|
|
2581
|
+
const compRef = overlayRef.attach(portal);
|
|
2582
|
+
compRef.instance.narrowModalMode.set(narrowModalMode);
|
|
2583
|
+
compRef.instance.bodyRenderer.set(options.bodyRenderer ?? null);
|
|
2584
|
+
compRef.instance.resolution.set(options.resolution);
|
|
2585
|
+
try {
|
|
2586
|
+
compRef.changeDetectorRef.detectChanges();
|
|
2587
|
+
}
|
|
2588
|
+
catch { }
|
|
2589
|
+
overlayRef.updatePosition();
|
|
2590
|
+
const session = new ActiveOverlaySession(overlayRef, compRef, options, narrowModalMode, (anchor) => this.resolveConnectedOrigin(anchor), () => {
|
|
2591
|
+
if (this.activeSession === session) {
|
|
2592
|
+
this.activeSession = null;
|
|
2593
|
+
}
|
|
2594
|
+
});
|
|
2595
|
+
this.activeSession = session;
|
|
2596
|
+
if (narrowModalMode ||
|
|
2597
|
+
options.trigger === 'explicit-button' ||
|
|
2598
|
+
options.trigger === 'focus-shortcut' ||
|
|
2599
|
+
options.trigger === 'narrow-tap') {
|
|
2600
|
+
queueMicrotask(() => {
|
|
2601
|
+
compRef.instance.focusInteractiveEntry();
|
|
2602
|
+
});
|
|
2603
|
+
}
|
|
2604
|
+
return session;
|
|
2605
|
+
}
|
|
2606
|
+
closeAll() {
|
|
2607
|
+
if (this.activeSession) {
|
|
2608
|
+
const current = this.activeSession;
|
|
2609
|
+
this.activeSession = null;
|
|
2610
|
+
current.close('programmatic');
|
|
2611
|
+
}
|
|
2612
|
+
}
|
|
2613
|
+
shouldUseNarrowModalFallback(options) {
|
|
2614
|
+
if (options.trigger === 'narrow-tap') {
|
|
2615
|
+
return true;
|
|
2616
|
+
}
|
|
2617
|
+
if (options.trigger === 'hover') {
|
|
2618
|
+
return false;
|
|
2619
|
+
}
|
|
2620
|
+
const width = typeof window !== 'undefined' && Number.isFinite(window.innerWidth)
|
|
2621
|
+
? window.innerWidth
|
|
2622
|
+
: 1280;
|
|
2623
|
+
return (width <= 640 &&
|
|
2624
|
+
(options.trigger === 'explicit-button' ||
|
|
2625
|
+
options.trigger === 'focus-shortcut'));
|
|
2626
|
+
}
|
|
2627
|
+
buildOverlayConfig(anchor, narrowModalMode) {
|
|
2628
|
+
if (narrowModalMode) {
|
|
2629
|
+
const positionStrategy = this.overlay
|
|
2630
|
+
.position()
|
|
2631
|
+
.global()
|
|
2632
|
+
.centerHorizontally()
|
|
2633
|
+
.bottom('12px');
|
|
2634
|
+
return new OverlayConfig({
|
|
2635
|
+
hasBackdrop: true,
|
|
2636
|
+
panelClass: ['pdx-quick-view-overlay-pane', 'pdx-quick-view-overlay-pane--narrow'],
|
|
2637
|
+
backdropClass: 'pdx-quick-view-backdrop',
|
|
2638
|
+
positionStrategy,
|
|
2639
|
+
scrollStrategy: this.overlay.scrollStrategies.block(),
|
|
2640
|
+
});
|
|
2641
|
+
}
|
|
2642
|
+
const origin = this.resolveConnectedOrigin(anchor);
|
|
2643
|
+
const positionStrategy = this.overlay
|
|
2644
|
+
.position()
|
|
2645
|
+
.flexibleConnectedTo(origin)
|
|
2646
|
+
.withPositions(QUICK_VIEW_CONNECTED_POSITIONS)
|
|
2647
|
+
.withViewportMargin(12)
|
|
2648
|
+
.withPush(true)
|
|
2649
|
+
.withFlexibleDimensions(false);
|
|
2650
|
+
return new OverlayConfig({
|
|
2651
|
+
hasBackdrop: false,
|
|
2652
|
+
panelClass: 'pdx-quick-view-overlay-pane',
|
|
2653
|
+
positionStrategy,
|
|
2654
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
2655
|
+
});
|
|
2656
|
+
}
|
|
2657
|
+
resolveConnectedOrigin(anchor) {
|
|
2658
|
+
if (anchor.kind === 'element') {
|
|
2659
|
+
return anchor.element;
|
|
2660
|
+
}
|
|
2661
|
+
const rect = anchor.getViewportRect() ?? {
|
|
2662
|
+
x: 0,
|
|
2663
|
+
y: 0,
|
|
2664
|
+
width: 0,
|
|
2665
|
+
height: 0,
|
|
2666
|
+
};
|
|
2667
|
+
return {
|
|
2668
|
+
x: rect.x,
|
|
2669
|
+
y: rect.y,
|
|
2670
|
+
width: rect.width,
|
|
2671
|
+
height: rect.height,
|
|
2672
|
+
};
|
|
2673
|
+
}
|
|
2674
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: QuickViewDialogPresenterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2675
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: QuickViewDialogPresenterService, providedIn: 'root' });
|
|
2676
|
+
}
|
|
2677
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: QuickViewDialogPresenterService, decorators: [{
|
|
2678
|
+
type: Injectable,
|
|
2679
|
+
args: [{ providedIn: 'root' }]
|
|
2680
|
+
}] });
|
|
2681
|
+
class ActiveOverlaySession {
|
|
2682
|
+
overlayRef;
|
|
2683
|
+
compRef;
|
|
2684
|
+
options;
|
|
2685
|
+
narrowModalMode;
|
|
2686
|
+
resolveOrigin;
|
|
2687
|
+
onDisposed;
|
|
2688
|
+
closedSubject = new Subject();
|
|
2689
|
+
pointerEnterSubject = new Subject();
|
|
2690
|
+
pointerLeaveSubject = new Subject();
|
|
2691
|
+
subs = [];
|
|
2692
|
+
cleanupDomListeners = [];
|
|
2693
|
+
isClosed = false;
|
|
2694
|
+
closed$ = this.closedSubject.asObservable();
|
|
2695
|
+
pointerEnteredCard$ = this.pointerEnterSubject.asObservable();
|
|
2696
|
+
pointerLeftCard$ = this.pointerLeaveSubject.asObservable();
|
|
2697
|
+
constructor(overlayRef, compRef, options, narrowModalMode, resolveOrigin, onDisposed) {
|
|
2698
|
+
this.overlayRef = overlayRef;
|
|
2699
|
+
this.compRef = compRef;
|
|
2700
|
+
this.options = options;
|
|
2701
|
+
this.narrowModalMode = narrowModalMode;
|
|
2702
|
+
this.resolveOrigin = resolveOrigin;
|
|
2703
|
+
this.onDisposed = onDisposed;
|
|
2704
|
+
const inst = compRef.instance;
|
|
2705
|
+
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)));
|
|
2706
|
+
if (narrowModalMode) {
|
|
2707
|
+
this.subs.push(overlayRef.backdropClick().subscribe(() => {
|
|
2708
|
+
this.close('outside-pointer');
|
|
2709
|
+
}));
|
|
2710
|
+
}
|
|
2711
|
+
this.installDomListeners();
|
|
2712
|
+
}
|
|
2713
|
+
update(resolution) {
|
|
2714
|
+
if (this.isClosed) {
|
|
2715
|
+
return;
|
|
2716
|
+
}
|
|
2717
|
+
const previousState = this.compRef.instance.resolution()?.state;
|
|
2718
|
+
const focusWasInside = this.wasFocusInsideOverlay();
|
|
2719
|
+
this.compRef.instance.resolution.set(resolution);
|
|
2720
|
+
try {
|
|
2721
|
+
this.compRef.changeDetectorRef.detectChanges();
|
|
2722
|
+
}
|
|
2723
|
+
catch { }
|
|
2724
|
+
this.updatePosition();
|
|
2725
|
+
if (previousState === 'loading' &&
|
|
2726
|
+
resolution.state === 'ready' &&
|
|
2727
|
+
(focusWasInside ||
|
|
2728
|
+
this.narrowModalMode ||
|
|
2729
|
+
this.options.trigger === 'explicit-button' ||
|
|
2730
|
+
this.options.trigger === 'focus-shortcut' ||
|
|
2731
|
+
this.options.trigger === 'narrow-tap')) {
|
|
2732
|
+
queueMicrotask(() => {
|
|
2733
|
+
if (!this.isClosed) {
|
|
2734
|
+
this.compRef.instance.focusInteractiveEntry();
|
|
2735
|
+
}
|
|
2736
|
+
});
|
|
2737
|
+
}
|
|
2738
|
+
}
|
|
2739
|
+
updatePosition() {
|
|
2740
|
+
if (this.isClosed) {
|
|
2741
|
+
return;
|
|
2742
|
+
}
|
|
2743
|
+
if (!isResourceQuickViewAnchorValid(this.options.anchor)) {
|
|
2744
|
+
this.close('anchor-invalid');
|
|
2745
|
+
return;
|
|
2746
|
+
}
|
|
2747
|
+
if (!this.narrowModalMode && this.options.anchor.kind === 'virtual-rect') {
|
|
2748
|
+
const strategy = this.overlayRef.getConfig().positionStrategy;
|
|
2749
|
+
strategy?.setOrigin?.(this.resolveOrigin(this.options.anchor));
|
|
2750
|
+
}
|
|
2751
|
+
this.overlayRef.updatePosition();
|
|
2752
|
+
}
|
|
2753
|
+
close(reason = 'programmatic') {
|
|
2754
|
+
if (this.isClosed) {
|
|
2755
|
+
return;
|
|
2756
|
+
}
|
|
2757
|
+
this.isClosed = true;
|
|
2758
|
+
const focusInside = this.wasFocusInsideOverlay();
|
|
2759
|
+
const isInteractiveTrigger = this.narrowModalMode ||
|
|
2760
|
+
this.options.trigger === 'explicit-button' ||
|
|
2761
|
+
this.options.trigger === 'focus-shortcut' ||
|
|
2762
|
+
this.options.trigger === 'narrow-tap';
|
|
2763
|
+
const shouldRestoreFocus = focusInside ||
|
|
2764
|
+
(isInteractiveTrigger &&
|
|
2765
|
+
(reason === 'escape' ||
|
|
2766
|
+
reason === 'programmatic' ||
|
|
2767
|
+
this.narrowModalMode));
|
|
2768
|
+
for (const cleanup of this.cleanupDomListeners) {
|
|
2769
|
+
cleanup();
|
|
2770
|
+
}
|
|
2771
|
+
this.cleanupDomListeners.length = 0;
|
|
2772
|
+
for (const sub of this.subs) {
|
|
2773
|
+
sub.unsubscribe();
|
|
2774
|
+
}
|
|
2775
|
+
this.subs.length = 0;
|
|
2776
|
+
try {
|
|
2777
|
+
this.overlayRef.dispose();
|
|
2778
|
+
}
|
|
2779
|
+
catch { }
|
|
2780
|
+
if (shouldRestoreFocus && reason !== 'cta') {
|
|
2781
|
+
this.restoreFocusToOrigin();
|
|
2782
|
+
}
|
|
2783
|
+
this.closedSubject.next(reason);
|
|
2784
|
+
this.closedSubject.complete();
|
|
2785
|
+
this.pointerEnterSubject.complete();
|
|
2786
|
+
this.pointerLeaveSubject.complete();
|
|
2787
|
+
this.onDisposed();
|
|
2788
|
+
this.options.onDismiss(reason);
|
|
2789
|
+
}
|
|
2790
|
+
installDomListeners() {
|
|
2791
|
+
if (typeof document !== 'undefined') {
|
|
2792
|
+
const onKeydown = (event) => {
|
|
2793
|
+
if (event.key === 'Escape') {
|
|
2794
|
+
event.preventDefault();
|
|
2795
|
+
event.stopPropagation();
|
|
2796
|
+
event.stopImmediatePropagation();
|
|
2797
|
+
this.close('escape');
|
|
2798
|
+
}
|
|
2799
|
+
};
|
|
2800
|
+
document.addEventListener('keydown', onKeydown, true);
|
|
2801
|
+
this.cleanupDomListeners.push(() => document.removeEventListener('keydown', onKeydown, true));
|
|
2802
|
+
if (!this.narrowModalMode) {
|
|
2803
|
+
const onPointerDown = (event) => {
|
|
2804
|
+
const target = event.target;
|
|
2805
|
+
if (!target) {
|
|
2806
|
+
return;
|
|
2807
|
+
}
|
|
2808
|
+
if (this.overlayRef.overlayElement?.contains(target)) {
|
|
2809
|
+
return;
|
|
2810
|
+
}
|
|
2811
|
+
const anchorEl = this.options.anchor.kind === 'element'
|
|
2812
|
+
? this.options.anchor.element
|
|
2813
|
+
: this.options.anchor.hostElement;
|
|
2814
|
+
if (anchorEl && anchorEl.contains(target)) {
|
|
2815
|
+
return;
|
|
2816
|
+
}
|
|
2817
|
+
this.close('outside-pointer');
|
|
2818
|
+
};
|
|
2819
|
+
document.addEventListener('pointerdown', onPointerDown, true);
|
|
2820
|
+
this.cleanupDomListeners.push(() => document.removeEventListener('pointerdown', onPointerDown, true));
|
|
2821
|
+
}
|
|
2822
|
+
}
|
|
2823
|
+
if (typeof window !== 'undefined') {
|
|
2824
|
+
const onViewportChange = () => {
|
|
2825
|
+
this.updatePosition();
|
|
2826
|
+
};
|
|
2827
|
+
window.addEventListener('scroll', onViewportChange, true);
|
|
2828
|
+
window.addEventListener('resize', onViewportChange, { passive: true });
|
|
2829
|
+
this.cleanupDomListeners.push(() => {
|
|
2830
|
+
window.removeEventListener('scroll', onViewportChange, true);
|
|
2831
|
+
window.removeEventListener('resize', onViewportChange);
|
|
2832
|
+
});
|
|
2833
|
+
}
|
|
2834
|
+
}
|
|
2835
|
+
wasFocusInsideOverlay() {
|
|
2836
|
+
if (typeof document === 'undefined' || !document.activeElement) {
|
|
2837
|
+
return false;
|
|
2838
|
+
}
|
|
2839
|
+
return Boolean(this.overlayRef.overlayElement?.contains(document.activeElement));
|
|
2840
|
+
}
|
|
2841
|
+
restoreFocusToOrigin() {
|
|
2842
|
+
const anchor = this.options.anchor;
|
|
2843
|
+
const candidate = anchor.focusOrigin ??
|
|
2844
|
+
(anchor.kind === 'element' ? anchor.element : anchor.hostElement);
|
|
2845
|
+
if (candidate &&
|
|
2846
|
+
candidate.isConnected !== false &&
|
|
2847
|
+
typeof candidate.focus === 'function') {
|
|
2848
|
+
try {
|
|
2849
|
+
candidate.focus({ preventScroll: true });
|
|
2850
|
+
}
|
|
2851
|
+
catch {
|
|
2852
|
+
try {
|
|
2853
|
+
candidate.focus();
|
|
2854
|
+
}
|
|
2855
|
+
catch { }
|
|
2856
|
+
}
|
|
2857
|
+
}
|
|
2858
|
+
}
|
|
2859
|
+
}
|
|
2860
|
+
function providePraxisQuickViewDialogPresenter() {
|
|
2861
|
+
return {
|
|
2862
|
+
provide: PRAXIS_QUICK_VIEW_PRESENTER,
|
|
2863
|
+
useExisting: QuickViewDialogPresenterService,
|
|
2864
|
+
};
|
|
2865
|
+
}
|
|
2866
|
+
|
|
1565
2867
|
class LongContentDialogExampleComponent {
|
|
1566
2868
|
items = Array.from({ length: 40 }, (_, idx) => `Example line ${idx + 1}`);
|
|
1567
2869
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: LongContentDialogExampleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -1731,6 +3033,26 @@ function providePraxisDialogMetadata() {
|
|
|
1731
3033
|
};
|
|
1732
3034
|
}
|
|
1733
3035
|
|
|
3036
|
+
const dialogConfigRootResolutionSpec = {
|
|
3037
|
+
strategy: 'root-path',
|
|
3038
|
+
paths: ['config', ''],
|
|
3039
|
+
allowIndex: false,
|
|
3040
|
+
};
|
|
3041
|
+
const dialogPositionResolutionSpec = {
|
|
3042
|
+
strategy: 'root-path',
|
|
3043
|
+
paths: ['config.position', 'position'],
|
|
3044
|
+
allowIndex: false,
|
|
3045
|
+
};
|
|
3046
|
+
const dialogPresetResolutionSpec = {
|
|
3047
|
+
strategy: 'root-path',
|
|
3048
|
+
paths: ['variant', 'config'],
|
|
3049
|
+
allowIndex: false,
|
|
3050
|
+
};
|
|
3051
|
+
const dialogChildHostResolutionSpec = {
|
|
3052
|
+
strategy: 'root-path',
|
|
3053
|
+
paths: ['content', 'componentId', 'inputs', 'data'],
|
|
3054
|
+
allowIndex: false,
|
|
3055
|
+
};
|
|
1734
3056
|
const sizeFieldSchema = {
|
|
1735
3057
|
type: 'object',
|
|
1736
3058
|
minProperties: 1,
|
|
@@ -1791,13 +3113,13 @@ const PRAXIS_DIALOG_AUTHORING_MANIFEST = {
|
|
|
1791
3113
|
{ name: 'inputs', type: 'Record<string, unknown>', description: 'Inputs applied to the child component after opening the dialog.' },
|
|
1792
3114
|
],
|
|
1793
3115
|
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.' },
|
|
3116
|
+
{ kind: 'dialogShell', resolver: 'praxis-dialog-config-root', resolutionSpec: dialogConfigRootResolutionSpec, description: 'Top-level PraxisDialogConfig shell fields such as title, role, actions and theme.' },
|
|
3117
|
+
{ kind: 'size', resolver: 'praxis-dialog-size-fields', resolutionSpec: dialogConfigRootResolutionSpec, description: 'Width, height, min/max size fields on PraxisDialogConfig.' },
|
|
3118
|
+
{ kind: 'position', resolver: 'praxis-dialog-position-fields', resolutionSpec: dialogPositionResolutionSpec, description: 'Overlay position fields top, bottom, left and right.' },
|
|
3119
|
+
{ kind: 'backdrop', resolver: 'praxis-dialog-backdrop-fields', resolutionSpec: dialogConfigRootResolutionSpec, description: 'Backdrop enablement and backdrop class semantics.' },
|
|
3120
|
+
{ kind: 'closePolicy', resolver: 'praxis-dialog-close-policy-fields', resolutionSpec: dialogConfigRootResolutionSpec, description: 'disableClose, closeOnBackdropClick, closeOnNavigation, restoreFocus and autofocus behavior.' },
|
|
3121
|
+
{ kind: 'preset', resolver: 'praxis-dialog-global-preset-by-type-variant', resolutionSpec: dialogPresetResolutionSpec, description: 'Type and variant presets merged through PRAXIS_DIALOG_GLOBAL_PRESETS.' },
|
|
3122
|
+
{ kind: 'childHost', resolver: 'praxis-dialog-child-component-or-template-host', resolutionSpec: dialogChildHostResolutionSpec, description: 'Component/template registry child host and input/data envelope.' },
|
|
1801
3123
|
],
|
|
1802
3124
|
operations: [
|
|
1803
3125
|
{
|
|
@@ -1805,7 +3127,7 @@ const PRAXIS_DIALOG_AUTHORING_MANIFEST = {
|
|
|
1805
3127
|
title: 'Set dialog shell fields',
|
|
1806
3128
|
scope: 'global',
|
|
1807
3129
|
targetKind: 'dialogShell',
|
|
1808
|
-
target: { kind: 'dialogShell', resolver: 'praxis-dialog-config-root', ambiguityPolicy: 'fail', required: false },
|
|
3130
|
+
target: { kind: 'dialogShell', resolver: 'praxis-dialog-config-root', resolutionSpec: dialogConfigRootResolutionSpec, ambiguityPolicy: 'fail', required: false },
|
|
1809
3131
|
inputSchema: {
|
|
1810
3132
|
type: 'object',
|
|
1811
3133
|
minProperties: 1,
|
|
@@ -1833,7 +3155,7 @@ const PRAXIS_DIALOG_AUTHORING_MANIFEST = {
|
|
|
1833
3155
|
title: 'Set dialog size',
|
|
1834
3156
|
scope: 'layout',
|
|
1835
3157
|
targetKind: 'size',
|
|
1836
|
-
target: { kind: 'size', resolver: 'praxis-dialog-size-fields', ambiguityPolicy: 'fail', required: false },
|
|
3158
|
+
target: { kind: 'size', resolver: 'praxis-dialog-size-fields', resolutionSpec: dialogConfigRootResolutionSpec, ambiguityPolicy: 'fail', required: false },
|
|
1837
3159
|
inputSchema: sizeFieldSchema,
|
|
1838
3160
|
effects: [{ kind: 'merge-object', path: 'config' }],
|
|
1839
3161
|
destructive: false,
|
|
@@ -1848,7 +3170,7 @@ const PRAXIS_DIALOG_AUTHORING_MANIFEST = {
|
|
|
1848
3170
|
title: 'Set dialog position',
|
|
1849
3171
|
scope: 'layout',
|
|
1850
3172
|
targetKind: 'position',
|
|
1851
|
-
target: { kind: 'position', resolver: 'praxis-dialog-position-fields', ambiguityPolicy: 'fail', required: false },
|
|
3173
|
+
target: { kind: 'position', resolver: 'praxis-dialog-position-fields', resolutionSpec: dialogPositionResolutionSpec, ambiguityPolicy: 'fail', required: false },
|
|
1852
3174
|
inputSchema: positionSchema,
|
|
1853
3175
|
effects: [{ kind: 'set-value', path: 'config.position' }],
|
|
1854
3176
|
destructive: false,
|
|
@@ -1863,7 +3185,7 @@ const PRAXIS_DIALOG_AUTHORING_MANIFEST = {
|
|
|
1863
3185
|
title: 'Set dialog backdrop',
|
|
1864
3186
|
scope: 'skin',
|
|
1865
3187
|
targetKind: 'backdrop',
|
|
1866
|
-
target: { kind: 'backdrop', resolver: 'praxis-dialog-backdrop-fields', ambiguityPolicy: 'fail', required: false },
|
|
3188
|
+
target: { kind: 'backdrop', resolver: 'praxis-dialog-backdrop-fields', resolutionSpec: dialogConfigRootResolutionSpec, ambiguityPolicy: 'fail', required: false },
|
|
1867
3189
|
inputSchema: {
|
|
1868
3190
|
type: 'object',
|
|
1869
3191
|
minProperties: 1,
|
|
@@ -1885,7 +3207,7 @@ const PRAXIS_DIALOG_AUTHORING_MANIFEST = {
|
|
|
1885
3207
|
title: 'Set dialog close policy',
|
|
1886
3208
|
scope: 'accessibility',
|
|
1887
3209
|
targetKind: 'closePolicy',
|
|
1888
|
-
target: { kind: 'closePolicy', resolver: 'praxis-dialog-close-policy-fields', ambiguityPolicy: 'fail', required: false },
|
|
3210
|
+
target: { kind: 'closePolicy', resolver: 'praxis-dialog-close-policy-fields', resolutionSpec: dialogConfigRootResolutionSpec, ambiguityPolicy: 'fail', required: false },
|
|
1889
3211
|
inputSchema: closePolicySchema,
|
|
1890
3212
|
effects: [{ kind: 'merge-object', path: 'config' }],
|
|
1891
3213
|
destructive: true,
|
|
@@ -1900,7 +3222,7 @@ const PRAXIS_DIALOG_AUTHORING_MANIFEST = {
|
|
|
1900
3222
|
title: 'Apply dialog preset',
|
|
1901
3223
|
scope: 'global',
|
|
1902
3224
|
targetKind: 'preset',
|
|
1903
|
-
target: { kind: 'preset', resolver: 'praxis-dialog-global-preset-by-type-variant', ambiguityPolicy: 'fail', required: false },
|
|
3225
|
+
target: { kind: 'preset', resolver: 'praxis-dialog-global-preset-by-type-variant', resolutionSpec: dialogPresetResolutionSpec, ambiguityPolicy: 'fail', required: false },
|
|
1904
3226
|
inputSchema: {
|
|
1905
3227
|
type: 'object',
|
|
1906
3228
|
required: ['dialogType'],
|
|
@@ -1930,7 +3252,7 @@ const PRAXIS_DIALOG_AUTHORING_MANIFEST = {
|
|
|
1930
3252
|
title: 'Configure dialog child host',
|
|
1931
3253
|
scope: 'templating',
|
|
1932
3254
|
targetKind: 'childHost',
|
|
1933
|
-
target: { kind: 'childHost', resolver: 'praxis-dialog-child-component-or-template-host', ambiguityPolicy: 'fail', required: false },
|
|
3255
|
+
target: { kind: 'childHost', resolver: 'praxis-dialog-child-component-or-template-host', resolutionSpec: dialogChildHostResolutionSpec, ambiguityPolicy: 'fail', required: false },
|
|
1934
3256
|
inputSchema: childHostSchema,
|
|
1935
3257
|
effects: [{ kind: 'compile-domain-patch', handler: 'dialog-child-host-configure', handlerContract: {
|
|
1936
3258
|
reads: ['ComponentMetadataRegistry', 'PRAXIS_DIALOG_CONTENT_REGISTRY', 'PRAXIS_DIALOG_TEMPLATE_REGISTRY', 'content', 'componentId', 'inputs', 'data'],
|
|
@@ -1952,7 +3274,7 @@ const PRAXIS_DIALOG_AUTHORING_MANIFEST = {
|
|
|
1952
3274
|
title: 'Delegate operation to child manifest',
|
|
1953
3275
|
scope: 'templating',
|
|
1954
3276
|
targetKind: 'childHost',
|
|
1955
|
-
target: { kind: 'childHost', resolver: 'praxis-dialog-child-component-or-template-host', ambiguityPolicy: 'fail', required: true },
|
|
3277
|
+
target: { kind: 'childHost', resolver: 'praxis-dialog-child-component-or-template-host', resolutionSpec: dialogChildHostResolutionSpec, ambiguityPolicy: 'fail', required: true },
|
|
1956
3278
|
inputSchema: {
|
|
1957
3279
|
type: 'object',
|
|
1958
3280
|
required: ['childManifestComponentId', 'operationId', 'params'],
|
|
@@ -2028,4 +3350,4 @@ const PRAXIS_DIALOG_AUTHORING_MANIFEST = {
|
|
|
2028
3350
|
* Generated bundle index. Do not edit.
|
|
2029
3351
|
*/
|
|
2030
3352
|
|
|
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 };
|
|
3353
|
+
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 };
|