@rjsf/core 4.2.2 → 5.0.0-beta.2

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.
Files changed (78) hide show
  1. package/README.md +2 -2
  2. package/dist/components/Form.d.ts +274 -45
  3. package/dist/components/fields/ArrayField.d.ts +6 -51
  4. package/dist/components/fields/BooleanField.d.ts +7 -44
  5. package/dist/components/fields/MultiSchemaField.d.ts +42 -38
  6. package/dist/components/fields/NullField.d.ts +7 -5
  7. package/dist/components/fields/NumberField.d.ts +3 -46
  8. package/dist/components/fields/ObjectField.d.ts +71 -20
  9. package/dist/components/fields/SchemaField.d.ts +9 -38
  10. package/dist/components/fields/StringField.d.ts +6 -44
  11. package/dist/components/fields/index.d.ts +3 -26
  12. package/dist/components/templates/ArrayFieldDescriptionTemplate.d.ts +7 -0
  13. package/dist/components/templates/ArrayFieldItemTemplate.d.ts +6 -0
  14. package/dist/components/templates/ArrayFieldTemplate.d.ts +6 -0
  15. package/dist/components/templates/ArrayFieldTitleTemplate.d.ts +7 -0
  16. package/dist/components/templates/BaseInputTemplate.d.ts +8 -0
  17. package/dist/components/templates/ButtonTemplates/AddButton.d.ts +4 -0
  18. package/dist/components/templates/ButtonTemplates/IconButton.d.ts +5 -0
  19. package/dist/components/templates/ButtonTemplates/SubmitButton.d.ts +4 -0
  20. package/dist/components/templates/ButtonTemplates/index.d.ts +3 -0
  21. package/dist/components/templates/DescriptionField.d.ts +6 -0
  22. package/dist/components/templates/ErrorList.d.ts +6 -0
  23. package/dist/components/templates/FieldTemplate/FieldTemplate.d.ts +7 -0
  24. package/dist/components/templates/FieldTemplate/Label.d.ts +13 -0
  25. package/dist/components/templates/FieldTemplate/WrapIfAdditional.d.ts +12 -0
  26. package/dist/components/templates/FieldTemplate/index.d.ts +2 -0
  27. package/dist/components/templates/ObjectFieldTemplate.d.ts +8 -0
  28. package/dist/components/templates/TitleField.d.ts +6 -0
  29. package/dist/components/templates/UnsupportedField.d.ts +8 -0
  30. package/dist/components/templates/index.d.ts +3 -0
  31. package/dist/components/widgets/AltDateTimeWidget.d.ts +7 -21
  32. package/dist/components/widgets/AltDateWidget.d.ts +5 -21
  33. package/dist/components/widgets/CheckboxWidget.d.ts +7 -17
  34. package/dist/components/widgets/CheckboxesWidget.d.ts +7 -25
  35. package/dist/components/widgets/ColorWidget.d.ts +7 -15
  36. package/dist/components/widgets/DateTimeWidget.d.ts +7 -8
  37. package/dist/components/widgets/DateWidget.d.ts +7 -8
  38. package/dist/components/widgets/EmailWidget.d.ts +6 -8
  39. package/dist/components/widgets/FileWidget.d.ts +6 -18
  40. package/dist/components/widgets/HiddenWidget.d.ts +7 -11
  41. package/dist/components/widgets/PasswordWidget.d.ts +6 -8
  42. package/dist/components/widgets/RadioWidget.d.ts +7 -21
  43. package/dist/components/widgets/RangeWidget.d.ts +7 -8
  44. package/dist/components/widgets/SelectWidget.d.ts +7 -23
  45. package/dist/components/widgets/TextWidget.d.ts +6 -9
  46. package/dist/components/widgets/TextareaWidget.d.ts +10 -22
  47. package/dist/components/widgets/URLWidget.d.ts +6 -8
  48. package/dist/components/widgets/UpDownWidget.d.ts +6 -8
  49. package/dist/components/widgets/index.d.ts +3 -43
  50. package/dist/core.cjs.development.js +2947 -4606
  51. package/dist/core.cjs.development.js.map +1 -1
  52. package/dist/core.cjs.production.min.js +1 -1
  53. package/dist/core.cjs.production.min.js.map +1 -1
  54. package/dist/core.esm.js +2897 -4566
  55. package/dist/core.esm.js.map +1 -1
  56. package/dist/core.umd.development.js +4049 -0
  57. package/dist/core.umd.development.js.map +1 -0
  58. package/dist/core.umd.production.min.js +2 -0
  59. package/dist/core.umd.production.min.js.map +1 -0
  60. package/dist/getDefaultRegistry.d.ts +6 -0
  61. package/dist/index.d.ts +5 -70
  62. package/dist/withTheme.d.ts +7 -9
  63. package/package.json +41 -68
  64. package/dist/components/AddButton.d.ts +0 -5
  65. package/dist/components/ErrorList.d.ts +0 -1
  66. package/dist/components/IconButton.d.ts +0 -1
  67. package/dist/components/fields/DescriptionField.d.ts +0 -9
  68. package/dist/components/fields/TitleField.d.ts +0 -10
  69. package/dist/components/fields/UnsupportedField.d.ts +0 -14
  70. package/dist/components/widgets/BaseInput.d.ts +0 -23
  71. package/dist/components/widgets/SubmitButton.d.ts +0 -3
  72. package/dist/defaultRegistry.d.ts +0 -41
  73. package/dist/react-jsonschema-form.js +0 -26
  74. package/dist/react-jsonschema-form.js.map +0 -1
  75. package/dist/types.d.ts +0 -50
  76. package/dist/utils.d.ts +0 -81
  77. package/dist/validate.d.ts +0 -21
  78. package/index.d.ts +0 -500
@@ -1,8 +1,6 @@
1
- export default PasswordWidget;
2
- declare function PasswordWidget(props: any): JSX.Element;
3
- declare namespace PasswordWidget {
4
- export namespace propTypes {
5
- export const value: PropTypes.Requireable<string>;
6
- }
7
- }
8
- import PropTypes from "prop-types";
1
+ import { WidgetProps } from "@rjsf/utils";
2
+ /** The `PasswordWidget` component uses the `BaseInputTemplate` changing the type to `password`.
3
+ *
4
+ * @param props - The `WidgetProps` for this component
5
+ */
6
+ export default function PasswordWidget<T = any, F = any>(props: WidgetProps<T, F>): JSX.Element;
@@ -1,22 +1,8 @@
1
+ import { WidgetProps } from "@rjsf/utils";
2
+ /** The `RadioWidget` is a widget for rendering a radio group.
3
+ * It is typically used with a string property constrained with enum options.
4
+ *
5
+ * @param props - The `WidgetProps` for this component
6
+ */
7
+ declare function RadioWidget<T = any, F = any>({ options, value, required, disabled, readonly, autofocus, onBlur, onFocus, onChange, id, }: WidgetProps<T, F>): JSX.Element;
1
8
  export default RadioWidget;
2
- declare function RadioWidget(props: any): JSX.Element;
3
- declare namespace RadioWidget {
4
- export namespace defaultProps {
5
- export const autofocus: boolean;
6
- }
7
- export const propTypes: {
8
- schema: PropTypes.Validator<object>;
9
- id: PropTypes.Validator<string>;
10
- options: PropTypes.Validator<PropTypes.InferProps<{
11
- enumOptions: PropTypes.Requireable<any[]>;
12
- inline: PropTypes.Requireable<boolean>;
13
- }>>;
14
- value: PropTypes.Requireable<any>;
15
- required: PropTypes.Requireable<boolean>;
16
- disabled: PropTypes.Requireable<boolean>;
17
- readonly: PropTypes.Requireable<boolean>;
18
- autofocus: PropTypes.Requireable<boolean>;
19
- onChange: PropTypes.Requireable<(...args: any[]) => any>;
20
- };
21
- }
22
- import PropTypes from "prop-types";
@@ -1,8 +1,7 @@
1
- export default RangeWidget;
2
- declare function RangeWidget(props: any): JSX.Element;
3
- declare namespace RangeWidget {
4
- export namespace propTypes {
5
- export const value: PropTypes.Requireable<string | number>;
6
- }
7
- }
8
- import PropTypes from "prop-types";
1
+ import { WidgetProps } from "@rjsf/utils";
2
+ /** The `RangeWidget` component uses the `BaseInputTemplate` changing the type to `range` and wrapping the result
3
+ * in a div, with the value along side it.
4
+ *
5
+ * @param props - The `WidgetProps` for this component
6
+ */
7
+ export default function RangeWidget<T = any, F = any>(props: WidgetProps<T, F>): JSX.Element;
@@ -1,24 +1,8 @@
1
+ import { WidgetProps } from "@rjsf/utils";
2
+ /** The `SelectWidget` is a widget for rendering dropdowns.
3
+ * It is typically used with string properties constrained with enum options.
4
+ *
5
+ * @param props - The `WidgetProps` for this component
6
+ */
7
+ declare function SelectWidget<T = any, F = any>({ schema, id, options, value, required, disabled, readonly, multiple, autofocus, onChange, onBlur, onFocus, placeholder, }: WidgetProps<T, F>): JSX.Element;
1
8
  export default SelectWidget;
2
- declare function SelectWidget(props: any): JSX.Element;
3
- declare namespace SelectWidget {
4
- export namespace defaultProps {
5
- export const autofocus: boolean;
6
- }
7
- export const propTypes: {
8
- schema: PropTypes.Validator<object>;
9
- id: PropTypes.Validator<string>;
10
- options: PropTypes.Validator<PropTypes.InferProps<{
11
- enumOptions: PropTypes.Requireable<any[]>;
12
- }>>;
13
- value: PropTypes.Requireable<any>;
14
- required: PropTypes.Requireable<boolean>;
15
- disabled: PropTypes.Requireable<boolean>;
16
- readonly: PropTypes.Requireable<boolean>;
17
- multiple: PropTypes.Requireable<boolean>;
18
- autofocus: PropTypes.Requireable<boolean>;
19
- onChange: PropTypes.Requireable<(...args: any[]) => any>;
20
- onBlur: PropTypes.Requireable<(...args: any[]) => any>;
21
- onFocus: PropTypes.Requireable<(...args: any[]) => any>;
22
- };
23
- }
24
- import PropTypes from "prop-types";
@@ -1,9 +1,6 @@
1
- export default TextWidget;
2
- declare function TextWidget(props: any): JSX.Element;
3
- declare namespace TextWidget {
4
- export namespace propTypes {
5
- export const value: PropTypes.Requireable<string | number>;
6
- export const id: PropTypes.Requireable<string>;
7
- }
8
- }
9
- import PropTypes from "prop-types";
1
+ import { WidgetProps } from "@rjsf/utils";
2
+ /** The `TextWidget` component uses the `BaseInputTemplate`.
3
+ *
4
+ * @param props - The `WidgetProps` for this component
5
+ */
6
+ export default function TextWidget<T = any, F = any>(props: WidgetProps<T, F>): JSX.Element;
@@ -1,25 +1,13 @@
1
- export default TextareaWidget;
2
- declare function TextareaWidget(props: any): JSX.Element;
1
+ import { WidgetProps } from "@rjsf/utils";
2
+ /** The `TextareaWidget` is a widget for rendering input fields as textarea.
3
+ *
4
+ * @param props - The `WidgetProps` for this component
5
+ */
6
+ declare function TextareaWidget<T = any, F = any>({ id, options, placeholder, value, required, disabled, readonly, autofocus, onChange, onBlur, onFocus, }: WidgetProps<T, F>): JSX.Element;
3
7
  declare namespace TextareaWidget {
4
- export namespace defaultProps {
5
- export const autofocus: boolean;
6
- export const options: {};
7
- }
8
- export const propTypes: {
9
- schema: PropTypes.Validator<object>;
10
- id: PropTypes.Validator<string>;
11
- placeholder: PropTypes.Requireable<string>;
12
- options: PropTypes.Requireable<PropTypes.InferProps<{
13
- rows: PropTypes.Requireable<number>;
14
- }>>;
15
- value: PropTypes.Requireable<string>;
16
- required: PropTypes.Requireable<boolean>;
17
- disabled: PropTypes.Requireable<boolean>;
18
- readonly: PropTypes.Requireable<boolean>;
19
- autofocus: PropTypes.Requireable<boolean>;
20
- onChange: PropTypes.Requireable<(...args: any[]) => any>;
21
- onBlur: PropTypes.Requireable<(...args: any[]) => any>;
22
- onFocus: PropTypes.Requireable<(...args: any[]) => any>;
8
+ var defaultProps: {
9
+ autofocus: boolean;
10
+ options: {};
23
11
  };
24
12
  }
25
- import PropTypes from "prop-types";
13
+ export default TextareaWidget;
@@ -1,8 +1,6 @@
1
- export default URLWidget;
2
- declare function URLWidget(props: any): JSX.Element;
3
- declare namespace URLWidget {
4
- export namespace propTypes {
5
- export const value: PropTypes.Requireable<string>;
6
- }
7
- }
8
- import PropTypes from "prop-types";
1
+ import { WidgetProps } from "@rjsf/utils";
2
+ /** The `URLWidget` component uses the `BaseInputTemplate` changing the type to `url`.
3
+ *
4
+ * @param props - The `WidgetProps` for this component
5
+ */
6
+ export default function URLWidget<T = any, F = any>(props: WidgetProps<T, F>): JSX.Element;
@@ -1,8 +1,6 @@
1
- export default UpDownWidget;
2
- declare function UpDownWidget(props: any): JSX.Element;
3
- declare namespace UpDownWidget {
4
- export namespace propTypes {
5
- export const value: PropTypes.Requireable<string | number>;
6
- }
7
- }
8
- import PropTypes from "prop-types";
1
+ import { WidgetProps } from "@rjsf/utils";
2
+ /** The `UpDownWidget` component uses the `BaseInputTemplate` changing the type to `number`.
3
+ *
4
+ * @param props - The `WidgetProps` for this component
5
+ */
6
+ export default function UpDownWidget<T = any, F = any>(props: WidgetProps<T, F>): JSX.Element;
@@ -1,43 +1,3 @@
1
- declare namespace _default {
2
- export { BaseInput };
3
- export { PasswordWidget };
4
- export { RadioWidget };
5
- export { UpDownWidget };
6
- export { RangeWidget };
7
- export { SelectWidget };
8
- export { TextWidget };
9
- export { DateWidget };
10
- export { DateTimeWidget };
11
- export { AltDateWidget };
12
- export { AltDateTimeWidget };
13
- export { EmailWidget };
14
- export { URLWidget };
15
- export { TextareaWidget };
16
- export { HiddenWidget };
17
- export { ColorWidget };
18
- export { FileWidget };
19
- export { CheckboxWidget };
20
- export { CheckboxesWidget };
21
- export { SubmitButton };
22
- }
23
- export default _default;
24
- import BaseInput from "./BaseInput";
25
- import PasswordWidget from "./PasswordWidget";
26
- import RadioWidget from "./RadioWidget";
27
- import UpDownWidget from "./UpDownWidget";
28
- import RangeWidget from "./RangeWidget";
29
- import SelectWidget from "./SelectWidget";
30
- import TextWidget from "./TextWidget";
31
- import DateWidget from "./DateWidget";
32
- import DateTimeWidget from "./DateTimeWidget";
33
- import AltDateWidget from "./AltDateWidget";
34
- import AltDateTimeWidget from "./AltDateTimeWidget";
35
- import EmailWidget from "./EmailWidget";
36
- import URLWidget from "./URLWidget";
37
- import TextareaWidget from "./TextareaWidget";
38
- import HiddenWidget from "./HiddenWidget";
39
- import ColorWidget from "./ColorWidget";
40
- import FileWidget from "./FileWidget";
41
- import CheckboxWidget from "./CheckboxWidget";
42
- import CheckboxesWidget from "./CheckboxesWidget";
43
- import SubmitButton from "./SubmitButton";
1
+ import { RegistryWidgetsType } from "@rjsf/utils";
2
+ declare const widgets: RegistryWidgetsType;
3
+ export default widgets;