2022-09-06 12:03:37 +00:00
|
|
|
import { VNode } from 'vue';
|
|
|
|
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
|
|
|
|
import { ConfirmationOptions } from '../confirmationoptions';
|
|
|
|
|
|
|
|
export interface ConfirmDialogBreakpoints {
|
|
|
|
/**
|
|
|
|
* Breakpoint for responsive mode.
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
*
|
|
|
|
* <ConfirmDialog :breakpoints="{'960px': '75vw', '640px': '100vw'}" ... />
|
|
|
|
*
|
|
|
|
* Result:
|
|
|
|
*
|
|
|
|
* @media screen and (max-width: ${breakpoint[key]}) {
|
|
|
|
* .p-dialog[attributeSelector] {
|
|
|
|
* width: ${breakpoint[value]} !important;
|
|
|
|
* }
|
|
|
|
* }
|
|
|
|
*/
|
|
|
|
[key: string]: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ConfirmDialogProps {
|
|
|
|
/**
|
|
|
|
* Optional key to match the key of the confirmation, useful to target a specific confirm dialog instance.
|
|
|
|
*/
|
|
|
|
group?: string | undefined;
|
|
|
|
/**
|
|
|
|
* Object literal to define widths per screen size.
|
|
|
|
* @see ConfirmDialogBreakpoints
|
|
|
|
*/
|
|
|
|
breakpoints?: ConfirmDialogBreakpoints;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface ConfirmDialogSlots {
|
|
|
|
/**
|
|
|
|
* Custom message template.
|
|
|
|
* @param {Object} scope - message slot's params.
|
|
|
|
*/
|
2022-09-14 11:26:01 +00:00
|
|
|
message: (scope: { message: ConfirmationOptions }) => VNode[];
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
|
2022-09-14 11:26:01 +00:00
|
|
|
export declare type ConfirmDialogEmits = {};
|
2022-09-06 12:03:37 +00:00
|
|
|
|
2022-09-14 11:26:01 +00:00
|
|
|
declare class ConfirmDialog extends ClassComponent<ConfirmDialogProps, ConfirmDialogSlots, ConfirmDialogEmits> {}
|
2022-09-06 12:03:37 +00:00
|
|
|
|
|
|
|
declare module '@vue/runtime-core' {
|
|
|
|
interface GlobalComponents {
|
2022-09-14 11:26:01 +00:00
|
|
|
ConfirmDialog: GlobalComponentConstructor<ConfirmDialog>;
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* ConfirmDialog uses a Dialog UI that is integrated with the Confirmation API.
|
|
|
|
*
|
|
|
|
* Helper API:
|
|
|
|
*
|
|
|
|
* - Confirmation API
|
|
|
|
* - ConfirmationService
|
|
|
|
*
|
|
|
|
* Demos:
|
|
|
|
*
|
2022-09-14 11:26:01 +00:00
|
|
|
* - [ConfirmDialog](https://www.primefaces.org/primevue/confirmdialog)
|
2022-09-06 12:03:37 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
export default ConfirmDialog;
|