@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
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.60",
|
|
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.60",
|
|
11
11
|
"@angular/material": "^21.0.0",
|
|
12
12
|
"@angular/platform-browser": "^21.0.0",
|
|
13
13
|
"rxjs": "~7.8.0"
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { Injector, ViewContainerRef, InjectionToken, TemplateRef, ComponentRef, OnInit, AfterViewInit, OnChanges, OnDestroy, EventEmitter, ElementRef, SimpleChanges, Type, Provider } from '@angular/core';
|
|
3
3
|
import { OverlayRef } from '@angular/cdk/overlay';
|
|
4
4
|
import { Observable, Subject } from 'rxjs';
|
|
5
5
|
import { CdkPortalOutlet } from '@angular/cdk/portal';
|
|
6
|
+
import * as _praxisui_core from '@praxisui/core';
|
|
7
|
+
import { ResourceQuickViewResolution, PraxisQuickViewBodyRenderer, ResourceQuickViewDismissReason, ResourceQuickViewSummaryItem, ResourceQuickViewActionItem, PraxisQuickViewPresenter, PraxisQuickViewPresentOptions, PraxisQuickViewPresenterSession, ComponentDocMeta, ComponentAuthoringManifest } from '@praxisui/core';
|
|
6
8
|
import * as _praxisui_dialog from '@praxisui/dialog';
|
|
7
|
-
import { ComponentDocMeta, ComponentAuthoringManifest } from '@praxisui/core';
|
|
8
9
|
|
|
9
10
|
type ActionsLayout = 'start' | 'center' | 'end' | 'stretched';
|
|
10
11
|
type DialogThemeColor = 'primary' | 'light' | 'dark';
|
|
@@ -191,22 +192,22 @@ declare class PraxisDialogRef<T = any, R = any> {
|
|
|
191
192
|
declare class PraxisDialogTitleDirective {
|
|
192
193
|
templateRef: TemplateRef<any>;
|
|
193
194
|
constructor(templateRef: TemplateRef<any>);
|
|
194
|
-
static ɵfac:
|
|
195
|
-
static ɵdir:
|
|
195
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PraxisDialogTitleDirective, never>;
|
|
196
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<PraxisDialogTitleDirective, "ng-template[praxisDialogTitle]", never, {}, {}, never, never, true, never>;
|
|
196
197
|
}
|
|
197
198
|
|
|
198
199
|
declare class PraxisDialogActionsDirective {
|
|
199
200
|
templateRef: TemplateRef<any>;
|
|
200
201
|
constructor(templateRef: TemplateRef<any>);
|
|
201
|
-
static ɵfac:
|
|
202
|
-
static ɵdir:
|
|
202
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PraxisDialogActionsDirective, never>;
|
|
203
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<PraxisDialogActionsDirective, "ng-template[praxisDialogActions]", never, {}, {}, never, never, true, never>;
|
|
203
204
|
}
|
|
204
205
|
|
|
205
206
|
declare class PraxisDialogContentDirective {
|
|
206
207
|
templateRef: TemplateRef<any>;
|
|
207
208
|
constructor(templateRef: TemplateRef<any>);
|
|
208
|
-
static ɵfac:
|
|
209
|
-
static ɵdir:
|
|
209
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PraxisDialogContentDirective, never>;
|
|
210
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<PraxisDialogContentDirective, "ng-template[praxisDialogContent]", never, {}, {}, never, never, true, never>;
|
|
210
211
|
}
|
|
211
212
|
|
|
212
213
|
declare class PraxisDialogComponent implements OnInit, AfterViewInit, OnChanges, OnDestroy {
|
|
@@ -287,8 +288,8 @@ declare class PraxisDialogComponent implements OnInit, AfterViewInit, OnChanges,
|
|
|
287
288
|
beginOpenAnimation(): Promise<void>;
|
|
288
289
|
beginCloseAnimation(): Promise<void>;
|
|
289
290
|
private focusPrimaryAction;
|
|
290
|
-
static ɵfac:
|
|
291
|
-
static ɵcmp:
|
|
291
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PraxisDialogComponent, never>;
|
|
292
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PraxisDialogComponent, "praxis-dialog", never, { "title": { "alias": "title"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "actionsLayout": { "alias": "actionsLayout"; "required": false; }; "animation": { "alias": "animation"; "required": false; }; "open": { "alias": "open"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "minWidth": { "alias": "minWidth"; "required": false; }; "maxWidth": { "alias": "maxWidth"; "required": false; }; "minHeight": { "alias": "minHeight"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "themeColor": { "alias": "themeColor"; "required": false; }; "disableClose": { "alias": "disableClose"; "required": false; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; }; "closeOnBackdropClick": { "alias": "closeOnBackdropClick"; "required": false; }; "overlayMode": { "alias": "overlayMode"; "required": false; }; "zIndex": { "alias": "zIndex"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "backdropClass": { "alias": "backdropClass"; "required": false; }; "position": { "alias": "position"; "required": false; }; "autoFocusedElement": { "alias": "autoFocusedElement"; "required": false; }; "autoFocus": { "alias": "autoFocus"; "required": false; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; }; "id": { "alias": "id"; "required": false; }; "ariaRole": { "alias": "ariaRole"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "required": false; }; "styles": { "alias": "styles"; "required": false; }; "titleIcon": { "alias": "titleIcon"; "required": false; }; }, { "action": "action"; "close": "close"; "opened": "opened"; "afterClosed": "afterClosed"; }, ["titleTpl", "actionsTpl", "contentTpl"], never, true, never>;
|
|
292
293
|
}
|
|
293
294
|
declare const PraxisDialogDirectives: readonly [];
|
|
294
295
|
|
|
@@ -318,8 +319,8 @@ declare class PraxisDialog {
|
|
|
318
319
|
private mergePresets;
|
|
319
320
|
closeAll(): void;
|
|
320
321
|
getDialogById(id: string): PraxisDialogRef<any> | undefined;
|
|
321
|
-
static ɵfac:
|
|
322
|
-
static ɵprov:
|
|
322
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PraxisDialog, never>;
|
|
323
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<PraxisDialog>;
|
|
323
324
|
}
|
|
324
325
|
declare class SimpleDialogContentComponent {
|
|
325
326
|
message?: string;
|
|
@@ -329,8 +330,8 @@ declare class SimpleDialogContentComponent {
|
|
|
329
330
|
submit?: () => void;
|
|
330
331
|
private readonly dialogData;
|
|
331
332
|
constructor();
|
|
332
|
-
static ɵfac:
|
|
333
|
-
static ɵcmp:
|
|
333
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SimpleDialogContentComponent, never>;
|
|
334
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SimpleDialogContentComponent, "praxis-simple-dialog-content", never, {}, {}, never, never, true, never>;
|
|
334
335
|
}
|
|
335
336
|
|
|
336
337
|
/**
|
|
@@ -343,18 +344,109 @@ declare function providePraxisDialogGlobalActions(): Provider;
|
|
|
343
344
|
|
|
344
345
|
declare function providePraxisSurfaceGlobalActions(): Provider;
|
|
345
346
|
|
|
347
|
+
declare class PraxisQuickViewOverlayComponent implements OnDestroy {
|
|
348
|
+
private readonly i18n;
|
|
349
|
+
private readonly assistantLaunch;
|
|
350
|
+
readonly resolution: _angular_core.WritableSignal<ResourceQuickViewResolution | null>;
|
|
351
|
+
readonly bodyRenderer: _angular_core.WritableSignal<PraxisQuickViewBodyRenderer | null>;
|
|
352
|
+
readonly narrowModalMode: _angular_core.WritableSignal<boolean>;
|
|
353
|
+
protected readonly copiedField: _angular_core.WritableSignal<string | null>;
|
|
354
|
+
private readonly failedAvatarUrl;
|
|
355
|
+
private copiedFeedbackTimer;
|
|
356
|
+
readonly pointerEnter: EventEmitter<void>;
|
|
357
|
+
readonly pointerLeave: EventEmitter<void>;
|
|
358
|
+
readonly openDetail: EventEmitter<void>;
|
|
359
|
+
readonly openSurface: EventEmitter<string>;
|
|
360
|
+
readonly copyValue: EventEmitter<{
|
|
361
|
+
value: string;
|
|
362
|
+
field?: string;
|
|
363
|
+
}>;
|
|
364
|
+
readonly dismiss: EventEmitter<ResourceQuickViewDismissReason>;
|
|
365
|
+
private readonly dialogSurface?;
|
|
366
|
+
private readonly ctaButton?;
|
|
367
|
+
private readonly closeButton?;
|
|
368
|
+
protected readonly summaryItems: _angular_core.Signal<readonly ResourceQuickViewSummaryItem[]>;
|
|
369
|
+
protected readonly contextualActions: _angular_core.Signal<readonly ResourceQuickViewActionItem[]>;
|
|
370
|
+
protected readonly headerKeyPart: _angular_core.Signal<_praxisui_core.ResourceIdentityPart | null>;
|
|
371
|
+
protected readonly headerKeyBadgeText: _angular_core.Signal<string | null>;
|
|
372
|
+
protected readonly headerKeyTooltip: _angular_core.Signal<string | null>;
|
|
373
|
+
protected readonly headerIdentity: _angular_core.Signal<_praxisui_core.MaterializedResourceIdentity | null>;
|
|
374
|
+
protected readonly contextLabel: _angular_core.Signal<string | null>;
|
|
375
|
+
protected readonly hasContextEyebrow: _angular_core.Signal<boolean>;
|
|
376
|
+
protected readonly safeAvatarUrl: _angular_core.Signal<string | null>;
|
|
377
|
+
protected onAvatarError(failedUrl: string): void;
|
|
378
|
+
protected readonly closeAriaLabel: _angular_core.Signal<string>;
|
|
379
|
+
protected readonly copyButtonLabel: _angular_core.Signal<string>;
|
|
380
|
+
protected readonly copiedLabel: _angular_core.Signal<string>;
|
|
381
|
+
protected readonly copySummaryLabel: _angular_core.Signal<string>;
|
|
382
|
+
protected readonly summaryCopiedLabel: _angular_core.Signal<string>;
|
|
383
|
+
protected readonly emptyStateLabel: _angular_core.Signal<string>;
|
|
384
|
+
protected readonly unavailableStateLabel: _angular_core.Signal<string>;
|
|
385
|
+
protected readonly errorStateLabel: _angular_core.Signal<string>;
|
|
386
|
+
protected readonly defaultCtaLabel: _angular_core.Signal<string>;
|
|
387
|
+
protected readonly contextualActionsAriaLabel: _angular_core.Signal<string>;
|
|
388
|
+
protected readonly maskedBadgeLabel: _angular_core.Signal<string>;
|
|
389
|
+
protected readonly maskedFieldReasonLabel: _angular_core.Signal<string>;
|
|
390
|
+
protected readonly accessibleLabel: _angular_core.Signal<string>;
|
|
391
|
+
private translate;
|
|
392
|
+
protected readonly shouldUseCustomBodyRenderer: _angular_core.Signal<boolean>;
|
|
393
|
+
protected readonly customBodyInputs: _angular_core.Signal<Record<string, unknown>>;
|
|
394
|
+
protected readonly unmaskedCopyableItems: _angular_core.Signal<readonly ResourceQuickViewSummaryItem[]>;
|
|
395
|
+
protected readonly canCopySummary: _angular_core.Signal<boolean>;
|
|
396
|
+
protected readonly canAskAssistant: _angular_core.Signal<boolean>;
|
|
397
|
+
protected readonly askAssistantLabel: _angular_core.Signal<string>;
|
|
398
|
+
protected readonly summaryClipboardText: _angular_core.Signal<string>;
|
|
399
|
+
focusInteractiveEntry(): void;
|
|
400
|
+
protected isBadgeOrChip(item: ResourceQuickViewSummaryItem): boolean;
|
|
401
|
+
protected onCopyItem(item: ResourceQuickViewSummaryItem): void;
|
|
402
|
+
protected onCopySummary(): void;
|
|
403
|
+
protected onAskAssistant(): void;
|
|
404
|
+
private markCopiedField;
|
|
405
|
+
ngOnDestroy(): void;
|
|
406
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PraxisQuickViewOverlayComponent, never>;
|
|
407
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PraxisQuickViewOverlayComponent, "praxis-quick-view-overlay", never, {}, { "pointerEnter": "pointerEnter"; "pointerLeave": "pointerLeave"; "openDetail": "openDetail"; "openSurface": "openSurface"; "copyValue": "copyValue"; "dismiss": "dismiss"; }, never, never, true, never>;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Apresentador conectado não-modal para Quick View em `@praxisui/dialog`.
|
|
412
|
+
*
|
|
413
|
+
* Regras arquiteturais:
|
|
414
|
+
* - Em desktop (`hover`, `focus-shortcut`, `explicit-button`), utiliza `flexibleConnectedTo`
|
|
415
|
+
* sem `aria-modal="true"` e sem trap global de foco;
|
|
416
|
+
* - Em `narrow-tap` (ou viewport compacta <= 640px sob ativação explícita), utiliza folha compacta
|
|
417
|
+
* inferior com backdrop e semântica modal real;
|
|
418
|
+
* - Reposiciona em scroll/resize enquanto a âncora permanecer válida e fecha imediatamente
|
|
419
|
+
* quando a âncora sai do DOM ou se torna inválida;
|
|
420
|
+
* - Restaura o foco ao gatilho original quando o usuário fecha por `Escape` ou botão Fechar
|
|
421
|
+
* estando com o foco dentro do card.
|
|
422
|
+
*/
|
|
423
|
+
declare class QuickViewDialogPresenterService implements PraxisQuickViewPresenter {
|
|
424
|
+
private readonly overlay;
|
|
425
|
+
private readonly injector;
|
|
426
|
+
private readonly layerScale;
|
|
427
|
+
private activeSession;
|
|
428
|
+
present(options: PraxisQuickViewPresentOptions): PraxisQuickViewPresenterSession;
|
|
429
|
+
closeAll(): void;
|
|
430
|
+
private shouldUseNarrowModalFallback;
|
|
431
|
+
private buildOverlayConfig;
|
|
432
|
+
private resolveConnectedOrigin;
|
|
433
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<QuickViewDialogPresenterService, never>;
|
|
434
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<QuickViewDialogPresenterService>;
|
|
435
|
+
}
|
|
436
|
+
declare function providePraxisQuickViewDialogPresenter(): Provider;
|
|
437
|
+
|
|
346
438
|
declare class LongContentDialogExampleComponent {
|
|
347
439
|
readonly items: string[];
|
|
348
|
-
static ɵfac:
|
|
349
|
-
static ɵcmp:
|
|
440
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LongContentDialogExampleComponent, never>;
|
|
441
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<LongContentDialogExampleComponent, "praxis-long-content-dialog-example", never, {}, {}, never, never, true, never>;
|
|
350
442
|
}
|
|
351
443
|
|
|
352
444
|
declare const PRAXIS_DIALOG_EXAMPLE_LONG_CONTENT = "praxis.long-content-example";
|
|
353
445
|
declare function providePraxisDialogExamples(): {
|
|
354
|
-
provide:
|
|
446
|
+
provide: _angular_core.InjectionToken<readonly (() => void)[]>;
|
|
355
447
|
multi: boolean;
|
|
356
448
|
useFactory: (registry: Record<string, any>) => () => void;
|
|
357
|
-
deps:
|
|
449
|
+
deps: _angular_core.InjectionToken<Record<string, _praxisui_dialog.ComponentType<any>>>[];
|
|
358
450
|
};
|
|
359
451
|
|
|
360
452
|
declare const PRAXIS_DIALOG_COMPONENT_METADATA: ComponentDocMeta;
|
|
@@ -362,5 +454,5 @@ declare function providePraxisDialogMetadata(): Provider;
|
|
|
362
454
|
|
|
363
455
|
declare const PRAXIS_DIALOG_AUTHORING_MANIFEST: ComponentAuthoringManifest;
|
|
364
456
|
|
|
365
|
-
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 };
|
|
457
|
+
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 };
|
|
366
458
|
export type { ActionsLayout, AnimationDirection, ComponentType, DialogAction, DialogAnimation, DialogAnimationType, DialogContentDescriptor, DialogThemeColor, PraxisAlertConfig, PraxisConfirmConfig, PraxisDialogConfig, PraxisDialogGlobalPresets, PraxisDialogPosition, PraxisDialogStyleConfig, PraxisPromptConfig };
|