From 9fe6164d9aec05032fd9057420391a99b584b79b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Wed, 16 Mar 2022 13:00:50 +0300 Subject: [PATCH] Fixed #2266 - Type declaration and export bug on ConfirmationService --- .../ConfirmationService.d.ts | 9 +++++- src/views/confirmdialog/ConfirmDialogDoc.vue | 26 +++++++++++++++++ src/views/confirmpopup/ConfirmPopupDoc.vue | 28 ++++++++++++++++++- 3 files changed, 61 insertions(+), 2 deletions(-) diff --git a/src/components/confirmationservice/ConfirmationService.d.ts b/src/components/confirmationservice/ConfirmationService.d.ts index 0a1a610cf..0fec0231a 100644 --- a/src/components/confirmationservice/ConfirmationService.d.ts +++ b/src/components/confirmationservice/ConfirmationService.d.ts @@ -4,8 +4,15 @@ import { ConfirmationOptions } from '../confirmationoptions'; declare const plugin: Plugin; export default plugin; -interface ConfirmationServiceMethods { +export interface ConfirmationServiceMethods { + /** + * Displays the dialog using the confirmation object options. + * @param {ConfirmationOptions} options - Confirmation Object + */ require(options: ConfirmationOptions): void; + /** + * Hides the dialog without invoking accept or reject callbacks. + */ close(): void; } diff --git a/src/views/confirmdialog/ConfirmDialogDoc.vue b/src/views/confirmdialog/ConfirmDialogDoc.vue index e3d9d4091..f8a24f02e 100644 --- a/src/views/confirmdialog/ConfirmDialogDoc.vue +++ b/src/views/confirmdialog/ConfirmDialogDoc.vue @@ -32,6 +32,7 @@ import ConfirmDialog from 'primevue/confirmdialog'; <ConfirmDialog></ConfirmDialog> <Button @click="delete()" icon="pi pi-check" label="Confirm"></Button> +

@@ -202,6 +203,31 @@ export default {
             
         
 
+        
ConfirmationService
+
+ + + + + + + + + + + + + + + + + + + + +
NameParametersDescription
requireconfirm: Confirmation ObjectDisplays the dialog using the confirmation object options.
close-Hides the dialog without invoking accept or reject callbacks.
+
+
Properties

Any property as style and class are passed to the main container element. Following are the additional properties to configure the component.

diff --git a/src/views/confirmpopup/ConfirmPopupDoc.vue b/src/views/confirmpopup/ConfirmPopupDoc.vue index c06264a8b..6d634ccd9 100644 --- a/src/views/confirmpopup/ConfirmPopupDoc.vue +++ b/src/views/confirmpopup/ConfirmPopupDoc.vue @@ -32,6 +32,7 @@ import ConfirmPopup from 'primevue/confirmpopup'; <ConfirmPopup></ConfirmPopup> <Button @click="delete($event)" icon="pi pi-check" label="Confirm"></Button> +

@@ -161,7 +162,7 @@ export default {
                         null
                         Callback to execute when action is rejected.
                     
-                     
+                    
                         acceptLabel
                         string
                         null
@@ -200,6 +201,31 @@ export default {
                 
             
         
+        
+        
ConfirmationService
+
+ + + + + + + + + + + + + + + + + + + + +
NameParametersDescription
requireconfirm: Confirmation ObjectDisplays the dialog using the confirmation object options.
close-Hides the dialog without invoking accept or reject callbacks.
+
Properties

Any property as style and class are passed to the main container element. Following are the additional properties to configure the component.