@react-typed-forms/schemas 11.0.2 → 11.1.0

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/lib/types.d.ts CHANGED
@@ -152,6 +152,7 @@ export interface DataControlDefinition extends ControlDefinition {
152
152
  renderOptions?: RenderOptions | null;
153
153
  defaultValue?: any;
154
154
  readonly?: boolean | null;
155
+ disabled?: boolean | null;
155
156
  validators?: SchemaValidator[] | null;
156
157
  hideTitle?: boolean | null;
157
158
  dontClearHidden?: boolean | null;
package/lib/util.d.ts CHANGED
@@ -39,6 +39,7 @@ export declare function findNonDataGroups(controls: ControlDefinition[]): Contro
39
39
  export declare function addMissingControls(fields: SchemaField[], controls: ControlDefinition[]): ControlDefinition[];
40
40
  export declare function useUpdatedRef<A>(a: A): MutableRefObject<A>;
41
41
  export declare function isControlReadonly(c: ControlDefinition): boolean;
42
+ export declare function isControlDisabled(c: ControlDefinition): boolean;
42
43
  export declare function getDisplayOnlyOptions(d: ControlDefinition): DisplayOnlyRenderOptions | undefined;
43
44
  export declare function getTypeField(context: ControlDataContext, fieldPath: SchemaField[]): Control<string> | undefined;
44
45
  export declare function visitControlDataArray<A>(controls: ControlDefinition[] | undefined | null, context: ControlDataContext, cb: (definition: DataControlDefinition, field: SchemaField, control: Control<any>, element: boolean) => A | undefined): A | undefined;
@@ -47,7 +48,7 @@ export declare function lookupChildControl(data: DataContext, path: SchemaField[
47
48
  export declare function lookupChildControlPath(data: DataContext, jsonPath: JsonPath[]): Control<any> | undefined;
48
49
  export declare function cleanDataForSchema(v: {
49
50
  [k: string]: any;
50
- } | undefined, fields: SchemaField[]): any;
51
+ } | undefined, fields: SchemaField[], removeIfDefault?: boolean): any;
51
52
  export declare function getAllReferencedClasses(c: ControlDefinition, collectExtra?: (c: ControlDefinition) => (string | undefined | null)[]): string[];
52
53
  export declare function jsonPathString(jsonPath: JsonPath[], customIndex?: (n: number) => string): string;
53
54
  export declare function findChildDefinition(parent: ControlDefinition, childPath: number | number[]): ControlDefinition;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-typed-forms/schemas",
3
- "version": "11.0.2",
3
+ "version": "11.1.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -24,7 +24,7 @@
24
24
  "material-ui"
25
25
  ],
26
26
  "dependencies": {
27
- "@react-typed-forms/core": "^3.3.2",
27
+ "@react-typed-forms/core": "^3.4.0",
28
28
  "clsx": "^1 || ^2",
29
29
  "jsonata": "^2.0.4",
30
30
  "react": "^18.2.0"