Fixed #4122 - The types in PrimeVue config are not accessible

This commit is contained in:
mertsincan 2023-07-10 23:16:13 +01:00
parent 616f69db33
commit 6e4daf6843

View file

@ -88,7 +88,7 @@ import { TreeTablePassThroughOptions } from '../treetable';
import { DefaultPTOptions } from '../ts-helpers'; import { DefaultPTOptions } from '../ts-helpers';
import { VirtualScrollerPassThroughOptions } from '../virtualscroller'; import { VirtualScrollerPassThroughOptions } from '../virtualscroller';
interface PrimeVueConfiguration { export interface PrimeVueConfiguration {
ripple?: boolean; ripple?: boolean;
inputStyle?: string; inputStyle?: string;
locale?: PrimeVueLocaleOptions; locale?: PrimeVueLocaleOptions;
@ -98,14 +98,14 @@ interface PrimeVueConfiguration {
unstyled?: boolean; unstyled?: boolean;
} }
interface PrimeVueZIndexOptions { export interface PrimeVueZIndexOptions {
modal?: number; modal?: number;
overlay?: number; overlay?: number;
menu?: number; menu?: number;
tooltip?: number; tooltip?: number;
} }
interface PrimeVuePTOptions { export interface PrimeVuePTOptions {
accordion?: DefaultPTOptions<AccordionPassThroughOptions>; accordion?: DefaultPTOptions<AccordionPassThroughOptions>;
accordiontab?: DefaultPTOptions<AccordionTabPassThroughOptions>; accordiontab?: DefaultPTOptions<AccordionTabPassThroughOptions>;
autocomplete?: DefaultPTOptions<AutoCompletePassThroughOptions>; autocomplete?: DefaultPTOptions<AutoCompletePassThroughOptions>;
@ -198,7 +198,7 @@ interface PrimeVuePTOptions {
}; };
} }
interface PrimeVueLocaleAriaOptions { export interface PrimeVueLocaleAriaOptions {
trueLabel?: string; trueLabel?: string;
falseLabel?: string; falseLabel?: string;
nullLabel?: string; nullLabel?: string;
@ -249,7 +249,7 @@ interface PrimeVueLocaleAriaOptions {
rotateLeft?: string; rotateLeft?: string;
} }
interface PrimeVueLocaleOptions { export interface PrimeVueLocaleOptions {
startsWith?: string; startsWith?: string;
contains?: string; contains?: string;
notContains?: string; notContains?: string;
@ -317,13 +317,11 @@ interface PrimeVueLocaleOptions {
aria?: PrimeVueLocaleAriaOptions; aria?: PrimeVueLocaleAriaOptions;
} }
interface SwitchTheme { export type PrimeVueChangeTheme = (currentTheme: string, newTheme: string, linkElementId: string, callback?: Function) => void;
(currentTheme: string, newTheme: string, linkElementId: string, callback?: Function): void;
}
export declare function usePrimeVue(): { export declare function usePrimeVue(): {
config: PrimeVueConfiguration; config: PrimeVueConfiguration;
changeTheme: SwitchTheme; changeTheme: PrimeVueChangeTheme;
}; };
declare const plugin: Plugin; declare const plugin: Plugin;
@ -333,7 +331,7 @@ declare module 'vue/types/vue' {
interface Vue { interface Vue {
$primevue: { $primevue: {
config: PrimeVueConfiguration; config: PrimeVueConfiguration;
changeTheme: SwitchTheme; changeTheme: PrimeVueChangeTheme;
}; };
} }
} }
@ -342,7 +340,7 @@ declare module '@vue/runtime-core' {
interface ComponentCustomProperties { interface ComponentCustomProperties {
$primevue: { $primevue: {
config: PrimeVueConfiguration; config: PrimeVueConfiguration;
changeTheme: SwitchTheme; changeTheme: PrimeVueChangeTheme;
}; };
} }
} }