@simpleform/render 3.0.16 → 3.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/README.md +1 -1
- package/README_CN.md +1 -1
- package/lib/children.d.ts +3 -2
- package/lib/components/grid.d.ts +13 -13
- package/lib/css/main.css +1 -1
- package/lib/form.d.ts +1 -1
- package/lib/hooks.d.ts +2 -2
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/store.d.ts +15 -15
- package/lib/typings.d.ts +47 -0
- package/lib/utils/ReactIs.d.ts +1 -1
- package/lib/utils/array.d.ts +1 -1
- package/lib/utils/object.d.ts +2 -2
- package/lib/utils/transform.d.ts +7 -6
- package/lib/utils/type.d.ts +31 -22
- package/lib/utils/utils.d.ts +22 -13
- package/package.json +2 -2
- package/lib/types.d.ts +0 -50
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/children.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FormChildrenProps } from './typings';
|
|
2
3
|
import '@simpleform/form/lib/css/main.css';
|
|
3
|
-
declare function FormChildren(props: FormChildrenProps):
|
|
4
|
+
declare function FormChildren(props: FormChildrenProps): React.JSX.Element;
|
|
4
5
|
declare namespace FormChildren {
|
|
5
6
|
var displayName: string;
|
|
6
7
|
}
|
package/lib/components/grid.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ColProps, RowProps } from "antd";
|
|
3
|
-
import {
|
|
3
|
+
import { WidgetContextProps } from '../typings';
|
|
4
4
|
import './grid.less';
|
|
5
5
|
export declare const getColProps: (props: ColProps, inline?: boolean) => {
|
|
6
|
-
flex?: (number | import("antd/es/_util/type").LiteralUnion<"
|
|
6
|
+
flex?: (number | import("antd/es/_util/type").LiteralUnion<"none" | "auto">) | undefined;
|
|
7
7
|
order?: (string | number) | undefined;
|
|
8
8
|
offset?: (string | number) | undefined;
|
|
9
9
|
push?: (string | number) | undefined;
|
|
@@ -18,7 +18,7 @@ export declare const getColProps: (props: ColProps, inline?: boolean) => {
|
|
|
18
18
|
accessKey?: string | undefined;
|
|
19
19
|
autoFocus?: boolean | undefined;
|
|
20
20
|
className?: string | undefined;
|
|
21
|
-
contentEditable?:
|
|
21
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
22
22
|
contextMenu?: string | undefined;
|
|
23
23
|
dir?: string | undefined;
|
|
24
24
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
@@ -279,16 +279,16 @@ export declare const getColProps: (props: ColProps, inline?: boolean) => {
|
|
|
279
279
|
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLDivElement> | undefined;
|
|
280
280
|
onTransitionEnd?: React.TransitionEventHandler<HTMLDivElement> | undefined;
|
|
281
281
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLDivElement> | undefined;
|
|
282
|
-
xs:
|
|
283
|
-
sm:
|
|
284
|
-
md:
|
|
285
|
-
lg:
|
|
282
|
+
xs: (string | number) | import("antd/es/grid").ColSize | undefined;
|
|
283
|
+
sm: (string | number) | import("antd/es/grid").ColSize | undefined;
|
|
284
|
+
md: (string | number) | import("antd/es/grid").ColSize | undefined;
|
|
285
|
+
lg: (string | number) | import("antd/es/grid").ColSize | undefined;
|
|
286
286
|
};
|
|
287
|
-
export interface CustomRowProps extends RowProps,
|
|
288
|
-
children
|
|
287
|
+
export interface CustomRowProps extends RowProps, WidgetContextProps {
|
|
288
|
+
children?: React.ReactNode;
|
|
289
289
|
}
|
|
290
|
-
export declare const CustomRow: React.ForwardRefExoticComponent<CustomRowProps & React.RefAttributes<
|
|
291
|
-
export interface CustomColProps extends ColProps,
|
|
292
|
-
children
|
|
290
|
+
export declare const CustomRow: React.ForwardRefExoticComponent<CustomRowProps & React.RefAttributes<HTMLDivElement>>;
|
|
291
|
+
export interface CustomColProps extends ColProps, WidgetContextProps {
|
|
292
|
+
children?: React.ReactNode;
|
|
293
293
|
}
|
|
294
|
-
export declare const CustomCol: React.ForwardRefExoticComponent<CustomColProps & React.RefAttributes<
|
|
294
|
+
export declare const CustomCol: React.ForwardRefExoticComponent<CustomColProps & React.RefAttributes<HTMLDivElement>>;
|
package/lib/css/main.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.item-control__container{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;position:relative}.item-control__content{-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-left:0;margin-right:0;min-height:32px
|
|
1
|
+
.item-control__container{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;position:relative}.item-control__content{-webkit-box-align:center;-ms-flex-align:center;-webkit-align-items:center;align-items:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-left:0;margin-right:0;min-height:32px;overflow-wrap:break-word;word-break:break-word}.item-control__message{color:red;font-size:12px}.item-control__suffix{font-size:14px;margin-left:10px;margin-top:3px}.item-control__footer{margin-top:8px;width:100%}.item-control--error .item-control__content .ant-checkbox,.item-control--error .item-control__content .ant-input,.item-control--error .item-control__content .ant-input-number,.item-control--error .item-control__content .ant-mentions,.item-control--error .item-control__content .ant-picker,.item-control--error .item-control__content .ant-radio,.item-control--error .item-control__content .ant-rate,.item-control--error .item-control__content .ant-select .ant-select-selector,.item-control--error .item-control__content .ant-slider,.item-control--error .item-control__content .ant-switch,.item-control--error .item-control__content .ant-upload{border-color:#ff4d4f}.item-control--error .item-control__content .ant-checkbox:hover,.item-control--error .item-control__content .ant-input-number:hover,.item-control--error .item-control__content .ant-input:hover,.item-control--error .item-control__content .ant-mentions:hover,.item-control--error .item-control__content .ant-picker:hover,.item-control--error .item-control__content .ant-radio:hover,.item-control--error .item-control__content .ant-rate:hover,.item-control--error .item-control__content .ant-select .ant-select-selector:hover,.item-control--error .item-control__content .ant-slider:hover,.item-control--error .item-control__content .ant-switch:hover,.item-control--error .item-control__content .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}.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}.item-label__header{font-size:14px;overflow-wrap:break-word;width:100px;word-break:break-word}.item-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}.item-label--required.item-label__header: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{margin-bottom:16px;width:100%}.field-item--error{margin-bottom:3px}.field-item--horizontal{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex}.field-item--horizontal>.item-label__header{margin-right:8px;margin-top:7px;text-align:right}.field-item--horizontal.field-item--inline{width:auto}.field-item--vertical{display:inline-block}.field-item--vertical.field-item--inline{vertical-align:top;width:auto}.field-item--compact{margin-bottom:0}.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/form.d.ts
CHANGED
package/lib/hooks.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SimpleFormRender } from './store';
|
|
3
|
-
import { WidgetList } from './
|
|
3
|
+
import { WidgetList } from './typings';
|
|
4
4
|
export declare function useSimpleFormRender(): SimpleFormRender;
|
|
5
|
-
export declare function useWidgetList(formrender: SimpleFormRender):
|
|
5
|
+
export declare function useWidgetList(formrender: SimpleFormRender): readonly [WidgetList | undefined, import("react").Dispatch<import("react").SetStateAction<WidgetList | undefined>>];
|
package/lib/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import FormRender from './form';
|
|
|
2
2
|
import FormChildren from './children';
|
|
3
3
|
export default FormRender;
|
|
4
4
|
export { FormChildren };
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './typings';
|
|
6
6
|
export * from './components';
|
|
7
7
|
export * from './store';
|
|
8
8
|
export * from "./hooks";
|