@praxisui/dialog 10.0.0-rc.50 → 10.0.0-rc.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-11-
|
|
3
|
+
"generatedAt": "2026-11-18T17:22:47.772Z",
|
|
4
4
|
"packageName": "@praxisui/dialog",
|
|
5
|
-
"packageVersion": "10.0.0-rc.
|
|
5
|
+
"packageVersion": "10.0.0-rc.52",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 1,
|
|
@@ -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, SURFACE_DRAWER_REF, SURFACE_DRAWER_CONTENT_DATA, GlobalConfigService, GLOBAL_DIALOG_SERVICE, ComponentMetadataRegistry, markGlobalActionProviderOperational, GLOBAL_SURFACE_SERVICE, SurfaceOpenMaterializerService, LoggerService, SURFACE_DRAWER_BRIDGE, PraxisSurfaceHostComponent, SurfaceNavigationError, PraxisI18nService, PraxisResourceIdentityComponent, isResourceQuickViewAnchorValid, PRAXIS_QUICK_VIEW_PRESENTER } from '@praxisui/core';
|
|
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';
|
|
@@ -1576,6 +1576,9 @@ function providePraxisSurfaceGlobalActions() {
|
|
|
1576
1576
|
|
|
1577
1577
|
class PraxisQuickViewOverlayComponent {
|
|
1578
1578
|
i18n = inject(PraxisI18nService, { optional: true });
|
|
1579
|
+
assistantLaunch = inject(PraxisOperationalAssistantLaunchService, {
|
|
1580
|
+
optional: true,
|
|
1581
|
+
});
|
|
1579
1582
|
resolution = signal(null, ...(ngDevMode ? [{ debugName: "resolution" }] : /* istanbul ignore next */ []));
|
|
1580
1583
|
bodyRenderer = signal(null, ...(ngDevMode ? [{ debugName: "bodyRenderer" }] : /* istanbul ignore next */ []));
|
|
1581
1584
|
narrowModalMode = signal(false, ...(ngDevMode ? [{ debugName: "narrowModalMode" }] : /* istanbul ignore next */ []));
|
|
@@ -1727,6 +1730,11 @@ class PraxisQuickViewOverlayComponent {
|
|
|
1727
1730
|
unmaskedCopyableItems = computed(() => this.summaryItems().filter((item) => Boolean(item.copyable && !item.masked && item.formattedValue?.trim())), ...(ngDevMode ? [{ debugName: "unmaskedCopyableItems" }] : /* istanbul ignore next */ []));
|
|
1728
1731
|
canCopySummary = computed(() => !this.shouldUseCustomBodyRenderer() &&
|
|
1729
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 */ []));
|
|
1730
1738
|
summaryClipboardText = computed(() => {
|
|
1731
1739
|
const res = this.resolution();
|
|
1732
1740
|
const items = this.unmaskedCopyableItems();
|
|
@@ -1816,6 +1824,28 @@ class PraxisQuickViewOverlayComponent {
|
|
|
1816
1824
|
field: '__summary__',
|
|
1817
1825
|
});
|
|
1818
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
|
+
}
|
|
1819
1849
|
markCopiedField(field) {
|
|
1820
1850
|
this.copiedField.set(field);
|
|
1821
1851
|
if (this.copiedFeedbackTimer !== null) {
|
|
@@ -2073,7 +2103,7 @@ class PraxisQuickViewOverlayComponent {
|
|
|
2073
2103
|
</div>
|
|
2074
2104
|
}
|
|
2075
2105
|
|
|
2076
|
-
@if (resolution()?.state === 'ready' && (resolution()?.ctaAvailable || canCopySummary())) {
|
|
2106
|
+
@if (resolution()?.state === 'ready' && (resolution()?.ctaAvailable || canCopySummary() || canAskAssistant())) {
|
|
2077
2107
|
<footer class="pdx-quick-view__footer">
|
|
2078
2108
|
@if (canCopySummary()) {
|
|
2079
2109
|
<button
|
|
@@ -2115,6 +2145,18 @@ class PraxisQuickViewOverlayComponent {
|
|
|
2115
2145
|
<span>{{ copiedField() === '__summary__' ? summaryCopiedLabel() : copySummaryLabel() }}</span>
|
|
2116
2146
|
</button>
|
|
2117
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
|
+
}
|
|
2118
2160
|
@if (resolution()?.ctaAvailable) {
|
|
2119
2161
|
<button
|
|
2120
2162
|
#ctaButton
|
|
@@ -2376,7 +2418,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
2376
2418
|
</div>
|
|
2377
2419
|
}
|
|
2378
2420
|
|
|
2379
|
-
@if (resolution()?.state === 'ready' && (resolution()?.ctaAvailable || canCopySummary())) {
|
|
2421
|
+
@if (resolution()?.state === 'ready' && (resolution()?.ctaAvailable || canCopySummary() || canAskAssistant())) {
|
|
2380
2422
|
<footer class="pdx-quick-view__footer">
|
|
2381
2423
|
@if (canCopySummary()) {
|
|
2382
2424
|
<button
|
|
@@ -2418,6 +2460,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
2418
2460
|
<span>{{ copiedField() === '__summary__' ? summaryCopiedLabel() : copySummaryLabel() }}</span>
|
|
2419
2461
|
</button>
|
|
2420
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
|
+
}
|
|
2421
2475
|
@if (resolution()?.ctaAvailable) {
|
|
2422
2476
|
<button
|
|
2423
2477
|
#ctaButton
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/dialog",
|
|
3
|
-
"version": "10.0.0-rc.
|
|
3
|
+
"version": "10.0.0-rc.52",
|
|
4
4
|
"description": "Dialog helpers and components for Praxis UI with Angular Material integration.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^21.0.0",
|
|
7
7
|
"@angular/core": "^21.0.0",
|
|
8
8
|
"@angular/cdk": "^21.0.0",
|
|
9
9
|
"@angular/forms": "^21.0.0",
|
|
10
|
-
"@praxisui/core": "^10.0.0-rc.
|
|
10
|
+
"@praxisui/core": "^10.0.0-rc.52",
|
|
11
11
|
"@angular/material": "^21.0.0",
|
|
12
12
|
"@angular/platform-browser": "^21.0.0",
|
|
13
13
|
"rxjs": "~7.8.0"
|
|
@@ -346,6 +346,7 @@ declare function providePraxisSurfaceGlobalActions(): Provider;
|
|
|
346
346
|
|
|
347
347
|
declare class PraxisQuickViewOverlayComponent implements OnDestroy {
|
|
348
348
|
private readonly i18n;
|
|
349
|
+
private readonly assistantLaunch;
|
|
349
350
|
readonly resolution: _angular_core.WritableSignal<ResourceQuickViewResolution | null>;
|
|
350
351
|
readonly bodyRenderer: _angular_core.WritableSignal<PraxisQuickViewBodyRenderer | null>;
|
|
351
352
|
readonly narrowModalMode: _angular_core.WritableSignal<boolean>;
|
|
@@ -392,11 +393,14 @@ declare class PraxisQuickViewOverlayComponent implements OnDestroy {
|
|
|
392
393
|
protected readonly customBodyInputs: _angular_core.Signal<Record<string, unknown>>;
|
|
393
394
|
protected readonly unmaskedCopyableItems: _angular_core.Signal<readonly ResourceQuickViewSummaryItem[]>;
|
|
394
395
|
protected readonly canCopySummary: _angular_core.Signal<boolean>;
|
|
396
|
+
protected readonly canAskAssistant: _angular_core.Signal<boolean>;
|
|
397
|
+
protected readonly askAssistantLabel: _angular_core.Signal<string>;
|
|
395
398
|
protected readonly summaryClipboardText: _angular_core.Signal<string>;
|
|
396
399
|
focusInteractiveEntry(): void;
|
|
397
400
|
protected isBadgeOrChip(item: ResourceQuickViewSummaryItem): boolean;
|
|
398
401
|
protected onCopyItem(item: ResourceQuickViewSummaryItem): void;
|
|
399
402
|
protected onCopySummary(): void;
|
|
403
|
+
protected onAskAssistant(): void;
|
|
400
404
|
private markCopiedField;
|
|
401
405
|
ngOnDestroy(): void;
|
|
402
406
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PraxisQuickViewOverlayComponent, never>;
|