@simpleform/render 4.2.2 → 4.3.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/README.md +1 -1
- package/README_CN.md +1 -1
- package/lib/index.js +1 -1
- package/lib/typings.d.ts +1 -4
- package/lib/utils/transform.d.ts +2 -2
- package/package.json +1 -1
package/lib/typings.d.ts
CHANGED
|
@@ -41,17 +41,14 @@ export type FRContext = {
|
|
|
41
41
|
path?: Array<string | number>;
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
|
-
export type CustomRenderType = <C>(children?: C, context?: FRContext) => C;
|
|
45
44
|
export type FormRenderNodeProps = {
|
|
46
45
|
formrender: SimpleFormRender;
|
|
47
46
|
widget: FRNode;
|
|
48
47
|
index?: FRContext['_options']['index'];
|
|
49
48
|
path?: FRContext['_options']['path'];
|
|
50
|
-
renderList?: CustomRenderType;
|
|
51
|
-
renderItem?: CustomRenderType;
|
|
52
49
|
onValuesChange?: (...args: any[]) => void;
|
|
53
50
|
};
|
|
54
|
-
export type FormChildrenProps =
|
|
51
|
+
export type FormChildrenProps = {
|
|
55
52
|
/**@deprecated no longer recommended, please use 'variables' instead */
|
|
56
53
|
plugins?: Record<string, unknown>;
|
|
57
54
|
formrender?: SimpleFormRender;
|
package/lib/utils/transform.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { FormChildrenProps, FormRenderNodeProps, FormRenderProps, FRContext, FRGenerateNode } from '../typings';
|
|
3
3
|
export declare const mergeFROptions: (oldConfig: any, newConfig: any, mergeFunNames?: string[]) => any;
|
|
4
4
|
export declare const traverseMapObject: (val: any, callback: any) => any;
|
|
5
5
|
export declare const traverseList: <V>(list?: Array<V>, callback?: (item: V, index: number, parent?: Array<string | number>) => any | void, parent?: Array<string | number>) => void[] | undefined;
|
|
@@ -7,6 +7,6 @@ export declare const traverseParse: <V>(obj: V, variables?: object, parser?: For
|
|
|
7
7
|
export declare const getInitialValues: (widgetList?: FRGenerateNode[]) => {} | undefined;
|
|
8
8
|
export declare const createFRElement: (target?: any, props?: any, widgets?: FormRenderProps["components"]) => React.ReactNode;
|
|
9
9
|
export declare const parseFRData: (data: any, formrender: FormRenderProps["formrender"], form?: FormRenderProps["form"]) => any;
|
|
10
|
-
export declare const withSide: (target?: React.ReactNode,
|
|
10
|
+
export declare const withSide: (target?: React.ReactNode, side?: React.ReactNode, context?: FRContext) => React.ReactElement<any, any>;
|
|
11
11
|
export declare const renderFRNode: (node?: FormRenderNodeProps, formConfig?: FormChildrenProps["formConfig"]) => React.ReactElement<any, any> | null | undefined;
|
|
12
12
|
export declare const renderFRNodeList: (formrender: FormRenderNodeProps["formrender"], widgetList?: any, formConfig?: FormChildrenProps["formConfig"], parentNode?: Partial<FormRenderNodeProps>) => (React.ReactElement<any, any> | null | undefined)[] | undefined;
|
package/package.json
CHANGED