Fixed #3802 - Improve folder structure for nuxt configurations

This commit is contained in:
mertsincan 2023-03-26 06:22:57 +01:00
parent 851950270b
commit f5fe822afb
563 changed files with 1703 additions and 1095 deletions

View file

@ -0,0 +1,38 @@
/**
*
* [Live Demo](https://www.primevue.org/dynamicdialog/)
* @module dialogservice-usedialog
*/
import { Plugin } from 'vue';
import { DynamicDialogInstance, DynamicDialogOptions } from '../dynamicdialogoptions';
declare const plugin: Plugin;
export default plugin;
/**
* Dynamic Dialog components methods.
*
* @group Model
*
*/
export interface DialogServiceMethods {
/**
* Displays the dialog using the dynamic dialog object options.
* @param {*} content - Dynamic component for content template
* @param {DynamicDialogOptions} options - DynamicDialog Object
* @return {@link DynamicDialogInstance}
*/
open(content: any, options?: DynamicDialogOptions): DynamicDialogInstance;
}
declare module 'vue/types/vue' {
interface Vue {
$dialog: DialogServiceMethods;
}
}
declare module '@vue/runtime-core' {
interface ComponentCustomProperties {
$dialog: DialogServiceMethods;
}
}

View file

@ -0,0 +1,28 @@
import { markRaw } from 'vue';
import { PrimeVueDialogSymbol } from 'primevue/usedialog';
import DynamicDialogEventBus from 'primevue/dynamicdialogeventbus';
export default {
install: (app) => {
const DialogService = {
open: (content, options) => {
const instance = {
content: content && markRaw(content),
options: options || {},
data: options && options.data,
close: (params) => {
DynamicDialogEventBus.emit('close', { instance, params });
}
};
DynamicDialogEventBus.emit('open', { instance });
return instance;
}
};
app.config.unwrapInjectedRef = true; // Remove it after Vue 3.3. Details: https://vuejs.org/guide/components/provide-inject.html#working-with-reactivity
app.config.globalProperties.$dialog = DialogService;
app.provide(PrimeVueDialogSymbol, DialogService);
}
};

View file

@ -0,0 +1,6 @@
{
"main": "./dialogservice.cjs.js",
"module": "./dialogservice.esm.js",
"unpkg": "./dialogservice.min.js",
"types": "./DialogService.d.ts"
}