@rjsf/utils 5.0.0-beta.8 → 5.0.0-beta.9

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 (2) hide show
  1. package/dist/index.d.ts +10 -6
  2. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -127,7 +127,7 @@ declare type FieldErrorProps<T = any, F = any> = {
127
127
  /** The errorSchema constructed by `Form` */
128
128
  errorSchema?: ErrorSchema<T>;
129
129
  /** An array of the errors */
130
- errors?: string[];
130
+ errors?: Array<string | React.ReactElement>;
131
131
  /** The tree of unique ids for every child field */
132
132
  idSchema: IdSchema<T>;
133
133
  /** The schema that was passed to field */
@@ -195,13 +195,13 @@ interface TemplatesType<T = any, F = any> {
195
195
  /** The template to use for the main `Submit` button */
196
196
  SubmitButton: React.ComponentType<SubmitButtonProps<T, F>>;
197
197
  /** The template to use for the Add button used for AdditionalProperties and Array items */
198
- AddButton: React.ComponentType<IconButtonProps>;
198
+ AddButton: React.ComponentType<IconButtonProps<T, F>>;
199
199
  /** The template to use for the Move Down button used for Array items */
200
- MoveDownButton: React.ComponentType<IconButtonProps>;
200
+ MoveDownButton: React.ComponentType<IconButtonProps<T, F>>;
201
201
  /** The template to use for the Move Up button used for Array items */
202
- MoveUpButton: React.ComponentType<IconButtonProps>;
202
+ MoveUpButton: React.ComponentType<IconButtonProps<T, F>>;
203
203
  /** The template to use for the Remove button used for AdditionalProperties and Array items */
204
- RemoveButton: React.ComponentType<IconButtonProps>;
204
+ RemoveButton: React.ComponentType<IconButtonProps<T, F>>;
205
205
  };
206
206
  }
207
207
  /** The object containing the registered core, theme and custom fields and widgets as well as the root schema, form
@@ -396,6 +396,8 @@ declare type ArrayFieldTemplateItemType<T = any, F = any> = {
396
396
  readonly: boolean;
397
397
  /** A stable, unique key for the array item */
398
398
  key: string;
399
+ /** The uiSchema object for this field */
400
+ uiSchema?: UiSchema<T, F>;
399
401
  /** The `registry` object */
400
402
  registry: Registry<T, F>;
401
403
  };
@@ -532,11 +534,13 @@ declare type SubmitButtonProps<T = any, F = any> = {
532
534
  uiSchema?: UiSchema<T, F>;
533
535
  };
534
536
  /** The type that defines the props for an Icon button, extending from a basic HTML button attributes */
535
- declare type IconButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
537
+ declare type IconButtonProps<T = any, F = any> = React.ButtonHTMLAttributes<HTMLButtonElement> & {
536
538
  /** An alternative specification for the type of the icon button */
537
539
  iconType?: string;
538
540
  /** The name representation or actual react element implementation for the icon */
539
541
  icon?: string | React.ReactElement;
542
+ /** The uiSchema for this widget */
543
+ uiSchema?: UiSchema<T, F>;
540
544
  };
541
545
  /** The type that defines how to change the behavior of the submit button for the form */
542
546
  declare type UISchemaSubmitButtonOptions = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rjsf/utils",
3
- "version": "5.0.0-beta.8",
3
+ "version": "5.0.0-beta.9",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/utils.esm.js",
6
6
  "typings": "dist/index.d.ts",
@@ -75,5 +75,5 @@
75
75
  "url": "git+https://github.com/rjsf-team/react-jsonschema-form.git"
76
76
  },
77
77
  "license": "Apache-2.0",
78
- "gitHead": "8e6a64e6b398f01bf04b1e64a0d4982196bdc05c"
78
+ "gitHead": "6a0a58190ff616344d80c558a755cda1835954f6"
79
79
  }