ng-prime-tools 1.0.25 → 1.0.26
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/README.md +4 -0
- package/esm2022/lib/enums/public-api.mjs +2 -1
- package/esm2022/lib/enums/severity.enum.mjs +8 -0
- package/esm2022/lib/models/button.model.mjs +1 -1
- package/esm2022/lib/models/dialog-config.model.mjs +2 -0
- package/esm2022/lib/models/public-api.mjs +3 -2
- package/esm2022/lib/models/toast-message.model.mjs +2 -0
- package/esm2022/lib/pt-dialog/pt-dialog.component.mjs +219 -48
- package/fesm2022/ng-prime-tools.mjs +225 -48
- package/fesm2022/ng-prime-tools.mjs.map +1 -1
- package/lib/enums/public-api.d.ts +1 -0
- package/lib/enums/public-api.d.ts.map +1 -1
- package/lib/enums/severity.enum.d.ts +7 -0
- package/lib/enums/severity.enum.d.ts.map +1 -0
- package/lib/models/button.model.d.ts +2 -0
- package/lib/models/button.model.d.ts.map +1 -1
- package/lib/models/dialog-config.model.d.ts +18 -0
- package/lib/models/dialog-config.model.d.ts.map +1 -0
- package/lib/models/public-api.d.ts +2 -1
- package/lib/models/public-api.d.ts.map +1 -1
- package/lib/models/toast-message.model.d.ts +7 -0
- package/lib/models/toast-message.model.d.ts.map +1 -0
- package/lib/pt-dialog/pt-dialog.component.d.ts +11 -3
- package/lib/pt-dialog/pt-dialog.component.d.ts.map +1 -1
- package/package.json +1 -1
- package/esm2022/lib/models/dialog.model.mjs +0 -2
- package/lib/models/dialog.model.d.ts +0 -13
- package/lib/models/dialog.model.d.ts.map +0 -1
@@ -47,9 +47,9 @@ import { filter } from 'rxjs/operators';
|
|
47
47
|
import { BehaviorSubject } from 'rxjs';
|
48
48
|
import * as i3$6 from 'primeng/breadcrumb';
|
49
49
|
import { BreadcrumbModule } from 'primeng/breadcrumb';
|
50
|
-
import * as
|
50
|
+
import * as i3$7 from 'primeng/toast';
|
51
51
|
import { ToastModule } from 'primeng/toast';
|
52
|
-
import * as
|
52
|
+
import * as i4$2 from 'primeng/confirmdialog';
|
53
53
|
import { ConfirmDialogModule } from 'primeng/confirmdialog';
|
54
54
|
import { DialogModule } from 'primeng/dialog';
|
55
55
|
|
@@ -676,6 +676,14 @@ const BadgeTypeStyles = {
|
|
676
676
|
},
|
677
677
|
};
|
678
678
|
|
679
|
+
var SeverityEnum;
|
680
|
+
(function (SeverityEnum) {
|
681
|
+
SeverityEnum["WARNING"] = "warning";
|
682
|
+
SeverityEnum["SUCCESS"] = "success";
|
683
|
+
SeverityEnum["DANGER"] = "danger";
|
684
|
+
SeverityEnum["INFO"] = "info";
|
685
|
+
})(SeverityEnum || (SeverityEnum = {}));
|
686
|
+
|
679
687
|
// projects/ng-prime-tools/src/lib/enums/public_api.ts
|
680
688
|
|
681
689
|
class MultiSearchCriteriaComponent {
|
@@ -3499,63 +3507,110 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
|
|
3499
3507
|
}]
|
3500
3508
|
}] });
|
3501
3509
|
|
3510
|
+
// Default Styles for Different Dialog Types
|
3511
|
+
const DIALOG_STYLES = {
|
3512
|
+
[SeverityEnum.WARNING]: {
|
3513
|
+
header: { text: 'Warning', color: '#d98300' },
|
3514
|
+
content: { text: 'This is a warning message!', color: '#d98300' },
|
3515
|
+
confirmButtonConfig: { backgroundColor: '#d98300', fontColor: '#fff' },
|
3516
|
+
cancelButtonConfig: { backgroundColor: '#6c757d', fontColor: '#fff' },
|
3517
|
+
},
|
3518
|
+
[SeverityEnum.SUCCESS]: {
|
3519
|
+
header: { text: 'Success', color: '#28a745' },
|
3520
|
+
content: { text: 'Operation was successful!', color: '#28a745' },
|
3521
|
+
confirmButtonConfig: { backgroundColor: '#28a745', fontColor: '#fff' },
|
3522
|
+
cancelButtonConfig: { backgroundColor: '#6c757d', fontColor: '#fff' },
|
3523
|
+
},
|
3524
|
+
[SeverityEnum.DANGER]: {
|
3525
|
+
header: { text: 'Error', color: '#dc3545' },
|
3526
|
+
content: { text: 'An error occurred!', color: '#dc3545' },
|
3527
|
+
confirmButtonConfig: { backgroundColor: '#dc3545', fontColor: '#fff' },
|
3528
|
+
cancelButtonConfig: { backgroundColor: '#6c757d', fontColor: '#fff' },
|
3529
|
+
},
|
3530
|
+
[SeverityEnum.INFO]: {
|
3531
|
+
header: { text: 'Information', color: '#007bff' },
|
3532
|
+
content: { text: 'Here is some important information.', color: '#007bff' },
|
3533
|
+
confirmButtonConfig: { backgroundColor: '#007bff', fontColor: '#fff' },
|
3534
|
+
cancelButtonConfig: { backgroundColor: '#6c757d', fontColor: '#fff' },
|
3535
|
+
},
|
3536
|
+
};
|
3537
|
+
// Centralized Default Values
|
3538
|
+
const DEFAULT_DIALOG_CONFIG = {
|
3539
|
+
header: { text: 'Confirmation' },
|
3540
|
+
visible: false,
|
3541
|
+
width: '400px',
|
3542
|
+
height: 'auto',
|
3543
|
+
content: 'Do you want to proceed?',
|
3544
|
+
confirmButtonConfig: {
|
3545
|
+
label: 'Confirm',
|
3546
|
+
fontColor: '#fff',
|
3547
|
+
backgroundColor: '#007bff',
|
3548
|
+
},
|
3549
|
+
cancelButtonConfig: {
|
3550
|
+
label: 'Cancel',
|
3551
|
+
fontColor: '#fff',
|
3552
|
+
backgroundColor: '#6c757d',
|
3553
|
+
},
|
3554
|
+
dialogStyle: SeverityEnum.INFO,
|
3555
|
+
};
|
3502
3556
|
class PTDialogComponent {
|
3503
3557
|
constructor(confirmationService, messageService, renderer, el) {
|
3504
3558
|
this.confirmationService = confirmationService;
|
3505
3559
|
this.messageService = messageService;
|
3506
3560
|
this.renderer = renderer;
|
3507
3561
|
this.el = el;
|
3508
|
-
this.
|
3509
|
-
header: { text: 'Confirmation' },
|
3510
|
-
visible: false,
|
3511
|
-
width: '400px',
|
3512
|
-
height: 'auto',
|
3513
|
-
content: 'Do you want to proceed?',
|
3514
|
-
confirmButtonConfig: {
|
3515
|
-
label: 'Confirm',
|
3516
|
-
fontColor: '#fff',
|
3517
|
-
backgroundColor: '#007bff',
|
3518
|
-
},
|
3519
|
-
cancelButtonConfig: {
|
3520
|
-
label: 'Cancel',
|
3521
|
-
fontColor: '#fff',
|
3522
|
-
backgroundColor: '#6c757d',
|
3523
|
-
},
|
3524
|
-
};
|
3562
|
+
this.dialogConfig = { ...DEFAULT_DIALOG_CONFIG };
|
3525
3563
|
this.confirm = new EventEmitter();
|
3526
3564
|
this.cancel = new EventEmitter();
|
3527
3565
|
}
|
3528
3566
|
ngOnChanges(changes) {
|
3529
|
-
if (changes['
|
3530
|
-
|
3567
|
+
if (changes['dialogConfig']) {
|
3568
|
+
if (changes['dialogConfig'].currentValue?.dialogStyle !==
|
3569
|
+
changes['dialogConfig'].previousValue?.dialogStyle) {
|
3570
|
+
this.applyDialogStyle();
|
3571
|
+
}
|
3572
|
+
if (this.dialogConfig.visible) {
|
3573
|
+
this.showDialog();
|
3574
|
+
}
|
3531
3575
|
}
|
3532
3576
|
}
|
3577
|
+
applyDialogStyle() {
|
3578
|
+
const dialogStyle = this.dialogConfig.dialogStyle || SeverityEnum.INFO; // ✅ Ensure dialogStyle is always defined
|
3579
|
+
const styleConfig = DIALOG_STYLES[dialogStyle] || {}; // ✅ Get the styles for the selected dialogStyle
|
3580
|
+
this.dialogConfig = {
|
3581
|
+
...DEFAULT_DIALOG_CONFIG, // ✅ Start with the default values
|
3582
|
+
...styleConfig, // ✅ Override with the selected dialogStyle values
|
3583
|
+
confirmButtonConfig: {
|
3584
|
+
...DEFAULT_DIALOG_CONFIG.confirmButtonConfig, // ✅ Start with default confirm button styles
|
3585
|
+
...styleConfig.confirmButtonConfig, // ✅ Override with the confirm button styles for the selected dialogStyle
|
3586
|
+
},
|
3587
|
+
cancelButtonConfig: {
|
3588
|
+
...DEFAULT_DIALOG_CONFIG.cancelButtonConfig, // ✅ Start with default cancel button styles
|
3589
|
+
...styleConfig.cancelButtonConfig, // ✅ Override with the cancel button styles for the selected dialogStyle
|
3590
|
+
},
|
3591
|
+
};
|
3592
|
+
}
|
3533
3593
|
showDialog() {
|
3534
3594
|
this.confirmationService.confirm({
|
3535
|
-
header: this.
|
3536
|
-
message: this.
|
3537
|
-
|
3538
|
-
|
3539
|
-
|
3540
|
-
|
3595
|
+
header: this.getDialogHeaderText(),
|
3596
|
+
message: this.getDialogContentText(),
|
3597
|
+
acceptLabel: this.dialogConfig.confirmButtonConfig?.label || 'Confirm',
|
3598
|
+
rejectLabel: this.dialogConfig.cancelButtonConfig?.label || 'Cancel',
|
3599
|
+
acceptButtonStyleClass: this.getButtonStyle(this.dialogConfig.confirmButtonConfig, true),
|
3600
|
+
rejectButtonStyleClass: this.getButtonStyle(this.dialogConfig.cancelButtonConfig, false),
|
3601
|
+
acceptIcon: this.dialogConfig.confirmButtonConfig?.icon || 'pi pi-check',
|
3602
|
+
rejectIcon: this.dialogConfig.cancelButtonConfig?.icon || 'pi pi-times',
|
3541
3603
|
accept: () => {
|
3542
3604
|
this.confirm.emit();
|
3543
|
-
this.
|
3544
|
-
|
3545
|
-
|
3546
|
-
detail: 'Action confirmed',
|
3547
|
-
life: 3000,
|
3548
|
-
});
|
3605
|
+
if (this.dialogConfig.toastOnConfirm) {
|
3606
|
+
this.showToast(this.dialogConfig.toastOnConfirm);
|
3607
|
+
}
|
3549
3608
|
},
|
3550
3609
|
reject: (type) => {
|
3551
3610
|
this.cancel.emit();
|
3552
|
-
if (type === ConfirmEventType.REJECT
|
3553
|
-
this.
|
3554
|
-
|
3555
|
-
summary: 'Rejected',
|
3556
|
-
detail: 'Action cancelled',
|
3557
|
-
life: 3000,
|
3558
|
-
});
|
3611
|
+
if (type === ConfirmEventType.REJECT &&
|
3612
|
+
this.dialogConfig.toastOnCancel) {
|
3613
|
+
this.showToast(this.dialogConfig.toastOnCancel);
|
3559
3614
|
}
|
3560
3615
|
},
|
3561
3616
|
});
|
@@ -3563,21 +3618,143 @@ class PTDialogComponent {
|
|
3563
3618
|
setTimeout(() => {
|
3564
3619
|
const dialogElement = this.el.nativeElement.querySelector('.p-dialog');
|
3565
3620
|
if (dialogElement) {
|
3566
|
-
this.renderer.setStyle(dialogElement, 'width', this.
|
3567
|
-
this.renderer.setStyle(dialogElement, 'height', this.
|
3621
|
+
this.renderer.setStyle(dialogElement, 'width', this.dialogConfig.width || '400px');
|
3622
|
+
this.renderer.setStyle(dialogElement, 'height', this.dialogConfig.height || 'auto');
|
3568
3623
|
}
|
3569
3624
|
}, 0);
|
3570
3625
|
}
|
3571
|
-
|
3572
|
-
|
3626
|
+
showToast(toast) {
|
3627
|
+
if (toast) {
|
3628
|
+
this.messageService.add({
|
3629
|
+
severity: toast.severity,
|
3630
|
+
summary: toast.summary,
|
3631
|
+
detail: toast.detail,
|
3632
|
+
life: toast.life || 3000,
|
3633
|
+
});
|
3634
|
+
}
|
3635
|
+
}
|
3636
|
+
getButtonStyle(buttonConfig, isConfirm = false) {
|
3637
|
+
let styleClass = buttonConfig?.styleClass ?? 'p-button-sm'; // ✅ Default button size
|
3638
|
+
// ✅ Apply width dynamically if provided, otherwise default to 100%
|
3639
|
+
const buttonWidth = buttonConfig?.width ?? '100%';
|
3640
|
+
// ✅ Set default severity: SUCCESS for confirm, SECONDARY for cancel
|
3641
|
+
const defaultSeverity = isConfirm ? SeverityEnum.DANGER : SeverityEnum.INFO;
|
3642
|
+
const severity = buttonConfig?.severity ?? defaultSeverity;
|
3643
|
+
// ✅ Apply severity-based styles only if no custom background color is set
|
3644
|
+
if (!buttonConfig?.backgroundColor) {
|
3645
|
+
switch (severity) {
|
3646
|
+
case SeverityEnum.WARNING:
|
3647
|
+
styleClass += ' p-button-warning';
|
3648
|
+
break;
|
3649
|
+
case SeverityEnum.DANGER:
|
3650
|
+
styleClass += ' p-button-danger';
|
3651
|
+
break;
|
3652
|
+
case SeverityEnum.SUCCESS:
|
3653
|
+
styleClass += ' p-button-success';
|
3654
|
+
break;
|
3655
|
+
case SeverityEnum.INFO:
|
3656
|
+
default:
|
3657
|
+
styleClass += ' p-button-secondary';
|
3658
|
+
break;
|
3659
|
+
}
|
3660
|
+
}
|
3661
|
+
return `${styleClass.trim()} width-${buttonWidth.replace('%', '')}`;
|
3662
|
+
}
|
3663
|
+
getDialogHeaderText() {
|
3664
|
+
const header = this.dialogConfig.header;
|
3665
|
+
const dialogStyle = this.dialogConfig.dialogStyle ?? SeverityEnum.INFO;
|
3666
|
+
const styleHeader = DIALOG_STYLES[dialogStyle]?.header;
|
3667
|
+
return typeof header === 'object' && header !== null && 'text' in header
|
3668
|
+
? header.text
|
3669
|
+
: typeof header === 'string'
|
3670
|
+
? header
|
3671
|
+
: typeof styleHeader === 'object' &&
|
3672
|
+
styleHeader !== null &&
|
3673
|
+
'text' in styleHeader
|
3674
|
+
? styleHeader.text
|
3675
|
+
: 'Confirmation'; // ✅ Default value
|
3676
|
+
}
|
3677
|
+
getDialogHeaderStyle() {
|
3678
|
+
const header = this.dialogConfig.header;
|
3679
|
+
const dialogStyle = this.dialogConfig.dialogStyle ?? SeverityEnum.INFO; // ✅ Ensure dialogStyle is always defined
|
3680
|
+
const styleHeader = DIALOG_STYLES[dialogStyle]?.header; // ✅ Store the style header separately
|
3681
|
+
return typeof header === 'object' && header !== null
|
3682
|
+
? {
|
3683
|
+
color: header.color ||
|
3684
|
+
(typeof styleHeader === 'object' ? styleHeader?.color : '#333'),
|
3685
|
+
fontSize: header.fontSize || '25px',
|
3686
|
+
}
|
3687
|
+
: {
|
3688
|
+
color: typeof styleHeader === 'object' ? styleHeader?.color : '#333',
|
3689
|
+
fontSize: '25px',
|
3690
|
+
};
|
3691
|
+
}
|
3692
|
+
getDialogIconClass() {
|
3693
|
+
const header = this.dialogConfig.header;
|
3694
|
+
const dialogStyle = this.dialogConfig.dialogStyle ?? SeverityEnum.INFO; // ✅ Ensure dialogStyle is always defined
|
3695
|
+
const styleHeader = DIALOG_STYLES[dialogStyle]?.header; // ✅ Store the style header separately
|
3696
|
+
// ✅ Ensure header.icon exists and is an object before accessing .code
|
3697
|
+
const icon = typeof header === 'object' && header !== null && 'icon' in header
|
3698
|
+
? header.icon
|
3699
|
+
: typeof styleHeader === 'object' && 'icon' in styleHeader
|
3700
|
+
? styleHeader.icon
|
3701
|
+
: undefined;
|
3702
|
+
// ✅ If `icon` is an object, extract `.code`, otherwise return as string or default value
|
3703
|
+
return typeof icon === 'string'
|
3704
|
+
? icon
|
3705
|
+
: icon?.code || 'pi pi-exclamation-circle';
|
3706
|
+
}
|
3707
|
+
getDialogIconStyle() {
|
3708
|
+
const header = this.dialogConfig.header;
|
3709
|
+
const dialogStyle = this.dialogConfig.dialogStyle ?? SeverityEnum.INFO;
|
3710
|
+
const styleHeader = DIALOG_STYLES[dialogStyle]?.header;
|
3711
|
+
const icon = typeof header === 'object' && header !== null && 'icon' in header
|
3712
|
+
? header.icon
|
3713
|
+
: undefined;
|
3714
|
+
return {
|
3715
|
+
color: icon?.color ||
|
3716
|
+
(typeof styleHeader === 'object' ? styleHeader?.color : '#f39c12'),
|
3717
|
+
fontSize: icon?.fontSize || '1.5rem',
|
3718
|
+
backgroundColor: icon?.backgroundColor || 'transparent',
|
3719
|
+
borderRadius: icon?.shape === 'circular' ? '50%' : '4px',
|
3720
|
+
padding: '5px',
|
3721
|
+
};
|
3722
|
+
}
|
3723
|
+
getDialogContentText() {
|
3724
|
+
const content = this.dialogConfig.content;
|
3725
|
+
const dialogStyle = this.dialogConfig.dialogStyle ?? SeverityEnum.INFO;
|
3726
|
+
const styleContent = DIALOG_STYLES[dialogStyle]?.content;
|
3727
|
+
return typeof content === 'string'
|
3728
|
+
? content
|
3729
|
+
: content?.text ||
|
3730
|
+
(typeof styleContent === 'object'
|
3731
|
+
? styleContent?.text
|
3732
|
+
: 'Are you sure?');
|
3733
|
+
}
|
3734
|
+
getDialogContentStyle() {
|
3735
|
+
const content = this.dialogConfig.content;
|
3736
|
+
const dialogStyle = this.dialogConfig.dialogStyle ?? SeverityEnum.INFO;
|
3737
|
+
const styleContent = DIALOG_STYLES[dialogStyle]?.content;
|
3738
|
+
return typeof content === 'object' && content !== null
|
3739
|
+
? {
|
3740
|
+
color: content.color ||
|
3741
|
+
(typeof styleContent === 'object' ? styleContent?.color : '#333'),
|
3742
|
+
fontSize: content.fontSize || '20px',
|
3743
|
+
textAlign: content.position || 'left',
|
3744
|
+
}
|
3745
|
+
: {
|
3746
|
+
color: typeof styleContent === 'object' ? styleContent?.color : '#333',
|
3747
|
+
fontSize: '20px',
|
3748
|
+
textAlign: 'left',
|
3749
|
+
};
|
3573
3750
|
}
|
3574
3751
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTDialogComponent, deps: [{ token: i1$1.ConfirmationService }, { token: i1$1.MessageService }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
3575
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTDialogComponent, selector: "pt-dialog", inputs: {
|
3752
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.11", type: PTDialogComponent, selector: "pt-dialog", inputs: { dialogConfig: "dialogConfig" }, outputs: { confirm: "confirm", cancel: "cancel" }, providers: [ConfirmationService, MessageService], usesOnChanges: true, ngImport: i0, template: "<div class=\"pt-dialog\">\n <p-toast></p-toast>\n <p-confirmDialog>\n <!-- Header with Icon and Title aligned horizontally -->\n <ng-template pTemplate=\"header\">\n <div class=\"popup-header bordered-section\">\n <i [class]=\"getDialogIconClass()\" [ngStyle]=\"getDialogIconStyle()\"></i>\n <span class=\"popup-title\" [ngStyle]=\"getDialogHeaderStyle()\">\n {{ getDialogHeaderText() }}\n </span>\n </div>\n </ng-template>\n\n <!-- Message Content with Divider -->\n <ng-template pTemplate=\"message\" let-message>\n <div\n class=\"popup-content bordered-section\"\n [ngStyle]=\"getDialogContentStyle()\"\n >\n <p>{{ getDialogContentText() }}</p>\n </div>\n </ng-template>\n </p-confirmDialog>\n</div>\n", styles: ["::ng-deep .pt-dialog .p-dialog .p-dialog-header{padding-bottom:0}::ng-deep .pt-dialog .p-dialog .p-dialog-content{padding:0}::ng-deep .pt-dialog .full-width-button{width:100%;display:block;text-align:center}::ng-deep .pt-dialog .p-dialog-footer{display:flex;justify-content:center;gap:10px;width:100%;padding:10px}::ng-deep .pt-dialog .p-confirm-dialog-accept,::ng-deep .pt-dialog .p-confirm-dialog-reject{flex:1;max-width:50%;text-align:center;display:flex;justify-content:center;align-items:center;height:40px}::ng-deep .pt-dialog .p-confirm-dialog-accept i,::ng-deep .pt-dialog .p-confirm-dialog-reject i{margin-right:5px}::ng-deep .pt-dialog .p-confirm-dialog-accept .p-button-label,::ng-deep .pt-dialog .p-confirm-dialog-reject .p-button-label{font-weight:700;flex-grow:1;text-align:center}.pt-dialog .popup-header{display:flex;align-items:center;gap:10px;font-size:1.2rem;font-weight:700;padding-bottom:10px;width:100%}.pt-dialog .popup-title{color:#333;font-size:1.2rem}.pt-dialog .bordered-section{width:100%;border-bottom:1px solid rgba(0,0,0,.2);padding-bottom:10px;margin-bottom:10px}.pt-dialog .popup-content{display:flex;justify-content:center;text-align:center;padding:15px;width:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$1.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i3$7.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "style", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "component", type: i4$2.ConfirmDialog, selector: "p-confirmDialog", inputs: ["header", "icon", "message", "style", "styleClass", "maskStyleClass", "acceptIcon", "acceptLabel", "closeAriaLabel", "acceptAriaLabel", "acceptVisible", "rejectIcon", "rejectLabel", "rejectAriaLabel", "rejectVisible", "acceptButtonStyleClass", "rejectButtonStyleClass", "closeOnEscape", "dismissableMask", "blockScroll", "rtl", "closable", "appendTo", "key", "autoZIndex", "baseZIndex", "transitionOptions", "focusTrap", "defaultFocus", "breakpoints", "visible", "position"], outputs: ["onHide"] }] }); }
|
3576
3753
|
}
|
3577
3754
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: PTDialogComponent, decorators: [{
|
3578
3755
|
type: Component,
|
3579
|
-
args: [{ selector: 'pt-dialog', providers: [ConfirmationService, MessageService], template: "<div>\n <p-toast></p-toast>\n <p-confirmDialog>\n <ng-template pTemplate=\"
|
3580
|
-
}], ctorParameters: () => [{ type: i1$1.ConfirmationService }, { type: i1$1.MessageService }, { type: i0.Renderer2 }, { type: i0.ElementRef }], propDecorators: {
|
3756
|
+
args: [{ selector: 'pt-dialog', providers: [ConfirmationService, MessageService], template: "<div class=\"pt-dialog\">\n <p-toast></p-toast>\n <p-confirmDialog>\n <!-- Header with Icon and Title aligned horizontally -->\n <ng-template pTemplate=\"header\">\n <div class=\"popup-header bordered-section\">\n <i [class]=\"getDialogIconClass()\" [ngStyle]=\"getDialogIconStyle()\"></i>\n <span class=\"popup-title\" [ngStyle]=\"getDialogHeaderStyle()\">\n {{ getDialogHeaderText() }}\n </span>\n </div>\n </ng-template>\n\n <!-- Message Content with Divider -->\n <ng-template pTemplate=\"message\" let-message>\n <div\n class=\"popup-content bordered-section\"\n [ngStyle]=\"getDialogContentStyle()\"\n >\n <p>{{ getDialogContentText() }}</p>\n </div>\n </ng-template>\n </p-confirmDialog>\n</div>\n", styles: ["::ng-deep .pt-dialog .p-dialog .p-dialog-header{padding-bottom:0}::ng-deep .pt-dialog .p-dialog .p-dialog-content{padding:0}::ng-deep .pt-dialog .full-width-button{width:100%;display:block;text-align:center}::ng-deep .pt-dialog .p-dialog-footer{display:flex;justify-content:center;gap:10px;width:100%;padding:10px}::ng-deep .pt-dialog .p-confirm-dialog-accept,::ng-deep .pt-dialog .p-confirm-dialog-reject{flex:1;max-width:50%;text-align:center;display:flex;justify-content:center;align-items:center;height:40px}::ng-deep .pt-dialog .p-confirm-dialog-accept i,::ng-deep .pt-dialog .p-confirm-dialog-reject i{margin-right:5px}::ng-deep .pt-dialog .p-confirm-dialog-accept .p-button-label,::ng-deep .pt-dialog .p-confirm-dialog-reject .p-button-label{font-weight:700;flex-grow:1;text-align:center}.pt-dialog .popup-header{display:flex;align-items:center;gap:10px;font-size:1.2rem;font-weight:700;padding-bottom:10px;width:100%}.pt-dialog .popup-title{color:#333;font-size:1.2rem}.pt-dialog .bordered-section{width:100%;border-bottom:1px solid rgba(0,0,0,.2);padding-bottom:10px;margin-bottom:10px}.pt-dialog .popup-content{display:flex;justify-content:center;text-align:center;padding:15px;width:100%}\n"] }]
|
3757
|
+
}], ctorParameters: () => [{ type: i1$1.ConfirmationService }, { type: i1$1.MessageService }, { type: i0.Renderer2 }, { type: i0.ElementRef }], propDecorators: { dialogConfig: [{
|
3581
3758
|
type: Input
|
3582
3759
|
}], confirm: [{
|
3583
3760
|
type: Output
|
@@ -4282,5 +4459,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImpo
|
|
4282
4459
|
* Generated bundle index. Do not edit.
|
4283
4460
|
*/
|
4284
4461
|
|
4285
|
-
export { BadgeType, BadgeTypeStyles, ButtonColorEnum, FormInputTypeEnum, InputValidationEnum, MultiSearchCriteriaComponent, MultiSearchCriteriaModule, NgPrimeToolsModule, PTAdvancedPrimeTableComponent, PTAdvancedPrimeTableModule, PTBreadCrumbComponent, PTBreadCrumbModule, PTButtonComponent, PTButtonModule, PTCardComponent, PTCardModule, PTChartComparisonComponent, PTChartComparisonModule, PTChartComponent, PTChartModule, PTCheckBoxInputComponent, PTCheckBoxInputModule, PTDateInputComponent, PTDateInputModule, PTDialogComponent, PTDialogModule, PTDropdownComponent, PTDropdownModule, PTFooterComponent, PTFooterModule, PTFormBuilderComponent, PTFormBuilderModule, PTGroupComponent, PTGroupModule, PTLineChartComponent, PTLineChartModule, PTLoginPageComponent, PTLoginPageModule, PTMenuComponent, PTMenuFancyComponent, PTMenuFancyModule, PTMenuModule, PTMetricCardComponent, PTMetricCardGroupComponent, PTMetricCardGroupModule, PTMetricCardModule, PTMetricPanelComponent, PTMetricPanelModule, PTNavbarMenuComponent, PTNavbarMenuModule, PTNumberInputComponent, PTNumberInputModule, PTPageSkeletonComponent, PTPageSkeletonModule, PTSideBarMenuComponent, PTSideBarMenuModule, PTSwitchInputComponent, PTSwitchInputModule, PTTextAreaInputComponent, PTTextAreaInputModule, PTTextInputComponent, PTTextInputModule, SearchCriteriaTypeEnum, TableTypeEnum };
|
4462
|
+
export { BadgeType, BadgeTypeStyles, ButtonColorEnum, FormInputTypeEnum, InputValidationEnum, MultiSearchCriteriaComponent, MultiSearchCriteriaModule, NgPrimeToolsModule, PTAdvancedPrimeTableComponent, PTAdvancedPrimeTableModule, PTBreadCrumbComponent, PTBreadCrumbModule, PTButtonComponent, PTButtonModule, PTCardComponent, PTCardModule, PTChartComparisonComponent, PTChartComparisonModule, PTChartComponent, PTChartModule, PTCheckBoxInputComponent, PTCheckBoxInputModule, PTDateInputComponent, PTDateInputModule, PTDialogComponent, PTDialogModule, PTDropdownComponent, PTDropdownModule, PTFooterComponent, PTFooterModule, PTFormBuilderComponent, PTFormBuilderModule, PTGroupComponent, PTGroupModule, PTLineChartComponent, PTLineChartModule, PTLoginPageComponent, PTLoginPageModule, PTMenuComponent, PTMenuFancyComponent, PTMenuFancyModule, PTMenuModule, PTMetricCardComponent, PTMetricCardGroupComponent, PTMetricCardGroupModule, PTMetricCardModule, PTMetricPanelComponent, PTMetricPanelModule, PTNavbarMenuComponent, PTNavbarMenuModule, PTNumberInputComponent, PTNumberInputModule, PTPageSkeletonComponent, PTPageSkeletonModule, PTSideBarMenuComponent, PTSideBarMenuModule, PTSwitchInputComponent, PTSwitchInputModule, PTTextAreaInputComponent, PTTextAreaInputModule, PTTextInputComponent, PTTextInputModule, SearchCriteriaTypeEnum, SeverityEnum, TableTypeEnum };
|
4286
4463
|
//# sourceMappingURL=ng-prime-tools.mjs.map
|