@simpleform/render 3.0.16 → 3.0.17

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 CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  English | [中文说明](./README_CN.md)
4
4
 
5
- [![](https://img.shields.io/badge/version-3.0.16-green)](https://www.npmjs.com/package/@simpleform/render)
5
+ [![](https://img.shields.io/badge/version-3.0.17-green)](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://img.shields.io/badge/version-3.0.16-green)](https://www.npmjs.com/package/@simpleform/render)
5
+ [![](https://img.shields.io/badge/version-3.0.17-green)](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 { FormChildrenProps } from './types';
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): any;
4
+ declare function FormChildren(props: FormChildrenProps): React.JSX.Element;
4
5
  declare namespace FormChildren {
5
6
  var displayName: string;
6
7
  }
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
2
  import { ColProps, RowProps } from "antd";
3
- import { GenerateParams } from '../types';
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<"auto" | "none">) | undefined;
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?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
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: any;
283
- sm: any;
284
- md: any;
285
- lg: any;
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, GenerateParams {
288
- children: any;
287
+ export interface CustomRowProps extends RowProps, WidgetContextProps {
288
+ children?: React.ReactNode;
289
289
  }
290
- export declare const CustomRow: React.ForwardRefExoticComponent<CustomRowProps & React.RefAttributes<any>>;
291
- export interface CustomColProps extends ColProps, GenerateParams {
292
- children: any;
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<any>>;
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}.item-control__content--text{word-wrap:break-word;word-break:break-all}.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{word-wrap:break-word;font-size:14px;width:100px;word-break:break-all}.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--readOnly{margin-bottom:0}.field-item--horizontal{-webkit-box-align:start;-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start;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}
1
+ .item-control__container{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;position:relative}.item-control__content{margin-left:0;margin-right:0;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-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.field-item--horizontal>.item-label__header{margin-right:8px;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
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { FormRenderProps } from './types';
2
+ import { FormRenderProps } from './typings';
3
3
  export default function FormRender(props: FormRenderProps): React.JSX.Element;
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 './types';
3
+ import { WidgetList } from './typings';
4
4
  export declare function useSimpleFormRender(): SimpleFormRender;
5
- export declare function useWidgetList(formrender: SimpleFormRender): (WidgetList | import("react").Dispatch<import("react").SetStateAction<WidgetList | undefined>> | undefined)[];
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 './types';
5
+ export * from './typings';
6
6
  export * from './components';
7
7
  export * from './store';
8
8
  export * from "./hooks";