@jsonforms/vue-vuetify
Version:
Vue Vuetify renderers for JSON Forms
167 lines (165 loc) • 4.63 kB
TypeScript
import { ControlElement, JsonSchema, JsonFormsRendererRegistryEntry, JsonFormsCellRendererRegistryEntry, Translator, RankedTester } from '@jsonforms/core';
import { MaskOptions } from 'maska';
import { IconValue, IconAliases } from '../icons';
import { DefineComponent, PropType, Ref, ComputedRef, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
import { Styles } from '..';
declare const controlRenderer: DefineComponent<{
schema: {
required: true;
type: PropType<JsonSchema>;
};
uischema: {
required: true;
type: PropType<ControlElement>;
};
path: {
required: true;
type: StringConstructor;
};
enabled: {
required: false;
type: BooleanConstructor;
default: undefined;
};
renderers: {
required: boolean;
type: PropType< JsonFormsRendererRegistryEntry[]>;
default: undefined;
};
cells: {
required: boolean;
type: PropType< JsonFormsCellRendererRegistryEntry[]>;
default: undefined;
};
config: {
required: boolean;
type: ObjectConstructor;
default: undefined;
};
}, {
showMenu: Ref<boolean>;
t: ComputedRef<Translator>;
adaptValue: (value: any) => any;
icons: {
current: ComputedRef<IconAliases>;
};
ampm: ComputedRef<boolean>;
timeFormat: ComputedRef<string>;
options: ComputedRef<MaskOptions> | null;
useMask: boolean;
maskCompleted: Ref<boolean>;
control: ComputedRef<{
uischema: ControlElement;
schema: NonNullable<JsonSchema>;
path: string;
enabled: boolean;
renderers: JsonFormsRendererRegistryEntry[];
cells: JsonFormsCellRendererRegistryEntry[] & {
tester: RankedTester;
cell: any;
}[];
config: any;
label: string;
description: string;
required: NonNullable<boolean | undefined>;
i18nKeyPrefix: string;
errors: string;
data: any;
rootSchema: NonNullable<JsonSchema>;
id: string;
visible: boolean;
}> & ComputedRef<{
uischema: ControlElement;
path: string;
config: any;
label: string;
description: string;
required: boolean;
errors: string;
id: string;
visible: boolean;
} & {
errors: string;
}>;
handleChange(path: string, value: any): void;
styles: Styles;
isFocused: Ref<boolean>;
appliedOptions: ComputedRef<any>;
controlWrapper: ComputedRef<{
id: string;
description: string;
errors: string;
label: string;
visible: boolean;
required: boolean;
}>;
onChange: (value: any) => void;
vuetifyProps: (path: string) => any;
persistentHint: () => boolean;
computedLabel: ComputedRef<string>;
touched: Ref<boolean>;
handleBlur: () => void;
handleFocus: () => void;
rawErrors: ComputedRef<string>;
}, unknown, {
pickerIcon(): IconValue;
timeSaveFormat(): string;
formats(): string[];
useSeconds(): boolean;
minTime(): string | undefined;
maxTime(): string | undefined;
inputModel: {
get(): string | undefined;
set(val: string | undefined): void;
};
pickerValue: {
get(): string | undefined;
set(val: string): void;
};
clearLabel(): string;
cancelLabel(): string;
okLabel(): string;
showActions(): boolean;
}, {
onPickerChange(value: string): void;
clear(): void;
}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
schema: {
required: true;
type: PropType<JsonSchema>;
};
uischema: {
required: true;
type: PropType<ControlElement>;
};
path: {
required: true;
type: StringConstructor;
};
enabled: {
required: false;
type: BooleanConstructor;
default: undefined;
};
renderers: {
required: boolean;
type: PropType< JsonFormsRendererRegistryEntry[]>;
default: undefined;
};
cells: {
required: boolean;
type: PropType< JsonFormsCellRendererRegistryEntry[]>;
default: undefined;
};
config: {
required: boolean;
type: ObjectConstructor;
default: undefined;
};
}>>, {
enabled: boolean;
renderers: JsonFormsRendererRegistryEntry[];
cells: JsonFormsCellRendererRegistryEntry[];
config: Record<string, any>;
}, {}>;
export default controlRenderer;