ConfirmationOptions and ConfirmationService d.ts updated
parent
4e5f5e4c46
commit
6a96ccc50c
|
@ -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 {
|
export interface ConfirmationOptions {
|
||||||
/**
|
/**
|
||||||
* Element to align the overlay.
|
* Element to align the overlay.
|
||||||
|
@ -18,11 +29,10 @@ export interface ConfirmationOptions {
|
||||||
*/
|
*/
|
||||||
group?: string | undefined;
|
group?: string | undefined;
|
||||||
/**
|
/**
|
||||||
* Position of the dialog, options are 'center', 'top', 'bottom', 'left', 'right', 'topleft', 'topright', 'bottomleft' or 'bottomright'.
|
* Position of the dialog.
|
||||||
* @see ConfirmationPositionType
|
* @defaultValue 'center'
|
||||||
* Default value is 'center'.
|
|
||||||
*/
|
*/
|
||||||
position?: ConfirmationPositionType;
|
position?: 'center' | 'top' | 'bottom' | 'left' | 'right' | 'topleft' | 'topright' | 'bottomleft' | 'bottomright' | undefined;
|
||||||
/**
|
/**
|
||||||
* Icon to display next to the message.
|
* Icon to display next to the message.
|
||||||
*/
|
*/
|
||||||
|
@ -34,15 +44,15 @@ export interface ConfirmationOptions {
|
||||||
/**
|
/**
|
||||||
* Callback to execute when action is confirmed.
|
* Callback to execute when action is confirmed.
|
||||||
*/
|
*/
|
||||||
accept?: () => void;
|
accept?(): void;
|
||||||
/**
|
/**
|
||||||
* Callback to execute when action is rejected.
|
* Callback to execute when action is rejected.
|
||||||
*/
|
*/
|
||||||
reject?: () => void;
|
reject?(): void;
|
||||||
/**
|
/**
|
||||||
* Callback to execute when dialog is hidden.
|
* Callback to execute when dialog is hidden.
|
||||||
*/
|
*/
|
||||||
onHide?: () => void;
|
onHide?(): void;
|
||||||
/**
|
/**
|
||||||
* Label of the accept button. Defaults to PrimeVue Locale configuration.
|
* Label of the accept button. Defaults to PrimeVue Locale configuration.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,19 +1,32 @@
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* [Live Demo](https://www.primevue.org/confirmdialog/)
|
||||||
|
*
|
||||||
|
* @module confirmationservice
|
||||||
|
*
|
||||||
|
*/
|
||||||
import { Plugin } from 'vue';
|
import { Plugin } from 'vue';
|
||||||
import { ConfirmationOptions } from '../confirmationoptions';
|
import { ConfirmationOptions } from '../confirmationoptions';
|
||||||
|
|
||||||
declare const plugin: Plugin;
|
declare const plugin: Plugin;
|
||||||
export default plugin;
|
export default plugin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Confirmation Service methods.
|
||||||
|
*
|
||||||
|
* @group Interfaces
|
||||||
|
*
|
||||||
|
*/
|
||||||
export interface ConfirmationServiceMethods {
|
export interface ConfirmationServiceMethods {
|
||||||
/**
|
/**
|
||||||
* Displays the dialog using the confirmation object options.
|
* Displays the dialog using the confirmation object options.
|
||||||
* @param {ConfirmationOptions} options - Confirmation Object
|
* @param {ConfirmationOptions} options - Confirmation Object
|
||||||
*/
|
*/
|
||||||
require(options: ConfirmationOptions): void;
|
require: (options: ConfirmationOptions) => void;
|
||||||
/**
|
/**
|
||||||
* Hides the dialog without invoking accept or reject callbacks.
|
* Hides the dialog without invoking accept or reject callbacks.
|
||||||
*/
|
*/
|
||||||
close(): void;
|
close: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare module 'vue/types/vue' {
|
declare module 'vue/types/vue' {
|
||||||
|
|
|
@ -1,11 +1,21 @@
|
||||||
type TerminalServiceActionType = 'command' | 'response' | undefined;
|
/**
|
||||||
|
* Confirmation Service methods.
|
||||||
|
*
|
||||||
|
* @group Interfaces
|
||||||
|
*
|
||||||
|
*/
|
||||||
export interface TerminalServiceOptions {
|
export interface TerminalServiceOptions {
|
||||||
on(action: TerminalServiceActionType, fn: any): void;
|
on: (action: 'command' | 'response' | undefined, fn: any) => void;
|
||||||
emit(action: TerminalServiceActionType, params?: any): void;
|
emit: (action: 'command' | 'response' | undefined, params?: any) => void;
|
||||||
off(action: TerminalServiceActionType, fn: any): void;
|
off: (action: 'command' | 'response' | undefined, fn: any) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
declare const TerminalService: TerminalServiceOptions;
|
declare const TerminalService: TerminalServiceOptions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* [Live Demo](https://www.primevue.org/terminal/)
|
||||||
|
*
|
||||||
|
* @module terminalservice
|
||||||
|
*
|
||||||
|
*/
|
||||||
export default TerminalService;
|
export default TerminalService;
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<DocComponent title="Vue Confirmation Dialog Component" header="ConfirmDialog" description="ConfirmDialog uses a Dialog UI that is integrated with the Confirmation API." :componentDocs="docs" :apiDocs="['ConfirmDialog']" />
|
<DocComponent
|
||||||
|
title="Vue Confirmation Dialog Component"
|
||||||
|
header="ConfirmDialog"
|
||||||
|
description="ConfirmDialog uses a Dialog UI that is integrated with the Confirmation API."
|
||||||
|
:componentDocs="docs"
|
||||||
|
:apiDocs="['ConfirmDialog', 'ConfirmationService', 'ConfirmationOptions']"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<DocComponent title="Vue Confirmation Popup Component" header="ConfirmPopup" description="ConfirmPopup displays a confirmation overlay displayed relatively to its target." :componentDocs="docs" :apiDocs="['ConfirmPopup']" />
|
<DocComponent
|
||||||
|
title="Vue Confirmation Popup Component"
|
||||||
|
header="ConfirmPopup"
|
||||||
|
description="ConfirmPopup displays a confirmation overlay displayed relatively to its target."
|
||||||
|
:componentDocs="docs"
|
||||||
|
:apiDocs="['ConfirmPopup', 'ConfirmationService', 'ConfirmationOptions']"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
Loading…
Reference in New Issue