@react-typed-forms/schemas 13.1.3 → 13.1.5

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
@@ -298,6 +298,10 @@ export interface GroupedControlsDefinition extends ControlDefinition {
298
298
  export interface GroupRenderOptions {
299
299
  type: string;
300
300
  hideTitle?: boolean | null;
301
+ childStyleClass?: string | null;
302
+ childLayoutClass?: string | null;
303
+ childLabelClass?: string | null;
304
+ displayOnly?: boolean | null;
301
305
  }
302
306
  export declare enum GroupRenderType {
303
307
  Standard = "Standard",
@@ -397,7 +401,7 @@ export declare function isGridRenderer(options: GroupRenderOptions): options is
397
401
  export declare function isFlexRenderer(options: GroupRenderOptions): options is FlexRenderer;
398
402
  export declare function isDisplayOnlyRenderer(options: RenderOptions): options is DisplayOnlyRenderOptions;
399
403
  export declare function isTextfieldRenderer(options: RenderOptions): options is TextfieldRenderOptions;
400
- export declare function isDataGroupRenderer(options: RenderOptions): options is DataGroupRenderOptions;
404
+ export declare function isDataGroupRenderer(options?: RenderOptions | null): options is DataGroupRenderOptions;
401
405
  export declare function isArrayRenderer(options: RenderOptions): options is ArrayRenderOptions;
402
406
  export declare function findField(fields: SchemaField[], field: string): SchemaField | undefined;
403
407
  export declare function isScalarField(sf: SchemaField): sf is SchemaField;
package/lib/util.d.ts CHANGED
@@ -1,6 +1,11 @@
1
- import { CompoundField, ControlDefinition, DataControlDefinition, DisplayOnlyRenderOptions, FieldOption, SchemaField, SchemaInterface } from "./types";
1
+ import { CompoundField, ControlDefinition, DataControlDefinition, DisplayOnlyRenderOptions, FieldOption, GroupRenderOptions, SchemaField, SchemaInterface } from "./types";
2
2
  import { MutableRefObject } from "react";
3
3
  import { SchemaDataNode } from "./treeNodes";
4
+ export interface ControlClasses {
5
+ styleClass?: string;
6
+ layoutClass?: string;
7
+ labelClass?: string;
8
+ }
4
9
  export type JsonPath = string | number;
5
10
  export interface FormContextData {
6
11
  option?: FieldOption;
@@ -63,3 +68,6 @@ export declare function applyLengthRestrictions<Min, Max>(length: number, min: n
63
68
  export declare function findFieldPath(fields: SchemaField[], fieldPath: string | undefined): SchemaField[] | undefined;
64
69
  export declare function mergeObjects<A extends Record<string, any> | undefined>(o1: A, o2: A, doMerge?: (k: keyof NonNullable<A>, v1: unknown, v2: unknown) => unknown): A;
65
70
  export declare function coerceToString(v: unknown): string;
71
+ export declare function getGroupRendererOptions(def: ControlDefinition): GroupRenderOptions | undefined;
72
+ export declare function getGroupClassOverrides(def: ControlDefinition): ControlClasses;
73
+ export declare function isControlDisplayOnly(def: ControlDefinition): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-typed-forms/schemas",
3
- "version": "13.1.3",
3
+ "version": "13.1.5",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "lib/index.cjs",
@@ -31,13 +31,17 @@
31
31
  "material-ui"
32
32
  ],
33
33
  "dependencies": {
34
- "@react-typed-forms/core": "^3.5.0",
35
34
  "clsx": "^1 || ^2",
36
35
  "uuid": "^10.0.0",
37
- "jsonata": "^2.0.4",
38
- "react": "^18.2.0"
36
+ "jsonata": "^2.0.4"
37
+ },
38
+ "peerDependencies": {
39
+ "react": "^18.2.0",
40
+ "@react-typed-forms/core": "^3.6.1"
39
41
  },
40
42
  "devDependencies": {
43
+ "react": "^18.2.0",
44
+ "@react-typed-forms/core": "^3.6.1",
41
45
  "@react-typed-forms/transform": "^0.2.0",
42
46
  "@types/uuid": "^10.0.0",
43
47
  "@types/react": "^18.2.28",
package/lib/internal.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare function cc(n: string | null | undefined): string | undefined;