2023-03-07 08:00:59 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* [Live Demo](https://www.primevue.org/toast/)
|
|
|
|
*
|
|
|
|
* @module toastservice
|
|
|
|
*
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
import { Plugin } from 'vue';
|
|
|
|
import { ToastMessageOptions } from '../toast';
|
|
|
|
|
|
|
|
declare const plugin: Plugin;
|
|
|
|
export default plugin;
|
|
|
|
|
2023-03-07 08:00:59 +00:00
|
|
|
/**
|
|
|
|
* Toast Service methods.
|
|
|
|
*
|
|
|
|
* @group Interfaces
|
|
|
|
*
|
|
|
|
*/
|
2022-09-06 12:03:37 +00:00
|
|
|
export interface ToastServiceMethods {
|
|
|
|
/**
|
|
|
|
* Displays the message in a suitable Toast component.
|
|
|
|
* @param {ToastMessageOptions} message - Message instance.
|
|
|
|
*/
|
2023-03-07 08:00:59 +00:00
|
|
|
add(message: ToastMessageOptions): void;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Clears the messages that belongs to the group.
|
|
|
|
* @param {string} group - Name of the message group.
|
|
|
|
*/
|
2023-03-07 08:00:59 +00:00
|
|
|
removeGroup(group: string): void;
|
2022-09-06 12:03:37 +00:00
|
|
|
/**
|
|
|
|
* Clears all the messages.
|
|
|
|
*/
|
2023-03-07 08:00:59 +00:00
|
|
|
removeAllGroups(): void;
|
2022-09-06 12:03:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
declare module 'vue/types/vue' {
|
|
|
|
interface Vue {
|
|
|
|
$toast: ToastServiceMethods;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
declare module '@vue/runtime-core' {
|
|
|
|
interface ComponentCustomProperties {
|
|
|
|
$toast: ToastServiceMethods;
|
|
|
|
}
|
|
|
|
}
|