@rjsf/core 4.2.3 → 5.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/core.cjs.development.js +2952 -4606
- package/dist/core.cjs.development.js.map +1 -1
- package/dist/core.cjs.production.min.js +1 -1
- package/dist/core.cjs.production.min.js.map +1 -1
- package/dist/core.esm.js +2900 -4564
- package/dist/core.esm.js.map +1 -1
- package/dist/core.umd.development.js +4054 -0
- package/dist/core.umd.development.js.map +1 -0
- package/dist/core.umd.production.min.js +2 -0
- package/dist/core.umd.production.min.js.map +1 -0
- package/dist/index.d.ts +295 -70
- package/package.json +41 -71
- package/dist/cjs/components/AddButton.js +0 -39
- package/dist/cjs/components/ErrorList.js +0 -41
- package/dist/cjs/components/Form.js +0 -588
- package/dist/cjs/components/IconButton.js +0 -37
- package/dist/cjs/components/fields/ArrayField.js +0 -977
- package/dist/cjs/components/fields/BooleanField.js +0 -107
- package/dist/cjs/components/fields/DescriptionField.js +0 -50
- package/dist/cjs/components/fields/MultiSchemaField.js +0 -275
- package/dist/cjs/components/fields/NullField.js +0 -66
- package/dist/cjs/components/fields/NumberField.js +0 -156
- package/dist/cjs/components/fields/ObjectField.js +0 -366
- package/dist/cjs/components/fields/SchemaField.js +0 -546
- package/dist/cjs/components/fields/StringField.js +0 -98
- package/dist/cjs/components/fields/TitleField.js +0 -42
- package/dist/cjs/components/fields/UnsupportedField.js +0 -46
- package/dist/cjs/components/fields/index.js +0 -47
- package/dist/cjs/components/widgets/AltDateTimeWidget.js +0 -48
- package/dist/cjs/components/widgets/AltDateWidget.js +0 -301
- package/dist/cjs/components/widgets/BaseInput.js +0 -151
- package/dist/cjs/components/widgets/CheckboxWidget.js +0 -85
- package/dist/cjs/components/widgets/CheckboxesWidget.js +0 -121
- package/dist/cjs/components/widgets/ColorWidget.js +0 -45
- package/dist/cjs/components/widgets/DateTimeWidget.js +0 -43
- package/dist/cjs/components/widgets/DateWidget.js +0 -39
- package/dist/cjs/components/widgets/EmailWidget.js +0 -34
- package/dist/cjs/components/widgets/FileWidget.js +0 -215
- package/dist/cjs/components/widgets/HiddenWidget.js +0 -36
- package/dist/cjs/components/widgets/PasswordWidget.js +0 -34
- package/dist/cjs/components/widgets/RadioWidget.js +0 -107
- package/dist/cjs/components/widgets/RangeWidget.js +0 -46
- package/dist/cjs/components/widgets/SelectWidget.js +0 -151
- package/dist/cjs/components/widgets/SubmitButton.js +0 -35
- package/dist/cjs/components/widgets/TextWidget.js +0 -31
- package/dist/cjs/components/widgets/TextareaWidget.js +0 -81
- package/dist/cjs/components/widgets/URLWidget.js +0 -34
- package/dist/cjs/components/widgets/UpDownWidget.js +0 -36
- package/dist/cjs/components/widgets/index.js +0 -73
- package/dist/cjs/defaultRegistry.js +0 -23
- package/dist/cjs/index.js +0 -37
- package/dist/cjs/types.js +0 -47
- package/dist/cjs/utils.js +0 -1407
- package/dist/cjs/validate.js +0 -354
- package/dist/cjs/withTheme.js +0 -53
- package/dist/components/AddButton.d.ts +0 -5
- package/dist/components/ErrorList.d.ts +0 -1
- package/dist/components/Form.d.ts +0 -48
- package/dist/components/IconButton.d.ts +0 -1
- package/dist/components/fields/ArrayField.d.ts +0 -51
- package/dist/components/fields/BooleanField.d.ts +0 -45
- package/dist/components/fields/DescriptionField.d.ts +0 -9
- package/dist/components/fields/MultiSchemaField.d.ts +0 -40
- package/dist/components/fields/NullField.d.ts +0 -6
- package/dist/components/fields/NumberField.d.ts +0 -63
- package/dist/components/fields/ObjectField.d.ts +0 -22
- package/dist/components/fields/SchemaField.d.ts +0 -39
- package/dist/components/fields/StringField.d.ts +0 -45
- package/dist/components/fields/TitleField.d.ts +0 -10
- package/dist/components/fields/UnsupportedField.d.ts +0 -14
- package/dist/components/fields/index.d.ts +0 -26
- package/dist/components/widgets/AltDateTimeWidget.d.ts +0 -22
- package/dist/components/widgets/AltDateWidget.d.ts +0 -22
- package/dist/components/widgets/BaseInput.d.ts +0 -23
- package/dist/components/widgets/CheckboxWidget.d.ts +0 -18
- package/dist/components/widgets/CheckboxesWidget.d.ts +0 -26
- package/dist/components/widgets/ColorWidget.d.ts +0 -15
- package/dist/components/widgets/DateTimeWidget.d.ts +0 -8
- package/dist/components/widgets/DateWidget.d.ts +0 -8
- package/dist/components/widgets/EmailWidget.d.ts +0 -8
- package/dist/components/widgets/FileWidget.d.ts +0 -19
- package/dist/components/widgets/HiddenWidget.d.ts +0 -12
- package/dist/components/widgets/PasswordWidget.d.ts +0 -8
- package/dist/components/widgets/RadioWidget.d.ts +0 -22
- package/dist/components/widgets/RangeWidget.d.ts +0 -8
- package/dist/components/widgets/SelectWidget.d.ts +0 -24
- package/dist/components/widgets/SubmitButton.d.ts +0 -3
- package/dist/components/widgets/TextWidget.d.ts +0 -9
- package/dist/components/widgets/TextareaWidget.d.ts +0 -25
- package/dist/components/widgets/URLWidget.d.ts +0 -8
- package/dist/components/widgets/UpDownWidget.d.ts +0 -8
- package/dist/components/widgets/index.d.ts +0 -43
- package/dist/defaultRegistry.d.ts +0 -41
- package/dist/es/components/AddButton.js +0 -28
- package/dist/es/components/ErrorList.js +0 -31
- package/dist/es/components/Form.js +0 -572
- package/dist/es/components/IconButton.js +0 -27
- package/dist/es/components/fields/ArrayField.js +0 -959
- package/dist/es/components/fields/BooleanField.js +0 -93
- package/dist/es/components/fields/DescriptionField.js +0 -39
- package/dist/es/components/fields/MultiSchemaField.js +0 -261
- package/dist/es/components/fields/NullField.js +0 -55
- package/dist/es/components/fields/NumberField.js +0 -141
- package/dist/es/components/fields/ObjectField.js +0 -351
- package/dist/es/components/fields/SchemaField.js +0 -528
- package/dist/es/components/fields/StringField.js +0 -84
- package/dist/es/components/fields/TitleField.js +0 -30
- package/dist/es/components/fields/UnsupportedField.js +0 -35
- package/dist/es/components/fields/index.js +0 -26
- package/dist/es/components/widgets/AltDateTimeWidget.js +0 -36
- package/dist/es/components/widgets/AltDateWidget.js +0 -287
- package/dist/es/components/widgets/BaseInput.js +0 -140
- package/dist/es/components/widgets/CheckboxWidget.js +0 -73
- package/dist/es/components/widgets/CheckboxesWidget.js +0 -108
- package/dist/es/components/widgets/ColorWidget.js +0 -34
- package/dist/es/components/widgets/DateTimeWidget.js +0 -31
- package/dist/es/components/widgets/DateWidget.js +0 -28
- package/dist/es/components/widgets/EmailWidget.js +0 -23
- package/dist/es/components/widgets/FileWidget.js +0 -201
- package/dist/es/components/widgets/HiddenWidget.js +0 -25
- package/dist/es/components/widgets/PasswordWidget.js +0 -23
- package/dist/es/components/widgets/RadioWidget.js +0 -94
- package/dist/es/components/widgets/RangeWidget.js +0 -34
- package/dist/es/components/widgets/SelectWidget.js +0 -138
- package/dist/es/components/widgets/SubmitButton.js +0 -24
- package/dist/es/components/widgets/TextWidget.js +0 -20
- package/dist/es/components/widgets/TextareaWidget.js +0 -70
- package/dist/es/components/widgets/URLWidget.js +0 -23
- package/dist/es/components/widgets/UpDownWidget.js +0 -24
- package/dist/es/components/widgets/index.js +0 -43
- package/dist/es/defaultRegistry.js +0 -12
- package/dist/es/index.js +0 -16
- package/dist/es/types.js +0 -34
- package/dist/es/utils.js +0 -1309
- package/dist/es/validate.js +0 -338
- package/dist/es/withTheme.js +0 -39
- package/dist/react-jsonschema-form.js +0 -26
- package/dist/react-jsonschema-form.js.map +0 -1
- package/dist/types.d.ts +0 -50
- package/dist/utils.d.ts +0 -81
- package/dist/validate.d.ts +0 -21
- package/dist/withTheme.d.ts +0 -10
- package/index.d.ts +0 -500
- package/lib/components/AddButton.js +0 -28
- package/lib/components/ErrorList.js +0 -31
- package/lib/components/Form.js +0 -572
- package/lib/components/IconButton.js +0 -27
- package/lib/components/fields/ArrayField.js +0 -959
- package/lib/components/fields/BooleanField.js +0 -93
- package/lib/components/fields/DescriptionField.js +0 -39
- package/lib/components/fields/MultiSchemaField.js +0 -261
- package/lib/components/fields/NullField.js +0 -55
- package/lib/components/fields/NumberField.js +0 -141
- package/lib/components/fields/ObjectField.js +0 -351
- package/lib/components/fields/SchemaField.js +0 -528
- package/lib/components/fields/StringField.js +0 -84
- package/lib/components/fields/TitleField.js +0 -30
- package/lib/components/fields/UnsupportedField.js +0 -35
- package/lib/components/fields/index.js +0 -26
- package/lib/components/widgets/AltDateTimeWidget.js +0 -36
- package/lib/components/widgets/AltDateWidget.js +0 -287
- package/lib/components/widgets/BaseInput.js +0 -140
- package/lib/components/widgets/CheckboxWidget.js +0 -73
- package/lib/components/widgets/CheckboxesWidget.js +0 -108
- package/lib/components/widgets/ColorWidget.js +0 -34
- package/lib/components/widgets/DateTimeWidget.js +0 -31
- package/lib/components/widgets/DateWidget.js +0 -28
- package/lib/components/widgets/EmailWidget.js +0 -23
- package/lib/components/widgets/FileWidget.js +0 -201
- package/lib/components/widgets/HiddenWidget.js +0 -25
- package/lib/components/widgets/PasswordWidget.js +0 -23
- package/lib/components/widgets/RadioWidget.js +0 -94
- package/lib/components/widgets/RangeWidget.js +0 -34
- package/lib/components/widgets/SelectWidget.js +0 -138
- package/lib/components/widgets/SubmitButton.js +0 -24
- package/lib/components/widgets/TextWidget.js +0 -20
- package/lib/components/widgets/TextareaWidget.js +0 -70
- package/lib/components/widgets/URLWidget.js +0 -23
- package/lib/components/widgets/UpDownWidget.js +0 -24
- package/lib/components/widgets/index.js +0 -43
- package/lib/defaultRegistry.js +0 -12
- package/lib/index.js +0 -16
- package/lib/types.js +0 -34
- package/lib/utils.js +0 -1309
- package/lib/validate.js +0 -338
- package/lib/withTheme.js +0 -39
package/dist/types.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
export const registry: PropTypes.Requireable<PropTypes.InferProps<{
|
|
2
|
-
ArrayFieldTemplate: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
3
|
-
FieldTemplate: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
4
|
-
ObjectFieldTemplate: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
5
|
-
definitions: PropTypes.Validator<object>;
|
|
6
|
-
rootSchema: PropTypes.Requireable<object>;
|
|
7
|
-
fields: PropTypes.Validator<{
|
|
8
|
-
[x: string]: string | ((props: any, context?: any) => any) | (new (props: any, context?: any) => any) | null | undefined;
|
|
9
|
-
}>;
|
|
10
|
-
formContext: PropTypes.Validator<object>;
|
|
11
|
-
widgets: PropTypes.Validator<{
|
|
12
|
-
[x: string]: object | null | undefined;
|
|
13
|
-
}>;
|
|
14
|
-
}>>;
|
|
15
|
-
export const fieldProps: {
|
|
16
|
-
autofocus: PropTypes.Requireable<boolean>;
|
|
17
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
18
|
-
errorSchema: PropTypes.Requireable<object>;
|
|
19
|
-
formData: PropTypes.Requireable<any>;
|
|
20
|
-
idSchema: PropTypes.Requireable<object>;
|
|
21
|
-
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
22
|
-
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
23
|
-
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
24
|
-
rawErrors: PropTypes.Requireable<(string | null | undefined)[]>;
|
|
25
|
-
readonly: PropTypes.Requireable<boolean>;
|
|
26
|
-
registry: PropTypes.Validator<PropTypes.InferProps<{
|
|
27
|
-
ArrayFieldTemplate: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
28
|
-
FieldTemplate: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
29
|
-
ObjectFieldTemplate: PropTypes.Requireable<PropTypes.ReactComponentLike>;
|
|
30
|
-
definitions: PropTypes.Validator<object>;
|
|
31
|
-
rootSchema: PropTypes.Requireable<object>;
|
|
32
|
-
fields: PropTypes.Validator<{
|
|
33
|
-
[x: string]: string | ((props: any, context?: any) => any) | (new (props: any, context?: any) => any) | null | undefined;
|
|
34
|
-
}>;
|
|
35
|
-
formContext: PropTypes.Validator<object>;
|
|
36
|
-
widgets: PropTypes.Validator<{
|
|
37
|
-
[x: string]: object | null | undefined;
|
|
38
|
-
}>;
|
|
39
|
-
}>>;
|
|
40
|
-
required: PropTypes.Requireable<boolean>;
|
|
41
|
-
schema: PropTypes.Validator<object>;
|
|
42
|
-
uiSchema: PropTypes.Requireable<PropTypes.InferProps<{
|
|
43
|
-
"ui:options": PropTypes.Requireable<PropTypes.InferProps<{
|
|
44
|
-
addable: PropTypes.Requireable<boolean>;
|
|
45
|
-
orderable: PropTypes.Requireable<boolean>;
|
|
46
|
-
removable: PropTypes.Requireable<boolean>;
|
|
47
|
-
}>>;
|
|
48
|
-
}>>;
|
|
49
|
-
};
|
|
50
|
-
import PropTypes from "prop-types";
|
package/dist/utils.d.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
export function canExpand(schema: any, uiSchema: any, formData: any): any;
|
|
2
|
-
export function getSchemaType(schema: any): any;
|
|
3
|
-
export function getWidget(schema: any, widget: any, registeredWidgets?: {}): any;
|
|
4
|
-
export function hasWidget(schema: any, widget: any, registeredWidgets?: {}): boolean;
|
|
5
|
-
export function getDefaultFormState(_schema: any, formData: any, rootSchema?: {}, includeUndefinedValues?: boolean): any;
|
|
6
|
-
/**
|
|
7
|
-
* When merging defaults and form data, we want to merge in this specific way:
|
|
8
|
-
* - objects are deeply merged
|
|
9
|
-
* - arrays are merged in such a way that:
|
|
10
|
-
* - when the array is set in form data, only array entries set in form data
|
|
11
|
-
* are deeply merged; additional entries from the defaults are ignored
|
|
12
|
-
* - when the array is not set in form data, the default is copied over
|
|
13
|
-
* - scalars are overwritten/set by form data
|
|
14
|
-
*/
|
|
15
|
-
export function mergeDefaultsWithFormData(defaults: any, formData: any): any;
|
|
16
|
-
export function getUiOptions(uiSchema: any): {};
|
|
17
|
-
export function getSubmitButtonOptions(uiSchema: any): any;
|
|
18
|
-
export function getDisplayLabel(schema: any, uiSchema: any, rootSchema: any): any;
|
|
19
|
-
export function isObject(thing: any): boolean;
|
|
20
|
-
export function mergeObjects(obj1: any, obj2: any, concatArrays?: boolean): any;
|
|
21
|
-
export function asNumber(value: any): any;
|
|
22
|
-
export function orderProperties(properties: any, order: any): any;
|
|
23
|
-
/**
|
|
24
|
-
* This function checks if the given schema matches a single
|
|
25
|
-
* constant value.
|
|
26
|
-
*/
|
|
27
|
-
export function isConstant(schema: any): any;
|
|
28
|
-
export function toConstant(schema: any): any;
|
|
29
|
-
export function isSelect(_schema: any, rootSchema?: {}): boolean;
|
|
30
|
-
export function isMultiSelect(schema: any, rootSchema?: {}): boolean;
|
|
31
|
-
export function isFilesArray(schema: any, uiSchema: any, rootSchema?: {}): boolean;
|
|
32
|
-
export function isFixedItems(schema: any): any;
|
|
33
|
-
export function isCustomWidget(uiSchema: any): boolean;
|
|
34
|
-
export function allowAdditionalItems(schema: any): boolean;
|
|
35
|
-
export function optionsList(schema: any): any;
|
|
36
|
-
export function findSchemaDefinition($ref: any, rootSchema?: {}): any;
|
|
37
|
-
export function stubExistingAdditionalProperties(schema: any, rootSchema?: {}, formData?: {}): any;
|
|
38
|
-
/**
|
|
39
|
-
* Resolves references and dependencies within a schema and its 'allOf' children.
|
|
40
|
-
*
|
|
41
|
-
* Called internally by retrieveSchema.
|
|
42
|
-
*/
|
|
43
|
-
export function resolveSchema(schema: any, rootSchema?: {}, formData?: {}): any;
|
|
44
|
-
export function retrieveSchema(schema: any, rootSchema?: {}, formData?: {}): any;
|
|
45
|
-
export function mergeSchemas(obj1: any, obj2: any): any;
|
|
46
|
-
export function deepEquals(a: any, b: any, ca?: any[], cb?: any[]): any;
|
|
47
|
-
export function shouldRender(comp: any, nextProps: any, nextState: any): boolean;
|
|
48
|
-
export function toIdSchema(schema: any, id: any, rootSchema: any, formData?: {}, idPrefix?: string, idSeparator?: string): any;
|
|
49
|
-
export function toPathSchema(schema: any, name: string | undefined, rootSchema: any, formData?: {}): any;
|
|
50
|
-
export function parseDateString(dateString: any, includeTime?: boolean): {
|
|
51
|
-
year: number;
|
|
52
|
-
month: number;
|
|
53
|
-
day: number;
|
|
54
|
-
hour: number;
|
|
55
|
-
minute: number;
|
|
56
|
-
second: number;
|
|
57
|
-
};
|
|
58
|
-
export function toDateString({ year, month, day, hour, minute, second }: {
|
|
59
|
-
year: any;
|
|
60
|
-
month: any;
|
|
61
|
-
day: any;
|
|
62
|
-
hour?: number | undefined;
|
|
63
|
-
minute?: number | undefined;
|
|
64
|
-
second?: number | undefined;
|
|
65
|
-
}, time?: boolean): string;
|
|
66
|
-
export function utcToLocal(jsonDate: any): string;
|
|
67
|
-
export function localToUTC(dateString: any): string | undefined;
|
|
68
|
-
export function pad(num: any, size: any): string;
|
|
69
|
-
export function dataURItoBlob(dataURI: any): {
|
|
70
|
-
blob: Blob;
|
|
71
|
-
name: any;
|
|
72
|
-
};
|
|
73
|
-
export function rangeSpec(schema: any): {
|
|
74
|
-
step: any;
|
|
75
|
-
min: any;
|
|
76
|
-
max: any;
|
|
77
|
-
};
|
|
78
|
-
export function getMatchingOption(formData: any, options: any, rootSchema: any): number;
|
|
79
|
-
export function schemaRequiresTrueValue(schema: any): any;
|
|
80
|
-
export const ADDITIONAL_PROPERTY_FLAG: "__additional_property";
|
|
81
|
-
export function guessType(value: any): "array" | "string" | "null" | "boolean" | "number" | "object";
|
package/dist/validate.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export function toErrorList(errorSchema: any, fieldName?: string): any[];
|
|
2
|
-
/**
|
|
3
|
-
* This function processes the formData with a user `validate` contributed
|
|
4
|
-
* function, which receives the form data and an `errorHandler` object that
|
|
5
|
-
* will be used to add custom validation errors for each field.
|
|
6
|
-
*/
|
|
7
|
-
export default function validateFormData(formData: any, schema: any, customValidate: any, transformErrors: any, additionalMetaSchemas?: any[], customFormats?: {}): {
|
|
8
|
-
errors: any[];
|
|
9
|
-
errorSchema: any;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Recursively prefixes all $ref's in a schema with `ROOT_SCHEMA_PREFIX`
|
|
13
|
-
* This is used in isValid to make references to the rootSchema
|
|
14
|
-
*/
|
|
15
|
-
export function withIdRefPrefix(schemaNode: any): any;
|
|
16
|
-
/**
|
|
17
|
-
* Validates data against a schema, returning true if the data is valid, or
|
|
18
|
-
* false otherwise. If the schema is invalid, then this function will return
|
|
19
|
-
* false.
|
|
20
|
-
*/
|
|
21
|
-
export function isValid(schema: any, data: any, rootSchema: any): boolean | PromiseLike<any>;
|
package/dist/withTheme.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export default withTheme;
|
|
2
|
-
declare function withTheme(themeProps: any): React.ForwardRefExoticComponent<React.RefAttributes<any>>;
|
|
3
|
-
declare namespace withTheme {
|
|
4
|
-
export namespace propTypes {
|
|
5
|
-
export const widgets: PropTypes.Requireable<object>;
|
|
6
|
-
export const fields: PropTypes.Requireable<object>;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
import React from "react";
|
|
10
|
-
import PropTypes from "prop-types";
|
package/index.d.ts
DELETED
|
@@ -1,500 +0,0 @@
|
|
|
1
|
-
// Originally from https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/@rjsf/core/index.d.ts
|
|
2
|
-
|
|
3
|
-
declare module '@rjsf/core' {
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import { JSONSchema7, JSONSchema7Definition, JSONSchema7Type, JSONSchema7TypeName } from 'json-schema';
|
|
6
|
-
|
|
7
|
-
type ErrorSchema = {
|
|
8
|
-
[k: string]: ErrorSchema;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export interface FormProps<T> {
|
|
12
|
-
acceptcharset?: string;
|
|
13
|
-
action?: string;
|
|
14
|
-
additionalMetaSchemas?: ReadonlyArray<object>;
|
|
15
|
-
ArrayFieldTemplate?: React.FunctionComponent<ArrayFieldTemplateProps>;
|
|
16
|
-
autoComplete?: string;
|
|
17
|
-
autocomplete?: string; // deprecated
|
|
18
|
-
children?: React.ReactNode;
|
|
19
|
-
className?: string;
|
|
20
|
-
customFormats?: { [k: string]: string | RegExp | ((data: string) => boolean) };
|
|
21
|
-
disabled?: boolean;
|
|
22
|
-
readonly?: boolean;
|
|
23
|
-
hideError?: boolean;
|
|
24
|
-
enctype?: string;
|
|
25
|
-
extraErrors?: any;
|
|
26
|
-
ErrorList?: React.FunctionComponent<ErrorListProps>;
|
|
27
|
-
fields?: { [name: string]: Field };
|
|
28
|
-
FieldTemplate?: React.FunctionComponent<FieldTemplateProps>;
|
|
29
|
-
formContext?: any;
|
|
30
|
-
formData?: T;
|
|
31
|
-
id?: string;
|
|
32
|
-
idPrefix?: string;
|
|
33
|
-
idSeparator?: string;
|
|
34
|
-
liveOmit?: boolean;
|
|
35
|
-
liveValidate?: boolean;
|
|
36
|
-
method?: string;
|
|
37
|
-
name?: string;
|
|
38
|
-
noHtml5Validate?: boolean;
|
|
39
|
-
noValidate?: boolean;
|
|
40
|
-
ObjectFieldTemplate?: React.FunctionComponent<ObjectFieldTemplateProps>;
|
|
41
|
-
omitExtraData?: boolean;
|
|
42
|
-
onBlur?: (id: string, value: any) => void;
|
|
43
|
-
onChange?: (e: IChangeEvent<T>, es?: ErrorSchema) => any;
|
|
44
|
-
onError?: (e: any) => any;
|
|
45
|
-
onFocus?: (id: string, value: any) => void;
|
|
46
|
-
onSubmit?: (e: ISubmitEvent<T>, nativeEvent: React.FormEvent<HTMLFormElement>) => any;
|
|
47
|
-
schema: JSONSchema7;
|
|
48
|
-
showErrorList?: boolean;
|
|
49
|
-
tagName?: keyof JSX.IntrinsicElements | React.ComponentType;
|
|
50
|
-
target?: string;
|
|
51
|
-
transformErrors?: (errors: AjvError[]) => AjvError[];
|
|
52
|
-
uiSchema?: UiSchema;
|
|
53
|
-
validate?: (formData: T, errors: FormValidation) => FormValidation;
|
|
54
|
-
widgets?: { [name: string]: Widget };
|
|
55
|
-
/**
|
|
56
|
-
* WARNING: This exists for internal react-jsonschema-form purposes only. No guarantees of backwards
|
|
57
|
-
* compatibility. Use ONLY if you know what you are doing
|
|
58
|
-
*/
|
|
59
|
-
_internalFormWrapper?: React.ElementType;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export default class Form<T> extends React.Component<FormProps<T>> {
|
|
63
|
-
validate: (
|
|
64
|
-
formData: T,
|
|
65
|
-
schema?: FormProps<T>['schema'],
|
|
66
|
-
additionalMetaSchemas?: FormProps<T>['additionalMetaSchemas'],
|
|
67
|
-
customFormats?: FormProps<T>['customFormats'],
|
|
68
|
-
) => { errors: AjvError[]; errorSchema: ErrorSchema };
|
|
69
|
-
onChange: (formData: T, newErrorSchema: ErrorSchema) => void;
|
|
70
|
-
onBlur: (id: string, value: any) => void;
|
|
71
|
-
submit: () => void;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export type UISchemaSubmitButtonOptions = {
|
|
75
|
-
submitText?: string;
|
|
76
|
-
norender?: boolean;
|
|
77
|
-
props?: {
|
|
78
|
-
disabled?:boolean;
|
|
79
|
-
className?:string;
|
|
80
|
-
[name: string]: any;
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export type UiSchema = {
|
|
85
|
-
'ui:field'?: Field | string;
|
|
86
|
-
'ui:widget'?: Widget | string;
|
|
87
|
-
'ui:options'?: { [key: string]: boolean | number | string | object | any[] | null };
|
|
88
|
-
'ui:order'?: string[];
|
|
89
|
-
'ui:FieldTemplate'?: React.FunctionComponent<FieldTemplateProps>;
|
|
90
|
-
'ui:ArrayFieldTemplate'?: React.FunctionComponent<ArrayFieldTemplateProps>;
|
|
91
|
-
'ui:ObjectFieldTemplate'?: React.FunctionComponent<ObjectFieldTemplateProps>;
|
|
92
|
-
[name: string]: any;
|
|
93
|
-
'ui:submitButtonOptions'?: UISchemaSubmitButtonOptions;
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
export type FieldId = {
|
|
97
|
-
$id: string;
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
export type IdSchema<T = any> = {
|
|
101
|
-
[key in keyof T]: IdSchema<T[key]>;
|
|
102
|
-
} &
|
|
103
|
-
FieldId;
|
|
104
|
-
|
|
105
|
-
export type FieldPath = {
|
|
106
|
-
$name: string;
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
export type PathSchema<T = any> = {
|
|
110
|
-
[key in keyof T]: PathSchema<T[key]>;
|
|
111
|
-
} &
|
|
112
|
-
FieldPath;
|
|
113
|
-
|
|
114
|
-
export interface WidgetProps
|
|
115
|
-
extends Pick<
|
|
116
|
-
React.HTMLAttributes<HTMLElement>,
|
|
117
|
-
Exclude<keyof React.HTMLAttributes<HTMLElement>, 'onBlur' | 'onFocus'>
|
|
118
|
-
> {
|
|
119
|
-
id: string;
|
|
120
|
-
schema: JSONSchema7;
|
|
121
|
-
uiSchema: UiSchema;
|
|
122
|
-
value: any;
|
|
123
|
-
required: boolean;
|
|
124
|
-
disabled: boolean;
|
|
125
|
-
readonly: boolean;
|
|
126
|
-
autofocus: boolean;
|
|
127
|
-
placeholder: string;
|
|
128
|
-
onChange: (value: any) => void;
|
|
129
|
-
options: NonNullable<UiSchema['ui:options']>;
|
|
130
|
-
formContext: any;
|
|
131
|
-
onBlur: (id: string, value: any) => void;
|
|
132
|
-
onFocus: (id: string, value: any) => void;
|
|
133
|
-
label: string;
|
|
134
|
-
multiple: boolean;
|
|
135
|
-
rawErrors: string[];
|
|
136
|
-
registry: Registry;
|
|
137
|
-
[prop: string]: any; // Allow for other props
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
export type Widget = React.FunctionComponent<WidgetProps> | React.ComponentClass<WidgetProps>;
|
|
141
|
-
|
|
142
|
-
export interface Registry {
|
|
143
|
-
fields: { [name: string]: Field };
|
|
144
|
-
widgets: { [name: string]: Widget };
|
|
145
|
-
definitions: { [name: string]: any };
|
|
146
|
-
formContext: any;
|
|
147
|
-
rootSchema: JSONSchema7;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
export interface FieldProps<T = any>
|
|
151
|
-
extends Pick<React.HTMLAttributes<HTMLElement>, Exclude<keyof React.HTMLAttributes<HTMLElement>, 'onBlur' | 'onFocus'>> {
|
|
152
|
-
schema: JSONSchema7;
|
|
153
|
-
uiSchema: UiSchema;
|
|
154
|
-
idSchema: IdSchema;
|
|
155
|
-
formData: T;
|
|
156
|
-
errorSchema: ErrorSchema;
|
|
157
|
-
onChange: (e: IChangeEvent<T> | any, es?: ErrorSchema) => any;
|
|
158
|
-
onBlur: (id: string, value: any) => void;
|
|
159
|
-
onFocus: (id: string, value: any) => void;
|
|
160
|
-
registry: Registry;
|
|
161
|
-
formContext: any;
|
|
162
|
-
autofocus: boolean;
|
|
163
|
-
disabled: boolean;
|
|
164
|
-
readonly: boolean;
|
|
165
|
-
required: boolean;
|
|
166
|
-
name: string;
|
|
167
|
-
[prop: string]: any; // Allow for other props
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
export type Field = React.FunctionComponent<FieldProps> | React.ComponentClass<FieldProps>;
|
|
171
|
-
|
|
172
|
-
export type FieldTemplateProps<T = any> = {
|
|
173
|
-
id: string;
|
|
174
|
-
classNames: string;
|
|
175
|
-
label: string;
|
|
176
|
-
description: React.ReactElement;
|
|
177
|
-
rawDescription: string;
|
|
178
|
-
children: React.ReactElement;
|
|
179
|
-
errors: React.ReactElement;
|
|
180
|
-
rawErrors: string[];
|
|
181
|
-
help: React.ReactElement;
|
|
182
|
-
rawHelp: string;
|
|
183
|
-
hidden: boolean;
|
|
184
|
-
required: boolean;
|
|
185
|
-
readonly: boolean;
|
|
186
|
-
disabled: boolean;
|
|
187
|
-
displayLabel: boolean;
|
|
188
|
-
fields: Field[];
|
|
189
|
-
schema: JSONSchema7;
|
|
190
|
-
uiSchema: UiSchema;
|
|
191
|
-
formContext: any;
|
|
192
|
-
formData: T;
|
|
193
|
-
onChange: (value: T) => void;
|
|
194
|
-
onKeyChange: (value: string) => () => void;
|
|
195
|
-
onDropPropertyClick: (value: string) => () => void;
|
|
196
|
-
registry: Registry;
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
export type ArrayFieldTemplateProps<T = any> = {
|
|
200
|
-
DescriptionField: React.FunctionComponent<{ id: string; description: string | React.ReactElement }>;
|
|
201
|
-
TitleField: React.FunctionComponent<{ id: string; title: string; required: boolean }>;
|
|
202
|
-
canAdd: boolean;
|
|
203
|
-
className: string;
|
|
204
|
-
disabled: boolean;
|
|
205
|
-
idSchema: IdSchema;
|
|
206
|
-
items: {
|
|
207
|
-
children: React.ReactElement;
|
|
208
|
-
className: string;
|
|
209
|
-
disabled: boolean;
|
|
210
|
-
hasMoveDown: boolean;
|
|
211
|
-
hasMoveUp: boolean;
|
|
212
|
-
hasRemove: boolean;
|
|
213
|
-
hasToolbar: boolean;
|
|
214
|
-
index: number;
|
|
215
|
-
onAddIndexClick: (index: number) => (event?: any) => void;
|
|
216
|
-
onDropIndexClick: (index: number) => (event?: any) => void;
|
|
217
|
-
onReorderClick: (index: number, newIndex: number) => (event?: any) => void;
|
|
218
|
-
readonly: boolean;
|
|
219
|
-
key: string;
|
|
220
|
-
}[];
|
|
221
|
-
onAddClick: (event?: any) => void;
|
|
222
|
-
readonly: boolean;
|
|
223
|
-
required: boolean;
|
|
224
|
-
schema: JSONSchema7;
|
|
225
|
-
uiSchema: UiSchema;
|
|
226
|
-
title: string;
|
|
227
|
-
formContext: any;
|
|
228
|
-
formData: T;
|
|
229
|
-
registry: Registry;
|
|
230
|
-
};
|
|
231
|
-
|
|
232
|
-
export type ObjectFieldTemplateProps<T = any> = {
|
|
233
|
-
DescriptionField: React.FunctionComponent<{ id: string; description: string | React.ReactElement }>;
|
|
234
|
-
TitleField: React.FunctionComponent<{ id: string; title: string; required: boolean }>;
|
|
235
|
-
title: string;
|
|
236
|
-
description: string;
|
|
237
|
-
disabled: boolean;
|
|
238
|
-
properties: {
|
|
239
|
-
content: React.ReactElement;
|
|
240
|
-
name: string;
|
|
241
|
-
disabled: boolean;
|
|
242
|
-
readonly: boolean;
|
|
243
|
-
hidden: boolean;
|
|
244
|
-
}[];
|
|
245
|
-
onAddClick: (schema: JSONSchema7) => () => void;
|
|
246
|
-
readonly: boolean;
|
|
247
|
-
required: boolean;
|
|
248
|
-
schema: JSONSchema7;
|
|
249
|
-
uiSchema: UiSchema;
|
|
250
|
-
idSchema: IdSchema;
|
|
251
|
-
formData: T;
|
|
252
|
-
formContext: any;
|
|
253
|
-
registry: Registry;
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
export type AjvError = {
|
|
257
|
-
message: string;
|
|
258
|
-
name: string;
|
|
259
|
-
params: any;
|
|
260
|
-
property: string;
|
|
261
|
-
stack: string;
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
export type ErrorListProps = {
|
|
265
|
-
errorSchema: FormValidation;
|
|
266
|
-
errors: AjvError[];
|
|
267
|
-
formContext: any;
|
|
268
|
-
schema: JSONSchema7;
|
|
269
|
-
uiSchema: UiSchema;
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
export interface IChangeEvent<T = any> {
|
|
273
|
-
edit: boolean;
|
|
274
|
-
formData: T;
|
|
275
|
-
errors: AjvError[];
|
|
276
|
-
errorSchema: FormValidation;
|
|
277
|
-
idSchema: IdSchema;
|
|
278
|
-
schema: JSONSchema7;
|
|
279
|
-
uiSchema: UiSchema;
|
|
280
|
-
status?: string;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
export type ISubmitEvent<T> = IChangeEvent<T>;
|
|
284
|
-
|
|
285
|
-
export type FieldError = string;
|
|
286
|
-
|
|
287
|
-
type FieldValidation = {
|
|
288
|
-
__errors: FieldError[];
|
|
289
|
-
addError: (message: string) => void;
|
|
290
|
-
};
|
|
291
|
-
|
|
292
|
-
type FormValidation = FieldValidation & {
|
|
293
|
-
[fieldName: string]: FieldValidation;
|
|
294
|
-
};
|
|
295
|
-
|
|
296
|
-
type FormSubmit<T = any> = {
|
|
297
|
-
formData: T;
|
|
298
|
-
};
|
|
299
|
-
|
|
300
|
-
export type ThemeProps<T = any> = Omit<FormProps<T>, 'schema'>;
|
|
301
|
-
|
|
302
|
-
export function withTheme<T = any>(
|
|
303
|
-
themeProps: ThemeProps<T>,
|
|
304
|
-
): React.ComponentClass<FormProps<T>> | React.FunctionComponent<FormProps<T>>;
|
|
305
|
-
|
|
306
|
-
export type AddButtonProps = {
|
|
307
|
-
className: string;
|
|
308
|
-
onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
309
|
-
disabled: boolean;
|
|
310
|
-
};
|
|
311
|
-
|
|
312
|
-
export module utils {
|
|
313
|
-
|
|
314
|
-
export const ADDITIONAL_PROPERTY_FLAG: string;
|
|
315
|
-
|
|
316
|
-
export function canExpand(schema: JSONSchema7, uiSchema: UiSchema, formData: any): boolean;
|
|
317
|
-
|
|
318
|
-
export function getDefaultRegistry(): Registry;
|
|
319
|
-
|
|
320
|
-
export function getSchemaType(schema: JSONSchema7): string;
|
|
321
|
-
|
|
322
|
-
export function getWidget(
|
|
323
|
-
schema: JSONSchema7,
|
|
324
|
-
widget: Widget | string,
|
|
325
|
-
registeredWidgets?: { [name: string]: Widget },
|
|
326
|
-
): Widget;
|
|
327
|
-
|
|
328
|
-
export function hasWidget(
|
|
329
|
-
schema: JSONSchema7,
|
|
330
|
-
widget: Widget | string,
|
|
331
|
-
registeredWidgets?: { [name: string]: Widget },
|
|
332
|
-
): boolean;
|
|
333
|
-
|
|
334
|
-
export function computeDefaults<T = any>(
|
|
335
|
-
schema: JSONSchema7,
|
|
336
|
-
parentDefaults: JSONSchema7['default'][],
|
|
337
|
-
definitions: Registry['definitions'],
|
|
338
|
-
rawFormData?: T,
|
|
339
|
-
includeUndefinedValues?: boolean,
|
|
340
|
-
): JSONSchema7['default'][];
|
|
341
|
-
|
|
342
|
-
export function getDefaultFormState<T = any>(
|
|
343
|
-
schema: JSONSchema7,
|
|
344
|
-
formData: T,
|
|
345
|
-
definitions?: Registry['definitions'],
|
|
346
|
-
includeUndefinedValues?: boolean,
|
|
347
|
-
): T | JSONSchema7['default'][];
|
|
348
|
-
|
|
349
|
-
export function getUiOptions(uiSchema: UiSchema): UiSchema['ui:options'];
|
|
350
|
-
|
|
351
|
-
export function getSubmitButtonOptions(uiSchema: UiSchema): UISchemaSubmitButtonOptions;
|
|
352
|
-
|
|
353
|
-
export function getDisplayLabel(schema: JSONSchema7, uiSchema: UiSchema, rootSchema?: JSONSchema7): boolean;
|
|
354
|
-
|
|
355
|
-
export function isObject(thing: any): boolean;
|
|
356
|
-
|
|
357
|
-
export function mergeObjects(obj1: object, obj2: object, concatArrays?: boolean): object;
|
|
358
|
-
|
|
359
|
-
export function asNumber(value: string | null): number | string | undefined | null;
|
|
360
|
-
|
|
361
|
-
export function orderProperties(properties: [], order: []): [];
|
|
362
|
-
|
|
363
|
-
export function isConstant(schema: JSONSchema7): boolean;
|
|
364
|
-
|
|
365
|
-
export function toConstant(schema: JSONSchema7): JSONSchema7Type | JSONSchema7['const'];
|
|
366
|
-
|
|
367
|
-
export function isSelect(_schema: JSONSchema7, definitions?: Registry['definitions']): boolean;
|
|
368
|
-
|
|
369
|
-
export function isMultiSelect(schema: JSONSchema7, definitions?: Registry['definitions']): boolean;
|
|
370
|
-
|
|
371
|
-
export function isFilesArray(
|
|
372
|
-
schema: JSONSchema7,
|
|
373
|
-
uiSchema: UiSchema,
|
|
374
|
-
definitions?: Registry['definitions'],
|
|
375
|
-
): boolean;
|
|
376
|
-
|
|
377
|
-
export function isFixedItems(schema: JSONSchema7): boolean;
|
|
378
|
-
|
|
379
|
-
export function allowAdditionalItems(schema: JSONSchema7): boolean;
|
|
380
|
-
|
|
381
|
-
export function optionsList(schema: JSONSchema7): {
|
|
382
|
-
schema?: JSONSchema7Definition;
|
|
383
|
-
label: string;
|
|
384
|
-
value: string;
|
|
385
|
-
}[];
|
|
386
|
-
|
|
387
|
-
export function guessType(value: any): JSONSchema7TypeName;
|
|
388
|
-
|
|
389
|
-
export function stubExistingAdditionalProperties<T = any>(
|
|
390
|
-
schema: JSONSchema7,
|
|
391
|
-
definitions?: Registry['definitions'],
|
|
392
|
-
formData?: T,
|
|
393
|
-
): JSONSchema7;
|
|
394
|
-
|
|
395
|
-
export function resolveSchema<T = any>(
|
|
396
|
-
schema: JSONSchema7Definition,
|
|
397
|
-
definitions?: Registry['definitions'],
|
|
398
|
-
formData?: T,
|
|
399
|
-
): JSONSchema7;
|
|
400
|
-
|
|
401
|
-
export function retrieveSchema<T = any>(
|
|
402
|
-
schema: JSONSchema7Definition,
|
|
403
|
-
definitions?: Registry['definitions'],
|
|
404
|
-
formData?: T,
|
|
405
|
-
): JSONSchema7;
|
|
406
|
-
|
|
407
|
-
export function deepEquals<T>(a: T, b: T): boolean;
|
|
408
|
-
|
|
409
|
-
export function shouldRender(comp: React.Component, nextProps: any, nextState: any): boolean;
|
|
410
|
-
|
|
411
|
-
export function toIdSchema<T = any>(
|
|
412
|
-
schema: JSONSchema7Definition,
|
|
413
|
-
id: string,
|
|
414
|
-
definitions: Registry['definitions'],
|
|
415
|
-
formData?: T,
|
|
416
|
-
idPrefix?: string,
|
|
417
|
-
idSeparator?: string,
|
|
418
|
-
): IdSchema | IdSchema[];
|
|
419
|
-
|
|
420
|
-
export function toPathSchema<T = any>(
|
|
421
|
-
schema: JSONSchema7Definition,
|
|
422
|
-
name: string | undefined,
|
|
423
|
-
definitions: Registry['definitions'],
|
|
424
|
-
formData?: T,
|
|
425
|
-
): PathSchema | PathSchema[];
|
|
426
|
-
|
|
427
|
-
export interface DateObject {
|
|
428
|
-
year: number;
|
|
429
|
-
month: number;
|
|
430
|
-
day: number;
|
|
431
|
-
hour: number;
|
|
432
|
-
minute: number;
|
|
433
|
-
second: number;
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
export function parseDateString(dateString: string, includeTime?: boolean): DateObject;
|
|
437
|
-
|
|
438
|
-
export function toDateString(dateObject: DateObject, time?: boolean): string;
|
|
439
|
-
|
|
440
|
-
export function utcToLocal(jsonDate: string): string;
|
|
441
|
-
|
|
442
|
-
export function localToUTC(dateString: string): Date;
|
|
443
|
-
|
|
444
|
-
export function pad(num: number, size: number): string;
|
|
445
|
-
|
|
446
|
-
export function setState(instance: React.Component, state: any, callback: Function): void;
|
|
447
|
-
|
|
448
|
-
export function dataURItoBlob(dataURI: string): { name: string; blob: Blob };
|
|
449
|
-
|
|
450
|
-
export interface IRangeSpec {
|
|
451
|
-
min?: number;
|
|
452
|
-
max?: number;
|
|
453
|
-
step?: number;
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
export function rangeSpec(schema: JSONSchema7): IRangeSpec;
|
|
457
|
-
|
|
458
|
-
export function getMatchingOption(
|
|
459
|
-
formData: any,
|
|
460
|
-
options: JSONSchema7[],
|
|
461
|
-
definitions: Registry['definitions'],
|
|
462
|
-
): number;
|
|
463
|
-
|
|
464
|
-
export function schemaRequiresTrueValue(schema: JSONSchema7): boolean;
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
declare module '@rjsf/core/lib/components/fields/SchemaField' {
|
|
469
|
-
import { JSONSchema7 } from 'json-schema';
|
|
470
|
-
import { FieldProps, UiSchema, IdSchema, FormValidation } from '@rjsf/core';
|
|
471
|
-
|
|
472
|
-
export type SchemaFieldProps<T = any> = Pick<
|
|
473
|
-
FieldProps<T>,
|
|
474
|
-
'schema' | 'uiSchema' | 'idSchema' | 'formData' | 'errorSchema' | 'registry' | 'formContext'
|
|
475
|
-
>;
|
|
476
|
-
|
|
477
|
-
export default class SchemaField extends React.Component<SchemaFieldProps> {}
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
declare module '@rjsf/core/lib/components/fields/ObjectField' {
|
|
481
|
-
import { FieldProps } from '@rjsf/core';
|
|
482
|
-
|
|
483
|
-
export type ObjectFieldProps<T = any> = FieldProps<T>;
|
|
484
|
-
|
|
485
|
-
export default class ObjectField extends React.Component<ObjectFieldProps> {}
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
declare module '@rjsf/core/lib/validate' {
|
|
489
|
-
import { JSONSchema7Definition } from 'json-schema';
|
|
490
|
-
import { AjvError, ErrorSchema, FormProps } from '@rjsf/core';
|
|
491
|
-
|
|
492
|
-
export default function validateFormData<T = any>(
|
|
493
|
-
formData: T,
|
|
494
|
-
schema: JSONSchema7Definition,
|
|
495
|
-
customValidate?: FormProps<T>['validate'],
|
|
496
|
-
transformErrors?: FormProps<T>['transformErrors'],
|
|
497
|
-
additionalMetaSchemas?: FormProps<T>['additionalMetaSchemas'],
|
|
498
|
-
customFormats?: FormProps<T>['customFormats'],
|
|
499
|
-
): { errors: AjvError[]; errorSchema: ErrorSchema };
|
|
500
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import IconButton from "./IconButton";
|
|
3
|
-
export default function AddButton(_ref) {
|
|
4
|
-
var className = _ref.className,
|
|
5
|
-
onClick = _ref.onClick,
|
|
6
|
-
disabled = _ref.disabled;
|
|
7
|
-
return (
|
|
8
|
-
/*#__PURE__*/
|
|
9
|
-
React.createElement("div", {
|
|
10
|
-
className: "row"
|
|
11
|
-
},
|
|
12
|
-
/*#__PURE__*/
|
|
13
|
-
React.createElement("p", {
|
|
14
|
-
className: "col-xs-3 col-xs-offset-9 text-right ".concat(className)
|
|
15
|
-
},
|
|
16
|
-
/*#__PURE__*/
|
|
17
|
-
React.createElement(IconButton, {
|
|
18
|
-
type: "info",
|
|
19
|
-
icon: "plus",
|
|
20
|
-
className: "btn-add col-xs-12",
|
|
21
|
-
"aria-label": "Add",
|
|
22
|
-
tabIndex: "0",
|
|
23
|
-
onClick: onClick,
|
|
24
|
-
disabled: disabled
|
|
25
|
-
})))
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21wb25lbnRzL0FkZEJ1dHRvbi5qcyJdLCJuYW1lcyI6WyJSZWFjdCIsIkljb25CdXR0b24iLCJBZGRCdXR0b24iLCJjbGFzc05hbWUiLCJvbkNsaWNrIiwiZGlzYWJsZWQiXSwibWFwcGluZ3MiOiJBQUFBLE9BQU9BLEtBQVAsTUFBa0IsT0FBbEI7QUFDQSxPQUFPQyxVQUFQLE1BQXVCLGNBQXZCO0FBRUEsZUFBZSxTQUFTQyxTQUFULE9BQXFEO0FBQUEsTUFBaENDLFNBQWdDLFFBQWhDQSxTQUFnQztBQUFBLE1BQXJCQyxPQUFxQixRQUFyQkEsT0FBcUI7QUFBQSxNQUFaQyxRQUFZLFFBQVpBLFFBQVk7QUFDbEU7QUFBQTtBQUNFO0FBQUssTUFBQSxTQUFTLEVBQUM7QUFBZjtBQUFBO0FBQ0U7QUFBRyxNQUFBLFNBQVMsZ0RBQXlDRixTQUF6QztBQUFaO0FBQUE7QUFDRSx3QkFBQyxVQUFEO0FBQ0UsTUFBQSxJQUFJLEVBQUMsTUFEUDtBQUVFLE1BQUEsSUFBSSxFQUFDLE1BRlA7QUFHRSxNQUFBLFNBQVMsRUFBQyxtQkFIWjtBQUlFLG9CQUFXLEtBSmI7QUFLRSxNQUFBLFFBQVEsRUFBQyxHQUxYO0FBTUUsTUFBQSxPQUFPLEVBQUVDLE9BTlg7QUFPRSxNQUFBLFFBQVEsRUFBRUM7QUFQWixNQURGLENBREY7QUFERjtBQWVEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IFJlYWN0IGZyb20gXCJyZWFjdFwiO1xuaW1wb3J0IEljb25CdXR0b24gZnJvbSBcIi4vSWNvbkJ1dHRvblwiO1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBBZGRCdXR0b24oeyBjbGFzc05hbWUsIG9uQ2xpY2ssIGRpc2FibGVkIH0pIHtcbiAgcmV0dXJuIChcbiAgICA8ZGl2IGNsYXNzTmFtZT1cInJvd1wiPlxuICAgICAgPHAgY2xhc3NOYW1lPXtgY29sLXhzLTMgY29sLXhzLW9mZnNldC05IHRleHQtcmlnaHQgJHtjbGFzc05hbWV9YH0+XG4gICAgICAgIDxJY29uQnV0dG9uXG4gICAgICAgICAgdHlwZT1cImluZm9cIlxuICAgICAgICAgIGljb249XCJwbHVzXCJcbiAgICAgICAgICBjbGFzc05hbWU9XCJidG4tYWRkIGNvbC14cy0xMlwiXG4gICAgICAgICAgYXJpYS1sYWJlbD1cIkFkZFwiXG4gICAgICAgICAgdGFiSW5kZXg9XCIwXCJcbiAgICAgICAgICBvbkNsaWNrPXtvbkNsaWNrfVxuICAgICAgICAgIGRpc2FibGVkPXtkaXNhYmxlZH1cbiAgICAgICAgLz5cbiAgICAgIDwvcD5cbiAgICA8L2Rpdj5cbiAgKTtcbn1cbiJdfQ==
|