UNPKG

@jsonforms/vue-vuetify

Version:

Vue Vuetify renderers for JSON Forms

273 lines (271 loc) 10.1 kB
import { JsonSchema, JsonSchema7, UISchemaElement, ControlElement, JsonFormsRendererRegistryEntry, JsonFormsCellRendererRegistryEntry, JsonFormsUISchemaRegistryEntry, DispatchPropsOfControl, JsonFormsI18nState, Translator, JsonSchema4, RuleEffect } from '@jsonforms/core'; import { JsonFormsChangeEvent } from '@jsonforms/vue'; import { PropType, DefineComponent, ComputedRef, Raw, Ref, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue'; import { Styles } from '../../styles'; import { IconAliases } from '../..'; import { AdditionalPropertiesTranslations } from '../../i18n'; interface AdditionalPropertyType { propertyName: string; path: string; schema: JsonSchema | undefined; uischema: UISchemaElement | undefined; } declare const _default: DefineComponent<{ input: { type: PropType<{ control: ComputedRef<{ uischema: ControlElement; schema: NonNullable<JsonSchema>; path: string; enabled: boolean; renderers: JsonFormsRendererRegistryEntry[]; cells: JsonFormsCellRendererRegistryEntry[]; config: any; uischemas: JsonFormsUISchemaRegistryEntry[]; label: string; description: string; required: NonNullable<boolean | undefined>; i18nKeyPrefix: string; errors: string; data: any; rootSchema: NonNullable<JsonSchema>; id: string; visible: boolean; }>; } & DispatchPropsOfControl>; required: true; }; }, { validationMode: ComputedRef<any>; i18n: Raw<JsonFormsI18nState> | undefined; middleware: any; t: ComputedRef<Translator>; mdAndUp: Ref<boolean>; vuetifyProps: (path: string) => any; ajv: any; control: ComputedRef<{ uischema: ControlElement; schema: NonNullable<JsonSchema>; path: string; enabled: boolean; renderers: JsonFormsRendererRegistryEntry[]; cells: JsonFormsCellRendererRegistryEntry[]; config: any; uischemas: JsonFormsUISchemaRegistryEntry[]; label: string; description: string; required: NonNullable<boolean | undefined>; i18nKeyPrefix: string; errors: string; data: any; rootSchema: NonNullable<JsonSchema>; id: string; visible: boolean; }>; styles: Styles; appliedOptions: ComputedRef<any>; additionalPropertyItems: Ref<{ propertyName: string; path: string; schema: { $ref?: string | undefined; id?: string | undefined; $schema?: string | undefined; title?: string | undefined; description?: string | undefined; default?: any; multipleOf?: number | undefined; maximum?: number | undefined; exclusiveMaximum?: boolean | undefined; minimum?: number | undefined; exclusiveMinimum?: boolean | undefined; maxLength?: number | undefined; minLength?: number | undefined; pattern?: string | undefined; additionalItems?: boolean | any | undefined; items?: any | any[] | undefined; maxItems?: number | undefined; minItems?: number | undefined; uniqueItems?: boolean | undefined; maxProperties?: number | undefined; minProperties?: number | undefined; required?: string[] | undefined; additionalProperties?: boolean | any | undefined; definitions?: { [key: string]: JsonSchema4; } | undefined; properties?: { [property: string]: JsonSchema4; } | undefined; patternProperties?: { [pattern: string]: JsonSchema4; } | undefined; dependencies?: { [key: string]: string[] | JsonSchema4; } | undefined; enum?: any[] | undefined; type?: string | string[] | undefined; allOf?: any[] | undefined; anyOf?: any[] | undefined; oneOf?: any[] | undefined; not?: any | undefined; format?: string | undefined; const?: any; } | { $ref?: string | undefined; $id?: string | undefined; $schema?: string | undefined; title?: string | undefined; description?: string | undefined; default?: any; multipleOf?: number | undefined; maximum?: number | undefined; exclusiveMaximum?: number | undefined; minimum?: number | undefined; exclusiveMinimum?: number | undefined; maxLength?: number | undefined; minLength?: number | undefined; pattern?: string | undefined; additionalItems?: boolean | any | undefined; items?: any | any[] | undefined; maxItems?: number | undefined; minItems?: number | undefined; uniqueItems?: boolean | undefined; maxProperties?: number | undefined; minProperties?: number | undefined; required?: string[] | undefined; additionalProperties?: boolean | any | undefined; definitions?: { [key: string]: JsonSchema7; } | undefined; properties?: { [property: string]: JsonSchema7; } | undefined; patternProperties?: { [pattern: string]: JsonSchema7; } | undefined; dependencies?: { [key: string]: string[] | JsonSchema7; } | undefined; enum?: any[] | undefined; type?: string | string[] | undefined; allOf?: any[] | undefined; anyOf?: any[] | undefined; oneOf?: any[] | undefined; not?: any | undefined; format?: string | undefined; readOnly?: boolean | undefined; writeOnly?: boolean | undefined; examples?: any[] | undefined; contains?: any | undefined; propertyNames?: any | undefined; const?: any; if?: any | undefined; then?: any | undefined; else?: any | undefined; errorMessage?: any; } | undefined; uischema: { type: string; rule?: { effect: RuleEffect; condition: { readonly type?: string | undefined; }; } | undefined; options?: { [key: string]: any; } | undefined; } | undefined; }[]>; toAdditionalPropertyType: (propName: string, propValue: any) => AdditionalPropertyType; newPropertyName: Ref<string | null>; propertyNameChange: (event: JsonFormsChangeEvent) => void; newPropertyErrors: Ref<{ keyword: string; instancePath: string; schemaPath: string; params: Record<string, any>; propertyName?: string | undefined; message?: string | undefined; schema?: unknown; parentSchema?: { [x: string]: any; id?: string | undefined; $id?: string | undefined; $schema?: string | undefined; $async?: false | undefined; } | { [x: string]: any; $async: true; id?: string | undefined; $id?: string | undefined; $schema?: string | undefined; } | undefined; data?: unknown; }[] | undefined>; additionalErrors: Ref<{ keyword: string; instancePath: string; schemaPath: string; params: Record<string, any>; propertyName?: string | undefined; message?: string | undefined; schema?: unknown; parentSchema?: { [x: string]: any; id?: string | undefined; $id?: string | undefined; $schema?: string | undefined; $async?: false | undefined; } | { [x: string]: any; $async: true; id?: string | undefined; $id?: string | undefined; $schema?: string | undefined; } | undefined; data?: unknown; }[]>; icons: { current: ComputedRef<IconAliases>; }; propertyNameSchema: ComputedRef<JsonSchema7>; translations: AdditionalPropertiesTranslations; }, unknown, { addPropertyDisabled(): boolean; maxPropertiesReached(): boolean; removePropertyDisabled(): boolean; minPropertiesReached(): boolean; additionalPropertiesTitle(): string | undefined; }, { composePaths: (path1: string, path2: string) => string; addProperty(): void; removeProperty(propName: string): void; }, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{ input: { type: PropType<{ control: ComputedRef<{ uischema: ControlElement; schema: NonNullable<JsonSchema>; path: string; enabled: boolean; renderers: JsonFormsRendererRegistryEntry[]; cells: JsonFormsCellRendererRegistryEntry[]; config: any; uischemas: JsonFormsUISchemaRegistryEntry[]; label: string; description: string; required: NonNullable<boolean | undefined>; i18nKeyPrefix: string; errors: string; data: any; rootSchema: NonNullable<JsonSchema>; id: string; visible: boolean; }>; } & DispatchPropsOfControl>; required: true; }; }>>, {}, {}>; export default _default;