diff --git a/components/confirmationoptions/ConfirmationOptions.d.ts b/components/confirmationoptions/ConfirmationOptions.d.ts index 74a377ea0..78d4195a4 100644 --- a/components/confirmationoptions/ConfirmationOptions.d.ts +++ b/components/confirmationoptions/ConfirmationOptions.d.ts @@ -1,5 +1,16 @@ -type ConfirmationPositionType = 'center' | 'top' | 'bottom' | 'left' | 'right' | 'topleft' | 'topright' | 'bottomleft' | 'bottomright' | undefined; +/** + * + * [Live Demo](https://www.primevue.org/confirmdialog/) + * + * @module confirmationoptions + * + */ +/** + * Confirmation Service options. + * + * @group Interfaces + */ export interface ConfirmationOptions { /** * Element to align the overlay. @@ -18,11 +29,10 @@ export interface ConfirmationOptions { */ group?: string | undefined; /** - * Position of the dialog, options are 'center', 'top', 'bottom', 'left', 'right', 'topleft', 'topright', 'bottomleft' or 'bottomright'. - * @see ConfirmationPositionType - * Default value is 'center'. + * Position of the dialog. + * @defaultValue 'center' */ - position?: ConfirmationPositionType; + position?: 'center' | 'top' | 'bottom' | 'left' | 'right' | 'topleft' | 'topright' | 'bottomleft' | 'bottomright' | undefined; /** * Icon to display next to the message. */ @@ -34,15 +44,15 @@ export interface ConfirmationOptions { /** * Callback to execute when action is confirmed. */ - accept?: () => void; + accept?(): void; /** * Callback to execute when action is rejected. */ - reject?: () => void; + reject?(): void; /** * Callback to execute when dialog is hidden. */ - onHide?: () => void; + onHide?(): void; /** * Label of the accept button. Defaults to PrimeVue Locale configuration. */ diff --git a/components/confirmationservice/ConfirmationService.d.ts b/components/confirmationservice/ConfirmationService.d.ts index 27d8cb94f..a329e1600 100644 --- a/components/confirmationservice/ConfirmationService.d.ts +++ b/components/confirmationservice/ConfirmationService.d.ts @@ -1,19 +1,32 @@ +/** + * + * [Live Demo](https://www.primevue.org/confirmdialog/) + * + * @module confirmationservice + * + */ import { Plugin } from 'vue'; import { ConfirmationOptions } from '../confirmationoptions'; declare const plugin: Plugin; export default plugin; +/** + * Confirmation Service methods. + * + * @group Interfaces + * + */ export interface ConfirmationServiceMethods { /** * Displays the dialog using the confirmation object options. * @param {ConfirmationOptions} options - Confirmation Object */ - require(options: ConfirmationOptions): void; + require: (options: ConfirmationOptions) => void; /** * Hides the dialog without invoking accept or reject callbacks. */ - close(): void; + close: () => void; } declare module 'vue/types/vue' { diff --git a/components/terminalservice/TerminalService.d.ts b/components/terminalservice/TerminalService.d.ts index 4292e2b74..7f0ce9fdb 100755 --- a/components/terminalservice/TerminalService.d.ts +++ b/components/terminalservice/TerminalService.d.ts @@ -1,11 +1,21 @@ -type TerminalServiceActionType = 'command' | 'response' | undefined; - +/** + * Confirmation Service methods. + * + * @group Interfaces + * + */ export interface TerminalServiceOptions { - on(action: TerminalServiceActionType, fn: any): void; - emit(action: TerminalServiceActionType, params?: any): void; - off(action: TerminalServiceActionType, fn: any): void; + on: (action: 'command' | 'response' | undefined, fn: any) => void; + emit: (action: 'command' | 'response' | undefined, params?: any) => void; + off: (action: 'command' | 'response' | undefined, fn: any) => void; } declare const TerminalService: TerminalServiceOptions; +/** + * [Live Demo](https://www.primevue.org/terminal/) + * + * @module terminalservice + * + */ export default TerminalService; diff --git a/pages/confirmdialog/index.vue b/pages/confirmdialog/index.vue index 600521a82..e62eec7d6 100644 --- a/pages/confirmdialog/index.vue +++ b/pages/confirmdialog/index.vue @@ -1,5 +1,11 @@