@simpleform/render 4.1.3 → 4.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/README.md +1 -1
- package/README_CN.md +1 -1
- package/lib/css/main.css +1 -1
- package/lib/store.d.ts +1 -1
- package/lib/typings.d.ts +1 -1
- package/lib/utils/transform.d.ts +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文说明](./README_CN.md)
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/@simpleform/render)
|
|
6
6
|
|
|
7
7
|
> A lightweight dynamic forms engine that makes it easy to dynamically render forms.
|
|
8
8
|
|
package/README_CN.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](./README.md) | 中文说明
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/@simpleform/render)
|
|
6
6
|
|
|
7
7
|
> 轻量级动态表单引擎,实现动态渲染表单很简单.
|
|
8
8
|
|
package/lib/css/main.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.field-item{margin-bottom:16px}.field-item .label__container{font-size:14px;line-height:normal;overflow-wrap:break-word;word-break:break-all}.field-item .label__container .label__tooltip{-webkit-margin-start:4px;cursor:help;margin-inline-start:4px;-webkit-writing-mode:horizontal-tb;-ms-writing-mode:lr-tb;writing-mode:horizontal-tb}.field-item .label__container--required label:before{-webkit-margin-end:4px;color:#ff4d4f;content:"*";display:inline-block;font-family:SimSun,sans-serif;font-size:14px;line-height:1;margin-inline-end:4px}.field-item .control__container{position:relative}.field-item .control__container .item__control{margin-left:0;margin-right:0;overflow-wrap:break-word;padding:.1px;word-break:break-word}.field-item .control__container .item__suffix{font-size:14px;margin-left:10px;margin-top:3px}.field-item .control__container .item__footer{margin-top:8px;width:100%}.field-item .control__container .item__message{color:red;font-size:12px}.field-item .control__container--error .item__control .ant-checkbox,.field-item .control__container--error .item__control .ant-input,.field-item .control__container--error .item__control .ant-input-number,.field-item .control__container--error .item__control .ant-mentions,.field-item .control__container--error .item__control .ant-picker,.field-item .control__container--error .item__control .ant-radio,.field-item .control__container--error .item__control .ant-rate,.field-item .control__container--error .item__control .ant-select .ant-select-selector,.field-item .control__container--error .item__control .ant-slider,.field-item .control__container--error .item__control .ant-switch,.field-item .control__container--error .item__control .ant-upload{border-color:#ff4d4f}.field-item .control__container--error .item__control .ant-checkbox:hover,.field-item .control__container--error .item__control .ant-input-number:hover,.field-item .control__container--error .item__control .ant-input:hover,.field-item .control__container--error .item__control .ant-mentions:hover,.field-item .control__container--error .item__control .ant-picker:hover,.field-item .control__container--error .item__control .ant-radio:hover,.field-item .control__container--error .item__control .ant-rate:hover,.field-item .control__container--error .item__control .ant-select .ant-select-selector:hover,.field-item .control__container--error .item__control .ant-slider:hover,.field-item .control__container--error .item__control .ant-switch:hover,.field-item .control__container--error .item__control .ant-upload:hover{border-color:#ff7875;border-right-width:1px!important;-webkit-box-shadow:0 0 0 2px rgba(255,77,79,.2);box-shadow:0 0 0 2px rgba(255,77,79,.2);outline:0}.field-item--horizontal{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:100%}.field-item--horizontal>.label__container{padding-right:8px;text-align:right;width:100px}.field-item--horizontal>.control__container{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.field-item--vertical{display:inline-block;width:100%}.field-item--vertical>.label__container{padding-bottom:8px;width:auto}.field-item--error{margin-bottom:3px}.field-item--inline{vertical-align:top;width:auto}.field-item--compact{margin:0;padding:0}.svg-icon{fill:currentColor;height:1.1em;outline:none;overflow:hidden;vertical-align:-.2em;width:1.1em}.custom-tooltip.react-tooltip{background:#fff;background-clip:padding-box;border-radius:2px;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.15);box-shadow:0 2px 8px rgba(0,0,0,.15);color:rgba(0,0,0,.85);z-index:999}.custom-tooltip.react-tooltip .react-tooltip-arrow{background:#fff}.custom-row{-ms-flex-line-pack:start;-webkit-align-content:flex-start;align-content:flex-start;margin-left:0;margin-right:0;width:100%}.custom-col{padding-left:0;padding-right:0}
|
|
1
|
+
.field-item:not(:last-child){margin-bottom:16px}.field-item .label__container{font-size:14px;line-height:normal;overflow-wrap:break-word;word-break:break-all}.field-item .label__container .label__tooltip{-webkit-margin-start:4px;cursor:help;margin-inline-start:4px;-webkit-writing-mode:horizontal-tb;-ms-writing-mode:lr-tb;writing-mode:horizontal-tb}.field-item .label__container--required label:before{-webkit-margin-end:4px;color:#ff4d4f;content:"*";display:inline-block;font-family:SimSun,sans-serif;font-size:14px;line-height:1;margin-inline-end:4px}.field-item .control__container{position:relative}.field-item .control__container .item__control{margin-left:0;margin-right:0;overflow-wrap:break-word;padding:.1px;word-break:break-word}.field-item .control__container .item__suffix{font-size:14px;margin-left:10px;margin-top:3px}.field-item .control__container .item__footer{margin-top:8px;width:100%}.field-item .control__container .item__message{color:red;font-size:12px}.field-item .control__container--error .item__control .ant-checkbox,.field-item .control__container--error .item__control .ant-input,.field-item .control__container--error .item__control .ant-input-number,.field-item .control__container--error .item__control .ant-mentions,.field-item .control__container--error .item__control .ant-picker,.field-item .control__container--error .item__control .ant-radio,.field-item .control__container--error .item__control .ant-rate,.field-item .control__container--error .item__control .ant-select .ant-select-selector,.field-item .control__container--error .item__control .ant-slider,.field-item .control__container--error .item__control .ant-switch,.field-item .control__container--error .item__control .ant-upload{border-color:#ff4d4f}.field-item .control__container--error .item__control .ant-checkbox:hover,.field-item .control__container--error .item__control .ant-input-number:hover,.field-item .control__container--error .item__control .ant-input:hover,.field-item .control__container--error .item__control .ant-mentions:hover,.field-item .control__container--error .item__control .ant-picker:hover,.field-item .control__container--error .item__control .ant-radio:hover,.field-item .control__container--error .item__control .ant-rate:hover,.field-item .control__container--error .item__control .ant-select .ant-select-selector:hover,.field-item .control__container--error .item__control .ant-slider:hover,.field-item .control__container--error .item__control .ant-switch:hover,.field-item .control__container--error .item__control .ant-upload:hover{border-color:#ff7875;border-right-width:1px!important;-webkit-box-shadow:0 0 0 2px rgba(255,77,79,.2);box-shadow:0 0 0 2px rgba(255,77,79,.2);outline:0}.field-item--horizontal{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;width:100%}.field-item--horizontal>.label__container{padding-right:8px;text-align:right;width:100px}.field-item--horizontal>.control__container{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.field-item--vertical{display:inline-block;width:100%}.field-item--vertical>.label__container{padding-bottom:8px;width:auto}.field-item--error{margin-bottom:3px}.field-item--inline{vertical-align:top;width:auto}.field-item--compact{margin:0;padding:0}.svg-icon{fill:currentColor;height:1.1em;outline:none;overflow:hidden;vertical-align:-.2em;width:1.1em}.custom-tooltip.react-tooltip{background:#fff;background-clip:padding-box;border-radius:2px;-webkit-box-shadow:0 2px 8px rgba(0,0,0,.15);box-shadow:0 2px 8px rgba(0,0,0,.15);color:rgba(0,0,0,.85);z-index:999}.custom-tooltip.react-tooltip .react-tooltip-arrow{background:#fff}.custom-row{-ms-flex-line-pack:start;-webkit-align-content:flex-start;align-content:flex-start;margin-left:0;margin-right:0;width:100%}.custom-col{padding-left:0;padding-right:0}
|
package/lib/store.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare class SimpleFormRender {
|
|
|
10
10
|
constructor();
|
|
11
11
|
addModule(data: FormRenderProps['variables']): void;
|
|
12
12
|
registry(data: FormRenderProps['components']): void;
|
|
13
|
-
getFormComponent(target?: CustomUnionType): import("
|
|
13
|
+
getFormComponent(target?: CustomUnionType): import("./typings").ReactComponent<any> | null | undefined;
|
|
14
14
|
createFormElement(target?: CustomUnionType, commonProps?: unknown): import("react").ReactNode;
|
|
15
15
|
getWidgetList(): WidgetList;
|
|
16
16
|
setWidgetList(data?: SimpleFormRender['widgetList']): void;
|
package/lib/typings.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export interface RegisteredComponents<P = any> {
|
|
|
8
8
|
}
|
|
9
9
|
export type WidgetList<P = {}> = Array<WidgetItem<P>>;
|
|
10
10
|
export type GenerateWidgetItem<P = {}> = P & FormItemProps & {
|
|
11
|
-
type?: string | ReactComponent<
|
|
11
|
+
type?: string | ReactComponent<any>;
|
|
12
12
|
props?: Record<string, unknown>;
|
|
13
13
|
children?: any;
|
|
14
14
|
inside?: CustomUnionType<P>;
|
package/lib/utils/transform.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { CustomRenderType, CustomUnionType, FormRenderProps, GenerateWidgetItem, RegisteredComponents, WidgetContextProps, WidgetItem, WidgetList } from "../typings";
|
|
2
|
+
import { CustomRenderType, CustomUnionType, FormRenderProps, GenerateWidgetItem, ReactComponent, RegisteredComponents, WidgetContextProps, WidgetItem, WidgetList } from "../typings";
|
|
3
3
|
export declare const traverseMapObject: (val: any, callback: any) => any;
|
|
4
4
|
export declare const traverseWidgetList: (list?: WidgetList, callback?: ((item: WidgetItem, path: string, index?: number) => void) | undefined, parent?: string) => void;
|
|
5
5
|
export declare const matchExpression: (value?: unknown) => string | undefined;
|
|
6
6
|
export declare const evalAttr: <V>(val: V, variables?: object, uneval?: boolean) => any;
|
|
7
7
|
export declare const getInitialValues: <V>(widgetList?: WidgetList) => V | undefined;
|
|
8
|
-
export declare const getFormComponent: (target?: unknown, registeredComponents?: RegisteredComponents) =>
|
|
8
|
+
export declare const getFormComponent: (target?: unknown, registeredComponents?: RegisteredComponents) => ReactComponent<any> | null | undefined;
|
|
9
9
|
export declare const createFormElement: (target?: CustomUnionType, props?: unknown, registeredComponents?: RegisteredComponents) => React.ReactNode;
|
|
10
10
|
export declare const transformStr: (str?: string) => string | undefined;
|
|
11
11
|
export declare const compileExpression: <V>(value: V, variables?: object, uneval?: boolean) => any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simpleform/render",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.5",
|
|
4
4
|
"description": "dynamic rendering core of simple form",
|
|
5
5
|
"author": "mezhanglei <496623925@qq.com>",
|
|
6
6
|
"homepage": "https://github.com/mezhanglei/simpleform#readme",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"react-router-dom": "^6.19.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@simpleform/form": "^2.1.
|
|
48
|
+
"@simpleform/form": "^2.1.6",
|
|
49
49
|
"classnames": "^2.3.2",
|
|
50
50
|
"copy-anything": "^3.0.5",
|
|
51
51
|
"react-fast-compare": "^3.2.2"
|