DialogService and DynamicDialogOptions d.ts updated

pull/3711/head
Tuğçe Küçükoğlu 2023-03-06 09:55:17 +03:00
parent d29fd6c6c6
commit 4e5f5e4c46
3 changed files with 49 additions and 10 deletions

View File

@ -1,9 +1,22 @@
/**
*
* [Live Demo](https://www.primevue.org/dynamicdialog/)
*
* @module dialogservice
*
*/
import { Plugin } from 'vue';
import { DynamicDialogOptions, DynamicDialogInstance } from '../dynamicdialogoptions';
import { DynamicDialogInstance, DynamicDialogOptions } from '../dynamicdialogoptions';
declare const plugin: Plugin;
export default plugin;
/**
* Dynamic Dialog components methods.
*
* @group Interfaces
*
*/
export interface DialogServiceMethods {
/**
* Displays the dialog using the dynamic dialog object options.

View File

@ -1,7 +1,17 @@
/**
*
* [Live Demo](https://www.primevue.org/dynamicdialog/)
*
* @module dynamicdialogoptions
*
*/
import { DialogProps } from '../dialog';
export type DynamicDialogCloseType = 'config-close' | 'dialog-close' | undefined;
/**
* Custom dialog templates.
*
* @group Interfaces
*/
export interface DynamicDialogTemplates {
/**
* Custom header template.
@ -13,6 +23,11 @@ export interface DynamicDialogTemplates {
footer?: any;
}
/**
* Dynamic Dialog close method options.
*
* @group Interfaces
*/
export interface DynamicDialogCloseOptions {
/**
* Custom data object
@ -20,20 +35,22 @@ export interface DynamicDialogCloseOptions {
data?: any;
/**
* Close type
* @see DynamicDialogCloseType
*/
type: DynamicDialogCloseType;
type: 'config-close' | 'dialog-close' | undefined;
}
/**
* Custom Dynamic Dialog options.
*
* @group Interfaces
*/
export interface DynamicDialogOptions {
/**
* Dialog Props
* @see DialogProps
*/
props?: DialogProps;
/**
* Dialog Slots
* @see DynamicDialogTemplates
*/
templates?: DynamicDialogTemplates;
/**
@ -42,7 +59,6 @@ export interface DynamicDialogOptions {
data?: any;
/**
* Closes the dialog.
* @see DynamicDialogCloseOptions
*/
onClose?(options?: DynamicDialogCloseOptions): void;
/**
@ -51,6 +67,11 @@ export interface DynamicDialogOptions {
[key: string]: any;
}
/**
* Custom Dynamic Dialog options.
*
* @group Interfaces
*/
export interface DynamicDialogInstance {
/**
* Dynamic component for content template
@ -58,7 +79,6 @@ export interface DynamicDialogInstance {
content: any;
/**
* Instance options
* @see DynamicDialogOptions
*/
options: DynamicDialogOptions;
/**

View File

@ -1,5 +1,11 @@
<template>
<DocComponent title="Vue Dynamic Dialog Component" header="Dynamic Dialog" description="Dynamic Dialog is a Dialog container to display content in an overlay window." :componentDocs="docs" :apiDocs="['DynamicDialog', 'Dialog']" />
<DocComponent
title="Vue Dynamic Dialog Component"
header="Dynamic Dialog"
description="Dynamic Dialog is a Dialog container to display content in an overlay window."
:componentDocs="docs"
:apiDocs="['DynamicDialog', 'Dialog', 'DialogService', 'DynamicDialogOptions']"
/>
</template>
<script>