@react-typed-forms/schemas 12.0.0 → 12.0.1
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/index.cjs +1 -1
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/treeNodes.d.ts +3 -1
- package/lib/util.d.ts +0 -5
- package/package.json +1 -1
package/lib/treeNodes.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Control } from "@react-typed-forms/core";
|
|
2
|
-
import { ControlDefinition, SchemaField } from "./types";
|
|
2
|
+
import { ControlDefinition, SchemaField, DataControlDefinition } from "./types";
|
|
3
3
|
export interface FormNode {
|
|
4
4
|
definition: ControlDefinition;
|
|
5
5
|
getChildNodes(): FormNode[];
|
|
@@ -43,3 +43,5 @@ export declare function getRootDataNode(dataNode: SchemaDataNode): SchemaDataNod
|
|
|
43
43
|
export declare function getJsonPath(dataNode: SchemaDataNode): (string | number)[];
|
|
44
44
|
export declare function getSchemaFieldList(schema: SchemaNode): SchemaField[];
|
|
45
45
|
export declare function rootSchemaNode(fields: SchemaField[], lookup?: SchemaTreeLookup): SchemaNode;
|
|
46
|
+
export declare function visitControlDataArray<A>(controls: ControlDefinition[] | undefined | null, context: SchemaDataNode, cb: (definition: DataControlDefinition, node: SchemaDataNode) => A | undefined): A | undefined;
|
|
47
|
+
export declare function visitControlData<A>(definition: ControlDefinition, ctx: SchemaDataNode, cb: (definition: DataControlDefinition, field: SchemaDataNode) => A | undefined): A | undefined;
|
package/lib/util.d.ts
CHANGED
|
@@ -48,10 +48,6 @@ export declare function useUpdatedRef<A>(a: A): MutableRefObject<A>;
|
|
|
48
48
|
export declare function isControlReadonly(c: ControlDefinition): boolean;
|
|
49
49
|
export declare function isControlDisabled(c: ControlDefinition): boolean;
|
|
50
50
|
export declare function getDisplayOnlyOptions(d: ControlDefinition): DisplayOnlyRenderOptions | undefined;
|
|
51
|
-
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;
|
|
52
|
-
export declare function visitControlData<A>(definition: ControlDefinition, ctx: ControlDataContext, cb: (definition: DataControlDefinition, field: SchemaField, control: Control<any>, element: boolean) => A | undefined): A | undefined;
|
|
53
|
-
export declare function lookupChildControl(data: DataContext, path: SchemaField[], element?: number): Control<any> | undefined;
|
|
54
|
-
export declare function lookupChildControlPath(data: DataContext, jsonPath: JsonPath[]): Control<any> | undefined;
|
|
55
51
|
export declare function cleanDataForSchema(v: {
|
|
56
52
|
[k: string]: any;
|
|
57
53
|
} | undefined, fields: SchemaField[], removeIfDefault?: boolean): any;
|
|
@@ -60,7 +56,6 @@ export declare function jsonPathString(jsonPath: JsonPath[], customIndex?: (n: n
|
|
|
60
56
|
export declare function findChildDefinition(parent: ControlDefinition, childPath: number | number[]): ControlDefinition;
|
|
61
57
|
export declare function getOverrideClass(className?: string | null): string | null | undefined;
|
|
62
58
|
export declare function rendererClass(controlClass?: string | null, globalClass?: string | null): string | undefined;
|
|
63
|
-
export declare function watchControlLookup(base: Control<any> | undefined, path: (string | number)[]): Control<any> | undefined;
|
|
64
59
|
export type HookDep = string | number | undefined | null;
|
|
65
60
|
export interface DynamicHookGenerator<A, P> {
|
|
66
61
|
deps: HookDep;
|